@wix/auto_sdk_papyrus_documents 1.0.1 → 1.0.3

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