@triveria/wallet 0.0.159 → 0.0.161
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.
- package/api.d.ts +50 -0
- package/common.js +1 -40
- package/package.json +1 -1
package/api.d.ts
CHANGED
|
@@ -300,6 +300,12 @@ export interface CredentialMetadata {
|
|
|
300
300
|
* @memberof CredentialMetadata
|
|
301
301
|
*/
|
|
302
302
|
'status': CredentialMetadataStatusEnum;
|
|
303
|
+
/**
|
|
304
|
+
* Array of objects, where each object contains display properties of a Credential Issuer for a certain language.
|
|
305
|
+
* @type {Array<IssuerDisplayItem>}
|
|
306
|
+
* @memberof CredentialMetadata
|
|
307
|
+
*/
|
|
308
|
+
'issuerDisplay'?: Array<IssuerDisplayItem>;
|
|
303
309
|
}
|
|
304
310
|
export declare const CredentialMetadataStatusEnum: {
|
|
305
311
|
readonly Draft: "draft";
|
|
@@ -905,6 +911,50 @@ export interface IssuanceQueueCredentialAdd {
|
|
|
905
911
|
*/
|
|
906
912
|
'idTokenRequestId'?: string;
|
|
907
913
|
}
|
|
914
|
+
/**
|
|
915
|
+
*
|
|
916
|
+
* @export
|
|
917
|
+
* @interface IssuerDisplayItem
|
|
918
|
+
*/
|
|
919
|
+
export interface IssuerDisplayItem {
|
|
920
|
+
/**
|
|
921
|
+
*
|
|
922
|
+
* @type {string}
|
|
923
|
+
* @memberof IssuerDisplayItem
|
|
924
|
+
*/
|
|
925
|
+
'name'?: string;
|
|
926
|
+
/**
|
|
927
|
+
*
|
|
928
|
+
* @type {string}
|
|
929
|
+
* @memberof IssuerDisplayItem
|
|
930
|
+
*/
|
|
931
|
+
'locale'?: string;
|
|
932
|
+
/**
|
|
933
|
+
*
|
|
934
|
+
* @type {IssuerLogoImage}
|
|
935
|
+
* @memberof IssuerDisplayItem
|
|
936
|
+
*/
|
|
937
|
+
'logo'?: IssuerLogoImage;
|
|
938
|
+
}
|
|
939
|
+
/**
|
|
940
|
+
*
|
|
941
|
+
* @export
|
|
942
|
+
* @interface IssuerLogoImage
|
|
943
|
+
*/
|
|
944
|
+
export interface IssuerLogoImage {
|
|
945
|
+
/**
|
|
946
|
+
*
|
|
947
|
+
* @type {string}
|
|
948
|
+
* @memberof IssuerLogoImage
|
|
949
|
+
*/
|
|
950
|
+
'uri'?: string;
|
|
951
|
+
/**
|
|
952
|
+
*
|
|
953
|
+
* @type {string}
|
|
954
|
+
* @memberof IssuerLogoImage
|
|
955
|
+
*/
|
|
956
|
+
'alt_text'?: string;
|
|
957
|
+
}
|
|
908
958
|
/**
|
|
909
959
|
* TBD
|
|
910
960
|
* @export
|
package/common.js
CHANGED
|
@@ -135,49 +135,10 @@ const serializeDataIfNeeded = function (value, requestOptions, configuration) {
|
|
|
135
135
|
? configuration.isJsonMime(requestOptions.headers['Content-Type'])
|
|
136
136
|
: nonString;
|
|
137
137
|
return needsSerialization
|
|
138
|
-
? JSON.stringify(value !== undefined ?
|
|
138
|
+
? JSON.stringify(value !== undefined ? value : {})
|
|
139
139
|
: (value || "");
|
|
140
140
|
};
|
|
141
141
|
exports.serializeDataIfNeeded = serializeDataIfNeeded;
|
|
142
|
-
function convertMapsAndSetsToPlain(value) {
|
|
143
|
-
if (typeof Set === "undefined")
|
|
144
|
-
return value;
|
|
145
|
-
if (typeof Map === "undefined")
|
|
146
|
-
return value;
|
|
147
|
-
if (typeof value !== "object" || !value) {
|
|
148
|
-
return value;
|
|
149
|
-
}
|
|
150
|
-
if (value instanceof Set) {
|
|
151
|
-
return Array.from(value).map(item => convertMapsAndSetsToPlain(item));
|
|
152
|
-
}
|
|
153
|
-
if (value instanceof Map) {
|
|
154
|
-
const entries = [];
|
|
155
|
-
value.forEach((value, key) => {
|
|
156
|
-
entries.push([key, convertMapsAndSetsToPlain(value)]);
|
|
157
|
-
});
|
|
158
|
-
return objectFromEntries(entries);
|
|
159
|
-
}
|
|
160
|
-
if (Array.isArray(value)) {
|
|
161
|
-
return value.map(it => convertMapsAndSetsToPlain(it));
|
|
162
|
-
}
|
|
163
|
-
return objectFromEntries(objectEntries(value)
|
|
164
|
-
.map(([k, v]) => [k, convertMapsAndSetsToPlain(v)]));
|
|
165
|
-
}
|
|
166
|
-
/**
|
|
167
|
-
* Ponyfill for Object.entries
|
|
168
|
-
*/
|
|
169
|
-
function objectEntries(object) {
|
|
170
|
-
return Object.keys(object).map(key => [key, object[key]]);
|
|
171
|
-
}
|
|
172
|
-
/**
|
|
173
|
-
* Ponyfill for Object.fromEntries
|
|
174
|
-
*/
|
|
175
|
-
function objectFromEntries(entries) {
|
|
176
|
-
return [...entries].reduce((object, [key, val]) => {
|
|
177
|
-
object[key] = val;
|
|
178
|
-
return object;
|
|
179
|
-
}, {});
|
|
180
|
-
}
|
|
181
142
|
/**
|
|
182
143
|
*
|
|
183
144
|
* @export
|