@triveria/wallet 0.0.117 → 0.0.118

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 +94 -34
  2. package/api.js +124 -0
  3. package/package.json +1 -1
package/api.d.ts CHANGED
@@ -13,31 +13,6 @@ import type { Configuration } from './configuration';
13
13
  import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
14
14
  import type { RequestArgs } from './base';
15
15
  import { BaseAPI } from './base';
16
- /**
17
- *
18
- * @export
19
- * @interface AccessTokenResponse
20
- */
21
- export interface AccessTokenResponse {
22
- /**
23
- *
24
- * @type {string}
25
- * @memberof AccessTokenResponse
26
- */
27
- 'access_token': string;
28
- /**
29
- *
30
- * @type {string}
31
- * @memberof AccessTokenResponse
32
- */
33
- 'token_type': string;
34
- /**
35
- *
36
- * @type {string}
37
- * @memberof AccessTokenResponse
38
- */
39
- 'expires_in': string;
40
- }
41
16
  /**
42
17
  * TBD
43
18
  * @export
@@ -856,6 +831,44 @@ export interface ModelError {
856
831
  */
857
832
  'Message': string;
858
833
  }
834
+ /**
835
+ *
836
+ * @export
837
+ * @interface Oauth2AccessTokenResponse
838
+ */
839
+ export interface Oauth2AccessTokenResponse {
840
+ /**
841
+ *
842
+ * @type {string}
843
+ * @memberof Oauth2AccessTokenResponse
844
+ */
845
+ 'access_token': string;
846
+ /**
847
+ *
848
+ * @type {string}
849
+ * @memberof Oauth2AccessTokenResponse
850
+ */
851
+ 'token_type': string;
852
+ /**
853
+ *
854
+ * @type {string}
855
+ * @memberof Oauth2AccessTokenResponse
856
+ */
857
+ 'expires_in': string;
858
+ }
859
+ /**
860
+ *
861
+ * @export
862
+ * @interface Oauth2RedirectUriResponse
863
+ */
864
+ export interface Oauth2RedirectUriResponse {
865
+ /**
866
+ *
867
+ * @type {string}
868
+ * @memberof Oauth2RedirectUriResponse
869
+ */
870
+ 'redirect_uri': string;
871
+ }
859
872
  /**
860
873
  *
861
874
  * @export
@@ -1232,12 +1245,6 @@ export interface VerifyInitRequest {
1232
1245
  * @memberof VerifyInitRequest
1233
1246
  */
1234
1247
  'verifierScope': string;
1235
- /**
1236
- * Unique ID of a verifier state to which can be used later to retrieve verified data from a temporary storage.
1237
- * @type {string}
1238
- * @memberof VerifyInitRequest
1239
- */
1240
- 'verifierState'?: string;
1241
1248
  }
1242
1249
  /**
1243
1250
  *
@@ -1561,6 +1568,19 @@ export declare const DefaultApiAxiosParamCreator: (configuration?: Configuration
1561
1568
  * @throws {RequiredError}
1562
1569
  */
