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