@emilgroup/public-api-sdk 1.31.0 → 1.32.1-beta.0

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 (35) hide show
  1. package/.openapi-generator/FILES +2 -0
  2. package/README.md +2 -2
  3. package/api/documents-api.ts +40 -40
  4. package/api/products-api.ts +39 -39
  5. package/base.ts +53 -3
  6. package/common.ts +2 -2
  7. package/configuration.ts +9 -0
  8. package/dist/api/documents-api.d.ts +40 -40
  9. package/dist/api/documents-api.js +21 -21
  10. package/dist/api/products-api.d.ts +39 -39
  11. package/dist/api/products-api.js +21 -21
  12. package/dist/base.d.ts +11 -1
  13. package/dist/base.js +47 -2
  14. package/dist/common.js +2 -2
  15. package/dist/configuration.d.ts +6 -0
  16. package/dist/configuration.js +8 -0
  17. package/dist/models/complete-eis-payment-setup-request-dto.d.ts +54 -0
  18. package/dist/models/complete-eis-payment-setup-request-dto.js +15 -0
  19. package/dist/models/complete-payment-setup-request-dto.d.ts +7 -0
  20. package/dist/models/get-public-psp-settings-response-class.d.ts +6 -0
  21. package/dist/models/index.d.ts +2 -0
  22. package/dist/models/index.js +2 -0
  23. package/dist/models/initiate-eis-payment-setup-request-dto.d.ts +36 -0
  24. package/dist/models/initiate-eis-payment-setup-request-dto.js +15 -0
  25. package/dist/models/initiate-payment-setup-request-dto.d.ts +7 -0
  26. package/dist/models/product-field-class.d.ts +24 -0
  27. package/models/complete-eis-payment-setup-request-dto.ts +60 -0
  28. package/models/complete-payment-setup-request-dto.ts +7 -0
  29. package/models/get-public-psp-settings-response-class.ts +6 -0
  30. package/models/index.ts +2 -0
  31. package/models/initiate-eis-payment-setup-request-dto.ts +42 -0
  32. package/models/initiate-payment-setup-request-dto.ts +7 -0
  33. package/models/product-field-class.ts +24 -0
  34. package/package.json +1 -1
  35. package/tsconfig.json +1 -0
@@ -27,6 +27,7 @@ models/calculate-product-fields-response-class.ts
27
27
  models/card-details-dto.ts
28
28
  models/complete-adyen-payment-setup-request-dto.ts
29
29
  models/complete-braintree-payment-setup-request-dto.ts
30
+ models/complete-eis-payment-setup-request-dto.ts
30
31
  models/complete-email-verification-dto.ts
31
32
  models/complete-email-verification-response-class.ts
32
33
  models/complete-payment-setup-request-dto.ts
@@ -57,6 +58,7 @@ models/initiate-adyen-payment-setup-request-dto.ts
57
58
  models/initiate-adyen-payment-setup-response-class.ts
58
59
  models/initiate-braintree-payment-setup-request-dto.ts
59
60
  models/initiate-braintree-payment-setup-response-class.ts
61
+ models/initiate-eis-payment-setup-request-dto.ts
60
62
  models/initiate-email-verification-dto.ts
61
63
  models/initiate-email-verification-response-class.ts
62
64
  models/initiate-lead-response-class.ts
package/README.md CHANGED
@@ -17,11 +17,11 @@ Although this package can be used in both TypeScript and JavaScript, it is inten
17
17
  Navigate to the folder of your consuming project and run one of the following commands:
18
18
 
19
19
  ```
20
- npm install @emilgroup/public-api-sdk@1.31.0 --save
20
+ npm install @emilgroup/public-api-sdk@1.32.1-beta.0 --save
21
21
  ```
22
22
  or
23
23
  ```
24
- yarn add @emilgroup/public-api-sdk@1.31.0
24
+ yarn add @emilgroup/public-api-sdk@1.32.1-beta.0
25
25
  ```
26
26
 
27
27
  And then you can import `PublicApi`.
