Skip to content

Commit

Permalink
Merge pull request #30 from getbrevo/feature_update-ts-sdk_COAPI-882
Browse files Browse the repository at this point in the history
COAPI-882 route update with new APIs and few fixes
  • Loading branch information
shubhamUpadhyayInBlue authored Jun 18, 2024
2 parents 6d8cfa4 + 10d0bcf commit 1f8d627
Show file tree
Hide file tree
Showing 407 changed files with 1,635 additions and 466 deletions.
12 changes: 12 additions & 0 deletions .openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ model/corporateGroupDetailsResponseUsersInner.ts
model/corporateGroupPost201Response.ts
model/corporateGroupPostRequest.ts
model/corporateGroupUnlinkGroupIdSubAccountsPutRequest.ts
model/corporateSubAccountIpAssociatePostRequest.ts
model/corporateSubAccountIpDissociatePutRequest.ts
model/corporateUserInvitationActionEmailPut200Response.ts
model/createApiKeyRequest.ts
model/createApiKeyResponse.ts
Expand All @@ -90,6 +92,7 @@ model/createExternalFeed201Response.ts
model/createList.ts
model/createModel.ts
model/createPaymentRequest.ts
model/createPaymentResponse.ts
model/createProductModel.ts
model/createReseller.ts
model/createSender.ts
Expand Down Expand Up @@ -129,6 +132,11 @@ model/deal.ts
model/dealAttributesInner.ts
model/dealsList.ts
model/deleteHardbounces.ts
model/ecommerceAttributionMetricsConversionSourceConversionSourceIdGet200Response.ts
model/ecommerceAttributionMetricsGet200Response.ts
model/ecommerceAttributionMetricsGet200ResponseTotals.ts
model/ecommerceAttributionProductsConversionSourceConversionSourceIdGet200Response.ts
model/ecommerceConfigDisplayCurrencyGet200Response.ts
model/emailExportRecipients.ts
model/errorModel.ts
model/event.ts
Expand Down Expand Up @@ -348,9 +356,12 @@ model/ssoTokenRequest.ts
model/ssoTokenRequestCorporate.ts
model/subAccountAppsToggleRequest.ts
model/subAccountDetailsResponse.ts
model/subAccountDetailsResponseGroupsInner.ts
model/subAccountDetailsResponsePlanInfo.ts
model/subAccountDetailsResponsePlanInfoCredits.ts
model/subAccountDetailsResponsePlanInfoCreditsEmails.ts
model/subAccountDetailsResponsePlanInfoCreditsSms.ts
model/subAccountDetailsResponsePlanInfoCreditsWpSubscribers.ts
model/subAccountDetailsResponsePlanInfoFeatures.ts
model/subAccountDetailsResponsePlanInfoFeaturesInbox.ts
model/subAccountDetailsResponsePlanInfoFeaturesLandingPage.ts
Expand All @@ -360,6 +371,7 @@ model/subAccountUpdatePlanRequestCredits.ts
model/subAccountUpdatePlanRequestFeatures.ts
model/subAccountsResponse.ts
model/subAccountsResponseSubAccountsInner.ts
model/subAccountsResponseSubAccountsInnerGroupsInner.ts
model/task.ts
model/taskList.ts
model/taskReminder.ts
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Brevo's API exposes the entire Brevo features via a standardized programmatic in

This is the wrapper for the API. It implements all the features of the API v3. It supports promises.

Brevo's API matches the [OpenAPI v2 definition](https://www.openapis.org/). The specification can be downloaded [here](https://api.brevo.com/v3/swagger_definition.yml).
Brevo's API matches the [OpenAPI v2 definition](https://www.openapis.org/). The specification can be downloaded [here](https://api.brevo.com/v3/swagger_definition_v3.yml).

## Installation

Expand Down Expand Up @@ -40,7 +40,7 @@ yarn add @getbrevo/brevo
const brevo = require('@getbrevo/brevo');
let defaultClient = brevo.ApiClient.instance;

let apiKey = defaultClient.authentications['api-key'];
let apiKey = defaultClient.authentications['apiKey'];
apiKey.apiKey = 'YOUR API KEY';

