@triveria/wallet 0.0.192 → 0.0.194

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 +118 -63
  2. package/api.js +88 -81
  3. package/package.json +1 -1
package/api.d.ts CHANGED
@@ -220,6 +220,25 @@ export interface CredentialImport {
220
220
  */
221
221
  'name': string;
222
222
  }
223
+ /**
224
+ * Request for addition of already created VC to issuance queue for a client specified either by client_id or idTokenRequestId. Either clientId or idTokenRequestId MUST be present.
225
+ * @export
226
+ * @interface CredentialIssuanceInit
227
+ */
228
+ export interface CredentialIssuanceInit {
229
+ /**
230
+ *
231
+ * @type {string}
232
+ * @memberof CredentialIssuanceInit
233
+ */
234
+ 'clientId'?: string;
235
+ /**
236
+ *
237
+ * @type {string}
238
+ * @memberof CredentialIssuanceInit
239
+ */
240
+ 'idTokenRequestId'?: string;
241
+ }
223
242
  /**
224
243
  *
225
244
  * @export
@@ -246,10 +265,10 @@ export interface CredentialIssuerDefinition {
246
265
  'credentialIssuer': CredentialIssuerDefinitionCredentialIssuerEnum;
247
266
  /**
248
267
  *
249
- * @type {CredentialRequirements}
268
+ * @type {VPDrivenIssuerConfig}
250
269
  * @memberof CredentialIssuerDefinition
251
270
  */
252
- 'credentialRequirements'?: CredentialRequirements;
271
+ 'issuerConfiguration'?: VPDrivenIssuerConfig;
253
272
  /**
254
273
  * Format of the issued credential
255
274
  * @type {string}
@@ -267,6 +286,7 @@ export declare const CredentialIssuerDefinitionCredentialIssuerEnum: {
267
286
  readonly CtWalletSame: "CtWalletSame";
268
287
  readonly CtRevocable: "CtRevocable";
269
288
  readonly IssuanceQueue: "IssuanceQueue";
289
+ readonly VpDriven: "VPDriven";
270
290
  };
271
291
  export type CredentialIssuerDefinitionCredentialIssuerEnum = typeof CredentialIssuerDefinitionCredentialIssuerEnum[keyof typeof CredentialIssuerDefinitionCredentialIssuerEnum];
272
292
  /**
@@ -375,6 +395,12 @@ export interface CredentialPayload {
375
395
  * @memberof CredentialPayload
376
396
  */
377
397
  'name': string;
398
+ /**
399
+ * If true, the credential draft is checked against its schema. Defaults to true.
400
+ * @type {boolean}
401
+ * @memberof CredentialPayload
402
+ */
403
+ 'validateSchema'?: boolean;
378
404
  }
379
405
  /**
380
406
  *
@@ -590,7 +616,13 @@ export interface CredentialVerifierDefinition {
590
616
  */
591
617
  'name': string;
592
618
  /**
593
- *
619
+ * Unique ID of the definition
620
+ * @type {string}
621
+ * @memberof CredentialVerifierDefinition
622
+ */
623
+ 'id': string;
624
+ /**
625
+ * Name of verifier authorization scope.
594
626
  * @type {string}
595
627
  * @memberof CredentialVerifierDefinition
596
628
  */
@@ -1027,25 +1059,6 @@ export declare const InteractionAuthorizationRequirementsRequirementTypeEnum: {
1027
1059
  readonly Pin: "pin";
1028
1060
  };
1029
1061
  export type InteractionAuthorizationRequirementsRequirementTypeEnum = typeof InteractionAuthorizationRequirementsRequirementTypeEnum[keyof typeof InteractionAuthorizationRequirementsRequirementTypeEnum];
1030
- /**
1031
- * Request for addition of already created VC to issuance queue for a client specified either by client_id or idTokenRequestId. Either clientId or idTokenRequestId MUST be present.
1032
- * @export
1033
- * @interface IssuanceQueueCredentialAdd
1034
- */
1035
- export interface IssuanceQueueCredentialAdd {
1036
- /**
1037
- *
1038
- * @type {string}
1039
- * @memberof IssuanceQueueCredentialAdd
1040
- */
1041
- 'clientId'?: string;
1042
- /**
1043
- *
1044
- * @type {string}
1045
- * @memberof IssuanceQueueCredentialAdd
1046
- */
1047
- 'idTokenRequestId'?: string;
1048
- }
1049
1062
  /**
1050
1063
  *
1051
1064
  * @export
@@ -1331,6 +1344,25 @@ export declare const PrepareToAccreditRequestTypeEnum: {
1331
1344
  readonly TrustedAccreditationOrganisation: "TrustedAccreditationOrganisation";
1332
1345
  };
1333
1346
  export type PrepareToAccreditRequestTypeEnum = typeof PrepareToAccreditRequestTypeEnum[keyof typeof PrepareToAccreditRequestTypeEnum];
1347
+ /**
1348
+ * Prepares to onboard legal entity\'s DID
1349
+ * @export
1350
+ * @interface PrepareToOnboardRequest
1351
+ */
1352
+ export interface PrepareToOnboardRequest {
1353
+ /**
1354
+ * DID which will be onboarded
1355
+ * @type {string}
1356
+ * @memberof PrepareToOnboardRequest
1357
+ */
1358
+ 'did': string;
1359
+ /**
1360
+ * The client ID that will be used during the credential offer interaction. Most likely the DID Key of the legal\'s entity wallet.
1361
+ * @type {string}
1362
+ * @memberof PrepareToOnboardRequest
1363
+ */
1364
+ 'clientId': string;
1365
+ }
1334
1366
  /**
1335
1367
  *
1336
1368
  * @export
@@ -1685,6 +1717,25 @@ export interface TermsOfUse {
1685
1717
  */