@@ -306,17 +306,17 @@ export const DocumentsApiAxiosParamCreator = function (configuration?: Configura
306
306
  * @summary List product documents
307
307
  * @param {string} productCode
308
308
  * @param {string} [authorization] Bearer Token
309
- * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
310
- * @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.
311
- * @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
312
- * @param {any} [search] To search the list by any field, pass search=xxx to fetch the result.
313
- * @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.
314
- * @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.
315
- * @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.
309
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
310
+ * @param {string} [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.
311
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
312
+ * @param {string} [search] To search the list by any field, pass search=xxx to fetch the result.
313
+ * @param {string} [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.
314
+ * @param {string} [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.
315
+ * @param {string} [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.
316
316
  * @param {*} [options] Override http request option.
317
317
  * @throws {RequiredError}
318
318
  */
319
- listProductDocuments: async (productCode: string, authorization?: string, pageSize?: any, pageToken?: any, filter?: any, search?: any, order?: any, expand?: any, filters?: any, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
319
+ listProductDocuments: async (productCode: string, authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
320
320
  // verify required parameter 'productCode' is not null or undefined
321
321
  assertParamExists('listProductDocuments', 'productCode', productCode)
322
322
  const localVarPath = `/publicapi/v1/documents/{productCode}`
@@ -510,17 +510,17 @@ export const DocumentsApiFp = function(configuration?: Configuration) {
510
510
  * @summary List product documents
511
511
  * @param {string} productCode
512
512
  * @param {string} [authorization] Bearer Token
513
- * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
514
- * @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.
515
- * @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
516
- * @param {any} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
517
- * @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.
518
- * @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.
519
- * @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.
513
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
514
+ * @param {string} [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.
515
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
516
+ * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
517
+ * @param {string} [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.
518
+ * @param {string} [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.
519
+ * @param {string} [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.
520
520
  * @param {*} [options] Override http request option.
521
521
  * @throws {RequiredError}
522
522
  */
523
- async listProductDocuments(productCode: string, authorization?: string, pageSize?: any, pageToken?: any, filter?: any, search?: any, order?: any, expand?: any, filters?: any, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListProductDocumentsResponseClass>> {
523
+ async listProductDocuments(productCode: string, authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListProductDocumentsResponseClass>> {
524
524
  const localVarAxiosArgs = await localVarAxiosParamCreator.listProductDocuments(productCode, authorization, pageSize, pageToken, filter, search, order, expand, filters, options);
525
525
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
526
526
  },
@@ -613,17 +613,17 @@ export const DocumentsApiFactory = function (configuration?: Configuration, base
613
613
  * @summary List product documents
614
614
  * @param {string} productCode
615
615
  * @param {string} [authorization] Bearer Token
616
- * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
617
- * @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.
618
- * @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
619
- * @param {any} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
620
- * @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.
621
- * @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.
622
- * @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.
616
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
617
+ * @param {string} [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.
618
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
619
+ * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
620
+ * @param {string} [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.
621
+ * @param {string} [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.
622
+ * @param {string} [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.
623
623
  * @param {*} [options] Override http request option.
624
624
  * @throws {RequiredError}
625
625
  */
626
- listProductDocuments(productCode: string, authorization?: string, pageSize?: any, pageToken?: any, filter?: any, search?: any, order?: any, expand?: any, filters?: any, options?: any): AxiosPromise<ListProductDocumentsResponseClass> {
626
+ listProductDocuments(productCode: string, authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options?: any): AxiosPromise<ListProductDocumentsResponseClass> {
627
627
  return localVarFp.listProductDocuments(productCode, authorization, pageSize, pageToken, filter, search, order, expand, filters, options).then((request) => request(axios, basePath));
628
628
  },
629
629
  /**
@@ -816,52 +816,52 @@ export interface DocumentsApiListProductDocumentsRequest {
816
816
 
817
817
  /**
818
818
  * A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
819
- * @type {any}
819
+ * @type {number}
820
820
  * @memberof DocumentsApiListProductDocuments
821
821
  */
822
- readonly pageSize?: any
822
+ readonly pageSize?: number
823
823
 
824
824
  /**
825
- * 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.
826
- * @type {any}
825
+ * 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.
826
+ * @type {string}
827
827
  * @memberof DocumentsApiListProductDocuments
828
828
  */
829
- readonly pageToken?: any
829
+ readonly pageToken?: string
830
830
 
831
831
  /**
832
832
  * Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
833
- * @type {any}
833
+ * @type {string}
834
834
  * @memberof DocumentsApiListProductDocuments
835
835
  */
836
- readonly filter?: any
836
+ readonly filter?: string
837
837
 
838
838
  /**
839
839
  * To search the list by any field, pass search&#x3D;xxx to fetch the result.
840
- * @type {any}
840
+ * @type {string}
841
841
  * @memberof DocumentsApiListProductDocuments
842
842
  */
843
- readonly search?: any
843
+ readonly search?: string
844
844
 
845
845
  /**
846
846
  * 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.
847
- * @type {any}
847
+ * @type {string}
848
848
  * @memberof DocumentsApiListProductDocuments
849
849
  */
850
- readonly order?: any
850
+ readonly order?: string
851
851
 
852
852
  /**
853
- * 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.
854
- * @type {any}
853
+ * 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.
854
+ * @type {string}
855
855
  * @memberof DocumentsApiListProductDocuments
856
856
  */
857
- readonly expand?: any
857
+ readonly expand?: string
858
858
 
859
859
  /**
860
860
  * 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.
861
- * @type {any}
861
+ * @type {string}
862
862
  * @memberof DocumentsApiListProductDocuments
863
863
  */
864
- readonly filters?: any
864
+ readonly filters?: string
865
865
  }
866
866
 
867
867
  /**
@@ -392,17 +392,17 @@ export const ProductsApiAxiosParamCreator = function (configuration?: Configurat
392
392
  * Returns a list of products you have previously created. The products are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
393
393
  * @summary List products
394
394
  * @param {string} [authorization] Bearer Token
395
- * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
396
- * @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.
397
- * @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
398
- * @param {any} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
399
- * @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.
400
- * @param {any} [expand] You can expand product versions and insured object types list in this endpoint.
401
- * @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.
395
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
396
+ * @param {string} [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.
397
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
398
+ * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
399
+ * @param {string} [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.
400
+ * @param {string} [expand] You can expand product versions and insured object types list in this endpoint.
401
+ * @param {string} [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.
402
402
  * @param {*} [options] Override http request option.
403
403
  * @throws {RequiredError}
404
404
  */
405
- listProducts: async (authorization?: string, pageSize?: any, pageToken?: any, filter?: any, search?: any, order?: any, expand?: any, filters?: any, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
405
+ listProducts: async (authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
406
406
  const localVarPath = `/publicapi/v1/products`;
407
407
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
408
408
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
@@ -566,17 +566,17 @@ export const ProductsApiFp = function(configuration?: Configuration) {
566
566
  * Returns a list of products you have previously created. The products are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
567
567
  * @summary List products
568
568
  * @param {string} [authorization] Bearer Token
569
- * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
570
- * @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.
571
- * @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
572
- * @param {any} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
573
- * @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.
574
- * @param {any} [expand] You can expand product versions and insured object types list in this endpoint.
575
- * @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.
569
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
570
+ * @param {string} [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.
571
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
572
+ * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
573
+ * @param {string} [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.
574
+ * @param {string} [expand] You can expand product versions and insured object types list in this endpoint.
575
+ * @param {string} [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.
576
576
  * @param {*} [options] Override http request option.
577
577
  * @throws {RequiredError}
578
578
  */
579
- async listProducts(authorization?: string, pageSize?: any, pageToken?: any, filter?: any, search?: any, order?: any, expand?: any, filters?: any, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListProductsResponseClass>> {
579
+ async listProducts(authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListProductsResponseClass>> {
580
580
  const localVarAxiosArgs = await localVarAxiosParamCreator.listProducts(authorization, pageSize, pageToken, filter, search, order, expand, filters, options);
581
581
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
582
582
  },
@@ -675,17 +675,17 @@ export const ProductsApiFactory = function (configuration?: Configuration, baseP
675
675
  * Returns a list of products you have previously created. The products are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
676
676
  * @summary List products
677
677
  * @param {string} [authorization] Bearer Token
678
- * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
679
- * @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.
680
- * @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
681
- * @param {any} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
682
- * @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.
683
- * @param {any} [expand] You can expand product versions and insured object types list in this endpoint.
684
- * @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.
678
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
679
+ * @param {string} [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.
680
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
681
+ * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
682
+ * @param {string} [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.
683
+ * @param {string} [expand] You can expand product versions and insured object types list in this endpoint.
684
+ * @param {string} [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.
685
685
  * @param {*} [options] Override http request option.
686
686
  * @throws {RequiredError}
687
687
  */
688
- listProducts(authorization?: string, pageSize?: any, pageToken?: any, filter?: any, search?: any, order?: any, expand?: any, filters?: any, options?: any): AxiosPromise<ListProductsResponseClass> {
688
+ listProducts(authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options?: any): AxiosPromise<ListProductsResponseClass> {
689
689
  return localVarFp.listProducts(authorization, pageSize, pageToken, filter, search, order, expand, filters, options).then((request) => request(axios, basePath));
690
690
  },
691
691
  };
@@ -881,52 +881,52 @@ export interface ProductsApiListProductsRequest {
881
881
 
882
882
  /**
883
883
  * A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
884
- * @type {any}
884
+ * @type {number}
885
885
  * @memberof ProductsApiListProducts
886
886
  */
887
- readonly pageSize?: any
887
+ readonly pageSize?: number
888
888
 
889
889
  /**
890
- * 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.
891
- * @type {any}
890
+ * 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.
891
+ * @type {string}
892
892
  * @memberof ProductsApiListProducts
893
893
  */
894
- readonly pageToken?: any
894
+ readonly pageToken?: string
895
895
 
896
896
  /**
897
897
  * Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
898
- * @type {any}
898
+ * @type {string}
899
899
  * @memberof ProductsApiListProducts
900
900
  */
901
- readonly filter?: any
901
+ readonly filter?: string
902
902
 
903
903
  /**
904
904
  * To search the list by any field, pass search&#x3D;xxx to fetch the result.
905
- * @type {any}
905
+ * @type {string}
906
906
  * @memberof ProductsApiListProducts
907
907
  */
908
- readonly search?: any
908
+ readonly search?: string
909
909
 
910
910
  /**
911
911
  * 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.
912
- * @type {any}
912
+ * @type {string}
913
913
  * @memberof ProductsApiListProducts
914
914
  */
915
- readonly order?: any
915
+ readonly order?: string
916
916
 
917
917
  /**
918
918
  * You can expand product versions and insured object types list in this endpoint.
919
- * @type {any}
919
+ * @type {string}
920
920
  * @memberof ProductsApiListProducts
921
921
  */
922
- readonly expand?: any
922
+ readonly expand?: string
923
923
 
924
924
  /**
925
925
  * 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.
926
- * @type {any}
926
+ * @type {string}
927
927
  * @memberof ProductsApiListProducts
928
928
  */
929
- readonly filters?: any
929
+ readonly filters?: string
930
930
  }
931
931
 
932
932
  /**
package/base.ts CHANGED
@@ -37,9 +37,20 @@ export interface LoginClass {
37
37
  permissions: string;
38
38
  }
39
39
 
40
+ export interface SwitchWorkspaceRequest {
41
+ username: string;
42
+ targetWorkspace: string;
43
+ }
44
+
45
+ export interface SwitchWorkspaceResponseClass {
46
+ accessToken: string;
47
+ permissions: string;
48
+ }
49
+
40
50
  export enum Environment {
41
51
  Production = 'https://apiv2.emil.de',
42
52
  Test = 'https://apiv2-test.emil.de',
53
+ Staging = 'https://apiv2-staging.emil.de',
43
54
  Development = 'https://apiv2-dev.emil.de',
44
55
  ProductionZurich = 'https://eu-central-2.apiv2.emil.de',
45
56
  }
@@ -86,9 +97,14 @@ export class BaseAPI {
86
97
  this.loadTokenData();
87
98
 
88
99
  if (configuration) {
100
+ const { accessToken } = this.tokenData;
89
101
  this.configuration = configuration;
90
102
  this.basePath = configuration.basePath || this.basePath;
91
- this.configuration.accessToken = this.tokenData.accessToken ? `Bearer ${this.tokenData.accessToken}` : '';
103
+
104
+ // Use config token if provided, otherwise use tokenData token
105
+ const configToken = this.configuration.accessToken;
106
+ const storedToken = accessToken ? `Bearer ${accessToken}` : '';
107
+ this.configuration.accessToken = configToken || storedToken;
92
108
  } else {
93
109
  const { accessToken, username } = this.tokenData;
94
110
 
@@ -118,7 +134,7 @@ export class BaseAPI {
118
134
  return this.tokenData.permissions.split(',');
119
135
  }
120
136
 
121
- async authorize(username: string, password: string): Promise<void> {
137
+ async authorize(username: string, password: string, targetWorkspace?: string): Promise<void> {
122
138
  const options: AxiosRequestConfig = {
123
139
  method: 'POST',
124
140
  url: `${this.configuration.basePath}/authservice/v1/login`,
@@ -140,6 +156,40 @@ export class BaseAPI {
140
156
  this.tokenData.accessToken = accessToken;
141
157
  this.tokenData.permissions = permissions;
142
158
 
159
+ // Switch workspace if provided
160
+ if (targetWorkspace) {
161
+ await this.switchWorkspace(targetWorkspace);
162
+ } else {
163
+ // Only store if no workspace switch (since switchWorkspace will store after switching)
164
+ this.storeTokenData({
165
+ ...this.tokenData
166
+ });
167
+ }
168
+ }
169
+
170
+ async switchWorkspace(targetWorkspace: string): Promise<void> {
171
+ const options: AxiosRequestConfig = {
172
+ method: 'POST',
173
+ url: `${this.configuration.basePath}/authservice/v1/workspaces/switch`,
174
+ headers: {
175
+ 'Content-Type': 'application/json',
176
+ 'Authorization': `Bearer ${this.configuration.accessToken}`,
177
+ },
178
+ data: {
179
+ username: this.configuration.username,
180
+ targetWorkspace,
181
+ } as SwitchWorkspaceRequest,
182
+ withCredentials: true,
183
+ };
184
+
185
+ const response = await globalAxios.request<SwitchWorkspaceResponseClass>(options);
186
+
187
+ const { data: { accessToken, permissions } } = response;
188
+
189
+ this.configuration.accessToken = `Bearer ${accessToken}`;
190
+ this.tokenData.accessToken = accessToken;
191
+ this.tokenData.permissions = permissions;
192
+
143
193
  this.storeTokenData({
144
194
  ...this.tokenData
145
195
  });
@@ -269,7 +319,7 @@ export class BaseAPI {
269
319
  * @extends {Error}
270
320
  */
271
321
  export class RequiredError extends Error {
272
- name: "RequiredError" = "RequiredError";
322
+ override name: "RequiredError" = "RequiredError";
273
323
  constructor(public field: string, msg?: string) {
274
324
  super(msg);
275
325
  }
package/common.ts CHANGED
@@ -65,7 +65,7 @@ export const setBearerAuthToObject = async function (object: any, configuration?
65
65
  const accessToken = typeof configuration.accessToken === 'function'
66
66
  ? await configuration.accessToken()
67
67
  : await configuration.accessToken;
68
- object["Authorization"] = "Bearer " + accessToken;
68
+ object["Authorization"] = configuration.getBearerToken(accessToken);
69
69
  }
70
70
  }
71
71
 
@@ -78,7 +78,7 @@ export const setOAuthToObject = async function (object: any, name: string, scope
78
78
  const localVarAccessTokenValue = typeof configuration.accessToken === 'function'
79
79
  ? await configuration.accessToken(name, scopes)
80
80
  : await configuration.accessToken;
81
- object["Authorization"] = "Bearer " + localVarAccessTokenValue;
81
+ object["Authorization"] = configuration.getBearerToken(localVarAccessTokenValue);
82
82
  }
83
83
  }
84
84
 
package/configuration.ts CHANGED
@@ -98,4 +98,13 @@ export class Configuration {
98
98
  const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i');
99
99
  return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json');
100
100
  }
101
+
102
+ /**
103
+ * Returns "Bearer" token.
104
+ * @param token - access token.
105
+ * @return Bearer token.
106
+ */
107
+ public getBearerToken(token?: string): string {
108
+ return ('' + token).startsWith("Bearer") ? token : "Bearer " + token;
109
+ }
101
110
  }