@idunion/tl-sdk 0.0.18 → 0.0.19

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 (3) hide show
  1. package/api.d.ts +136 -132
  2. package/api.js +117 -110
  3. package/package.json +1 -1
package/api.d.ts CHANGED
@@ -448,81 +448,6 @@ export interface DidDocumentList {
448
448
  */
449
449
  'items'?: Array<string>;
450
450
  }
451
- /**
452
- *
453
- * @export
454
- * @interface DidOnboardingPayload
455
- */
456
- export interface DidOnboardingPayload {
457
- /**
458
- * The Verifier ID that should be used to verify the onboarding credential.
459
- * @type {string}
460
- * @memberof DidOnboardingPayload
461
- */
462
- 'verifierId'?: string;
463
- }
464
- /**
465
- *
466
- * @export
467
- * @interface DidOnboardingResponse
468
- */
469
- export interface DidOnboardingResponse {
470
- /**
471
- * Url of verifier authorization server that contains the requested verifier scope.
472
- * @type {string}
473
- * @memberof DidOnboardingResponse
474
- */
475
- 'verifierUrl': string;
476
- /**
477
- * A code that can be used to match the verified credential for later use.
478
- * @type {string}
479
- * @memberof DidOnboardingResponse
480
- */
481
- 'verifierState': string;
482
- }
483
- /**
484
- *
485
- * @export
486
- * @interface DidOnboardingStatus
487
- */
488
- export interface DidOnboardingStatus {
489
- /**
490
- * When the status is completed the DID will be provided.
491
- * @type {string}
492
- * @memberof DidOnboardingStatus
493
- */
494
- 'did'?: string;
495
- /**
496
- * The status message providing additional info on specific status.
497
- * @type {string}
498
- * @memberof DidOnboardingStatus
499
- */
500
- 'message'?: string;
501
- /**
502
- * The onboarding process status
503
- * @type {string}
504
- * @memberof DidOnboardingStatus
505
- */
506
- 'status': DidOnboardingStatusStatusEnum;
507
- /**
508
- *
509
- * @type {Tl}
510
- * @memberof DidOnboardingStatus
511
- */
512
- 'tl'?: Tl;
513
- /**
514
- * After the onboarding is initiate this value will be provided
515
- * @type {string}
516
- * @memberof DidOnboardingStatus
517
- */
518
- 'verifierUrl'?: string;
519
- }
520
- export declare const DidOnboardingStatusStatusEnum: {
521
- readonly InProgress: "in_progress";
522
- readonly Completed: "completed";
523
- readonly Error: "error";
524
- };
525
- export type DidOnboardingStatusStatusEnum = typeof DidOnboardingStatusStatusEnum[keyof typeof DidOnboardingStatusStatusEnum];
526
451
  /**
527
452
  * A scheme providing enough information for a verifier to determine whether the evidence gathered by the issuer meets its confidence requirements for relying on the credential
528
453
  * @export
@@ -625,6 +550,81 @@ export interface ModelError {
625
550
  */
626
551
  'message': string;
627
552
  }
553
+ /**
554
+ *
555
+ * @export
556
+ * @interface OnboardingPayload
557
+ */
558
+ export interface OnboardingPayload {
559
+ /**
560
+ * The Verifier ID that should be used to verify the onboarding credential.
561
+ * @type {string}
562
+ * @memberof OnboardingPayload
563
+ */
564
+ 'verifierId'?: string;
565
+ }
566
+ /**
567
+ *
568
+ * @export
569
+ * @interface OnboardingResponse
570
+ */
571
+ export interface OnboardingResponse {
572
+ /**
573
+ * Url of verifier authorization server that contains the requested verifier scope.
574
+ * @type {string}
575
+ * @memberof OnboardingResponse
576
+ */
577
+ 'verifierUrl': string;
578
+ /**
579
+ * A code that can be used to match the verified credential for later use.
580
+ * @type {string}
581
+ * @memberof OnboardingResponse
582
+ */
583
+ 'verifierState': string;
584
+ }
585
+ /**
586
+ *
587
+ * @export
588
+ * @interface OnboardingStatus
589
+ */
590
+ export interface OnboardingStatus {
591
+ /**
592
+ * When the status is completed the DID will be provided.
593
+ * @type {string}
594
+ * @memberof OnboardingStatus
595
+ */
596
+ 'did'?: string;
597
+ /**
598
+ * The status message providing additional info on specific status.
599
+ * @type {string}
600
+ * @memberof OnboardingStatus
601
+ */
602
+ 'message'?: string;
603
+ /**
604
+ * The onboarding process status
605
+ * @type {string}
606
+ * @memberof OnboardingStatus
607
+ */
608
+ 'status': OnboardingStatusStatusEnum;
609
+ /**
610
+ *
611
+ * @type {Tl}
612
+ * @memberof OnboardingStatus
613
+ */
614
+ 'tl'?: Tl;
615
+ /**
616
+ * After the onboarding is initiate this value will be provided
617
+ * @type {string}
618
+ * @memberof OnboardingStatus
619
+ */
620
+ 'verifierUrl'?: string;
621
+ }
622
+ export declare const OnboardingStatusStatusEnum: {
623
+ readonly InProgress: "in_progress";
624
+ readonly Completed: "completed";
625
+ readonly Error: "error";
626
+ };
627
+ export type OnboardingStatusStatusEnum = typeof OnboardingStatusStatusEnum[keyof typeof OnboardingStatusStatusEnum];
628
628
  /**
629
629
  * One or more cryptographic proofs that can be used to detect tampering and verify the authorship of a verifiable credential or verifiable presentation https://www.w3.org/TR/vc-data-model-2.0/#securing-verifiable-credentials
630
630
  * @export
@@ -873,20 +873,6 @@ export declare const DefaultApiAxiosParamCreator: (configuration?: Configuration
873
873
  * @throws {RequiredError}
874
874
  */
