@torrow/sdk-client 0.3.0 → 0.4.0
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/dist/index.d.ts +3 -1
- package/dist/index.js +5 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -36070,7 +36070,7 @@ interface components {
|
|
|
36070
36070
|
meta?: components["schemas"]["ObjectInfo"];
|
|
36071
36071
|
};
|
|
36072
36072
|
/** @enum {string} */
|
|
36073
|
-
NoteType: "Unknown" | "Text" | "Html" | "Hlink" | "File" | "Photo" | "Voice" | "Geolocation" | "Qr" | "ServiceSpecification";
|
|
36073
|
+
NoteType: "Unknown" | "Text" | "Html" | "Hlink" | "File" | "Photo" | "Voice" | "Geolocation" | "Qr" | "ServiceSpecification" | "Markdown";
|
|
36074
36074
|
NoteView: {
|
|
36075
36075
|
data?: unknown;
|
|
36076
36076
|
noteType?: components["schemas"]["NoteType"];
|
|
@@ -37839,12 +37839,14 @@ type LoyaltyGroupListQuery = {
|
|
|
37839
37839
|
};
|
|
37840
37840
|
|
|
37841
37841
|
type NoteItem = TorrowItemFromDto<NoteItemDto>;
|
|
37842
|
+
/** Supported authoring scenarios: Html and Markdown. Other server values remain for compatibility. */
|
|
37842
37843
|
type NoteType = NoteTypeDto;
|
|
37843
37844
|
type ImagePreviewSize = NonNullable<NoteItem["imagePreviewSize"]>;
|
|
37844
37845
|
declare const NoteTypeValues: {
|
|
37845
37846
|
readonly Unknown: "Unknown";
|
|
37846
37847
|
readonly Text: "Text";
|
|
37847
37848
|
readonly Html: "Html";
|
|
37849
|
+
readonly Markdown: "Markdown";
|
|
37848
37850
|
readonly Hlink: "Hlink";
|
|
37849
37851
|
readonly File: "File";
|
|
37850
37852
|
readonly Photo: "Photo";
|
package/dist/index.js
CHANGED
|
@@ -115,10 +115,13 @@ function parseJsonWithIsoDates(json) {
|
|
|
115
115
|
if (json === "") {
|
|
116
116
|
return void 0;
|
|
117
117
|
}
|
|
118
|
-
return JSON.parse(json, (
|
|
118
|
+
return JSON.parse(json, function(key, value) {
|
|
119
119
|
if (typeof value !== "string") {
|
|
120
120
|
return value;
|
|
121
121
|
}
|
|
122
|
+
if (key === "data" && (this.noteType === "Html" || this.noteType === "Markdown")) {
|
|
123
|
+
return value;
|
|
124
|
+
}
|
|
122
125
|
return ISO_DATE_REGEX.exec(value) ? new Date(value) : value;
|
|
123
126
|
});
|
|
124
127
|
}
|
|
@@ -2229,6 +2232,7 @@ var NoteTypeValues = {
|
|
|
2229
2232
|
Unknown: "Unknown",
|
|
2230
2233
|
Text: "Text",
|
|
2231
2234
|
Html: "Html",
|
|
2235
|
+
Markdown: "Markdown",
|
|
2232
2236
|
Hlink: "Hlink",
|
|
2233
2237
|
File: "File",
|
|
2234
2238
|
Photo: "Photo",
|