@emilgroup/partner-sdk 1.3.0 → 1.3.1-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/api/partner-relations-api.ts +8 -8
- package/api/partner-tags-api.ts +8 -8
- package/api/partner-types-api.ts +4 -4
- package/api/partner-version-api.ts +4 -4
- package/api/partners-api.ts +35 -35
- package/base.ts +15 -7
- package/dist/api/partner-relations-api.d.ts +8 -8
- package/dist/api/partner-relations-api.js +6 -6
- package/dist/api/partner-tags-api.d.ts +8 -8
- package/dist/api/partner-tags-api.js +7 -7
- package/dist/api/partner-types-api.d.ts +4 -4
- package/dist/api/partner-types-api.js +4 -4
- package/dist/api/partner-version-api.d.ts +4 -4
- package/dist/api/partner-version-api.js +3 -3
- package/dist/api/partners-api.d.ts +35 -35
- package/dist/api/partners-api.js +20 -20
- package/dist/base.d.ts +3 -1
- package/dist/base.js +27 -20
- package/dist/models/create-partner-type-response-class.d.ts +1 -1
- package/dist/models/get-partner-type-response-class.d.ts +1 -1
- package/dist/models/get-partner-version-response-class.d.ts +3 -3
- package/dist/models/list-partner-relation-class.d.ts +1 -1
- package/dist/models/list-partner-relation-types-class.d.ts +1 -1
- package/dist/models/list-partner-types-response-class.d.ts +1 -1
- package/dist/models/list-partner-versions-response-class.d.ts +7 -1
- package/dist/models/list-partners-response-class.d.ts +1 -1
- package/dist/models/partner-class.d.ts +12 -6
- package/dist/models/partner-relation-class.d.ts +12 -0
- package/dist/models/partner-relation-type-class.d.ts +12 -0
- package/dist/models/partner-type-class.d.ts +12 -0
- package/dist/models/tag-class.d.ts +12 -0
- package/dist/models/update-partner-type-response-class.d.ts +1 -1
- package/models/create-partner-type-response-class.ts +1 -1
- package/models/get-partner-type-response-class.ts +1 -1
- package/models/get-partner-version-response-class.ts +3 -3
- package/models/list-partner-relation-class.ts +1 -1
- package/models/list-partner-relation-types-class.ts +1 -1
- package/models/list-partner-types-response-class.ts +1 -1
- package/models/list-partner-versions-response-class.ts +7 -1
- package/models/list-partners-response-class.ts +1 -1
- package/models/partner-class.ts +12 -6
- package/models/partner-relation-class.ts +12 -0
- package/models/partner-relation-type-class.ts +12 -0
- package/models/partner-type-class.ts +12 -0
- package/models/tag-class.ts +12 -0
- package/models/update-partner-type-response-class.ts +1 -1
- package/package.json +1 -1
|
@@ -44,7 +44,7 @@ export declare const PartnersApiAxiosParamCreator: (configuration?: Configuratio
|
|
|
44
44
|
*/
|
|
45
45
|
deletePartner: (code: string, authorization?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
46
46
|
/**
|
|
47
|
-
* Retrieves the details of the partner that was previously created. Supply the unique partner code
|
|
47
|
+
* Retrieves the details of the partner that was previously created. Supply the unique partner code that was returned when you created it and Emil Api will return the corresponding partner information.
|
|
48
48
|
* @summary Retrieve the partner
|
|
49
49
|
* @param {string} code Unique identifier for the object.
|
|
50
50
|
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
@@ -54,20 +54,20 @@ export declare const PartnersApiAxiosParamCreator: (configuration?: Configuratio
|
|
|
54
54
|
*/
|
|
55
55
|
getPartner: (code: string, authorization?: string, expand?: any, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
56
56
|
/**
|
|
57
|
-
* Returns a list of partners you have previously created.
|
|
57
|
+
* Returns a list of partners you have previously created. The partners are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
|
|
58
58
|
* @summary List partners
|
|
59
59
|
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
60
60
|
* @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
|
|
61
61
|
* @param {any} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
|
|
62
|
-
* @param {
|
|
62
|
+
* @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: id, code, displayName, createdAt, updatedAt, tags, tagSlugs, partnerTypeId</i>
|
|
63
63
|
* @param {any} [search] To search the list by any field, pass search=xxx to fetch the result.
|
|
64
|
-
* @param {
|
|
65
|
-
* @param {
|
|
66
|
-
* @param {
|
|
64
|
+
* @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.<br/> <br/> <i>Allowed values: id, code, displayName, createdAt, updatedAt, version, tags, tagSlugs</i>
|
|
65
|
+
* @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.<br/> <br/> <i>Allowed values: partnerType, tags<i>
|
|
66
|
+
* @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: id, code, displayName, createdAt, updatedAt, tags, tagSlugs, partnerTypeId</i>
|
|
67
67
|
* @param {*} [options] Override http request option.
|
|
68
68
|
* @throws {RequiredError}
|
|
69
69
|
*/
|
|
70
|
-
listPartners: (authorization?: string, pageSize?: any, pageToken?: any, filter?:
|
|
70
|
+
listPartners: (authorization?: string, pageSize?: any, pageToken?: any, filter?: string, search?: any, order?: string, expand?: string, filters?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
71
71
|
/**
|
|
72
72
|
* Updates the specified partner by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
|
|
73
73
|
* @summary Update the partner
|
|
@@ -113,7 +113,7 @@ export declare const PartnersApiFp: (configuration?: Configuration) => {
|
|
|
113
113
|
*/
|
|
114
114
|
deletePartner(code: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DeleteResponseClass>>;
|
|
115
115
|
/**
|
|
116
|
-
* Retrieves the details of the partner that was previously created. Supply the unique partner code
|
|
116
|
+
* Retrieves the details of the partner that was previously created. Supply the unique partner code that was returned when you created it and Emil Api will return the corresponding partner information.
|
|
117
117
|
* @summary Retrieve the partner
|
|
118
118
|
* @param {string} code Unique identifier for the object.
|
|
119
119
|
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
@@ -123,20 +123,20 @@ export declare const PartnersApiFp: (configuration?: Configuration) => {
|
|
|
123
123
|
*/
|
|
124
124
|
getPartner(code: string, authorization?: string, expand?: any, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetPartnerResponseClass>>;
|
|
125
125
|
/**
|
|
126
|
-
* Returns a list of partners you have previously created.
|
|
126
|
+
* Returns a list of partners you have previously created. The partners are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
|
|
127
127
|
* @summary List partners
|
|
128
128
|
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
129
129
|
* @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
|
|
130
130
|
* @param {any} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
|
|
131
|
-
* @param {
|
|
131
|
+
* @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: id, code, displayName, createdAt, updatedAt, tags, tagSlugs, partnerTypeId</i>
|
|
132
132
|
* @param {any} [search] To search the list by any field, pass search=xxx to fetch the result.
|
|
133
|
-
* @param {
|
|
134
|
-
* @param {
|
|
135
|
-
* @param {
|
|
133
|
+
* @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.<br/> <br/> <i>Allowed values: id, code, displayName, createdAt, updatedAt, version, tags, tagSlugs</i>
|
|
134
|
+
* @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.<br/> <br/> <i>Allowed values: partnerType, tags<i>
|
|
135
|
+
* @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: id, code, displayName, createdAt, updatedAt, tags, tagSlugs, partnerTypeId</i>
|
|
136
136
|
* @param {*} [options] Override http request option.
|
|
137
137
|
* @throws {RequiredError}
|
|
138
138
|
*/
|
|
139
|
-
listPartners(authorization?: string, pageSize?: any, pageToken?: any, filter?:
|
|
139
|
+
listPartners(authorization?: string, pageSize?: any, pageToken?: any, filter?: string, search?: any, order?: string, expand?: string, filters?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListPartnersResponseClass>>;
|
|
140
140
|
/**
|
|
141
141
|
* Updates the specified partner by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
|
|
142
142
|
* @summary Update the partner
|
|
@@ -182,7 +182,7 @@ export declare const PartnersApiFactory: (configuration?: Configuration, basePat
|
|
|
182
182
|
*/
|
|
183
183
|
deletePartner(code: string, authorization?: string, options?: any): AxiosPromise<DeleteResponseClass>;
|
|
184
184
|
/**
|
|
185
|
-
* Retrieves the details of the partner that was previously created. Supply the unique partner code
|
|
185
|
+
* Retrieves the details of the partner that was previously created. Supply the unique partner code that was returned when you created it and Emil Api will return the corresponding partner information.
|
|
186
186
|
* @summary Retrieve the partner
|
|
187
187
|
* @param {string} code Unique identifier for the object.
|
|
188
188
|
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
@@ -192,20 +192,20 @@ export declare const PartnersApiFactory: (configuration?: Configuration, basePat
|
|
|
192
192
|
*/
|
|
193
193
|
getPartner(code: string, authorization?: string, expand?: any, options?: any): AxiosPromise<GetPartnerResponseClass>;
|
|
194
194
|
/**
|
|
195
|
-
* Returns a list of partners you have previously created.
|
|
195
|
+
* Returns a list of partners you have previously created. The partners are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
|
|
196
196
|
* @summary List partners
|
|
197
197
|
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
198
198
|
* @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
|
|
199
199
|
* @param {any} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
|
|
200
|
-
* @param {
|
|
200
|
+
* @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: id, code, displayName, createdAt, updatedAt, tags, tagSlugs, partnerTypeId</i>
|
|
201
201
|
* @param {any} [search] To search the list by any field, pass search=xxx to fetch the result.
|
|
202
|
-
* @param {
|
|
203
|
-
* @param {
|
|
204
|
-
* @param {
|
|
202
|
+
* @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.<br/> <br/> <i>Allowed values: id, code, displayName, createdAt, updatedAt, version, tags, tagSlugs</i>
|
|
203
|
+
* @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.<br/> <br/> <i>Allowed values: partnerType, tags<i>
|
|
204
|
+
* @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: id, code, displayName, createdAt, updatedAt, tags, tagSlugs, partnerTypeId</i>
|
|
205
205
|
* @param {*} [options] Override http request option.
|
|
206
206
|
* @throws {RequiredError}
|
|
207
207
|
*/
|
|
208
|
-
listPartners(authorization?: string, pageSize?: any, pageToken?: any, filter?:
|
|
208
|
+
listPartners(authorization?: string, pageSize?: any, pageToken?: any, filter?: string, search?: any, order?: string, expand?: string, filters?: string, options?: any): AxiosPromise<ListPartnersResponseClass>;
|
|
209
209
|
/**
|
|
210
210
|
* Updates the specified partner by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
|
|
211
211
|
* @summary Update the partner
|
|
@@ -315,11 +315,11 @@ export interface PartnersApiListPartnersRequest {
|
|
|
315
315
|
*/
|
|
316
316
|
readonly pageToken?: any;
|
|
317
317
|
/**
|
|
318
|
-
* Filter the response by one or multiple fields.
|
|
319
|
-
* @type {
|
|
318
|
+
* Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: id, code, displayName, createdAt, updatedAt, tags, tagSlugs, partnerTypeId</i>
|
|
319
|
+
* @type {string}
|
|
320
320
|
* @memberof PartnersApiListPartners
|
|
321
321
|
*/
|
|
322
|
-
readonly filter?:
|
|
322
|
+
readonly filter?: string;
|
|
323
323
|
/**
|
|
324
324
|
* To search the list by any field, pass search=xxx to fetch the result.
|
|
325
325
|
* @type {any}
|
|
@@ -327,23 +327,23 @@ export interface PartnersApiListPartnersRequest {
|
|
|
327
327
|
*/
|
|
328
328
|
readonly search?: any;
|
|
329
329
|
/**
|
|
330
|
-
*
|
|
331
|
-
* @type {
|
|
330
|
+
* Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.<br/> <br/> <i>Allowed values: id, code, displayName, createdAt, updatedAt, version, tags, tagSlugs</i>
|
|
331
|
+
* @type {string}
|
|
332
332
|
* @memberof PartnersApiListPartners
|
|
333
333
|
*/
|
|
334
|
-
readonly order?:
|
|
334
|
+
readonly order?: string;
|
|
335
335
|
/**
|
|
336
|
-
*
|
|
337
|
-
* @type {
|
|
336
|
+
* Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.<br/> <br/> <i>Allowed values: partnerType, tags<i>
|
|
337
|
+
* @type {string}
|
|
338
338
|
* @memberof PartnersApiListPartners
|
|
339
339
|
*/
|
|
340
|
-
readonly expand?:
|
|
340
|
+
readonly expand?: string;
|
|
341
341
|
/**
|
|
342
|
-
* Filters the response by one or multiple fields.
|
|
343
|
-
* @type {
|
|
342
|
+
* Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: id, code, displayName, createdAt, updatedAt, tags, tagSlugs, partnerTypeId</i>
|
|
343
|
+
* @type {string}
|
|
344
344
|
* @memberof PartnersApiListPartners
|
|
345
345
|
*/
|
|
346
|
-
readonly filters?:
|
|
346
|
+
readonly filters?: string;
|
|
347
347
|
}
|
|
348
348
|
/**
|
|
349
349
|
* Request parameters for tagPartner operation in PartnersApi.
|
|
@@ -421,7 +421,7 @@ export declare class PartnersApi extends BaseAPI {
|
|
|
421
421
|
*/
|
|
422
422
|
deletePartner(requestParameters: PartnersApiDeletePartnerRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<DeleteResponseClass, any>>;
|
|
423
423
|
/**
|
|
424
|
-
* Retrieves the details of the partner that was previously created. Supply the unique partner code
|
|
424
|
+
* Retrieves the details of the partner that was previously created. Supply the unique partner code that was returned when you created it and Emil Api will return the corresponding partner information.
|
|
425
425
|
* @summary Retrieve the partner
|
|
426
426
|
* @param {PartnersApiGetPartnerRequest} requestParameters Request parameters.
|
|
427
427
|
* @param {*} [options] Override http request option.
|
|
@@ -430,7 +430,7 @@ export declare class PartnersApi extends BaseAPI {
|
|
|
430
430
|
*/
|
|
431
431
|
getPartner(requestParameters: PartnersApiGetPartnerRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<GetPartnerResponseClass, any>>;
|
|
432
432
|
/**
|
|
433
|
-
* Returns a list of partners you have previously created.
|
|
433
|
+
* Returns a list of partners you have previously created. The partners are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
|
|
434
434
|
* @summary List partners
|
|
435
435
|
* @param {PartnersApiListPartnersRequest} requestParameters Request parameters.
|
|
436
436
|
* @param {*} [options] Override http request option.
|
package/dist/api/partners-api.js
CHANGED
|
@@ -190,7 +190,7 @@ var PartnersApiAxiosParamCreator = function (configuration) {
|
|
|
190
190
|
});
|
|
191
191
|
},
|
|
192
192
|
/**
|
|
193
|
-
* Retrieves the details of the partner that was previously created. Supply the unique partner code
|
|
193
|
+
* Retrieves the details of the partner that was previously created. Supply the unique partner code that was returned when you created it and Emil Api will return the corresponding partner information.
|
|
194
194
|
* @summary Retrieve the partner
|
|
195
195
|
* @param {string} code Unique identifier for the object.
|
|
196
196
|
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
@@ -242,16 +242,16 @@ var PartnersApiAxiosParamCreator = function (configuration) {
|
|
|
242
242
|
});
|
|
243
243
|
},
|
|
244
244
|
/**
|
|
245
|
-
* Returns a list of partners you have previously created.
|
|
245
|
+
* Returns a list of partners you have previously created. The partners are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
|
|
246
246
|
* @summary List partners
|
|
247
247
|
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
248
248
|
* @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
|
|
249
249
|
* @param {any} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
|
|
250
|
-
* @param {
|
|
250
|
+
* @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: id, code, displayName, createdAt, updatedAt, tags, tagSlugs, partnerTypeId</i>
|
|
251
251
|
* @param {any} [search] To search the list by any field, pass search=xxx to fetch the result.
|
|
252
|
-
* @param {
|
|
253
|
-
* @param {
|
|
254
|
-
* @param {
|
|
252
|
+
* @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.<br/> <br/> <i>Allowed values: id, code, displayName, createdAt, updatedAt, version, tags, tagSlugs</i>
|
|
253
|
+
* @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.<br/> <br/> <i>Allowed values: partnerType, tags<i>
|
|
254
|
+
* @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: id, code, displayName, createdAt, updatedAt, tags, tagSlugs, partnerTypeId</i>
|
|
255
255
|
* @param {*} [options] Override http request option.
|
|
256
256
|
* @throws {RequiredError}
|
|
257
257
|
*/
|
|
@@ -472,7 +472,7 @@ var PartnersApiFp = function (configuration) {
|
|
|
472
472
|
});
|
|
473
473
|
},
|
|
474
474
|
/**
|
|
475
|
-
* Retrieves the details of the partner that was previously created. Supply the unique partner code
|
|
475
|
+
* Retrieves the details of the partner that was previously created. Supply the unique partner code that was returned when you created it and Emil Api will return the corresponding partner information.
|
|
476
476
|
* @summary Retrieve the partner
|
|
477
477
|
* @param {string} code Unique identifier for the object.
|
|
478
478
|
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
@@ -494,16 +494,16 @@ var PartnersApiFp = function (configuration) {
|
|
|
494
494
|
});
|
|
495
495
|
},
|
|
496
496
|
/**
|
|
497
|
-
* Returns a list of partners you have previously created.
|
|
497
|
+
* Returns a list of partners you have previously created. The partners are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
|
|
498
498
|
* @summary List partners
|
|
499
499
|
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
500
500
|
* @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
|
|
501
501
|
* @param {any} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
|
|
502
|
-
* @param {
|
|
502
|
+
* @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: id, code, displayName, createdAt, updatedAt, tags, tagSlugs, partnerTypeId</i>
|
|
503
503
|
* @param {any} [search] To search the list by any field, pass search=xxx to fetch the result.
|
|
504
|
-
* @param {
|
|
505
|
-
* @param {
|
|
506
|
-
* @param {
|
|
504
|
+
* @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.<br/> <br/> <i>Allowed values: id, code, displayName, createdAt, updatedAt, version, tags, tagSlugs</i>
|
|
505
|
+
* @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.<br/> <br/> <i>Allowed values: partnerType, tags<i>
|
|
506
|
+
* @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: id, code, displayName, createdAt, updatedAt, tags, tagSlugs, partnerTypeId</i>
|
|
507
507
|
* @param {*} [options] Override http request option.
|
|
508
508
|
* @throws {RequiredError}
|
|
509
509
|
*/
|
|
@@ -597,7 +597,7 @@ var PartnersApiFactory = function (configuration, basePath, axios) {
|
|
|
597
597
|
return localVarFp.deletePartner(code, authorization, options).then(function (request) { return request(axios, basePath); });
|
|
598
598
|
},
|
|
599
599
|
/**
|
|
600
|
-
* Retrieves the details of the partner that was previously created. Supply the unique partner code
|
|
600
|
+
* Retrieves the details of the partner that was previously created. Supply the unique partner code that was returned when you created it and Emil Api will return the corresponding partner information.
|
|
601
601
|
* @summary Retrieve the partner
|
|
602
602
|
* @param {string} code Unique identifier for the object.
|
|
603
603
|
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
@@ -609,16 +609,16 @@ var PartnersApiFactory = function (configuration, basePath, axios) {
|
|
|
609
609
|
return localVarFp.getPartner(code, authorization, expand, options).then(function (request) { return request(axios, basePath); });
|
|
610
610
|
},
|
|
611
611
|
/**
|
|
612
|
-
* Returns a list of partners you have previously created.
|
|
612
|
+
* Returns a list of partners you have previously created. The partners are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
|
|
613
613
|
* @summary List partners
|
|
614
614
|
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
615
615
|
* @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
|
|
616
616
|
* @param {any} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
|
|
617
|
-
* @param {
|
|
617
|
+
* @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: id, code, displayName, createdAt, updatedAt, tags, tagSlugs, partnerTypeId</i>
|
|
618
618
|
* @param {any} [search] To search the list by any field, pass search=xxx to fetch the result.
|
|
619
|
-
* @param {
|
|
620
|
-
* @param {
|
|
621
|
-
* @param {
|
|
619
|
+
* @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.<br/> <br/> <i>Allowed values: id, code, displayName, createdAt, updatedAt, version, tags, tagSlugs</i>
|
|
620
|
+
* @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.<br/> <br/> <i>Allowed values: partnerType, tags<i>
|
|
621
|
+
* @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: id, code, displayName, createdAt, updatedAt, tags, tagSlugs, partnerTypeId</i>
|
|
622
622
|
* @param {*} [options] Override http request option.
|
|
623
623
|
* @throws {RequiredError}
|
|
624
624
|
*/
|
|
@@ -688,7 +688,7 @@ var PartnersApi = /** @class */ (function (_super) {
|
|
|
688
688
|
return (0, exports.PartnersApiFp)(this.configuration).deletePartner(requestParameters.code, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
689
689
|
};
|
|
690
690
|
/**
|
|
691
|
-
* Retrieves the details of the partner that was previously created. Supply the unique partner code
|
|
691
|
+
* Retrieves the details of the partner that was previously created. Supply the unique partner code that was returned when you created it and Emil Api will return the corresponding partner information.
|
|
692
692
|
* @summary Retrieve the partner
|
|
693
693
|
* @param {PartnersApiGetPartnerRequest} requestParameters Request parameters.
|
|
694
694
|
* @param {*} [options] Override http request option.
|
|
@@ -700,7 +700,7 @@ var PartnersApi = /** @class */ (function (_super) {
|
|
|
700
700
|
return (0, exports.PartnersApiFp)(this.configuration).getPartner(requestParameters.code, requestParameters.authorization, requestParameters.expand, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
701
701
|
};
|
|
702
702
|
/**
|
|
703
|
-
* Returns a list of partners you have previously created.
|
|
703
|
+
* Returns a list of partners you have previously created. The partners are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
|
|
704
704
|
* @summary List partners
|
|
705
705
|
* @param {PartnersApiListPartnersRequest} requestParameters Request parameters.
|
|
706
706
|
* @param {*} [options] Override http request option.
|
package/dist/base.d.ts
CHANGED
|
@@ -52,11 +52,13 @@ export declare class BaseAPI {
|
|
|
52
52
|
protected axios: AxiosInstance;
|
|
53
53
|
protected configuration: Configuration | undefined;
|
|
54
54
|
private tokenData?;
|
|
55
|
+
private permissions;
|
|
55
56
|
constructor(configuration?: Configuration, basePath?: string, axios?: AxiosInstance);
|
|
56
57
|
selectEnvironment(env: Environment): void;
|
|
57
58
|
selectBasePath(path: string): void;
|
|
59
|
+
getPermissions(): Array<string>;
|
|
58
60
|
authorize(username: string, password: string): Promise<void>;
|
|
59
|
-
refreshTokenInternal(): Promise<
|
|
61
|
+
refreshTokenInternal(): Promise<LoginClass>;
|
|
60
62
|
private storeTokenData;
|
|
61
63
|
loadTokenData(): void;
|
|
62
64
|
cleanTokenData(): void;
|
package/dist/base.js
CHANGED
|
@@ -121,6 +121,7 @@ var BaseAPI = /** @class */ (function () {
|
|
|
121
121
|
if (axios === void 0) { axios = axios_1.default; }
|
|
122
122
|
this.basePath = basePath;
|
|
123
123
|
this.axios = axios;
|
|
124
|
+
this.permissions = [];
|
|
124
125
|
this.loadTokenData();
|
|
125
126
|
if (configuration) {
|
|
126
127
|
this.configuration = configuration;
|
|
@@ -143,11 +144,14 @@ var BaseAPI = /** @class */ (function () {
|
|
|
143
144
|
BaseAPI.prototype.selectBasePath = function (path) {
|
|
144
145
|
this.configuration.basePath = path;
|
|
145
146
|
};
|
|
147
|
+
BaseAPI.prototype.getPermissions = function () {
|
|
148
|
+
return this.permissions;
|
|
149
|
+
};
|
|
146
150
|
BaseAPI.prototype.authorize = function (username, password) {
|
|
147
151
|
return __awaiter(this, void 0, void 0, function () {
|
|
148
|
-
var options, response, accessToken;
|
|
149
|
-
return __generator(this, function (
|
|
150
|
-
switch (
|
|
152
|
+
var options, response, _a, accessToken, permissions;
|
|
153
|
+
return __generator(this, function (_b) {
|
|
154
|
+
switch (_b.label) {
|
|
151
155
|
case 0:
|
|
152
156
|
options = {
|
|
153
157
|
method: 'POST',
|
|
@@ -161,12 +165,13 @@ var BaseAPI = /** @class */ (function () {
|
|
|
161
165
|
};
|
|
162
166
|
return [4 /*yield*/, axios_1.default.request(options)];
|
|
163
167
|
case 1:
|
|
164
|
-
response =
|
|
165
|
-
|
|
168
|
+
response = _b.sent();
|
|
169
|
+
_a = response.data, accessToken = _a.accessToken, permissions = _a.permissions;
|
|
166
170
|
this.configuration.username = username;
|
|
167
171
|
this.configuration.accessToken = "Bearer ".concat(accessToken);
|
|
168
172
|
this.tokenData.username = username;
|
|
169
173
|
this.tokenData.accessToken = accessToken;
|
|
174
|
+
this.permissions = permissions;
|
|
170
175
|
this.storeTokenData(__assign({}, this.tokenData));
|
|
171
176
|
return [2 /*return*/];
|
|
172
177
|
}
|
|
@@ -175,13 +180,13 @@ var BaseAPI = /** @class */ (function () {
|
|
|
175
180
|
};
|
|
176
181
|
BaseAPI.prototype.refreshTokenInternal = function () {
|
|
177
182
|
return __awaiter(this, void 0, void 0, function () {
|
|
178
|
-
var username, options,
|
|
183
|
+
var username, options, response;
|
|
179
184
|
return __generator(this, function (_a) {
|
|
180
185
|
switch (_a.label) {
|
|
181
186
|
case 0:
|
|
182
187
|
username = this.configuration.username;
|
|
183
188
|
if (!username) {
|
|
184
|
-
|
|
189
|
+
throw new Error('Failed to refresh token.');
|
|
185
190
|
}
|
|
186
191
|
options = {
|
|
187
192
|
method: 'POST',
|
|
@@ -194,8 +199,8 @@ var BaseAPI = /** @class */ (function () {
|
|
|
194
199
|
};
|
|
195
200
|
return [4 /*yield*/, axios_1.default.request(options)];
|
|
196
201
|
case 1:
|
|
197
|
-
|
|
198
|
-
return [2 /*return*/,
|
|
202
|
+
response = _a.sent();
|
|
203
|
+
return [2 /*return*/, response.data];
|
|
199
204
|
}
|
|
200
205
|
});
|
|
201
206
|
});
|
|
@@ -221,22 +226,23 @@ var BaseAPI = /** @class */ (function () {
|
|
|
221
226
|
axios.interceptors.response.use(function (res) {
|
|
222
227
|
return res;
|
|
223
228
|
}, function (err) { return __awaiter(_this, void 0, void 0, function () {
|
|
224
|
-
var originalConfig, tokenString, accessToken, _error_1, tokenString, accessToken, _error_2;
|
|
225
|
-
return __generator(this, function (
|
|
226
|
-
switch (
|
|
229
|
+
var originalConfig, _a, tokenString, permissions, accessToken, _error_1, _b, tokenString, permissions, accessToken, _error_2;
|
|
230
|
+
return __generator(this, function (_c) {
|
|
231
|
+
switch (_c.label) {
|
|
227
232
|
case 0:
|
|
228
233
|
originalConfig = err.config;
|
|
229
234
|
if (!(err.response && !(err.response instanceof XMLHttpRequest))) return [3 /*break*/, 5];
|
|
230
235
|
if (!((err.response.status === 401 || err.response.status === 403)
|
|
231
236
|
&& !originalConfig._retry)) return [3 /*break*/, 4];
|
|
232
237
|
originalConfig._retry = true;
|
|
233
|
-
|
|
238
|
+
_c.label = 1;
|
|
234
239
|
case 1:
|
|
235
|
-
|
|
240
|
+
_c.trys.push([1, 3, , 4]);
|
|
236
241
|
return [4 /*yield*/, this.refreshTokenInternal()];
|
|
237
242
|
case 2:
|
|
238
|
-
|
|
243
|
+
_a = _c.sent(), tokenString = _a.accessToken, permissions = _a.permissions;
|
|
239
244
|
accessToken = "Bearer ".concat(tokenString);
|
|
245
|
+
this.permissions = permissions;
|
|
240
246
|
delete originalConfig.headers['Authorization'];
|
|
241
247
|
originalConfig.headers['Authorization'] = accessToken;
|
|
242
248
|
this.configuration.accessToken = accessToken;
|
|
@@ -244,7 +250,7 @@ var BaseAPI = /** @class */ (function () {
|
|
|
244
250
|
this.storeTokenData(this.tokenData);
|
|
245
251
|
return [2 /*return*/, axios(originalConfig)];
|
|
246
252
|
case 3:
|
|
247
|
-
_error_1 =
|
|
253
|
+
_error_1 = _c.sent();
|
|
248
254
|
if (_error_1.response && _error_1.response.data) {
|
|
249
255
|
return [2 /*return*/, Promise.reject(_error_1.response.data)];
|
|
250
256
|
}
|
|
@@ -255,13 +261,14 @@ var BaseAPI = /** @class */ (function () {
|
|
|
255
261
|
&& originalConfig.headers.hasOwnProperty('Authorization')
|
|
256
262
|
&& _retry_count < 4)) return [3 /*break*/, 9];
|
|
257
263
|
_retry_count++;
|
|
258
|
-
|
|
264
|
+
_c.label = 6;
|
|
259
265
|
case 6:
|
|
260
|
-
|
|
266
|
+
_c.trys.push([6, 8, , 9]);
|
|
261
267
|
return [4 /*yield*/, this.refreshTokenInternal()];
|
|
262
268
|
case 7:
|
|
263
|
-
|
|
269
|
+
_b = _c.sent(), tokenString = _b.accessToken, permissions = _b.permissions;
|
|
264
270
|
accessToken = "Bearer ".concat(tokenString);
|
|
271
|
+
this.permissions = permissions;
|
|
265
272
|
_retry = true;
|
|
266
273
|
originalConfig.headers['Authorization'] = accessToken;
|
|
267
274
|
this.configuration.accessToken = accessToken;
|
|
@@ -269,7 +276,7 @@ var BaseAPI = /** @class */ (function () {
|
|
|
269
276
|
this.storeTokenData(this.tokenData);
|
|
270
277
|
return [2 /*return*/, axios.request(__assign({}, originalConfig))];
|
|
271
278
|
case 8:
|
|
272
|
-
_error_2 =
|
|
279
|
+
_error_2 = _c.sent();
|
|
273
280
|
if (_error_2.response && _error_2.response.data) {
|
|
274
281
|
return [2 /*return*/, Promise.reject(_error_2.response.data)];
|
|
275
282
|
}
|
|
@@ -17,7 +17,7 @@ import { PartnerTypeClass } from './partner-type-class';
|
|
|
17
17
|
*/
|
|
18
18
|
export interface CreatePartnerTypeResponseClass {
|
|
19
19
|
/**
|
|
20
|
-
* The
|
|
20
|
+
* The partner type response.
|
|
21
21
|
* @type {PartnerTypeClass}
|
|
22
22
|
* @memberof CreatePartnerTypeResponseClass
|
|
23
23
|
*/
|
|
@@ -17,7 +17,7 @@ import { PartnerTypeClass } from './partner-type-class';
|
|
|
17
17
|
*/
|
|
18
18
|
export interface GetPartnerTypeResponseClass {
|
|
19
19
|
/**
|
|
20
|
-
* The
|
|
20
|
+
* The partner type response.
|
|
21
21
|
* @type {PartnerTypeClass}
|
|
22
22
|
* @memberof GetPartnerTypeResponseClass
|
|
23
23
|
*/
|
|
@@ -17,9 +17,9 @@ import { PartnerClass } from './partner-class';
|
|
|
17
17
|
*/
|
|
18
18
|
export interface GetPartnerVersionResponseClass {
|
|
19
19
|
/**
|
|
20
|
-
* The
|
|
21
|
-
* @type {
|
|
20
|
+
* The partner response.
|
|
21
|
+
* @type {PartnerClass}
|
|
22
22
|
* @memberof GetPartnerVersionResponseClass
|
|
23
23
|
*/
|
|
24
|
-
'partnerVersion':
|
|
24
|
+
'partnerVersion': PartnerClass;
|
|
25
25
|
}
|
|
@@ -17,7 +17,7 @@ import { PartnerTypeClass } from './partner-type-class';
|
|
|
17
17
|
*/
|
|
18
18
|
export interface ListPartnerTypesResponseClass {
|
|
19
19
|
/**
|
|
20
|
-
* The list of
|
|
20
|
+
* The list of partner typess.
|
|
21
21
|
* @type {Array<PartnerTypeClass>}
|
|
22
22
|
* @memberof ListPartnerTypesResponseClass
|
|
23
23
|
*/
|
|
@@ -17,9 +17,15 @@ import { PartnerClass } from './partner-class';
|
|
|
17
17
|
*/
|
|
18
18
|
export interface ListPartnerVersionsResponseClass {
|
|
19
19
|
/**
|
|
20
|
-
* The list of
|
|
20
|
+
* The list of partnerss.
|
|
21
21
|
* @type {Array<PartnerClass>}
|
|
22
22
|
* @memberof ListPartnerVersionsResponseClass
|
|
23
23
|
*/
|
|
24
24
|
'items': Array<PartnerClass>;
|
|
25
|
+
/**
|
|
26
|
+
* Next page token.
|
|
27
|
+
* @type {string}
|
|
28
|
+
* @memberof ListPartnerVersionsResponseClass
|
|
29
|
+
*/
|
|
30
|
+
'nextPageToken': string;
|
|
25
31
|
}
|
|
@@ -64,12 +64,6 @@ export interface PartnerClass {
|
|
|
64
64
|
* @memberof PartnerClass
|
|
65
65
|
*/
|
|
66
66
|
'updatedAt': string;
|
|
67
|
-
/**
|
|
68
|
-
* Last user who updated the entity
|
|
69
|
-
* @type {string}
|
|
70
|
-
* @memberof PartnerClass
|
|
71
|
-
*/
|
|
72
|
-
'updatedBy': string;
|
|
73
67
|
/**
|
|
74
68
|
* The version number of the partner
|
|
75
69
|
* @type {number}
|
|
@@ -82,4 +76,16 @@ export interface PartnerClass {
|
|
|
82
76
|
* @memberof PartnerClass
|
|
83
77
|
*/
|
|
84
78
|
'tags': Array<string>;
|
|
79
|
+
/**
|
|
80
|
+
* Identifier of the user who created the record.
|
|
81
|
+
* @type {string}
|
|
82
|
+
* @memberof PartnerClass
|
|
83
|
+
*/
|
|
84
|
+
'createdBy': string;
|
|
85
|
+
/**
|
|
86
|
+
* Identifier of the user who last updated the record.
|
|
87
|
+
* @type {string}
|
|
88
|
+
* @memberof PartnerClass
|
|
89
|
+
*/
|
|
90
|
+
'updatedBy': string;
|
|
85
91
|
}
|
|
@@ -69,4 +69,16 @@ export interface PartnerRelationClass {
|
|
|
69
69
|
* @memberof PartnerRelationClass
|
|
70
70
|
*/
|
|
71
71
|
'updatedAt': string;
|
|
72
|
+
/**
|
|
73
|
+
* Identifier of the user who created the record.
|
|
74
|
+
* @type {string}
|
|
75
|
+
* @memberof PartnerRelationClass
|
|
76
|
+
*/
|
|
77
|
+
'createdBy': string;
|
|
78
|
+
/**
|
|
79
|
+
* Identifier of the user who last updated the record.
|
|
80
|
+
* @type {string}
|
|
81
|
+
* @memberof PartnerRelationClass
|
|
82
|
+
*/
|
|
83
|
+
'updatedBy': string;
|
|
72
84
|
}
|