875
875
  didGet: (tlId: string, tlrId: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
876
- /**
877
- * Initiates the onboarding process to the DID registry.
878
- * @param {DidOnboardingPayload} [didOnboardingPayload] DID onboarding init payload.
879
- * @param {*} [options] Override http request option.
880
- * @throws {RequiredError}
881
- */
882
- didOnboardingInit: (didOnboardingPayload?: DidOnboardingPayload, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
883
- /**
884
- *
885
- * @param {string} verifierState Verifier state
886
- * @param {*} [options] Override http request option.
887
- * @throws {RequiredError}
888
- */
889
- didOnboardingStatus: (verifierState: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
890
876
  /**
891
877
  * Adds DID Verification method.
892
878
  * @param {string} tlId Trust List Identifier
@@ -909,6 +895,21 @@ export declare const DefaultApiAxiosParamCreator: (configuration?: Configuration
909
895
  * @throws {RequiredError}
910
896
  */
911
897
  healthCheck: (options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
898
+ /**
899
+ * Initiates the onboarding process to the DID registry.
900
+ * @param {string} tlId Trust List identifier
901
+ * @param {OnboardingPayload} [onboardingPayload] DID onboarding init payload.
902
+ * @param {*} [options] Override http request option.
903
+ * @throws {RequiredError}
904
+ */
905
+ onboardingInit: (tlId: string, onboardingPayload?: OnboardingPayload, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
906
+ /**
907
+ *
908
+ * @param {string} verifierState Verifier state
909
+ * @param {*} [options] Override http request option.
910
+ * @throws {RequiredError}
911
+ */
912
+ onboardingStatus: (verifierState: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
912
913
  /**
913
914
  * Creates a Trust List based on the specified payload.
914
915
  * @param {TlPayload} [tlPayload] Trust List create payload.
@@ -969,20 +970,6 @@ export declare const DefaultApiFp: (configuration?: Configuration) => {
969
970
  * @throws {RequiredError}
970
971
  */
971
972
  didGet(tlId: string, tlrId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DidDocument>>;
972
- /**
973
- * Initiates the onboarding process to the DID registry.
974
- * @param {DidOnboardingPayload} [didOnboardingPayload] DID onboarding init payload.
975
- * @param {*} [options] Override http request option.
976
- * @throws {RequiredError}
977
- */
978
- didOnboardingInit(didOnboardingPayload?: DidOnboardingPayload, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DidOnboardingResponse>>;
979
- /**
980
- *
981
- * @param {string} verifierState Verifier state
982
- * @param {*} [options] Override http request option.
983
- * @throws {RequiredError}
984
- */
985
- didOnboardingStatus(verifierState: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DidOnboardingStatus>>;
986
973
  /**
987
974
  * Adds DID Verification method.
988
975
  * @param {string} tlId Trust List Identifier
@@ -1005,6 +992,21 @@ export declare const DefaultApiFp: (configuration?: Configuration) => {
1005
992
  * @throws {RequiredError}
1006
993
  */
1007
994
  healthCheck(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<HealthStatus>>;
995
+ /**
996
+ * Initiates the onboarding process to the DID registry.
997
+ * @param {string} tlId Trust List identifier
998
+ * @param {OnboardingPayload} [onboardingPayload] DID onboarding init payload.
999
+ * @param {*} [options] Override http request option.
1000
+ * @throws {RequiredError}
1001
+ */
1002
+ onboardingInit(tlId: string, onboardingPayload?: OnboardingPayload, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<OnboardingResponse>>;
1003
+ /**
1004
+ *
1005
+ * @param {string} verifierState Verifier state
1006
+ * @param {*} [options] Override http request option.
1007
+ * @throws {RequiredError}
1008
+ */
1009
+ onboardingStatus(verifierState: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<OnboardingStatus>>;
1008
1010
  /**
1009
1011
  * Creates a Trust List based on the specified payload.
1010
1012
  * @param {TlPayload} [tlPayload] Trust List create payload.
@@ -1065,20 +1067,6 @@ export declare const DefaultApiFactory: (configuration?: Configuration, basePath
1065
1067
  * @throws {RequiredError}
1066
1068
  */
1067
1069
  didGet(tlId: string, tlrId: string, options?: RawAxiosRequestConfig): AxiosPromise<DidDocument>;
1068
- /**
1069
- * Initiates the onboarding process to the DID registry.
1070
- * @param {DidOnboardingPayload} [didOnboardingPayload] DID onboarding init payload.
1071
- * @param {*} [options] Override http request option.
1072
- * @throws {RequiredError}
1073
- */
1074
- didOnboardingInit(didOnboardingPayload?: DidOnboardingPayload, options?: RawAxiosRequestConfig): AxiosPromise<DidOnboardingResponse>;
1075
- /**
1076
- *
1077
- * @param {string} verifierState Verifier state
1078
- * @param {*} [options] Override http request option.
1079
- * @throws {RequiredError}
1080
- */
1081
- didOnboardingStatus(verifierState: string, options?: RawAxiosRequestConfig): AxiosPromise<DidOnboardingStatus>;
1082
1070
  /**
1083
1071
  * Adds DID Verification method.
1084
1072
  * @param {string} tlId Trust List Identifier
@@ -1101,6 +1089,21 @@ export declare const DefaultApiFactory: (configuration?: Configuration, basePath
1101
1089
  * @throws {RequiredError}
1102
1090
  */
1103
1091
  healthCheck(options?: RawAxiosRequestConfig): AxiosPromise<HealthStatus>;
1092
+ /**
1093
+ * Initiates the onboarding process to the DID registry.
1094
+ * @param {string} tlId Trust List identifier
1095
+ * @param {OnboardingPayload} [onboardingPayload] DID onboarding init payload.
1096
+ * @param {*} [options] Override http request option.
1097
+ * @throws {RequiredError}
1098
+ */
1099
+ onboardingInit(tlId: string, onboardingPayload?: OnboardingPayload, options?: RawAxiosRequestConfig): AxiosPromise<OnboardingResponse>;
1100
+ /**
1101
+ *
1102
+ * @param {string} verifierState Verifier state
1103
+ * @param {*} [options] Override http request option.
1104
+ * @throws {RequiredError}
1105
+ */
1106
+ onboardingStatus(verifierState: string, options?: RawAxiosRequestConfig): AxiosPromise<OnboardingStatus>;
1104
1107
  /**
1105
1108
  * Creates a Trust List based on the specified payload.
1106
1109
  * @param {TlPayload} [tlPayload] Trust List create payload.
@@ -1166,46 +1169,47 @@ export declare class DefaultApi extends BaseAPI {
1166
1169
  */
1167
1170
  didGet(tlId: string, tlrId: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<DidDocument, any>>;
1168
1171
  /**
1169
- * Initiates the onboarding process to the DID registry.
1170
- * @param {DidOnboardingPayload} [didOnboardingPayload] DID onboarding init payload.
1172
+ * Adds DID Verification method.
1173
+ * @param {string} tlId Trust List Identifier
1174
+ * @param {string} did DID
1175
+ * @param {VerificationMethod} [verificationMethod] Verification method.
1171
1176
  * @param {*} [options] Override http request option.
1172
1177
  * @throws {RequiredError}
1173
1178
  * @memberof DefaultApi
1174
1179
  */
1175
- didOnboardingInit(didOnboardingPayload?: DidOnboardingPayload, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<DidOnboardingResponse, any>>;
1180
+ didVerificationMethodAdd(tlId: string, did: string, verificationMethod?: VerificationMethod, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any>>;
1176
1181
  /**
1177
- *
1178
- * @param {string} verifierState Verifier state
1182
+ * Retrieves a list of DID Documents.
1183
+ * @param {string} tlId
1179
1184
  * @param {*} [options] Override http request option.
1180
1185
  * @throws {RequiredError}
1181
1186
  * @memberof DefaultApi
1182
1187
  */
1183
- didOnboardingStatus(verifierState: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<DidOnboardingStatus, any>>;
1188
+ didsGet(tlId: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<DidDocumentList, any>>;
1184
1189
  /**
1185
- * Adds DID Verification method.
1186
- * @param {string} tlId Trust List Identifier
1187
- * @param {string} did DID
1188
- * @param {VerificationMethod} [verificationMethod] Verification method.
1190
+ *
1189
1191
  * @param {*} [options] Override http request option.
1190
1192
  * @throws {RequiredError}
1191
1193
  * @memberof DefaultApi
1192
1194
  */
1193
- didVerificationMethodAdd(tlId: string, did: string, verificationMethod?: VerificationMethod, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any>>;
1195
+ healthCheck(options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<HealthStatus, any>>;
1194
1196
  /**
1195
- * Retrieves a list of DID Documents.
1196
- * @param {string} tlId
1197
+ * Initiates the onboarding process to the DID registry.
1198
+ * @param {string} tlId Trust List identifier
1199
+ * @param {OnboardingPayload} [onboardingPayload] DID onboarding init payload.
1197
1200
  * @param {*} [options] Override http request option.
1198
1201
  * @throws {RequiredError}
1199
1202
  * @memberof DefaultApi
1200
1203
  */
1201
- didsGet(tlId: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<DidDocumentList, any>>;
1204
+ onboardingInit(tlId: string, onboardingPayload?: OnboardingPayload, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<OnboardingResponse, any>>;
1202
1205
  /**
1203
1206
  *
1207
+ * @param {string} verifierState Verifier state
1204
1208
  * @param {*} [options] Override http request option.
1205
1209
  * @throws {RequiredError}
1206
1210
  * @memberof DefaultApi
1207
1211
  */
1208
- healthCheck(options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<HealthStatus, any>>;
1212
+ onboardingStatus(verifierState: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<OnboardingStatus, any>>;
1209
1213
  /**
1210
1214
  * Creates a Trust List based on the specified payload.
1211
1215
  * @param {TlPayload} [tlPayload] Trust List create payload.
package/api.js CHANGED
@@ -25,7 +25,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
25
25
  return (mod && mod.__esModule) ? mod : { "default": mod };
26
26
  };
27
27
  Object.defineProperty(exports, "__esModule", { value: true });
28
- exports.DefaultApi = exports.DefaultApiFactory = exports.DefaultApiFp = exports.DefaultApiAxiosParamCreator = exports.HealthStatusStatusEnum = exports.DidOnboardingStatusStatusEnum = exports.CredentialMetadataStatusEnum = exports.CredentialMetadataInteractionEnum = void 0;
28
+ exports.DefaultApi = exports.DefaultApiFactory = exports.DefaultApiFp = exports.DefaultApiAxiosParamCreator = exports.OnboardingStatusStatusEnum = exports.HealthStatusStatusEnum = exports.CredentialMetadataStatusEnum = exports.CredentialMetadataInteractionEnum = void 0;
29
29
  const axios_1 = __importDefault(require("axios"));
30
30
  // Some imports not used depending on template conditions
31
31
  // @ts-ignore
@@ -43,16 +43,16 @@ exports.CredentialMetadataStatusEnum = {
43
43
  Valid: 'valid',
44
44
  Invalid: 'invalid'
45
45
  };
46
- exports.DidOnboardingStatusStatusEnum = {
47
- InProgress: 'in_progress',
48
- Completed: 'completed',
49
- Error: 'error'
50
- };
51
46
  exports.HealthStatusStatusEnum = {
52
47
  Ok: 'ok',
53
48
  Limited: 'limited',
54
49
  Critical: 'critical'
55
50
  };
51
+ exports.OnboardingStatusStatusEnum = {
52
+ InProgress: 'in_progress',
53
+ Completed: 'completed',
54
+ Error: 'error'
55
+ };
56
56
  /**
57
57
  * DefaultApi - axios parameter creator
58
58
  * @export
@@ -126,13 +126,21 @@ const DefaultApiAxiosParamCreator = function (configuration) {
126
126
  };
127
127
  }),
128
128
  /**
129
- * Initiates the onboarding process to the DID registry.
130
- * @param {DidOnboardingPayload} [didOnboardingPayload] DID onboarding init payload.
129
+ * Adds DID Verification method.
130
+ * @param {string} tlId Trust List Identifier
131
+ * @param {string} did DID
132
+ * @param {VerificationMethod} [verificationMethod] Verification method.
131
133
  * @param {*} [options] Override http request option.
132
134
  * @throws {RequiredError}
133
135
  */
134
- didOnboardingInit: (didOnboardingPayload_1, ...args_1) => __awaiter(this, [didOnboardingPayload_1, ...args_1], void 0, function* (didOnboardingPayload, options = {}) {
135
- const localVarPath = `/onboarding`;
136
+ didVerificationMethodAdd: (tlId_1, did_1, verificationMethod_1, ...args_1) => __awaiter(this, [tlId_1, did_1, verificationMethod_1, ...args_1], void 0, function* (tlId, did, verificationMethod, options = {}) {
137
+ // verify required parameter 'tlId' is not null or undefined
138
+ (0, common_1.assertParamExists)('didVerificationMethodAdd', 'tlId', tlId);
139
+ // verify required parameter 'did' is not null or undefined
140
+ (0, common_1.assertParamExists)('didVerificationMethodAdd', 'did', did);
141
+ const localVarPath = `/{tl_id}/dids/{did}/verificationMethod`
142
+ .replace(`{${"tl_id"}}`, encodeURIComponent(String(tlId)))
143
+ .replace(`{${"did"}}`, encodeURIComponent(String(did)));
136
144
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
137
145
  const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
138
146
  let baseOptions;
@@ -142,27 +150,30 @@ const DefaultApiAxiosParamCreator = function (configuration) {
142
150
  const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
143
151
  const localVarHeaderParameter = {};
144
152
  const localVarQueryParameter = {};
153
+ // authentication accessToken required
154
+ // http bearer authentication required
155
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
145
156
  localVarHeaderParameter['Content-Type'] = 'application/json';
146
157
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
147
158
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
148
159
  localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
149
- localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(didOnboardingPayload, localVarRequestOptions, configuration);
160
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(verificationMethod, localVarRequestOptions, configuration);
150
161
  return {
151
162
  url: (0, common_1.toPathString)(localVarUrlObj),
152
163
  options: localVarRequestOptions,
153
164
  };
154
165
  }),
155
166
  /**
156
- *
157
- * @param {string} verifierState Verifier state
167
+ * Retrieves a list of DID Documents.
168
+ * @param {string} tlId
158
169
  * @param {*} [options] Override http request option.
159
170
  * @throws {RequiredError}
160
171
  */
161
- didOnboardingStatus: (verifierState_1, ...args_1) => __awaiter(this, [verifierState_1, ...args_1], void 0, function* (verifierState, options = {}) {
162
- // verify required parameter 'verifierState' is not null or undefined
163
- (0, common_1.assertParamExists)('didOnboardingStatus', 'verifierState', verifierState);
164
- const localVarPath = `/onboarding/{verifier_state}`
165
- .replace(`{${"verifier_state"}}`, encodeURIComponent(String(verifierState)));
172
+ didsGet: (tlId_1, ...args_1) => __awaiter(this, [tlId_1, ...args_1], void 0, function* (tlId, options = {}) {
173
+ // verify required parameter 'tlId' is not null or undefined
174
+ (0, common_1.assertParamExists)('didsGet', 'tlId', tlId);
175
+ const localVarPath = `/{tl_id}/dids`
176
+ .replace(`{${"tl_id"}}`, encodeURIComponent(String(tlId)));
166
177
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
167
178
  const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
168
179
  let baseOptions;
@@ -172,6 +183,9 @@ const DefaultApiAxiosParamCreator = function (configuration) {
172
183
  const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
173
184
  const localVarHeaderParameter = {};
174
185
  const localVarQueryParameter = {};
186
+ // authentication accessToken required
187
+ // http bearer authentication required
188
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
175
189
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
176
190
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
177
191
  localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
@@ -181,53 +195,40 @@ const DefaultApiAxiosParamCreator = function (configuration) {
181
195
  };
182
196
  }),
183
197
  /**
184
- * Adds DID Verification method.
185
- * @param {string} tlId Trust List Identifier
186
- * @param {string} did DID
187
- * @param {VerificationMethod} [verificationMethod] Verification method.
198
+ *
188
199
  * @param {*} [options] Override http request option.
189
200
  * @throws {RequiredError}
190
201
  */
191
- didVerificationMethodAdd: (tlId_1, did_1, verificationMethod_1, ...args_1) => __awaiter(this, [tlId_1, did_1, verificationMethod_1, ...args_1], void 0, function* (tlId, did, verificationMethod, options = {}) {
192
- // verify required parameter 'tlId' is not null or undefined
193
- (0, common_1.assertParamExists)('didVerificationMethodAdd', 'tlId', tlId);
194
- // verify required parameter 'did' is not null or undefined
195
- (0, common_1.assertParamExists)('didVerificationMethodAdd', 'did', did);
196
- const localVarPath = `/{tl_id}/dids/{did}/verificationMethod`
197
- .replace(`{${"tl_id"}}`, encodeURIComponent(String(tlId)))
198
- .replace(`{${"did"}}`, encodeURIComponent(String(did)));
202
+ healthCheck: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
203
+ const localVarPath = `/health`;
199
204
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
200
205
  const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
201
206
  let baseOptions;
202
207
  if (configuration) {
203
208
  baseOptions = configuration.baseOptions;
204
209
  }
205
- const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
210
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
206
211
  const localVarHeaderParameter = {};
207
212
  const localVarQueryParameter = {};
208
- // authentication accessToken required
209
- // http bearer authentication required
210
- yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
211
- localVarHeaderParameter['Content-Type'] = 'application/json';
212
213
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
213
214
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
214
215
  localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
215
- localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(verificationMethod, localVarRequestOptions, configuration);
216
216
  return {
217
217
  url: (0, common_1.toPathString)(localVarUrlObj),
218
218
  options: localVarRequestOptions,
219
219
  };
220
220
  }),
221
221
  /**
222
- * Retrieves a list of DID Documents.
223
- * @param {string} tlId
222
+ * Initiates the onboarding process to the DID registry.
223
+ * @param {string} tlId Trust List identifier
224
+ * @param {OnboardingPayload} [onboardingPayload] DID onboarding init payload.
224
225
  * @param {*} [options] Override http request option.
225
226
  * @throws {RequiredError}
226
227
  */
227
- didsGet: (tlId_1, ...args_1) => __awaiter(this, [tlId_1, ...args_1], void 0, function* (tlId, options = {}) {
228
+ onboardingInit: (tlId_1, onboardingPayload_1, ...args_1) => __awaiter(this, [tlId_1, onboardingPayload_1, ...args_1], void 0, function* (tlId, onboardingPayload, options = {}) {
228
229
  // verify required parameter 'tlId' is not null or undefined
229
- (0, common_1.assertParamExists)('didsGet', 'tlId', tlId);
230
- const localVarPath = `/{tl_id}/dids`
230
+ (0, common_1.assertParamExists)('onboardingInit', 'tlId', tlId);
231
+ const localVarPath = `/{tl_id}/onboarding`
231
232
  .replace(`{${"tl_id"}}`, encodeURIComponent(String(tlId)));
232
233
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
233
234
  const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
@@ -235,15 +236,14 @@ const DefaultApiAxiosParamCreator = function (configuration) {
235
236
  if (configuration) {
236
237
  baseOptions = configuration.baseOptions;
237
238
  }
238
- const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
239
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
239
240
  const localVarHeaderParameter = {};
240
241
  const localVarQueryParameter = {};
241
- // authentication accessToken required
242
- // http bearer authentication required
243
- yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
242
+ localVarHeaderParameter['Content-Type'] = 'application/json';
244
243
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
245
244
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
246
245
  localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
246
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(onboardingPayload, localVarRequestOptions, configuration);
247
247
  return {
248
248
  url: (0, common_1.toPathString)(localVarUrlObj),
249
249
  options: localVarRequestOptions,
@@ -251,11 +251,15 @@ const DefaultApiAxiosParamCreator = function (configuration) {
251
251
  }),
252
252
  /**
253
253
  *
254
+ * @param {string} verifierState Verifier state
254
255
  * @param {*} [options] Override http request option.
255
256
  * @throws {RequiredError}
256
257
  */
257
- healthCheck: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
258
- const localVarPath = `/health`;
258
+ onboardingStatus: (verifierState_1, ...args_1) => __awaiter(this, [verifierState_1, ...args_1], void 0, function* (verifierState, options = {}) {
259
+ // verify required parameter 'verifierState' is not null or undefined
260
+ (0, common_1.assertParamExists)('onboardingStatus', 'verifierState', verifierState);
261
+ const localVarPath = `/onboarding/{verifier_state}`
262
+ .replace(`{${"verifier_state"}}`, encodeURIComponent(String(verifierState)));
259
263
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
260
264
  const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
261
265
  let baseOptions;
@@ -481,78 +485,79 @@ const DefaultApiFp = function (configuration) {
481
485
  });
482
486
  },
483
487
  /**
484
- * Initiates the onboarding process to the DID registry.
485
- * @param {DidOnboardingPayload} [didOnboardingPayload] DID onboarding init payload.
488
+ * Adds DID Verification method.
489
+ * @param {string} tlId Trust List Identifier
490
+ * @param {string} did DID
491
+ * @param {VerificationMethod} [verificationMethod] Verification method.
486
492
  * @param {*} [options] Override http request option.
487
493
  * @throws {RequiredError}
488
494
  */
489
- didOnboardingInit(didOnboardingPayload, options) {
495
+ didVerificationMethodAdd(tlId, did, verificationMethod, options) {
490
496
  return __awaiter(this, void 0, void 0, function* () {
491
497
  var _a, _b, _c;
492
- const localVarAxiosArgs = yield localVarAxiosParamCreator.didOnboardingInit(didOnboardingPayload, options);
498
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.didVerificationMethodAdd(tlId, did, verificationMethod, options);
493
499
  const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
494
- const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['DefaultApi.didOnboardingInit']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
500
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['DefaultApi.didVerificationMethodAdd']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
495
501
  return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
496
502
  });
497
503
  },
498
504
  /**
499
- *
500
- * @param {string} verifierState Verifier state
505
+ * Retrieves a list of DID Documents.
506
+ * @param {string} tlId
501
507
  * @param {*} [options] Override http request option.
502
508
  * @throws {RequiredError}
503
509
  */
504
- didOnboardingStatus(verifierState, options) {
510
+ didsGet(tlId, options) {
505
511
  return __awaiter(this, void 0, void 0, function* () {
506
512
  var _a, _b, _c;
507
- const localVarAxiosArgs = yield localVarAxiosParamCreator.didOnboardingStatus(verifierState, options);
513
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.didsGet(tlId, options);
508
514
  const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
509
- const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['DefaultApi.didOnboardingStatus']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
515
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['DefaultApi.didsGet']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
510
516
  return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
511
517
  });
512
518
  },
513
519
  /**
514
- * Adds DID Verification method.
515
- * @param {string} tlId Trust List Identifier
516
- * @param {string} did DID
517
- * @param {VerificationMethod} [verificationMethod] Verification method.
520
+ *
518
521
  * @param {*} [options] Override http request option.
519
522
  * @throws {RequiredError}
520
523
  */
521
- didVerificationMethodAdd(tlId, did, verificationMethod, options) {
524
+ healthCheck(options) {
522
525
  return __awaiter(this, void 0, void 0, function* () {
523
526
  var _a, _b, _c;
524
- const localVarAxiosArgs = yield localVarAxiosParamCreator.didVerificationMethodAdd(tlId, did, verificationMethod, options);
527
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.healthCheck(options);
525
528
  const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
526
- const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['DefaultApi.didVerificationMethodAdd']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
529
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['DefaultApi.healthCheck']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
527
530
  return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
528
531
  });
529
532
  },
530
533
  /**
531
- * Retrieves a list of DID Documents.
532
- * @param {string} tlId
534
+ * Initiates the onboarding process to the DID registry.
535
+ * @param {string} tlId Trust List identifier
536
+ * @param {OnboardingPayload} [onboardingPayload] DID onboarding init payload.
533
537
  * @param {*} [options] Override http request option.
534
538
  * @throws {RequiredError}
535
539
  */
536
- didsGet(tlId, options) {
540
+ onboardingInit(tlId, onboardingPayload, options) {
537
541
  return __awaiter(this, void 0, void 0, function* () {
538
542
  var _a, _b, _c;
539
- const localVarAxiosArgs = yield localVarAxiosParamCreator.didsGet(tlId, options);
543
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.onboardingInit(tlId, onboardingPayload, options);
540
544
  const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
541
- const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['DefaultApi.didsGet']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
545
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['DefaultApi.onboardingInit']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
542
546
  return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
543
547
  });
544
548
  },
545
549
  /**
546
550
  *
551
+ * @param {string} verifierState Verifier state
547
552
  * @param {*} [options] Override http request option.
548
553
  * @throws {RequiredError}
549
554
  */
550
- healthCheck(options) {
555
+ onboardingStatus(verifierState, options) {
551
556
  return __awaiter(this, void 0, void 0, function* () {
552
557
  var _a, _b, _c;
553
- const localVarAxiosArgs = yield localVarAxiosParamCreator.healthCheck(options);
558
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.onboardingStatus(verifierState, options);
554
559
  const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
555
- const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['DefaultApi.healthCheck']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
560
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['DefaultApi.onboardingStatus']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
556
561
  return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
557
562
  });
558
563
  },
@@ -664,24 +669,6 @@ const DefaultApiFactory = function (configuration, basePath, axios) {
664
669
  didGet(tlId, tlrId, options) {
665
670
  return localVarFp.didGet(tlId, tlrId, options).then((request) => request(axios, basePath));
666
671
  },
667
- /**
668
- * Initiates the onboarding process to the DID registry.
669
- * @param {DidOnboardingPayload} [didOnboardingPayload] DID onboarding init payload.
670
- * @param {*} [options] Override http request option.
671
- * @throws {RequiredError}
672
- */
673
- didOnboardingInit(didOnboardingPayload, options) {
674
- return localVarFp.didOnboardingInit(didOnboardingPayload, options).then((request) => request(axios, basePath));
675
- },
676
- /**
677
- *
678
- * @param {string} verifierState Verifier state
679
- * @param {*} [options] Override http request option.
680
- * @throws {RequiredError}
681
- */
682
- didOnboardingStatus(verifierState, options) {
683
- return localVarFp.didOnboardingStatus(verifierState, options).then((request) => request(axios, basePath));
684
- },
685
672
  /**
686
673
  * Adds DID Verification method.
687
674
  * @param {string} tlId Trust List Identifier
@@ -710,6 +697,25 @@ const DefaultApiFactory = function (configuration, basePath, axios) {
710
697
  healthCheck(options) {
711
698
  return localVarFp.healthCheck(options).then((request) => request(axios, basePath));
712
699
  },
700
+ /**
701
+ * Initiates the onboarding process to the DID registry.
702
+ * @param {string} tlId Trust List identifier
703
+ * @param {OnboardingPayload} [onboardingPayload] DID onboarding init payload.
704
+ * @param {*} [options] Override http request option.
705
+ * @throws {RequiredError}
706
+ */
707
+ onboardingInit(tlId, onboardingPayload, options) {
708
+ return localVarFp.onboardingInit(tlId, onboardingPayload, options).then((request) => request(axios, basePath));
709
+ },
710
+ /**
711
+ *
712
+ * @param {string} verifierState Verifier state
713
+ * @param {*} [options] Override http request option.
714
+ * @throws {RequiredError}
715
+ */
716
+ onboardingStatus(verifierState, options) {
717
+ return localVarFp.onboardingStatus(verifierState, options).then((request) => request(axios, basePath));
718
+ },
713
719
  /**
714
720
  * Creates a Trust List based on the specified payload.
715
721
  * @param {TlPayload} [tlPayload] Trust List create payload.
@@ -790,26 +796,6 @@ class DefaultApi extends base_1.BaseAPI {
790
796
  didGet(tlId, tlrId, options) {
791
797
  return (0, exports.DefaultApiFp)(this.configuration).didGet(tlId, tlrId, options).then((request) => request(this.axios, this.basePath));
792
798
  }
793
- /**
794
- * Initiates the onboarding process to the DID registry.
795
- * @param {DidOnboardingPayload} [didOnboardingPayload] DID onboarding init payload.
796
- * @param {*} [options] Override http request option.
797
- * @throws {RequiredError}
798
- * @memberof DefaultApi
799
- */
800
- didOnboardingInit(didOnboardingPayload, options) {
801
- return (0, exports.DefaultApiFp)(this.configuration).didOnboardingInit(didOnboardingPayload, options).then((request) => request(this.axios, this.basePath));
802
- }
803
- /**
804
- *
805
- * @param {string} verifierState Verifier state
806
- * @param {*} [options] Override http request option.
807
- * @throws {RequiredError}
808
- * @memberof DefaultApi
809
- */
810
- didOnboardingStatus(verifierState, options) {
811
- return (0, exports.DefaultApiFp)(this.configuration).didOnboardingStatus(verifierState, options).then((request) => request(this.axios, this.basePath));
812
- }
813
799
  /**
814
800
  * Adds DID Verification method.
815
801
  * @param {string} tlId Trust List Identifier
@@ -841,6 +827,27 @@ class DefaultApi extends base_1.BaseAPI {
841
827
  healthCheck(options) {
842
828
  return (0, exports.DefaultApiFp)(this.configuration).healthCheck(options).then((request) => request(this.axios, this.basePath));
843
829
  }
830
+ /**
831
+ * Initiates the onboarding process to the DID registry.
832
+ * @param {string} tlId Trust List identifier
833
+ * @param {OnboardingPayload} [onboardingPayload] DID onboarding init payload.
834
+ * @param {*} [options] Override http request option.
835
+ * @throws {RequiredError}
836
+ * @memberof DefaultApi
837
+ */
838
+ onboardingInit(tlId, onboardingPayload, options) {
839
+ return (0, exports.DefaultApiFp)(this.configuration).onboardingInit(tlId, onboardingPayload, options).then((request) => request(this.axios, this.basePath));
840
+ }
841
+ /**
842
+ *
843
+ * @param {string} verifierState Verifier state
844
+ * @param {*} [options] Override http request option.
845
+ * @throws {RequiredError}
846
+ * @memberof DefaultApi
847
+ */
848
+ onboardingStatus(verifierState, options) {
849
+ return (0, exports.DefaultApiFp)(this.configuration).onboardingStatus(verifierState, options).then((request) => request(this.axios, this.basePath));
850
+ }
844
851
  /**
845
852
  * Creates a Trust List based on the specified payload.
846
853
  * @param {TlPayload} [tlPayload] Trust List create payload.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@idunion/tl-sdk",
3
3
  "private": false,
4
- "version": "0.0.18",
4
+ "version": "0.0.19",
5
5
  "description": "",
6
6
  "main": "index.js",
7
7
  "scripts": {