@triveria/wallet 0.0.5 → 0.0.9

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 +93 -12
  2. package/api.js +130 -14
  3. package/package.json +1 -1
package/api.d.ts CHANGED
@@ -158,19 +158,19 @@ export interface CredentialIssuerDefinition {
158
158
  * @type {string}
159
159
  * @memberof CredentialIssuerDefinition
160
160
  */
161
- 'credentialFormat'?: CredentialIssuerDefinitionCredentialFormatEnum;
161
+ 'credentialFormat': CredentialIssuerDefinitionCredentialFormatEnum;
162
162
  /**
163
163
  * Type of credentials for which the specified credential issuer will be used.
164
164
  * @type {Array<string>}
165
165
  * @memberof CredentialIssuerDefinition
166
166
  */
167
- 'credentialType'?: Array<string>;
167
+ 'credentialType': Array<string>;
168
168
  /**
169
169
  * Type of issuer to be used with credentials of the type specified.
170
170
  * @type {string}
171
171
  * @memberof CredentialIssuerDefinition
172
172
  */
173
- 'credentialIssuer'?: CredentialIssuerDefinitionCredentialIssuerEnum;
173
+ 'credentialIssuer': CredentialIssuerDefinitionCredentialIssuerEnum;
174
174
  }
175
175
  export declare const CredentialIssuerDefinitionCredentialFormatEnum: {
176
176
  readonly JwtVc: "jwt_vc";
@@ -707,7 +707,38 @@ export interface VcOffer {
707
707
  'Pin'?: string;
708
708
  }
709
709
  /**
710
- * Wallet specific configuration,
710
+ * Wallet details
711
+ * @export
712
+ * @interface Wallet
713
+ */
714
+ export interface Wallet {
715
+ /**
716
+ *
717
+ * @type {string}
718
+ * @memberof Wallet
719
+ */
720
+ 'walletId': string;
721
+ /**
722
+ *
723
+ * @type {string}
724
+ * @memberof Wallet
725
+ */
726
+ 'name': string;
727
+ /**
728
+ *
729
+ * @type {boolean}
730
+ * @memberof Wallet
731
+ */
732
+ 'canSign': boolean;
733
+ /**
734
+ *
735
+ * @type {WalletConfig}
736
+ * @memberof Wallet
737
+ */
738
+ 'config': WalletConfig;
739
+ }
740
+ /**
741
+ * Wallet specific configuration.
711
742
  * @export
712
743
  * @interface WalletConfig
713
744
  */
@@ -828,13 +859,25 @@ export declare const DefaultApiAxiosParamCreator: (configuration?: Configuration
828
859
  * @throws {RequiredError}
829
860
  */
830
861
  oidcInitiatePreauth: (initPreAuthOffer?: InitPreAuthOffer, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
862
+ /**
863
+ * Provides wallet details
864
+ * @param {*} [options] Override http request option.
865
+ * @throws {RequiredError}
866
+ */
867
+ walletGet: (options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
868
+ /**
869
+ * Provides list of wallets owned by the authenticated client.
870
+ * @param {*} [options] Override http request option.
871
+ * @throws {RequiredError}
872
+ */
873
+ walletList: (options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
831
874
  /**
832
875
  * The first call will authenticate the client and create a new wallet that will be accessible only to the client. Any further calls are meant to update the wallet configuration. Be careful when changing the configuration as it may result in the wallet malfunction.
833
- * @param {WalletConfig} [walletConfig]
876
+ * @param {Wallet} [wallet]
834
877
  * @param {*} [options] Override http request option.
835
878
  * @throws {RequiredError}
836
879
  */
837
- walletConfigure: (walletConfig?: WalletConfig, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
880
+ walletSave: (wallet?: Wallet, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
838
881
  };
839
882
  /**
840
883
  * DefaultApi - functional programming interface
@@ -945,13 +988,25 @@ export declare const DefaultApiFp: (configuration?: Configuration) => {
945
988
  * @throws {RequiredError}
946
989
  */
947
990
  oidcInitiatePreauth(initPreAuthOffer?: InitPreAuthOffer, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<PreauthOffer>>;
991
+ /**
992
+ * Provides wallet details
993
+ * @param {*} [options] Override http request option.
994
+ * @throws {RequiredError}
995
+ */
996
+ walletGet(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Wallet>>;
997
+ /**
998
+ * Provides list of wallets owned by the authenticated client.
999
+ * @param {*} [options] Override http request option.
1000
+ * @throws {RequiredError}
1001
+ */
1002
+ walletList(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<Wallet>>>;
948
1003
  /**
949
1004
  * The first call will authenticate the client and create a new wallet that will be accessible only to the client. Any further calls are meant to update the wallet configuration. Be careful when changing the configuration as it may result in the wallet malfunction.
950
- * @param {WalletConfig} [walletConfig]
1005
+ * @param {Wallet} [wallet]
951
1006
  * @param {*} [options] Override http request option.
952
1007
  * @throws {RequiredError}
953
1008
  */
954
- walletConfigure(walletConfig?: WalletConfig, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>>;
1009
+ walletSave(wallet?: Wallet, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>>;
955
1010
  };
956
1011
  /**
957
1012
  * DefaultApi - factory interface
@@ -1062,13 +1117,25 @@ export declare const DefaultApiFactory: (configuration?: Configuration, basePath
1062
1117
  * @throws {RequiredError}
1063
1118
  */
1064
1119
  oidcInitiatePreauth(initPreAuthOffer?: InitPreAuthOffer, options?: any): AxiosPromise<PreauthOffer>;
1120
+ /**
1121
+ * Provides wallet details
1122
+ * @param {*} [options] Override http request option.
1123
+ * @throws {RequiredError}
1124
+ */
1125
+ walletGet(options?: any): AxiosPromise<Wallet>;
1126
+ /**
1127
+ * Provides list of wallets owned by the authenticated client.
1128
+ * @param {*} [options] Override http request option.
1129
+ * @throws {RequiredError}
1130
+ */
1131
+ walletList(options?: any): AxiosPromise<Array<Wallet>>;
1065
1132
  /**
1066
1133
  * The first call will authenticate the client and create a new wallet that will be accessible only to the client. Any further calls are meant to update the wallet configuration. Be careful when changing the configuration as it may result in the wallet malfunction.
1067
- * @param {WalletConfig} [walletConfig]
1134
+ * @param {Wallet} [wallet]
1068
1135
  * @param {*} [options] Override http request option.
1069
1136
  * @throws {RequiredError}
1070
1137
  */
1071
- walletConfigure(walletConfig?: WalletConfig, options?: any): AxiosPromise<void>;
1138
+ walletSave(wallet?: Wallet, options?: any): AxiosPromise<void>;
1072
1139
  };
1073
1140
  /**
1074
1141
  * DefaultApi - object-oriented interface
@@ -1196,12 +1263,26 @@ export declare class DefaultApi extends BaseAPI {
1196
1263
  * @memberof DefaultApi
1197
1264
  */
1198
1265
  oidcInitiatePreauth(initPreAuthOffer?: InitPreAuthOffer, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<PreauthOffer, any>>;
1266
+ /**
1267
+ * Provides wallet details
1268
+ * @param {*} [options] Override http request option.
1269
+ * @throws {RequiredError}
1270
+ * @memberof DefaultApi
1271
+ */
1272
+ walletGet(options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<Wallet, any>>;
1273
+ /**
1274
+ * Provides list of wallets owned by the authenticated client.
1275
+ * @param {*} [options] Override http request option.
1276
+ * @throws {RequiredError}
1277
+ * @memberof DefaultApi
1278
+ */
1279
+ walletList(options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<Wallet[], any>>;
1199
1280
  /**
1200
1281
  * The first call will authenticate the client and create a new wallet that will be accessible only to the client. Any further calls are meant to update the wallet configuration. Be careful when changing the configuration as it may result in the wallet malfunction.
1201
- * @param {WalletConfig} [walletConfig]
1282
+ * @param {Wallet} [wallet]
1202
1283
  * @param {*} [options] Override http request option.
1203
1284
  * @throws {RequiredError}
1204
1285
  * @memberof DefaultApi
1205
1286
  */
1206
- walletConfigure(walletConfig?: WalletConfig, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any>>;
1287
+ walletSave(wallet?: Wallet, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any>>;
1207
1288
  }
package/api.js CHANGED
@@ -511,14 +511,68 @@ const DefaultApiAxiosParamCreator = function (configuration) {
511
511
  options: localVarRequestOptions,
512
512
  };
513
513
  }),
514
+ /**
515
+ * Provides wallet details
516
+ * @param {*} [options] Override http request option.
517
+ * @throws {RequiredError}
518
+ */
519
+ walletGet: (options = {}) => __awaiter(this, void 0, void 0, function* () {
520
+ const localVarPath = `/wallets/current`;
521
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
522
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
523
+ let baseOptions;
524
+ if (configuration) {
525
+ baseOptions = configuration.baseOptions;
526
+ }
527
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
528
+ const localVarHeaderParameter = {};
529
+ const localVarQueryParameter = {};
530
+ // authentication accessToken required
531
+ // http bearer authentication required
532
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
533
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
534
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
535
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
536
+ return {
537
+ url: (0, common_1.toPathString)(localVarUrlObj),
538
+ options: localVarRequestOptions,
539
+ };
540
+ }),
541
+ /**
542
+ * Provides list of wallets owned by the authenticated client.
543
+ * @param {*} [options] Override http request option.
544
+ * @throws {RequiredError}
545
+ */
546
+ walletList: (options = {}) => __awaiter(this, void 0, void 0, function* () {
547
+ const localVarPath = `/wallets`;
548
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
549
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
550
+ let baseOptions;
551
+ if (configuration) {
552
+ baseOptions = configuration.baseOptions;
553
+ }
554
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
555
+ const localVarHeaderParameter = {};
556
+ const localVarQueryParameter = {};
557
+ // authentication accessToken required
558
+ // http bearer authentication required
559
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
560
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
561
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
562
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
563
+ return {
564
+ url: (0, common_1.toPathString)(localVarUrlObj),
565
+ options: localVarRequestOptions,
566
+ };
567
+ }),
514
568
  /**
515
569
  * The first call will authenticate the client and create a new wallet that will be accessible only to the client. Any further calls are meant to update the wallet configuration. Be careful when changing the configuration as it may result in the wallet malfunction.
516
- * @param {WalletConfig} [walletConfig]
570
+ * @param {Wallet} [wallet]
517
571
  * @param {*} [options] Override http request option.
518
572
  * @throws {RequiredError}
519
573
  */
520
- walletConfigure: (walletConfig, options = {}) => __awaiter(this, void 0, void 0, function* () {
521
- const localVarPath = `/wallet`;
574
+ walletSave: (wallet, options = {}) => __awaiter(this, void 0, void 0, function* () {
575
+ const localVarPath = `/wallets`;
522
576
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
523
577
  const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
524
578
  let baseOptions;
@@ -535,7 +589,7 @@ const DefaultApiAxiosParamCreator = function (configuration) {
535
589
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
536
590
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
537
591
  localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
538
- localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(walletConfig, localVarRequestOptions, configuration);
592
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(wallet, localVarRequestOptions, configuration);
539
593
  return {
540
594
  url: (0, common_1.toPathString)(localVarUrlObj),
541
595
  options: localVarRequestOptions,
@@ -775,18 +829,46 @@ const DefaultApiFp = function (configuration) {
775
829
  return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, operationBasePath || basePath);
776
830
  });
777
831
  },
832
+ /**
833
+ * Provides wallet details
834
+ * @param {*} [options] Override http request option.
835
+ * @throws {RequiredError}
836
+ */
837
+ walletGet(options) {
838
+ var _a, _b, _c;
839
+ return __awaiter(this, void 0, void 0, function* () {
840
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.walletGet(options);
841
+ const index = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
842
+ const operationBasePath = (_c = (_b = base_1.operationServerMap['DefaultApi.walletGet']) === null || _b === void 0 ? void 0 : _b[index]) === null || _c === void 0 ? void 0 : _c.url;
843
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, operationBasePath || basePath);
844
+ });
845
+ },
846
+ /**
847
+ * Provides list of wallets owned by the authenticated client.
848
+ * @param {*} [options] Override http request option.
849
+ * @throws {RequiredError}
850
+ */
851
+ walletList(options) {
852
+ var _a, _b, _c;
853
+ return __awaiter(this, void 0, void 0, function* () {
854
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.walletList(options);
855
+ const index = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
856
+ const operationBasePath = (_c = (_b = base_1.operationServerMap['DefaultApi.walletList']) === null || _b === void 0 ? void 0 : _b[index]) === null || _c === void 0 ? void 0 : _c.url;
857
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, operationBasePath || basePath);
858
+ });
859
+ },
778
860
  /**
779
861
  * The first call will authenticate the client and create a new wallet that will be accessible only to the client. Any further calls are meant to update the wallet configuration. Be careful when changing the configuration as it may result in the wallet malfunction.
780
- * @param {WalletConfig} [walletConfig]
862
+ * @param {Wallet} [wallet]
781
863
  * @param {*} [options] Override http request option.
782
864
  * @throws {RequiredError}
783
865
  */
784
- walletConfigure(walletConfig, options) {
866
+ walletSave(wallet, options) {
785
867
  var _a, _b, _c;
786
868
  return __awaiter(this, void 0, void 0, function* () {
787
- const localVarAxiosArgs = yield localVarAxiosParamCreator.walletConfigure(walletConfig, options);
869
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.walletSave(wallet, options);
788
870
  const index = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
789
- const operationBasePath = (_c = (_b = base_1.operationServerMap['DefaultApi.walletConfigure']) === null || _b === void 0 ? void 0 : _b[index]) === null || _c === void 0 ? void 0 : _c.url;
871
+ const operationBasePath = (_c = (_b = base_1.operationServerMap['DefaultApi.walletSave']) === null || _b === void 0 ? void 0 : _b[index]) === null || _c === void 0 ? void 0 : _c.url;
790
872
  return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, operationBasePath || basePath);
791
873
  });
792
874
  },
@@ -934,14 +1016,30 @@ const DefaultApiFactory = function (configuration, basePath, axios) {
934
1016
  oidcInitiatePreauth(initPreAuthOffer, options) {
935
1017
  return localVarFp.oidcInitiatePreauth(initPreAuthOffer, options).then((request) => request(axios, basePath));
936
1018
  },
1019
+ /**
1020
+ * Provides wallet details
1021
+ * @param {*} [options] Override http request option.
1022
+ * @throws {RequiredError}
1023
+ */
1024
+ walletGet(options) {
1025
+ return localVarFp.walletGet(options).then((request) => request(axios, basePath));
1026
+ },
1027
+ /**
1028
+ * Provides list of wallets owned by the authenticated client.
1029
+ * @param {*} [options] Override http request option.
1030
+ * @throws {RequiredError}
1031
+ */
1032
+ walletList(options) {
1033
+ return localVarFp.walletList(options).then((request) => request(axios, basePath));
1034
+ },
937
1035
  /**
938
1036
  * The first call will authenticate the client and create a new wallet that will be accessible only to the client. Any further calls are meant to update the wallet configuration. Be careful when changing the configuration as it may result in the wallet malfunction.
939
- * @param {WalletConfig} [walletConfig]
1037
+ * @param {Wallet} [wallet]
940
1038
  * @param {*} [options] Override http request option.
941
1039
  * @throws {RequiredError}
942
1040
  */
943
- walletConfigure(walletConfig, options) {
944
- return localVarFp.walletConfigure(walletConfig, options).then((request) => request(axios, basePath));
1041
+ walletSave(wallet, options) {
1042
+ return localVarFp.walletSave(wallet, options).then((request) => request(axios, basePath));
945
1043
  },
946
1044
  };
947
1045
  };
@@ -1102,15 +1200,33 @@ class DefaultApi extends base_1.BaseAPI {
1102
1200
  oidcInitiatePreauth(initPreAuthOffer, options) {
1103
1201
  return (0, exports.DefaultApiFp)(this.configuration).oidcInitiatePreauth(initPreAuthOffer, options).then((request) => request(this.axios, this.basePath));
1104
1202
  }
1203
+ /**
1204
+ * Provides wallet details
1205
+ * @param {*} [options] Override http request option.
1206
+ * @throws {RequiredError}
1207
+ * @memberof DefaultApi
1208
+ */
1209
+ walletGet(options) {
1210
+ return (0, exports.DefaultApiFp)(this.configuration).walletGet(options).then((request) => request(this.axios, this.basePath));
1211
+ }
1212
+ /**
1213
+ * Provides list of wallets owned by the authenticated client.
1214
+ * @param {*} [options] Override http request option.
1215
+ * @throws {RequiredError}
1216
+ * @memberof DefaultApi
1217
+ */
1218
+ walletList(options) {
1219
+ return (0, exports.DefaultApiFp)(this.configuration).walletList(options).then((request) => request(this.axios, this.basePath));
1220
+ }
1105
1221
  /**
1106
1222
  * The first call will authenticate the client and create a new wallet that will be accessible only to the client. Any further calls are meant to update the wallet configuration. Be careful when changing the configuration as it may result in the wallet malfunction.
1107
- * @param {WalletConfig} [walletConfig]
1223
+ * @param {Wallet} [wallet]
1108
1224
  * @param {*} [options] Override http request option.
1109
1225
  * @throws {RequiredError}
1110
1226
  * @memberof DefaultApi
1111
1227
  */
1112
- walletConfigure(walletConfig, options) {
1113
- return (0, exports.DefaultApiFp)(this.configuration).walletConfigure(walletConfig, options).then((request) => request(this.axios, this.basePath));
1228
+ walletSave(wallet, options) {
1229
+ return (0, exports.DefaultApiFp)(this.configuration).walletSave(wallet, options).then((request) => request(this.axios, this.basePath));
1114
1230
  }
1115
1231
  }
1116
1232
  exports.DefaultApi = DefaultApi;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@triveria/wallet",
3
3
  "private": false,
4
- "version": "0.0.5",
4
+ "version": "0.0.9",
5
5
  "description": "",
6
6
  "main": "index.js",
7
7
  "scripts": {