let apiInstance = new brevo.TransactionalEmailsApi();
Expand Down
2 changes: 1 addition & 1 deletion api/accountApi.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* Brevo API
* Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable |
* Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity |
*
* The version of the OpenAPI document: 3.0.0
* Contact: contact@brevo.com
Expand Down
2 changes: 1 addition & 1 deletion api/companiesApi.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* Brevo API
* Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable |
* Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity |
*
* The version of the OpenAPI document: 3.0.0
* Contact: contact@brevo.com
Expand Down
9 changes: 7 additions & 2 deletions api/contactsApi.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* Brevo API
* Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable |
* Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity |
*
* The version of the OpenAPI document: 3.0.0
* Contact: contact@brevo.com
Expand Down Expand Up @@ -1138,8 +1138,9 @@ export class ContactsApi {
* @param sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed
* @param segmentId Id of the segment. **Either listIds or segmentId can be passed.**
* @param listIds Ids of the list. **Either listIds or segmentId can be passed.**
* @param filter Filter the contacts on the basis of attributes. **Allowed operator: equals. (e.g. filter=equals(FIRSTNAME,\"Antoine\"), filter=equals(B1, true), filter=equals(DOB, \"1989-11-23\"))**
*/
public async getContacts (limit?: number, offset?: number, modifiedSince?: string, createdSince?: string, sort?: 'asc' | 'desc', segmentId?: number, listIds?: Array<number>, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: GetContacts; }> {
public async getContacts (limit?: number, offset?: number, modifiedSince?: string, createdSince?: string, sort?: 'asc' | 'desc', segmentId?: number, listIds?: Array<number>, filter?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: GetContacts; }> {
const localVarPath = this.basePath + '/contacts';
let localVarQueryParameters: any = {};
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
Expand Down Expand Up @@ -1180,6 +1181,10 @@ export class ContactsApi {
localVarQueryParameters['listIds'] = ObjectSerializer.serialize(listIds, "Array<number>");
}

if (filter !== undefined) {
localVarQueryParameters['filter'] = ObjectSerializer.serialize(filter, "string");
}

(<any>Object).assign(localVarHeaderParams, options.headers);

let localVarUseFormData = false;
Expand Down
2 changes: 1 addition & 1 deletion api/conversationsApi.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* Brevo API
* Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable |
* Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity |
*
* The version of the OpenAPI document: 3.0.0
* Contact: contact@brevo.com
Expand Down
6 changes: 3 additions & 3 deletions api/couponsApi.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* Brevo API
* Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable |
* Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity |
*
* The version of the OpenAPI document: 3.0.0
* Contact: contact@brevo.com
Expand Down Expand Up @@ -329,7 +329,7 @@ export class CouponsApi {
* @param sort Sort the results by creation time in ascending/descending order
* @param sortBy The field used to sort coupon collections
*/
public async getCouponCollections (limit?: number, offset?: number, sort?: 'asc' | 'desc', sortBy?: any, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: GetCouponCollection; }> {
public async getCouponCollections (limit?: number, offset?: number, sort?: 'asc' | 'desc', sortBy?: 'createdAt' | 'remainingCoupons' | 'expirationDate', options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: GetCouponCollection; }> {
const localVarPath = this.basePath + '/couponCollections';
let localVarQueryParameters: any = {};
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
Expand All @@ -355,7 +355,7 @@ export class CouponsApi {
}

if (sortBy !== undefined) {
localVarQueryParameters['sortBy'] = ObjectSerializer.serialize(sortBy, "any");
localVarQueryParameters['sortBy'] = ObjectSerializer.serialize(sortBy, "'createdAt' | 'remainingCoupons' | 'expirationDate'");
}

(<any>Object).assign(localVarHeaderParams, options.headers);
Expand Down
2 changes: 1 addition & 1 deletion api/dealsApi.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* Brevo API
* Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable |
* Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity |
*
* The version of the OpenAPI document: 3.0.0
* Contact: contact@brevo.com
Expand Down
2 changes: 1 addition & 1 deletion api/domainsApi.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* Brevo API
* Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable |
* Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity |
*
* The version of the OpenAPI document: 3.0.0
* Contact: contact@brevo.com
Expand Down
Loading

0 comments on commit 1f8d627

Please sign in to comment.