@wix/auto_sdk_papyrus_documents 1.0.1 → 1.0.2
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/build/cjs/schemas.js +288 -250
- package/build/cjs/schemas.js.map +1 -1
- package/build/es/schemas.mjs +288 -250
- package/build/es/schemas.mjs.map +1 -1
- package/package.json +2 -2
- package/build/internal/cjs/index.js +0 -1118
- package/build/internal/cjs/index.js.map +0 -1
- package/build/internal/cjs/index.typings.js +0 -872
- package/build/internal/cjs/index.typings.js.map +0 -1
- package/build/internal/cjs/meta.js +0 -716
- package/build/internal/cjs/meta.js.map +0 -1
- package/build/internal/cjs/schemas.js +0 -666
- package/build/internal/cjs/schemas.js.map +0 -1
- package/build/internal/es/index.mjs +0 -1067
- package/build/internal/es/index.mjs.map +0 -1
- package/build/internal/es/index.typings.mjs +0 -826
- package/build/internal/es/index.typings.mjs.map +0 -1
- package/build/internal/es/meta.mjs +0 -669
- package/build/internal/es/meta.mjs.map +0 -1
- package/build/internal/es/schemas.mjs +0 -610
- package/build/internal/es/schemas.mjs.map +0 -1
package/build/cjs/schemas.js
CHANGED
|
@@ -56,15 +56,15 @@ module.exports = __toCommonJS(schemas_exports);
|
|
|
56
56
|
// src/papyrus-v1-document-documents.schemas.ts
|
|
57
57
|
var z = __toESM(require("zod"));
|
|
58
58
|
var CreateDocumentRequest = /* @__PURE__ */ z.object({
|
|
59
|
-
options: z.object({
|
|
60
|
-
document: z.object({
|
|
61
|
-
_id: z.string().describe("Document ID.").regex(
|
|
59
|
+
options: /* @__PURE__ */ z.object({
|
|
60
|
+
document: /* @__PURE__ */ z.object({
|
|
61
|
+
_id: /* @__PURE__ */ z.string().describe("Document ID.").regex(
|
|
62
62
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
63
63
|
"Must be a valid GUID"
|
|
64
64
|
).optional().nullable(),
|
|
65
|
-
_createdDate: z.date().describe("Represents the time this Document was created.").optional().nullable(),
|
|
66
|
-
_updatedDate: z.date().describe("Represents the time this Document was last updated.").optional().nullable(),
|
|
67
|
-
renderStatus: z.enum([
|
|
65
|
+
_createdDate: /* @__PURE__ */ z.date().describe("Represents the time this Document was created.").optional().nullable(),
|
|
66
|
+
_updatedDate: /* @__PURE__ */ z.date().describe("Represents the time this Document was last updated.").optional().nullable(),
|
|
67
|
+
renderStatus: /* @__PURE__ */ z.enum([
|
|
68
68
|
"UNKNOWN",
|
|
69
69
|
"ACCEPTED",
|
|
70
70
|
"RENDERING",
|
|
@@ -72,193 +72,208 @@ var CreateDocumentRequest = /* @__PURE__ */ z.object({
|
|
|
72
72
|
"FAILED",
|
|
73
73
|
"EXPIRED"
|
|
74
74
|
]).optional(),
|
|
75
|
-
downloadUrl: z.string().describe(
|
|
75
|
+
downloadUrl: /* @__PURE__ */ z.string().describe(
|
|
76
76
|
"URL to download document. Returned only when Document is in `READY` state."
|
|
77
77
|
).url().optional().nullable(),
|
|
78
|
-
templateId: z.string().describe(
|
|
78
|
+
templateId: /* @__PURE__ */ z.string().describe(
|
|
79
79
|
"Template ID. When this parameter used the document will be rendered with this template default settings"
|
|
80
80
|
).min(1).max(20).optional().nullable(),
|
|
81
|
-
externalId: z.string().describe(
|
|
81
|
+
externalId: /* @__PURE__ */ z.string().describe(
|
|
82
82
|
"Unique per tenant external ID, for example order number. Used to retrieve Document later."
|
|
83
83
|
).min(1).max(100),
|
|
84
|
-
templateSettingsExternalId: z.string().describe(
|
|
84
|
+
templateSettingsExternalId: /* @__PURE__ */ z.string().describe(
|
|
85
85
|
"Unique per tenant template external ID, for example ticket definition ID. Used to lookup corresponding template & template settings."
|
|
86
86
|
).max(100).optional().nullable(),
|
|
87
|
-
templateSettingsId: z.string().describe("Template settings ID.").regex(
|
|
87
|
+
templateSettingsId: /* @__PURE__ */ z.string().describe("Template settings ID.").regex(
|
|
88
88
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
89
89
|
"Must be a valid GUID"
|
|
90
90
|
).optional().nullable(),
|
|
91
|
-
appSlug: z.string().describe("The app slug of the template").min(1).max(20),
|
|
92
|
-
templateType: z.string().describe("The type of the template.").min(1).max(20),
|
|
93
|
-
content: z.object({
|
|
94
|
-
pages: z.array(
|
|
95
|
-
|
|
91
|
+
appSlug: /* @__PURE__ */ z.string().describe("The app slug of the template").min(1).max(20),
|
|
92
|
+
templateType: /* @__PURE__ */ z.string().describe("The type of the template.").min(1).max(20),
|
|
93
|
+
content: /* @__PURE__ */ z.object({
|
|
94
|
+
pages: /* @__PURE__ */ z.array(
|
|
95
|
+
/* @__PURE__ */ z.record(
|
|
96
|
+
/* @__PURE__ */ z.string(),
|
|
97
|
+
/* @__PURE__ */ z.any()
|
|
98
|
+
)
|
|
99
|
+
).min(1).max(100).optional(),
|
|
100
|
+
content: /* @__PURE__ */ z.record(/* @__PURE__ */ z.string(), /* @__PURE__ */ z.any()).describe(
|
|
96
101
|
"Other document content referenced by $content variable"
|
|
97
102
|
).optional().nullable(),
|
|
98
|
-
language: z.string().describe(
|
|
103
|
+
language: /* @__PURE__ */ z.string().describe(
|
|
99
104
|
"ISO 639-1 language code of content (used in translations)."
|
|
100
105
|
).optional(),
|
|
101
|
-
locale: z.string().describe("e.g. en-US.").min(2).max(35).optional().nullable()
|
|
106
|
+
locale: /* @__PURE__ */ z.string().describe("e.g. en-US.").min(2).max(35).optional().nullable()
|
|
102
107
|
}).describe("Document content that is injected into template."),
|
|
103
|
-
expiresInHours: z.number().int().describe(
|
|
108
|
+
expiresInHours: /* @__PURE__ */ z.number().int().describe(
|
|
104
109
|
"Number of hours after which document will be eventually expired and its content erased."
|
|
105
110
|
).min(1).max(43800).optional(),
|
|
106
|
-
expirationDate: z.date().describe("Represents the time this document becomes expired.").optional().nullable(),
|
|
107
|
-
format: z.enum(["UNKNOWN", "PDF"]).optional(),
|
|
108
|
-
public: z.boolean().describe(
|
|
111
|
+
expirationDate: /* @__PURE__ */ z.date().describe("Represents the time this document becomes expired.").optional().nullable(),
|
|
112
|
+
format: /* @__PURE__ */ z.enum(["UNKNOWN", "PDF"]).optional(),
|
|
113
|
+
public: /* @__PURE__ */ z.boolean().describe(
|
|
109
114
|
"Whether the link to the uploaded document is public or private.\nFor public document static URL will be returned.\nFor private document temporary URL will be generated by DocumentService.DownloadDocument."
|
|
110
115
|
).optional().nullable(),
|
|
111
|
-
fileName: z.string().describe(
|
|
116
|
+
fileName: /* @__PURE__ */ z.string().describe(
|
|
112
117
|
"Optional filename (without extension) to be used for the downloadable document."
|
|
113
118
|
).min(1).max(50).optional().nullable(),
|
|
114
|
-
contentChecksum: z.string().describe(
|
|
119
|
+
contentChecksum: /* @__PURE__ */ z.string().describe(
|
|
115
120
|
"Client defined content checksum. Can be used for content comparison."
|
|
116
121
|
).min(1).max(64).optional().nullable(),
|
|
117
|
-
renderDelayedEventConfig: z.object({
|
|
118
|
-
timeInQueueMinutes: z.number().int().describe(
|
|
122
|
+
renderDelayedEventConfig: /* @__PURE__ */ z.object({
|
|
123
|
+
timeInQueueMinutes: /* @__PURE__ */ z.number().int().describe(
|
|
119
124
|
"Controls DocumentRenderDelayed action event sending.\nEvent will be sent after time_in_queue_minutes if document render status is ACCEPTED/RENDERING."
|
|
120
125
|
).min(5).max(120).optional()
|
|
121
126
|
}).describe("Rendering notification config.").optional(),
|
|
122
|
-
sizeInBytes: z.number().int().describe(
|
|
127
|
+
sizeInBytes: /* @__PURE__ */ z.number().int().describe(
|
|
123
128
|
"Size in bytes of a rendered document. Returned only when Document is in `READY` state."
|
|
124
129
|
).optional().nullable()
|
|
125
130
|
}).describe("Document to be created").optional()
|
|
126
131
|
}).optional()
|
|
127
132
|
});
|
|
128
133
|
var CreateDocumentResponse = /* @__PURE__ */ z.object({
|
|
129
|
-
_id: z.string().describe("Document ID.").regex(
|
|
134
|
+
_id: /* @__PURE__ */ z.string().describe("Document ID.").regex(
|
|
130
135
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
131
136
|
"Must be a valid GUID"
|
|
132
137
|
).optional().nullable(),
|
|
133
|
-
_createdDate: z.date().describe("Represents the time this Document was created.").optional().nullable(),
|
|
134
|
-
_updatedDate: z.date().describe("Represents the time this Document was last updated.").optional().nullable(),
|
|
135
|
-
renderStatus: z.enum(["UNKNOWN", "ACCEPTED", "RENDERING", "READY", "FAILED", "EXPIRED"]).describe("Document render status.").optional(),
|
|
136
|
-
downloadUrl: z.string().describe(
|
|
138
|
+
_createdDate: /* @__PURE__ */ z.date().describe("Represents the time this Document was created.").optional().nullable(),
|
|
139
|
+
_updatedDate: /* @__PURE__ */ z.date().describe("Represents the time this Document was last updated.").optional().nullable(),
|
|
140
|
+
renderStatus: /* @__PURE__ */ z.enum(["UNKNOWN", "ACCEPTED", "RENDERING", "READY", "FAILED", "EXPIRED"]).describe("Document render status.").optional(),
|
|
141
|
+
downloadUrl: /* @__PURE__ */ z.string().describe(
|
|
137
142
|
"URL to download document. Returned only when Document is in `READY` state."
|
|
138
143
|
).url().optional().nullable(),
|
|
139
|
-
templateId: z.string().describe(
|
|
144
|
+
templateId: /* @__PURE__ */ z.string().describe(
|
|
140
145
|
"Template ID. When this parameter used the document will be rendered with this template default settings"
|
|
141
146
|
).min(1).max(20).optional().nullable(),
|
|
142
|
-
externalId: z.string().describe(
|
|
147
|
+
externalId: /* @__PURE__ */ z.string().describe(
|
|
143
148
|
"Unique per tenant external ID, for example order number. Used to retrieve Document later."
|
|
144
149
|
).min(1).max(100).optional().nullable(),
|
|
145
|
-
templateSettingsExternalId: z.string().describe(
|
|
150
|
+
templateSettingsExternalId: /* @__PURE__ */ z.string().describe(
|
|
146
151
|
"Unique per tenant template external ID, for example ticket definition ID. Used to lookup corresponding template & template settings."
|
|
147
152
|
).max(100).optional().nullable(),
|
|
148
|
-
templateSettingsId: z.string().describe("Template settings ID.").regex(
|
|
153
|
+
templateSettingsId: /* @__PURE__ */ z.string().describe("Template settings ID.").regex(
|
|
149
154
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
150
155
|
"Must be a valid GUID"
|
|
151
156
|
).optional().nullable(),
|
|
152
|
-
appSlug: z.string().describe("The app slug of the template").min(1).max(20).optional().nullable(),
|
|
153
|
-
templateType: z.string().describe("The type of the template.").min(1).max(20).optional().nullable(),
|
|
154
|
-
content: z.object({
|
|
155
|
-
pages: z.array(
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
157
|
+
appSlug: /* @__PURE__ */ z.string().describe("The app slug of the template").min(1).max(20).optional().nullable(),
|
|
158
|
+
templateType: /* @__PURE__ */ z.string().describe("The type of the template.").min(1).max(20).optional().nullable(),
|
|
159
|
+
content: /* @__PURE__ */ z.object({
|
|
160
|
+
pages: /* @__PURE__ */ z.array(
|
|
161
|
+
/* @__PURE__ */ z.record(
|
|
162
|
+
/* @__PURE__ */ z.string(),
|
|
163
|
+
/* @__PURE__ */ z.any()
|
|
164
|
+
)
|
|
165
|
+
).min(1).max(100).optional(),
|
|
166
|
+
content: /* @__PURE__ */ z.record(/* @__PURE__ */ z.string(), /* @__PURE__ */ z.any()).describe("Other document content referenced by $content variable").optional().nullable(),
|
|
167
|
+
language: /* @__PURE__ */ z.string().describe("ISO 639-1 language code of content (used in translations).").optional(),
|
|
168
|
+
locale: /* @__PURE__ */ z.string().describe("e.g. en-US.").min(2).max(35).optional().nullable()
|
|
159
169
|
}).describe("Document content that is injected into template.").optional(),
|
|
160
|
-
expiresInHours: z.number().int().describe(
|
|
170
|
+
expiresInHours: /* @__PURE__ */ z.number().int().describe(
|
|
161
171
|
"Number of hours after which document will be eventually expired and its content erased."
|
|
162
172
|
).min(1).max(43800).optional(),
|
|
163
|
-
expirationDate: z.date().describe("Represents the time this document becomes expired.").optional().nullable(),
|
|
164
|
-
format: z.enum(["UNKNOWN", "PDF"]).describe("Document format. Defaults to `PDF`.").optional(),
|
|
165
|
-
public: z.boolean().describe(
|
|
173
|
+
expirationDate: /* @__PURE__ */ z.date().describe("Represents the time this document becomes expired.").optional().nullable(),
|
|
174
|
+
format: /* @__PURE__ */ z.enum(["UNKNOWN", "PDF"]).describe("Document format. Defaults to `PDF`.").optional(),
|
|
175
|
+
public: /* @__PURE__ */ z.boolean().describe(
|
|
166
176
|
"Whether the link to the uploaded document is public or private.\nFor public document static URL will be returned.\nFor private document temporary URL will be generated by DocumentService.DownloadDocument."
|
|
167
177
|
).optional().nullable(),
|
|
168
|
-
fileName: z.string().describe(
|
|
178
|
+
fileName: /* @__PURE__ */ z.string().describe(
|
|
169
179
|
"Optional filename (without extension) to be used for the downloadable document."
|
|
170
180
|
).min(1).max(50).optional().nullable(),
|
|
171
|
-
contentChecksum: z.string().describe(
|
|
181
|
+
contentChecksum: /* @__PURE__ */ z.string().describe(
|
|
172
182
|
"Client defined content checksum. Can be used for content comparison."
|
|
173
183
|
).min(1).max(64).optional().nullable(),
|
|
174
|
-
renderDelayedEventConfig: z.object({
|
|
175
|
-
timeInQueueMinutes: z.number().int().describe(
|
|
184
|
+
renderDelayedEventConfig: /* @__PURE__ */ z.object({
|
|
185
|
+
timeInQueueMinutes: /* @__PURE__ */ z.number().int().describe(
|
|
176
186
|
"Controls DocumentRenderDelayed action event sending.\nEvent will be sent after time_in_queue_minutes if document render status is ACCEPTED/RENDERING."
|
|
177
187
|
).min(5).max(120).optional()
|
|
178
188
|
}).describe("Rendering notification config.").optional(),
|
|
179
|
-
sizeInBytes: z.number().int().describe(
|
|
189
|
+
sizeInBytes: /* @__PURE__ */ z.number().int().describe(
|
|
180
190
|
"Size in bytes of a rendered document. Returned only when Document is in `READY` state."
|
|
181
191
|
).optional().nullable()
|
|
182
192
|
});
|
|
183
193
|
var GetDocumentRequest = /* @__PURE__ */ z.object({
|
|
184
|
-
documentId: z.string().describe("ID of the Document to retrieve").regex(
|
|
194
|
+
documentId: /* @__PURE__ */ z.string().describe("ID of the Document to retrieve").regex(
|
|
185
195
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
186
196
|
"Must be a valid GUID"
|
|
187
197
|
),
|
|
188
|
-
options: z.object({
|
|
189
|
-
fields: z.array(z.enum(["DOCUMENT_CONTENT"])).max(1).optional()
|
|
198
|
+
options: /* @__PURE__ */ z.object({
|
|
199
|
+
fields: /* @__PURE__ */ z.array(/* @__PURE__ */ z.enum(["DOCUMENT_CONTENT"])).max(1).optional()
|
|
190
200
|
}).optional()
|
|
191
201
|
});
|
|
192
202
|
var GetDocumentResponse = /* @__PURE__ */ z.object({
|
|
193
|
-
_id: z.string().describe("Document ID.").regex(
|
|
203
|
+
_id: /* @__PURE__ */ z.string().describe("Document ID.").regex(
|
|
194
204
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
195
205
|
"Must be a valid GUID"
|
|
196
206
|
).optional().nullable(),
|
|
197
|
-
_createdDate: z.date().describe("Represents the time this Document was created.").optional().nullable(),
|
|
198
|
-
_updatedDate: z.date().describe("Represents the time this Document was last updated.").optional().nullable(),
|
|
199
|
-
renderStatus: z.enum(["UNKNOWN", "ACCEPTED", "RENDERING", "READY", "FAILED", "EXPIRED"]).describe("Document render status.").optional(),
|
|
200
|
-
downloadUrl: z.string().describe(
|
|
207
|
+
_createdDate: /* @__PURE__ */ z.date().describe("Represents the time this Document was created.").optional().nullable(),
|
|
208
|
+
_updatedDate: /* @__PURE__ */ z.date().describe("Represents the time this Document was last updated.").optional().nullable(),
|
|
209
|
+
renderStatus: /* @__PURE__ */ z.enum(["UNKNOWN", "ACCEPTED", "RENDERING", "READY", "FAILED", "EXPIRED"]).describe("Document render status.").optional(),
|
|
210
|
+
downloadUrl: /* @__PURE__ */ z.string().describe(
|
|
201
211
|
"URL to download document. Returned only when Document is in `READY` state."
|
|
202
212
|
).url().optional().nullable(),
|
|
203
|
-
templateId: z.string().describe(
|
|
213
|
+
templateId: /* @__PURE__ */ z.string().describe(
|
|
204
214
|
"Template ID. When this parameter used the document will be rendered with this template default settings"
|
|
205
215
|
).min(1).max(20).optional().nullable(),
|
|
206
|
-
externalId: z.string().describe(
|
|
216
|
+
externalId: /* @__PURE__ */ z.string().describe(
|
|
207
217
|
"Unique per tenant external ID, for example order number. Used to retrieve Document later."
|
|
208
218
|
).min(1).max(100).optional().nullable(),
|
|
209
|
-
templateSettingsExternalId: z.string().describe(
|
|
219
|
+
templateSettingsExternalId: /* @__PURE__ */ z.string().describe(
|
|
210
220
|
"Unique per tenant template external ID, for example ticket definition ID. Used to lookup corresponding template & template settings."
|
|
211
221
|
).max(100).optional().nullable(),
|
|
212
|
-
templateSettingsId: z.string().describe("Template settings ID.").regex(
|
|
222
|
+
templateSettingsId: /* @__PURE__ */ z.string().describe("Template settings ID.").regex(
|
|
213
223
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
214
224
|
"Must be a valid GUID"
|
|
215
225
|
).optional().nullable(),
|
|
216
|
-
appSlug: z.string().describe("The app slug of the template").min(1).max(20).optional().nullable(),
|
|
217
|
-
templateType: z.string().describe("The type of the template.").min(1).max(20).optional().nullable(),
|
|
218
|
-
content: z.object({
|
|
219
|
-
pages: z.array(
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
226
|
+
appSlug: /* @__PURE__ */ z.string().describe("The app slug of the template").min(1).max(20).optional().nullable(),
|
|
227
|
+
templateType: /* @__PURE__ */ z.string().describe("The type of the template.").min(1).max(20).optional().nullable(),
|
|
228
|
+
content: /* @__PURE__ */ z.object({
|
|
229
|
+
pages: /* @__PURE__ */ z.array(
|
|
230
|
+
/* @__PURE__ */ z.record(
|
|
231
|
+
/* @__PURE__ */ z.string(),
|
|
232
|
+
/* @__PURE__ */ z.any()
|
|
233
|
+
)
|
|
234
|
+
).min(1).max(100).optional(),
|
|
235
|
+
content: /* @__PURE__ */ z.record(/* @__PURE__ */ z.string(), /* @__PURE__ */ z.any()).describe("Other document content referenced by $content variable").optional().nullable(),
|
|
236
|
+
language: /* @__PURE__ */ z.string().describe("ISO 639-1 language code of content (used in translations).").optional(),
|
|
237
|
+
locale: /* @__PURE__ */ z.string().describe("e.g. en-US.").min(2).max(35).optional().nullable()
|
|
223
238
|
}).describe("Document content that is injected into template.").optional(),
|
|
224
|
-
expiresInHours: z.number().int().describe(
|
|
239
|
+
expiresInHours: /* @__PURE__ */ z.number().int().describe(
|
|
225
240
|
"Number of hours after which document will be eventually expired and its content erased."
|
|
226
241
|
).min(1).max(43800).optional(),
|
|
227
|
-
expirationDate: z.date().describe("Represents the time this document becomes expired.").optional().nullable(),
|
|
228
|
-
format: z.enum(["UNKNOWN", "PDF"]).describe("Document format. Defaults to `PDF`.").optional(),
|
|
229
|
-
public: z.boolean().describe(
|
|
242
|
+
expirationDate: /* @__PURE__ */ z.date().describe("Represents the time this document becomes expired.").optional().nullable(),
|
|
243
|
+
format: /* @__PURE__ */ z.enum(["UNKNOWN", "PDF"]).describe("Document format. Defaults to `PDF`.").optional(),
|
|
244
|
+
public: /* @__PURE__ */ z.boolean().describe(
|
|
230
245
|
"Whether the link to the uploaded document is public or private.\nFor public document static URL will be returned.\nFor private document temporary URL will be generated by DocumentService.DownloadDocument."
|
|
231
246
|
).optional().nullable(),
|
|
232
|
-
fileName: z.string().describe(
|
|
247
|
+
fileName: /* @__PURE__ */ z.string().describe(
|
|
233
248
|
"Optional filename (without extension) to be used for the downloadable document."
|
|
234
249
|
).min(1).max(50).optional().nullable(),
|
|
235
|
-
contentChecksum: z.string().describe(
|
|
250
|
+
contentChecksum: /* @__PURE__ */ z.string().describe(
|
|
236
251
|
"Client defined content checksum. Can be used for content comparison."
|
|
237
252
|
).min(1).max(64).optional().nullable(),
|
|
238
|
-
renderDelayedEventConfig: z.object({
|
|
239
|
-
timeInQueueMinutes: z.number().int().describe(
|
|
253
|
+
renderDelayedEventConfig: /* @__PURE__ */ z.object({
|
|
254
|
+
timeInQueueMinutes: /* @__PURE__ */ z.number().int().describe(
|
|
240
255
|
"Controls DocumentRenderDelayed action event sending.\nEvent will be sent after time_in_queue_minutes if document render status is ACCEPTED/RENDERING."
|
|
241
256
|
).min(5).max(120).optional()
|
|
242
257
|
}).describe("Rendering notification config.").optional(),
|
|
243
|
-
sizeInBytes: z.number().int().describe(
|
|
258
|
+
sizeInBytes: /* @__PURE__ */ z.number().int().describe(
|
|
244
259
|
"Size in bytes of a rendered document. Returned only when Document is in `READY` state."
|
|
245
260
|
).optional().nullable()
|
|
246
261
|
});
|
|
247
262
|
var DeleteDocumentRequest = /* @__PURE__ */ z.object({
|
|
248
|
-
documentId: z.string().describe("ID of the Document to delete").regex(
|
|
263
|
+
documentId: /* @__PURE__ */ z.string().describe("ID of the Document to delete").regex(
|
|
249
264
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
250
265
|
"Must be a valid GUID"
|
|
251
266
|
)
|
|
252
267
|
});
|
|
253
268
|
var DeleteDocumentResponse = /* @__PURE__ */ z.object({
|
|
254
|
-
document: z.object({
|
|
255
|
-
_id: z.string().describe("Document ID.").regex(
|
|
269
|
+
document: /* @__PURE__ */ z.object({
|
|
270
|
+
_id: /* @__PURE__ */ z.string().describe("Document ID.").regex(
|
|
256
271
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
257
272
|
"Must be a valid GUID"
|
|
258
273
|
).optional().nullable(),
|
|
259
|
-
_createdDate: z.date().describe("Represents the time this Document was created.").optional().nullable(),
|
|
260
|
-
_updatedDate: z.date().describe("Represents the time this Document was last updated.").optional().nullable(),
|
|
261
|
-
renderStatus: z.enum([
|
|
274
|
+
_createdDate: /* @__PURE__ */ z.date().describe("Represents the time this Document was created.").optional().nullable(),
|
|
275
|
+
_updatedDate: /* @__PURE__ */ z.date().describe("Represents the time this Document was last updated.").optional().nullable(),
|
|
276
|
+
renderStatus: /* @__PURE__ */ z.enum([
|
|
262
277
|
"UNKNOWN",
|
|
263
278
|
"ACCEPTED",
|
|
264
279
|
"RENDERING",
|
|
@@ -266,94 +281,99 @@ var DeleteDocumentResponse = /* @__PURE__ */ z.object({
|
|
|
266
281
|
"FAILED",
|
|
267
282
|
"EXPIRED"
|
|
268
283
|
]).describe("Document render status.").optional(),
|
|
269
|
-
downloadUrl: z.string().describe(
|
|
284
|
+
downloadUrl: /* @__PURE__ */ z.string().describe(
|
|
270
285
|
"URL to download document. Returned only when Document is in `READY` state."
|
|
271
286
|
).url().optional().nullable(),
|
|
272
|
-
templateId: z.string().describe(
|
|
287
|
+
templateId: /* @__PURE__ */ z.string().describe(
|
|
273
288
|
"Template ID. When this parameter used the document will be rendered with this template default settings"
|
|
274
289
|
).min(1).max(20).optional().nullable(),
|
|
275
|
-
externalId: z.string().describe(
|
|
290
|
+
externalId: /* @__PURE__ */ z.string().describe(
|
|
276
291
|
"Unique per tenant external ID, for example order number. Used to retrieve Document later."
|
|
277
292
|
).min(1).max(100).optional().nullable(),
|
|
278
|
-
templateSettingsExternalId: z.string().describe(
|
|
293
|
+
templateSettingsExternalId: /* @__PURE__ */ z.string().describe(
|
|
279
294
|
"Unique per tenant template external ID, for example ticket definition ID. Used to lookup corresponding template & template settings."
|
|
280
295
|
).max(100).optional().nullable(),
|
|
281
|
-
templateSettingsId: z.string().describe("Template settings ID.").regex(
|
|
296
|
+
templateSettingsId: /* @__PURE__ */ z.string().describe("Template settings ID.").regex(
|
|
282
297
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
283
298
|
"Must be a valid GUID"
|
|
284
299
|
).optional().nullable(),
|
|
285
|
-
appSlug: z.string().describe("The app slug of the template").min(1).max(20).optional().nullable(),
|
|
286
|
-
templateType: z.string().describe("The type of the template.").min(1).max(20).optional().nullable(),
|
|
287
|
-
content: z.object({
|
|
288
|
-
pages: z.array(
|
|
289
|
-
|
|
290
|
-
|
|
300
|
+
appSlug: /* @__PURE__ */ z.string().describe("The app slug of the template").min(1).max(20).optional().nullable(),
|
|
301
|
+
templateType: /* @__PURE__ */ z.string().describe("The type of the template.").min(1).max(20).optional().nullable(),
|
|
302
|
+
content: /* @__PURE__ */ z.object({
|
|
303
|
+
pages: /* @__PURE__ */ z.array(
|
|
304
|
+
/* @__PURE__ */ z.record(
|
|
305
|
+
/* @__PURE__ */ z.string(),
|
|
306
|
+
/* @__PURE__ */ z.any()
|
|
307
|
+
)
|
|
308
|
+
).min(1).max(100).optional(),
|
|
309
|
+
content: /* @__PURE__ */ z.record(/* @__PURE__ */ z.string(), /* @__PURE__ */ z.any()).describe("Other document content referenced by $content variable").optional().nullable(),
|
|
310
|
+
language: /* @__PURE__ */ z.string().describe(
|
|
291
311
|
"ISO 639-1 language code of content (used in translations)."
|
|
292
312
|
).optional(),
|
|
293
|
-
locale: z.string().describe("e.g. en-US.").min(2).max(35).optional().nullable()
|
|
313
|
+
locale: /* @__PURE__ */ z.string().describe("e.g. en-US.").min(2).max(35).optional().nullable()
|
|
294
314
|
}).describe("Document content that is injected into template.").optional(),
|
|
295
|
-
expiresInHours: z.number().int().describe(
|
|
315
|
+
expiresInHours: /* @__PURE__ */ z.number().int().describe(
|
|
296
316
|
"Number of hours after which document will be eventually expired and its content erased."
|
|
297
317
|
).min(1).max(43800).optional(),
|
|
298
|
-
expirationDate: z.date().describe("Represents the time this document becomes expired.").optional().nullable(),
|
|
299
|
-
format: z.enum(["UNKNOWN", "PDF"]).describe("Document format. Defaults to `PDF`.").optional(),
|
|
300
|
-
public: z.boolean().describe(
|
|
318
|
+
expirationDate: /* @__PURE__ */ z.date().describe("Represents the time this document becomes expired.").optional().nullable(),
|
|
319
|
+
format: /* @__PURE__ */ z.enum(["UNKNOWN", "PDF"]).describe("Document format. Defaults to `PDF`.").optional(),
|
|
320
|
+
public: /* @__PURE__ */ z.boolean().describe(
|
|
301
321
|
"Whether the link to the uploaded document is public or private.\nFor public document static URL will be returned.\nFor private document temporary URL will be generated by DocumentService.DownloadDocument."
|
|
302
322
|
).optional().nullable(),
|
|
303
|
-
fileName: z.string().describe(
|
|
323
|
+
fileName: /* @__PURE__ */ z.string().describe(
|
|
304
324
|
"Optional filename (without extension) to be used for the downloadable document."
|
|
305
325
|
).min(1).max(50).optional().nullable(),
|
|
306
|
-
contentChecksum: z.string().describe(
|
|
326
|
+
contentChecksum: /* @__PURE__ */ z.string().describe(
|
|
307
327
|
"Client defined content checksum. Can be used for content comparison."
|
|
308
328
|
).min(1).max(64).optional().nullable(),
|
|
309
|
-
renderDelayedEventConfig: z.object({
|
|
310
|
-
timeInQueueMinutes: z.number().int().describe(
|
|
329
|
+
renderDelayedEventConfig: /* @__PURE__ */ z.object({
|
|
330
|
+
timeInQueueMinutes: /* @__PURE__ */ z.number().int().describe(
|
|
311
331
|
"Controls DocumentRenderDelayed action event sending.\nEvent will be sent after time_in_queue_minutes if document render status is ACCEPTED/RENDERING."
|
|
312
332
|
).min(5).max(120).optional()
|
|
313
333
|
}).describe("Rendering notification config.").optional(),
|
|
314
|
-
sizeInBytes: z.number().int().describe(
|
|
334
|
+
sizeInBytes: /* @__PURE__ */ z.number().int().describe(
|
|
315
335
|
"Size in bytes of a rendered document. Returned only when Document is in `READY` state."
|
|
316
336
|
).optional().nullable()
|
|
317
337
|
}).describe("Deleted document.").optional()
|
|
318
338
|
});
|
|
319
339
|
var QueryDocumentRequest = /* @__PURE__ */ z.object({
|
|
320
|
-
query: z.intersection(
|
|
321
|
-
z.object({
|
|
322
|
-
filter: z.record(z.string(), z.any()).describe(
|
|
340
|
+
query: /* @__PURE__ */ z.intersection(
|
|
341
|
+
/* @__PURE__ */ z.object({
|
|
342
|
+
filter: /* @__PURE__ */ z.record(/* @__PURE__ */ z.string(), /* @__PURE__ */ z.any()).describe(
|
|
323
343
|
"Filter object.\n\nLearn more about [filtering](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#filters)."
|
|
324
344
|
).optional().nullable(),
|
|
325
|
-
sort: z.array(
|
|
326
|
-
z.object({
|
|
327
|
-
fieldName: z.string().describe("Name of the field to sort by.").max(512).optional(),
|
|
328
|
-
order: z.enum(["ASC", "DESC"]).optional(),
|
|
329
|
-
origin: z.object({
|
|
330
|
-
latitude: z.number().describe("Address latitude.").optional().nullable(),
|
|
331
|
-
longitude: z.number().describe("Address longitude.").optional().nullable()
|
|
345
|
+
sort: /* @__PURE__ */ z.array(
|
|
346
|
+
/* @__PURE__ */ z.object({
|
|
347
|
+
fieldName: /* @__PURE__ */ z.string().describe("Name of the field to sort by.").max(512).optional(),
|
|
348
|
+
order: /* @__PURE__ */ z.enum(["ASC", "DESC"]).optional(),
|
|
349
|
+
origin: /* @__PURE__ */ z.object({
|
|
350
|
+
latitude: /* @__PURE__ */ z.number().describe("Address latitude.").optional().nullable(),
|
|
351
|
+
longitude: /* @__PURE__ */ z.number().describe("Address longitude.").optional().nullable()
|
|
332
352
|
}).describe(
|
|
333
353
|
"Origin point for geo-distance sorting on a GEO field\nresults are ordered by distance from this point (ASC = nearest first, DESC = farthest first)."
|
|
334
354
|
).optional()
|
|
335
355
|
})
|
|
336
356
|
).optional()
|
|
337
357
|
}),
|
|
338
|
-
z.xor([
|
|
339
|
-
z.object({
|
|
340
|
-
paging: z.never().optional(),
|
|
341
|
-
cursorPaging: z.never().optional()
|
|
358
|
+
/* @__PURE__ */ z.xor([
|
|
359
|
+
/* @__PURE__ */ z.object({
|
|
360
|
+
paging: /* @__PURE__ */ z.never().optional(),
|
|
361
|
+
cursorPaging: /* @__PURE__ */ z.never().optional()
|
|
342
362
|
}),
|
|
343
|
-
z.object({
|
|
344
|
-
cursorPaging: z.never().optional(),
|
|
345
|
-
paging: z.object({
|
|
346
|
-
limit: z.number().int().describe("Number of items to load.").min(0).optional().nullable(),
|
|
347
|
-
offset: z.number().int().describe("Number of items to skip in the current sort order.").min(0).optional().nullable()
|
|
363
|
+
/* @__PURE__ */ z.object({
|
|
364
|
+
cursorPaging: /* @__PURE__ */ z.never().optional(),
|
|
365
|
+
paging: /* @__PURE__ */ z.object({
|
|
366
|
+
limit: /* @__PURE__ */ z.number().int().describe("Number of items to load.").min(0).optional().nullable(),
|
|
367
|
+
offset: /* @__PURE__ */ z.number().int().describe("Number of items to skip in the current sort order.").min(0).optional().nullable()
|
|
348
368
|
}).describe(
|
|
349
369
|
"Paging options to limit and offset the number of items."
|
|
350
370
|
)
|
|
351
371
|
}),
|
|
352
|
-
z.object({
|
|
353
|
-
paging: z.never().optional(),
|
|
354
|
-
cursorPaging: z.object({
|
|
355
|
-
limit: z.number().int().describe("Maximum number of items to return in the results.").min(0).max(100).optional().nullable(),
|
|
356
|
-
cursor: z.string().describe(
|
|
372
|
+
/* @__PURE__ */ z.object({
|
|
373
|
+
paging: /* @__PURE__ */ z.never().optional(),
|
|
374
|
+
cursorPaging: /* @__PURE__ */ z.object({
|
|
375
|
+
limit: /* @__PURE__ */ z.number().int().describe("Maximum number of items to return in the results.").min(0).max(100).optional().nullable(),
|
|
376
|
+
cursor: /* @__PURE__ */ z.string().describe(
|
|
357
377
|
"Pointer to the next or previous page in the list of results.\n\nPass the relevant cursor token from the `pagingMetadata` object in the previous call's response.\nNot relevant for the first request."
|
|
358
378
|
).max(16e3).optional().nullable()
|
|
359
379
|
}).describe(
|
|
@@ -362,20 +382,20 @@ var QueryDocumentRequest = /* @__PURE__ */ z.object({
|
|
|
362
382
|
})
|
|
363
383
|
])
|
|
364
384
|
).describe("WQL expression"),
|
|
365
|
-
options: z.object({
|
|
366
|
-
fields: z.array(z.enum(["DOCUMENT_CONTENT"])).max(1).optional()
|
|
385
|
+
options: /* @__PURE__ */ z.object({
|
|
386
|
+
fields: /* @__PURE__ */ z.array(/* @__PURE__ */ z.enum(["DOCUMENT_CONTENT"])).max(1).optional()
|
|
367
387
|
}).optional()
|
|
368
388
|
});
|
|
369
389
|
var QueryDocumentResponse = /* @__PURE__ */ z.object({
|
|
370
|
-
documents: z.array(
|
|
371
|
-
z.object({
|
|
372
|
-
_id: z.string().describe("Document ID.").regex(
|
|
390
|
+
documents: /* @__PURE__ */ z.array(
|
|
391
|
+
/* @__PURE__ */ z.object({
|
|
392
|
+
_id: /* @__PURE__ */ z.string().describe("Document ID.").regex(
|
|
373
393
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
374
394
|
"Must be a valid GUID"
|
|
375
395
|
).optional().nullable(),
|
|
376
|
-
_createdDate: z.date().describe("Represents the time this Document was created.").optional().nullable(),
|
|
377
|
-
_updatedDate: z.date().describe("Represents the time this Document was last updated.").optional().nullable(),
|
|
378
|
-
renderStatus: z.enum([
|
|
396
|
+
_createdDate: /* @__PURE__ */ z.date().describe("Represents the time this Document was created.").optional().nullable(),
|
|
397
|
+
_updatedDate: /* @__PURE__ */ z.date().describe("Represents the time this Document was last updated.").optional().nullable(),
|
|
398
|
+
renderStatus: /* @__PURE__ */ z.enum([
|
|
379
399
|
"UNKNOWN",
|
|
380
400
|
"ACCEPTED",
|
|
381
401
|
"RENDERING",
|
|
@@ -383,72 +403,77 @@ var QueryDocumentResponse = /* @__PURE__ */ z.object({
|
|
|
383
403
|
"FAILED",
|
|
384
404
|
"EXPIRED"
|
|
385
405
|
]).describe("Document render status.").optional(),
|
|
386
|
-
downloadUrl: z.string().describe(
|
|
406
|
+
downloadUrl: /* @__PURE__ */ z.string().describe(
|
|
387
407
|
"URL to download document. Returned only when Document is in `READY` state."
|
|
388
408
|
).url().optional().nullable(),
|
|
389
|
-
templateId: z.string().describe(
|
|
409
|
+
templateId: /* @__PURE__ */ z.string().describe(
|
|
390
410
|
"Template ID. When this parameter used the document will be rendered with this template default settings"
|
|
391
411
|
).min(1).max(20).optional().nullable(),
|
|
392
|
-
externalId: z.string().describe(
|
|
412
|
+
externalId: /* @__PURE__ */ z.string().describe(
|
|
393
413
|
"Unique per tenant external ID, for example order number. Used to retrieve Document later."
|
|
394
414
|
).min(1).max(100).optional().nullable(),
|
|
395
|
-
templateSettingsExternalId: z.string().describe(
|
|
415
|
+
templateSettingsExternalId: /* @__PURE__ */ z.string().describe(
|
|
396
416
|
"Unique per tenant template external ID, for example ticket definition ID. Used to lookup corresponding template & template settings."
|
|
397
417
|
).max(100).optional().nullable(),
|
|
398
|
-
templateSettingsId: z.string().describe("Template settings ID.").regex(
|
|
418
|
+
templateSettingsId: /* @__PURE__ */ z.string().describe("Template settings ID.").regex(
|
|
399
419
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
400
420
|
"Must be a valid GUID"
|
|
401
421
|
).optional().nullable(),
|
|
402
|
-
appSlug: z.string().describe("The app slug of the template").min(1).max(20).optional().nullable(),
|
|
403
|
-
templateType: z.string().describe("The type of the template.").min(1).max(20).optional().nullable(),
|
|
404
|
-
content: z.object({
|
|
405
|
-
pages: z.array(
|
|
406
|
-
|
|
422
|
+
appSlug: /* @__PURE__ */ z.string().describe("The app slug of the template").min(1).max(20).optional().nullable(),
|
|
423
|
+
templateType: /* @__PURE__ */ z.string().describe("The type of the template.").min(1).max(20).optional().nullable(),
|
|
424
|
+
content: /* @__PURE__ */ z.object({
|
|
425
|
+
pages: /* @__PURE__ */ z.array(
|
|
426
|
+
/* @__PURE__ */ z.record(
|
|
427
|
+
/* @__PURE__ */ z.string(),
|
|
428
|
+
/* @__PURE__ */ z.any()
|
|
429
|
+
)
|
|
430
|
+
).min(1).max(100).optional(),
|
|
431
|
+
content: /* @__PURE__ */ z.record(/* @__PURE__ */ z.string(), /* @__PURE__ */ z.any()).describe(
|
|
407
432
|
"Other document content referenced by $content variable"
|
|
408
433
|
).optional().nullable(),
|
|
409
|
-
language: z.string().describe(
|
|
434
|
+
language: /* @__PURE__ */ z.string().describe(
|
|
410
435
|
"ISO 639-1 language code of content (used in translations)."
|
|
411
436
|
).optional(),
|
|
412
|
-
locale: z.string().describe("e.g. en-US.").min(2).max(35).optional().nullable()
|
|
437
|
+
locale: /* @__PURE__ */ z.string().describe("e.g. en-US.").min(2).max(35).optional().nullable()
|
|
413
438
|
}).describe("Document content that is injected into template.").optional(),
|
|
414
|
-
expiresInHours: z.number().int().describe(
|
|
439
|
+
expiresInHours: /* @__PURE__ */ z.number().int().describe(
|
|
415
440
|
"Number of hours after which document will be eventually expired and its content erased."
|
|
416
441
|
).min(1).max(43800).optional(),
|
|
417
|
-
expirationDate: z.date().describe("Represents the time this document becomes expired.").optional().nullable(),
|
|
418
|
-
format: z.enum(["UNKNOWN", "PDF"]).describe("Document format. Defaults to `PDF`.").optional(),
|
|
419
|
-
public: z.boolean().describe(
|
|
442
|
+
expirationDate: /* @__PURE__ */ z.date().describe("Represents the time this document becomes expired.").optional().nullable(),
|
|
443
|
+
format: /* @__PURE__ */ z.enum(["UNKNOWN", "PDF"]).describe("Document format. Defaults to `PDF`.").optional(),
|
|
444
|
+
public: /* @__PURE__ */ z.boolean().describe(
|
|
420
445
|
"Whether the link to the uploaded document is public or private.\nFor public document static URL will be returned.\nFor private document temporary URL will be generated by DocumentService.DownloadDocument."
|
|
421
446
|
).optional().nullable(),
|
|
422
|
-
fileName: z.string().describe(
|
|
447
|
+
fileName: /* @__PURE__ */ z.string().describe(
|
|
423
448
|
"Optional filename (without extension) to be used for the downloadable document."
|
|
424
449
|
).min(1).max(50).optional().nullable(),
|
|
425
|
-
contentChecksum: z.string().describe(
|
|
450
|
+
contentChecksum: /* @__PURE__ */ z.string().describe(
|
|
426
451
|
"Client defined content checksum. Can be used for content comparison."
|
|
427
452
|
).min(1).max(64).optional().nullable(),
|
|
428
|
-
renderDelayedEventConfig: z.object({
|
|
429
|
-
timeInQueueMinutes: z.number().int().describe(
|
|
453
|
+
renderDelayedEventConfig: /* @__PURE__ */ z.object({
|
|
454
|
+
timeInQueueMinutes: /* @__PURE__ */ z.number().int().describe(
|
|
430
455
|
"Controls DocumentRenderDelayed action event sending.\nEvent will be sent after time_in_queue_minutes if document render status is ACCEPTED/RENDERING."
|
|
431
456
|
).min(5).max(120).optional()
|
|
432
457
|
}).describe("Rendering notification config.").optional(),
|
|
433
|
-
sizeInBytes: z.number().int().describe(
|
|
458
|
+
sizeInBytes: /* @__PURE__ */ z.number().int().describe(
|
|
434
459
|
"Size in bytes of a rendered document. Returned only when Document is in `READY` state."
|
|
435
460
|
).optional().nullable()
|
|
436
461
|
})
|
|
437
462
|
).optional(),
|
|
438
|
-
metadata: z.object({
|
|
439
|
-
count: z.number().int().describe("Number of items returned in the response.").optional().nullable(),
|
|
440
|
-
offset: z.number().int().describe("Offset that was requested.").optional().nullable(),
|
|
441
|
-
total: z.number().int().describe(
|
|
463
|
+
metadata: /* @__PURE__ */ z.object({
|
|
464
|
+
count: /* @__PURE__ */ z.number().int().describe("Number of items returned in the response.").optional().nullable(),
|
|
465
|
+
offset: /* @__PURE__ */ z.number().int().describe("Offset that was requested.").optional().nullable(),
|
|
466
|
+
total: /* @__PURE__ */ z.number().int().describe(
|
|
442
467
|
"Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set."
|
|
443
468
|
).optional().nullable(),
|
|
444
|
-
tooManyToCount: z.boolean().describe(
|
|
469
|
+
tooManyToCount: /* @__PURE__ */ z.boolean().describe(
|
|
445
470
|
"Flag that indicates the server failed to calculate the `total` field."
|
|
446
471
|
).optional().nullable(),
|
|
447
|
-
cursors: z.object({
|
|
448
|
-
next: z.string().describe(
|
|
472
|
+
cursors: /* @__PURE__ */ z.object({
|
|
473
|
+
next: /* @__PURE__ */ z.string().describe(
|
|
449
474
|
"Cursor string pointing to the next page in the list of results."
|
|
450
475
|
).max(16e3).optional().nullable(),
|
|
451
|
-
prev: z.string().describe(
|
|
476
|
+
prev: /* @__PURE__ */ z.string().describe(
|
|
452
477
|
"Cursor pointing to the previous page in the list of results."
|
|
453
478
|
).max(16e3).optional().nullable()
|
|
454
479
|
}).describe(
|
|
@@ -457,12 +482,12 @@ var QueryDocumentResponse = /* @__PURE__ */ z.object({
|
|
|
457
482
|
}).describe("Query results' metadata").optional()
|
|
458
483
|
});
|
|
459
484
|
var UpdateDocumentRequest = /* @__PURE__ */ z.object({
|
|
460
|
-
_id: z.string().describe("Document ID.").regex(
|
|
485
|
+
_id: /* @__PURE__ */ z.string().describe("Document ID.").regex(
|
|
461
486
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
462
487
|
"Must be a valid GUID"
|
|
463
488
|
),
|
|
464
|
-
options: z.object({
|
|
465
|
-
renderStatus: z.enum([
|
|
489
|
+
options: /* @__PURE__ */ z.object({
|
|
490
|
+
renderStatus: /* @__PURE__ */ z.enum([
|
|
466
491
|
"UNKNOWN",
|
|
467
492
|
"ACCEPTED",
|
|
468
493
|
"RENDERING",
|
|
@@ -470,29 +495,29 @@ var UpdateDocumentRequest = /* @__PURE__ */ z.object({
|
|
|
470
495
|
"FAILED",
|
|
471
496
|
"EXPIRED"
|
|
472
497
|
]).optional(),
|
|
473
|
-
file: z.object({
|
|
474
|
-
fileId: z.string().describe("File ID.").optional().nullable(),
|
|
475
|
-
staticUrl: z.string().describe("File URL. Defined only for public documents.").optional().nullable(),
|
|
476
|
-
filePath: z.string().describe("File path.").optional().nullable(),
|
|
477
|
-
sizeInBytes: z.number().int().describe("Size in bytes.").optional().nullable()
|
|
498
|
+
file: /* @__PURE__ */ z.object({
|
|
499
|
+
fileId: /* @__PURE__ */ z.string().describe("File ID.").optional().nullable(),
|
|
500
|
+
staticUrl: /* @__PURE__ */ z.string().describe("File URL. Defined only for public documents.").optional().nullable(),
|
|
501
|
+
filePath: /* @__PURE__ */ z.string().describe("File path.").optional().nullable(),
|
|
502
|
+
sizeInBytes: /* @__PURE__ */ z.number().int().describe("Size in bytes.").optional().nullable()
|
|
478
503
|
}).describe("Rendered document file.").optional(),
|
|
479
|
-
sourceFile: z.object({
|
|
480
|
-
fileId: z.string().describe("File ID.").optional().nullable(),
|
|
481
|
-
staticUrl: z.string().describe("File URL. Defined only for public documents.").optional().nullable(),
|
|
482
|
-
filePath: z.string().describe("File path.").optional().nullable(),
|
|
483
|
-
sizeInBytes: z.number().int().describe("Size in bytes.").optional().nullable()
|
|
504
|
+
sourceFile: /* @__PURE__ */ z.object({
|
|
505
|
+
fileId: /* @__PURE__ */ z.string().describe("File ID.").optional().nullable(),
|
|
506
|
+
staticUrl: /* @__PURE__ */ z.string().describe("File URL. Defined only for public documents.").optional().nullable(),
|
|
507
|
+
filePath: /* @__PURE__ */ z.string().describe("File path.").optional().nullable(),
|
|
508
|
+
sizeInBytes: /* @__PURE__ */ z.number().int().describe("Size in bytes.").optional().nullable()
|
|
484
509
|
}).describe("Rendered document source HTML file.").optional()
|
|
485
510
|
}).optional()
|
|
486
511
|
});
|
|
487
512
|
var UpdateDocumentResponse = /* @__PURE__ */ z.object({
|
|
488
|
-
document: z.object({
|
|
489
|
-
_id: z.string().describe("Document ID.").regex(
|
|
513
|
+
document: /* @__PURE__ */ z.object({
|
|
514
|
+
_id: /* @__PURE__ */ z.string().describe("Document ID.").regex(
|
|
490
515
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
491
516
|
"Must be a valid GUID"
|
|
492
517
|
).optional().nullable(),
|
|
493
|
-
_createdDate: z.date().describe("Represents the time this Document was created.").optional().nullable(),
|
|
494
|
-
_updatedDate: z.date().describe("Represents the time this Document was last updated.").optional().nullable(),
|
|
495
|
-
renderStatus: z.enum([
|
|
518
|
+
_createdDate: /* @__PURE__ */ z.date().describe("Represents the time this Document was created.").optional().nullable(),
|
|
519
|
+
_updatedDate: /* @__PURE__ */ z.date().describe("Represents the time this Document was last updated.").optional().nullable(),
|
|
520
|
+
renderStatus: /* @__PURE__ */ z.enum([
|
|
496
521
|
"UNKNOWN",
|
|
497
522
|
"ACCEPTED",
|
|
498
523
|
"RENDERING",
|
|
@@ -500,144 +525,157 @@ var UpdateDocumentResponse = /* @__PURE__ */ z.object({
|
|
|
500
525
|
"FAILED",
|
|
501
526
|
"EXPIRED"
|
|
502
527
|
]).describe("Document render status.").optional(),
|
|
503
|
-
downloadUrl: z.string().describe(
|
|
528
|
+
downloadUrl: /* @__PURE__ */ z.string().describe(
|
|
504
529
|
"URL to download document. Returned only when Document is in `READY` state."
|
|
505
530
|
).url().optional().nullable(),
|
|
506
|
-
templateId: z.string().describe(
|
|
531
|
+
templateId: /* @__PURE__ */ z.string().describe(
|
|
507
532
|
"Template ID. When this parameter used the document will be rendered with this template default settings"
|
|
508
533
|
).min(1).max(20).optional().nullable(),
|
|
509
|
-
externalId: z.string().describe(
|
|
534
|
+
externalId: /* @__PURE__ */ z.string().describe(
|
|
510
535
|
"Unique per tenant external ID, for example order number. Used to retrieve Document later."
|
|
511
536
|
).min(1).max(100).optional().nullable(),
|
|
512
|
-
templateSettingsExternalId: z.string().describe(
|
|
537
|
+
templateSettingsExternalId: /* @__PURE__ */ z.string().describe(
|
|
513
538
|
"Unique per tenant template external ID, for example ticket definition ID. Used to lookup corresponding template & template settings."
|
|
514
539
|
).max(100).optional().nullable(),
|
|
515
|
-
templateSettingsId: z.string().describe("Template settings ID.").regex(
|
|
540
|
+
templateSettingsId: /* @__PURE__ */ z.string().describe("Template settings ID.").regex(
|
|
516
541
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
517
542
|
"Must be a valid GUID"
|
|
518
543
|
).optional().nullable(),
|
|
519
|
-
appSlug: z.string().describe("The app slug of the template").min(1).max(20).optional().nullable(),
|
|
520
|
-
templateType: z.string().describe("The type of the template.").min(1).max(20).optional().nullable(),
|
|
521
|
-
content: z.object({
|
|
522
|
-
pages: z.array(
|
|
523
|
-
|
|
524
|
-
|
|
544
|
+
appSlug: /* @__PURE__ */ z.string().describe("The app slug of the template").min(1).max(20).optional().nullable(),
|
|
545
|
+
templateType: /* @__PURE__ */ z.string().describe("The type of the template.").min(1).max(20).optional().nullable(),
|
|
546
|
+
content: /* @__PURE__ */ z.object({
|
|
547
|
+
pages: /* @__PURE__ */ z.array(
|
|
548
|
+
/* @__PURE__ */ z.record(
|
|
549
|
+
/* @__PURE__ */ z.string(),
|
|
550
|
+
/* @__PURE__ */ z.any()
|
|
551
|
+
)
|
|
552
|
+
).min(1).max(100).optional(),
|
|
553
|
+
content: /* @__PURE__ */ z.record(/* @__PURE__ */ z.string(), /* @__PURE__ */ z.any()).describe("Other document content referenced by $content variable").optional().nullable(),
|
|
554
|
+
language: /* @__PURE__ */ z.string().describe(
|
|
525
555
|
"ISO 639-1 language code of content (used in translations)."
|
|
526
556
|
).optional(),
|
|
527
|
-
locale: z.string().describe("e.g. en-US.").min(2).max(35).optional().nullable()
|
|
557
|
+
locale: /* @__PURE__ */ z.string().describe("e.g. en-US.").min(2).max(35).optional().nullable()
|
|
528
558
|
}).describe("Document content that is injected into template.").optional(),
|
|
529
|
-
expiresInHours: z.number().int().describe(
|
|
559
|
+
expiresInHours: /* @__PURE__ */ z.number().int().describe(
|
|
530
560
|
"Number of hours after which document will be eventually expired and its content erased."
|
|
531
561
|
).min(1).max(43800).optional(),
|
|
532
|
-
expirationDate: z.date().describe("Represents the time this document becomes expired.").optional().nullable(),
|
|
533
|
-
format: z.enum(["UNKNOWN", "PDF"]).describe("Document format. Defaults to `PDF`.").optional(),
|
|
534
|
-
public: z.boolean().describe(
|
|
562
|
+
expirationDate: /* @__PURE__ */ z.date().describe("Represents the time this document becomes expired.").optional().nullable(),
|
|
563
|
+
format: /* @__PURE__ */ z.enum(["UNKNOWN", "PDF"]).describe("Document format. Defaults to `PDF`.").optional(),
|
|
564
|
+
public: /* @__PURE__ */ z.boolean().describe(
|
|
535
565
|
"Whether the link to the uploaded document is public or private.\nFor public document static URL will be returned.\nFor private document temporary URL will be generated by DocumentService.DownloadDocument."
|
|
536
566
|
).optional().nullable(),
|
|
537
|
-
fileName: z.string().describe(
|
|
567
|
+
fileName: /* @__PURE__ */ z.string().describe(
|
|
538
568
|
"Optional filename (without extension) to be used for the downloadable document."
|
|
539
569
|
).min(1).max(50).optional().nullable(),
|
|
540
|
-
contentChecksum: z.string().describe(
|
|
570
|
+
contentChecksum: /* @__PURE__ */ z.string().describe(
|
|
541
571
|
"Client defined content checksum. Can be used for content comparison."
|
|
542
572
|
).min(1).max(64).optional().nullable(),
|
|
543
|
-
renderDelayedEventConfig: z.object({
|
|
544
|
-
timeInQueueMinutes: z.number().int().describe(
|
|
573
|
+
renderDelayedEventConfig: /* @__PURE__ */ z.object({
|
|
574
|
+
timeInQueueMinutes: /* @__PURE__ */ z.number().int().describe(
|
|
545
575
|
"Controls DocumentRenderDelayed action event sending.\nEvent will be sent after time_in_queue_minutes if document render status is ACCEPTED/RENDERING."
|
|
546
576
|
).min(5).max(120).optional()
|
|
547
577
|
}).describe("Rendering notification config.").optional(),
|
|
548
|
-
sizeInBytes: z.number().int().describe(
|
|
578
|
+
sizeInBytes: /* @__PURE__ */ z.number().int().describe(
|
|
549
579
|
"Size in bytes of a rendered document. Returned only when Document is in `READY` state."
|
|
550
580
|
).optional().nullable()
|
|
551
581
|
}).describe("The created Document").optional()
|
|
552
582
|
});
|
|
553
583
|
var DownloadDocumentRequest = /* @__PURE__ */ z.object({
|
|
554
|
-
documentId: z.string().describe("ID of the Document to retrieve").regex(
|
|
584
|
+
documentId: /* @__PURE__ */ z.string().describe("ID of the Document to retrieve").regex(
|
|
555
585
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
556
586
|
"Must be a valid GUID"
|
|
557
587
|
),
|
|
558
|
-
options: z.object({
|
|
559
|
-
urlExpirationInSeconds: z.number().int().describe("URL expiration time. Only relevant for private documents.").min(600).max(86400).optional().nullable(),
|
|
560
|
-
contentDisposition: z.enum(["ATTACHMENT", "INLINE"]).optional()
|
|
588
|
+
options: /* @__PURE__ */ z.object({
|
|
589
|
+
urlExpirationInSeconds: /* @__PURE__ */ z.number().int().describe("URL expiration time. Only relevant for private documents.").min(600).max(86400).optional().nullable(),
|
|
590
|
+
contentDisposition: /* @__PURE__ */ z.enum(["ATTACHMENT", "INLINE"]).optional()
|
|
561
591
|
}).optional()
|
|
562
592
|
});
|
|
563
593
|
var DownloadDocumentResponse = /* @__PURE__ */ z.object({
|
|
564
|
-
downloadUrl: z.string().describe("Download URL.").optional(),
|
|
565
|
-
expirationDate: z.date().describe(
|
|
594
|
+
downloadUrl: /* @__PURE__ */ z.string().describe("Download URL.").optional(),
|
|
595
|
+
expirationDate: /* @__PURE__ */ z.date().describe(
|
|
566
596
|
"URL expiration timestamp. Not provided for public documents because their links do not expire."
|
|
567
597
|
).optional().nullable()
|
|
568
598
|
});
|
|
569
599
|
var GetDownloadUrlRequest = /* @__PURE__ */ z.object({
|
|
570
|
-
options: z.intersection(
|
|
571
|
-
z.object({
|
|
572
|
-
urlExpirationInSeconds: z.number().int().describe("URL expiration time. Only relevant for private documents.").min(600).max(86400).optional().nullable(),
|
|
573
|
-
downloadButtonText: z.string().max(100).optional().nullable(),
|
|
574
|
-
contentDisposition: z.enum(["ATTACHMENT", "INLINE"]).optional()
|
|
600
|
+
options: /* @__PURE__ */ z.intersection(
|
|
601
|
+
/* @__PURE__ */ z.object({
|
|
602
|
+
urlExpirationInSeconds: /* @__PURE__ */ z.number().int().describe("URL expiration time. Only relevant for private documents.").min(600).max(86400).optional().nullable(),
|
|
603
|
+
downloadButtonText: /* @__PURE__ */ z.string().max(100).optional().nullable(),
|
|
604
|
+
contentDisposition: /* @__PURE__ */ z.enum(["ATTACHMENT", "INLINE"]).optional()
|
|
575
605
|
}),
|
|
576
|
-
z.xor([
|
|
577
|
-
z.object({
|
|
578
|
-
externalId: z.never().optional(),
|
|
579
|
-
fileToken: z.never().optional(),
|
|
580
|
-
documentId: z.string().describe("ID of the Document to retrieve").regex(
|
|
606
|
+
/* @__PURE__ */ z.xor([
|
|
607
|
+
/* @__PURE__ */ z.object({
|
|
608
|
+
externalId: /* @__PURE__ */ z.never().optional(),
|
|
609
|
+
fileToken: /* @__PURE__ */ z.never().optional(),
|
|
610
|
+
documentId: /* @__PURE__ */ z.string().describe("ID of the Document to retrieve").regex(
|
|
581
611
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
582
612
|
"Must be a valid GUID"
|
|
583
613
|
)
|
|
584
614
|
}),
|
|
585
|
-
z.object({
|
|
586
|
-
documentId: z.never().optional(),
|
|
587
|
-
fileToken: z.never().optional(),
|
|
588
|
-
externalId: z.string().describe("ID of the Document to retrieve").min(1).max(100)
|
|
615
|
+
/* @__PURE__ */ z.object({
|
|
616
|
+
documentId: /* @__PURE__ */ z.never().optional(),
|
|
617
|
+
fileToken: /* @__PURE__ */ z.never().optional(),
|
|
618
|
+
externalId: /* @__PURE__ */ z.string().describe("ID of the Document to retrieve").min(1).max(100)
|
|
589
619
|
}),
|
|
590
|
-
z.object({
|
|
591
|
-
documentId: z.never().optional(),
|
|
592
|
-
externalId: z.never().optional(),
|
|
593
|
-
fileToken: z.string().describe("Signed file token").min(1).max(500)
|
|
620
|
+
/* @__PURE__ */ z.object({
|
|
621
|
+
documentId: /* @__PURE__ */ z.never().optional(),
|
|
622
|
+
externalId: /* @__PURE__ */ z.never().optional(),
|
|
623
|
+
fileToken: /* @__PURE__ */ z.string().describe("Signed file token").min(1).max(500)
|
|
594
624
|
})
|
|
595
625
|
])
|
|
596
626
|
)
|
|
597
627
|
});
|
|
598
628
|
var GetDownloadUrlResponse = /* @__PURE__ */ z.object({
|
|
599
|
-
downloadUrl: z.string().describe("Download URL.").optional().nullable(),
|
|
600
|
-
expirationDate: z.date().describe(
|
|
629
|
+
downloadUrl: /* @__PURE__ */ z.string().describe("Download URL.").optional().nullable(),
|
|
630
|
+
expirationDate: /* @__PURE__ */ z.date().describe(
|
|
601
631
|
"URL expiration timestamp. Not provided for public documents because their links do not expire."
|
|
602
632
|
).optional().nullable(),
|
|
603
|
-
documentId: z.string().describe("Document ID.").regex(
|
|
633
|
+
documentId: /* @__PURE__ */ z.string().describe("Document ID.").regex(
|
|
604
634
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
605
635
|
"Must be a valid GUID"
|
|
606
636
|
).optional().nullable(),
|
|
607
|
-
renderStatus: z.enum(["UNKNOWN", "ACCEPTED", "RENDERING", "READY", "FAILED", "EXPIRED"]).describe("Document render status.").optional(),
|
|
608
|
-
downloadPageUrl: z.string().describe("Download URL.").optional().nullable(),
|
|
609
|
-
contentChecksum: z.string().describe(
|
|
637
|
+
renderStatus: /* @__PURE__ */ z.enum(["UNKNOWN", "ACCEPTED", "RENDERING", "READY", "FAILED", "EXPIRED"]).describe("Document render status.").optional(),
|
|
638
|
+
downloadPageUrl: /* @__PURE__ */ z.string().describe("Download URL.").optional().nullable(),
|
|
639
|
+
contentChecksum: /* @__PURE__ */ z.string().describe(
|
|
610
640
|
"Client defined content checksum. Can be used for content comparison."
|
|
611
641
|
).min(1).max(64).optional().nullable()
|
|
612
642
|
});
|
|
613
643
|
var DownloadDocumentSourceRequest = /* @__PURE__ */ z.object({
|
|
614
|
-
documentId: z.string().describe("ID of the Document to retrieve").regex(
|
|
644
|
+
documentId: /* @__PURE__ */ z.string().describe("ID of the Document to retrieve").regex(
|
|
615
645
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
616
646
|
"Must be a valid GUID"
|
|
617
647
|
),
|
|
618
|
-
options: z.object({
|
|
648
|
+
options: /* @__PURE__ */ z.object({
|
|
649
|
+
contentDisposition: /* @__PURE__ */ z.enum(["ATTACHMENT", "INLINE"]).optional()
|
|
650
|
+
}).optional()
|
|
619
651
|
});
|
|
620
652
|
var DownloadDocumentSourceResponse = /* @__PURE__ */ z.object({
|
|
621
|
-
downloadUrl: z.string().describe("Download URL. Expires after 10 minutes.").optional()
|
|
653
|
+
downloadUrl: /* @__PURE__ */ z.string().describe("Download URL. Expires after 10 minutes.").optional()
|
|
622
654
|
});
|
|
623
655
|
var GetDownloadPageRequest = /* @__PURE__ */ z.object({
|
|
624
|
-
file: z.string().max(1e3)
|
|
656
|
+
file: /* @__PURE__ */ z.string().max(1e3)
|
|
625
657
|
});
|
|
626
658
|
var GetDownloadPageResponse = /* @__PURE__ */ z.object({
|
|
627
|
-
body: z.string().optional(),
|
|
628
|
-
statusCode: z.number().int().optional().nullable(),
|
|
629
|
-
headers: z.array(
|
|
630
|
-
|
|
659
|
+
body: /* @__PURE__ */ z.string().optional(),
|
|
660
|
+
statusCode: /* @__PURE__ */ z.number().int().optional().nullable(),
|
|
661
|
+
headers: /* @__PURE__ */ z.array(
|
|
662
|
+
/* @__PURE__ */ z.object({
|
|
663
|
+
key: /* @__PURE__ */ z.string().optional(),
|
|
664
|
+
value: /* @__PURE__ */ z.string().optional()
|
|
665
|
+
})
|
|
631
666
|
).optional()
|
|
632
667
|
});
|
|
633
668
|
var RedirectToDocumentRequest = /* @__PURE__ */ z.object({
|
|
634
|
-
file: z.string().max(1e3)
|
|
669
|
+
file: /* @__PURE__ */ z.string().max(1e3)
|
|
635
670
|
});
|
|
636
671
|
var RedirectToDocumentResponse = /* @__PURE__ */ z.object({
|
|
637
|
-
body: z.string().optional(),
|
|
638
|
-
statusCode: z.number().int().optional().nullable(),
|
|
639
|
-
headers: z.array(
|
|
640
|
-
|
|
672
|
+
body: /* @__PURE__ */ z.string().optional(),
|
|
673
|
+
statusCode: /* @__PURE__ */ z.number().int().optional().nullable(),
|
|
674
|
+
headers: /* @__PURE__ */ z.array(
|
|
675
|
+
/* @__PURE__ */ z.object({
|
|
676
|
+
key: /* @__PURE__ */ z.string().optional(),
|
|
677
|
+
value: /* @__PURE__ */ z.string().optional()
|
|
678
|
+
})
|
|
641
679
|
).optional()
|
|
642
680
|
});
|
|
643
681
|
// Annotate the CommonJS export names for ESM import in node:
|