@triveria/wallet 0.0.196 → 0.0.198

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 +69 -8
  2. package/api.js +77 -12
  3. package/package.json +1 -1
package/api.d.ts CHANGED
@@ -376,6 +376,32 @@ export declare const CredentialMetadataStatusEnum: {
376
376
  readonly Invalid: "invalid";
377
377
  };
378
378
  export type CredentialMetadataStatusEnum = typeof CredentialMetadataStatusEnum[keyof typeof CredentialMetadataStatusEnum];
379
+ /**
380
+ * A Credential container used to create credentials with metadata.
381
+ * @export
382
+ * @interface CredentialPatchPayload
383
+ */
384
+ export interface CredentialPatchPayload {
385
+ [key: string]: any;
386
+ /**
387
+ *
388
+ * @type {CredentialSubject}
389
+ * @memberof CredentialPatchPayload
390
+ */
391
+ 'credentialSubject': CredentialSubject;
392
+ /**
393
+ *
394
+ * @type {string}
395
+ * @memberof CredentialPatchPayload
396
+ */
397
+ 'name': string;
398
+ /**
399
+ * If true, the credential draft is checked against its schema. Defaults to true.
400
+ * @type {boolean}
401
+ * @memberof CredentialPatchPayload
402
+ */
403
+ 'validateSchema'?: boolean;
404
+ }
379
405
  /**
380
406
  * A Credential container used to create credentials with metadata.
381
407
  * @export
@@ -2071,11 +2097,11 @@ export declare const DefaultApiAxiosParamCreator: (configuration?: Configuration
2071
2097
  * Endpoint used to update an existing Credential in draft state. Can be used for additional updates before the Credential is issued. After credential is issued it may not be changed in any way.
2072
2098
  * @param {string} credentialId Verifiable Credential Identifier
2073
2099
  * @param {string} walletId
2074
- * @param {CredentialPayload} [credentialPayload]
2100
+ * @param {CredentialPatchPayload} [credentialPatchPayload]
2075
2101
  * @param {*} [options] Override http request option.
2076
2102
  * @throws {RequiredError}
2077
2103
  */
