@triveria/wallet 0.0.14 → 0.0.15

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 +30 -10
  2. package/api.js +12 -12
  3. package/package.json +1 -1
package/api.d.ts CHANGED
@@ -55,7 +55,7 @@ export interface Credential {
55
55
  * @type {string}
56
56
  * @memberof Credential
57
57
  */
58
- 'id': string;
58
+ 'id'?: string;
59
59
  /**
60
60
  * The value of the type property MUST be, or map to (through interpretation of the @context property), one or more URLs. If more than one URL is provided, the URLs MUST be interpreted as an unordered set. Syntactic conveniences SHOULD be used to ease developer usage. Such conveniences might include JSON-LD terms. It is RECOMMENDED that each URL in the type be one which, if dereferenced, results in a document containing machine-readable information about the type. https://www.w3.org/TR/vc-data-model-2.0/#types
61
61
  * @type {Array<string>}
@@ -200,7 +200,7 @@ export interface CredentialList {
200
200
  * @interface CredentialMetadata
201
201
  */
202
202
  export interface CredentialMetadata {
203
- [key: string]: string;
203
+ [key: string]: any;
204
204
  /**
205
205
  *
206
206
  * @type {string}
@@ -226,6 +226,26 @@ export declare const CredentialMetadataStatusEnum: {
226
226
  readonly Invalid: "invalid";
227
227
  };
228
228
  export type CredentialMetadataStatusEnum = typeof CredentialMetadataStatusEnum[keyof typeof CredentialMetadataStatusEnum];
229
+ /**
230
+ * A Credential container used to create credentials with metadata.
231
+ * @export
232
+ * @interface CredentialPayload
233
+ */
234
+ export interface CredentialPayload {
235
+ [key: string]: any;
236
+ /**
237
+ *
238
+ * @type {Credential}
239
+ * @memberof CredentialPayload
240
+ */
241
+ 'credential': Credential;
242
+ /**
243
+ *
244
+ * @type {string}
245
+ * @memberof CredentialPayload
246
+ */
247
+ 'name': string;
248
+ }
229
249
  /**
230
250
  * @type CredentialSchema
231
251
  * One or more data schemas that provide verifiers with enough information to determine if the provided data conforms to the provided schema(s) https://www.w3.org/TR/vc-data-model-2.0/#defn-credentialSchema
@@ -758,11 +778,11 @@ export declare const DefaultApiAxiosParamCreator: (configuration?: Configuration
758
778
  /**
759
779
  * Creates verifiable credential in a draft state. This endpoint is available only to the issuer wallet and should be used to initially create a credential.
760
780
  * @param {string} walletId
761
- * @param {Credential} [credential] Verifiable Credential in JSON format
781
+ * @param {CredentialPayload} [credentialPayload] A Verifiable Credential payload in JSON format.
762
782
  * @param {*} [options] Override http request option.
763
783
  * @throws {RequiredError}
764
784
  */
765
- credentialCreate: (walletId: string, credential?: Credential, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
785
+ credentialCreate: (walletId: string, credentialPayload?: CredentialPayload, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
766
786
  /**
767
787
  * 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.
768
788
  * @param {string} credentialId Verifiable Credential Identifier
@@ -902,11 +922,11 @@ export declare const DefaultApiFp: (configuration?: Configuration) => {
902
922
  /**
903
923
  * Creates verifiable credential in a draft state. This endpoint is available only to the issuer wallet and should be used to initially create a credential.
904
924
  * @param {string} walletId
905
- * @param {Credential} [credential] Verifiable Credential in JSON format
925
+ * @param {CredentialPayload} [credentialPayload] A Verifiable Credential payload in JSON format.
906
926
  * @param {*} [options] Override http request option.
907
927
  * @throws {RequiredError}
908
928
  */
909
- credentialCreate(walletId: string, credential?: Credential, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Credential>>;
929
+ credentialCreate(walletId: string, credentialPayload?: CredentialPayload, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Credential>>;
910
930
  /**
911
931
  * 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.
912
932
  * @param {string} credentialId Verifiable Credential Identifier
@@ -1046,11 +1066,11 @@ export declare const DefaultApiFactory: (configuration?: Configuration, basePath
1046
1066
  /**
1047
1067
  * Creates verifiable credential in a draft state. This endpoint is available only to the issuer wallet and should be used to initially create a credential.
1048
1068
  * @param {string} walletId
1049
- * @param {Credential} [credential] Verifiable Credential in JSON format
1069
+ * @param {CredentialPayload} [credentialPayload] A Verifiable Credential payload in JSON format.
1050
1070
  * @param {*} [options] Override http request option.
1051
1071
  * @throws {RequiredError}
1052
1072
  */
1053
- credentialCreate(walletId: string, credential?: Credential, options?: any): AxiosPromise<Credential>;
1073
+ credentialCreate(walletId: string, credentialPayload?: CredentialPayload, options?: any): AxiosPromise<Credential>;
1054
1074
  /**
1055
1075
  * 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.
1056
1076
  * @param {string} credentialId Verifiable Credential Identifier
@@ -1192,12 +1212,12 @@ export declare class DefaultApi extends BaseAPI {
1192
1212
  /**
1193
1213
  * Creates verifiable credential in a draft state. This endpoint is available only to the issuer wallet and should be used to initially create a credential.
1194
1214
  * @param {string} walletId
1195
- * @param {Credential} [credential] Verifiable Credential in JSON format
1215
+ * @param {CredentialPayload} [credentialPayload] A Verifiable Credential payload in JSON format.
1196
1216
  * @param {*} [options] Override http request option.
1197
1217
  * @throws {RequiredError}
1198
1218
  * @memberof DefaultApi
1199
1219
  */
1200
- credentialCreate(walletId: string, credential?: Credential, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<Credential, any>>;
1220
+ credentialCreate(walletId: string, credentialPayload?: CredentialPayload, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<Credential, any>>;
1201
1221
  /**
1202
1222
  * 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.
1203
1223
  * @param {string} credentialId Verifiable Credential Identifier
package/api.js CHANGED
@@ -68,11 +68,11 @@ const DefaultApiAxiosParamCreator = function (configuration) {
68
68
  /**
69
69
  * Creates verifiable credential in a draft state. This endpoint is available only to the issuer wallet and should be used to initially create a credential.
70
70
  * @param {string} walletId
71
- * @param {Credential} [credential] Verifiable Credential in JSON format
71
+ * @param {CredentialPayload} [credentialPayload] A Verifiable Credential payload in JSON format.
72
72
  * @param {*} [options] Override http request option.
73
73
  * @throws {RequiredError}
74
74
  */
75
- credentialCreate: (walletId, credential, options = {}) => __awaiter(this, void 0, void 0, function* () {
75
+ credentialCreate: (walletId, credentialPayload, options = {}) => __awaiter(this, void 0, void 0, function* () {
76
76
  // verify required parameter 'walletId' is not null or undefined
77
77
  (0, common_1.assertParamExists)('credentialCreate', 'walletId', walletId);
78
78
  const localVarPath = `/credentials`;
@@ -95,7 +95,7 @@ const DefaultApiAxiosParamCreator = function (configuration) {
95
95
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
96
96
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
97
97
  localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
98
- localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(credential, localVarRequestOptions, configuration);
98
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(credentialPayload, localVarRequestOptions, configuration);
99
99
  return {
100
100
  url: (0, common_1.toPathString)(localVarUrlObj),
101
101
  options: localVarRequestOptions,
@@ -696,14 +696,14 @@ const DefaultApiFp = function (configuration) {
696
696
  /**
697
697
  * Creates verifiable credential in a draft state. This endpoint is available only to the issuer wallet and should be used to initially create a credential.
698
698
  * @param {string} walletId
699
- * @param {Credential} [credential] Verifiable Credential in JSON format
699
+ * @param {CredentialPayload} [credentialPayload] A Verifiable Credential payload in JSON format.
700
700
  * @param {*} [options] Override http request option.
701
701
  * @throws {RequiredError}
702
702
  */
703
- credentialCreate(walletId, credential, options) {
703
+ credentialCreate(walletId, credentialPayload, options) {
704
704
  var _a, _b, _c;
705
705
  return __awaiter(this, void 0, void 0, function* () {
706
- const localVarAxiosArgs = yield localVarAxiosParamCreator.credentialCreate(walletId, credential, options);
706
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.credentialCreate(walletId, credentialPayload, options);
707
707
  const index = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
708
708
  const operationBasePath = (_c = (_b = base_1.operationServerMap['DefaultApi.credentialCreate']) === null || _b === void 0 ? void 0 : _b[index]) === null || _c === void 0 ? void 0 : _c.url;
709
709
  return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, operationBasePath || basePath);
@@ -988,12 +988,12 @@ const DefaultApiFactory = function (configuration, basePath, axios) {
988
988
  /**
989
989
  * Creates verifiable credential in a draft state. This endpoint is available only to the issuer wallet and should be used to initially create a credential.
990
990
  * @param {string} walletId
991
- * @param {Credential} [credential] Verifiable Credential in JSON format
991
+ * @param {CredentialPayload} [credentialPayload] A Verifiable Credential payload in JSON format.
992
992
  * @param {*} [options] Override http request option.
993
993
  * @throws {RequiredError}
994
994
  */
995
- credentialCreate(walletId, credential, options) {
996
- return localVarFp.credentialCreate(walletId, credential, options).then((request) => request(axios, basePath));
995
+ credentialCreate(walletId, credentialPayload, options) {
996
+ return localVarFp.credentialCreate(walletId, credentialPayload, options).then((request) => request(axios, basePath));
997
997
  },
998
998
  /**
999
999
  * 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.
@@ -1172,13 +1172,13 @@ class DefaultApi extends base_1.BaseAPI {
1172
1172
  /**
1173
1173
  * Creates verifiable credential in a draft state. This endpoint is available only to the issuer wallet and should be used to initially create a credential.
1174
1174
  * @param {string} walletId
1175
- * @param {Credential} [credential] Verifiable Credential in JSON format
1175
+ * @param {CredentialPayload} [credentialPayload] A Verifiable Credential payload in JSON format.
1176
1176
  * @param {*} [options] Override http request option.
1177
1177
  * @throws {RequiredError}
1178
1178
  * @memberof DefaultApi
1179
1179
  */
1180
- credentialCreate(walletId, credential, options) {
1181
- return (0, exports.DefaultApiFp)(this.configuration).credentialCreate(walletId, credential, options).then((request) => request(this.axios, this.basePath));
1180
+ credentialCreate(walletId, credentialPayload, options) {
1181
+ return (0, exports.DefaultApiFp)(this.configuration).credentialCreate(walletId, credentialPayload, options).then((request) => request(this.axios, this.basePath));
1182
1182
  }
1183
1183
  /**
1184
1184
  * 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.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@triveria/wallet",
3
3
  "private": false,
4
- "version": "0.0.14",
4
+ "version": "0.0.15",
5
5
  "description": "",
6
6
  "main": "index.js",
7
7
  "scripts": {