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