@idunion/tl-sdk 0.0.17 → 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 +135 -139
  2. package/api.js +111 -120
  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,22 +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 {string} tlId Trust List Identifier
879
- * @param {DidOnboardingPayload} [didOnboardingPayload] DID onboarding init payload.
880
- * @param {*} [options] Override http request option.
881
- * @throws {RequiredError}
882
- */
883
- didOnboardingInit: (tlId: string, didOnboardingPayload?: DidOnboardingPayload, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
884
- /**
885
- *
886
- * @param {string} tlId Trust List Identifier
887
- * @param {string} verifierState The verifier state provided by the onboarding endpoint
888
- * @param {*} [options] Override http request option.
889
- * @throws {RequiredError}
890
- */
891
- didOnboardingStatus: (tlId: string, verifierState: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
892
876
  /**
893
877
  * Adds DID Verification method.
894
878
  * @param {string} tlId Trust List Identifier
@@ -911,6 +895,21 @@ export declare const DefaultApiAxiosParamCreator: (configuration?: Configuration
911
895
  * @throws {RequiredError}
912
896
  */
913
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>;
914
913
  /**
915
914
  * Creates a Trust List based on the specified payload.
916
915
  * @param {TlPayload} [tlPayload] Trust List create payload.
@@ -971,22 +970,6 @@ export declare const DefaultApiFp: (configuration?: Configuration) => {
971
970
  * @throws {RequiredError}
972
971
  */
973
972
  didGet(tlId: string, tlrId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DidDocument>>;
974
- /**
975
- * Initiates the onboarding process to the DID registry.
976
- * @param {string} tlId Trust List Identifier
977
- * @param {DidOnboardingPayload} [didOnboardingPayload] DID onboarding init payload.
978
- * @param {*} [options] Override http request option.
979
- * @throws {RequiredError}
980
- */
981
- didOnboardingInit(tlId: string, didOnboardingPayload?: DidOnboardingPayload, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DidOnboardingResponse>>;
982
- /**
983
- *
984
- * @param {string} tlId Trust List Identifier
985
- * @param {string} verifierState The verifier state provided by the onboarding endpoint
986
- * @param {*} [options] Override http request option.
987
- * @throws {RequiredError}
988
- */
989
- didOnboardingStatus(tlId: string, verifierState: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DidOnboardingStatus>>;
990
973
  /**
991
974
  * Adds DID Verification method.
992
975
  * @param {string} tlId Trust List Identifier
@@ -1009,6 +992,21 @@ export declare const DefaultApiFp: (configuration?: Configuration) => {
1009
992
  * @throws {RequiredError}
1010
993
  */
1011
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>>;
1012
1010
  /**
1013
1011
  * Creates a Trust List based on the specified payload.
1014
1012
  * @param {TlPayload} [tlPayload] Trust List create payload.
@@ -1069,22 +1067,6 @@ export declare const DefaultApiFactory: (configuration?: Configuration, basePath
1069
1067
  * @throws {RequiredError}
1070
1068
  */
1071
1069
  didGet(tlId: string, tlrId: string, options?: RawAxiosRequestConfig): AxiosPromise<DidDocument>;
1072
- /**
1073
- * Initiates the onboarding process to the DID registry.
1074
- * @param {string} tlId Trust List Identifier
1075
- * @param {DidOnboardingPayload} [didOnboardingPayload] DID onboarding init payload.
1076
- * @param {*} [options] Override http request option.
1077
- * @throws {RequiredError}
1078
- */
1079
- didOnboardingInit(tlId: string, didOnboardingPayload?: DidOnboardingPayload, options?: RawAxiosRequestConfig): AxiosPromise<DidOnboardingResponse>;
1080
- /**
1081
- *
1082
- * @param {string} tlId Trust List Identifier
1083
- * @param {string} verifierState The verifier state provided by the onboarding endpoint
1084
- * @param {*} [options] Override http request option.
1085
- * @throws {RequiredError}
1086
- */
1087
- didOnboardingStatus(tlId: string, verifierState: string, options?: RawAxiosRequestConfig): AxiosPromise<DidOnboardingStatus>;
1088
1070
  /**
1089
1071
  * Adds DID Verification method.
1090
1072
  * @param {string} tlId Trust List Identifier
@@ -1107,6 +1089,21 @@ export declare const DefaultApiFactory: (configuration?: Configuration, basePath
1107
1089
  * @throws {RequiredError}
1108
1090
  */
1109
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>;
1110
1107
  /**
1111
1108
  * Creates a Trust List based on the specified payload.
1112
1109
  * @param {TlPayload} [tlPayload] Trust List create payload.
@@ -1172,48 +1169,47 @@ export declare class DefaultApi extends BaseAPI {
1172
1169
  */
1173
1170
  didGet(tlId: string, tlrId: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<DidDocument, any>>;
1174
1171
  /**
1175
- * Initiates the onboarding process to the DID registry.
1172
+ * Adds DID Verification method.
1176
1173
  * @param {string} tlId Trust List Identifier
1177
- * @param {DidOnboardingPayload} [didOnboardingPayload] DID onboarding init payload.
1174
+ * @param {string} did DID
1175
+ * @param {VerificationMethod} [verificationMethod] Verification method.
1178
1176
  * @param {*} [options] Override http request option.
1179
1177
  * @throws {RequiredError}
1180
1178
  * @memberof DefaultApi
1181
1179
  */
1182
- didOnboardingInit(tlId: string, 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>>;
1183
1181
  /**
1184
- *
1185
- * @param {string} tlId Trust List Identifier
1186
- * @param {string} verifierState The verifier state provided by the onboarding endpoint
1182
+ * Retrieves a list of DID Documents.
1183
+ * @param {string} tlId
1187
1184
  * @param {*} [options] Override http request option.
1188
1185
  * @throws {RequiredError}
1189
1186
  * @memberof DefaultApi
1190
1187
  */
1191
- didOnboardingStatus(tlId: string, verifierState: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<DidOnboardingStatus, any>>;
1188
+ didsGet(tlId: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<DidDocumentList, any>>;
1192
1189
  /**
1193
- * Adds DID Verification method.
1194
- * @param {string} tlId Trust List Identifier
1195
- * @param {string} did DID
1196
- * @param {VerificationMethod} [verificationMethod] Verification method.
1190
+ *
1197
1191
  * @param {*} [options] Override http request option.
1198
1192
  * @throws {RequiredError}
1199
1193
  * @memberof DefaultApi
1200
1194
  */
1201
- 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>>;
1202
1196
  /**
1203
- * Retrieves a list of DID Documents.
1204
- * @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.
1205
1200
  * @param {*} [options] Override http request option.
1206
1201
  * @throws {RequiredError}
1207
1202
  * @memberof DefaultApi
1208
1203
  */
1209
- 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>>;
1210
1205
  /**
1211
1206
  *
1207
+ * @param {string} verifierState Verifier state
1212
1208
  * @param {*} [options] Override http request option.
1213
1209
  * @throws {RequiredError}
1214
1210
  * @memberof DefaultApi
1215
1211
  */
1216
- healthCheck(options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<HealthStatus, any>>;
1212
+ onboardingStatus(verifierState: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<OnboardingStatus, any>>;
1217
1213
  /**
1218
1214
  * Creates a Trust List based on the specified payload.
1219
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,17 +126,21 @@ const DefaultApiAxiosParamCreator = function (configuration) {
126
126
  };
127
127
  }),
128
128
  /**
129
- * Initiates the onboarding process to the DID registry.
129
+ * Adds DID Verification method.
130
130
  * @param {string} tlId Trust List Identifier
131
- * @param {DidOnboardingPayload} [didOnboardingPayload] DID onboarding init payload.
131
+ * @param {string} did DID
132
+ * @param {VerificationMethod} [verificationMethod] Verification method.
132
133
  * @param {*} [options] Override http request option.
133
134
  * @throws {RequiredError}
134
135
  */
135
- didOnboardingInit: (tlId_1, didOnboardingPayload_1, ...args_1) => __awaiter(this, [tlId_1, didOnboardingPayload_1, ...args_1], void 0, function* (tlId, didOnboardingPayload, options = {}) {
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 = {}) {
136
137
  // verify required parameter 'tlId' is not null or undefined
137
- (0, common_1.assertParamExists)('didOnboardingInit', 'tlId', tlId);
138
- const localVarPath = `/{tl_id}/onboarding/did`
139
- .replace(`{${"tl_id"}}`, encodeURIComponent(String(tlId)));
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)));
140
144
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
141
145
  const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
142
146
  let baseOptions;
@@ -146,29 +150,29 @@ const DefaultApiAxiosParamCreator = function (configuration) {
146
150
  const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
147
151
  const localVarHeaderParameter = {};
148
152
  const localVarQueryParameter = {};
153
+ // authentication accessToken required
154
+ // http bearer authentication required
155
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
149
156
  localVarHeaderParameter['Content-Type'] = 'application/json';
150
157
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
151
158
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
152
159
  localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
153
- localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(didOnboardingPayload, localVarRequestOptions, configuration);
160
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(verificationMethod, localVarRequestOptions, configuration);
154
161
  return {
155
162
  url: (0, common_1.toPathString)(localVarUrlObj),
156
163
  options: localVarRequestOptions,
157
164
  };
158
165
  }),
159
166
  /**
160
- *
161
- * @param {string} tlId Trust List Identifier
162
- * @param {string} verifierState The verifier state provided by the onboarding endpoint
167
+ * Retrieves a list of DID Documents.
168
+ * @param {string} tlId
163
169
  * @param {*} [options] Override http request option.
164
170
  * @throws {RequiredError}
165
171
  */
166
- didOnboardingStatus: (tlId_1, verifierState_1, ...args_1) => __awaiter(this, [tlId_1, verifierState_1, ...args_1], void 0, function* (tlId, verifierState, options = {}) {
172
+ didsGet: (tlId_1, ...args_1) => __awaiter(this, [tlId_1, ...args_1], void 0, function* (tlId, options = {}) {
167
173
  // verify required parameter 'tlId' is not null or undefined
168
- (0, common_1.assertParamExists)('didOnboardingStatus', 'tlId', tlId);
169
- // verify required parameter 'verifierState' is not null or undefined
170
- (0, common_1.assertParamExists)('didOnboardingStatus', 'verifierState', verifierState);
171
- const localVarPath = `/{tl_id}/onboarding/did`
174
+ (0, common_1.assertParamExists)('didsGet', 'tlId', tlId);
175
+ const localVarPath = `/{tl_id}/dids`
172
176
  .replace(`{${"tl_id"}}`, encodeURIComponent(String(tlId)));
173
177
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
174
178
  const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
@@ -179,9 +183,9 @@ const DefaultApiAxiosParamCreator = function (configuration) {
179
183
  const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
180
184
  const localVarHeaderParameter = {};
181
185
  const localVarQueryParameter = {};
182
- if (verifierState !== undefined) {
183
- localVarQueryParameter['verifier_state'] = verifierState;
184
- }
186
+ // authentication accessToken required
187
+ // http bearer authentication required
188
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
185
189
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
186
190
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
187
191
  localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
@@ -191,53 +195,40 @@ const DefaultApiAxiosParamCreator = function (configuration) {
191
195
  };
192
196
  }),
193
197
  /**
194
- * Adds DID Verification method.
195
- * @param {string} tlId Trust List Identifier
196
- * @param {string} did DID
197
- * @param {VerificationMethod} [verificationMethod] Verification method.
198
+ *
198
199
  * @param {*} [options] Override http request option.
199
200
  * @throws {RequiredError}
200
201
  */
201
- 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 = {}) {
202
- // verify required parameter 'tlId' is not null or undefined
203
- (0, common_1.assertParamExists)('didVerificationMethodAdd', 'tlId', tlId);
204
- // verify required parameter 'did' is not null or undefined
205
- (0, common_1.assertParamExists)('didVerificationMethodAdd', 'did', did);
206
- const localVarPath = `/{tl_id}/dids/{did}/verificationMethod`
207
- .replace(`{${"tl_id"}}`, encodeURIComponent(String(tlId)))
208
- .replace(`{${"did"}}`, encodeURIComponent(String(did)));
202
+ healthCheck: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
203
+ const localVarPath = `/health`;
209
204
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
210
205
  const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
211
206
  let baseOptions;
212
207
  if (configuration) {
213
208
  baseOptions = configuration.baseOptions;
214
209
  }
215
- const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
210
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
216
211
  const localVarHeaderParameter = {};
217
212
  const localVarQueryParameter = {};
218
- // authentication accessToken required
219
- // http bearer authentication required
220
- yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
221
- localVarHeaderParameter['Content-Type'] = 'application/json';
222
213
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
223
214
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
224
215
  localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
225
- localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(verificationMethod, localVarRequestOptions, configuration);
226
216
  return {
227
217
  url: (0, common_1.toPathString)(localVarUrlObj),
228
218
  options: localVarRequestOptions,
229
219
  };
230
220
  }),
231
221
  /**
232
- * Retrieves a list of DID Documents.
233
- * @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.
234
225
  * @param {*} [options] Override http request option.
235
226
  * @throws {RequiredError}
236
227
  */
237
- 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 = {}) {
238
229
  // verify required parameter 'tlId' is not null or undefined
239
- (0, common_1.assertParamExists)('didsGet', 'tlId', tlId);
240
- const localVarPath = `/{tl_id}/dids`
230
+ (0, common_1.assertParamExists)('onboardingInit', 'tlId', tlId);
231
+ const localVarPath = `/{tl_id}/onboarding`
241
232
  .replace(`{${"tl_id"}}`, encodeURIComponent(String(tlId)));
242
233
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
243
234
  const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
@@ -245,15 +236,14 @@ const DefaultApiAxiosParamCreator = function (configuration) {
245
236
  if (configuration) {
246
237
  baseOptions = configuration.baseOptions;
247
238
  }
248
- const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
239
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
249
240
  const localVarHeaderParameter = {};
250
241
  const localVarQueryParameter = {};
251
- // authentication accessToken required
252
- // http bearer authentication required
253
- yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
242
+ localVarHeaderParameter['Content-Type'] = 'application/json';
254
243
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
255
244
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
256
245
  localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
246
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(onboardingPayload, localVarRequestOptions, configuration);
257
247
  return {
258
248
  url: (0, common_1.toPathString)(localVarUrlObj),
259
249
  options: localVarRequestOptions,
@@ -261,11 +251,15 @@ const DefaultApiAxiosParamCreator = function (configuration) {
261
251
  }),
262
252
  /**
263
253
  *
254
+ * @param {string} verifierState Verifier state
264
255
  * @param {*} [options] Override http request option.
265
256
  * @throws {RequiredError}
266
257
  */
267
- healthCheck: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
268
- 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)));
269
263
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
270
264
  const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
271
265
  let baseOptions;
@@ -491,80 +485,79 @@ const DefaultApiFp = function (configuration) {
491
485
  });
492
486
  },
493
487
  /**
494
- * Initiates the onboarding process to the DID registry.
488
+ * Adds DID Verification method.
495
489
  * @param {string} tlId Trust List Identifier
496
- * @param {DidOnboardingPayload} [didOnboardingPayload] DID onboarding init payload.
490
+ * @param {string} did DID
491
+ * @param {VerificationMethod} [verificationMethod] Verification method.
497
492
  * @param {*} [options] Override http request option.
498
493
  * @throws {RequiredError}
499
494
  */
500
- didOnboardingInit(tlId, didOnboardingPayload, options) {
495
+ didVerificationMethodAdd(tlId, did, verificationMethod, options) {
501
496
  return __awaiter(this, void 0, void 0, function* () {
502
497
  var _a, _b, _c;
503
- const localVarAxiosArgs = yield localVarAxiosParamCreator.didOnboardingInit(tlId, didOnboardingPayload, options);
498
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.didVerificationMethodAdd(tlId, did, verificationMethod, options);
504
499
  const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
505
- 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;
506
501
  return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
507
502
  });
508
503
  },
509
504
  /**
510
- *
511
- * @param {string} tlId Trust List Identifier
512
- * @param {string} verifierState The verifier state provided by the onboarding endpoint
505
+ * Retrieves a list of DID Documents.
506
+ * @param {string} tlId
513
507
  * @param {*} [options] Override http request option.
514
508
  * @throws {RequiredError}
515
509
  */
516
- didOnboardingStatus(tlId, verifierState, options) {
510
+ didsGet(tlId, options) {
517
511
  return __awaiter(this, void 0, void 0, function* () {
518
512
  var _a, _b, _c;
519
- const localVarAxiosArgs = yield localVarAxiosParamCreator.didOnboardingStatus(tlId, verifierState, options);
513
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.didsGet(tlId, options);
520
514
  const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
521
- 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;
522
516
  return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
523
517
  });
524
518
  },
525
519
  /**
526
- * Adds DID Verification method.
527
- * @param {string} tlId Trust List Identifier
528
- * @param {string} did DID
529
- * @param {VerificationMethod} [verificationMethod] Verification method.
520
+ *
530
521
  * @param {*} [options] Override http request option.
531
522
  * @throws {RequiredError}
532
523
  */
533
- didVerificationMethodAdd(tlId, did, verificationMethod, options) {
524
+ healthCheck(options) {
534
525
  return __awaiter(this, void 0, void 0, function* () {
535
526
  var _a, _b, _c;
536
- const localVarAxiosArgs = yield localVarAxiosParamCreator.didVerificationMethodAdd(tlId, did, verificationMethod, options);
527
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.healthCheck(options);
537
528
  const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
538
- 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;
539
530
  return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
540
531
  });
541
532
  },
542
533
  /**
543
- * Retrieves a list of DID Documents.
544
- * @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.
545
537
  * @param {*} [options] Override http request option.
546
538
  * @throws {RequiredError}
547
539
  */
548
- didsGet(tlId, options) {
540
+ onboardingInit(tlId, onboardingPayload, options) {
549
541
  return __awaiter(this, void 0, void 0, function* () {
550
542
  var _a, _b, _c;
551
- const localVarAxiosArgs = yield localVarAxiosParamCreator.didsGet(tlId, options);
543
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.onboardingInit(tlId, onboardingPayload, options);
552
544
  const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
553
- 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;
554
546
  return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
555
547
  });
556
548
  },
557
549
  /**
558
550
  *
551
+ * @param {string} verifierState Verifier state
559
552
  * @param {*} [options] Override http request option.
560
553
  * @throws {RequiredError}
561
554
  */
562
- healthCheck(options) {
555
+ onboardingStatus(verifierState, options) {
563
556
  return __awaiter(this, void 0, void 0, function* () {
564
557
  var _a, _b, _c;
565
- const localVarAxiosArgs = yield localVarAxiosParamCreator.healthCheck(options);
558
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.onboardingStatus(verifierState, options);
566
559
  const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
567
- 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;
568
561
  return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
569
562
  });
570
563
  },
@@ -676,26 +669,6 @@ const DefaultApiFactory = function (configuration, basePath, axios) {
676
669
  didGet(tlId, tlrId, options) {
677
670
  return localVarFp.didGet(tlId, tlrId, options).then((request) => request(axios, basePath));
678
671
  },
679
- /**
680
- * Initiates the onboarding process to the DID registry.
681
- * @param {string} tlId Trust List Identifier
682
- * @param {DidOnboardingPayload} [didOnboardingPayload] DID onboarding init payload.
683
- * @param {*} [options] Override http request option.
684
- * @throws {RequiredError}
685
- */
686
- didOnboardingInit(tlId, didOnboardingPayload, options) {
687
- return localVarFp.didOnboardingInit(tlId, didOnboardingPayload, options).then((request) => request(axios, basePath));
688
- },
689
- /**
690
- *
691
- * @param {string} tlId Trust List Identifier
692
- * @param {string} verifierState The verifier state provided by the onboarding endpoint
693
- * @param {*} [options] Override http request option.
694
- * @throws {RequiredError}
695
- */
696
- didOnboardingStatus(tlId, verifierState, options) {
697
- return localVarFp.didOnboardingStatus(tlId, verifierState, options).then((request) => request(axios, basePath));
698
- },
699
672
  /**
700
673
  * Adds DID Verification method.
701
674
  * @param {string} tlId Trust List Identifier
@@ -724,6 +697,25 @@ const DefaultApiFactory = function (configuration, basePath, axios) {
724
697
  healthCheck(options) {
725
698
  return localVarFp.healthCheck(options).then((request) => request(axios, basePath));
726
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
+ },
727
719
  /**
728
720
  * Creates a Trust List based on the specified payload.
729
721
  * @param {TlPayload} [tlPayload] Trust List create payload.
@@ -805,57 +797,56 @@ class DefaultApi extends base_1.BaseAPI {
805
797
  return (0, exports.DefaultApiFp)(this.configuration).didGet(tlId, tlrId, options).then((request) => request(this.axios, this.basePath));
806
798
  }
807
799
  /**
808
- * Initiates the onboarding process to the DID registry.
800
+ * Adds DID Verification method.
809
801
  * @param {string} tlId Trust List Identifier
810
- * @param {DidOnboardingPayload} [didOnboardingPayload] DID onboarding init payload.
802
+ * @param {string} did DID
803
+ * @param {VerificationMethod} [verificationMethod] Verification method.
811
804
  * @param {*} [options] Override http request option.
812
805
  * @throws {RequiredError}
813
806
  * @memberof DefaultApi
814
807
  */
815
- didOnboardingInit(tlId, didOnboardingPayload, options) {
816
- return (0, exports.DefaultApiFp)(this.configuration).didOnboardingInit(tlId, didOnboardingPayload, options).then((request) => request(this.axios, this.basePath));
808
+ didVerificationMethodAdd(tlId, did, verificationMethod, options) {
809
+ return (0, exports.DefaultApiFp)(this.configuration).didVerificationMethodAdd(tlId, did, verificationMethod, options).then((request) => request(this.axios, this.basePath));
817
810
  }
818
811
  /**
819
- *
820
- * @param {string} tlId Trust List Identifier
821
- * @param {string} verifierState The verifier state provided by the onboarding endpoint
812
+ * Retrieves a list of DID Documents.
813
+ * @param {string} tlId
822
814
  * @param {*} [options] Override http request option.
823
815
  * @throws {RequiredError}
824
816
  * @memberof DefaultApi
825
817
  */
826
- didOnboardingStatus(tlId, verifierState, options) {
827
- return (0, exports.DefaultApiFp)(this.configuration).didOnboardingStatus(tlId, verifierState, options).then((request) => request(this.axios, this.basePath));
818
+ didsGet(tlId, options) {
819
+ return (0, exports.DefaultApiFp)(this.configuration).didsGet(tlId, options).then((request) => request(this.axios, this.basePath));
828
820
  }
829
821
  /**
830
- * Adds DID Verification method.
831
- * @param {string} tlId Trust List Identifier
832
- * @param {string} did DID
833
- * @param {VerificationMethod} [verificationMethod] Verification method.
822
+ *
834
823
  * @param {*} [options] Override http request option.
835
824
  * @throws {RequiredError}
836
825
  * @memberof DefaultApi
837
826
  */
838
- didVerificationMethodAdd(tlId, did, verificationMethod, options) {
839
- return (0, exports.DefaultApiFp)(this.configuration).didVerificationMethodAdd(tlId, did, verificationMethod, options).then((request) => request(this.axios, this.basePath));
827
+ healthCheck(options) {
828
+ return (0, exports.DefaultApiFp)(this.configuration).healthCheck(options).then((request) => request(this.axios, this.basePath));
840
829
  }
841
830
  /**
842
- * Retrieves a list of DID Documents.
843
- * @param {string} tlId
831
+ * Initiates the onboarding process to the DID registry.
832
+ * @param {string} tlId Trust List identifier
833
+ * @param {OnboardingPayload} [onboardingPayload] DID onboarding init payload.
844
834
  * @param {*} [options] Override http request option.
845
835
  * @throws {RequiredError}
846
836
  * @memberof DefaultApi
847
837
  */
848
- didsGet(tlId, options) {
849
- return (0, exports.DefaultApiFp)(this.configuration).didsGet(tlId, options).then((request) => request(this.axios, this.basePath));
838
+ onboardingInit(tlId, onboardingPayload, options) {
839
+ return (0, exports.DefaultApiFp)(this.configuration).onboardingInit(tlId, onboardingPayload, options).then((request) => request(this.axios, this.basePath));
850
840
  }
851
841
  /**
852
842
  *
843
+ * @param {string} verifierState Verifier state
853
844
  * @param {*} [options] Override http request option.
854
845
  * @throws {RequiredError}
855
846
  * @memberof DefaultApi
856
847
  */
857
- healthCheck(options) {
858
- return (0, exports.DefaultApiFp)(this.configuration).healthCheck(options).then((request) => request(this.axios, this.basePath));
848
+ onboardingStatus(verifierState, options) {
849
+ return (0, exports.DefaultApiFp)(this.configuration).onboardingStatus(verifierState, options).then((request) => request(this.axios, this.basePath));
859
850
  }
860
851
  /**
861
852
  * Creates a Trust List based on the specified 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.17",
4
+ "version": "0.0.19",
5
5
  "description": "",
6
6
  "main": "index.js",
7
7
  "scripts": {