@idunion/tl-sdk 0.0.52 → 0.0.56

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/api.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
- * IDunion Trust List API
3
- * IDunion Trust List API
2
+ * IDUnion Trust List API
3
+ * IDUnion Trust List API
4
4
  *
5
5
  * The version of the OpenAPI document: 0.0.1
6
6
  *
@@ -62,10 +62,6 @@ export interface DidDocument {
62
62
  'assertionMethod'?: Array<string>;
63
63
  'service'?: Array<ServiceItem>;
64
64
  }
65
- export interface DidDocumentCreatePayload {
66
- 'didKey': string;
67
- 'orgName': string;
68
- }
69
65
  export interface DidDocumentList {
70
66
  'items'?: Array<string>;
71
67
  }
@@ -265,6 +261,21 @@ export declare const TlrStatusEnum: {
265
261
  readonly Expired: "expired";
266
262
  };
267
263
  export type TlrStatusEnum = typeof TlrStatusEnum[keyof typeof TlrStatusEnum];
264
+ /**
265
+ * The public key material must be provided either as did:key or CSR
266
+ */
267
+ export interface TlrCreatePayload {
268
+ 'didKey'?: string;
269
+ 'csr'?: string;
270
+ 'orgName': string;
271
+ }
272
+ export interface TlrCreatedResult {
273
+ 'did': string;
274
+ /**
275
+ * If CSR was provided in the payload the response will contain certificate issued using this CSR
276
+ */
277
+ 'x509Certificate'?: string;
278
+ }
268
279
  export interface TlrList {
269
280
  'items'?: Array<Tlr>;
270
281
  }
