@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.
Files changed (48) hide show
  1. package/README.md +2 -2
  2. package/api/partner-relations-api.ts +8 -8
  3. package/api/partner-tags-api.ts +8 -8
  4. package/api/partner-types-api.ts +4 -4
  5. package/api/partner-version-api.ts +4 -4
  6. package/api/partners-api.ts +35 -35
  7. package/base.ts +15 -7
  8. package/dist/api/partner-relations-api.d.ts +8 -8
  9. package/dist/api/partner-relations-api.js +6 -6
  10. package/dist/api/partner-tags-api.d.ts +8 -8
  11. package/dist/api/partner-tags-api.js +7 -7
  12. package/dist/api/partner-types-api.d.ts +4 -4
  13. package/dist/api/partner-types-api.js +4 -4
  14. package/dist/api/partner-version-api.d.ts +4 -4
  15. package/dist/api/partner-version-api.js +3 -3
  16. package/dist/api/partners-api.d.ts +35 -35
  17. package/dist/api/partners-api.js +20 -20
  18. package/dist/base.d.ts +3 -1
  19. package/dist/base.js +27 -20
  20. package/dist/models/create-partner-type-response-class.d.ts +1 -1
  21. package/dist/models/get-partner-type-response-class.d.ts +1 -1
  22. package/dist/models/get-partner-version-response-class.d.ts +3 -3
  23. package/dist/models/list-partner-relation-class.d.ts +1 -1
  24. package/dist/models/list-partner-relation-types-class.d.ts +1 -1
  25. package/dist/models/list-partner-types-response-class.d.ts +1 -1
  26. package/dist/models/list-partner-versions-response-class.d.ts +7 -1
  27. package/dist/models/list-partners-response-class.d.ts +1 -1
  28. package/dist/models/partner-class.d.ts +12 -6
  29. package/dist/models/partner-relation-class.d.ts +12 -0
  30. package/dist/models/partner-relation-type-class.d.ts +12 -0
  31. package/dist/models/partner-type-class.d.ts +12 -0
  32. package/dist/models/tag-class.d.ts +12 -0
  33. package/dist/models/update-partner-type-response-class.d.ts +1 -1
  34. package/models/create-partner-type-response-class.ts +1 -1
  35. package/models/get-partner-type-response-class.ts +1 -1
  36. package/models/get-partner-version-response-class.ts +3 -3
  37. package/models/list-partner-relation-class.ts +1 -1
  38. package/models/list-partner-relation-types-class.ts +1 -1
  39. package/models/list-partner-types-response-class.ts +1 -1
  40. package/models/list-partner-versions-response-class.ts +7 -1
  41. package/models/list-partners-response-class.ts +1 -1
  42. package/models/partner-class.ts +12 -6
  43. package/models/partner-relation-class.ts +12 -0
  44. package/models/partner-relation-type-class.ts +12 -0
  45. package/models/partner-type-class.ts +12 -0
  46. package/models/tag-class.ts +12 -0
  47. package/models/update-partner-type-response-class.ts +1 -1
  48. 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 that was returned when you created it and Emil Api will return the corresponding partner information.
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. The partners are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
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&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
62
- * @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
62
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, displayName, createdAt, updatedAt, tags, tagSlugs, partnerTypeId&lt;/i&gt;
63
63
  * @param {any} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
64
- * @param {any} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
65
- * @param {any} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
66
- * @param {any} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations. In general, fetching filtered responses conserves bandwidth and reduces response time.
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.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, displayName, createdAt, updatedAt, version, tags, tagSlugs&lt;/i&gt;
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.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: partnerType, tags&lt;i&gt;
66
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, displayName, createdAt, updatedAt, tags, tagSlugs, partnerTypeId&lt;/i&gt;
67
67
  * @param {*} [options] Override http request option.
68
68
  * @throws {RequiredError}
69
69
  */
70
- listPartners: (authorization?: string, pageSize?: any, pageToken?: any, filter?: any, search?: any, order?: any, expand?: any, filters?: any, options?: AxiosRequestConfig) => Promise<RequestArgs>;
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 that was returned when you created it and Emil Api will return the corresponding partner information.
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. The partners are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
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&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
131
- * @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
131
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, displayName, createdAt, updatedAt, tags, tagSlugs, partnerTypeId&lt;/i&gt;
132
132
  * @param {any} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
