@idunion/tl-sdk 0.0.21 → 0.0.23
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 +108 -0
- package/api.js +127 -0
- package/package.json +1 -1
package/api.d.ts
CHANGED
|
@@ -434,6 +434,12 @@ export interface DidDocumentCreatePayload {
|
|
|
434
434
|
* @memberof DidDocumentCreatePayload
|
|
435
435
|
*/
|
|
436
436
|
'didKey': string;
|
|
437
|
+
/**
|
|
438
|
+
*
|
|
439
|
+
* @type {string}
|
|
440
|
+
* @memberof DidDocumentCreatePayload
|
|
441
|
+
*/
|
|
442
|
+
'orgName': string;
|
|
437
443
|
}
|
|
438
444
|
/**
|
|
439
445
|
*
|
|
@@ -825,6 +831,50 @@ export interface TlPayload {
|
|
|
825
831
|
*/
|
|
826
832
|
'verifierId': string;
|
|
827
833
|
}
|
|
834
|
+
/**
|
|
835
|
+
*
|
|
836
|
+
* @export
|
|
837
|
+
* @interface Tlr
|
|
838
|
+
*/
|
|
839
|
+
export interface Tlr {
|
|
840
|
+
/**
|
|
841
|
+
*
|
|
842
|
+
* @type {string}
|
|
843
|
+
* @memberof Tlr
|
|
844
|
+
*/
|
|
845
|
+
'orgName': string;
|
|
846
|
+
/**
|
|
847
|
+
*
|
|
848
|
+
* @type {string}
|
|
849
|
+
* @memberof Tlr
|
|
850
|
+
*/
|
|
851
|
+
'did': string;
|
|
852
|
+
/**
|
|
853
|
+
*
|
|
854
|
+
* @type {string}
|
|
855
|
+
* @memberof Tlr
|
|
856
|
+
*/
|
|
857
|
+
'tlId': string;
|
|
858
|
+
/**
|
|
859
|
+
*
|
|
860
|
+
* @type {string}
|
|
861
|
+
* @memberof Tlr
|
|
862
|
+
*/
|
|
863
|
+
'tlName': string;
|
|
864
|
+
}
|
|
865
|
+
/**
|
|
866
|
+
*
|
|
867
|
+
* @export
|
|
868
|
+
* @interface TlrList
|
|
869
|
+
*/
|
|
870
|
+
export interface TlrList {
|
|
871
|
+
/**
|
|
872
|
+
*
|
|
873
|
+
* @type {Array<Tlr>}
|
|
874
|
+
* @memberof TlrList
|
|
875
|
+
*/
|
|
876
|
+
'items'?: Array<Tlr>;
|
|
877
|
+
}
|
|
828
878
|
/**
|
|
829
879
|
*
|
|
830
880
|
* @export
|
|
@@ -885,6 +935,13 @@ export declare const DefaultApiAxiosParamCreator: (configuration?: Configuration
|
|
|
885
935
|
* @throws {RequiredError}
|
|
886
936
|
*/
|
|
887
937
|
didGet: (tlId: string, tlrId: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
938
|
+
/**
|
|
939
|
+
* Suggests a DID
|
|
940
|
+
* @param {string} tlId
|
|
941
|
+
* @param {*} [options] Override http request option.
|
|
942
|
+
* @throws {RequiredError}
|
|
943
|
+
*/
|
|
944
|
+
didSuggest: (tlId: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
888
945
|
/**
|
|
889
946
|
* Adds DID Verification method.
|
|
890
947
|
* @param {string} tlId Trust List Identifier
|
|
@@ -951,6 +1008,13 @@ export declare const DefaultApiAxiosParamCreator: (configuration?: Configuration
|
|
|
951
1008
|
* @throws {RequiredError}
|
|
952
1009
|
*/
|
|
953
1010
|
tlPatch: (tlId: string, tlPayload?: TlPayload, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
1011
|
+
/**
|
|
1012
|
+
* Retrieves a list of Trust List Records.
|
|
1013
|
+
* @param {string} orgName
|
|
1014
|
+
* @param {*} [options] Override http request option.
|
|
1015
|
+
* @throws {RequiredError}
|
|
1016
|
+
*/
|
|
1017
|
+
tlrSearch: (orgName: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
954
1018
|
/**
|
|
955
1019
|
* Gets a Verifiable Presentation.
|
|
956
1020
|
* @param {string} tlId
|
|
@@ -982,6 +1046,13 @@ export declare const DefaultApiFp: (configuration?: Configuration) => {
|
|
|
982
1046
|
* @throws {RequiredError}
|
|
983
1047
|
*/
|
|
984
1048
|
didGet(tlId: string, tlrId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DidDocument>>;
|
|
1049
|
+
/**
|
|
1050
|
+
* Suggests a DID
|
|
1051
|
+
* @param {string} tlId
|
|
1052
|
+
* @param {*} [options] Override http request option.
|
|
1053
|
+
* @throws {RequiredError}
|
|
1054
|
+
*/
|
|
1055
|
+
didSuggest(tlId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<string>>;
|
|
985
1056
|
/**
|
|
986
1057
|
* Adds DID Verification method.
|
|
987
1058
|
* @param {string} tlId Trust List Identifier
|
|
@@ -1048,6 +1119,13 @@ export declare const DefaultApiFp: (configuration?: Configuration) => {
|
|
|
1048
1119
|
* @throws {RequiredError}
|
|
1049
1120
|
*/
|
|
1050
1121
|
tlPatch(tlId: string, tlPayload?: TlPayload, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Tl>>;
|
|
1122
|
+
/**
|
|
1123
|
+
* Retrieves a list of Trust List Records.
|
|
1124
|
+
* @param {string} orgName
|
|
1125
|
+
* @param {*} [options] Override http request option.
|
|
1126
|
+
* @throws {RequiredError}
|
|
1127
|
+
*/
|
|
1128
|
+
tlrSearch(orgName: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<TlrList>>;
|
|
1051
1129
|
/**
|
|
1052
1130
|
* Gets a Verifiable Presentation.
|
|
1053
1131
|
* @param {string} tlId
|
|
@@ -1079,6 +1157,13 @@ export declare const DefaultApiFactory: (configuration?: Configuration, basePath
|
|
|
1079
1157
|
* @throws {RequiredError}
|
|
1080
1158
|
*/
|
|
1081
1159
|
didGet(tlId: string, tlrId: string, options?: RawAxiosRequestConfig): AxiosPromise<DidDocument>;
|
|
1160
|
+
/**
|
|
1161
|
+
* Suggests a DID
|
|
1162
|
+
* @param {string} tlId
|
|
1163
|
+
* @param {*} [options] Override http request option.
|
|
1164
|
+
* @throws {RequiredError}
|
|
1165
|
+
*/
|
|
1166
|
+
didSuggest(tlId: string, options?: RawAxiosRequestConfig): AxiosPromise<string>;
|
|
1082
1167
|
/**
|
|
1083
1168
|
* Adds DID Verification method.
|
|
1084
1169
|
* @param {string} tlId Trust List Identifier
|
|
@@ -1145,6 +1230,13 @@ export declare const DefaultApiFactory: (configuration?: Configuration, basePath
|
|
|
1145
1230
|
* @throws {RequiredError}
|
|
1146
1231
|
*/
|
|
1147
1232
|
tlPatch(tlId: string, tlPayload?: TlPayload, options?: RawAxiosRequestConfig): AxiosPromise<Tl>;
|
|
1233
|
+
/**
|
|
1234
|
+
* Retrieves a list of Trust List Records.
|
|
1235
|
+
* @param {string} orgName
|
|
1236
|
+
* @param {*} [options] Override http request option.
|
|
1237
|
+
* @throws {RequiredError}
|
|
1238
|
+
*/
|
|
1239
|
+
tlrSearch(orgName: string, options?: RawAxiosRequestConfig): AxiosPromise<TlrList>;
|
|
1148
1240
|
/**
|
|
1149
1241
|
* Gets a Verifiable Presentation.
|
|
1150
1242
|
* @param {string} tlId
|
|
@@ -1180,6 +1272,14 @@ export declare class DefaultApi extends BaseAPI {
|
|
|
1180
1272
|
* @memberof DefaultApi
|
|
1181
1273
|
*/
|
|
1182
1274
|
didGet(tlId: string, tlrId: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<DidDocument, any>>;
|
|
1275
|
+
/**
|
|
1276
|
+
* Suggests a DID
|
|
1277
|
+
* @param {string} tlId
|
|
1278
|
+
* @param {*} [options] Override http request option.
|
|
1279
|
+
* @throws {RequiredError}
|
|
1280
|
+
* @memberof DefaultApi
|
|
1281
|
+
*/
|
|
1282
|
+
didSuggest(tlId: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<string, any>>;
|
|
1183
1283
|
/**
|
|
1184
1284
|
* Adds DID Verification method.
|
|
1185
1285
|
* @param {string} tlId Trust List Identifier
|
|
@@ -1255,6 +1355,14 @@ export declare class DefaultApi extends BaseAPI {
|
|
|
1255
1355
|
* @memberof DefaultApi
|
|
1256
1356
|
*/
|
|
1257
1357
|
tlPatch(tlId: string, tlPayload?: TlPayload, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<Tl, any>>;
|
|
1358
|
+
/**
|
|
1359
|
+
* Retrieves a list of Trust List Records.
|
|
1360
|
+
* @param {string} orgName
|
|
1361
|
+
* @param {*} [options] Override http request option.
|
|
1362
|
+
* @throws {RequiredError}
|
|
1363
|
+
* @memberof DefaultApi
|
|
1364
|
+
*/
|
|
1365
|
+
tlrSearch(orgName: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<TlrList, any>>;
|
|
1258
1366
|
/**
|
|
1259
1367
|
* Gets a Verifiable Presentation.
|
|
1260
1368
|
* @param {string} tlId
|
package/api.js
CHANGED
|
@@ -125,6 +125,37 @@ const DefaultApiAxiosParamCreator = function (configuration) {
|
|
|
125
125
|
options: localVarRequestOptions,
|
|
126
126
|
};
|
|
127
127
|
}),
|
|
128
|
+
/**
|
|
129
|
+
* Suggests a DID
|
|
130
|
+
* @param {string} tlId
|
|
131
|
+
* @param {*} [options] Override http request option.
|
|
132
|
+
* @throws {RequiredError}
|
|
133
|
+
*/
|
|
134
|
+
didSuggest: (tlId_1, ...args_1) => __awaiter(this, [tlId_1, ...args_1], void 0, function* (tlId, options = {}) {
|
|
135
|
+
// verify required parameter 'tlId' is not null or undefined
|
|
136
|
+
(0, common_1.assertParamExists)('didSuggest', 'tlId', tlId);
|
|
137
|
+
const localVarPath = `/{tl_id}/dids/suggest`
|
|
138
|
+
.replace(`{${"tl_id"}}`, encodeURIComponent(String(tlId)));
|
|
139
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
140
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
141
|
+
let baseOptions;
|
|
142
|
+
if (configuration) {
|
|
143
|
+
baseOptions = configuration.baseOptions;
|
|
144
|
+
}
|
|
145
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
146
|
+
const localVarHeaderParameter = {};
|
|
147
|
+
const localVarQueryParameter = {};
|
|
148
|
+
// authentication accessToken required
|
|
149
|
+
// http bearer authentication required
|
|
150
|
+
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
151
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
152
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
153
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
154
|
+
return {
|
|
155
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
156
|
+
options: localVarRequestOptions,
|
|
157
|
+
};
|
|
158
|
+
}),
|
|
128
159
|
/**
|
|
129
160
|
* Adds DID Verification method.
|
|
130
161
|
* @param {string} tlId Trust List Identifier
|
|
@@ -403,6 +434,34 @@ const DefaultApiAxiosParamCreator = function (configuration) {
|
|
|
403
434
|
options: localVarRequestOptions,
|
|
404
435
|
};
|
|
405
436
|
}),
|
|
437
|
+
/**
|
|
438
|
+
* Retrieves a list of Trust List Records.
|
|
439
|
+
* @param {string} orgName
|
|
440
|
+
* @param {*} [options] Override http request option.
|
|
441
|
+
* @throws {RequiredError}
|
|
442
|
+
*/
|
|
443
|
+
tlrSearch: (orgName_1, ...args_1) => __awaiter(this, [orgName_1, ...args_1], void 0, function* (orgName, options = {}) {
|
|
444
|
+
// verify required parameter 'orgName' is not null or undefined
|
|
445
|
+
(0, common_1.assertParamExists)('tlrSearch', 'orgName', orgName);
|
|
446
|
+
const localVarPath = `/tlrs/{org_name}`
|
|
447
|
+
.replace(`{${"org_name"}}`, encodeURIComponent(String(orgName)));
|
|
448
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
449
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
450
|
+
let baseOptions;
|
|
451
|
+
if (configuration) {
|
|
452
|
+
baseOptions = configuration.baseOptions;
|
|
453
|
+
}
|
|
454
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
455
|
+
const localVarHeaderParameter = {};
|
|
456
|
+
const localVarQueryParameter = {};
|
|
457
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
458
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
459
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
460
|
+
return {
|
|
461
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
462
|
+
options: localVarRequestOptions,
|
|
463
|
+
};
|
|
464
|
+
}),
|
|
406
465
|
/**
|
|
407
466
|
* Gets a Verifiable Presentation.
|
|
408
467
|
* @param {string} tlId
|
|
@@ -484,6 +543,21 @@ const DefaultApiFp = function (configuration) {
|
|
|
484
543
|
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
485
544
|
});
|
|
486
545
|
},
|
|
546
|
+
/**
|
|
547
|
+
* Suggests a DID
|
|
548
|
+
* @param {string} tlId
|
|
549
|
+
* @param {*} [options] Override http request option.
|
|
550
|
+
* @throws {RequiredError}
|
|
551
|
+
*/
|
|
552
|
+
didSuggest(tlId, options) {
|
|
553
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
554
|
+
var _a, _b, _c;
|
|
555
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.didSuggest(tlId, options);
|
|
556
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
557
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['DefaultApi.didSuggest']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
558
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
559
|
+
});
|
|
560
|
+
},
|
|
487
561
|
/**
|
|
488
562
|
* Adds DID Verification method.
|
|
489
563
|
* @param {string} tlId Trust List Identifier
|
|
@@ -622,6 +696,21 @@ const DefaultApiFp = function (configuration) {
|
|
|
622
696
|
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
623
697
|
});
|
|
624
698
|
},
|
|
699
|
+
/**
|
|
700
|
+
* Retrieves a list of Trust List Records.
|
|
701
|
+
* @param {string} orgName
|
|
702
|
+
* @param {*} [options] Override http request option.
|
|
703
|
+
* @throws {RequiredError}
|
|
704
|
+
*/
|
|
705
|
+
tlrSearch(orgName, options) {
|
|
706
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
707
|
+
var _a, _b, _c;
|
|
708
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.tlrSearch(orgName, options);
|
|
709
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
710
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['DefaultApi.tlrSearch']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
711
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
712
|
+
});
|
|
713
|
+
},
|
|
625
714
|
/**
|
|
626
715
|
* Gets a Verifiable Presentation.
|
|
627
716
|
* @param {string} tlId
|
|
@@ -669,6 +758,15 @@ const DefaultApiFactory = function (configuration, basePath, axios) {
|
|
|
669
758
|
didGet(tlId, tlrId, options) {
|
|
670
759
|
return localVarFp.didGet(tlId, tlrId, options).then((request) => request(axios, basePath));
|
|
671
760
|
},
|
|
761
|
+
/**
|
|
762
|
+
* Suggests a DID
|
|
763
|
+
* @param {string} tlId
|
|
764
|
+
* @param {*} [options] Override http request option.
|
|
765
|
+
* @throws {RequiredError}
|
|
766
|
+
*/
|
|
767
|
+
didSuggest(tlId, options) {
|
|
768
|
+
return localVarFp.didSuggest(tlId, options).then((request) => request(axios, basePath));
|
|
769
|
+
},
|
|
672
770
|
/**
|
|
673
771
|
* Adds DID Verification method.
|
|
674
772
|
* @param {string} tlId Trust List Identifier
|
|
@@ -753,6 +851,15 @@ const DefaultApiFactory = function (configuration, basePath, axios) {
|
|
|
753
851
|
tlPatch(tlId, tlPayload, options) {
|
|
754
852
|
return localVarFp.tlPatch(tlId, tlPayload, options).then((request) => request(axios, basePath));
|
|
755
853
|
},
|
|
854
|
+
/**
|
|
855
|
+
* Retrieves a list of Trust List Records.
|
|
856
|
+
* @param {string} orgName
|
|
857
|
+
* @param {*} [options] Override http request option.
|
|
858
|
+
* @throws {RequiredError}
|
|
859
|
+
*/
|
|
860
|
+
tlrSearch(orgName, options) {
|
|
861
|
+
return localVarFp.tlrSearch(orgName, options).then((request) => request(axios, basePath));
|
|
862
|
+
},
|
|
756
863
|
/**
|
|
757
864
|
* Gets a Verifiable Presentation.
|
|
758
865
|
* @param {string} tlId
|
|
@@ -796,6 +903,16 @@ class DefaultApi extends base_1.BaseAPI {
|
|
|
796
903
|
didGet(tlId, tlrId, options) {
|
|
797
904
|
return (0, exports.DefaultApiFp)(this.configuration).didGet(tlId, tlrId, options).then((request) => request(this.axios, this.basePath));
|
|
798
905
|
}
|
|
906
|
+
/**
|
|
907
|
+
* Suggests a DID
|
|
908
|
+
* @param {string} tlId
|
|
909
|
+
* @param {*} [options] Override http request option.
|
|
910
|
+
* @throws {RequiredError}
|
|
911
|
+
* @memberof DefaultApi
|
|
912
|
+
*/
|
|
913
|
+
didSuggest(tlId, options) {
|
|
914
|
+
return (0, exports.DefaultApiFp)(this.configuration).didSuggest(tlId, options).then((request) => request(this.axios, this.basePath));
|
|
915
|
+
}
|
|
799
916
|
/**
|
|
800
917
|
* Adds DID Verification method.
|
|
801
918
|
* @param {string} tlId Trust List Identifier
|
|
@@ -889,6 +1006,16 @@ class DefaultApi extends base_1.BaseAPI {
|
|
|
889
1006
|
tlPatch(tlId, tlPayload, options) {
|
|
890
1007
|
return (0, exports.DefaultApiFp)(this.configuration).tlPatch(tlId, tlPayload, options).then((request) => request(this.axios, this.basePath));
|
|
891
1008
|
}
|
|
1009
|
+
/**
|
|
1010
|
+
* Retrieves a list of Trust List Records.
|
|
1011
|
+
* @param {string} orgName
|
|
1012
|
+
* @param {*} [options] Override http request option.
|
|
1013
|
+
* @throws {RequiredError}
|
|
1014
|
+
* @memberof DefaultApi
|
|
1015
|
+
*/
|
|
1016
|
+
tlrSearch(orgName, options) {
|
|
1017
|
+
return (0, exports.DefaultApiFp)(this.configuration).tlrSearch(orgName, options).then((request) => request(this.axios, this.basePath));
|
|
1018
|
+
}
|
|
892
1019
|
/**
|
|
893
1020
|
* Gets a Verifiable Presentation.
|
|
894
1021
|
* @param {string} tlId
|