@idunion/tl-sdk 0.0.52 → 0.0.57

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,34 @@ 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
+ 'orgTradeName': string;
272
+ 'orgStreetAddress': string;
273
+ 'orgCity': string;
274
+ 'orgState': string;
275
+ 'orgPostalCode': string;
276
+ 'orgCountry': string;
277
+ 'orgEmail': string;
278
+ 'orgPhone': string;
279
+ 'orgWebAddress': string;
280
+ 'orgToC': string;
281
+ 'walletSolutionName': string;
282
+ 'walletSolutionUrl': string;
283
+ 'walletSolutionRefId': string;
284
+ }
285
+ export interface TlrCreatedResult {
286
+ 'did': string;
287
+ /**
288
+ * If CSR was provided in the payload the response will contain certificate issued using this CSR
289
+ */
290
+ 'x509Certificate'?: string;
291
+ }
268
292
  export interface TlrList {
269
293
  'items'?: Array<Tlr>;
270
294
  }
@@ -308,14 +332,6 @@ export interface VpResponse {
308
332
  * DefaultApi - axios parameter creator
309
333
  */
310
334
  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
335
  /**
320
336
  * Retrieves a specific DID Document
321
337
  * @param {string} tlId Trust List Identifier
@@ -350,12 +366,19 @@ export declare const DefaultApiAxiosParamCreator: (configuration?: Configuration
350
366
  */
351
367
  didVerificationMethodPatch: (tlId: string, tlrId: string, verificationMethodPatchPayload?: VerificationMethodPatchPayload, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
352
368
  /**
353
- * Returns an ETSI Trusted list
369
+ * Returns an ETSI 119 602 Trusted list
370
+ * @param {string} tlId
371
+ * @param {*} [options] Override http request option.
372
+ * @throws {RequiredError}
373
+ */
374
+ etsiTl602Get: (tlId: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
375
+ /**
376
+ * Returns an ETSI 119 612 Trusted list
354
377
  * @param {string} tlId
355
378
  * @param {*} [options] Override http request option.
356
379
  * @throws {RequiredError}
357
380
  */
358
- etsiTlGet: (tlId: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
381
+ etsiTl612Get: (tlId: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
359
382
  /**
360
383
  *
361
384
  * @param {*} [options] Override http request option.
@@ -426,6 +449,14 @@ export declare const DefaultApiAxiosParamCreator: (configuration?: Configuration
426
449
  * @throws {RequiredError}
427
450
  */
428
451
  tlPatch: (tlId: string, tlPayload?: TlPayload, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
452
+ /**
453
+ * 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**
454
+ * @param {string} tlId
455
+ * @param {TlrCreatePayload} [tlrCreatePayload] Trust List Record Create Payload.
456
+ * @param {*} [options] Override http request option.
457
+ * @throws {RequiredError}
458
+ */
459
+ tlrCreate: (tlId: string, tlrCreatePayload?: TlrCreatePayload, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
429
460
  /**
430
461
  * Removes a specific Trust List Record
431
462
  * @param {string} tlId Trust List Identifier
@@ -478,14 +509,6 @@ export declare const DefaultApiAxiosParamCreator: (configuration?: Configuration
478
509
  * DefaultApi - functional programming interface
479
510
  */
480
511
  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
512
  /**
490
513
  * Retrieves a specific DID Document
491
514
  * @param {string} tlId Trust List Identifier
@@ -520,12 +543,19 @@ export declare const DefaultApiFp: (configuration?: Configuration) => {
520
543
  */
521
544
  didVerificationMethodPatch(tlId: string, tlrId: string, verificationMethodPatchPayload?: VerificationMethodPatchPayload, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>>;
522
545
  /**
523
- * Returns an ETSI Trusted list
546
+ * Returns an ETSI 119 602 Trusted list
547
+ * @param {string} tlId
548
+ * @param {*} [options] Override http request option.
549
+ * @throws {RequiredError}
550
+ */
551
+ etsiTl602Get(tlId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<object>>;
552
+ /**
553
+ * Returns an ETSI 119 612 Trusted list
524
554
  * @param {string} tlId
525
555
  * @param {*} [options] Override http request option.
526
556
  * @throws {RequiredError}
527
557
  */
528
- etsiTlGet(tlId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<object>>;
558
+ etsiTl612Get(tlId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<object>>;
529
559
  /**
530
560
  *
531
561
  * @param {*} [options] Override http request option.
@@ -596,6 +626,14 @@ export declare const DefaultApiFp: (configuration?: Configuration) => {
596
626
  * @throws {RequiredError}
597
627
  */
598
628
  tlPatch(tlId: string, tlPayload?: TlPayload, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Tl>>;
629
+ /**
630
+ * 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**
631
+ * @param {string} tlId
632
+ * @param {TlrCreatePayload} [tlrCreatePayload] Trust List Record Create Payload.
633
+ * @param {*} [options] Override http request option.
634
+ * @throws {RequiredError}
635
+ */
636
+ tlrCreate(tlId: string, tlrCreatePayload?: TlrCreatePayload, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<TlrCreatedResult>>;
599
637
  /**
600
638
  * Removes a specific Trust List Record
601
639
  * @param {string} tlId Trust List Identifier
@@ -648,14 +686,6 @@ export declare const DefaultApiFp: (configuration?: Configuration) => {
648
686
  * DefaultApi - factory interface
649
687
  */
650
688
  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
689
  /**
660
690
  * Retrieves a specific DID Document
661
691
  * @param {string} tlId Trust List Identifier
@@ -690,12 +720,19 @@ export declare const DefaultApiFactory: (configuration?: Configuration, basePath
690
720
  */
691
721
  didVerificationMethodPatch(tlId: string, tlrId: string, verificationMethodPatchPayload?: VerificationMethodPatchPayload, options?: RawAxiosRequestConfig): AxiosPromise<void>;
692
722
  /**
693
- * Returns an ETSI Trusted list
723
+ * Returns an ETSI 119 602 Trusted list
694
724
  * @param {string} tlId
695
725
  * @param {*} [options] Override http request option.
696
726
  * @throws {RequiredError}
697
727
  */
698
- etsiTlGet(tlId: string, options?: RawAxiosRequestConfig): AxiosPromise<object>;
728
+ etsiTl602Get(tlId: string, options?: RawAxiosRequestConfig): AxiosPromise<object>;
729
+ /**
730
+ * Returns an ETSI 119 612 Trusted list
731
+ * @param {string} tlId
732
+ * @param {*} [options] Override http request option.
733
+ * @throws {RequiredError}
734
+ */
735
+ etsiTl612Get(tlId: string, options?: RawAxiosRequestConfig): AxiosPromise<object>;
699
736
  /**
700
737
  *
701
738
  * @param {*} [options] Override http request option.
@@ -766,6 +803,14 @@ export declare const DefaultApiFactory: (configuration?: Configuration, basePath
766
803
  * @throws {RequiredError}
767
804
  */
768
805
  tlPatch(tlId: string, tlPayload?: TlPayload, options?: RawAxiosRequestConfig): AxiosPromise<Tl>;
806
+ /**
807
+ * 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**
808
+ * @param {string} tlId
809
+ * @param {TlrCreatePayload} [tlrCreatePayload] Trust List Record Create Payload.
810
+ * @param {*} [options] Override http request option.
811
+ * @throws {RequiredError}
812
+ */
813
+ tlrCreate(tlId: string, tlrCreatePayload?: TlrCreatePayload, options?: RawAxiosRequestConfig): AxiosPromise<TlrCreatedResult>;
769
814
  /**
770
815
  * Removes a specific Trust List Record
771
816
  * @param {string} tlId Trust List Identifier
@@ -818,14 +863,6 @@ export declare const DefaultApiFactory: (configuration?: Configuration, basePath
818
863
  * DefaultApi - object-oriented interface
819
864
  */
820
865
  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
866
  /**
830
867
  * Retrieves a specific DID Document
831
868
  * @param {string} tlId Trust List Identifier
@@ -860,12 +897,19 @@ export declare class DefaultApi extends BaseAPI {
860
897
  */
861
898
  didVerificationMethodPatch(tlId: string, tlrId: string, verificationMethodPatchPayload?: VerificationMethodPatchPayload, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any>>;
862
899
  /**
863
- * Returns an ETSI Trusted list
900
+ * Returns an ETSI 119 602 Trusted list
864
901
  * @param {string} tlId
865
902
  * @param {*} [options] Override http request option.
866
903
  * @throws {RequiredError}
867
904
  */
868
- etsiTlGet(tlId: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<object, any>>;
905
+ etsiTl602Get(tlId: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<object, any>>;
906
+ /**
907
+ * Returns an ETSI 119 612 Trusted list
908
+ * @param {string} tlId
909
+ * @param {*} [options] Override http request option.
910
+ * @throws {RequiredError}
911
+ */
912
+ etsiTl612Get(tlId: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<object, any>>;
869
913
  /**
870
914
  *
871
915
  * @param {*} [options] Override http request option.
@@ -936,6 +980,14 @@ export declare class DefaultApi extends BaseAPI {
936
980
  * @throws {RequiredError}
937
981
  */
938
982
  tlPatch(tlId: string, tlPayload?: TlPayload, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<Tl, any>>;
983
+ /**
984
+ * 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**
985
+ * @param {string} tlId
986
+ * @param {TlrCreatePayload} [tlrCreatePayload] Trust List Record Create Payload.
987
+ * @param {*} [options] Override http request option.
988
+ * @throws {RequiredError}
989
+ */
990
+ tlrCreate(tlId: string, tlrCreatePayload?: TlrCreatePayload, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<TlrCreatedResult, any>>;
939
991
  /**
940
992
  * Removes a specific Trust List Record
941
993
  * @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
@@ -232,15 +197,47 @@ const DefaultApiAxiosParamCreator = function (configuration) {
232
197
  };
233
198
  }),
234
199
  /**
235
- * Returns an ETSI Trusted list
200
+ * Returns an ETSI 119 602 Trusted list
236
201
  * @param {string} tlId
237
202
  * @param {*} [options] Override http request option.
238
203
  * @throws {RequiredError}
239
204
  */
240
- etsiTlGet: (tlId_1, ...args_1) => __awaiter(this, [tlId_1, ...args_1], void 0, function* (tlId, options = {}) {
205
+ etsiTl602Get: (tlId_1, ...args_1) => __awaiter(this, [tlId_1, ...args_1], void 0, function* (tlId, options = {}) {
241
206
  // verify required parameter 'tlId' is not null or undefined
242
- (0, common_1.assertParamExists)('etsiTlGet', 'tlId', tlId);
243
- const localVarPath = `/{tl_id}/etsi/tsl.xml`
207
+ (0, common_1.assertParamExists)('etsiTl602Get', 'tlId', tlId);
208
+ const localVarPath = `/{tl_id}/etsi/119_602_tl.xml`
209
+ .replace(`{${"tl_id"}}`, encodeURIComponent(String(tlId)));
210
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
211
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
212
+ let baseOptions;
213
+ if (configuration) {
214
+ baseOptions = configuration.baseOptions;
215
+ }
216
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
217
+ const localVarHeaderParameter = {};
218
+ const localVarQueryParameter = {};
219
+ // authentication accessToken required
220
+ // http bearer authentication required
221
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
222
+ localVarHeaderParameter['Accept'] = 'application/xml,application/json';
223
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
224
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
225
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
226
+ return {
227
+ url: (0, common_1.toPathString)(localVarUrlObj),
228
+ options: localVarRequestOptions,
229
+ };
230
+ }),
231
+ /**
232
+ * Returns an ETSI 119 612 Trusted list
233
+ * @param {string} tlId
234
+ * @param {*} [options] Override http request option.
235
+ * @throws {RequiredError}
236
+ */
237
+ etsiTl612Get: (tlId_1, ...args_1) => __awaiter(this, [tlId_1, ...args_1], void 0, function* (tlId, options = {}) {
238
+ // verify required parameter 'tlId' is not null or undefined
239
+ (0, common_1.assertParamExists)('etsiTl612Get', 'tlId', tlId);
240
+ const localVarPath = `/{tl_id}/etsi/119_612_tl.xml`
244
241
  .replace(`{${"tl_id"}}`, encodeURIComponent(String(tlId)));
245
242
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
246
243
  const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
@@ -565,6 +562,41 @@ const DefaultApiAxiosParamCreator = function (configuration) {
565
562
  options: localVarRequestOptions,
566
563
  };
567
564
  }),
565
+ /**
566
+ * 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**
567
+ * @param {string} tlId
568
+ * @param {TlrCreatePayload} [tlrCreatePayload] Trust List Record Create Payload.
569
+ * @param {*} [options] Override http request option.
570
+ * @throws {RequiredError}
571
+ */
572
+ tlrCreate: (tlId_1, tlrCreatePayload_1, ...args_1) => __awaiter(this, [tlId_1, tlrCreatePayload_1, ...args_1], void 0, function* (tlId, tlrCreatePayload, options = {}) {
573
+ // verify required parameter 'tlId' is not null or undefined
574
+ (0, common_1.assertParamExists)('tlrCreate', 'tlId', tlId);
575
+ const localVarPath = `/{tl_id}/tlrs`
576
+ .replace(`{${"tl_id"}}`, encodeURIComponent(String(tlId)));
577
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
578
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
579
+ let baseOptions;
580
+ if (configuration) {
581
+ baseOptions = configuration.baseOptions;
582
+ }
583
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
584
+ const localVarHeaderParameter = {};
585
+ const localVarQueryParameter = {};
586
+ // authentication accessToken required
587
+ // http bearer authentication required
588
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
589
+ localVarHeaderParameter['Content-Type'] = 'application/json';
590
+ localVarHeaderParameter['Accept'] = 'application/json';
591
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
592
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
593
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
594
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(tlrCreatePayload, localVarRequestOptions, configuration);
595
+ return {
596
+ url: (0, common_1.toPathString)(localVarUrlObj),
597
+ options: localVarRequestOptions,
598
+ };
599
+ }),
568
600
  /**
569
601
  * Removes a specific Trust List Record
570
602
  * @param {string} tlId Trust List Identifier
@@ -777,22 +809,6 @@ exports.DefaultApiAxiosParamCreator = DefaultApiAxiosParamCreator;
777
809
  const DefaultApiFp = function (configuration) {
778
810
  const localVarAxiosParamCreator = (0, exports.DefaultApiAxiosParamCreator)(configuration);
779
811
  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
812
  /**
797
813
  * Retrieves a specific DID Document
798
814
  * @param {string} tlId Trust List Identifier
@@ -859,17 +875,32 @@ const DefaultApiFp = function (configuration) {
859
875
  });
860
876
  },
861
877
  /**
862
- * Returns an ETSI Trusted list
878
+ * Returns an ETSI 119 602 Trusted list
863
879
  * @param {string} tlId
864
880
  * @param {*} [options] Override http request option.
865
881
  * @throws {RequiredError}
866
882
  */
867
- etsiTlGet(tlId, options) {
883
+ etsiTl602Get(tlId, options) {
868
884
  return __awaiter(this, void 0, void 0, function* () {
869
885
  var _a, _b, _c;
870
- const localVarAxiosArgs = yield localVarAxiosParamCreator.etsiTlGet(tlId, options);
886
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.etsiTl602Get(tlId, options);
871
887
  const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
872
- const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['DefaultApi.etsiTlGet']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
888
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['DefaultApi.etsiTl602Get']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
889
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
890
+ });
891
+ },
892
+ /**
893
+ * Returns an ETSI 119 612 Trusted list
894
+ * @param {string} tlId
895
+ * @param {*} [options] Override http request option.
896
+ * @throws {RequiredError}
897
+ */
898
+ etsiTl612Get(tlId, options) {
899
+ return __awaiter(this, void 0, void 0, function* () {
900
+ var _a, _b, _c;
901
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.etsiTl612Get(tlId, options);
902
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
903
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['DefaultApi.etsiTl612Get']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
873
904
  return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
874
905
  });
875
906
  },
@@ -1023,6 +1054,22 @@ const DefaultApiFp = function (configuration) {
1023
1054
  return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1024
1055
  });
1025
1056
  },
1057
+ /**
1058
+ * 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**
1059
+ * @param {string} tlId
1060
+ * @param {TlrCreatePayload} [tlrCreatePayload] Trust List Record Create Payload.
1061
+ * @param {*} [options] Override http request option.
1062
+ * @throws {RequiredError}
1063
+ */
1064
+ tlrCreate(tlId, tlrCreatePayload, options) {
1065
+ return __awaiter(this, void 0, void 0, function* () {
1066
+ var _a, _b, _c;
1067
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.tlrCreate(tlId, tlrCreatePayload, options);
1068
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1069
+ 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;
1070
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1071
+ });
1072
+ },
1026
1073
  /**
1027
1074
  * Removes a specific Trust List Record
1028
1075
  * @param {string} tlId Trust List Identifier
@@ -1127,16 +1174,6 @@ exports.DefaultApiFp = DefaultApiFp;
1127
1174
  const DefaultApiFactory = function (configuration, basePath, axios) {
1128
1175
  const localVarFp = (0, exports.DefaultApiFp)(configuration);
1129
1176
  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
1177
  /**
1141
1178
  * Retrieves a specific DID Document
1142
1179
  * @param {string} tlId Trust List Identifier
@@ -1179,13 +1216,22 @@ const DefaultApiFactory = function (configuration, basePath, axios) {
1179
1216
  return localVarFp.didVerificationMethodPatch(tlId, tlrId, verificationMethodPatchPayload, options).then((request) => request(axios, basePath));
1180
1217
  },
1181
1218
  /**
1182
- * Returns an ETSI Trusted list
1219
+ * Returns an ETSI 119 602 Trusted list
1220
+ * @param {string} tlId
1221
+ * @param {*} [options] Override http request option.
1222
+ * @throws {RequiredError}
1223
+ */
1224
+ etsiTl602Get(tlId, options) {
1225
+ return localVarFp.etsiTl602Get(tlId, options).then((request) => request(axios, basePath));
1226
+ },
1227
+ /**
1228
+ * Returns an ETSI 119 612 Trusted list
1183
1229
  * @param {string} tlId
1184
1230
  * @param {*} [options] Override http request option.
1185
1231
  * @throws {RequiredError}
1186
1232
  */
1187
- etsiTlGet(tlId, options) {
1188
- return localVarFp.etsiTlGet(tlId, options).then((request) => request(axios, basePath));
1233
+ etsiTl612Get(tlId, options) {
1234
+ return localVarFp.etsiTl612Get(tlId, options).then((request) => request(axios, basePath));
1189
1235
  },
1190
1236
  /**
1191
1237
  *
@@ -1277,6 +1323,16 @@ const DefaultApiFactory = function (configuration, basePath, axios) {
1277
1323
  tlPatch(tlId, tlPayload, options) {
1278
1324
  return localVarFp.tlPatch(tlId, tlPayload, options).then((request) => request(axios, basePath));
1279
1325
  },
1326
+ /**
1327
+ * 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**
1328
+ * @param {string} tlId
1329
+ * @param {TlrCreatePayload} [tlrCreatePayload] Trust List Record Create Payload.
1330
+ * @param {*} [options] Override http request option.
1331
+ * @throws {RequiredError}
1332
+ */
1333
+ tlrCreate(tlId, tlrCreatePayload, options) {
1334
+ return localVarFp.tlrCreate(tlId, tlrCreatePayload, options).then((request) => request(axios, basePath));
1335
+ },
1280
1336
  /**
1281
1337
  * Removes a specific Trust List Record
1282
1338
  * @param {string} tlId Trust List Identifier
@@ -1343,16 +1399,6 @@ exports.DefaultApiFactory = DefaultApiFactory;
1343
1399
  * DefaultApi - object-oriented interface
1344
1400
  */
1345
1401
  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
1402
  /**
1357
1403
  * Retrieves a specific DID Document
1358
1404
  * @param {string} tlId Trust List Identifier
@@ -1395,13 +1441,22 @@ class DefaultApi extends base_1.BaseAPI {
1395
1441
  return (0, exports.DefaultApiFp)(this.configuration).didVerificationMethodPatch(tlId, tlrId, verificationMethodPatchPayload, options).then((request) => request(this.axios, this.basePath));
1396
1442
  }
1397
1443
  /**
1398
- * Returns an ETSI Trusted list
1444
+ * Returns an ETSI 119 602 Trusted list
1399
1445
  * @param {string} tlId
1400
1446
  * @param {*} [options] Override http request option.
1401
1447
  * @throws {RequiredError}
1402
1448
  */
1403
- etsiTlGet(tlId, options) {
1404
- return (0, exports.DefaultApiFp)(this.configuration).etsiTlGet(tlId, options).then((request) => request(this.axios, this.basePath));
1449
+ etsiTl602Get(tlId, options) {
1450
+ return (0, exports.DefaultApiFp)(this.configuration).etsiTl602Get(tlId, options).then((request) => request(this.axios, this.basePath));
1451
+ }
1452
+ /**
1453
+ * Returns an ETSI 119 612 Trusted list
1454
+ * @param {string} tlId
1455
+ * @param {*} [options] Override http request option.
1456
+ * @throws {RequiredError}
1457
+ */
1458
+ etsiTl612Get(tlId, options) {
1459
+ return (0, exports.DefaultApiFp)(this.configuration).etsiTl612Get(tlId, options).then((request) => request(this.axios, this.basePath));
1405
1460
  }
1406
1461
  /**
1407
1462
  *
@@ -1493,6 +1548,16 @@ class DefaultApi extends base_1.BaseAPI {
1493
1548
  tlPatch(tlId, tlPayload, options) {
1494
1549
  return (0, exports.DefaultApiFp)(this.configuration).tlPatch(tlId, tlPayload, options).then((request) => request(this.axios, this.basePath));
1495
1550
  }
1551
+ /**
1552
+ * 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**
1553
+ * @param {string} tlId
1554
+ * @param {TlrCreatePayload} [tlrCreatePayload] Trust List Record Create Payload.
1555
+ * @param {*} [options] Override http request option.
1556
+ * @throws {RequiredError}
1557
+ */
1558
+ tlrCreate(tlId, tlrCreatePayload, options) {
1559
+ return (0, exports.DefaultApiFp)(this.configuration).tlrCreate(tlId, tlrCreatePayload, options).then((request) => request(this.axios, this.basePath));
1560
+ }
1496
1561
  /**
1497
1562
  * Removes a specific Trust List Record
1498
1563
  * @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: string, 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,28 @@ 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
+ // @ts-ignore
109
+ const replaceWithSerializableTypeIfNeeded = function (key, value) {
110
+ if (value instanceof Set) {
111
+ return Array.from(value);
112
+ }
113
+ else {
114
+ return value;
115
+ }
116
+ };
117
+ exports.replaceWithSerializableTypeIfNeeded = replaceWithSerializableTypeIfNeeded;
103
118
  const serializeDataIfNeeded = function (value, requestOptions, configuration) {
104
119
  const nonString = typeof value !== 'string';
105
120
  const needsSerialization = nonString && configuration && configuration.isJsonMime
106
121
  ? configuration.isJsonMime(requestOptions.headers['Content-Type'])
107
122
  : nonString;
108
123
  return needsSerialization
109
- ? JSON.stringify(value !== undefined ? value : {})
124
+ ? JSON.stringify(value !== undefined ? value : {}, exports.replaceWithSerializableTypeIfNeeded)
110
125
  : (value || "");
111
126
  };
112
127
  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.57",
5
5
  "description": "",
6
6
  "main": "index.js",
7
7
  "scripts": {