133
- * @param {any} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
134
- * @param {any} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
135
- * @param {any} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations. In general, fetching filtered responses conserves bandwidth and reduces response time.
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.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, displayName, createdAt, updatedAt, version, tags, tagSlugs&lt;/i&gt;
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.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: partnerType, tags&lt;i&gt;
135
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, displayName, createdAt, updatedAt, tags, tagSlugs, partnerTypeId&lt;/i&gt;
136
136
  * @param {*} [options] Override http request option.
137
137
  * @throws {RequiredError}
138
138
  */
139
- listPartners(authorization?: string, pageSize?: any, pageToken?: any, filter?: any, search?: any, order?: any, expand?: any, filters?: any, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListPartnersResponseClass>>;
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 that was returned when you created it and Emil Api will return the corresponding partner information.
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. The partners are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
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&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
200
- * @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
200
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, displayName, createdAt, updatedAt, tags, tagSlugs, partnerTypeId&lt;/i&gt;
201
201
  * @param {any} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
202
- * @param {any} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
203
- * @param {any} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
204
- * @param {any} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations. In general, fetching filtered responses conserves bandwidth and reduces response time.
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.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, displayName, createdAt, updatedAt, version, tags, tagSlugs&lt;/i&gt;
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.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: partnerType, tags&lt;i&gt;
204
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, displayName, createdAt, updatedAt, tags, tagSlugs, partnerTypeId&lt;/i&gt;
205
205
  * @param {*} [options] Override http request option.
206
206
  * @throws {RequiredError}
207
207
  */
208
- listPartners(authorization?: string, pageSize?: any, pageToken?: any, filter?: any, search?: any, order?: any, expand?: any, filters?: any, options?: any): AxiosPromise<ListPartnersResponseClass>;
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. In general, fetching filtered responses will conserve bandwidth and reduce response time.
319
- * @type {any}
318
+ * Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, displayName, createdAt, updatedAt, tags, tagSlugs, partnerTypeId&lt;/i&gt;
319
+ * @type {string}
320
320
  * @memberof PartnersApiListPartners
321
321
  */
322
- readonly filter?: any;
322
+ readonly filter?: string;
323
323
  /**
324
324
  * To search the list by any field, pass search&#x3D;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
- * The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
331
- * @type {any}
330
+ * Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, displayName, createdAt, updatedAt, version, tags, tagSlugs&lt;/i&gt;
331
+ * @type {string}
332
332
  * @memberof PartnersApiListPartners
333
333
  */
334
- readonly order?: any;
334
+ readonly order?: string;
335
335
  /**
336
- * Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
337
- * @type {any}
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.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: partnerType, tags&lt;i&gt;
337
+ * @type {string}
338
338
  * @memberof PartnersApiListPartners
339
339
  */
340
- readonly expand?: any;
340
+ readonly expand?: string;
341
341
  /**
342
- * Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations. In general, fetching filtered responses conserves bandwidth and reduces response time.
343
- * @type {any}
342
+ * Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, displayName, createdAt, updatedAt, tags, tagSlugs, partnerTypeId&lt;/i&gt;
343
+ * @type {string}
344
344
  * @memberof PartnersApiListPartners
345
345
  */
346
- readonly filters?: any;
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 that was returned when you created it and Emil Api will return the corresponding partner information.
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. The partners are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
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.
@@ -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 that was returned when you created it and Emil Api will return the corresponding partner information.
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. The partners are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
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&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
250
- * @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
250
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, displayName, createdAt, updatedAt, tags, tagSlugs, partnerTypeId&lt;/i&gt;
251
251
  * @param {any} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
252
- * @param {any} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
253
- * @param {any} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
254
- * @param {any} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations. In general, fetching filtered responses conserves bandwidth and reduces response time.
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.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, displayName, createdAt, updatedAt, version, tags, tagSlugs&lt;/i&gt;
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.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: partnerType, tags&lt;i&gt;
254
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, displayName, createdAt, updatedAt, tags, tagSlugs, partnerTypeId&lt;/i&gt;
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 that was returned when you created it and Emil Api will return the corresponding partner information.
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. The partners are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
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&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
502
- * @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
502
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, displayName, createdAt, updatedAt, tags, tagSlugs, partnerTypeId&lt;/i&gt;
503
503
  * @param {any} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
504
- * @param {any} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
505
- * @param {any} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
506
- * @param {any} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations. In general, fetching filtered responses conserves bandwidth and reduces response time.
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.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, displayName, createdAt, updatedAt, version, tags, tagSlugs&lt;/i&gt;
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.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: partnerType, tags&lt;i&gt;
506
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, displayName, createdAt, updatedAt, tags, tagSlugs, partnerTypeId&lt;/i&gt;
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 that was returned when you created it and Emil Api will return the corresponding partner information.
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. The partners are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
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&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
617
- * @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
617
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, displayName, createdAt, updatedAt, tags, tagSlugs, partnerTypeId&lt;/i&gt;
618
618
  * @param {any} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
619
- * @param {any} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
620
- * @param {any} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
621
- * @param {any} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations. In general, fetching filtered responses conserves bandwidth and reduces response time.
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.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, displayName, createdAt, updatedAt, version, tags, tagSlugs&lt;/i&gt;
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.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: partnerType, tags&lt;i&gt;
621
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, displayName, createdAt, updatedAt, tags, tagSlugs, partnerTypeId&lt;/i&gt;
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 that was returned when you created it and Emil Api will return the corresponding partner information.
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. The partners are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
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<string>;
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 (_a) {
150
- switch (_a.label) {
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 = _a.sent();
165
- accessToken = response.data.accessToken;
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, accessToken;
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
- return [2 /*return*/, ''];
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
- accessToken = (_a.sent()).data.accessToken;
198
- return [2 /*return*/, accessToken];
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 (_a) {
226
- switch (_a.label) {
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
- _a.label = 1;
238
+ _c.label = 1;
234
239
  case 1:
235
- _a.trys.push([1, 3, , 4]);
240
+ _c.trys.push([1, 3, , 4]);
236
241
  return [4 /*yield*/, this.refreshTokenInternal()];
237
242
  case 2:
238
- tokenString = _a.sent();
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 = _a.sent();
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
- _a.label = 6;
264
+ _c.label = 6;
259
265
  case 6:
260
- _a.trys.push([6, 8, , 9]);
266
+ _c.trys.push([6, 8, , 9]);
261
267
  return [4 /*yield*/, this.refreshTokenInternal()];
262
268
  case 7:
263
- tokenString = _a.sent();
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 = _a.sent();
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 partnerType response.
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 partnerType response.
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 list of partners.
21
- * @type {Array<PartnerClass>}
20
+ * The partner response.
21
+ * @type {PartnerClass}
22
22
  * @memberof GetPartnerVersionResponseClass
23
23
  */
24
- 'partnerVersion': Array<PartnerClass>;
24
+ 'partnerVersion': PartnerClass;
25
25
  }
@@ -23,7 +23,7 @@ export interface ListPartnerRelationClass {
23
23
  */
24
24
  'items': Array<PartnerRelationClass>;
25
25
  /**
26
- * Next page token
26
+ * Next page token.
27
27
  * @type {string}
28
28
  * @memberof ListPartnerRelationClass
29
29
  */
@@ -23,7 +23,7 @@ export interface ListPartnerRelationTypesClass {
23
23
  */
24
24
  'items': Array<PartnerRelationTypeClass>;
25
25
  /**
26
- * Next page token
26
+ * Next page token.
27
27
  * @type {string}
28
28
  * @memberof ListPartnerRelationTypesClass
29
29
  */
@@ -17,7 +17,7 @@ import { PartnerTypeClass } from './partner-type-class';
17
17
  */
18
18
  export interface ListPartnerTypesResponseClass {
19
19
  /**
20
- * The list of partnerTypes.
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 Partnerss.
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
  }
@@ -17,7 +17,7 @@ import { PartnerClass } from './partner-class';
17
17
  */
18
18
  export interface ListPartnersResponseClass {
19
19
  /**
20
- * The list of Partnerss.
20
+ * The list of partnerss.
21
21
  * @type {Array<PartnerClass>}
22
22
  * @memberof ListPartnersResponseClass
23
23
  */
@@ -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
  }