@keystrokehq/parseur 0.1.0
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/README.md +17 -0
- package/dist/action.cjs +21 -0
- package/dist/action.cjs.map +1 -0
- package/dist/action.mjs +21 -0
- package/dist/action.mjs.map +1 -0
- package/dist/actions/copy-document.cjs +20 -0
- package/dist/actions/copy-document.cjs.map +1 -0
- package/dist/actions/copy-document.d.cts +9 -0
- package/dist/actions/copy-document.d.cts.map +1 -0
- package/dist/actions/copy-document.d.mts +9 -0
- package/dist/actions/copy-document.d.mts.map +1 -0
- package/dist/actions/copy-document.mjs +19 -0
- package/dist/actions/copy-document.mjs.map +1 -0
- package/dist/actions/copy-mailbox.cjs +17 -0
- package/dist/actions/copy-mailbox.cjs.map +1 -0
- package/dist/actions/copy-mailbox.d.cts +9 -0
- package/dist/actions/copy-mailbox.d.cts.map +1 -0
- package/dist/actions/copy-mailbox.d.mts +9 -0
- package/dist/actions/copy-mailbox.d.mts.map +1 -0
- package/dist/actions/copy-mailbox.mjs +16 -0
- package/dist/actions/copy-mailbox.mjs.map +1 -0
- package/dist/actions/create-custom-download.cjs +36 -0
- package/dist/actions/create-custom-download.cjs.map +1 -0
- package/dist/actions/create-custom-download.d.cts +9 -0
- package/dist/actions/create-custom-download.d.cts.map +1 -0
- package/dist/actions/create-custom-download.d.mts +9 -0
- package/dist/actions/create-custom-download.d.mts.map +1 -0
- package/dist/actions/create-custom-download.mjs +35 -0
- package/dist/actions/create-custom-download.mjs.map +1 -0
- package/dist/actions/create-mailbox.cjs +197 -0
- package/dist/actions/create-mailbox.cjs.map +1 -0
- package/dist/actions/create-mailbox.d.cts +9 -0
- package/dist/actions/create-mailbox.d.cts.map +1 -0
- package/dist/actions/create-mailbox.d.mts +9 -0
- package/dist/actions/create-mailbox.d.mts.map +1 -0
- package/dist/actions/create-mailbox.mjs +196 -0
- package/dist/actions/create-mailbox.mjs.map +1 -0
- package/dist/actions/delete-custom-download.cjs +19 -0
- package/dist/actions/delete-custom-download.cjs.map +1 -0
- package/dist/actions/delete-custom-download.d.cts +9 -0
- package/dist/actions/delete-custom-download.d.cts.map +1 -0
- package/dist/actions/delete-custom-download.d.mts +9 -0
- package/dist/actions/delete-custom-download.d.mts.map +1 -0
- package/dist/actions/delete-custom-download.mjs +16 -0
- package/dist/actions/delete-custom-download.mjs.map +1 -0
- package/dist/actions/delete-document.cjs +16 -0
- package/dist/actions/delete-document.cjs.map +1 -0
- package/dist/actions/delete-document.d.cts +9 -0
- package/dist/actions/delete-document.d.cts.map +1 -0
- package/dist/actions/delete-document.d.mts +9 -0
- package/dist/actions/delete-document.d.mts.map +1 -0
- package/dist/actions/delete-document.mjs +13 -0
- package/dist/actions/delete-document.mjs.map +1 -0
- package/dist/actions/delete-mailbox.cjs +17 -0
- package/dist/actions/delete-mailbox.cjs.map +1 -0
- package/dist/actions/delete-mailbox.d.cts +9 -0
- package/dist/actions/delete-mailbox.d.cts.map +1 -0
- package/dist/actions/delete-mailbox.d.mts +9 -0
- package/dist/actions/delete-mailbox.d.mts.map +1 -0
- package/dist/actions/delete-mailbox.mjs +16 -0
- package/dist/actions/delete-mailbox.mjs.map +1 -0
- package/dist/actions/delete-webhook.cjs +16 -0
- package/dist/actions/delete-webhook.cjs.map +1 -0
- package/dist/actions/delete-webhook.d.cts +9 -0
- package/dist/actions/delete-webhook.d.cts.map +1 -0
- package/dist/actions/delete-webhook.d.mts +9 -0
- package/dist/actions/delete-webhook.d.mts.map +1 -0
- package/dist/actions/delete-webhook.mjs +13 -0
- package/dist/actions/delete-webhook.mjs.map +1 -0
- package/dist/actions/disable-webhook.cjs +51 -0
- package/dist/actions/disable-webhook.cjs.map +1 -0
- package/dist/actions/disable-webhook.d.cts +9 -0
- package/dist/actions/disable-webhook.d.cts.map +1 -0
- package/dist/actions/disable-webhook.d.mts +9 -0
- package/dist/actions/disable-webhook.d.mts.map +1 -0
- package/dist/actions/disable-webhook.mjs +50 -0
- package/dist/actions/disable-webhook.mjs.map +1 -0
- package/dist/actions/enable-webhook.cjs +36 -0
- package/dist/actions/enable-webhook.cjs.map +1 -0
- package/dist/actions/enable-webhook.d.cts +9 -0
- package/dist/actions/enable-webhook.d.cts.map +1 -0
- package/dist/actions/enable-webhook.d.mts +9 -0
- package/dist/actions/enable-webhook.d.mts.map +1 -0
- package/dist/actions/enable-webhook.mjs +33 -0
- package/dist/actions/enable-webhook.mjs.map +1 -0
- package/dist/actions/get-bootstrap-config.cjs +71 -0
- package/dist/actions/get-bootstrap-config.cjs.map +1 -0
- package/dist/actions/get-bootstrap-config.d.cts +9 -0
- package/dist/actions/get-bootstrap-config.d.cts.map +1 -0
- package/dist/actions/get-bootstrap-config.d.mts +9 -0
- package/dist/actions/get-bootstrap-config.d.mts.map +1 -0
- package/dist/actions/get-bootstrap-config.mjs +70 -0
- package/dist/actions/get-bootstrap-config.mjs.map +1 -0
- package/dist/actions/get-document-logs.cjs +42 -0
- package/dist/actions/get-document-logs.cjs.map +1 -0
- package/dist/actions/get-document-logs.d.cts +9 -0
- package/dist/actions/get-document-logs.d.cts.map +1 -0
- package/dist/actions/get-document-logs.d.mts +9 -0
- package/dist/actions/get-document-logs.d.mts.map +1 -0
- package/dist/actions/get-document-logs.mjs +41 -0
- package/dist/actions/get-document-logs.mjs.map +1 -0
- package/dist/actions/get-document.cjs +78 -0
- package/dist/actions/get-document.cjs.map +1 -0
- package/dist/actions/get-document.d.cts +9 -0
- package/dist/actions/get-document.d.cts.map +1 -0
- package/dist/actions/get-document.d.mts +9 -0
- package/dist/actions/get-document.d.mts.map +1 -0
- package/dist/actions/get-document.mjs +77 -0
- package/dist/actions/get-document.mjs.map +1 -0
- package/dist/actions/get-mailbox-schema.cjs +19 -0
- package/dist/actions/get-mailbox-schema.cjs.map +1 -0
- package/dist/actions/get-mailbox-schema.d.cts +9 -0
- package/dist/actions/get-mailbox-schema.d.cts.map +1 -0
- package/dist/actions/get-mailbox-schema.d.mts +9 -0
- package/dist/actions/get-mailbox-schema.d.mts.map +1 -0
- package/dist/actions/get-mailbox-schema.mjs +16 -0
- package/dist/actions/get-mailbox-schema.mjs.map +1 -0
- package/dist/actions/get-mailbox.cjs +151 -0
- package/dist/actions/get-mailbox.cjs.map +1 -0
- package/dist/actions/get-mailbox.d.cts +9 -0
- package/dist/actions/get-mailbox.d.cts.map +1 -0
- package/dist/actions/get-mailbox.d.mts +9 -0
- package/dist/actions/get-mailbox.d.mts.map +1 -0
- package/dist/actions/get-mailbox.mjs +150 -0
- package/dist/actions/get-mailbox.mjs.map +1 -0
- package/dist/actions/index.cjs +53 -0
- package/dist/actions/index.d.cts +27 -0
- package/dist/actions/index.d.mts +27 -0
- package/dist/actions/index.mjs +27 -0
- package/dist/actions/list-custom-downloads.cjs +31 -0
- package/dist/actions/list-custom-downloads.cjs.map +1 -0
- package/dist/actions/list-custom-downloads.d.cts +9 -0
- package/dist/actions/list-custom-downloads.d.cts.map +1 -0
- package/dist/actions/list-custom-downloads.d.mts +9 -0
- package/dist/actions/list-custom-downloads.d.mts.map +1 -0
- package/dist/actions/list-custom-downloads.mjs +30 -0
- package/dist/actions/list-custom-downloads.mjs.map +1 -0
- package/dist/actions/list-documents-in-mailbox.cjs +53 -0
- package/dist/actions/list-documents-in-mailbox.cjs.map +1 -0
- package/dist/actions/list-documents-in-mailbox.d.cts +9 -0
- package/dist/actions/list-documents-in-mailbox.d.cts.map +1 -0
- package/dist/actions/list-documents-in-mailbox.d.mts +9 -0
- package/dist/actions/list-documents-in-mailbox.d.mts.map +1 -0
- package/dist/actions/list-documents-in-mailbox.mjs +52 -0
- package/dist/actions/list-documents-in-mailbox.mjs.map +1 -0
- package/dist/actions/list-mailboxes2.cjs +128 -0
- package/dist/actions/list-mailboxes2.cjs.map +1 -0
- package/dist/actions/list-mailboxes2.d.cts +9 -0
- package/dist/actions/list-mailboxes2.d.cts.map +1 -0
- package/dist/actions/list-mailboxes2.d.mts +9 -0
- package/dist/actions/list-mailboxes2.d.mts.map +1 -0
- package/dist/actions/list-mailboxes2.mjs +127 -0
- package/dist/actions/list-mailboxes2.mjs.map +1 -0
- package/dist/actions/list-templates.cjs +49 -0
- package/dist/actions/list-templates.cjs.map +1 -0
- package/dist/actions/list-templates.d.cts +9 -0
- package/dist/actions/list-templates.d.cts.map +1 -0
- package/dist/actions/list-templates.d.mts +9 -0
- package/dist/actions/list-templates.d.mts.map +1 -0
- package/dist/actions/list-templates.mjs +48 -0
- package/dist/actions/list-templates.mjs.map +1 -0
- package/dist/actions/reprocess-document.cjs +17 -0
- package/dist/actions/reprocess-document.cjs.map +1 -0
- package/dist/actions/reprocess-document.d.cts +9 -0
- package/dist/actions/reprocess-document.d.cts.map +1 -0
- package/dist/actions/reprocess-document.d.mts +9 -0
- package/dist/actions/reprocess-document.d.mts.map +1 -0
- package/dist/actions/reprocess-document.mjs +16 -0
- package/dist/actions/reprocess-document.mjs.map +1 -0
- package/dist/actions/retrieve-webhook.cjs +32 -0
- package/dist/actions/retrieve-webhook.cjs.map +1 -0
- package/dist/actions/retrieve-webhook.d.cts +9 -0
- package/dist/actions/retrieve-webhook.d.cts.map +1 -0
- package/dist/actions/retrieve-webhook.d.mts +9 -0
- package/dist/actions/retrieve-webhook.d.mts.map +1 -0
- package/dist/actions/retrieve-webhook.mjs +29 -0
- package/dist/actions/retrieve-webhook.mjs.map +1 -0
- package/dist/actions/skip-document.cjs +56 -0
- package/dist/actions/skip-document.cjs.map +1 -0
- package/dist/actions/skip-document.d.cts +9 -0
- package/dist/actions/skip-document.d.cts.map +1 -0
- package/dist/actions/skip-document.d.mts +9 -0
- package/dist/actions/skip-document.d.mts.map +1 -0
- package/dist/actions/skip-document.mjs +55 -0
- package/dist/actions/skip-document.mjs.map +1 -0
- package/dist/actions/update-custom-download.cjs +33 -0
- package/dist/actions/update-custom-download.cjs.map +1 -0
- package/dist/actions/update-custom-download.d.cts +9 -0
- package/dist/actions/update-custom-download.d.cts.map +1 -0
- package/dist/actions/update-custom-download.d.mts +9 -0
- package/dist/actions/update-custom-download.d.mts.map +1 -0
- package/dist/actions/update-custom-download.mjs +30 -0
- package/dist/actions/update-custom-download.mjs.map +1 -0
- package/dist/actions/update-mailbox.cjs +172 -0
- package/dist/actions/update-mailbox.cjs.map +1 -0
- package/dist/actions/update-mailbox.d.cts +9 -0
- package/dist/actions/update-mailbox.d.cts.map +1 -0
- package/dist/actions/update-mailbox.d.mts +9 -0
- package/dist/actions/update-mailbox.d.mts.map +1 -0
- package/dist/actions/update-mailbox.mjs +171 -0
- package/dist/actions/update-mailbox.mjs.map +1 -0
- package/dist/actions/update-webhook.cjs +43 -0
- package/dist/actions/update-webhook.cjs.map +1 -0
- package/dist/actions/update-webhook.d.cts +9 -0
- package/dist/actions/update-webhook.d.cts.map +1 -0
- package/dist/actions/update-webhook.d.mts +9 -0
- package/dist/actions/update-webhook.d.mts.map +1 -0
- package/dist/actions/update-webhook.mjs +40 -0
- package/dist/actions/update-webhook.mjs.map +1 -0
- package/dist/actions/upload-email-document.cjs +26 -0
- package/dist/actions/upload-email-document.cjs.map +1 -0
- package/dist/actions/upload-email-document.d.cts +9 -0
- package/dist/actions/upload-email-document.d.cts.map +1 -0
- package/dist/actions/upload-email-document.d.mts +9 -0
- package/dist/actions/upload-email-document.d.mts.map +1 -0
- package/dist/actions/upload-email-document.mjs +23 -0
- package/dist/actions/upload-email-document.mjs.map +1 -0
- package/dist/app.cjs +9 -0
- package/dist/app.cjs.map +1 -0
- package/dist/app.d.cts +5 -0
- package/dist/app.d.cts.map +1 -0
- package/dist/app.d.mts +5 -0
- package/dist/app.d.mts.map +1 -0
- package/dist/app.mjs +10 -0
- package/dist/app.mjs.map +1 -0
- package/dist/catalog.cjs +15 -0
- package/dist/catalog.cjs.map +1 -0
- package/dist/catalog.d.cts +14 -0
- package/dist/catalog.d.cts.map +1 -0
- package/dist/catalog.d.mts +14 -0
- package/dist/catalog.d.mts.map +1 -0
- package/dist/catalog.mjs +15 -0
- package/dist/catalog.mjs.map +1 -0
- package/dist/execute.cjs +18 -0
- package/dist/execute.cjs.map +1 -0
- package/dist/execute.mjs +18 -0
- package/dist/execute.mjs.map +1 -0
- package/dist/index.cjs +58 -0
- package/dist/index.d.cts +29 -0
- package/dist/index.d.mts +29 -0
- package/dist/index.mjs +30 -0
- package/package.json +49 -0
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
const require_action = require("../action.cjs");
|
|
2
|
+
let zod = require("zod");
|
|
3
|
+
//#region src/actions/update-mailbox.ts
|
|
4
|
+
const ParseurUpdateMailboxInput = zod.z.object({
|
|
5
|
+
id: zod.z.number().int().describe("The ID of the parser/mailbox to update"),
|
|
6
|
+
name: zod.z.string().describe("The name of the parser").optional(),
|
|
7
|
+
ai_engine: zod.z.enum([
|
|
8
|
+
"DISABLED",
|
|
9
|
+
"GCP_AI_1",
|
|
10
|
+
"GCP_AI_2",
|
|
11
|
+
"GCP_AI_2_5"
|
|
12
|
+
]).describe("AI engine options for the mailbox.").optional(),
|
|
13
|
+
force_ocr: zod.z.boolean().describe("Whether Parseur runs its own OCR on every document uploaded to this parser").optional(),
|
|
14
|
+
odd_pages: zod.z.boolean().describe("Whether the parser is configured to process only odd page numbers in a document").optional(),
|
|
15
|
+
even_pages: zod.z.boolean().describe("Whether the parser is configured to process only even page numbers in a document").optional(),
|
|
16
|
+
split_page: zod.z.number().int().describe("Number of pages to use for splitting documents. If set to 3, a 30-page document will be split into 10 files of 3 pages each").optional(),
|
|
17
|
+
disable_deskew: zod.z.boolean().describe("Whether deskew is disabled for this parser (enabled by default)").optional(),
|
|
18
|
+
page_range_set: zod.z.array(zod.z.object({
|
|
19
|
+
end_index: zod.z.number().int().describe("Ending page index (inclusive); null for open-ended range").optional(),
|
|
20
|
+
start_index: zod.z.number().int().describe("Starting page index (inclusive)")
|
|
21
|
+
}).describe("Page range specification for processing or splitting.")).describe("The range of pages set to be processed in the parser").optional(),
|
|
22
|
+
split_keywords: zod.z.array(zod.z.object({
|
|
23
|
+
keyword: zod.z.string().describe("Keyword to look for when splitting documents"),
|
|
24
|
+
is_before: zod.z.boolean().describe("If true, split before the keyword; if false, split after the keyword")
|
|
25
|
+
}).describe("Keywords for document splitting.")).describe("Keywords the parser will look for when splitting documents by page").optional(),
|
|
26
|
+
ai_instructions: zod.z.string().describe("General AI instructions for this parser. Provide guidance for the AI engine on how to parse documents.").optional(),
|
|
27
|
+
default_timezone: zod.z.string().describe("Default timezone for date parsing").optional(),
|
|
28
|
+
retention_policy: zod.z.number().int().describe("How many days documents and data are stored on servers before deletion (90 days is the default)").optional(),
|
|
29
|
+
decimal_separator: zod.z.string().describe("Decimal separator to use for number parsing").optional(),
|
|
30
|
+
input_date_format: zod.z.string().describe("Input date format for parsing dates").optional(),
|
|
31
|
+
allowed_extensions: zod.z.array(zod.z.enum([
|
|
32
|
+
"bmp",
|
|
33
|
+
"csv",
|
|
34
|
+
"doc",
|
|
35
|
+
"docx",
|
|
36
|
+
"eml",
|
|
37
|
+
"gif",
|
|
38
|
+
"html",
|
|
39
|
+
"ics",
|
|
40
|
+
"jpg",
|
|
41
|
+
"mbox",
|
|
42
|
+
"msg",
|
|
43
|
+
"ods",
|
|
44
|
+
"odt",
|
|
45
|
+
"pdf",
|
|
46
|
+
"png",
|
|
47
|
+
"rtf",
|
|
48
|
+
"tif",
|
|
49
|
+
"txt",
|
|
50
|
+
"xhtml",
|
|
51
|
+
"xls",
|
|
52
|
+
"xlsm",
|
|
53
|
+
"xlsx",
|
|
54
|
+
"xml",
|
|
55
|
+
"zip"
|
|
56
|
+
]).describe("Allowed file extensions for document processing.")).describe("List of file extensions to process. If not present, all extensions will be enabled.").optional(),
|
|
57
|
+
master_parser_slug: zod.z.enum([
|
|
58
|
+
"invoices",
|
|
59
|
+
"statements",
|
|
60
|
+
"job-application",
|
|
61
|
+
"leads",
|
|
62
|
+
"resume-cv",
|
|
63
|
+
"food-delivery",
|
|
64
|
+
"search-alerts",
|
|
65
|
+
"real-estate",
|
|
66
|
+
"work-order",
|
|
67
|
+
"financial-statement",
|
|
68
|
+
"utility",
|
|
69
|
+
"contact-list",
|
|
70
|
+
"delivery-notes",
|
|
71
|
+
"property-bookings",
|
|
72
|
+
"job-search",
|
|
73
|
+
"travel",
|
|
74
|
+
"automotive",
|
|
75
|
+
"payslip",
|
|
76
|
+
"event-ticketing"
|
|
77
|
+
]).describe("Master parser template slugs.").optional(),
|
|
78
|
+
process_attachments: zod.z.boolean().describe("Whether email attachment processing is enabled on this parser").optional(),
|
|
79
|
+
split_page_range_set: zod.z.array(zod.z.object({
|
|
80
|
+
end_index: zod.z.number().int().describe("Ending page index (inclusive); null for open-ended range").optional(),
|
|
81
|
+
start_index: zod.z.number().int().describe("Starting page index (inclusive)")
|
|
82
|
+
}).describe("Page range specification for processing or splitting.")).describe("Specific page ranges to capture when splitting. Can have multiple values, e.g., 1,3-5,(1)").optional(),
|
|
83
|
+
identification_status: zod.z.enum([
|
|
84
|
+
"REQUESTED",
|
|
85
|
+
"PROGRESS",
|
|
86
|
+
"COMPLETED",
|
|
87
|
+
"MANUAL"
|
|
88
|
+
]).describe("Identification status of the parser.").optional(),
|
|
89
|
+
attachments_only_override: zod.z.boolean().describe("Use this to update whether the parser skips email processing and only processes attachments").optional()
|
|
90
|
+
}).describe("Request parameters for updating a mailbox (parser) configuration.\nOnly include fields you wish to change.");
|
|
91
|
+
const ParseurUpdateMailbox_AiEngineSchema = zod.z.enum([
|
|
92
|
+
"DISABLED",
|
|
93
|
+
"GCP_AI_1",
|
|
94
|
+
"GCP_AI_2",
|
|
95
|
+
"GCP_AI_2_5"
|
|
96
|
+
]).describe("AI engine options for the mailbox.");
|
|
97
|
+
const ParseurUpdateMailbox_TableInfoSchema = zod.z.object({
|
|
98
|
+
id: zod.z.string().describe("Unique identifier of the table"),
|
|
99
|
+
name: zod.z.string().describe("Name of the table")
|
|
100
|
+
}).describe("Table configuration information.");
|
|
101
|
+
const ParseurUpdateMailbox_WebhookInfoSchema = zod.z.object({
|
|
102
|
+
id: zod.z.number().int().describe("Unique identifier of the webhook"),
|
|
103
|
+
name: zod.z.string().describe("Custom name of the webhook").nullable().optional(),
|
|
104
|
+
event: zod.z.string().describe("Event type the webhook listens to"),
|
|
105
|
+
target: zod.z.string().describe("Target URL for the webhook"),
|
|
106
|
+
headers: zod.z.object({}).describe("Custom HTTP headers sent with the webhook payload").nullable().optional(),
|
|
107
|
+
category: zod.z.string().describe("Category of the webhook"),
|
|
108
|
+
parser_field_set: zod.z.array(zod.z.record(zod.z.string(), zod.z.unknown())).describe("List of parser fields assigned to the webhook").nullable().optional()
|
|
109
|
+
}).describe("Webhook configuration information.");
|
|
110
|
+
const ParseurUpdateMailbox_DocumentStatusCountSchema = zod.z.object({
|
|
111
|
+
SPLIT: zod.z.number().int().describe("Files that were split into multiple documents"),
|
|
112
|
+
INVALID: zod.z.number().int().describe("Files that were not processed because they are not supported"),
|
|
113
|
+
SKIPPED: zod.z.number().int().describe("Files that were skipped because of a template"),
|
|
114
|
+
TRANSKO: zod.z.number().int().describe("Files where Python post-processing failed to process"),
|
|
115
|
+
EXPORTKO: zod.z.number().int().describe("Files where exporting the parsed data failed"),
|
|
116
|
+
INCOMING: zod.z.number().int().describe("Files that have been received by the system but are awaiting processing"),
|
|
117
|
+
PARSEDKO: zod.z.number().int().describe("Files where processing failed"),
|
|
118
|
+
PARSEDOK: zod.z.number().int().describe("Files that have been processed and data is available for export"),
|
|
119
|
+
PROGRESS: zod.z.number().int().describe("Files currently being processed by active AI engine"),
|
|
120
|
+
QUOTAEXC: zod.z.number().int().describe("Files where processing was stopped because user does not have enough credits"),
|
|
121
|
+
ANALYZING: zod.z.number().int().describe("Files being analyzed against system import parameters and mailbox settings")
|
|
122
|
+
}).describe("Breakdown of documents by processing status.");
|
|
123
|
+
const ParseurUpdateMailboxOutput = zod.z.object({
|
|
124
|
+
id: zod.z.number().int().describe("The internal ID number for the parser"),
|
|
125
|
+
name: zod.z.string().describe("The name of the parser").nullable().optional(),
|
|
126
|
+
secret: zod.z.string().describe("Secret key for the parser"),
|
|
127
|
+
ai_engine: ParseurUpdateMailbox_AiEngineSchema.nullable().optional(),
|
|
128
|
+
force_ocr: zod.z.boolean().describe("Whether Parseur runs its own OCR on every document").nullable().optional(),
|
|
129
|
+
is_master: zod.z.boolean().describe("Whether this is a master parser that passes instructions on"),
|
|
130
|
+
odd_pages: zod.z.boolean().describe("Whether only odd page numbers are processed").nullable().optional(),
|
|
131
|
+
table_set: zod.z.array(ParseurUpdateMailbox_TableInfoSchema).describe("List of configured tables"),
|
|
132
|
+
even_pages: zod.z.boolean().describe("Whether only even page numbers are processed").nullable().optional(),
|
|
133
|
+
split_page: zod.z.number().int().describe("Number of pages to use for splitting documents").nullable().optional(),
|
|
134
|
+
webhook_set: zod.z.array(ParseurUpdateMailbox_WebhookInfoSchema).describe("List of configured webhooks").nullable().optional(),
|
|
135
|
+
account_uuid: zod.z.string().describe("The Universally Unique Identifier for the account"),
|
|
136
|
+
csv_download: zod.z.string().describe("URL to download data as CSV"),
|
|
137
|
+
email_prefix: zod.z.string().describe("The email prefix for the parser").nullable().optional(),
|
|
138
|
+
xls_download: zod.z.string().describe("URL to download data as XLS"),
|
|
139
|
+
can_transform: zod.z.boolean().describe("Whether Python Post-Processing is enabled for this parser"),
|
|
140
|
+
json_download: zod.z.string().describe("URL to download data as JSON"),
|
|
141
|
+
last_activity: zod.z.string().describe("Timestamp of last activity"),
|
|
142
|
+
webhook_count: zod.z.number().int().describe("The number of webhooks the parser has").nullable().optional(),
|
|
143
|
+
disable_deskew: zod.z.boolean().describe("Whether deskew is disabled for this parser").nullable().optional(),
|
|
144
|
+
document_count: zod.z.number().int().describe("The number of documents in the parser"),
|
|
145
|
+
template_count: zod.z.number().int().describe("The number of templates the parser has").nullable().optional(),
|
|
146
|
+
ai_instructions: zod.z.string().describe("General AI instruction for this parser").nullable().optional(),
|
|
147
|
+
attachments_only: zod.z.boolean().describe("Whether the parser skips email processing or not (read-only)"),
|
|
148
|
+
default_timezone: zod.z.string().describe("Default timezone for date parsing").nullable().optional(),
|
|
149
|
+
retention_policy: zod.z.number().int().describe("How many days documents and data are stored before deletion").nullable().optional(),
|
|
150
|
+
decimal_separator: zod.z.string().describe("Decimal separator for number parsing").nullable().optional(),
|
|
151
|
+
allowed_extensions: zod.z.array(zod.z.string()).describe("List of file extensions to process. If not present, all extensions are enabled").nullable().optional(),
|
|
152
|
+
master_parser_name: zod.z.string().describe("The name of this parser's master parser").nullable().optional(),
|
|
153
|
+
master_parser_slug: zod.z.string().describe("Master parser template slug").nullable().optional(),
|
|
154
|
+
parser_object_count: zod.z.number().int().describe("The total number of field and metadata outputs currently configured"),
|
|
155
|
+
process_attachments: zod.z.boolean().describe("Whether email attachment processing is enabled").nullable().optional(),
|
|
156
|
+
available_webhook_set: zod.z.array(ParseurUpdateMailbox_WebhookInfoSchema).describe("List of available webhooks"),
|
|
157
|
+
identification_status: zod.z.string().describe("Identification status of the parser").nullable().optional(),
|
|
158
|
+
document_per_status_count: ParseurUpdateMailbox_DocumentStatusCountSchema.nullable(),
|
|
159
|
+
template_set_last_modified: zod.z.string().describe("Timestamp when templates were last modified").nullable().optional(),
|
|
160
|
+
parser_object_set_last_modified: zod.z.string().describe("Timestamp when parser objects were last modified").nullable().optional()
|
|
161
|
+
}).describe("Response model for update mailbox action containing the updated mailbox configuration.");
|
|
162
|
+
const parseurUpdateMailbox = require_action.action("PARSEUR_UPDATE_MAILBOX", {
|
|
163
|
+
slug: "parseur-update-mailbox",
|
|
164
|
+
name: "Update Mailbox",
|
|
165
|
+
description: "Tool to update a mailbox (parser) configuration. Use when you need to modify mailbox settings such as name, AI engine, processing options, or document handling rules.",
|
|
166
|
+
input: ParseurUpdateMailboxInput,
|
|
167
|
+
output: ParseurUpdateMailboxOutput
|
|
168
|
+
});
|
|
169
|
+
//#endregion
|
|
170
|
+
exports.parseurUpdateMailbox = parseurUpdateMailbox;
|
|
171
|
+
|
|
172
|
+
//# sourceMappingURL=update-mailbox.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-mailbox.cjs","names":["z","action"],"sources":["../../src/actions/update-mailbox.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const ParseurUpdateMailboxInput: z.ZodTypeAny = z.object({\n id: z.number().int().describe(\"The ID of the parser/mailbox to update\"),\n name: z.string().describe(\"The name of the parser\").optional(),\n ai_engine: z.enum([\"DISABLED\", \"GCP_AI_1\", \"GCP_AI_2\", \"GCP_AI_2_5\"]).describe(\"AI engine options for the mailbox.\").optional(),\n force_ocr: z.boolean().describe(\"Whether Parseur runs its own OCR on every document uploaded to this parser\").optional(),\n odd_pages: z.boolean().describe(\"Whether the parser is configured to process only odd page numbers in a document\").optional(),\n even_pages: z.boolean().describe(\"Whether the parser is configured to process only even page numbers in a document\").optional(),\n split_page: z.number().int().describe(\"Number of pages to use for splitting documents. If set to 3, a 30-page document will be split into 10 files of 3 pages each\").optional(),\n disable_deskew: z.boolean().describe(\"Whether deskew is disabled for this parser (enabled by default)\").optional(),\n page_range_set: z.array(z.object({\n end_index: z.number().int().describe(\"Ending page index (inclusive); null for open-ended range\").optional(),\n start_index: z.number().int().describe(\"Starting page index (inclusive)\"),\n}).describe(\"Page range specification for processing or splitting.\")).describe(\"The range of pages set to be processed in the parser\").optional(),\n split_keywords: z.array(z.object({\n keyword: z.string().describe(\"Keyword to look for when splitting documents\"),\n is_before: z.boolean().describe(\"If true, split before the keyword; if false, split after the keyword\"),\n}).describe(\"Keywords for document splitting.\")).describe(\"Keywords the parser will look for when splitting documents by page\").optional(),\n ai_instructions: z.string().describe(\"General AI instructions for this parser. Provide guidance for the AI engine on how to parse documents.\").optional(),\n default_timezone: z.string().describe(\"Default timezone for date parsing\").optional(),\n retention_policy: z.number().int().describe(\"How many days documents and data are stored on servers before deletion (90 days is the default)\").optional(),\n decimal_separator: z.string().describe(\"Decimal separator to use for number parsing\").optional(),\n input_date_format: z.string().describe(\"Input date format for parsing dates\").optional(),\n allowed_extensions: z.array(z.enum([\"bmp\", \"csv\", \"doc\", \"docx\", \"eml\", \"gif\", \"html\", \"ics\", \"jpg\", \"mbox\", \"msg\", \"ods\", \"odt\", \"pdf\", \"png\", \"rtf\", \"tif\", \"txt\", \"xhtml\", \"xls\", \"xlsm\", \"xlsx\", \"xml\", \"zip\"]).describe(\"Allowed file extensions for document processing.\")).describe(\"List of file extensions to process. If not present, all extensions will be enabled.\").optional(),\n master_parser_slug: z.enum([\"invoices\", \"statements\", \"job-application\", \"leads\", \"resume-cv\", \"food-delivery\", \"search-alerts\", \"real-estate\", \"work-order\", \"financial-statement\", \"utility\", \"contact-list\", \"delivery-notes\", \"property-bookings\", \"job-search\", \"travel\", \"automotive\", \"payslip\", \"event-ticketing\"]).describe(\"Master parser template slugs.\").optional(),\n process_attachments: z.boolean().describe(\"Whether email attachment processing is enabled on this parser\").optional(),\n split_page_range_set: z.array(z.object({\n end_index: z.number().int().describe(\"Ending page index (inclusive); null for open-ended range\").optional(),\n start_index: z.number().int().describe(\"Starting page index (inclusive)\"),\n}).describe(\"Page range specification for processing or splitting.\")).describe(\"Specific page ranges to capture when splitting. Can have multiple values, e.g., 1,3-5,(1)\").optional(),\n identification_status: z.enum([\"REQUESTED\", \"PROGRESS\", \"COMPLETED\", \"MANUAL\"]).describe(\"Identification status of the parser.\").optional(),\n attachments_only_override: z.boolean().describe(\"Use this to update whether the parser skips email processing and only processes attachments\").optional(),\n}).describe(\"Request parameters for updating a mailbox (parser) configuration.\\nOnly include fields you wish to change.\");\nconst ParseurUpdateMailbox_AiEngineSchema: z.ZodTypeAny = z.enum([\"DISABLED\", \"GCP_AI_1\", \"GCP_AI_2\", \"GCP_AI_2_5\"]).describe(\"AI engine options for the mailbox.\");\nconst ParseurUpdateMailbox_TableInfoSchema: z.ZodTypeAny = z.object({\n id: z.string().describe(\"Unique identifier of the table\"),\n name: z.string().describe(\"Name of the table\"),\n}).describe(\"Table configuration information.\");\nconst ParseurUpdateMailbox_WebhookInfoSchema: z.ZodTypeAny = z.object({\n id: z.number().int().describe(\"Unique identifier of the webhook\"),\n name: z.string().describe(\"Custom name of the webhook\").nullable().optional(),\n event: z.string().describe(\"Event type the webhook listens to\"),\n target: z.string().describe(\"Target URL for the webhook\"),\n headers: z.object({}).describe(\"Custom HTTP headers sent with the webhook payload\").nullable().optional(),\n category: z.string().describe(\"Category of the webhook\"),\n parser_field_set: z.array(z.record(z.string(), z.unknown())).describe(\"List of parser fields assigned to the webhook\").nullable().optional(),\n}).describe(\"Webhook configuration information.\");\nconst ParseurUpdateMailbox_DocumentStatusCountSchema: z.ZodTypeAny = z.object({\n SPLIT: z.number().int().describe(\"Files that were split into multiple documents\"),\n INVALID: z.number().int().describe(\"Files that were not processed because they are not supported\"),\n SKIPPED: z.number().int().describe(\"Files that were skipped because of a template\"),\n TRANSKO: z.number().int().describe(\"Files where Python post-processing failed to process\"),\n EXPORTKO: z.number().int().describe(\"Files where exporting the parsed data failed\"),\n INCOMING: z.number().int().describe(\"Files that have been received by the system but are awaiting processing\"),\n PARSEDKO: z.number().int().describe(\"Files where processing failed\"),\n PARSEDOK: z.number().int().describe(\"Files that have been processed and data is available for export\"),\n PROGRESS: z.number().int().describe(\"Files currently being processed by active AI engine\"),\n QUOTAEXC: z.number().int().describe(\"Files where processing was stopped because user does not have enough credits\"),\n ANALYZING: z.number().int().describe(\"Files being analyzed against system import parameters and mailbox settings\"),\n}).describe(\"Breakdown of documents by processing status.\");\nexport const ParseurUpdateMailboxOutput: z.ZodTypeAny = z.object({\n id: z.number().int().describe(\"The internal ID number for the parser\"),\n name: z.string().describe(\"The name of the parser\").nullable().optional(),\n secret: z.string().describe(\"Secret key for the parser\"),\n ai_engine: ParseurUpdateMailbox_AiEngineSchema.nullable().optional(),\n force_ocr: z.boolean().describe(\"Whether Parseur runs its own OCR on every document\").nullable().optional(),\n is_master: z.boolean().describe(\"Whether this is a master parser that passes instructions on\"),\n odd_pages: z.boolean().describe(\"Whether only odd page numbers are processed\").nullable().optional(),\n table_set: z.array(ParseurUpdateMailbox_TableInfoSchema).describe(\"List of configured tables\"),\n even_pages: z.boolean().describe(\"Whether only even page numbers are processed\").nullable().optional(),\n split_page: z.number().int().describe(\"Number of pages to use for splitting documents\").nullable().optional(),\n webhook_set: z.array(ParseurUpdateMailbox_WebhookInfoSchema).describe(\"List of configured webhooks\").nullable().optional(),\n account_uuid: z.string().describe(\"The Universally Unique Identifier for the account\"),\n csv_download: z.string().describe(\"URL to download data as CSV\"),\n email_prefix: z.string().describe(\"The email prefix for the parser\").nullable().optional(),\n xls_download: z.string().describe(\"URL to download data as XLS\"),\n can_transform: z.boolean().describe(\"Whether Python Post-Processing is enabled for this parser\"),\n json_download: z.string().describe(\"URL to download data as JSON\"),\n last_activity: z.string().describe(\"Timestamp of last activity\"),\n webhook_count: z.number().int().describe(\"The number of webhooks the parser has\").nullable().optional(),\n disable_deskew: z.boolean().describe(\"Whether deskew is disabled for this parser\").nullable().optional(),\n document_count: z.number().int().describe(\"The number of documents in the parser\"),\n template_count: z.number().int().describe(\"The number of templates the parser has\").nullable().optional(),\n ai_instructions: z.string().describe(\"General AI instruction for this parser\").nullable().optional(),\n attachments_only: z.boolean().describe(\"Whether the parser skips email processing or not (read-only)\"),\n default_timezone: z.string().describe(\"Default timezone for date parsing\").nullable().optional(),\n retention_policy: z.number().int().describe(\"How many days documents and data are stored before deletion\").nullable().optional(),\n decimal_separator: z.string().describe(\"Decimal separator for number parsing\").nullable().optional(),\n allowed_extensions: z.array(z.string()).describe(\"List of file extensions to process. If not present, all extensions are enabled\").nullable().optional(),\n master_parser_name: z.string().describe(\"The name of this parser's master parser\").nullable().optional(),\n master_parser_slug: z.string().describe(\"Master parser template slug\").nullable().optional(),\n parser_object_count: z.number().int().describe(\"The total number of field and metadata outputs currently configured\"),\n process_attachments: z.boolean().describe(\"Whether email attachment processing is enabled\").nullable().optional(),\n available_webhook_set: z.array(ParseurUpdateMailbox_WebhookInfoSchema).describe(\"List of available webhooks\"),\n identification_status: z.string().describe(\"Identification status of the parser\").nullable().optional(),\n document_per_status_count: ParseurUpdateMailbox_DocumentStatusCountSchema.nullable(),\n template_set_last_modified: z.string().describe(\"Timestamp when templates were last modified\").nullable().optional(),\n parser_object_set_last_modified: z.string().describe(\"Timestamp when parser objects were last modified\").nullable().optional(),\n}).describe(\"Response model for update mailbox action containing the updated mailbox configuration.\");\n\nexport const parseurUpdateMailbox = action(\"PARSEUR_UPDATE_MAILBOX\", {\n slug: \"parseur-update-mailbox\",\n name: \"Update Mailbox\",\n description: \"Tool to update a mailbox (parser) configuration. Use when you need to modify mailbox settings such as name, AI engine, processing options, or document handling rules.\",\n input: ParseurUpdateMailboxInput,\n output: ParseurUpdateMailboxOutput,\n});\n"],"mappings":";;;AAIA,MAAa,4BAA0CA,IAAAA,EAAE,OAAO;CAC9D,IAAIA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,wCAAwC;CACtE,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,wBAAwB,CAAC,CAAC,SAAS;CAC7D,WAAWA,IAAAA,EAAE,KAAK;EAAC;EAAY;EAAY;EAAY;CAAY,CAAC,CAAC,CAAC,SAAS,oCAAoC,CAAC,CAAC,SAAS;CAC9H,WAAWA,IAAAA,EAAE,QAAQ,CAAC,CAAC,SAAS,4EAA4E,CAAC,CAAC,SAAS;CACvH,WAAWA,IAAAA,EAAE,QAAQ,CAAC,CAAC,SAAS,iFAAiF,CAAC,CAAC,SAAS;CAC5H,YAAYA,IAAAA,EAAE,QAAQ,CAAC,CAAC,SAAS,kFAAkF,CAAC,CAAC,SAAS;CAC9H,YAAYA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,6HAA6H,CAAC,CAAC,SAAS;CAC9K,gBAAgBA,IAAAA,EAAE,QAAQ,CAAC,CAAC,SAAS,iEAAiE,CAAC,CAAC,SAAS;CACjH,gBAAgBA,IAAAA,EAAE,MAAMA,IAAAA,EAAE,OAAO;EACjC,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@@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
//#region src/actions/update-mailbox.d.ts
|
|
4
|
+
declare const ParseurUpdateMailboxInput: z.ZodTypeAny;
|
|
5
|
+
declare const ParseurUpdateMailboxOutput: z.ZodTypeAny;
|
|
6
|
+
declare const parseurUpdateMailbox: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { parseurUpdateMailbox };
|
|
9
|
+
//# sourceMappingURL=update-mailbox.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-mailbox.d.cts","names":[],"sources":["../../src/actions/update-mailbox.ts"],"mappings":";;;cAIa,yBAAA,EAA2B,CAAA,CAAE,UA+B+E;AAAA,cA4B5G,0BAAA,EAA4B,CAAA,CAAE,UAsC0D;AAAA,cAExF,oBAAA,gCAAoB,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
//#region src/actions/update-mailbox.d.ts
|
|
4
|
+
declare const ParseurUpdateMailboxInput: z.ZodTypeAny;
|
|
5
|
+
declare const ParseurUpdateMailboxOutput: z.ZodTypeAny;
|
|
6
|
+
declare const parseurUpdateMailbox: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { parseurUpdateMailbox };
|
|
9
|
+
//# sourceMappingURL=update-mailbox.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-mailbox.d.mts","names":[],"sources":["../../src/actions/update-mailbox.ts"],"mappings":";;;cAIa,yBAAA,EAA2B,CAAA,CAAE,UA+B+E;AAAA,cA4B5G,0BAAA,EAA4B,CAAA,CAAE,UAsC0D;AAAA,cAExF,oBAAA,gCAAoB,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
import { action } from "../action.mjs";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
//#region src/actions/update-mailbox.ts
|
|
4
|
+
const ParseurUpdateMailboxInput = z.object({
|
|
5
|
+
id: z.number().int().describe("The ID of the parser/mailbox to update"),
|
|
6
|
+
name: z.string().describe("The name of the parser").optional(),
|
|
7
|
+
ai_engine: z.enum([
|
|
8
|
+
"DISABLED",
|
|
9
|
+
"GCP_AI_1",
|
|
10
|
+
"GCP_AI_2",
|
|
11
|
+
"GCP_AI_2_5"
|
|
12
|
+
]).describe("AI engine options for the mailbox.").optional(),
|
|
13
|
+
force_ocr: z.boolean().describe("Whether Parseur runs its own OCR on every document uploaded to this parser").optional(),
|
|
14
|
+
odd_pages: z.boolean().describe("Whether the parser is configured to process only odd page numbers in a document").optional(),
|
|
15
|
+
even_pages: z.boolean().describe("Whether the parser is configured to process only even page numbers in a document").optional(),
|
|
16
|
+
split_page: z.number().int().describe("Number of pages to use for splitting documents. If set to 3, a 30-page document will be split into 10 files of 3 pages each").optional(),
|
|
17
|
+
disable_deskew: z.boolean().describe("Whether deskew is disabled for this parser (enabled by default)").optional(),
|
|
18
|
+
page_range_set: z.array(z.object({
|
|
19
|
+
end_index: z.number().int().describe("Ending page index (inclusive); null for open-ended range").optional(),
|
|
20
|
+
start_index: z.number().int().describe("Starting page index (inclusive)")
|
|
21
|
+
}).describe("Page range specification for processing or splitting.")).describe("The range of pages set to be processed in the parser").optional(),
|
|
22
|
+
split_keywords: z.array(z.object({
|
|
23
|
+
keyword: z.string().describe("Keyword to look for when splitting documents"),
|
|
24
|
+
is_before: z.boolean().describe("If true, split before the keyword; if false, split after the keyword")
|
|
25
|
+
}).describe("Keywords for document splitting.")).describe("Keywords the parser will look for when splitting documents by page").optional(),
|
|
26
|
+
ai_instructions: z.string().describe("General AI instructions for this parser. Provide guidance for the AI engine on how to parse documents.").optional(),
|
|
27
|
+
default_timezone: z.string().describe("Default timezone for date parsing").optional(),
|
|
28
|
+
retention_policy: z.number().int().describe("How many days documents and data are stored on servers before deletion (90 days is the default)").optional(),
|
|
29
|
+
decimal_separator: z.string().describe("Decimal separator to use for number parsing").optional(),
|
|
30
|
+
input_date_format: z.string().describe("Input date format for parsing dates").optional(),
|
|
31
|
+
allowed_extensions: z.array(z.enum([
|
|
32
|
+
"bmp",
|
|
33
|
+
"csv",
|
|
34
|
+
"doc",
|
|
35
|
+
"docx",
|
|
36
|
+
"eml",
|
|
37
|
+
"gif",
|
|
38
|
+
"html",
|
|
39
|
+
"ics",
|
|
40
|
+
"jpg",
|
|
41
|
+
"mbox",
|
|
42
|
+
"msg",
|
|
43
|
+
"ods",
|
|
44
|
+
"odt",
|
|
45
|
+
"pdf",
|
|
46
|
+
"png",
|
|
47
|
+
"rtf",
|
|
48
|
+
"tif",
|
|
49
|
+
"txt",
|
|
50
|
+
"xhtml",
|
|
51
|
+
"xls",
|
|
52
|
+
"xlsm",
|
|
53
|
+
"xlsx",
|
|
54
|
+
"xml",
|
|
55
|
+
"zip"
|
|
56
|
+
]).describe("Allowed file extensions for document processing.")).describe("List of file extensions to process. If not present, all extensions will be enabled.").optional(),
|
|
57
|
+
master_parser_slug: z.enum([
|
|
58
|
+
"invoices",
|
|
59
|
+
"statements",
|
|
60
|
+
"job-application",
|
|
61
|
+
"leads",
|
|
62
|
+
"resume-cv",
|
|
63
|
+
"food-delivery",
|
|
64
|
+
"search-alerts",
|
|
65
|
+
"real-estate",
|
|
66
|
+
"work-order",
|
|
67
|
+
"financial-statement",
|
|
68
|
+
"utility",
|
|
69
|
+
"contact-list",
|
|
70
|
+
"delivery-notes",
|
|
71
|
+
"property-bookings",
|
|
72
|
+
"job-search",
|
|
73
|
+
"travel",
|
|
74
|
+
"automotive",
|
|
75
|
+
"payslip",
|
|
76
|
+
"event-ticketing"
|
|
77
|
+
]).describe("Master parser template slugs.").optional(),
|
|
78
|
+
process_attachments: z.boolean().describe("Whether email attachment processing is enabled on this parser").optional(),
|
|
79
|
+
split_page_range_set: z.array(z.object({
|
|
80
|
+
end_index: z.number().int().describe("Ending page index (inclusive); null for open-ended range").optional(),
|
|
81
|
+
start_index: z.number().int().describe("Starting page index (inclusive)")
|
|
82
|
+
}).describe("Page range specification for processing or splitting.")).describe("Specific page ranges to capture when splitting. Can have multiple values, e.g., 1,3-5,(1)").optional(),
|
|
83
|
+
identification_status: z.enum([
|
|
84
|
+
"REQUESTED",
|
|
85
|
+
"PROGRESS",
|
|
86
|
+
"COMPLETED",
|
|
87
|
+
"MANUAL"
|
|
88
|
+
]).describe("Identification status of the parser.").optional(),
|
|
89
|
+
attachments_only_override: z.boolean().describe("Use this to update whether the parser skips email processing and only processes attachments").optional()
|
|
90
|
+
}).describe("Request parameters for updating a mailbox (parser) configuration.\nOnly include fields you wish to change.");
|
|
91
|
+
const ParseurUpdateMailbox_AiEngineSchema = z.enum([
|
|
92
|
+
"DISABLED",
|
|
93
|
+
"GCP_AI_1",
|
|
94
|
+
"GCP_AI_2",
|
|
95
|
+
"GCP_AI_2_5"
|
|
96
|
+
]).describe("AI engine options for the mailbox.");
|
|
97
|
+
const ParseurUpdateMailbox_TableInfoSchema = z.object({
|
|
98
|
+
id: z.string().describe("Unique identifier of the table"),
|
|
99
|
+
name: z.string().describe("Name of the table")
|
|
100
|
+
}).describe("Table configuration information.");
|
|
101
|
+
const ParseurUpdateMailbox_WebhookInfoSchema = z.object({
|
|
102
|
+
id: z.number().int().describe("Unique identifier of the webhook"),
|
|
103
|
+
name: z.string().describe("Custom name of the webhook").nullable().optional(),
|
|
104
|
+
event: z.string().describe("Event type the webhook listens to"),
|
|
105
|
+
target: z.string().describe("Target URL for the webhook"),
|
|
106
|
+
headers: z.object({}).describe("Custom HTTP headers sent with the webhook payload").nullable().optional(),
|
|
107
|
+
category: z.string().describe("Category of the webhook"),
|
|
108
|
+
parser_field_set: z.array(z.record(z.string(), z.unknown())).describe("List of parser fields assigned to the webhook").nullable().optional()
|
|
109
|
+
}).describe("Webhook configuration information.");
|
|
110
|
+
const ParseurUpdateMailbox_DocumentStatusCountSchema = z.object({
|
|
111
|
+
SPLIT: z.number().int().describe("Files that were split into multiple documents"),
|
|
112
|
+
INVALID: z.number().int().describe("Files that were not processed because they are not supported"),
|
|
113
|
+
SKIPPED: z.number().int().describe("Files that were skipped because of a template"),
|
|
114
|
+
TRANSKO: z.number().int().describe("Files where Python post-processing failed to process"),
|
|
115
|
+
EXPORTKO: z.number().int().describe("Files where exporting the parsed data failed"),
|
|
116
|
+
INCOMING: z.number().int().describe("Files that have been received by the system but are awaiting processing"),
|
|
117
|
+
PARSEDKO: z.number().int().describe("Files where processing failed"),
|
|
118
|
+
PARSEDOK: z.number().int().describe("Files that have been processed and data is available for export"),
|
|
119
|
+
PROGRESS: z.number().int().describe("Files currently being processed by active AI engine"),
|
|
120
|
+
QUOTAEXC: z.number().int().describe("Files where processing was stopped because user does not have enough credits"),
|
|
121
|
+
ANALYZING: z.number().int().describe("Files being analyzed against system import parameters and mailbox settings")
|
|
122
|
+
}).describe("Breakdown of documents by processing status.");
|
|
123
|
+
const parseurUpdateMailbox = action("PARSEUR_UPDATE_MAILBOX", {
|
|
124
|
+
slug: "parseur-update-mailbox",
|
|
125
|
+
name: "Update Mailbox",
|
|
126
|
+
description: "Tool to update a mailbox (parser) configuration. Use when you need to modify mailbox settings such as name, AI engine, processing options, or document handling rules.",
|
|
127
|
+
input: ParseurUpdateMailboxInput,
|
|
128
|
+
output: z.object({
|
|
129
|
+
id: z.number().int().describe("The internal ID number for the parser"),
|
|
130
|
+
name: z.string().describe("The name of the parser").nullable().optional(),
|
|
131
|
+
secret: z.string().describe("Secret key for the parser"),
|
|
132
|
+
ai_engine: ParseurUpdateMailbox_AiEngineSchema.nullable().optional(),
|
|
133
|
+
force_ocr: z.boolean().describe("Whether Parseur runs its own OCR on every document").nullable().optional(),
|
|
134
|
+
is_master: z.boolean().describe("Whether this is a master parser that passes instructions on"),
|
|
135
|
+
odd_pages: z.boolean().describe("Whether only odd page numbers are processed").nullable().optional(),
|
|
136
|
+
table_set: z.array(ParseurUpdateMailbox_TableInfoSchema).describe("List of configured tables"),
|
|
137
|
+
even_pages: z.boolean().describe("Whether only even page numbers are processed").nullable().optional(),
|
|
138
|
+
split_page: z.number().int().describe("Number of pages to use for splitting documents").nullable().optional(),
|
|
139
|
+
webhook_set: z.array(ParseurUpdateMailbox_WebhookInfoSchema).describe("List of configured webhooks").nullable().optional(),
|
|
140
|
+
account_uuid: z.string().describe("The Universally Unique Identifier for the account"),
|
|
141
|
+
csv_download: z.string().describe("URL to download data as CSV"),
|
|
142
|
+
email_prefix: z.string().describe("The email prefix for the parser").nullable().optional(),
|
|
143
|
+
xls_download: z.string().describe("URL to download data as XLS"),
|
|
144
|
+
can_transform: z.boolean().describe("Whether Python Post-Processing is enabled for this parser"),
|
|
145
|
+
json_download: z.string().describe("URL to download data as JSON"),
|
|
146
|
+
last_activity: z.string().describe("Timestamp of last activity"),
|
|
147
|
+
webhook_count: z.number().int().describe("The number of webhooks the parser has").nullable().optional(),
|
|
148
|
+
disable_deskew: z.boolean().describe("Whether deskew is disabled for this parser").nullable().optional(),
|
|
149
|
+
document_count: z.number().int().describe("The number of documents in the parser"),
|
|
150
|
+
template_count: z.number().int().describe("The number of templates the parser has").nullable().optional(),
|
|
151
|
+
ai_instructions: z.string().describe("General AI instruction for this parser").nullable().optional(),
|
|
152
|
+
attachments_only: z.boolean().describe("Whether the parser skips email processing or not (read-only)"),
|
|
153
|
+
default_timezone: z.string().describe("Default timezone for date parsing").nullable().optional(),
|
|
154
|
+
retention_policy: z.number().int().describe("How many days documents and data are stored before deletion").nullable().optional(),
|
|
155
|
+
decimal_separator: z.string().describe("Decimal separator for number parsing").nullable().optional(),
|
|
156
|
+
allowed_extensions: z.array(z.string()).describe("List of file extensions to process. If not present, all extensions are enabled").nullable().optional(),
|
|
157
|
+
master_parser_name: z.string().describe("The name of this parser's master parser").nullable().optional(),
|
|
158
|
+
master_parser_slug: z.string().describe("Master parser template slug").nullable().optional(),
|
|
159
|
+
parser_object_count: z.number().int().describe("The total number of field and metadata outputs currently configured"),
|
|
160
|
+
process_attachments: z.boolean().describe("Whether email attachment processing is enabled").nullable().optional(),
|
|
161
|
+
available_webhook_set: z.array(ParseurUpdateMailbox_WebhookInfoSchema).describe("List of available webhooks"),
|
|
162
|
+
identification_status: z.string().describe("Identification status of the parser").nullable().optional(),
|
|
163
|
+
document_per_status_count: ParseurUpdateMailbox_DocumentStatusCountSchema.nullable(),
|
|
164
|
+
template_set_last_modified: z.string().describe("Timestamp when templates were last modified").nullable().optional(),
|
|
165
|
+
parser_object_set_last_modified: z.string().describe("Timestamp when parser objects were last modified").nullable().optional()
|
|
166
|
+
}).describe("Response model for update mailbox action containing the updated mailbox configuration.")
|
|
167
|
+
});
|
|
168
|
+
//#endregion
|
|
169
|
+
export { parseurUpdateMailbox };
|
|
170
|
+
|
|
171
|
+
//# sourceMappingURL=update-mailbox.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-mailbox.mjs","names":[],"sources":["../../src/actions/update-mailbox.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const ParseurUpdateMailboxInput: z.ZodTypeAny = z.object({\n id: z.number().int().describe(\"The ID of the parser/mailbox to update\"),\n name: z.string().describe(\"The name of the parser\").optional(),\n ai_engine: z.enum([\"DISABLED\", \"GCP_AI_1\", \"GCP_AI_2\", \"GCP_AI_2_5\"]).describe(\"AI engine options for the mailbox.\").optional(),\n force_ocr: z.boolean().describe(\"Whether Parseur runs its own OCR on every document uploaded to this parser\").optional(),\n odd_pages: z.boolean().describe(\"Whether the parser is configured to process only odd page numbers in a document\").optional(),\n even_pages: z.boolean().describe(\"Whether the parser is configured to process only even page numbers in a document\").optional(),\n split_page: z.number().int().describe(\"Number of pages to use for splitting documents. If set to 3, a 30-page document will be split into 10 files of 3 pages each\").optional(),\n disable_deskew: z.boolean().describe(\"Whether deskew is disabled for this parser (enabled by default)\").optional(),\n page_range_set: z.array(z.object({\n end_index: z.number().int().describe(\"Ending page index (inclusive); null for open-ended range\").optional(),\n start_index: z.number().int().describe(\"Starting page index (inclusive)\"),\n}).describe(\"Page range specification for processing or splitting.\")).describe(\"The range of pages set to be processed in the parser\").optional(),\n split_keywords: z.array(z.object({\n keyword: z.string().describe(\"Keyword to look for when splitting documents\"),\n is_before: z.boolean().describe(\"If true, split before the keyword; if false, split after the keyword\"),\n}).describe(\"Keywords for document splitting.\")).describe(\"Keywords the parser will look for when splitting documents by page\").optional(),\n ai_instructions: z.string().describe(\"General AI instructions for this parser. Provide guidance for the AI engine on how to parse documents.\").optional(),\n default_timezone: z.string().describe(\"Default timezone for date parsing\").optional(),\n retention_policy: z.number().int().describe(\"How many days documents and data are stored on servers before deletion (90 days is the default)\").optional(),\n decimal_separator: z.string().describe(\"Decimal separator to use for number parsing\").optional(),\n input_date_format: z.string().describe(\"Input date format for parsing dates\").optional(),\n allowed_extensions: z.array(z.enum([\"bmp\", \"csv\", \"doc\", \"docx\", \"eml\", \"gif\", \"html\", \"ics\", \"jpg\", \"mbox\", \"msg\", \"ods\", \"odt\", \"pdf\", \"png\", \"rtf\", \"tif\", \"txt\", \"xhtml\", \"xls\", \"xlsm\", \"xlsx\", \"xml\", \"zip\"]).describe(\"Allowed file extensions for document processing.\")).describe(\"List of file extensions to process. If not present, all extensions will be enabled.\").optional(),\n master_parser_slug: z.enum([\"invoices\", \"statements\", \"job-application\", \"leads\", \"resume-cv\", \"food-delivery\", \"search-alerts\", \"real-estate\", \"work-order\", \"financial-statement\", \"utility\", \"contact-list\", \"delivery-notes\", \"property-bookings\", \"job-search\", \"travel\", \"automotive\", \"payslip\", \"event-ticketing\"]).describe(\"Master parser template slugs.\").optional(),\n process_attachments: z.boolean().describe(\"Whether email attachment processing is enabled on this parser\").optional(),\n split_page_range_set: z.array(z.object({\n end_index: z.number().int().describe(\"Ending page index (inclusive); null for open-ended range\").optional(),\n start_index: z.number().int().describe(\"Starting page index (inclusive)\"),\n}).describe(\"Page range specification for processing or splitting.\")).describe(\"Specific page ranges to capture when splitting. Can have multiple values, e.g., 1,3-5,(1)\").optional(),\n identification_status: z.enum([\"REQUESTED\", \"PROGRESS\", \"COMPLETED\", \"MANUAL\"]).describe(\"Identification status of the parser.\").optional(),\n attachments_only_override: z.boolean().describe(\"Use this to update whether the parser skips email processing and only processes attachments\").optional(),\n}).describe(\"Request parameters for updating a mailbox (parser) configuration.\\nOnly include fields you wish to change.\");\nconst ParseurUpdateMailbox_AiEngineSchema: z.ZodTypeAny = z.enum([\"DISABLED\", \"GCP_AI_1\", \"GCP_AI_2\", \"GCP_AI_2_5\"]).describe(\"AI engine options for the mailbox.\");\nconst ParseurUpdateMailbox_TableInfoSchema: z.ZodTypeAny = z.object({\n id: z.string().describe(\"Unique identifier of the table\"),\n name: z.string().describe(\"Name of the table\"),\n}).describe(\"Table configuration information.\");\nconst ParseurUpdateMailbox_WebhookInfoSchema: z.ZodTypeAny = z.object({\n id: z.number().int().describe(\"Unique identifier of the webhook\"),\n name: z.string().describe(\"Custom name of the webhook\").nullable().optional(),\n event: z.string().describe(\"Event type the webhook listens to\"),\n target: z.string().describe(\"Target URL for the webhook\"),\n headers: z.object({}).describe(\"Custom HTTP headers sent with the webhook payload\").nullable().optional(),\n category: z.string().describe(\"Category of the webhook\"),\n parser_field_set: z.array(z.record(z.string(), z.unknown())).describe(\"List of parser fields assigned to the webhook\").nullable().optional(),\n}).describe(\"Webhook configuration information.\");\nconst ParseurUpdateMailbox_DocumentStatusCountSchema: z.ZodTypeAny = z.object({\n SPLIT: z.number().int().describe(\"Files that were split into multiple documents\"),\n INVALID: z.number().int().describe(\"Files that were not processed because they are not supported\"),\n SKIPPED: z.number().int().describe(\"Files that were skipped because of a template\"),\n TRANSKO: z.number().int().describe(\"Files where Python post-processing failed to process\"),\n EXPORTKO: z.number().int().describe(\"Files where exporting the parsed data failed\"),\n INCOMING: z.number().int().describe(\"Files that have been received by the system but are awaiting processing\"),\n PARSEDKO: z.number().int().describe(\"Files where processing failed\"),\n PARSEDOK: z.number().int().describe(\"Files that have been processed and data is available for export\"),\n PROGRESS: z.number().int().describe(\"Files currently being processed by active AI engine\"),\n QUOTAEXC: z.number().int().describe(\"Files where processing was stopped because user does not have enough credits\"),\n ANALYZING: z.number().int().describe(\"Files being analyzed against system import parameters and mailbox settings\"),\n}).describe(\"Breakdown of documents by processing status.\");\nexport const ParseurUpdateMailboxOutput: z.ZodTypeAny = z.object({\n id: z.number().int().describe(\"The internal ID number for the parser\"),\n name: z.string().describe(\"The name of the parser\").nullable().optional(),\n secret: z.string().describe(\"Secret key for the parser\"),\n ai_engine: ParseurUpdateMailbox_AiEngineSchema.nullable().optional(),\n force_ocr: z.boolean().describe(\"Whether Parseur runs its own OCR on every document\").nullable().optional(),\n is_master: z.boolean().describe(\"Whether this is a master parser that passes instructions on\"),\n odd_pages: z.boolean().describe(\"Whether only odd page numbers are processed\").nullable().optional(),\n table_set: z.array(ParseurUpdateMailbox_TableInfoSchema).describe(\"List of configured tables\"),\n even_pages: z.boolean().describe(\"Whether only even page numbers are processed\").nullable().optional(),\n split_page: z.number().int().describe(\"Number of pages to use for splitting documents\").nullable().optional(),\n webhook_set: z.array(ParseurUpdateMailbox_WebhookInfoSchema).describe(\"List of configured webhooks\").nullable().optional(),\n account_uuid: z.string().describe(\"The Universally Unique Identifier for the account\"),\n csv_download: z.string().describe(\"URL to download data as CSV\"),\n email_prefix: z.string().describe(\"The email prefix for the parser\").nullable().optional(),\n xls_download: z.string().describe(\"URL to download data as XLS\"),\n can_transform: z.boolean().describe(\"Whether Python Post-Processing is enabled for this parser\"),\n json_download: z.string().describe(\"URL to download data as JSON\"),\n last_activity: z.string().describe(\"Timestamp of last activity\"),\n webhook_count: z.number().int().describe(\"The number of webhooks the parser has\").nullable().optional(),\n disable_deskew: z.boolean().describe(\"Whether deskew is disabled for this parser\").nullable().optional(),\n document_count: z.number().int().describe(\"The number of documents in the parser\"),\n template_count: z.number().int().describe(\"The number of templates the parser has\").nullable().optional(),\n ai_instructions: z.string().describe(\"General AI instruction for this parser\").nullable().optional(),\n attachments_only: z.boolean().describe(\"Whether the parser skips email processing or not (read-only)\"),\n default_timezone: z.string().describe(\"Default timezone for date parsing\").nullable().optional(),\n retention_policy: z.number().int().describe(\"How many days documents and data are stored before deletion\").nullable().optional(),\n decimal_separator: z.string().describe(\"Decimal separator for number parsing\").nullable().optional(),\n allowed_extensions: z.array(z.string()).describe(\"List of file extensions to process. If not present, all extensions are enabled\").nullable().optional(),\n master_parser_name: z.string().describe(\"The name of this parser's master parser\").nullable().optional(),\n master_parser_slug: z.string().describe(\"Master parser template slug\").nullable().optional(),\n parser_object_count: z.number().int().describe(\"The total number of field and metadata outputs currently configured\"),\n process_attachments: z.boolean().describe(\"Whether email attachment processing is enabled\").nullable().optional(),\n available_webhook_set: z.array(ParseurUpdateMailbox_WebhookInfoSchema).describe(\"List of available webhooks\"),\n identification_status: z.string().describe(\"Identification status of the parser\").nullable().optional(),\n document_per_status_count: ParseurUpdateMailbox_DocumentStatusCountSchema.nullable(),\n template_set_last_modified: z.string().describe(\"Timestamp when templates were last modified\").nullable().optional(),\n parser_object_set_last_modified: z.string().describe(\"Timestamp when parser objects were last modified\").nullable().optional(),\n}).describe(\"Response model for update mailbox action containing the updated mailbox configuration.\");\n\nexport const parseurUpdateMailbox = action(\"PARSEUR_UPDATE_MAILBOX\", {\n slug: \"parseur-update-mailbox\",\n name: \"Update Mailbox\",\n description: \"Tool to update a mailbox (parser) configuration. Use when you need to modify mailbox settings such as name, AI engine, processing options, or document handling rules.\",\n input: ParseurUpdateMailboxInput,\n output: ParseurUpdateMailboxOutput,\n});\n"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js");
|
|
2
|
+
let zod = require("zod");
|
|
3
|
+
//#region src/actions/update-webhook.ts
|
|
4
|
+
const ParseurUpdateWebhookInput = zod.z.object({
|
|
5
|
+
name: zod.z.string().describe("Custom name for the webhook; defaults to the target URL if omitted").optional(),
|
|
6
|
+
event: zod.z.enum([
|
|
7
|
+
"document.processed",
|
|
8
|
+
"document.processed.flattened",
|
|
9
|
+
"document.template_needed",
|
|
10
|
+
"table.processed"
|
|
11
|
+
]).describe("Trigger event for the webhook").optional(),
|
|
12
|
+
target: zod.z.string().describe("HTTPS URL to receive the webhook payload").optional(),
|
|
13
|
+
headers: zod.z.object({}).describe("Additional HTTP headers to include; Content-Type is always application/json").optional(),
|
|
14
|
+
webhook_id: zod.z.number().int().describe("Unique ID of the webhook to update"),
|
|
15
|
+
parser_field: zod.z.string().describe("ID of a specific field trigger in 'PF12345' format").optional()
|
|
16
|
+
}).describe("Request model for updating an existing webhook. Only include fields you wish to change.");
|
|
17
|
+
const ParseurUpdateWebhookOutput = zod.z.object({
|
|
18
|
+
id: zod.z.number().int().describe("Unique identifier of the webhook"),
|
|
19
|
+
name: zod.z.string().describe("Custom name of the webhook; null if not set.").nullable().optional(),
|
|
20
|
+
event: zod.z.enum([
|
|
21
|
+
"document.processed",
|
|
22
|
+
"document.processed.flattened",
|
|
23
|
+
"document.template_needed",
|
|
24
|
+
"table.processed"
|
|
25
|
+
]).describe("Event type the webhook listens to"),
|
|
26
|
+
target: zod.z.string().describe("Target URL for the webhook"),
|
|
27
|
+
api_key: zod.z.string().describe("API key associated with the webhook; null if not set.").nullable().optional(),
|
|
28
|
+
headers: zod.z.object({}).describe("Custom HTTP headers sent with the webhook payload; null if not set.").nullable().optional(),
|
|
29
|
+
category: zod.z.string().describe("Category of the webhook, always 'CUSTOM'"),
|
|
30
|
+
parser_field_set: zod.z.array(zod.z.record(zod.z.string(), zod.z.unknown())).describe("List of parser fields or table-fields assigned to the webhook.").nullable().optional(),
|
|
31
|
+
default_driver_fee_percentage: zod.z.number().describe("Default driver fee percentage if applicable; null if not set.").nullable().optional()
|
|
32
|
+
}).describe("Response model for update webhook action.");
|
|
33
|
+
const parseurUpdateWebhook = require_action.action("PARSEUR_UPDATE_WEBHOOK", {
|
|
34
|
+
slug: "parseur-update-webhook",
|
|
35
|
+
name: "Update webhook",
|
|
36
|
+
description: "Tool to update an existing webhook’s settings. Use when you need to change the webhook’s target URL, event type, headers, or name after creation.",
|
|
37
|
+
input: ParseurUpdateWebhookInput,
|
|
38
|
+
output: ParseurUpdateWebhookOutput
|
|
39
|
+
});
|
|
40
|
+
//#endregion
|
|
41
|
+
exports.parseurUpdateWebhook = parseurUpdateWebhook;
|
|
42
|
+
|
|
43
|
+
//# sourceMappingURL=update-webhook.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-webhook.cjs","names":["z","action"],"sources":["../../src/actions/update-webhook.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const ParseurUpdateWebhookInput: z.ZodTypeAny = z.object({\n name: z.string().describe(\"Custom name for the webhook; defaults to the target URL if omitted\").optional(),\n event: z.enum([\"document.processed\", \"document.processed.flattened\", \"document.template_needed\", \"table.processed\"]).describe(\"Trigger event for the webhook\").optional(),\n target: z.string().describe(\"HTTPS URL to receive the webhook payload\").optional(),\n headers: z.object({}).describe(\"Additional HTTP headers to include; Content-Type is always application/json\").optional(),\n webhook_id: z.number().int().describe(\"Unique ID of the webhook to update\"),\n parser_field: z.string().describe(\"ID of a specific field trigger in 'PF12345' format\").optional(),\n}).describe(\"Request model for updating an existing webhook. Only include fields you wish to change.\");\nexport const ParseurUpdateWebhookOutput: z.ZodTypeAny = z.object({\n id: z.number().int().describe(\"Unique identifier of the webhook\"),\n name: z.string().describe(\"Custom name of the webhook; null if not set.\").nullable().optional(),\n event: z.enum([\"document.processed\", \"document.processed.flattened\", \"document.template_needed\", \"table.processed\"]).describe(\"Event type the webhook listens to\"),\n target: z.string().describe(\"Target URL for the webhook\"),\n api_key: z.string().describe(\"API key associated with the webhook; null if not set.\").nullable().optional(),\n headers: z.object({}).describe(\"Custom HTTP headers sent with the webhook payload; null if not set.\").nullable().optional(),\n category: z.string().describe(\"Category of the webhook, always 'CUSTOM'\"),\n parser_field_set: z.array(z.record(z.string(), z.unknown())).describe(\"List of parser fields or table-fields assigned to the webhook.\").nullable().optional(),\n default_driver_fee_percentage: z.number().describe(\"Default driver fee percentage if applicable; null if not set.\").nullable().optional(),\n}).describe(\"Response model for update webhook action.\");\n\nexport const parseurUpdateWebhook = action(\"PARSEUR_UPDATE_WEBHOOK\", {\n slug: \"parseur-update-webhook\",\n name: \"Update webhook\",\n description: \"Tool to update an existing webhook’s settings. Use when you need to change the webhook’s target URL, event type, headers, or name after creation.\",\n input: ParseurUpdateWebhookInput,\n output: ParseurUpdateWebhookOutput,\n});\n"],"mappings":";;;AAIA,MAAa,4BAA0CA,IAAAA,EAAE,OAAO;CAC9D,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,oEAAoE,CAAC,CAAC,SAAS;CACzG,OAAOA,IAAAA,EAAE,KAAK;EAAC;EAAsB;EAAgC;EAA4B;CAAiB,CAAC,CAAC,CAAC,SAAS,+BAA+B,CAAC,CAAC,SAAS;CACxK,QAAQA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,0CAA0C,CAAC,CAAC,SAAS;CACjF,SAASA,IAAAA,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS,6EAA6E,CAAC,CAAC,SAAS;CACvH,YAAYA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,oCAAoC;CAC1E,cAAcA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,oDAAoD,CAAC,CAAC,SAAS;AACnG,CAAC,CAAC,CAAC,SAAS,yFAAyF;AACrG,MAAa,6BAA2CA,IAAAA,EAAE,OAAO;CAC/D,IAAIA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,kCAAkC;CAChE,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,8CAA8C,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC9F,OAAOA,IAAAA,EAAE,KAAK;EAAC;EAAsB;EAAgC;EAA4B;CAAiB,CAAC,CAAC,CAAC,SAAS,mCAAmC;CACjK,QAAQA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,4BAA4B;CACxD,SAASA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,uDAAuD,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC1G,SAASA,IAAAA,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS,qEAAqE,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC1H,UAAUA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,0CAA0C;CACxE,kBAAkBA,IAAAA,EAAE,MAAMA,IAAAA,EAAE,OAAOA,IAAAA,EAAE,OAAO,GAAGA,IAAAA,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,SAAS,gEAAgE,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC5J,+BAA+BA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,+DAA+D,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;AAC1I,CAAC,CAAC,CAAC,SAAS,2CAA2C;AAEvD,MAAa,uBAAuBC,eAAAA,OAAO,0BAA0B;CACnE,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
//#region src/actions/update-webhook.d.ts
|
|
4
|
+
declare const ParseurUpdateWebhookInput: z.ZodTypeAny;
|
|
5
|
+
declare const ParseurUpdateWebhookOutput: z.ZodTypeAny;
|
|
6
|
+
declare const parseurUpdateWebhook: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { parseurUpdateWebhook };
|
|
9
|
+
//# sourceMappingURL=update-webhook.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-webhook.d.cts","names":[],"sources":["../../src/actions/update-webhook.ts"],"mappings":";;;cAIa,yBAAA,EAA2B,CAAA,CAAE,UAO4D;AAAA,cACzF,0BAAA,EAA4B,CAAA,CAAE,UAUa;AAAA,cAE3C,oBAAA,gCAAoB,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
//#region src/actions/update-webhook.d.ts
|
|
4
|
+
declare const ParseurUpdateWebhookInput: z.ZodTypeAny;
|
|
5
|
+
declare const ParseurUpdateWebhookOutput: z.ZodTypeAny;
|
|
6
|
+
declare const parseurUpdateWebhook: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { parseurUpdateWebhook };
|
|
9
|
+
//# sourceMappingURL=update-webhook.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-webhook.d.mts","names":[],"sources":["../../src/actions/update-webhook.ts"],"mappings":";;;cAIa,yBAAA,EAA2B,CAAA,CAAE,UAO4D;AAAA,cACzF,0BAAA,EAA4B,CAAA,CAAE,UAUa;AAAA,cAE3C,oBAAA,gCAAoB,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { action } from "../action.mjs";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
const parseurUpdateWebhook = action("PARSEUR_UPDATE_WEBHOOK", {
|
|
4
|
+
slug: "parseur-update-webhook",
|
|
5
|
+
name: "Update webhook",
|
|
6
|
+
description: "Tool to update an existing webhook’s settings. Use when you need to change the webhook’s target URL, event type, headers, or name after creation.",
|
|
7
|
+
input: z.object({
|
|
8
|
+
name: z.string().describe("Custom name for the webhook; defaults to the target URL if omitted").optional(),
|
|
9
|
+
event: z.enum([
|
|
10
|
+
"document.processed",
|
|
11
|
+
"document.processed.flattened",
|
|
12
|
+
"document.template_needed",
|
|
13
|
+
"table.processed"
|
|
14
|
+
]).describe("Trigger event for the webhook").optional(),
|
|
15
|
+
target: z.string().describe("HTTPS URL to receive the webhook payload").optional(),
|
|
16
|
+
headers: z.object({}).describe("Additional HTTP headers to include; Content-Type is always application/json").optional(),
|
|
17
|
+
webhook_id: z.number().int().describe("Unique ID of the webhook to update"),
|
|
18
|
+
parser_field: z.string().describe("ID of a specific field trigger in 'PF12345' format").optional()
|
|
19
|
+
}).describe("Request model for updating an existing webhook. Only include fields you wish to change."),
|
|
20
|
+
output: z.object({
|
|
21
|
+
id: z.number().int().describe("Unique identifier of the webhook"),
|
|
22
|
+
name: z.string().describe("Custom name of the webhook; null if not set.").nullable().optional(),
|
|
23
|
+
event: z.enum([
|
|
24
|
+
"document.processed",
|
|
25
|
+
"document.processed.flattened",
|
|
26
|
+
"document.template_needed",
|
|
27
|
+
"table.processed"
|
|
28
|
+
]).describe("Event type the webhook listens to"),
|
|
29
|
+
target: z.string().describe("Target URL for the webhook"),
|
|
30
|
+
api_key: z.string().describe("API key associated with the webhook; null if not set.").nullable().optional(),
|
|
31
|
+
headers: z.object({}).describe("Custom HTTP headers sent with the webhook payload; null if not set.").nullable().optional(),
|
|
32
|
+
category: z.string().describe("Category of the webhook, always 'CUSTOM'"),
|
|
33
|
+
parser_field_set: z.array(z.record(z.string(), z.unknown())).describe("List of parser fields or table-fields assigned to the webhook.").nullable().optional(),
|
|
34
|
+
default_driver_fee_percentage: z.number().describe("Default driver fee percentage if applicable; null if not set.").nullable().optional()
|
|
35
|
+
}).describe("Response model for update webhook action.")
|
|
36
|
+
});
|
|
37
|
+
//#endregion
|
|
38
|
+
export { parseurUpdateWebhook };
|
|
39
|
+
|
|
40
|
+
//# sourceMappingURL=update-webhook.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-webhook.mjs","names":[],"sources":["../../src/actions/update-webhook.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const ParseurUpdateWebhookInput: z.ZodTypeAny = z.object({\n name: z.string().describe(\"Custom name for the webhook; defaults to the target URL if omitted\").optional(),\n event: z.enum([\"document.processed\", \"document.processed.flattened\", \"document.template_needed\", \"table.processed\"]).describe(\"Trigger event for the webhook\").optional(),\n target: z.string().describe(\"HTTPS URL to receive the webhook payload\").optional(),\n headers: z.object({}).describe(\"Additional HTTP headers to include; Content-Type is always application/json\").optional(),\n webhook_id: z.number().int().describe(\"Unique ID of the webhook to update\"),\n parser_field: z.string().describe(\"ID of a specific field trigger in 'PF12345' format\").optional(),\n}).describe(\"Request model for updating an existing webhook. Only include fields you wish to change.\");\nexport const ParseurUpdateWebhookOutput: z.ZodTypeAny = z.object({\n id: z.number().int().describe(\"Unique identifier of the webhook\"),\n name: z.string().describe(\"Custom name of the webhook; null if not set.\").nullable().optional(),\n event: z.enum([\"document.processed\", \"document.processed.flattened\", \"document.template_needed\", \"table.processed\"]).describe(\"Event type the webhook listens to\"),\n target: z.string().describe(\"Target URL for the webhook\"),\n api_key: z.string().describe(\"API key associated with the webhook; null if not set.\").nullable().optional(),\n headers: z.object({}).describe(\"Custom HTTP headers sent with the webhook payload; null if not set.\").nullable().optional(),\n category: z.string().describe(\"Category of the webhook, always 'CUSTOM'\"),\n parser_field_set: z.array(z.record(z.string(), z.unknown())).describe(\"List of parser fields or table-fields assigned to the webhook.\").nullable().optional(),\n default_driver_fee_percentage: z.number().describe(\"Default driver fee percentage if applicable; null if not set.\").nullable().optional(),\n}).describe(\"Response model for update webhook action.\");\n\nexport const parseurUpdateWebhook = action(\"PARSEUR_UPDATE_WEBHOOK\", {\n slug: \"parseur-update-webhook\",\n name: \"Update webhook\",\n description: \"Tool to update an existing webhook’s settings. Use when you need to change the webhook’s target URL, event type, headers, or name after creation.\",\n input: ParseurUpdateWebhookInput,\n output: ParseurUpdateWebhookOutput,\n});\n"],"mappings":";;AAwBA,MAAa,uBAAuB,OAAO,0BAA0B;CACnE,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAxBqD,EAAE,OAAO;EAC9D,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,oEAAoE,CAAC,CAAC,SAAS;EACzG,OAAO,EAAE,KAAK;GAAC;GAAsB;GAAgC;GAA4B;EAAiB,CAAC,CAAC,CAAC,SAAS,+BAA+B,CAAC,CAAC,SAAS;EACxK,QAAQ,EAAE,OAAO,CAAC,CAAC,SAAS,0CAA0C,CAAC,CAAC,SAAS;EACjF,SAAS,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS,6EAA6E,CAAC,CAAC,SAAS;EACvH,YAAY,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,oCAAoC;EAC1E,cAAc,EAAE,OAAO,CAAC,CAAC,SAAS,oDAAoD,CAAC,CAAC,SAAS;CACnG,CAAC,CAAC,CAAC,SAAS,yFAiBH;CACP,QAjBsD,EAAE,OAAO;EAC/D,IAAI,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,kCAAkC;EAChE,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,8CAA8C,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EAC9F,OAAO,EAAE,KAAK;GAAC;GAAsB;GAAgC;GAA4B;EAAiB,CAAC,CAAC,CAAC,SAAS,mCAAmC;EACjK,QAAQ,EAAE,OAAO,CAAC,CAAC,SAAS,4BAA4B;EACxD,SAAS,EAAE,O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