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