@triveria/wallet 0.0.307 → 0.0.309

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 +127 -15
  2. package/api.js +168 -7
  3. package/package.json +1 -1
package/api.d.ts CHANGED
@@ -660,6 +660,10 @@ export interface InitPreAuthOffer {
660
660
  'issuerId': string;
661
661
  'offerEndpoint'?: string;
662
662
  'deferred'?: boolean;
663
+ /**
664
+ * ID of an WMP entity with which a WMP connection has already been established. If provided, WMP is used to send the credential offer to the specified recipient.
665
+ */
666
+ 'wmpEntityId'?: string;
663
667
  }
664
668
  export interface InputDescriptorSuitableCredentials {
665
669
  /**
@@ -1087,6 +1091,10 @@ export interface VpInvalidNotification {
1087
1091
  }
1088
1092
  export interface VpPresentedNotification {
1089
1093
  'credentialIds': Array<string>;
1094
+ /**
1095
+ * True when the presentation was submitted automatically, without user consent, because every requested credential was configured for auto-presentation.
1096
+ */
1097
+ 'autoAccepted'?: boolean;
1090
1098
  }
1091
1099
  export interface VpVerifiedNotification {
1092
1100
  'verifierId': string;
@@ -1260,15 +1268,17 @@ export declare const WmpAuthenticateSessionTypeEnum: {
1260
1268
  export type WmpAuthenticateSessionTypeEnum = typeof WmpAuthenticateSessionTypeEnum[keyof typeof WmpAuthenticateSessionTypeEnum];
1261
1269
  /**
1262
1270
  * @type WmpClientRequestBody
1263
- * Action to take on a pending WMP client request, discriminated by `type`: `process` an offer/verification request, `identity_assertion` to present a credential, or `authenticate` to open the session.
1271
+ * Action to take on a pending WMP client request, discriminated by `type`: `process_offer` a pending credential offer, `process_verification_request` a pending verification request, `identity_assertion` to present a credential, or `authenticate` to open the session.
1264
1272
  */
1265
1273
  export type WmpClientRequestBody = {
1266
1274
  type: 'authenticate';
1267
1275
  } & WmpAuthenticateSession | {
1268
1276
  type: 'identity_assertion';
1269
1277
  } & WmpProvideIdentityAssertion | {
1270
- type: 'process';
1271
- } & WmpProcessClientRequest;
1278
+ type: 'process_offer';
1279
+ } & WmpProcessOfferRequest | {
1280
+ type: 'process_verification_request';
1281
+ } & WmpProcessVerificationRequest;
1272
1282
  export interface WmpCreateInvitationResponse {
1273
1283
  /**
1274
1284
  * URL at which the invitation can be downloaded
@@ -1311,26 +1321,60 @@ export interface WmpEntityRecord {
1311
1321
  * Wallet capabilities of the entity
1312
1322
  */
1313
1323
  'roles': Array<WalletCapability>;
1324
+ /**
1325
+ * Whether the channel for this entity is verified
1326
+ */
1327
+ 'verified': boolean;
1314
1328
  'identifiers': Array<WmpEntityKeyIdentifier>;
1315
1329
  }
1330
+ /**
1331
+ * Metadata for a received WMP message. The body is downloaded as raw bytes from the link this object carries (`bodyUrl`).
1332
+ */
1333
+ export interface WmpMessage {
1334
+ /**
1335
+ * Message ID.
1336
+ */
1337
+ 'id': string;
1338
+ /**
1339
+ * Sender identifier of the peer that delivered the message.
1340
+ */
1341
+ 'from': string;
1342
+ /**
1343
+ * Content type of the primary body.
1344
+ */
1345
+ 'contentType': string;
1346
+ /**
1347
+ * Download link for the raw message body.
1348
+ */
1349
+ 'bodyUrl': string;
1350
+ }
1316
1351
  export interface WmpNotification {
1317
- 'server'?: WmpEntityRecord;
1318
- 'client'?: WmpEntityRecord;
1352
+ 'entity'?: WmpEntityRecord;
1319
1353
  'invitationUrl'?: string;
1320
1354
  'id': string;
1321
1355
  'error'?: string;
1322
1356
  'identityAssertion'?: CredentialWrapper;
1323
1357
  }
1324
1358
  /**
1325
- * Process a pending credential offer or verification request identified by the path id.
1359
+ * Process a pending credential offer identified by the path id.
1326
1360
  */
1327
- export interface WmpProcessClientRequest {
1328
- 'type': WmpProcessClientRequestTypeEnum;
1361
+ export interface WmpProcessOfferRequest {
1362
+ 'type': WmpProcessOfferRequestTypeEnum;
1329
1363
  }
1330
- export declare const WmpProcessClientRequestTypeEnum: {
1331
- readonly Process: "process";
1364
+ export declare const WmpProcessOfferRequestTypeEnum: {
1365
+ readonly ProcessOffer: "process_offer";
1332
1366
  };
1333
- export type WmpProcessClientRequestTypeEnum = typeof WmpProcessClientRequestTypeEnum[keyof typeof WmpProcessClientRequestTypeEnum];
1367
+ export type WmpProcessOfferRequestTypeEnum = typeof WmpProcessOfferRequestTypeEnum[keyof typeof WmpProcessOfferRequestTypeEnum];
1368
+ /**
1369
+ * Process a pending verification request identified by the path id.
1370
+ */
1371
+ export interface WmpProcessVerificationRequest {
1372
+ 'type': WmpProcessVerificationRequestTypeEnum;
1373
+ }
1374
+ export declare const WmpProcessVerificationRequestTypeEnum: {
1375
+ readonly ProcessVerificationRequest: "process_verification_request";
1376
+ };
1377
+ export type WmpProcessVerificationRequestTypeEnum = typeof WmpProcessVerificationRequestTypeEnum[keyof typeof WmpProcessVerificationRequestTypeEnum];
1334
1378
  /**
1335
1379
  * Provide a credential to present as the identity assertion for the session.
1336
1380
  */
@@ -1894,7 +1938,15 @@ export declare const DefaultApiAxiosParamCreator: (configuration?: Configuration
1894
1938
  */
1895
1939
  wmpClientGetPendingRequests: (walletId: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
1896
1940
  /**
1897
- * Acts on a pending WMP client request identified by `request_id`. The body\'s `type` selects the action: `process` a credential offer / verification request (returns its authorization requirements), `identity_assertion` to present a credential as the session identity assertion, or `authenticate` to open the session after the assertion exchange.
1941
+ * Returns metadata for the received message identified by `request_id` (delivered via a `wmp.message` notification carrying its id): its content type and body download link. The body is fetched as raw bytes from the download link included in the response (`bodyUrl`).
1942
+ * @param {string} walletId
1943
+ * @param {string} requestId
1944
+ * @param {*} [options] Override http request option.
1945
+ * @throws {RequiredError}
1946
+ */
1947
+ wmpClientGetRequest: (walletId: string, requestId: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
1948
+ /**
1949
+ * Acts on a pending WMP client request identified by `request_id`. The body\'s `type` selects the action: `process_offer` a pending credential offer or `process_verification_request` a pending verification request (either returns its authorization requirements), `identity_assertion` to present a credential as the session identity assertion, or `authenticate` to open the session after the assertion exchange.
1898
1950
  * @param {string} walletId
1899
1951
  * @param {string} requestId
1900
1952
  * @param {WmpClientRequestBody} wmpClientRequestBody
@@ -1941,6 +1993,15 @@ export declare const DefaultApiAxiosParamCreator: (configuration?: Configuration
1941
1993
  * @throws {RequiredError}
1942
1994
  */
1943
1995
  wmpEntityList: (walletId: string, entityType: WmpEntityListEntityTypeEnum, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
1996
+ /**
1997
+ * Sends a free-form WMP message to a connected entity. The session is auto-resumed if its transport has dropped. The peer receives it as a `wmp.message` notification and can then read the message metadata from `GET /wmp/client/requests/{request_id}` and download its body via the download link it contains. The request is `multipart/form-data`. Supply the primary body as either the `body` text field (plain text) or a `body` file part (any content type, taken from the part).
1998
+ * @param {string} walletId
1999
+ * @param {string} entityId
2000
+ * @param {File} [body] The primary message body: a plain-text form value, or a file part whose Content-Type becomes the message content type.
2001
+ * @param {*} [options] Override http request option.
2002
+ * @throws {RequiredError}
2003
+ */
2004
+ wmpEntitySendMessage: (walletId: string, entityId: string, body?: File, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
1944
2005
  /**
1945
2006
  * Re-establishes or confirms the WebSocket connection to a WMP server entity. Used to reconnect after a dropped connection so the wallet can resume receiving pending requests.
1946
2007
  * @param {string} walletId
@@ -2487,7 +2548,15 @@ export declare const DefaultApiFp: (configuration?: Configuration) => {
2487
2548
  */
2488
2549
  wmpClientGetPendingRequests(walletId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<WmpRequest>>>;
2489
2550
  /**
2490
- * Acts on a pending WMP client request identified by `request_id`. The body\'s `type` selects the action: `process` a credential offer / verification request (returns its authorization requirements), `identity_assertion` to present a credential as the session identity assertion, or `authenticate` to open the session after the assertion exchange.
2551
+ * Returns metadata for the received message identified by `request_id` (delivered via a `wmp.message` notification carrying its id): its content type and body download link. The body is fetched as raw bytes from the download link included in the response (`bodyUrl`).
2552
+ * @param {string} walletId
2553
+ * @param {string} requestId
2554
+ * @param {*} [options] Override http request option.
2555
+ * @throws {RequiredError}
2556
+ */
2557
+ wmpClientGetRequest(walletId: string, requestId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<WmpMessage>>;
2558
+ /**
2559
+ * Acts on a pending WMP client request identified by `request_id`. The body\'s `type` selects the action: `process_offer` a pending credential offer or `process_verification_request` a pending verification request (either returns its authorization requirements), `identity_assertion` to present a credential as the session identity assertion, or `authenticate` to open the session after the assertion exchange.
2491
2560
  * @param {string} walletId
2492
2561
  * @param {string} requestId
2493
2562
  * @param {WmpClientRequestBody} wmpClientRequestBody
@@ -2534,6 +2603,15 @@ export declare const DefaultApiFp: (configuration?: Configuration) => {
2534
2603
  * @throws {RequiredError}
2535
2604
  */
2536
2605
  wmpEntityList(walletId: string, entityType: WmpEntityListEntityTypeEnum, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<WmpEntityRecord>>>;
2606
+ /**
2607
+ * Sends a free-form WMP message to a connected entity. The session is auto-resumed if its transport has dropped. The peer receives it as a `wmp.message` notification and can then read the message metadata from `GET /wmp/client/requests/{request_id}` and download its body via the download link it contains. The request is `multipart/form-data`. Supply the primary body as either the `body` text field (plain text) or a `body` file part (any content type, taken from the part).
2608
+ * @param {string} walletId
2609
+ * @param {string} entityId
2610
+ * @param {File} [body] The primary message body: a plain-text form value, or a file part whose Content-Type becomes the message content type.
2611
+ * @param {*} [options] Override http request option.
2612
+ * @throws {RequiredError}
2613
+ */
2614
+ wmpEntitySendMessage(walletId: string, entityId: string, body?: File, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>>;
2537
2615
  /**
2538
2616
  * Re-establishes or confirms the WebSocket connection to a WMP server entity. Used to reconnect after a dropped connection so the wallet can resume receiving pending requests.
2539
2617
  * @param {string} walletId
@@ -3080,7 +3158,15 @@ export declare const DefaultApiFactory: (configuration?: Configuration, basePath
3080
3158
  */
3081
3159
  wmpClientGetPendingRequests(walletId: string, options?: RawAxiosRequestConfig): AxiosPromise<Array<WmpRequest>>;
3082
3160
  /**
3083
- * Acts on a pending WMP client request identified by `request_id`. The body\'s `type` selects the action: `process` a credential offer / verification request (returns its authorization requirements), `identity_assertion` to present a credential as the session identity assertion, or `authenticate` to open the session after the assertion exchange.
3161
+ * Returns metadata for the received message identified by `request_id` (delivered via a `wmp.message` notification carrying its id): its content type and body download link. The body is fetched as raw bytes from the download link included in the response (`bodyUrl`).
3162
+ * @param {string} walletId
3163
+ * @param {string} requestId
3164
+ * @param {*} [options] Override http request option.
3165
+ * @throws {RequiredError}
3166
+ */
3167
+ wmpClientGetRequest(walletId: string, requestId: string, options?: RawAxiosRequestConfig): AxiosPromise<WmpMessage>;
3168
+ /**
3169
+ * Acts on a pending WMP client request identified by `request_id`. The body\'s `type` selects the action: `process_offer` a pending credential offer or `process_verification_request` a pending verification request (either returns its authorization requirements), `identity_assertion` to present a credential as the session identity assertion, or `authenticate` to open the session after the assertion exchange.
3084
3170
  * @param {string} walletId
3085
3171
  * @param {string} requestId
3086
3172
  * @param {WmpClientRequestBody} wmpClientRequestBody
@@ -3127,6 +3213,15 @@ export declare const DefaultApiFactory: (configuration?: Configuration, basePath
3127
3213
  * @throws {RequiredError}
3128
3214
  */
3129
3215
  wmpEntityList(walletId: string, entityType: WmpEntityListEntityTypeEnum, options?: RawAxiosRequestConfig): AxiosPromise<Array<WmpEntityRecord>>;
3216
+ /**
3217
+ * Sends a free-form WMP message to a connected entity. The session is auto-resumed if its transport has dropped. The peer receives it as a `wmp.message` notification and can then read the message metadata from `GET /wmp/client/requests/{request_id}` and download its body via the download link it contains. The request is `multipart/form-data`. Supply the primary body as either the `body` text field (plain text) or a `body` file part (any content type, taken from the part).
3218
+ * @param {string} walletId
3219
+ * @param {string} entityId
3220
+ * @param {File} [body] The primary message body: a plain-text form value, or a file part whose Content-Type becomes the message content type.
3221
+ * @param {*} [options] Override http request option.
3222
+ * @throws {RequiredError}
3223
+ */
3224
+ wmpEntitySendMessage(walletId: string, entityId: string, body?: File, options?: RawAxiosRequestConfig): AxiosPromise<void>;
3130
3225
  /**
3131
3226
  * Re-establishes or confirms the WebSocket connection to a WMP server entity. Used to reconnect after a dropped connection so the wallet can resume receiving pending requests.
3132
3227
  * @param {string} walletId
@@ -3673,7 +3768,15 @@ export declare class DefaultApi extends BaseAPI {
3673
3768
  */
3674
3769
  wmpClientGetPendingRequests(walletId: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<WmpRequest[], any, {}>>;
3675
3770
  /**
3676
- * Acts on a pending WMP client request identified by `request_id`. The body\'s `type` selects the action: `process` a credential offer / verification request (returns its authorization requirements), `identity_assertion` to present a credential as the session identity assertion, or `authenticate` to open the session after the assertion exchange.
3771
+ * Returns metadata for the received message identified by `request_id` (delivered via a `wmp.message` notification carrying its id): its content type and body download link. The body is fetched as raw bytes from the download link included in the response (`bodyUrl`).
3772
+ * @param {string} walletId
3773
+ * @param {string} requestId
3774
+ * @param {*} [options] Override http request option.
3775
+ * @throws {RequiredError}
3776
+ */
3777
+ wmpClientGetRequest(walletId: string, requestId: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<WmpMessage, any, {}>>;
3778
+ /**
3779
+ * Acts on a pending WMP client request identified by `request_id`. The body\'s `type` selects the action: `process_offer` a pending credential offer or `process_verification_request` a pending verification request (either returns its authorization requirements), `identity_assertion` to present a credential as the session identity assertion, or `authenticate` to open the session after the assertion exchange.
3677
3780
  * @param {string} walletId
3678
3781
  * @param {string} requestId
3679
3782
  * @param {WmpClientRequestBody} wmpClientRequestBody
@@ -3720,6 +3823,15 @@ export declare class DefaultApi extends BaseAPI {
3720
3823
  * @throws {RequiredError}
3721
3824
  */
3722
3825
  wmpEntityList(walletId: string, entityType: WmpEntityListEntityTypeEnum, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<WmpEntityRecord[], any, {}>>;
3826
+ /**
3827
+ * Sends a free-form WMP message to a connected entity. The session is auto-resumed if its transport has dropped. The peer receives it as a `wmp.message` notification and can then read the message metadata from `GET /wmp/client/requests/{request_id}` and download its body via the download link it contains. The request is `multipart/form-data`. Supply the primary body as either the `body` text field (plain text) or a `body` file part (any content type, taken from the part).
3828
+ * @param {string} walletId
3829
+ * @param {string} entityId
3830
+ * @param {File} [body] The primary message body: a plain-text form value, or a file part whose Content-Type becomes the message content type.
3831
+ * @param {*} [options] Override http request option.
3832
+ * @throws {RequiredError}
3833
+ */
3834
+ wmpEntitySendMessage(walletId: string, entityId: string, body?: File, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any, {}>>;
3723
3835
  /**
3724
3836
  * Re-establishes or confirms the WebSocket connection to a WMP server entity. Used to reconnect after a dropped connection so the wallet can resume receiving pending requests.
3725
3837
  * @param {string} walletId
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.WmpEntityListEntityTypeEnum = exports.CredentialListInteractionEnum = exports.DefaultApi = exports.DefaultApiFactory = exports.DefaultApiFp = exports.DefaultApiAxiosParamCreator = exports.XadesSignatureType = exports.WmpRequestType = exports.WmpProvideIdentityAssertionTypeEnum = exports.WmpProcessClientRequestTypeEnum = exports.WmpAuthenticateSessionTypeEnum = exports.WalletNotificationEventType = exports.WalletCapability = exports.TrustListKind = exports.TrustFrameworkType = exports.SystemImpactStatusEnum = exports.SigningKeyIdentifier = exports.RevokeAccreditationRequestTypeEnum = exports.PresentationDefinitionSubmissionRequirementsRuleEnum = exports.OidcRevisionOidc4vpEnum = exports.OidcRevisionOidc4vciEnum = exports.ObjectVerticalAlignment = exports.ObjectHorizontalAlignment = exports.ListSort = exports.InteractionAuthorizationRequirementsRequirementTypeEnum = exports.HealthStatusStatusEnum = exports.EntityAccreditationRequestTypeEnum = exports.DocumentSignatureValidityVerificationResultEnum = exports.DeferredStatusEnum = exports.CredentialPropertyToVerify = exports.CredentialNotificationEventTypeEnum = exports.CredentialMetadataStatusEnum = exports.CredentialMetadataInteractionEnum = exports.CredentialIssuerDefinitionAuthorizationEnum = exports.CredentialIssuerDefinitionCredentialIssuerEnum = exports.CredentialFormat = exports.CertificateStatus = exports.AccreditationRequestTypeEnum = void 0;
28
+ exports.WmpEntityListEntityTypeEnum = exports.CredentialListInteractionEnum = exports.DefaultApi = exports.DefaultApiFactory = exports.DefaultApiFp = exports.DefaultApiAxiosParamCreator = exports.XadesSignatureType = exports.WmpRequestType = exports.WmpProvideIdentityAssertionTypeEnum = exports.WmpProcessVerificationRequestTypeEnum = exports.WmpProcessOfferRequestTypeEnum = exports.WmpAuthenticateSessionTypeEnum = exports.WalletNotificationEventType = exports.WalletCapability = exports.TrustListKind = exports.TrustFrameworkType = exports.SystemImpactStatusEnum = exports.SigningKeyIdentifier = exports.RevokeAccreditationRequestTypeEnum = exports.PresentationDefinitionSubmissionRequirementsRuleEnum = exports.OidcRevisionOidc4vpEnum = exports.OidcRevisionOidc4vciEnum = exports.ObjectVerticalAlignment = exports.ObjectHorizontalAlignment = exports.ListSort = exports.InteractionAuthorizationRequirementsRequirementTypeEnum = exports.HealthStatusStatusEnum = exports.EntityAccreditationRequestTypeEnum = exports.DocumentSignatureValidityVerificationResultEnum = exports.DeferredStatusEnum = exports.CredentialPropertyToVerify = exports.CredentialNotificationEventTypeEnum = exports.CredentialMetadataStatusEnum = exports.CredentialMetadataInteractionEnum = exports.CredentialIssuerDefinitionAuthorizationEnum = exports.CredentialIssuerDefinitionCredentialIssuerEnum = exports.CredentialFormat = exports.CertificateStatus = exports.AccreditationRequestTypeEnum = void 0;
29
29
  const axios_1 = __importDefault(require("axios"));
30
30
  // Some imports not used depending on template conditions
31
31
  // @ts-ignore
@@ -211,8 +211,11 @@ exports.WalletNotificationEventType = {
211
211
  exports.WmpAuthenticateSessionTypeEnum = {
212
212
  Authenticate: 'authenticate',
213
213
  };
214
- exports.WmpProcessClientRequestTypeEnum = {
215
- Process: 'process',
214
+ exports.WmpProcessOfferRequestTypeEnum = {
215
+ ProcessOffer: 'process_offer',
216
+ };
217
+ exports.WmpProcessVerificationRequestTypeEnum = {
218
+ ProcessVerificationRequest: 'process_verification_request',
216
219
  };
217
220
  exports.WmpProvideIdentityAssertionTypeEnum = {
218
221
  IdentityAssertion: 'identity_assertion',
@@ -2685,7 +2688,45 @@ const DefaultApiAxiosParamCreator = function (configuration) {
2685
2688
  };
2686
2689
  }),
2687
2690
  /**
2688
- * Acts on a pending WMP client request identified by `request_id`. The body\'s `type` selects the action: `process` a credential offer / verification request (returns its authorization requirements), `identity_assertion` to present a credential as the session identity assertion, or `authenticate` to open the session after the assertion exchange.
2691
+ * Returns metadata for the received message identified by `request_id` (delivered via a `wmp.message` notification carrying its id): its content type and body download link. The body is fetched as raw bytes from the download link included in the response (`bodyUrl`).
2692
+ * @param {string} walletId
2693
+ * @param {string} requestId
2694
+ * @param {*} [options] Override http request option.
2695
+ * @throws {RequiredError}
2696
+ */
2697
+ wmpClientGetRequest: (walletId_1, requestId_1, ...args_1) => __awaiter(this, [walletId_1, requestId_1, ...args_1], void 0, function* (walletId, requestId, options = {}) {
2698
+ // verify required parameter 'walletId' is not null or undefined
2699
+ (0, common_1.assertParamExists)('wmpClientGetRequest', 'walletId', walletId);
2700
+ // verify required parameter 'requestId' is not null or undefined
2701
+ (0, common_1.assertParamExists)('wmpClientGetRequest', 'requestId', requestId);
2702
+ const localVarPath = `/wmp/client/requests/{request_id}`
2703
+ .replace('{request_id}', encodeURIComponent(String(requestId)));
2704
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2705
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
2706
+ let baseOptions;
2707
+ if (configuration) {
2708
+ baseOptions = configuration.baseOptions;
2709
+ }
2710
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
2711
+ const localVarHeaderParameter = {};
2712
+ const localVarQueryParameter = {};
2713
+ // authentication accessToken required
2714
+ // http bearer authentication required
2715
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
2716
+ localVarHeaderParameter['Accept'] = 'application/json';
2717
+ if (walletId != null) {
2718
+ localVarHeaderParameter['wallet-id'] = String(walletId);
2719
+ }
2720
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
2721
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2722
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2723
+ return {
2724
+ url: (0, common_1.toPathString)(localVarUrlObj),
2725
+ options: localVarRequestOptions,
2726
+ };
2727
+ }),
2728
+ /**
2729
+ * Acts on a pending WMP client request identified by `request_id`. The body\'s `type` selects the action: `process_offer` a pending credential offer or `process_verification_request` a pending verification request (either returns its authorization requirements), `identity_assertion` to present a credential as the session identity assertion, or `authenticate` to open the session after the assertion exchange.
2689
2730
  * @param {string} walletId
2690
2731
  * @param {string} requestId
2691
2732
  * @param {WmpClientRequestBody} wmpClientRequestBody
@@ -2915,6 +2956,51 @@ const DefaultApiAxiosParamCreator = function (configuration) {
2915
2956
  options: localVarRequestOptions,
2916
2957
  };
2917
2958
  }),
2959
+ /**
2960
+ * Sends a free-form WMP message to a connected entity. The session is auto-resumed if its transport has dropped. The peer receives it as a `wmp.message` notification and can then read the message metadata from `GET /wmp/client/requests/{request_id}` and download its body via the download link it contains. The request is `multipart/form-data`. Supply the primary body as either the `body` text field (plain text) or a `body` file part (any content type, taken from the part).
2961
+ * @param {string} walletId
2962
+ * @param {string} entityId
2963
+ * @param {File} [body] The primary message body: a plain-text form value, or a file part whose Content-Type becomes the message content type.
2964
+ * @param {*} [options] Override http request option.
2965
+ * @throws {RequiredError}
2966
+ */
2967
+ wmpEntitySendMessage: (walletId_1, entityId_1, body_1, ...args_1) => __awaiter(this, [walletId_1, entityId_1, body_1, ...args_1], void 0, function* (walletId, entityId, body, options = {}) {
2968
+ // verify required parameter 'walletId' is not null or undefined
2969
+ (0, common_1.assertParamExists)('wmpEntitySendMessage', 'walletId', walletId);
2970
+ // verify required parameter 'entityId' is not null or undefined
2971
+ (0, common_1.assertParamExists)('wmpEntitySendMessage', 'entityId', entityId);
2972
+ const localVarPath = `/wmp/entities/{entity_id}/messages`
2973
+ .replace('{entity_id}', encodeURIComponent(String(entityId)));
2974
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2975
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
2976
+ let baseOptions;
2977
+ if (configuration) {
2978
+ baseOptions = configuration.baseOptions;
2979
+ }
2980
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
2981
+ const localVarHeaderParameter = {};
2982
+ const localVarQueryParameter = {};
2983
+ const localVarFormParams = new ((configuration && configuration.formDataCtor) || FormData)();
2984
+ // authentication accessToken required
2985
+ // http bearer authentication required
2986
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
2987
+ if (body !== undefined) {
2988
+ localVarFormParams.append('body', body);
2989
+ }
2990
+ localVarHeaderParameter['Content-Type'] = 'multipart/form-data';
2991
+ localVarHeaderParameter['Accept'] = 'application/json';
2992
+ if (walletId != null) {
2993
+ localVarHeaderParameter['wallet-id'] = String(walletId);
2994
+ }
2995
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
2996
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2997
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2998
+ localVarRequestOptions.data = localVarFormParams;
2999
+ return {
3000
+ url: (0, common_1.toPathString)(localVarUrlObj),
3001
+ options: localVarRequestOptions,
3002
+ };
3003
+ }),
2918
3004
  /**
2919
3005
  * Re-establishes or confirms the WebSocket connection to a WMP server entity. Used to reconnect after a dropped connection so the wallet can resume receiving pending requests.
2920
3006
  * @param {string} walletId
@@ -4021,7 +4107,23 @@ const DefaultApiFp = function (configuration) {
4021
4107
  });
4022
4108
  },
4023
4109
  /**
4024
- * Acts on a pending WMP client request identified by `request_id`. The body\'s `type` selects the action: `process` a credential offer / verification request (returns its authorization requirements), `identity_assertion` to present a credential as the session identity assertion, or `authenticate` to open the session after the assertion exchange.
4110
+ * Returns metadata for the received message identified by `request_id` (delivered via a `wmp.message` notification carrying its id): its content type and body download link. The body is fetched as raw bytes from the download link included in the response (`bodyUrl`).
4111
+ * @param {string} walletId
4112
+ * @param {string} requestId
4113
+ * @param {*} [options] Override http request option.
4114
+ * @throws {RequiredError}
4115
+ */
4116
+ wmpClientGetRequest(walletId, requestId, options) {
4117
+ return __awaiter(this, void 0, void 0, function* () {
4118
+ var _a, _b, _c;
4119
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.wmpClientGetRequest(walletId, requestId, options);
4120
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
4121
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['DefaultApi.wmpClientGetRequest']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
4122
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
4123
+ });
4124
+ },
4125
+ /**
4126
+ * Acts on a pending WMP client request identified by `request_id`. The body\'s `type` selects the action: `process_offer` a pending credential offer or `process_verification_request` a pending verification request (either returns its authorization requirements), `identity_assertion` to present a credential as the session identity assertion, or `authenticate` to open the session after the assertion exchange.
4025
4127
  * @param {string} walletId
4026
4128
  * @param {string} requestId
4027
4129
  * @param {WmpClientRequestBody} wmpClientRequestBody
@@ -4116,6 +4218,23 @@ const DefaultApiFp = function (configuration) {
4116
4218
  return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
4117
4219
  });
4118
4220
  },
4221
+ /**
4222
+ * Sends a free-form WMP message to a connected entity. The session is auto-resumed if its transport has dropped. The peer receives it as a `wmp.message` notification and can then read the message metadata from `GET /wmp/client/requests/{request_id}` and download its body via the download link it contains. The request is `multipart/form-data`. Supply the primary body as either the `body` text field (plain text) or a `body` file part (any content type, taken from the part).
4223
+ * @param {string} walletId
4224
+ * @param {string} entityId
4225
+ * @param {File} [body] The primary message body: a plain-text form value, or a file part whose Content-Type becomes the message content type.
4226
+ * @param {*} [options] Override http request option.
4227
+ * @throws {RequiredError}
4228
+ */
4229
+ wmpEntitySendMessage(walletId, entityId, body, options) {
4230
+ return __awaiter(this, void 0, void 0, function* () {
4231
+ var _a, _b, _c;
4232
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.wmpEntitySendMessage(walletId, entityId, body, options);
4233
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
4234
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['DefaultApi.wmpEntitySendMessage']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
4235
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
4236
+ });
4237
+ },
4119
4238
  /**
4120
4239
  * Re-establishes or confirms the WebSocket connection to a WMP server entity. Used to reconnect after a dropped connection so the wallet can resume receiving pending requests.
4121
4240
  * @param {string} walletId
@@ -4804,7 +4923,17 @@ const DefaultApiFactory = function (configuration, basePath, axios) {
4804
4923
  return localVarFp.wmpClientGetPendingRequests(walletId, options).then((request) => request(axios, basePath));
4805
4924
  },
4806
4925
  /**
4807
- * Acts on a pending WMP client request identified by `request_id`. The body\'s `type` selects the action: `process` a credential offer / verification request (returns its authorization requirements), `identity_assertion` to present a credential as the session identity assertion, or `authenticate` to open the session after the assertion exchange.
4926
+ * Returns metadata for the received message identified by `request_id` (delivered via a `wmp.message` notification carrying its id): its content type and body download link. The body is fetched as raw bytes from the download link included in the response (`bodyUrl`).
4927
+ * @param {string} walletId
4928
+ * @param {string} requestId
4929
+ * @param {*} [options] Override http request option.
4930
+ * @throws {RequiredError}
4931
+ */
4932
+ wmpClientGetRequest(walletId, requestId, options) {
4933
+ return localVarFp.wmpClientGetRequest(walletId, requestId, options).then((request) => request(axios, basePath));
4934
+ },
4935
+ /**
4936
+ * Acts on a pending WMP client request identified by `request_id`. The body\'s `type` selects the action: `process_offer` a pending credential offer or `process_verification_request` a pending verification request (either returns its authorization requirements), `identity_assertion` to present a credential as the session identity assertion, or `authenticate` to open the session after the assertion exchange.
4808
4937
  * @param {string} walletId
4809
4938
  * @param {string} requestId
4810
4939
  * @param {WmpClientRequestBody} wmpClientRequestBody
@@ -4863,6 +4992,17 @@ const DefaultApiFactory = function (configuration, basePath, axios) {
4863
4992
  wmpEntityList(walletId, entityType, options) {
4864
4993
  return localVarFp.wmpEntityList(walletId, entityType, options).then((request) => request(axios, basePath));
4865
4994
  },
4995
+ /**
4996
+ * Sends a free-form WMP message to a connected entity. The session is auto-resumed if its transport has dropped. The peer receives it as a `wmp.message` notification and can then read the message metadata from `GET /wmp/client/requests/{request_id}` and download its body via the download link it contains. The request is `multipart/form-data`. Supply the primary body as either the `body` text field (plain text) or a `body` file part (any content type, taken from the part).
4997
+ * @param {string} walletId
4998
+ * @param {string} entityId
4999
+ * @param {File} [body] The primary message body: a plain-text form value, or a file part whose Content-Type becomes the message content type.
5000
+ * @param {*} [options] Override http request option.
5001
+ * @throws {RequiredError}
5002
+ */
5003
+ wmpEntitySendMessage(walletId, entityId, body, options) {
5004
+ return localVarFp.wmpEntitySendMessage(walletId, entityId, body, options).then((request) => request(axios, basePath));
5005
+ },
4866
5006
  /**
4867
5007
  * Re-establishes or confirms the WebSocket connection to a WMP server entity. Used to reconnect after a dropped connection so the wallet can resume receiving pending requests.
4868
5008
  * @param {string} walletId
@@ -5543,7 +5683,17 @@ class DefaultApi extends base_1.BaseAPI {
5543
5683
  return (0, exports.DefaultApiFp)(this.configuration).wmpClientGetPendingRequests(walletId, options).then((request) => request(this.axios, this.basePath));
5544
5684
  }
5545
5685
  /**
5546
- * Acts on a pending WMP client request identified by `request_id`. The body\'s `type` selects the action: `process` a credential offer / verification request (returns its authorization requirements), `identity_assertion` to present a credential as the session identity assertion, or `authenticate` to open the session after the assertion exchange.
5686
+ * Returns metadata for the received message identified by `request_id` (delivered via a `wmp.message` notification carrying its id): its content type and body download link. The body is fetched as raw bytes from the download link included in the response (`bodyUrl`).
5687
+ * @param {string} walletId
5688
+ * @param {string} requestId
5689
+ * @param {*} [options] Override http request option.
5690
+ * @throws {RequiredError}
5691
+ */
5692
+ wmpClientGetRequest(walletId, requestId, options) {
5693
+ return (0, exports.DefaultApiFp)(this.configuration).wmpClientGetRequest(walletId, requestId, options).then((request) => request(this.axios, this.basePath));
5694
+ }
5695
+ /**
5696
+ * Acts on a pending WMP client request identified by `request_id`. The body\'s `type` selects the action: `process_offer` a pending credential offer or `process_verification_request` a pending verification request (either returns its authorization requirements), `identity_assertion` to present a credential as the session identity assertion, or `authenticate` to open the session after the assertion exchange.
5547
5697
  * @param {string} walletId
5548
5698
  * @param {string} requestId
5549
5699
  * @param {WmpClientRequestBody} wmpClientRequestBody
@@ -5602,6 +5752,17 @@ class DefaultApi extends base_1.BaseAPI {
5602
5752
  wmpEntityList(walletId, entityType, options) {
5603
5753
  return (0, exports.DefaultApiFp)(this.configuration).wmpEntityList(walletId, entityType, options).then((request) => request(this.axios, this.basePath));
5604
5754
  }
5755
+ /**
5756
+ * Sends a free-form WMP message to a connected entity. The session is auto-resumed if its transport has dropped. The peer receives it as a `wmp.message` notification and can then read the message metadata from `GET /wmp/client/requests/{request_id}` and download its body via the download link it contains. The request is `multipart/form-data`. Supply the primary body as either the `body` text field (plain text) or a `body` file part (any content type, taken from the part).
5757
+ * @param {string} walletId
5758
+ * @param {string} entityId
5759
+ * @param {File} [body] The primary message body: a plain-text form value, or a file part whose Content-Type becomes the message content type.
5760
+ * @param {*} [options] Override http request option.
5761
+ * @throws {RequiredError}
5762
+ */
5763
+ wmpEntitySendMessage(walletId, entityId, body, options) {
5764
+ return (0, exports.DefaultApiFp)(this.configuration).wmpEntitySendMessage(walletId, entityId, body, options).then((request) => request(this.axios, this.basePath));
5765
+ }
5605
5766
  /**
5606
5767
  * Re-establishes or confirms the WebSocket connection to a WMP server entity. Used to reconnect after a dropped connection so the wallet can resume receiving pending requests.
5607
5768
  * @param {string} walletId
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@triveria/wallet",
3
3
  "private": false,
4
- "version": "0.0.307",
4
+ "version": "0.0.309",
5
5
  "description": "",
6
6
  "main": "index.js",
7
7
  "scripts": {