1563
1570
  issuerCredentialTypesList: (url: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
1571
+ /**
1572
+ *
1573
+ * @param {string} walletId
1574
+ * @param {string} scope
1575
+ * @param {string} clientId
1576
+ * @param {string} redirectUri
1577
+ * @param {string} responseType
1578
+ * @param {string} state
1579
+ * @param {string} nonce
1580
+ * @param {*} [options] Override http request option.
1581
+ * @throws {RequiredError}
1582
+ */
1583
+ oauth2Auth: (walletId: string, scope: string, clientId: string, redirectUri: string, responseType: string, state: string, nonce: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
1564
1584
  /**
1565
1585
  *
1566
1586
  * @param {string} grantType Value MUST be set to \\\&quot;authorization_code\\\&quot;.
@@ -1853,6 +1873,19 @@ export declare const DefaultApiFp: (configuration?: Configuration) => {
1853
1873
  * @throws {RequiredError}
1854
1874
  */
1855
1875
  issuerCredentialTypesList(url: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<CredentialType>>>;
1876
+ /**
1877
+ *
1878
+ * @param {string} walletId
1879
+ * @param {string} scope
1880
+ * @param {string} clientId
1881
+ * @param {string} redirectUri
1882
+ * @param {string} responseType
1883
+ * @param {string} state
1884
+ * @param {string} nonce
1885
+ * @param {*} [options] Override http request option.
1886
+ * @throws {RequiredError}
1887
+ */
1888
+ oauth2Auth(walletId: string, scope: string, clientId: string, redirectUri: string, responseType: string, state: string, nonce: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Oauth2RedirectUriResponse>>;
1856
1889
  /**
1857
1890
  *
1858
1891
  * @param {string} grantType Value MUST be set to \\\&quot;authorization_code\\\&quot;.
@@ -1862,7 +1895,7 @@ export declare const DefaultApiFp: (configuration?: Configuration) => {
1862
1895
  * @param {*} [options] Override http request option.
1863
1896
  * @throws {RequiredError}
1864
1897
  */
1865
- oauth2Token(grantType: string, code: string, redirectUri?: string, clientId?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AccessTokenResponse>>;
1898
+ oauth2Token(grantType: string, code: string, redirectUri?: string, clientId?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Oauth2AccessTokenResponse>>;
1866
1899
  /**
1867
1900
  * Issue verifiable credential using OIDC4VCI offer acceptance
1868
1901
  * @param {string} walletId
@@ -2145,6 +2178,19 @@ export declare const DefaultApiFactory: (configuration?: Configuration, basePath
2145
2178
  * @throws {RequiredError}
2146
2179
  */
2147
2180
  issuerCredentialTypesList(url: string, options?: any): AxiosPromise<Array<CredentialType>>;
2181
+ /**
2182
+ *
2183
+ * @param {string} walletId
2184
+ * @param {string} scope
2185
+ * @param {string} clientId
2186
+ * @param {string} redirectUri
2187
+ * @param {string} responseType
2188
+ * @param {string} state
2189
+ * @param {string} nonce
2190
+ * @param {*} [options] Override http request option.
2191
+ * @throws {RequiredError}
2192
+ */
2193
+ oauth2Auth(walletId: string, scope: string, clientId: string, redirectUri: string, responseType: string, state: string, nonce: string, options?: any): AxiosPromise<Oauth2RedirectUriResponse>;
2148
2194
  /**
2149
2195
  *
2150
2196
  * @param {string} grantType Value MUST be set to \\\&quot;authorization_code\\\&quot;.
@@ -2154,7 +2200,7 @@ export declare const DefaultApiFactory: (configuration?: Configuration, basePath
2154
2200
  * @param {*} [options] Override http request option.
2155
2201
  * @throws {RequiredError}
2156
2202
  */
2157
- oauth2Token(grantType: string, code: string, redirectUri?: string, clientId?: string, options?: any): AxiosPromise<AccessTokenResponse>;
2203
+ oauth2Token(grantType: string, code: string, redirectUri?: string, clientId?: string, options?: any): AxiosPromise<Oauth2AccessTokenResponse>;
2158
2204
  /**
2159
2205
  * Issue verifiable credential using OIDC4VCI offer acceptance
2160
2206
  * @param {string} walletId
@@ -2455,6 +2501,20 @@ export declare class DefaultApi extends BaseAPI {
2455
2501
  * @memberof DefaultApi
2456
2502
  */
2457
2503
  issuerCredentialTypesList(url: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<CredentialType[], any>>;
2504
+ /**
2505
+ *
2506
+ * @param {string} walletId
2507
+ * @param {string} scope
2508
+ * @param {string} clientId
2509
+ * @param {string} redirectUri
2510
+ * @param {string} responseType
2511
+ * @param {string} state
2512
+ * @param {string} nonce
2513
+ * @param {*} [options] Override http request option.
2514
+ * @throws {RequiredError}
2515
+ * @memberof DefaultApi
2516
+ */
2517
+ oauth2Auth(walletId: string, scope: string, clientId: string, redirectUri: string, responseType: string, state: string, nonce: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<Oauth2RedirectUriResponse, any>>;
2458
2518
  /**
2459
2519
  *
2460
2520
  * @param {string} grantType Value MUST be set to \\\&quot;authorization_code\\\&quot;.
@@ -2465,7 +2525,7 @@ export declare class DefaultApi extends BaseAPI {
2465
2525
  * @throws {RequiredError}
2466
2526
  * @memberof DefaultApi
2467
2527
  */
2468
- oauth2Token(grantType: string, code: string, redirectUri?: string, clientId?: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<AccessTokenResponse, any>>;
2528
+ oauth2Token(grantType: string, code: string, redirectUri?: string, clientId?: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<Oauth2AccessTokenResponse, any>>;
2469
2529
  /**
2470
2530
  * Issue verifiable credential using OIDC4VCI offer acceptance
2471
2531
  * @param {string} walletId
package/api.js CHANGED
@@ -663,6 +663,78 @@ const DefaultApiAxiosParamCreator = function (configuration) {
663
663
  options: localVarRequestOptions,
664
664
  };
665
665
  }),
666
+ /**
667
+ *
668
+ * @param {string} walletId
669
+ * @param {string} scope
670
+ * @param {string} clientId
671
+ * @param {string} redirectUri
672
+ * @param {string} responseType
673
+ * @param {string} state
674
+ * @param {string} nonce
675
+ * @param {*} [options] Override http request option.
676
+ * @throws {RequiredError}
677
+ */
678
+ oauth2Auth: (walletId, scope, clientId, redirectUri, responseType, state, nonce, options = {}) => __awaiter(this, void 0, void 0, function* () {
679
+ // verify required parameter 'walletId' is not null or undefined
680
+ (0, common_1.assertParamExists)('oauth2Auth', 'walletId', walletId);
681
+ // verify required parameter 'scope' is not null or undefined
682
+ (0, common_1.assertParamExists)('oauth2Auth', 'scope', scope);
683
+ // verify required parameter 'clientId' is not null or undefined
684
+ (0, common_1.assertParamExists)('oauth2Auth', 'clientId', clientId);
685
+ // verify required parameter 'redirectUri' is not null or undefined
686
+ (0, common_1.assertParamExists)('oauth2Auth', 'redirectUri', redirectUri);
687
+ // verify required parameter 'responseType' is not null or undefined
688
+ (0, common_1.assertParamExists)('oauth2Auth', 'responseType', responseType);
689
+ // verify required parameter 'state' is not null or undefined
690
+ (0, common_1.assertParamExists)('oauth2Auth', 'state', state);
691
+ // verify required parameter 'nonce' is not null or undefined
692
+ (0, common_1.assertParamExists)('oauth2Auth', 'nonce', nonce);
693
+ const localVarPath = `/oauth2/auth`;
694
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
695
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
696
+ let baseOptions;
697
+ if (configuration) {
698
+ baseOptions = configuration.baseOptions;
699
+ }
700
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
701
+ const localVarHeaderParameter = {};
702
+ const localVarQueryParameter = {};
703
+ const localVarFormParams = new URLSearchParams();
704
+ // authentication accessToken required
705
+ // http bearer authentication required
706
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
707
+ if (walletId != null) {
708
+ localVarHeaderParameter['wallet-id'] = String(walletId);
709
+ }
710
+ if (scope !== undefined) {
711
+ localVarFormParams.set('scope', scope);
712
+ }
713
+ if (clientId !== undefined) {
714
+ localVarFormParams.set('client_id', clientId);
715
+ }
716
+ if (redirectUri !== undefined) {
717
+ localVarFormParams.set('redirect_uri', redirectUri);
718
+ }
719
+ if (responseType !== undefined) {
720
+ localVarFormParams.set('response_type', responseType);
721
+ }
722
+ if (state !== undefined) {
723
+ localVarFormParams.set('state', state);
724
+ }
725
+ if (nonce !== undefined) {
726
+ localVarFormParams.set('nonce', nonce);
727
+ }
728
+ localVarHeaderParameter['Content-Type'] = 'application/x-www-form-urlencoded';
729
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
730
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
731
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
732
+ localVarRequestOptions.data = localVarFormParams.toString();
733
+ return {
734
+ url: (0, common_1.toPathString)(localVarUrlObj),
735
+ options: localVarRequestOptions,
736
+ };
737
+ }),
666
738
  /**
667
739
  *
668
740
  * @param {string} grantType Value MUST be set to \\\&quot;authorization_code\\\&quot;.
@@ -1628,6 +1700,27 @@ const DefaultApiFp = function (configuration) {
1628
1700
  return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1629
1701
  });
1630
1702
  },
1703
+ /**
1704
+ *
1705
+ * @param {string} walletId
1706
+ * @param {string} scope
1707
+ * @param {string} clientId
1708
+ * @param {string} redirectUri
1709
+ * @param {string} responseType
1710
+ * @param {string} state
1711
+ * @param {string} nonce
1712
+ * @param {*} [options] Override http request option.
1713
+ * @throws {RequiredError}
1714
+ */
1715
+ oauth2Auth(walletId, scope, clientId, redirectUri, responseType, state, nonce, options) {
1716
+ var _a, _b, _c;
1717
+ return __awaiter(this, void 0, void 0, function* () {
1718
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.oauth2Auth(walletId, scope, clientId, redirectUri, responseType, state, nonce, options);
1719
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1720
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['DefaultApi.oauth2Auth']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1721
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1722
+ });
1723
+ },
1631
1724
  /**
1632
1725
  *
1633
1726
  * @param {string} grantType Value MUST be set to \\\&quot;authorization_code\\\&quot;.
@@ -2116,6 +2209,21 @@ const DefaultApiFactory = function (configuration, basePath, axios) {
2116
2209
  issuerCredentialTypesList(url, options) {
2117
2210
  return localVarFp.issuerCredentialTypesList(url, options).then((request) => request(axios, basePath));
2118
2211
  },
2212
+ /**
2213
+ *
2214
+ * @param {string} walletId
2215
+ * @param {string} scope
2216
+ * @param {string} clientId
2217
+ * @param {string} redirectUri
2218
+ * @param {string} responseType
2219
+ * @param {string} state
2220
+ * @param {string} nonce
2221
+ * @param {*} [options] Override http request option.
2222
+ * @throws {RequiredError}
2223
+ */
2224
+ oauth2Auth(walletId, scope, clientId, redirectUri, responseType, state, nonce, options) {
2225
+ return localVarFp.oauth2Auth(walletId, scope, clientId, redirectUri, responseType, state, nonce, options).then((request) => request(axios, basePath));
2226
+ },
2119
2227
  /**
2120
2228
  *
2121
2229
  * @param {string} grantType Value MUST be set to \\\&quot;authorization_code\\\&quot;.
@@ -2500,6 +2608,22 @@ class DefaultApi extends base_1.BaseAPI {
2500
2608
  issuerCredentialTypesList(url, options) {
2501
2609
  return (0, exports.DefaultApiFp)(this.configuration).issuerCredentialTypesList(url, options).then((request) => request(this.axios, this.basePath));
2502
2610
  }
2611
+ /**
2612
+ *
2613
+ * @param {string} walletId
2614
+ * @param {string} scope
2615
+ * @param {string} clientId
2616
+ * @param {string} redirectUri
2617
+ * @param {string} responseType
2618
+ * @param {string} state
2619
+ * @param {string} nonce
2620
+ * @param {*} [options] Override http request option.
2621
+ * @throws {RequiredError}
2622
+ * @memberof DefaultApi
2623
+ */
2624
+ oauth2Auth(walletId, scope, clientId, redirectUri, responseType, state, nonce, options) {
2625
+ return (0, exports.DefaultApiFp)(this.configuration).oauth2Auth(walletId, scope, clientId, redirectUri, responseType, state, nonce, options).then((request) => request(this.axios, this.basePath));
2626
+ }
2503
2627
  /**
2504
2628
  *
2505
2629
  * @param {string} grantType Value MUST be set to \\\&quot;authorization_code\\\&quot;.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@triveria/wallet",
3
3
  "private": false,
4
- "version": "0.0.117",
4
+ "version": "0.0.118",
5
5
  "description": "",
6
6
  "main": "index.js",
7
7
  "scripts": {