Skip to content

Commit

Permalink
[Librarian] Regenerated @ ae8fd19a8acd5fda03e9e23a40e1cf739255de74
Browse files Browse the repository at this point in the history
  • Loading branch information
twilio-dx committed Sep 22, 2021
1 parent 3daf4db commit 71c1d00
Show file tree
Hide file tree
Showing 7 changed files with 166 additions and 39 deletions.
14 changes: 14 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,20 @@
twilio-node changelog
=====================

[2021-09-22] Version 3.68.0
---------------------------
**Library - Feature**
- [PR #692](https://github.com/twilio/twilio-node/pull/692): add API response headers to the returned response. Thanks to [@childish-sambino](https://github.com/childish-sambino)!

**Events**
- Add segment sink

**Messaging**
- Add post_approval_required attribute in GET us_app_to_person_usecase api response
- Add Identity Status, Russell 3000, Tax Exempt Status and Should Skip SecVet fields for Brand Registrations
- Add Should Skip Secondary Vetting optional flag parameter to create Brand API


[2021-09-08] Version 3.67.2
---------------------------
**Api**
Expand Down
2 changes: 1 addition & 1 deletion lib/rest/events/v1/sink.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { SinkTestListInstance } from './sink/sinkTest';
import { SinkValidateList } from './sink/sinkValidate';
import { SinkValidateListInstance } from './sink/sinkValidate';

type SinkSinkType = 'kinesis'|'webhook';
type SinkSinkType = 'kinesis'|'webhook'|'segment';

type SinkStatus = 'initialized'|'validating'|'active'|'failed';

Expand Down
14 changes: 13 additions & 1 deletion lib/rest/messaging/v1/brandRegistration.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ import Response = require('../../../http/response');
import V1 = require('../V1');
import { SerializableClass } from '../../../interfaces';

type BrandRegistrationIdentityStatus = 'SELF_DECLARED'|'UNVERIFIED'|'VERIFIED'|'VETTED_VERIFIED';

type BrandRegistrationStatus = 'PENDING'|'APPROVED'|'FAILED';

/**
Expand Down Expand Up @@ -149,12 +151,14 @@ interface BrandRegistrationListInstance {
* @property brandType - Type of brand being created. One of: "STANDARD", "STARTER".
* @property customerProfileBundleSid - Customer Profile Bundle Sid
* @property mock - A boolean that specifies whether brand should be a mock or not. If true, brand will be registered as a mock brand. Defaults to false if no value is provided.
* @property skipAutomaticSecVet - Skip Automatic Secondary Vetting
*/
interface BrandRegistrationListInstanceCreateOptions {
a2PProfileBundleSid: string;
brandType?: string;
customerProfileBundleSid: string;
mock?: boolean;
skipAutomaticSecVet?: boolean;
}

/**
Expand Down Expand Up @@ -226,9 +230,13 @@ interface BrandRegistrationResource {
date_created: Date;
date_updated: Date;
failure_reason: string;
identity_status: BrandRegistrationIdentityStatus;
mock: boolean;
russell_3000: boolean;
sid: string;
skip_automatic_sec_vet: boolean;
status: BrandRegistrationStatus;
tax_exempt_status: string;
tcr_id: string;
url: string;
}
Expand Down Expand Up @@ -290,9 +298,13 @@ declare class BrandRegistrationInstance extends SerializableClass {
* @param callback - Callback to handle processed record
*/
fetch(callback?: (error: Error | null, items: BrandRegistrationInstance) => any): Promise<BrandRegistrationInstance>;
identityStatus: BrandRegistrationIdentityStatus;
mock: boolean;
russell3000: boolean;
sid: string;
skipAutomaticSecVet: boolean;
status: BrandRegistrationStatus;
taxExemptStatus: string;
tcrId: string;
/**
* Provide a user-friendly representation
Expand Down Expand Up @@ -327,4 +339,4 @@ declare class BrandRegistrationPage extends Page<V1, BrandRegistrationPayload, B
toJSON(): any;
}

export { BrandRegistrationContext, BrandRegistrationInstance, BrandRegistrationList, BrandRegistrationListInstance, BrandRegistrationListInstanceCreateOptions, BrandRegistrationListInstanceEachOptions, BrandRegistrationListInstanceOptions, BrandRegistrationListInstancePageOptions, BrandRegistrationPage, BrandRegistrationPayload, BrandRegistrationResource, BrandRegistrationSolution, BrandRegistrationStatus }
export { BrandRegistrationContext, BrandRegistrationIdentityStatus, BrandRegistrationInstance, BrandRegistrationList, BrandRegistrationListInstance, BrandRegistrationListInstanceCreateOptions, BrandRegistrationListInstanceEachOptions, BrandRegistrationListInstanceOptions, BrandRegistrationListInstancePageOptions, BrandRegistrationPage, BrandRegistrationPayload, BrandRegistrationResource, BrandRegistrationSolution, BrandRegistrationStatus }
12 changes: 11 additions & 1 deletion lib/rest/messaging/v1/brandRegistration.js
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,7 @@ BrandRegistrationList = function BrandRegistrationList(version) {
* Type of brand being created. One of: "STANDARD", "STARTER".
* @param {boolean} [opts.mock] -
* A boolean that specifies whether brand should be a mock or not. If true, brand will be registered as a mock brand. Defaults to false if no value is provided.
* @param {boolean} [opts.skipAutomaticSecVet] - Skip Automatic Secondary Vetting
* @param {function} [callback] - Callback to handle processed record
*
* @returns {Promise} Resolves to processed BrandRegistrationInstance
Expand All @@ -331,7 +332,8 @@ BrandRegistrationList = function BrandRegistrationList(version) {
'CustomerProfileBundleSid': _.get(opts, 'customerProfileBundleSid'),
'A2PProfileBundleSid': _.get(opts, 'a2PProfileBundleSid'),
'BrandType': _.get(opts, 'brandType'),
'Mock': serialize.bool(_.get(opts, 'mock'))
'Mock': serialize.bool(_.get(opts, 'mock')),
'SkipAutomaticSecVet': serialize.bool(_.get(opts, 'skipAutomaticSecVet'))
});

var promise = this._version.create({uri: this._uri, method: 'POST', data: data});
Expand Down Expand Up @@ -483,6 +485,10 @@ BrandRegistrationPage.prototype[util.inspect.custom] = function inspect(depth,
* @property {string} failureReason - A reason why brand registration has failed
* @property {string} url - The absolute URL of the Brand Registration
* @property {number} brandScore - Brand score
* @property {brand_registration.identity_status} identityStatus - Identity Status
* @property {boolean} russell3000 - Russell 3000
* @property {string} taxExemptStatus - Tax Exempt Status
* @property {boolean} skipAutomaticSecVet - Skip Automatic Secondary Vetting
* @property {boolean} mock -
* A boolean that specifies whether brand should be a mock or not. If true, brand will be registered as a mock brand. Defaults to false if no value is provided.
*
Expand All @@ -508,6 +514,10 @@ BrandRegistrationInstance = function BrandRegistrationInstance(version, payload,
this.failureReason = payload.failure_reason; // jshint ignore:line
this.url = payload.url; // jshint ignore:line
this.brandScore = deserialize.integer(payload.brand_score); // jshint ignore:line
this.identityStatus = payload.identity_status; // jshint ignore:line
this.russell3000 = payload.russell_3000; // jshint ignore:line
this.taxExemptStatus = payload.tax_exempt_status; // jshint ignore:line
this.skipAutomaticSecVet = payload.skip_automatic_sec_vet; // jshint ignore:line
this.mock = payload.mock; // jshint ignore:line

// Context
Expand Down
31 changes: 31 additions & 0 deletions spec/integration/rest/events/v1/sink.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,37 @@ describe('Sink', function() {
}).done();
}
);
it('should generate valid create_segment response',
function(done) {
var body = {
'status': 'initialized',
'sink_configuration': {
'write_key': 'MY_WRITEKEY'
},
'description': 'My segment Sink',
'sid': 'DGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
'date_created': '2015-07-30T20:00:00Z',
'sink_type': 'segment',
'date_updated': '2015-07-30T20:00:00Z',
'url': 'https://events.twilio.com/v1/Sinks/DGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
'links': {
'sink_test': 'https://events.twilio.com/v1/Sinks/DGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Test',
'sink_validate': 'https://events.twilio.com/v1/Sinks/DGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Validate'
}
};

holodeck.mock(new Response(201, body));

var opts = {description: 'description', sinkConfiguration: {}, sinkType: 'kinesis'};
var promise = client.events.v1.sinks.create(opts);
promise.then(function(response) {
expect(response).toBeDefined();
done();
}, function() {
throw new Error('failed');
}).done();
}
);
it('should generate valid remove request',
function(done) {
holodeck.mock(new Response(500, {}));
Expand Down
24 changes: 24 additions & 0 deletions spec/integration/rest/messaging/v1/brandRegistration.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ describe('BrandRegistration', function() {
'failure_reason': 'Registration error',
'url': 'https://messaging.twilio.com/v1/a2p/BrandRegistrations/BN0044409f7e067e279523808d267e2d85',
'brand_score': 42,
'identity_status': 'VERIFIED',
'russell_3000': true,
'tax_exempt_status': '501c3',
'skip_automatic_sec_vet': false,
'mock': false
};

Expand Down Expand Up @@ -105,6 +109,10 @@ describe('BrandRegistration', function() {
'failure_reason': 'Registration error',
'url': 'https://messaging.twilio.com/v1/a2p/BrandRegistrations/BN0044409f7e067e279523808d267e2d85',
'brand_score': 42,
'identity_status': 'VERIFIED',
'russell_3000': true,
'tax_exempt_status': '501c3',
'skip_automatic_sec_vet': false,
'mock': false
}
]
Expand Down Expand Up @@ -139,6 +147,10 @@ describe('BrandRegistration', function() {
'failure_reason': 'Registration error',
'url': 'https://messaging.twilio.com/v1/a2p/BrandRegistrations/BN0044409f7e067e279523808d267e2d85',
'brand_score': 42,
'identity_status': 'VERIFIED',
'russell_3000': true,
'tax_exempt_status': '501c3',
'skip_automatic_sec_vet': false,
'mock': false
}
]
Expand Down Expand Up @@ -178,6 +190,10 @@ describe('BrandRegistration', function() {
'failure_reason': 'Registration error',
'url': 'https://messaging.twilio.com/v1/a2p/BrandRegistrations/BN0044409f7e067e279523808d267e2d85',
'brand_score': 42,
'identity_status': 'VERIFIED',
'russell_3000': true,
'tax_exempt_status': '501c3',
'skip_automatic_sec_vet': false,
'mock': false
}
]
Expand Down Expand Up @@ -232,6 +248,10 @@ describe('BrandRegistration', function() {
'failure_reason': 'Registration error',
'url': 'https://messaging.twilio.com/v1/a2p/BrandRegistrations/BN0044409f7e067e279523808d267e2d85',
'brand_score': 42,
'identity_status': 'VERIFIED',
'russell_3000': true,
'tax_exempt_status': '501c3',
'skip_automatic_sec_vet': false,
'mock': false
}
]
Expand Down Expand Up @@ -292,6 +312,10 @@ describe('BrandRegistration', function() {
'failure_reason': 'Registration error',
'url': 'https://messaging.twilio.com/v1/a2p/BrandRegistrations/BN0044409f7e067e279523808d267e2d85',
'brand_score': 42,
'identity_status': 'VERIFIED',
'russell_3000': true,
'tax_exempt_status': '501c3',
'skip_automatic_sec_vet': false,
'mock': false
};

Expand Down
Loading

0 comments on commit 71c1d00

Please sign in to comment.