2078
- credentialPatch: (credentialId: string, walletId: string, credentialPayload?: CredentialPayload, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
2104
+ credentialPatch: (credentialId: string, walletId: string, credentialPatchPayload?: CredentialPatchPayload, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
2079
2105
  /**
2080
2106
  * Requests a credential issuance from the issuer and retrieves requirements for holder authorization.
2081
2107
  * @param {string} walletId
@@ -2282,6 +2308,13 @@ export declare const DefaultApiAxiosParamCreator: (configuration?: Configuration
2282
2308
  * @throws {RequiredError}
2283
2309
  */
2284
2310
  walletGet: (walletId: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
2311
+ /**
2312
+ * Provides wallet keys used for signing.
2313
+ * @param {string} walletId Wallet ID
2314
+ * @param {*} [options] Override http request option.
2315
+ * @throws {RequiredError}
2316
+ */
2317
+ walletKeys: (walletId: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
2285
2318
  /**
2286
2319
  * Provides list of wallets owned by the authenticated client.
2287
2320
  * @param {*} [options] Override http request option.
@@ -2405,11 +2438,11 @@ export declare const DefaultApiFp: (configuration?: Configuration) => {
2405
2438
  * Endpoint used to update an existing Credential in draft state. Can be used for additional updates before the Credential is issued. After credential is issued it may not be changed in any way.
2406
2439
  * @param {string} credentialId Verifiable Credential Identifier
2407
2440
  * @param {string} walletId
2408
- * @param {CredentialPayload} [credentialPayload]
2441
+ * @param {CredentialPatchPayload} [credentialPatchPayload]
2409
2442
  * @param {*} [options] Override http request option.
2410
2443
  * @throws {RequiredError}
2411
2444
  */
2412
- credentialPatch(credentialId: string, walletId: string, credentialPayload?: CredentialPayload, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CredentialIdObject>>;
2445
+ credentialPatch(credentialId: string, walletId: string, credentialPatchPayload?: CredentialPatchPayload, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CredentialIdObject>>;
2413
2446
  /**
2414
2447
  * Requests a credential issuance from the issuer and retrieves requirements for holder authorization.
2415
2448
  * @param {string} walletId
@@ -2616,6 +2649,15 @@ export declare const DefaultApiFp: (configuration?: Configuration) => {
2616
2649
  * @throws {RequiredError}
2617
2650
  */
2618
2651
  walletGet(walletId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Wallet>>;
2652
+ /**
2653
+ * Provides wallet keys used for signing.
2654
+ * @param {string} walletId Wallet ID
2655
+ * @param {*} [options] Override http request option.
2656
+ * @throws {RequiredError}
2657
+ */
2658
+ walletKeys(walletId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{
2659
+ [key: string]: any;
2660
+ }>>;
2619
2661
  /**
2620
2662
  * Provides list of wallets owned by the authenticated client.
2621
2663
  * @param {*} [options] Override http request option.
@@ -2739,11 +2781,11 @@ export declare const DefaultApiFactory: (configuration?: Configuration, basePath
2739
2781
  * Endpoint used to update an existing Credential in draft state. Can be used for additional updates before the Credential is issued. After credential is issued it may not be changed in any way.
2740
2782
  * @param {string} credentialId Verifiable Credential Identifier
2741
2783
  * @param {string} walletId
2742
- * @param {CredentialPayload} [credentialPayload]
2784
+ * @param {CredentialPatchPayload} [credentialPatchPayload]
2743
2785
  * @param {*} [options] Override http request option.
2744
2786
  * @throws {RequiredError}
2745
2787
  */
2746
- credentialPatch(credentialId: string, walletId: string, credentialPayload?: CredentialPayload, options?: RawAxiosRequestConfig): AxiosPromise<CredentialIdObject>;
2788
+ credentialPatch(credentialId: string, walletId: string, credentialPatchPayload?: CredentialPatchPayload, options?: RawAxiosRequestConfig): AxiosPromise<CredentialIdObject>;
2747
2789
  /**
2748
2790
  * Requests a credential issuance from the issuer and retrieves requirements for holder authorization.
2749
2791
  * @param {string} walletId
@@ -2950,6 +2992,15 @@ export declare const DefaultApiFactory: (configuration?: Configuration, basePath
2950
2992
  * @throws {RequiredError}
2951
2993
  */
2952
2994
  walletGet(walletId: string, options?: RawAxiosRequestConfig): AxiosPromise<Wallet>;
2995
+ /**
2996
+ * Provides wallet keys used for signing.
2997
+ * @param {string} walletId Wallet ID
2998
+ * @param {*} [options] Override http request option.
2999
+ * @throws {RequiredError}
3000
+ */
3001
+ walletKeys(walletId: string, options?: RawAxiosRequestConfig): AxiosPromise<{
3002
+ [key: string]: any;
3003
+ }>;
2953
3004
  /**
2954
3005
  * Provides list of wallets owned by the authenticated client.
2955
3006
  * @param {*} [options] Override http request option.
@@ -3081,12 +3132,12 @@ export declare class DefaultApi extends BaseAPI {
3081
3132
  * Endpoint used to update an existing Credential in draft state. Can be used for additional updates before the Credential is issued. After credential is issued it may not be changed in any way.
3082
3133
  * @param {string} credentialId Verifiable Credential Identifier
3083
3134
  * @param {string} walletId
3084
- * @param {CredentialPayload} [credentialPayload]
3135
+ * @param {CredentialPatchPayload} [credentialPatchPayload]
3085
3136
  * @param {*} [options] Override http request option.
3086
3137
  * @throws {RequiredError}
3087
3138
  * @memberof DefaultApi
3088
3139
  */
3089
- credentialPatch(credentialId: string, walletId: string, credentialPayload?: CredentialPayload, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<CredentialIdObject, any>>;
3140
+ credentialPatch(credentialId: string, walletId: string, credentialPatchPayload?: CredentialPatchPayload, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<CredentialIdObject, any>>;
3090
3141
  /**
3091
3142
  * Requests a credential issuance from the issuer and retrieves requirements for holder authorization.
3092
3143
  * @param {string} walletId
@@ -3320,6 +3371,16 @@ export declare class DefaultApi extends BaseAPI {
3320
3371
  * @memberof DefaultApi
3321
3372
  */
3322
3373
  walletGet(walletId: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<Wallet, any>>;
3374
+ /**
3375
+ * Provides wallet keys used for signing.
3376
+ * @param {string} walletId Wallet ID
3377
+ * @param {*} [options] Override http request option.
3378
+ * @throws {RequiredError}
3379
+ * @memberof DefaultApi
3380
+ */
3381
+ walletKeys(walletId: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<{
3382
+ [key: string]: any;
3383
+ }, any>>;
3323
3384
  /**
3324
3385
  * Provides list of wallets owned by the authenticated client.
3325
3386
  * @param {*} [options] Override http request option.
package/api.js CHANGED
@@ -392,11 +392,11 @@ const DefaultApiAxiosParamCreator = function (configuration) {
392
392
  * Endpoint used to update an existing Credential in draft state. Can be used for additional updates before the Credential is issued. After credential is issued it may not be changed in any way.
393
393
  * @param {string} credentialId Verifiable Credential Identifier
394
394
  * @param {string} walletId
395
- * @param {CredentialPayload} [credentialPayload]
395
+ * @param {CredentialPatchPayload} [credentialPatchPayload]
396
396
  * @param {*} [options] Override http request option.
397
397
  * @throws {RequiredError}
398
398
  */
399
- credentialPatch: (credentialId, walletId, credentialPayload, options = {}) => __awaiter(this, void 0, void 0, function* () {
399
+ credentialPatch: (credentialId, walletId, credentialPatchPayload, options = {}) => __awaiter(this, void 0, void 0, function* () {
400
400
  // verify required parameter 'credentialId' is not null or undefined
401
401
  (0, common_1.assertParamExists)('credentialPatch', 'credentialId', credentialId);
402
402
  // verify required parameter 'walletId' is not null or undefined
@@ -419,7 +419,7 @@ const DefaultApiAxiosParamCreator = function (configuration) {
419
419
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
420
420
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
421
421
  localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
422
- localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(credentialPayload, localVarRequestOptions, configuration);
422
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(credentialPatchPayload, localVarRequestOptions, configuration);
423
423
  return {
424
424
  url: (0, common_1.toPathString)(localVarUrlObj),
425
425
  options: localVarRequestOptions,
@@ -1330,6 +1330,37 @@ const DefaultApiAxiosParamCreator = function (configuration) {
1330
1330
  options: localVarRequestOptions,
1331
1331
  };
1332
1332
  }),
1333
+ /**
1334
+ * Provides wallet keys used for signing.
1335
+ * @param {string} walletId Wallet ID
1336
+ * @param {*} [options] Override http request option.
1337
+ * @throws {RequiredError}
1338
+ */
1339
+ walletKeys: (walletId, options = {}) => __awaiter(this, void 0, void 0, function* () {
1340
+ // verify required parameter 'walletId' is not null or undefined
1341
+ (0, common_1.assertParamExists)('walletKeys', 'walletId', walletId);
1342
+ const localVarPath = `/wallets/{wallet_id}/keys`
1343
+ .replace(`{${"wallet_id"}}`, encodeURIComponent(String(walletId)));
1344
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1345
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
1346
+ let baseOptions;
1347
+ if (configuration) {
1348
+ baseOptions = configuration.baseOptions;
1349
+ }
1350
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
1351
+ const localVarHeaderParameter = {};
1352
+ const localVarQueryParameter = {};
1353
+ // authentication accessToken required
1354
+ // http bearer authentication required
1355
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
1356
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1357
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1358
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1359
+ return {
1360
+ url: (0, common_1.toPathString)(localVarUrlObj),
1361
+ options: localVarRequestOptions,
1362
+ };
1363
+ }),
1333
1364
  /**
1334
1365
  * Provides list of wallets owned by the authenticated client.
1335
1366
  * @param {*} [options] Override http request option.
@@ -1693,14 +1724,14 @@ const DefaultApiFp = function (configuration) {
1693
1724
  * Endpoint used to update an existing Credential in draft state. Can be used for additional updates before the Credential is issued. After credential is issued it may not be changed in any way.
1694
1725
  * @param {string} credentialId Verifiable Credential Identifier
1695
1726
  * @param {string} walletId
1696
- * @param {CredentialPayload} [credentialPayload]
1727
+ * @param {CredentialPatchPayload} [credentialPatchPayload]
1697
1728
  * @param {*} [options] Override http request option.
1698
1729
  * @throws {RequiredError}
1699
1730
  */
1700
- credentialPatch(credentialId, walletId, credentialPayload, options) {
1731
+ credentialPatch(credentialId, walletId, credentialPatchPayload, options) {
1701
1732
  var _a, _b, _c;
1702
1733
  return __awaiter(this, void 0, void 0, function* () {
1703
- const localVarAxiosArgs = yield localVarAxiosParamCreator.credentialPatch(credentialId, walletId, credentialPayload, options);
1734
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.credentialPatch(credentialId, walletId, credentialPatchPayload, options);
1704
1735
  const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1705
1736
  const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['DefaultApi.credentialPatch']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1706
1737
  return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
@@ -2128,6 +2159,21 @@ const DefaultApiFp = function (configuration) {
2128
2159
  return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2129
2160
  });
2130
2161
  },
2162
+ /**
2163
+ * Provides wallet keys used for signing.
2164
+ * @param {string} walletId Wallet ID
2165
+ * @param {*} [options] Override http request option.
2166
+ * @throws {RequiredError}
2167
+ */
2168
+ walletKeys(walletId, options) {
2169
+ var _a, _b, _c;
2170
+ return __awaiter(this, void 0, void 0, function* () {
2171
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.walletKeys(walletId, options);
2172
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
2173
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['DefaultApi.walletKeys']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
2174
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2175
+ });
2176
+ },
2131
2177
  /**
2132
2178
  * Provides list of wallets owned by the authenticated client.
2133
2179
  * @param {*} [options] Override http request option.
@@ -2323,12 +2369,12 @@ const DefaultApiFactory = function (configuration, basePath, axios) {
2323
2369
  * Endpoint used to update an existing Credential in draft state. Can be used for additional updates before the Credential is issued. After credential is issued it may not be changed in any way.
2324
2370
  * @param {string} credentialId Verifiable Credential Identifier
2325
2371
  * @param {string} walletId
2326
- * @param {CredentialPayload} [credentialPayload]
2372
+ * @param {CredentialPatchPayload} [credentialPatchPayload]
2327
2373
  * @param {*} [options] Override http request option.
2328
2374
  * @throws {RequiredError}
2329
2375
  */
2330
- credentialPatch(credentialId, walletId, credentialPayload, options) {
2331
- return localVarFp.credentialPatch(credentialId, walletId, credentialPayload, options).then((request) => request(axios, basePath));
2376
+ credentialPatch(credentialId, walletId, credentialPatchPayload, options) {
2377
+ return localVarFp.credentialPatch(credentialId, walletId, credentialPatchPayload, options).then((request) => request(axios, basePath));
2332
2378
  },
2333
2379
  /**
2334
2380
  * Requests a credential issuance from the issuer and retrieves requirements for holder authorization.
@@ -2590,6 +2636,15 @@ const DefaultApiFactory = function (configuration, basePath, axios) {
2590
2636
  walletGet(walletId, options) {
2591
2637
  return localVarFp.walletGet(walletId, options).then((request) => request(axios, basePath));
2592
2638
  },
2639
+ /**
2640
+ * Provides wallet keys used for signing.
2641
+ * @param {string} walletId Wallet ID
2642
+ * @param {*} [options] Override http request option.
2643
+ * @throws {RequiredError}
2644
+ */
2645
+ walletKeys(walletId, options) {
2646
+ return localVarFp.walletKeys(walletId, options).then((request) => request(axios, basePath));
2647
+ },
2593
2648
  /**
2594
2649
  * Provides list of wallets owned by the authenticated client.
2595
2650
  * @param {*} [options] Override http request option.
@@ -2749,13 +2804,13 @@ class DefaultApi extends base_1.BaseAPI {
2749
2804
  * Endpoint used to update an existing Credential in draft state. Can be used for additional updates before the Credential is issued. After credential is issued it may not be changed in any way.
2750
2805
  * @param {string} credentialId Verifiable Credential Identifier
2751
2806
  * @param {string} walletId
2752
- * @param {CredentialPayload} [credentialPayload]
2807
+ * @param {CredentialPatchPayload} [credentialPatchPayload]
2753
2808
  * @param {*} [options] Override http request option.
2754
2809
  * @throws {RequiredError}
2755
2810
  * @memberof DefaultApi
2756
2811
  */
2757
- credentialPatch(credentialId, walletId, credentialPayload, options) {
2758
- return (0, exports.DefaultApiFp)(this.configuration).credentialPatch(credentialId, walletId, credentialPayload, options).then((request) => request(this.axios, this.basePath));
2812
+ credentialPatch(credentialId, walletId, credentialPatchPayload, options) {
2813
+ return (0, exports.DefaultApiFp)(this.configuration).credentialPatch(credentialId, walletId, credentialPatchPayload, options).then((request) => request(this.axios, this.basePath));
2759
2814
  }
2760
2815
  /**
2761
2816
  * Requests a credential issuance from the issuer and retrieves requirements for holder authorization.
@@ -3044,6 +3099,16 @@ class DefaultApi extends base_1.BaseAPI {
3044
3099
  walletGet(walletId, options) {
3045
3100
  return (0, exports.DefaultApiFp)(this.configuration).walletGet(walletId, options).then((request) => request(this.axios, this.basePath));
3046
3101
  }
3102
+ /**
3103
+ * Provides wallet keys used for signing.
3104
+ * @param {string} walletId Wallet ID
3105
+ * @param {*} [options] Override http request option.
3106
+ * @throws {RequiredError}
3107
+ * @memberof DefaultApi
3108
+ */
3109
+ walletKeys(walletId, options) {
3110
+ return (0, exports.DefaultApiFp)(this.configuration).walletKeys(walletId, options).then((request) => request(this.axios, this.basePath));
3111
+ }
3047
3112
  /**
3048
3113
  * Provides list of wallets owned by the authenticated client.
3049
3114
  * @param {*} [options] Override http request option.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@triveria/wallet",
3
3
  "private": false,
4
- "version": "0.0.196",
4
+ "version": "0.0.198",
5
5
  "description": "",
6
6
  "main": "index.js",
7
7
  "scripts": {