@@ -308,14 +319,6 @@ export interface VpResponse {
308
319
  * DefaultApi - axios parameter creator
309
320
  */
310
321
  export declare const DefaultApiAxiosParamCreator: (configuration?: Configuration) => {
311
- /**
312
- * Creates a new DID Document.
313
- * @param {string} tlId
314
- * @param {DidDocumentCreatePayload} [didDocumentCreatePayload] DID Document Create Payload.
315
- * @param {*} [options] Override http request option.
316
- * @throws {RequiredError}
317
- */
318
- didDocumentCreate: (tlId: string, didDocumentCreatePayload?: DidDocumentCreatePayload, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
319
322
  /**
320
323
  * Retrieves a specific DID Document
321
324
  * @param {string} tlId Trust List Identifier
@@ -426,6 +429,14 @@ export declare const DefaultApiAxiosParamCreator: (configuration?: Configuration
426
429
  * @throws {RequiredError}
427
430
  */
428
431
  tlPatch: (tlId: string, tlPayload?: TlPayload, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
432
+ /**
433
+ * Directly creates a new Trusted List Record. When a Certificate Signing Request is provided, it will also issue an x509 certificate and update the ETSI TS 119 6**
434
+ * @param {string} tlId
435
+ * @param {TlrCreatePayload} [tlrCreatePayload] Trust List Record Create Payload.
436
+ * @param {*} [options] Override http request option.
437
+ * @throws {RequiredError}
438
+ */
439
+ tlrCreate: (tlId: string, tlrCreatePayload?: TlrCreatePayload, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
429
440
  /**
430
441
  * Removes a specific Trust List Record
431
442
  * @param {string} tlId Trust List Identifier
@@ -478,14 +489,6 @@ export declare const DefaultApiAxiosParamCreator: (configuration?: Configuration
478
489
  * DefaultApi - functional programming interface
479
490
  */
480
491
  export declare const DefaultApiFp: (configuration?: Configuration) => {
481
- /**
482
- * Creates a new DID Document.
483
- * @param {string} tlId
484
- * @param {DidDocumentCreatePayload} [didDocumentCreatePayload] DID Document Create Payload.
485
- * @param {*} [options] Override http request option.
486
- * @throws {RequiredError}
487
- */
488
- didDocumentCreate(tlId: string, didDocumentCreatePayload?: DidDocumentCreatePayload, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<string>>;
489
492
  /**
490
493
  * Retrieves a specific DID Document
491
494
  * @param {string} tlId Trust List Identifier
@@ -596,6 +599,14 @@ export declare const DefaultApiFp: (configuration?: Configuration) => {
596
599
  * @throws {RequiredError}
597
600
  */
598
601
  tlPatch(tlId: string, tlPayload?: TlPayload, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Tl>>;
602
+ /**
603
+ * Directly creates a new Trusted List Record. When a Certificate Signing Request is provided, it will also issue an x509 certificate and update the ETSI TS 119 6**
604
+ * @param {string} tlId
605
+ * @param {TlrCreatePayload} [tlrCreatePayload] Trust List Record Create Payload.
606
+ * @param {*} [options] Override http request option.
607
+ * @throws {RequiredError}
608
+ */
609
+ tlrCreate(tlId: string, tlrCreatePayload?: TlrCreatePayload, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<TlrCreatedResult>>;
599
610
  /**
600
611
  * Removes a specific Trust List Record
601
612
  * @param {string} tlId Trust List Identifier
@@ -648,14 +659,6 @@ export declare const DefaultApiFp: (configuration?: Configuration) => {
648
659
  * DefaultApi - factory interface
649
660
  */
650
661
  export declare const DefaultApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
651
- /**
652
- * Creates a new DID Document.
653
- * @param {string} tlId
654
- * @param {DidDocumentCreatePayload} [didDocumentCreatePayload] DID Document Create Payload.
655
- * @param {*} [options] Override http request option.
656
- * @throws {RequiredError}
657
- */
658
- didDocumentCreate(tlId: string, didDocumentCreatePayload?: DidDocumentCreatePayload, options?: RawAxiosRequestConfig): AxiosPromise<string>;
659
662
  /**
660
663
  * Retrieves a specific DID Document
661
664
  * @param {string} tlId Trust List Identifier
@@ -766,6 +769,14 @@ export declare const DefaultApiFactory: (configuration?: Configuration, basePath
766
769
  * @throws {RequiredError}
767
770
  */
768
771
  tlPatch(tlId: string, tlPayload?: TlPayload, options?: RawAxiosRequestConfig): AxiosPromise<Tl>;
772
+ /**
773
+ * Directly creates a new Trusted List Record. When a Certificate Signing Request is provided, it will also issue an x509 certificate and update the ETSI TS 119 6**
774
+ * @param {string} tlId
775
+ * @param {TlrCreatePayload} [tlrCreatePayload] Trust List Record Create Payload.
776
+ * @param {*} [options] Override http request option.
777
+ * @throws {RequiredError}
778
+ */
779
+ tlrCreate(tlId: string, tlrCreatePayload?: TlrCreatePayload, options?: RawAxiosRequestConfig): AxiosPromise<TlrCreatedResult>;
769
780
  /**
770
781
  * Removes a specific Trust List Record
771
782
  * @param {string} tlId Trust List Identifier
@@ -818,14 +829,6 @@ export declare const DefaultApiFactory: (configuration?: Configuration, basePath
818
829
  * DefaultApi - object-oriented interface
819
830
  */
820
831
  export declare class DefaultApi extends BaseAPI {
821
- /**
822
- * Creates a new DID Document.
823
- * @param {string} tlId
824
- * @param {DidDocumentCreatePayload} [didDocumentCreatePayload] DID Document Create Payload.
825
- * @param {*} [options] Override http request option.
826
- * @throws {RequiredError}
827
- */
828
- didDocumentCreate(tlId: string, didDocumentCreatePayload?: DidDocumentCreatePayload, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<string, any>>;
829
832
  /**
830
833
  * Retrieves a specific DID Document
831
834
  * @param {string} tlId Trust List Identifier
@@ -936,6 +939,14 @@ export declare class DefaultApi extends BaseAPI {
936
939
  * @throws {RequiredError}
937
940
  */
938
941
  tlPatch(tlId: string, tlPayload?: TlPayload, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<Tl, any>>;
942
+ /**
943
+ * Directly creates a new Trusted List Record. When a Certificate Signing Request is provided, it will also issue an x509 certificate and update the ETSI TS 119 6**
944
+ * @param {string} tlId
945
+ * @param {TlrCreatePayload} [tlrCreatePayload] Trust List Record Create Payload.
946
+ * @param {*} [options] Override http request option.
947
+ * @throws {RequiredError}
948
+ */
949
+ tlrCreate(tlId: string, tlrCreatePayload?: TlrCreatePayload, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<TlrCreatedResult, any>>;
939
950
  /**
940
951
  * Removes a specific Trust List Record
941
952
  * @param {string} tlId Trust List Identifier
package/api.js CHANGED
@@ -2,8 +2,8 @@
2
2
  /* tslint:disable */
3
3
  /* eslint-disable */
4
4
  /**
5
- * IDunion Trust List API
6
- * IDunion Trust List API
5
+ * IDUnion Trust List API
6
+ * IDUnion Trust List API
7
7
  *
8
8
  * The version of the OpenAPI document: 0.0.1
9
9
  *
@@ -53,41 +53,6 @@ exports.TlrStatusEnum = {
53
53
  */
54
54
  const DefaultApiAxiosParamCreator = function (configuration) {
55
55
  return {
56
- /**
57
- * Creates a new DID Document.
58
- * @param {string} tlId
59
- * @param {DidDocumentCreatePayload} [didDocumentCreatePayload] DID Document Create Payload.
60
- * @param {*} [options] Override http request option.
61
- * @throws {RequiredError}
62
- */
63
- didDocumentCreate: (tlId_1, didDocumentCreatePayload_1, ...args_1) => __awaiter(this, [tlId_1, didDocumentCreatePayload_1, ...args_1], void 0, function* (tlId, didDocumentCreatePayload, options = {}) {
64
- // verify required parameter 'tlId' is not null or undefined
65
- (0, common_1.assertParamExists)('didDocumentCreate', 'tlId', tlId);
66
- const localVarPath = `/{tl_id}/tlrs`
67
- .replace(`{${"tl_id"}}`, encodeURIComponent(String(tlId)));
68
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
69
- const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
70
- let baseOptions;
71
- if (configuration) {
72
- baseOptions = configuration.baseOptions;
73
- }
74
- const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
75
- const localVarHeaderParameter = {};
76
- const localVarQueryParameter = {};
77
- // authentication accessToken required
78
- // http bearer authentication required
79
- yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
80
- localVarHeaderParameter['Content-Type'] = 'application/json';
81
- localVarHeaderParameter['Accept'] = 'application/json';
82
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
83
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
84
- localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
85
- localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(didDocumentCreatePayload, localVarRequestOptions, configuration);
86
- return {
87
- url: (0, common_1.toPathString)(localVarUrlObj),
88
- options: localVarRequestOptions,
89
- };
90
- }),
91
56
  /**
92
57
  * Retrieves a specific DID Document
93
58
  * @param {string} tlId Trust List Identifier
@@ -565,6 +530,41 @@ const DefaultApiAxiosParamCreator = function (configuration) {
565
530
  options: localVarRequestOptions,
566
531
  };
567
532
  }),
533
+ /**
534
+ * Directly creates a new Trusted List Record. When a Certificate Signing Request is provided, it will also issue an x509 certificate and update the ETSI TS 119 6**
535
+ * @param {string} tlId
536
+ * @param {TlrCreatePayload} [tlrCreatePayload] Trust List Record Create Payload.
537
+ * @param {*} [options] Override http request option.
538
+ * @throws {RequiredError}
539
+ */
540
+ tlrCreate: (tlId_1, tlrCreatePayload_1, ...args_1) => __awaiter(this, [tlId_1, tlrCreatePayload_1, ...args_1], void 0, function* (tlId, tlrCreatePayload, options = {}) {
541
+ // verify required parameter 'tlId' is not null or undefined
542
+ (0, common_1.assertParamExists)('tlrCreate', 'tlId', tlId);
543
+ const localVarPath = `/{tl_id}/tlrs`
544
+ .replace(`{${"tl_id"}}`, encodeURIComponent(String(tlId)));
545
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
546
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
547
+ let baseOptions;
548
+ if (configuration) {
549
+ baseOptions = configuration.baseOptions;
550
+ }
551
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
552
+ const localVarHeaderParameter = {};
553
+ const localVarQueryParameter = {};
554
+ // authentication accessToken required
555
+ // http bearer authentication required
556
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
557
+ localVarHeaderParameter['Content-Type'] = 'application/json';
558
+ localVarHeaderParameter['Accept'] = 'application/json';
559
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
560
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
561
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
562
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(tlrCreatePayload, localVarRequestOptions, configuration);
563
+ return {
564
+ url: (0, common_1.toPathString)(localVarUrlObj),
565
+ options: localVarRequestOptions,
566
+ };
567
+ }),
568
568
  /**
569
569
  * Removes a specific Trust List Record
570
570
  * @param {string} tlId Trust List Identifier
@@ -777,22 +777,6 @@ exports.DefaultApiAxiosParamCreator = DefaultApiAxiosParamCreator;
777
777
  const DefaultApiFp = function (configuration) {
778
778
  const localVarAxiosParamCreator = (0, exports.DefaultApiAxiosParamCreator)(configuration);
779
779
  return {
780
- /**
781
- * Creates a new DID Document.
782
- * @param {string} tlId
783
- * @param {DidDocumentCreatePayload} [didDocumentCreatePayload] DID Document Create Payload.
784
- * @param {*} [options] Override http request option.
785
- * @throws {RequiredError}
786
- */
787
- didDocumentCreate(tlId, didDocumentCreatePayload, options) {
788
- return __awaiter(this, void 0, void 0, function* () {
789
- var _a, _b, _c;
790
- const localVarAxiosArgs = yield localVarAxiosParamCreator.didDocumentCreate(tlId, didDocumentCreatePayload, options);
791
- const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
792
- const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['DefaultApi.didDocumentCreate']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
793
- return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
794
- });
795
- },
796
780
  /**
797
781
  * Retrieves a specific DID Document
798
782
  * @param {string} tlId Trust List Identifier
@@ -1023,6 +1007,22 @@ const DefaultApiFp = function (configuration) {
1023
1007
  return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1024
1008
  });
1025
1009
  },
1010
+ /**
1011
+ * Directly creates a new Trusted List Record. When a Certificate Signing Request is provided, it will also issue an x509 certificate and update the ETSI TS 119 6**
1012
+ * @param {string} tlId
1013
+ * @param {TlrCreatePayload} [tlrCreatePayload] Trust List Record Create Payload.
1014
+ * @param {*} [options] Override http request option.
1015
+ * @throws {RequiredError}
1016
+ */
1017
+ tlrCreate(tlId, tlrCreatePayload, options) {
1018
+ return __awaiter(this, void 0, void 0, function* () {
1019
+ var _a, _b, _c;
1020
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.tlrCreate(tlId, tlrCreatePayload, options);
1021
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1022
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['DefaultApi.tlrCreate']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1023
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1024
+ });
1025
+ },
1026
1026
  /**
1027
1027
  * Removes a specific Trust List Record
1028
1028
  * @param {string} tlId Trust List Identifier
@@ -1127,16 +1127,6 @@ exports.DefaultApiFp = DefaultApiFp;
1127
1127
  const DefaultApiFactory = function (configuration, basePath, axios) {
1128
1128
  const localVarFp = (0, exports.DefaultApiFp)(configuration);
1129
1129
  return {
1130
- /**
1131
- * Creates a new DID Document.
1132
- * @param {string} tlId
1133
- * @param {DidDocumentCreatePayload} [didDocumentCreatePayload] DID Document Create Payload.
1134
- * @param {*} [options] Override http request option.
1135
- * @throws {RequiredError}
1136
- */
1137
- didDocumentCreate(tlId, didDocumentCreatePayload, options) {
1138
- return localVarFp.didDocumentCreate(tlId, didDocumentCreatePayload, options).then((request) => request(axios, basePath));
1139
- },
1140
1130
  /**
1141
1131
  * Retrieves a specific DID Document
1142
1132
  * @param {string} tlId Trust List Identifier
@@ -1277,6 +1267,16 @@ const DefaultApiFactory = function (configuration, basePath, axios) {
1277
1267
  tlPatch(tlId, tlPayload, options) {
1278
1268
  return localVarFp.tlPatch(tlId, tlPayload, options).then((request) => request(axios, basePath));
1279
1269
  },
1270
+ /**
1271
+ * Directly creates a new Trusted List Record. When a Certificate Signing Request is provided, it will also issue an x509 certificate and update the ETSI TS 119 6**
1272
+ * @param {string} tlId
1273
+ * @param {TlrCreatePayload} [tlrCreatePayload] Trust List Record Create Payload.
1274
+ * @param {*} [options] Override http request option.
1275
+ * @throws {RequiredError}
1276
+ */
1277
+ tlrCreate(tlId, tlrCreatePayload, options) {
1278
+ return localVarFp.tlrCreate(tlId, tlrCreatePayload, options).then((request) => request(axios, basePath));
1279
+ },
1280
1280
  /**
1281
1281
  * Removes a specific Trust List Record
1282
1282
  * @param {string} tlId Trust List Identifier
@@ -1343,16 +1343,6 @@ exports.DefaultApiFactory = DefaultApiFactory;
1343
1343
  * DefaultApi - object-oriented interface
1344
1344
  */
1345
1345
  class DefaultApi extends base_1.BaseAPI {
1346
- /**
1347
- * Creates a new DID Document.
1348
- * @param {string} tlId
1349
- * @param {DidDocumentCreatePayload} [didDocumentCreatePayload] DID Document Create Payload.
1350
- * @param {*} [options] Override http request option.
1351
- * @throws {RequiredError}
1352
- */
1353
- didDocumentCreate(tlId, didDocumentCreatePayload, options) {
1354
- return (0, exports.DefaultApiFp)(this.configuration).didDocumentCreate(tlId, didDocumentCreatePayload, options).then((request) => request(this.axios, this.basePath));
1355
- }
1356
1346
  /**
1357
1347
  * Retrieves a specific DID Document
1358
1348
  * @param {string} tlId Trust List Identifier
@@ -1493,6 +1483,16 @@ class DefaultApi extends base_1.BaseAPI {
1493
1483
  tlPatch(tlId, tlPayload, options) {
1494
1484
  return (0, exports.DefaultApiFp)(this.configuration).tlPatch(tlId, tlPayload, options).then((request) => request(this.axios, this.basePath));
1495
1485
  }
1486
+ /**
1487
+ * Directly creates a new Trusted List Record. When a Certificate Signing Request is provided, it will also issue an x509 certificate and update the ETSI TS 119 6**
1488
+ * @param {string} tlId
1489
+ * @param {TlrCreatePayload} [tlrCreatePayload] Trust List Record Create Payload.
1490
+ * @param {*} [options] Override http request option.
1491
+ * @throws {RequiredError}
1492
+ */
1493
+ tlrCreate(tlId, tlrCreatePayload, options) {
1494
+ return (0, exports.DefaultApiFp)(this.configuration).tlrCreate(tlId, tlrCreatePayload, options).then((request) => request(this.axios, this.basePath));
1495
+ }
1496
1496
  /**
1497
1497
  * Removes a specific Trust List Record
1498
1498
  * @param {string} tlId Trust List Identifier
package/base.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
- * IDunion Trust List API
3
- * IDunion Trust List API
2
+ * IDUnion Trust List API
3
+ * IDUnion Trust List API
4
4
  *
5
5
  * The version of the OpenAPI document: 0.0.1
6
6
  *
package/base.js CHANGED
@@ -2,8 +2,8 @@
2
2
  /* tslint:disable */
3
3
  /* eslint-disable */
4
4
  /**
5
- * IDunion Trust List API
6
- * IDunion Trust List API
5
+ * IDUnion Trust List API
6
+ * IDUnion Trust List API
7
7
  *
8
8
  * The version of the OpenAPI document: 0.0.1
9
9
  *
package/common.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
- * IDunion Trust List API
3
- * IDunion Trust List API
2
+ * IDUnion Trust List API
3
+ * IDUnion Trust List API
4
4
  *
5
5
  * The version of the OpenAPI document: 0.0.1
6
6
  *
@@ -23,6 +23,12 @@ export declare const setBasicAuthToObject: (object: any, configuration?: Configu
23
23
  export declare const setBearerAuthToObject: (object: any, configuration?: Configuration) => Promise<void>;
24
24
  export declare const setOAuthToObject: (object: any, name: string, scopes: string[], configuration?: Configuration) => Promise<void>;
25
25
  export declare const setSearchParams: (url: URL, ...objects: any[]) => void;
26
+ /**
27
+ * JSON serialization helper function which replaces instances of unserializable types with serializable ones.
28
+ * This function will run for every key-value pair encountered by JSON.stringify while traversing an object.
29
+ * Converting a set to a string will return an empty object, so an intermediate conversion to an array is required.
30
+ */
31
+ export declare const replaceWithSerializableTypeIfNeeded: (key: any, value: any) => any;
26
32
  export declare const serializeDataIfNeeded: (value: any, requestOptions: any, configuration?: Configuration) => any;
27
33
  export declare const toPathString: (url: URL) => string;
28
34
  export declare const createRequestFunction: (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) => <T = unknown, R = AxiosResponse<T>>(axios?: AxiosInstance, basePath?: string) => Promise<R>;
package/common.js CHANGED
@@ -2,8 +2,8 @@
2
2
  /* tslint:disable */
3
3
  /* eslint-disable */
4
4
  /**
5
- * IDunion Trust List API
6
- * IDunion Trust List API
5
+ * IDUnion Trust List API
6
+ * IDUnion Trust List API
7
7
  *
8
8
  * The version of the OpenAPI document: 0.0.1
9
9
  *
@@ -22,7 +22,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
22
22
  });
23
23
  };
24
24
  Object.defineProperty(exports, "__esModule", { value: true });
25
- exports.createRequestFunction = exports.toPathString = exports.serializeDataIfNeeded = exports.setSearchParams = exports.setOAuthToObject = exports.setBearerAuthToObject = exports.setBasicAuthToObject = exports.setApiKeyToObject = exports.assertParamExists = exports.DUMMY_BASE_URL = void 0;
25
+ exports.createRequestFunction = exports.toPathString = exports.serializeDataIfNeeded = exports.replaceWithSerializableTypeIfNeeded = exports.setSearchParams = exports.setOAuthToObject = exports.setBearerAuthToObject = exports.setBasicAuthToObject = exports.setApiKeyToObject = exports.assertParamExists = exports.DUMMY_BASE_URL = void 0;
26
26
  const base_1 = require("./base");
27
27
  exports.DUMMY_BASE_URL = 'https://example.com';
28
28
  /**
@@ -78,7 +78,7 @@ function setFlattenedQueryParams(urlSearchParams, parameter, key = "") {
78
78
  if (parameter == null)
79
79
  return;
80
80
  if (typeof parameter === "object") {
81
- if (Array.isArray(parameter)) {
81
+ if (Array.isArray(parameter) || parameter instanceof Set) {
82
82
  parameter.forEach(item => setFlattenedQueryParams(urlSearchParams, item, key));
83
83
  }
84
84
  else {
@@ -100,13 +100,27 @@ const setSearchParams = function (url, ...objects) {
100
100
  url.search = searchParams.toString();
101
101
  };
102
102
  exports.setSearchParams = setSearchParams;
103
+ /**
104
+ * JSON serialization helper function which replaces instances of unserializable types with serializable ones.
105
+ * This function will run for every key-value pair encountered by JSON.stringify while traversing an object.
106
+ * Converting a set to a string will return an empty object, so an intermediate conversion to an array is required.
107
+ */
108
+ const replaceWithSerializableTypeIfNeeded = function (key, value) {
109
+ if (value instanceof Set) {
110
+ return Array.from(value);
111
+ }
112
+ else {
113
+ return value;
114
+ }
115
+ };
116
+ exports.replaceWithSerializableTypeIfNeeded = replaceWithSerializableTypeIfNeeded;
103
117
  const serializeDataIfNeeded = function (value, requestOptions, configuration) {
104
118
  const nonString = typeof value !== 'string';
105
119
  const needsSerialization = nonString && configuration && configuration.isJsonMime
106
120
  ? configuration.isJsonMime(requestOptions.headers['Content-Type'])
107
121
  : nonString;
108
122
  return needsSerialization
109
- ? JSON.stringify(value !== undefined ? value : {})
123
+ ? JSON.stringify(value !== undefined ? value : {}, exports.replaceWithSerializableTypeIfNeeded)
110
124
  : (value || "");
111
125
  };
112
126
  exports.serializeDataIfNeeded = serializeDataIfNeeded;
@@ -1,6 +1,6 @@
1
1
  /**
2
- * IDunion Trust List API
3
- * IDunion Trust List API
2
+ * IDUnion Trust List API
3
+ * IDUnion Trust List API
4
4
  *
5
5
  * The version of the OpenAPI document: 0.0.1
6
6
  *
package/configuration.js CHANGED
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  /* tslint:disable */
3
3
  /**
4
- * IDunion Trust List API
5
- * IDunion Trust List API
4
+ * IDUnion Trust List API
5
+ * IDUnion Trust List API
6
6
  *
7
7
  * The version of the OpenAPI document: 0.0.1
8
8
  *
package/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
- * IDunion Trust List API
3
- * IDunion Trust List API
2
+ * IDUnion Trust List API
3
+ * IDUnion Trust List API
4
4
  *
5
5
  * The version of the OpenAPI document: 0.0.1
6
6
  *
package/index.js CHANGED
@@ -2,8 +2,8 @@
2
2
  /* tslint:disable */
3
3
  /* eslint-disable */
4
4
  /**
5
- * IDunion Trust List API
6
- * IDunion Trust List API
5
+ * IDUnion Trust List API
6
+ * IDUnion Trust List API
7
7
  *
8
8
  * The version of the OpenAPI document: 0.0.1
9
9
  *
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@idunion/tl-sdk",
3
3
  "private": false,
4
- "version": "0.0.52",
4
+ "version": "0.0.56",
5
5
  "description": "",
6
6
  "main": "index.js",
7
7
  "scripts": {