@idunion/tl-sdk 0.0.21 → 0.0.22

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 +29 -0
  2. package/api.js +65 -0
  3. package/package.json +1 -1
package/api.d.ts CHANGED
@@ -885,6 +885,13 @@ export declare const DefaultApiAxiosParamCreator: (configuration?: Configuration
885
885
  * @throws {RequiredError}
886
886
  */
887
887
  didGet: (tlId: string, tlrId: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
888
+ /**
889
+ * Suggests a DID
890
+ * @param {string} tlId
891
+ * @param {*} [options] Override http request option.
892
+ * @throws {RequiredError}
893
+ */
894
+ didSuggest: (tlId: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
888
895
  /**
889
896
  * Adds DID Verification method.
890
897
  * @param {string} tlId Trust List Identifier
@@ -982,6 +989,13 @@ export declare const DefaultApiFp: (configuration?: Configuration) => {
982
989
  * @throws {RequiredError}
983
990
  */
984
991
  didGet(tlId: string, tlrId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DidDocument>>;
992
+ /**
993
+ * Suggests a DID
994
+ * @param {string} tlId
995
+ * @param {*} [options] Override http request option.
996
+ * @throws {RequiredError}
997
+ */
998
+ didSuggest(tlId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<string>>;
985
999
  /**
986
1000
  * Adds DID Verification method.
987
1001
  * @param {string} tlId Trust List Identifier
@@ -1079,6 +1093,13 @@ export declare const DefaultApiFactory: (configuration?: Configuration, basePath
1079
1093
  * @throws {RequiredError}
1080
1094
  */
1081
1095
  didGet(tlId: string, tlrId: string, options?: RawAxiosRequestConfig): AxiosPromise<DidDocument>;
1096
+ /**
1097
+ * Suggests a DID
1098
+ * @param {string} tlId
1099
+ * @param {*} [options] Override http request option.
1100
+ * @throws {RequiredError}
1101
+ */
1102
+ didSuggest(tlId: string, options?: RawAxiosRequestConfig): AxiosPromise<string>;
1082
1103
  /**
1083
1104
  * Adds DID Verification method.
1084
1105
  * @param {string} tlId Trust List Identifier
@@ -1180,6 +1201,14 @@ export declare class DefaultApi extends BaseAPI {
1180
1201
  * @memberof DefaultApi
1181
1202
  */
1182
1203
  didGet(tlId: string, tlrId: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<DidDocument, any>>;
1204
+ /**
1205
+ * Suggests a DID
1206
+ * @param {string} tlId
1207
+ * @param {*} [options] Override http request option.
1208
+ * @throws {RequiredError}
1209
+ * @memberof DefaultApi
1210
+ */
1211
+ didSuggest(tlId: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<string, any>>;
1183
1212
  /**
1184
1213
  * Adds DID Verification method.
1185
1214
  * @param {string} tlId Trust List Identifier
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
@@ -484,6 +515,21 @@ const DefaultApiFp = function (configuration) {
484
515
  return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
485
516
  });
486
517
  },
518
+ /**
519
+ * Suggests a DID
520
+ * @param {string} tlId
521
+ * @param {*} [options] Override http request option.
522
+ * @throws {RequiredError}
523
+ */
524
+ didSuggest(tlId, options) {
525
+ return __awaiter(this, void 0, void 0, function* () {
526
+ var _a, _b, _c;
527
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.didSuggest(tlId, options);
528
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
529
+ 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;
530
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
531
+ });
532
+ },
487
533
  /**
488
534
  * Adds DID Verification method.
489
535
  * @param {string} tlId Trust List Identifier
@@ -669,6 +715,15 @@ const DefaultApiFactory = function (configuration, basePath, axios) {
669
715
  didGet(tlId, tlrId, options) {
670
716
  return localVarFp.didGet(tlId, tlrId, options).then((request) => request(axios, basePath));
671
717
  },
718
+ /**
719
+ * Suggests a DID
720
+ * @param {string} tlId
721
+ * @param {*} [options] Override http request option.
722
+ * @throws {RequiredError}
723
+ */
724
+ didSuggest(tlId, options) {
725
+ return localVarFp.didSuggest(tlId, options).then((request) => request(axios, basePath));
726
+ },
672
727
  /**
673
728
  * Adds DID Verification method.
674
729
  * @param {string} tlId Trust List Identifier
@@ -796,6 +851,16 @@ class DefaultApi extends base_1.BaseAPI {
796
851
  didGet(tlId, tlrId, options) {
797
852
  return (0, exports.DefaultApiFp)(this.configuration).didGet(tlId, tlrId, options).then((request) => request(this.axios, this.basePath));
798
853
  }
854
+ /**
855
+ * Suggests a DID
856
+ * @param {string} tlId
857
+ * @param {*} [options] Override http request option.
858
+ * @throws {RequiredError}
859
+ * @memberof DefaultApi
860
+ */
861
+ didSuggest(tlId, options) {
862
+ return (0, exports.DefaultApiFp)(this.configuration).didSuggest(tlId, options).then((request) => request(this.axios, this.basePath));
863
+ }
799
864
  /**
800
865
  * Adds DID Verification method.
801
866
  * @param {string} tlId Trust List Identifier
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@idunion/tl-sdk",
3
3
  "private": false,
4
- "version": "0.0.21",
4
+ "version": "0.0.22",
5
5
  "description": "",
6
6
  "main": "index.js",
7
7
  "scripts": {