1686
1718
  'type': string;
1687
1719
  }
1720
+ /**
1721
+ *
1722
+ * @export
1723
+ * @interface VPDrivenIssuerConfig
1724
+ */
1725
+ export interface VPDrivenIssuerConfig {
1726
+ /**
1727
+ * ID of the verifier used for verification of presented credential.
1728
+ * @type {string}
1729
+ * @memberof VPDrivenIssuerConfig
1730
+ */
1731
+ 'credentialVerifierId': string;
1732
+ /**
1733
+ * Mapping of the input values set as JSONPath elements to the output credential claims.
1734
+ * @type {object}
1735
+ * @memberof VPDrivenIssuerConfig
1736
+ */
1737
+ 'mapping'?: object;
1738
+ }
1688
1739
  /**
1689
1740
  * The offer to be accepted. The offer URL is mandatory.
1690
1741
  * @export
@@ -1959,15 +2010,6 @@ export interface WalletNotificationHistory {
1959
2010
  * @export
1960
2011
  */
1961
2012
  export declare const DefaultApiAxiosParamCreator: (configuration?: Configuration) => {
1962
- /**
1963
- * Adds created Verifiable Credential draft to issuance queue for a specified client using authorized in-time or deferred flow.
1964
- * @param {string} credentialId
1965
- * @param {string} walletId
1966
- * @param {IssuanceQueueCredentialAdd} [issuanceQueueCredentialAdd]
1967
- * @param {*} [options] Override http request option.
1968
- * @throws {RequiredError}
1969
- */
1970
- credentialAddToIssuanceQueue: (credentialId: string, walletId: string, issuanceQueueCredentialAdd?: IssuanceQueueCredentialAdd, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
1971
2013
  /**
1972
2014
  * Creates a new draft credential.
1973
2015
  * @param {string} walletId
@@ -1992,6 +2034,15 @@ export declare const DefaultApiAxiosParamCreator: (configuration?: Configuration
1992
2034
  * @throws {RequiredError}
1993
2035
  */
1994
2036
  credentialImport: (walletId: string, credentialImport?: CredentialImport, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
2037
+ /**
2038
+ * Prepares created Verifiable Credential draft for its issuance for a specific client.
2039
+ * @param {string} credentialId
2040
+ * @param {string} walletId
2041
+ * @param {CredentialIssuanceInit} [credentialIssuanceInit]
2042
+ * @param {*} [options] Override http request option.
2043
+ * @throws {RequiredError}
2044
+ */
2045
+ credentialIssuanceInit: (credentialId: string, walletId: string, credentialIssuanceInit?: CredentialIssuanceInit, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
1995
2046
  /**
1996
2047
  * Retrieves a list of credentials.
1997
2048
  * @param {string} walletId
@@ -2189,10 +2240,11 @@ export declare const DefaultApiAxiosParamCreator: (configuration?: Configuration
2189
2240
  /**
2190
2241
  * Prepares another legal entity\'s wallet DID for onboarding.
2191
2242
  * @param {string} walletId
2243
+ * @param {PrepareToOnboardRequest} [prepareToOnboardRequest]
2192
2244
  * @param {*} [options] Override http request option.
2193
2245
  * @throws {RequiredError}
2194
2246
  */
2195
- tfPrepareToOnboard: (walletId: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
2247
+ tfPrepareToOnboard: (walletId: string, prepareToOnboardRequest?: PrepareToOnboardRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
2196
2248
  /**
2197
2249
  * Revokes another legal entity\'s wallet DID accreditation.
2198
2250
  * @param {string} walletId
@@ -2292,15 +2344,6 @@ export declare const DefaultApiAxiosParamCreator: (configuration?: Configuration
2292
2344
  * @export
2293
2345
  */
2294
2346
  export declare const DefaultApiFp: (configuration?: Configuration) => {
2295
- /**
2296
- * Adds created Verifiable Credential draft to issuance queue for a specified client using authorized in-time or deferred flow.
2297
- * @param {string} credentialId
2298
- * @param {string} walletId
2299
- * @param {IssuanceQueueCredentialAdd} [issuanceQueueCredentialAdd]
2300
- * @param {*} [options] Override http request option.
2301
- * @throws {RequiredError}
2302
- */
2303
- credentialAddToIssuanceQueue(credentialId: string, walletId: string, issuanceQueueCredentialAdd?: IssuanceQueueCredentialAdd, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>>;
2304
2347
  /**
2305
2348
  * Creates a new draft credential.
2306
2349
  * @param {string} walletId
@@ -2325,6 +2368,15 @@ export declare const DefaultApiFp: (configuration?: Configuration) => {
2325
2368
  * @throws {RequiredError}
2326
2369
  */
2327
2370
  credentialImport(walletId: string, credentialImport?: CredentialImport, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Credential>>;
2371
+ /**
2372
+ * Prepares created Verifiable Credential draft for its issuance for a specific client.
2373
+ * @param {string} credentialId
2374
+ * @param {string} walletId
2375
+ * @param {CredentialIssuanceInit} [credentialIssuanceInit]
2376
+ * @param {*} [options] Override http request option.
2377
+ * @throws {RequiredError}
2378
+ */
2379
+ credentialIssuanceInit(credentialId: string, walletId: string, credentialIssuanceInit?: CredentialIssuanceInit, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>>;
2328
2380
  /**
2329
2381
  * Retrieves a list of credentials.
2330
2382
  * @param {string} walletId
@@ -2522,10 +2574,11 @@ export declare const DefaultApiFp: (configuration?: Configuration) => {
2522
2574
  /**
2523
2575
  * Prepares another legal entity\'s wallet DID for onboarding.
2524
2576
  * @param {string} walletId
2577
+ * @param {PrepareToOnboardRequest} [prepareToOnboardRequest]
2525
2578
  * @param {*} [options] Override http request option.
2526
2579
  * @throws {RequiredError}
2527
2580
  */
2528
- tfPrepareToOnboard(walletId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>>;
2581
+ tfPrepareToOnboard(walletId: string, prepareToOnboardRequest?: PrepareToOnboardRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>>;
2529
2582
  /**
2530
2583
  * Revokes another legal entity\'s wallet DID accreditation.
2531
2584
  * @param {string} walletId
@@ -2625,15 +2678,6 @@ export declare const DefaultApiFp: (configuration?: Configuration) => {
2625
2678
  * @export
2626
2679
  */
2627
2680
  export declare const DefaultApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
2628
- /**
2629
- * Adds created Verifiable Credential draft to issuance queue for a specified client using authorized in-time or deferred flow.
2630
- * @param {string} credentialId
2631
- * @param {string} walletId
2632
- * @param {IssuanceQueueCredentialAdd} [issuanceQueueCredentialAdd]
2633
- * @param {*} [options] Override http request option.
2634
- * @throws {RequiredError}
2635
- */
2636
- credentialAddToIssuanceQueue(credentialId: string, walletId: string, issuanceQueueCredentialAdd?: IssuanceQueueCredentialAdd, options?: RawAxiosRequestConfig): AxiosPromise<void>;
2637
2681
  /**
2638
2682
  * Creates a new draft credential.
2639
2683
  * @param {string} walletId
@@ -2658,6 +2702,15 @@ export declare const DefaultApiFactory: (configuration?: Configuration, basePath
2658
2702
  * @throws {RequiredError}
2659
2703
  */
2660
2704
  credentialImport(walletId: string, credentialImport?: CredentialImport, options?: RawAxiosRequestConfig): AxiosPromise<Credential>;
2705
+ /**
2706
+ * Prepares created Verifiable Credential draft for its issuance for a specific client.
2707
+ * @param {string} credentialId
2708
+ * @param {string} walletId
2709
+ * @param {CredentialIssuanceInit} [credentialIssuanceInit]
2710
+ * @param {*} [options] Override http request option.
2711
+ * @throws {RequiredError}
2712
+ */
2713
+ credentialIssuanceInit(credentialId: string, walletId: string, credentialIssuanceInit?: CredentialIssuanceInit, options?: RawAxiosRequestConfig): AxiosPromise<void>;
2661
2714
  /**
2662
2715
  * Retrieves a list of credentials.
2663
2716
  * @param {string} walletId
@@ -2855,10 +2908,11 @@ export declare const DefaultApiFactory: (configuration?: Configuration, basePath
2855
2908
  /**
2856
2909
  * Prepares another legal entity\'s wallet DID for onboarding.
2857
2910
  * @param {string} walletId
2911
+ * @param {PrepareToOnboardRequest} [prepareToOnboardRequest]
2858
2912
  * @param {*} [options] Override http request option.
2859
2913
  * @throws {RequiredError}
2860
2914
  */
2861
- tfPrepareToOnboard(walletId: string, options?: RawAxiosRequestConfig): AxiosPromise<void>;
2915
+ tfPrepareToOnboard(walletId: string, prepareToOnboardRequest?: PrepareToOnboardRequest, options?: RawAxiosRequestConfig): AxiosPromise<void>;
2862
2916
  /**
2863
2917
  * Revokes another legal entity\'s wallet DID accreditation.
2864
2918
  * @param {string} walletId
@@ -2960,16 +3014,6 @@ export declare const DefaultApiFactory: (configuration?: Configuration, basePath
2960
3014
  * @extends {BaseAPI}
2961
3015
  */
2962
3016
  export declare class DefaultApi extends BaseAPI {
2963
- /**
2964
- * Adds created Verifiable Credential draft to issuance queue for a specified client using authorized in-time or deferred flow.
2965
- * @param {string} credentialId
2966
- * @param {string} walletId
2967
- * @param {IssuanceQueueCredentialAdd} [issuanceQueueCredentialAdd]
2968
- * @param {*} [options] Override http request option.
2969
- * @throws {RequiredError}
2970
- * @memberof DefaultApi
2971
- */
2972
- credentialAddToIssuanceQueue(credentialId: string, walletId: string, issuanceQueueCredentialAdd?: IssuanceQueueCredentialAdd, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any>>;
2973
3017
  /**
2974
3018
  * Creates a new draft credential.
2975
3019
  * @param {string} walletId
@@ -2997,6 +3041,16 @@ export declare class DefaultApi extends BaseAPI {
2997
3041
  * @memberof DefaultApi
2998
3042
  */
2999
3043
  credentialImport(walletId: string, credentialImport?: CredentialImport, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<Credential, any>>;
3044
+ /**
3045
+ * Prepares created Verifiable Credential draft for its issuance for a specific client.
3046
+ * @param {string} credentialId
3047
+ * @param {string} walletId
3048
+ * @param {CredentialIssuanceInit} [credentialIssuanceInit]
3049
+ * @param {*} [options] Override http request option.
3050
+ * @throws {RequiredError}
3051
+ * @memberof DefaultApi
3052
+ */
3053
+ credentialIssuanceInit(credentialId: string, walletId: string, credentialIssuanceInit?: CredentialIssuanceInit, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any>>;
3000
3054
  /**
3001
3055
  * Retrieves a list of credentials.
3002
3056
  * @param {string} walletId
@@ -3218,11 +3272,12 @@ export declare class DefaultApi extends BaseAPI {
3218
3272
  /**
3219
3273
  * Prepares another legal entity\'s wallet DID for onboarding.
3220
3274
  * @param {string} walletId
3275
+ * @param {PrepareToOnboardRequest} [prepareToOnboardRequest]
3221
3276
  * @param {*} [options] Override http request option.
3222
3277
  * @throws {RequiredError}
3223
3278
  * @memberof DefaultApi
3224
3279
  */
3225
- tfPrepareToOnboard(walletId: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any>>;
3280
+ tfPrepareToOnboard(walletId: string, prepareToOnboardRequest?: PrepareToOnboardRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any>>;
3226
3281
  /**
3227
3282
  * Revokes another legal entity\'s wallet DID accreditation.
3228
3283
  * @param {string} walletId
package/api.js CHANGED
@@ -48,7 +48,8 @@ exports.CredentialFormat = {
48
48
  exports.CredentialIssuerDefinitionCredentialIssuerEnum = {
49
49
  CtWalletSame: 'CtWalletSame',
50
50
  CtRevocable: 'CtRevocable',
51
- IssuanceQueue: 'IssuanceQueue'
51
+ IssuanceQueue: 'IssuanceQueue',
52
+ VpDriven: 'VPDriven'
52
53
  };
53
54
  exports.CredentialMetadataStatusEnum = {
54
55
  Draft: 'draft',
@@ -135,20 +136,16 @@ exports.WalletNotificationEventType = {
135
136
  const DefaultApiAxiosParamCreator = function (configuration) {
136
137
  return {
137
138
  /**
138
- * Adds created Verifiable Credential draft to issuance queue for a specified client using authorized in-time or deferred flow.
139
- * @param {string} credentialId
139
+ * Creates a new draft credential.
140
140
  * @param {string} walletId
141
- * @param {IssuanceQueueCredentialAdd} [issuanceQueueCredentialAdd]
141
+ * @param {CredentialPayload} [credentialPayload] A Verifiable Credential payload in JSON format.
142
142
  * @param {*} [options] Override http request option.
143
143
  * @throws {RequiredError}
144
144
  */
145
- credentialAddToIssuanceQueue: (credentialId, walletId, issuanceQueueCredentialAdd, options = {}) => __awaiter(this, void 0, void 0, function* () {
146
- // verify required parameter 'credentialId' is not null or undefined
147
- (0, common_1.assertParamExists)('credentialAddToIssuanceQueue', 'credentialId', credentialId);
145
+ credentialCreate: (walletId, credentialPayload, options = {}) => __awaiter(this, void 0, void 0, function* () {
148
146
  // verify required parameter 'walletId' is not null or undefined
149
- (0, common_1.assertParamExists)('credentialAddToIssuanceQueue', 'walletId', walletId);
150
- const localVarPath = `/credentials/{credential_id}/add`
151
- .replace(`{${"credential_id"}}`, encodeURIComponent(String(credentialId)));
147
+ (0, common_1.assertParamExists)('credentialCreate', 'walletId', walletId);
148
+ const localVarPath = `/credentials`;
152
149
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
153
150
  const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
154
151
  let baseOptions;
@@ -168,30 +165,33 @@ const DefaultApiAxiosParamCreator = function (configuration) {
168
165
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
169
166
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
170
167
  localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
171
- localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(issuanceQueueCredentialAdd, localVarRequestOptions, configuration);
168
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(credentialPayload, localVarRequestOptions, configuration);
172
169
  return {
173
170
  url: (0, common_1.toPathString)(localVarUrlObj),
174
171
  options: localVarRequestOptions,
175
172
  };
176
173
  }),
177
174
  /**
178
- * Creates a new draft credential.
175
+ * Retrieves a specific verifiable credential based on the provided identifier. Upon retrieval the status of the credential is checked on the fly and therefore guaranteed.
176
+ * @param {string} credentialId Verifiable Credential Identifier
179
177
  * @param {string} walletId
180
- * @param {CredentialPayload} [credentialPayload] A Verifiable Credential payload in JSON format.
181
178
  * @param {*} [options] Override http request option.
182
179
  * @throws {RequiredError}
183
180
  */
184
- credentialCreate: (walletId, credentialPayload, options = {}) => __awaiter(this, void 0, void 0, function* () {
181
+ credentialGet: (credentialId, walletId, options = {}) => __awaiter(this, void 0, void 0, function* () {
182
+ // verify required parameter 'credentialId' is not null or undefined
183
+ (0, common_1.assertParamExists)('credentialGet', 'credentialId', credentialId);
185
184
  // verify required parameter 'walletId' is not null or undefined
186
- (0, common_1.assertParamExists)('credentialCreate', 'walletId', walletId);
187
- const localVarPath = `/credentials`;
185
+ (0, common_1.assertParamExists)('credentialGet', 'walletId', walletId);
186
+ const localVarPath = `/credentials/{credential_id}`
187
+ .replace(`{${"credential_id"}}`, encodeURIComponent(String(credentialId)));
188
188
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
189
189
  const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
190
190
  let baseOptions;
191
191
  if (configuration) {
192
192
  baseOptions = configuration.baseOptions;
193
193
  }
194
- const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
194
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
195
195
  const localVarHeaderParameter = {};
196
196
  const localVarQueryParameter = {};
197
197
  // authentication accessToken required
@@ -200,37 +200,32 @@ const DefaultApiAxiosParamCreator = function (configuration) {
200
200
  if (walletId != null) {
201
201
  localVarHeaderParameter['wallet-id'] = String(walletId);
202
202
  }
203
- localVarHeaderParameter['Content-Type'] = 'application/json';
204
203
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
205
204
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
206
205
  localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
207
- localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(credentialPayload, localVarRequestOptions, configuration);
208
206
  return {
209
207
  url: (0, common_1.toPathString)(localVarUrlObj),
210
208
  options: localVarRequestOptions,
211
209
  };
212
210
  }),
213
211
  /**
214
- * Retrieves a specific verifiable credential based on the provided identifier. Upon retrieval the status of the credential is checked on the fly and therefore guaranteed.
215
- * @param {string} credentialId Verifiable Credential Identifier
212
+ * Import pre-signed credential into wallet
216
213
  * @param {string} walletId
214
+ * @param {CredentialImport} [credentialImport] A Verifiable Credential payload in JSON format.
217
215
  * @param {*} [options] Override http request option.
218
216
  * @throws {RequiredError}
219
217
  */
220
- credentialGet: (credentialId, walletId, options = {}) => __awaiter(this, void 0, void 0, function* () {
221
- // verify required parameter 'credentialId' is not null or undefined
222
- (0, common_1.assertParamExists)('credentialGet', 'credentialId', credentialId);
218
+ credentialImport: (walletId, credentialImport, options = {}) => __awaiter(this, void 0, void 0, function* () {
223
219
  // verify required parameter 'walletId' is not null or undefined
224
- (0, common_1.assertParamExists)('credentialGet', 'walletId', walletId);
225
- const localVarPath = `/credentials/{credential_id}`
226
- .replace(`{${"credential_id"}}`, encodeURIComponent(String(credentialId)));
220
+ (0, common_1.assertParamExists)('credentialImport', 'walletId', walletId);
221
+ const localVarPath = `/credentials/import`;
227
222
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
228
223
  const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
229
224
  let baseOptions;
230
225
  if (configuration) {
231
226
  baseOptions = configuration.baseOptions;
232
227
  }
233
- const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
228
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
234
229
  const localVarHeaderParameter = {};
235
230
  const localVarQueryParameter = {};
236
231
  // authentication accessToken required
@@ -239,25 +234,31 @@ const DefaultApiAxiosParamCreator = function (configuration) {
239
234
  if (walletId != null) {
240
235
  localVarHeaderParameter['wallet-id'] = String(walletId);
241
236
  }
237
+ localVarHeaderParameter['Content-Type'] = 'application/json';
242
238
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
243
239
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
244
240
  localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
241
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(credentialImport, localVarRequestOptions, configuration);
245
242
  return {
246
243
  url: (0, common_1.toPathString)(localVarUrlObj),
247
244
  options: localVarRequestOptions,
248
245
  };
249
246
  }),
250
247
  /**
251
- * Import pre-signed credential into wallet
248
+ * Prepares created Verifiable Credential draft for its issuance for a specific client.
249
+ * @param {string} credentialId
252
250
  * @param {string} walletId
253
- * @param {CredentialImport} [credentialImport] A Verifiable Credential payload in JSON format.
251
+ * @param {CredentialIssuanceInit} [credentialIssuanceInit]
254
252
  * @param {*} [options] Override http request option.
255
253
  * @throws {RequiredError}
256
254
  */
257
- credentialImport: (walletId, credentialImport, options = {}) => __awaiter(this, void 0, void 0, function* () {
255
+ credentialIssuanceInit: (credentialId, walletId, credentialIssuanceInit, options = {}) => __awaiter(this, void 0, void 0, function* () {
256
+ // verify required parameter 'credentialId' is not null or undefined
257
+ (0, common_1.assertParamExists)('credentialIssuanceInit', 'credentialId', credentialId);
258
258
  // verify required parameter 'walletId' is not null or undefined
259
- (0, common_1.assertParamExists)('credentialImport', 'walletId', walletId);
260
- const localVarPath = `/credentials/import`;
259
+ (0, common_1.assertParamExists)('credentialIssuanceInit', 'walletId', walletId);
260
+ const localVarPath = `/credentials/{credential_id}/issue/init`
261
+ .replace(`{${"credential_id"}}`, encodeURIComponent(String(credentialId)));
261
262
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
262
263
  const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
263
264
  let baseOptions;
@@ -277,7 +278,7 @@ const DefaultApiAxiosParamCreator = function (configuration) {
277
278
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
278
279
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
279
280
  localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
280
- localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(credentialImport, localVarRequestOptions, configuration);
281
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(credentialIssuanceInit, localVarRequestOptions, configuration);
281
282
  return {
282
283
  url: (0, common_1.toPathString)(localVarUrlObj),
283
284
  options: localVarRequestOptions,
@@ -1136,10 +1137,11 @@ const DefaultApiAxiosParamCreator = function (configuration) {
1136
1137
  /**
1137
1138
  * Prepares another legal entity\'s wallet DID for onboarding.
1138
1139
  * @param {string} walletId
1140
+ * @param {PrepareToOnboardRequest} [prepareToOnboardRequest]
1139
1141
  * @param {*} [options] Override http request option.
1140
1142
  * @throws {RequiredError}
1141
1143
  */
1142
- tfPrepareToOnboard: (walletId, options = {}) => __awaiter(this, void 0, void 0, function* () {
1144
+ tfPrepareToOnboard: (walletId, prepareToOnboardRequest, options = {}) => __awaiter(this, void 0, void 0, function* () {
1143
1145
  // verify required parameter 'walletId' is not null or undefined
1144
1146
  (0, common_1.assertParamExists)('tfPrepareToOnboard', 'walletId', walletId);
1145
1147
  const localVarPath = `/tf/{wallet_id}/prepare-to-onboard`
@@ -1156,9 +1158,11 @@ const DefaultApiAxiosParamCreator = function (configuration) {
1156
1158
  // authentication accessToken required
1157
1159
  // http bearer authentication required
1158
1160
  yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
1161
+ localVarHeaderParameter['Content-Type'] = 'application/json';
1159
1162
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1160
1163
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1161
1164
  localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1165
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(prepareToOnboardRequest, localVarRequestOptions, configuration);
1162
1166
  return {
1163
1167
  url: (0, common_1.toPathString)(localVarUrlObj),
1164
1168
  options: localVarRequestOptions,
@@ -1580,23 +1584,6 @@ exports.DefaultApiAxiosParamCreator = DefaultApiAxiosParamCreator;
1580
1584
  const DefaultApiFp = function (configuration) {
1581
1585
  const localVarAxiosParamCreator = (0, exports.DefaultApiAxiosParamCreator)(configuration);
1582
1586
  return {
1583
- /**
1584
- * Adds created Verifiable Credential draft to issuance queue for a specified client using authorized in-time or deferred flow.
1585
- * @param {string} credentialId
1586
- * @param {string} walletId
1587
- * @param {IssuanceQueueCredentialAdd} [issuanceQueueCredentialAdd]
1588
- * @param {*} [options] Override http request option.
1589
- * @throws {RequiredError}
1590
- */
1591
- credentialAddToIssuanceQueue(credentialId, walletId, issuanceQueueCredentialAdd, options) {
1592
- var _a, _b, _c;
1593
- return __awaiter(this, void 0, void 0, function* () {
1594
- const localVarAxiosArgs = yield localVarAxiosParamCreator.credentialAddToIssuanceQueue(credentialId, walletId, issuanceQueueCredentialAdd, options);
1595
- const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1596
- const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['DefaultApi.credentialAddToIssuanceQueue']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1597
- return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1598
- });
1599
- },
1600
1587
  /**
1601
1588
  * Creates a new draft credential.
1602
1589
  * @param {string} walletId
@@ -1645,6 +1632,23 @@ const DefaultApiFp = function (configuration) {
1645
1632
  return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1646
1633
  });
1647
1634
  },
1635
+ /**
1636
+ * Prepares created Verifiable Credential draft for its issuance for a specific client.
1637
+ * @param {string} credentialId
1638
+ * @param {string} walletId
1639
+ * @param {CredentialIssuanceInit} [credentialIssuanceInit]
1640
+ * @param {*} [options] Override http request option.
1641
+ * @throws {RequiredError}
1642
+ */
1643
+ credentialIssuanceInit(credentialId, walletId, credentialIssuanceInit, options) {
1644
+ var _a, _b, _c;
1645
+ return __awaiter(this, void 0, void 0, function* () {
1646
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.credentialIssuanceInit(credentialId, walletId, credentialIssuanceInit, options);
1647
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1648
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['DefaultApi.credentialIssuanceInit']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1649
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1650
+ });
1651
+ },
1648
1652
  /**
1649
1653
  * Retrieves a list of credentials.
1650
1654
  * @param {string} walletId
@@ -2034,13 +2038,14 @@ const DefaultApiFp = function (configuration) {
2034
2038
  /**
2035
2039
  * Prepares another legal entity\'s wallet DID for onboarding.
2036
2040
  * @param {string} walletId
2041
+ * @param {PrepareToOnboardRequest} [prepareToOnboardRequest]
2037
2042
  * @param {*} [options] Override http request option.
2038
2043
  * @throws {RequiredError}
2039
2044
  */
2040
- tfPrepareToOnboard(walletId, options) {
2045
+ tfPrepareToOnboard(walletId, prepareToOnboardRequest, options) {
2041
2046
  var _a, _b, _c;
2042
2047
  return __awaiter(this, void 0, void 0, function* () {
2043
- const localVarAxiosArgs = yield localVarAxiosParamCreator.tfPrepareToOnboard(walletId, options);
2048
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.tfPrepareToOnboard(walletId, prepareToOnboardRequest, options);
2044
2049
  const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
2045
2050
  const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['DefaultApi.tfPrepareToOnboard']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
2046
2051
  return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
@@ -2245,17 +2250,6 @@ exports.DefaultApiFp = DefaultApiFp;
2245
2250
  const DefaultApiFactory = function (configuration, basePath, axios) {
2246
2251
  const localVarFp = (0, exports.DefaultApiFp)(configuration);
2247
2252
  return {
2248
- /**
2249
- * Adds created Verifiable Credential draft to issuance queue for a specified client using authorized in-time or deferred flow.
2250
- * @param {string} credentialId
2251
- * @param {string} walletId
2252
- * @param {IssuanceQueueCredentialAdd} [issuanceQueueCredentialAdd]
2253
- * @param {*} [options] Override http request option.
2254
- * @throws {RequiredError}
2255
- */
2256
- credentialAddToIssuanceQueue(credentialId, walletId, issuanceQueueCredentialAdd, options) {
2257
- return localVarFp.credentialAddToIssuanceQueue(credentialId, walletId, issuanceQueueCredentialAdd, options).then((request) => request(axios, basePath));
2258
- },
2259
2253
  /**
2260
2254
  * Creates a new draft credential.
2261
2255
  * @param {string} walletId
@@ -2286,6 +2280,17 @@ const DefaultApiFactory = function (configuration, basePath, axios) {
2286
2280
  credentialImport(walletId, credentialImport, options) {
2287
2281
  return localVarFp.credentialImport(walletId, credentialImport, options).then((request) => request(axios, basePath));
2288
2282
  },
2283
+ /**
2284
+ * Prepares created Verifiable Credential draft for its issuance for a specific client.
2285
+ * @param {string} credentialId
2286
+ * @param {string} walletId
2287
+ * @param {CredentialIssuanceInit} [credentialIssuanceInit]
2288
+ * @param {*} [options] Override http request option.
2289
+ * @throws {RequiredError}
2290
+ */
2291
+ credentialIssuanceInit(credentialId, walletId, credentialIssuanceInit, options) {
2292
+ return localVarFp.credentialIssuanceInit(credentialId, walletId, credentialIssuanceInit, options).then((request) => request(axios, basePath));
2293
+ },
2289
2294
  /**
2290
2295
  * Retrieves a list of credentials.
2291
2296
  * @param {string} walletId
@@ -2531,11 +2536,12 @@ const DefaultApiFactory = function (configuration, basePath, axios) {
2531
2536
  /**
2532
2537
  * Prepares another legal entity\'s wallet DID for onboarding.
2533
2538
  * @param {string} walletId
2539
+ * @param {PrepareToOnboardRequest} [prepareToOnboardRequest]
2534
2540
  * @param {*} [options] Override http request option.
2535
2541
  * @throws {RequiredError}
2536
2542
  */
2537
- tfPrepareToOnboard(walletId, options) {
2538
- return localVarFp.tfPrepareToOnboard(walletId, options).then((request) => request(axios, basePath));
2543
+ tfPrepareToOnboard(walletId, prepareToOnboardRequest, options) {
2544
+ return localVarFp.tfPrepareToOnboard(walletId, prepareToOnboardRequest, options).then((request) => request(axios, basePath));
2539
2545
  },
2540
2546
  /**
2541
2547
  * Revokes another legal entity\'s wallet DID accreditation.
@@ -2664,18 +2670,6 @@ exports.DefaultApiFactory = DefaultApiFactory;
2664
2670
  * @extends {BaseAPI}
2665
2671
  */
2666
2672
  class DefaultApi extends base_1.BaseAPI {
2667
- /**
2668
- * Adds created Verifiable Credential draft to issuance queue for a specified client using authorized in-time or deferred flow.
2669
- * @param {string} credentialId
2670
- * @param {string} walletId
2671
- * @param {IssuanceQueueCredentialAdd} [issuanceQueueCredentialAdd]
2672
- * @param {*} [options] Override http request option.
2673
- * @throws {RequiredError}
2674
- * @memberof DefaultApi
2675
- */
2676
- credentialAddToIssuanceQueue(credentialId, walletId, issuanceQueueCredentialAdd, options) {
2677
- return (0, exports.DefaultApiFp)(this.configuration).credentialAddToIssuanceQueue(credentialId, walletId, issuanceQueueCredentialAdd, options).then((request) => request(this.axios, this.basePath));
2678
- }
2679
2673
  /**
2680
2674
  * Creates a new draft credential.
2681
2675
  * @param {string} walletId
@@ -2709,6 +2703,18 @@ class DefaultApi extends base_1.BaseAPI {
2709
2703
  credentialImport(walletId, credentialImport, options) {
2710
2704
  return (0, exports.DefaultApiFp)(this.configuration).credentialImport(walletId, credentialImport, options).then((request) => request(this.axios, this.basePath));
2711
2705
  }
2706
+ /**
2707
+ * Prepares created Verifiable Credential draft for its issuance for a specific client.
2708
+ * @param {string} credentialId
2709
+ * @param {string} walletId
2710
+ * @param {CredentialIssuanceInit} [credentialIssuanceInit]
2711
+ * @param {*} [options] Override http request option.
2712
+ * @throws {RequiredError}
2713
+ * @memberof DefaultApi
2714
+ */
2715
+ credentialIssuanceInit(credentialId, walletId, credentialIssuanceInit, options) {
2716
+ return (0, exports.DefaultApiFp)(this.configuration).credentialIssuanceInit(credentialId, walletId, credentialIssuanceInit, options).then((request) => request(this.axios, this.basePath));
2717
+ }
2712
2718
  /**
2713
2719
  * Retrieves a list of credentials.
2714
2720
  * @param {string} walletId
@@ -2978,12 +2984,13 @@ class DefaultApi extends base_1.BaseAPI {
2978
2984
  /**
2979
2985
  * Prepares another legal entity\'s wallet DID for onboarding.
2980
2986
  * @param {string} walletId
2987
+ * @param {PrepareToOnboardRequest} [prepareToOnboardRequest]
2981
2988
  * @param {*} [options] Override http request option.
2982
2989
  * @throws {RequiredError}
2983
2990
  * @memberof DefaultApi
2984
2991
  */
2985
- tfPrepareToOnboard(walletId, options) {
2986
- return (0, exports.DefaultApiFp)(this.configuration).tfPrepareToOnboard(walletId, options).then((request) => request(this.axios, this.basePath));
2992
+ tfPrepareToOnboard(walletId, prepareToOnboardRequest, options) {
2993
+ return (0, exports.DefaultApiFp)(this.configuration).tfPrepareToOnboard(walletId, prepareToOnboardRequest, options).then((request) => request(this.axios, this.basePath));
2987
2994
  }
2988
2995
  /**
2989
2996
  * Revokes another legal entity\'s wallet DID accreditation.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@triveria/wallet",
3
3
  "private": false,
4
- "version": "0.0.192",
4
+ "version": "0.0.194",
5
5
  "description": "",
6
6
  "main": "index.js",
7
7
  "scripts": {