@epilot/sdk 2.20.25 → 2.20.27
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/definitions/access-token-runtime.json +1 -0
- package/definitions/access-token.json +1025 -0
- package/definitions/address-runtime.json +1 -0
- package/definitions/address-suggestions-runtime.json +1 -0
- package/definitions/address-suggestions.json +582 -0
- package/definitions/address.json +578 -0
- package/definitions/ai-agents-runtime.json +1 -0
- package/definitions/ai-agents.json +2863 -0
- package/definitions/app-runtime.json +1 -0
- package/definitions/app.json +5994 -0
- package/definitions/audit-logs-runtime.json +1 -0
- package/definitions/audit-logs.json +305 -0
- package/definitions/automation-runtime.json +1 -0
- package/definitions/automation.json +5979 -0
- package/definitions/billing-runtime.json +1 -0
- package/definitions/billing.json +2394 -0
- package/definitions/blueprint-manifest-runtime.json +1 -0
- package/definitions/blueprint-manifest.json +7817 -0
- package/definitions/calendar-runtime.json +1 -0
- package/definitions/calendar.json +2904 -0
- package/definitions/chat-runtime.json +1 -0
- package/definitions/chat.json +2909 -0
- package/definitions/configuration-hub-runtime.json +1 -0
- package/definitions/configuration-hub.json +2250 -0
- package/definitions/consent-runtime.json +1 -0
- package/definitions/consent.json +344 -0
- package/definitions/customer-portal-runtime.json +1 -0
- package/definitions/customer-portal.json +21181 -0
- package/definitions/dashboard-runtime.json +1 -0
- package/definitions/dashboard.json +1355 -0
- package/definitions/data-governance-runtime.json +1 -0
- package/definitions/data-governance.json +1126 -0
- package/definitions/deduplication-runtime.json +1 -0
- package/definitions/deduplication.json +782 -0
- package/definitions/design-runtime.json +1 -0
- package/definitions/design.json +1827 -0
- package/definitions/document-runtime.json +1 -0
- package/definitions/document.json +972 -0
- package/definitions/email-settings-runtime.json +1 -0
- package/definitions/email-settings.json +3736 -0
- package/definitions/email-template-runtime.json +1 -0
- package/definitions/email-template.json +1441 -0
- package/definitions/entity-mapping-runtime.json +1 -0
- package/definitions/entity-mapping.json +1852 -0
- package/definitions/entity-runtime.json +1 -0
- package/definitions/entity.json +11546 -0
- package/definitions/environments-runtime.json +1 -0
- package/definitions/environments.json +988 -0
- package/definitions/erp-integration-runtime.json +1 -0
- package/definitions/erp-integration.json +7936 -0
- package/definitions/event-catalog-runtime.json +1 -0
- package/definitions/event-catalog.json +2014 -0
- package/definitions/file-runtime.json +1 -0
- package/definitions/file.json +4298 -0
- package/definitions/iban-runtime.json +1 -0
- package/definitions/iban.json +132 -0
- package/definitions/integration-toolkit-runtime.json +1 -0
- package/definitions/integration-toolkit.json +13106 -0
- package/definitions/journey-runtime.json +1 -0
- package/definitions/journey.json +3663 -0
- package/definitions/kanban-runtime.json +1 -0
- package/definitions/kanban.json +1506 -0
- package/definitions/message-runtime.json +1 -0
- package/definitions/message.json +3667 -0
- package/definitions/metering-runtime.json +1 -0
- package/definitions/metering.json +3132 -0
- package/definitions/notes-runtime.json +1 -0
- package/definitions/notes.json +1698 -0
- package/definitions/notification-runtime.json +1 -0
- package/definitions/notification.json +1439 -0
- package/definitions/organization-runtime.json +1 -0
- package/definitions/organization.json +1192 -0
- package/definitions/partner-directory-runtime.json +1 -0
- package/definitions/partner-directory.json +2284 -0
- package/definitions/permissions-runtime.json +1 -0
- package/definitions/permissions.json +1598 -0
- package/definitions/pricing-runtime.json +1 -0
- package/definitions/pricing-tier-runtime.json +1 -0
- package/definitions/pricing-tier.json +105 -0
- package/definitions/pricing.json +14369 -0
- package/definitions/purpose-runtime.json +1 -0
- package/definitions/purpose.json +524 -0
- package/definitions/query-runtime.json +1 -0
- package/definitions/query.json +3178 -0
- package/definitions/sandbox-runtime.json +1 -0
- package/definitions/sandbox.json +453 -0
- package/definitions/sharing-runtime.json +1 -0
- package/definitions/sharing.json +956 -0
- package/definitions/snapshot-runtime.json +1 -0
- package/definitions/snapshot.json +1103 -0
- package/definitions/submission-runtime.json +1 -0
- package/definitions/submission.json +313 -0
- package/definitions/targeting-runtime.json +1 -0
- package/definitions/targeting.json +2285 -0
- package/definitions/template-variables-runtime.json +1 -0
- package/definitions/template-variables.json +1416 -0
- package/definitions/user-runtime.json +1 -0
- package/definitions/user.json +3051 -0
- package/definitions/validation-rules-runtime.json +1 -0
- package/definitions/validation-rules.json +2642 -0
- package/definitions/webhooks-runtime.json +1 -0
- package/definitions/webhooks.json +1875 -0
- package/definitions/workflow-definition-runtime.json +1 -0
- package/definitions/workflow-definition.json +3592 -0
- package/definitions/workflow-runtime.json +1 -0
- package/definitions/workflow.json +4669 -0
- package/dist/apis/access-token.cjs +6 -6
- package/dist/apis/access-token.js +1 -1
- package/dist/apis/address-suggestions.cjs +6 -6
- package/dist/apis/address-suggestions.js +1 -1
- package/dist/apis/address.cjs +6 -6
- package/dist/apis/address.js +1 -1
- package/dist/apis/ai-agents.cjs +6 -6
- package/dist/apis/ai-agents.js +1 -1
- package/dist/apis/app.cjs +6 -6
- package/dist/apis/app.js +1 -1
- package/dist/apis/audit-logs.cjs +6 -6
- package/dist/apis/audit-logs.js +1 -1
- package/dist/apis/automation.cjs +6 -6
- package/dist/apis/automation.js +1 -1
- package/dist/apis/billing.cjs +6 -6
- package/dist/apis/billing.js +1 -1
- package/dist/apis/blueprint-manifest.cjs +6 -6
- package/dist/apis/blueprint-manifest.js +1 -1
- package/dist/apis/calendar.cjs +6 -6
- package/dist/apis/calendar.js +1 -1
- package/dist/apis/chat.cjs +6 -6
- package/dist/apis/chat.js +1 -1
- package/dist/apis/configuration-hub.cjs +6 -6
- package/dist/apis/configuration-hub.d.cts +2 -2
- package/dist/apis/configuration-hub.d.ts +2 -2
- package/dist/apis/configuration-hub.js +1 -1
- package/dist/apis/consent.cjs +6 -6
- package/dist/apis/consent.js +1 -1
- package/dist/apis/customer-portal.cjs +6 -6
- package/dist/apis/customer-portal.js +1 -1
- package/dist/apis/dashboard.cjs +6 -6
- package/dist/apis/dashboard.js +1 -1
- package/dist/apis/data-governance.cjs +6 -6
- package/dist/apis/data-governance.js +1 -1
- package/dist/apis/deduplication.cjs +6 -6
- package/dist/apis/deduplication.js +1 -1
- package/dist/apis/design.cjs +6 -6
- package/dist/apis/design.js +1 -1
- package/dist/apis/document.cjs +8 -8
- package/dist/apis/document.d.cts +2 -2
- package/dist/apis/document.d.ts +2 -2
- package/dist/apis/document.js +2 -2
- package/dist/apis/email-settings.cjs +6 -6
- package/dist/apis/email-settings.js +1 -1
- package/dist/apis/email-template.cjs +6 -6
- package/dist/apis/email-template.js +1 -1
- package/dist/apis/entity-mapping.cjs +6 -6
- package/dist/apis/entity-mapping.js +1 -1
- package/dist/apis/entity.cjs +6 -6
- package/dist/apis/entity.js +1 -1
- package/dist/apis/environments.cjs +6 -6
- package/dist/apis/environments.js +1 -1
- package/dist/apis/event-catalog.cjs +6 -6
- package/dist/apis/event-catalog.js +1 -1
- package/dist/apis/file.cjs +6 -6
- package/dist/apis/file.js +1 -1
- package/dist/apis/iban.cjs +6 -6
- package/dist/apis/iban.js +1 -1
- package/dist/apis/integration-toolkit.cjs +6 -6
- package/dist/apis/integration-toolkit.js +1 -1
- package/dist/apis/journey.cjs +6 -6
- package/dist/apis/journey.d.cts +2 -2
- package/dist/apis/journey.d.ts +2 -2
- package/dist/apis/journey.js +1 -1
- package/dist/apis/kanban.cjs +6 -6
- package/dist/apis/kanban.js +1 -1
- package/dist/apis/message.cjs +6 -6
- package/dist/apis/message.js +1 -1
- package/dist/apis/metering.cjs +6 -6
- package/dist/apis/metering.js +1 -1
- package/dist/apis/notes.cjs +6 -6
- package/dist/apis/notes.js +1 -1
- package/dist/apis/notification.cjs +6 -6
- package/dist/apis/notification.js +1 -1
- package/dist/apis/organization.cjs +6 -6
- package/dist/apis/organization.js +1 -1
- package/dist/apis/partner-directory.cjs +6 -6
- package/dist/apis/partner-directory.js +1 -1
- package/dist/apis/permissions.cjs +6 -6
- package/dist/apis/permissions.js +1 -1
- package/dist/apis/pricing-tier.cjs +6 -6
- package/dist/apis/pricing-tier.js +1 -1
- package/dist/apis/pricing.cjs +6 -6
- package/dist/apis/pricing.js +1 -1
- package/dist/apis/purpose.cjs +6 -6
- package/dist/apis/purpose.js +1 -1
- package/dist/apis/query.cjs +6 -6
- package/dist/apis/query.js +1 -1
- package/dist/apis/sandbox.cjs +6 -6
- package/dist/apis/sandbox.js +1 -1
- package/dist/apis/sharing.cjs +6 -6
- package/dist/apis/sharing.js +1 -1
- package/dist/apis/snapshot.cjs +6 -6
- package/dist/apis/snapshot.js +1 -1
- package/dist/apis/submission.cjs +6 -6
- package/dist/apis/submission.js +1 -1
- package/dist/apis/target.cjs +6 -6
- package/dist/apis/target.js +1 -1
- package/dist/apis/targeting.cjs +6 -6
- package/dist/apis/targeting.js +1 -1
- package/dist/apis/template-variables.cjs +6 -6
- package/dist/apis/template-variables.js +1 -1
- package/dist/apis/user.cjs +6 -6
- package/dist/apis/user.js +1 -1
- package/dist/apis/validation-rules.cjs +6 -6
- package/dist/apis/validation-rules.js +1 -1
- package/dist/apis/webhooks.cjs +6 -6
- package/dist/apis/webhooks.js +1 -1
- package/dist/apis/workflow-definition.cjs +6 -6
- package/dist/apis/workflow-definition.js +1 -1
- package/dist/apis/workflow.cjs +6 -6
- package/dist/apis/workflow.js +1 -1
- package/dist/{chunk-M56QQHVA.cjs → chunk-E2EHXQRP.cjs} +1 -1
- package/dist/{chunk-75EI2Q64.js → chunk-LR7LGGRU.js} +1 -1
- package/dist/{chunk-PZ4TXAF5.cjs → chunk-UM53DB6T.cjs} +3 -3
- package/dist/{chunk-X742W7MI.js → chunk-W5PMKQO7.js} +3 -3
- package/dist/{configuration-hub.d-Dv41yC3b.d.cts → configuration-hub.d-DhPrjJkE.d.cts} +142 -142
- package/dist/{configuration-hub.d-Dv41yC3b.d.ts → configuration-hub.d-DhPrjJkE.d.ts} +142 -142
- package/dist/document-UGT6DAXC.cjs +7 -0
- package/dist/document-UR5WWZEA.js +7 -0
- package/dist/{document-runtime-GFEBGNMS.js → document-runtime-LFOBMSE4.js} +1 -1
- package/dist/{document-runtime-RG3F4R6O.cjs → document-runtime-QM4H7DLT.cjs} +2 -2
- package/dist/{document.d-DN37pjdx.d.cts → document.d-B0zC-R8x.d.cts} +235 -7
- package/dist/{document.d-DN37pjdx.d.ts → document.d-B0zC-R8x.d.ts} +235 -7
- package/dist/index.cjs +10 -10
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +2 -2
- package/dist/journey-IVIBYU5V.js +7 -0
- package/dist/journey-ZN46FFPM.cjs +7 -0
- package/dist/{journey.d-DvwLALwc.d.cts → journey.d-Dj93v-Lw.d.cts} +54 -5
- package/dist/{journey.d-DvwLALwc.d.ts → journey.d-Dj93v-Lw.d.ts} +54 -5
- package/dist/js-yaml-DLCVPJ7G.js +0 -0
- package/docs/document.md +145 -6
- package/docs/journey.md +47 -2
- package/package.json +12 -11
- package/dist/document-CY2A2OE7.js +0 -7
- package/dist/document-RYQ7MF6U.cjs +0 -7
- package/dist/journey-LIJDXSEC.js +0 -7
- package/dist/journey-LNA7JFP3.cjs +0 -7
|
@@ -22,6 +22,39 @@ declare namespace Components {
|
|
|
22
22
|
*/
|
|
23
23
|
label?: string;
|
|
24
24
|
}
|
|
25
|
+
/**
|
|
26
|
+
* One link a customer clicks. `label` and `description` are each either a
|
|
27
|
+
* plain string or one string per language, deciding that independently.
|
|
28
|
+
* Mirrors environments-api's `LinkFields`.
|
|
29
|
+
*
|
|
30
|
+
*/
|
|
31
|
+
export interface EnvironmentLink {
|
|
32
|
+
url: string;
|
|
33
|
+
label: string | {
|
|
34
|
+
[name: string]: string;
|
|
35
|
+
};
|
|
36
|
+
description?: string | {
|
|
37
|
+
[name: string]: string;
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* A list of links, served under this service's own `List<Link>` type
|
|
42
|
+
* token. environments-api types the variable `List` and declares the
|
|
43
|
+
* element type inside the value; journey-api composes the two so a
|
|
44
|
+
* consumer needs only one discriminant.
|
|
45
|
+
*
|
|
46
|
+
*/
|
|
47
|
+
export interface EnvironmentLinkList {
|
|
48
|
+
itemType: "Link";
|
|
49
|
+
fallbackLanguage?: string;
|
|
50
|
+
items: /**
|
|
51
|
+
* One link a customer clicks. `label` and `description` are each either a
|
|
52
|
+
* plain string or one string per language, deciding that independently.
|
|
53
|
+
* Mirrors environments-api's `LinkFields`.
|
|
54
|
+
*
|
|
55
|
+
*/
|
|
56
|
+
EnvironmentLink[];
|
|
57
|
+
}
|
|
25
58
|
export interface EnvironmentMap {
|
|
26
59
|
fallbackLanguage?: string;
|
|
27
60
|
options: EnvironmentMapEntry[];
|
|
@@ -990,8 +1023,15 @@ declare namespace Components {
|
|
|
990
1023
|
export interface JourneyEnvironmentResponse {
|
|
991
1024
|
items: {
|
|
992
1025
|
datasourceId: string;
|
|
993
|
-
type: "Text" | "Number" | "Boolean" | "Map";
|
|
994
|
-
value: string | number | boolean | EnvironmentMap
|
|
1026
|
+
type: "Text" | "Number" | "Boolean" | "Map" | "List<Link>";
|
|
1027
|
+
value: string | number | boolean | EnvironmentMap | /**
|
|
1028
|
+
* A list of links, served under this service's own `List<Link>` type
|
|
1029
|
+
* token. environments-api types the variable `List` and declares the
|
|
1030
|
+
* element type inside the value; journey-api composes the two so a
|
|
1031
|
+
* consumer needs only one discriminant.
|
|
1032
|
+
*
|
|
1033
|
+
*/
|
|
1034
|
+
EnvironmentLinkList;
|
|
995
1035
|
}[];
|
|
996
1036
|
errors: {
|
|
997
1037
|
datasourceId: string;
|
|
@@ -1001,8 +1041,15 @@ declare namespace Components {
|
|
|
1001
1041
|
export interface JourneyEnvironmentVariablesResponse {
|
|
1002
1042
|
items: {
|
|
1003
1043
|
key: string;
|
|
1004
|
-
type: "Map";
|
|
1005
|
-
value: EnvironmentMap
|
|
1044
|
+
type: "Map" | "List<Link>";
|
|
1045
|
+
value: EnvironmentMap | /**
|
|
1046
|
+
* A list of links, served under this service's own `List<Link>` type
|
|
1047
|
+
* token. environments-api types the variable `List` and declares the
|
|
1048
|
+
* element type inside the value; journey-api composes the two so a
|
|
1049
|
+
* consumer needs only one discriminant.
|
|
1050
|
+
*
|
|
1051
|
+
*/
|
|
1052
|
+
EnvironmentLinkList;
|
|
1006
1053
|
description?: string;
|
|
1007
1054
|
}[];
|
|
1008
1055
|
}
|
|
@@ -3777,6 +3824,8 @@ type Client = OpenAPIClient<OperationMethods, PathsDictionary>
|
|
|
3777
3824
|
|
|
3778
3825
|
|
|
3779
3826
|
type ButtonOption = Components.Schemas.ButtonOption;
|
|
3827
|
+
type EnvironmentLink = Components.Schemas.EnvironmentLink;
|
|
3828
|
+
type EnvironmentLinkList = Components.Schemas.EnvironmentLinkList;
|
|
3780
3829
|
type EnvironmentMap = Components.Schemas.EnvironmentMap;
|
|
3781
3830
|
type EnvironmentMapEntry = Components.Schemas.EnvironmentMapEntry;
|
|
3782
3831
|
type GenerateDocumentRequest = Components.Schemas.GenerateDocumentRequest;
|
|
@@ -3812,4 +3861,4 @@ type SearchJourneysResponse = Components.Schemas.SearchJourneysResponse;
|
|
|
3812
3861
|
type TemplateSettings = Components.Schemas.TemplateSettings;
|
|
3813
3862
|
type ValidationRuleRef = Components.Schemas.ValidationRuleRef;
|
|
3814
3863
|
|
|
3815
|
-
export { type
|
|
3864
|
+
export { type PatchUpdateJourneyRequest as A, type ButtonOption as B, type Client as C, type PublishResult as D, type EnvironmentLink as E, type PublishRevisionRequest as F, type GenerateDocumentRequest as G, type SearchJourneysQueryRequest as H, type SearchJourneysResponse as I, type Journey as J, type OperationMethods as O, Paths as P, type RuleRef as R, type S3Reference as S, type TemplateSettings as T, type ValidationRuleRef as V, Components as a, type PathsDictionary as b, type EnvironmentLinkList as c, type EnvironmentMap as d, type EnvironmentMapEntry as e, type GenerateDocumentResponse as f, type GetJourneysResponse as g, GetSettingsForJourney as h, type JourneyActivationGuarantee as i, type JourneyAuditInfo as j, type JourneyCreationRequest as k, type JourneyCreationRequestV2 as l, type JourneyEnvironmentResponse as m, type JourneyEnvironmentVariablesResponse as n, type JourneyFeatureFlags as o, type JourneyProductsResponse as p, type JourneyPublishState as q, type JourneyResponse as r, type JourneyRevision as s, type JourneyRevisionConflict as t, type JourneyRevisionList as u, type JourneyRevisionRequest as v, type JourneyRevisionSummary as w, type JourneyServedRevision as x, type JourneyValidationError as y, type JourneyValidationResponse as z };
|
package/dist/js-yaml-DLCVPJ7G.js
CHANGED
|
File without changes
|
package/docs/document.md
CHANGED
|
@@ -28,6 +28,7 @@ const { data } = await documentClient.getTemplateMeta(...)
|
|
|
28
28
|
- [`getTemplateMeta`](#gettemplatemeta)
|
|
29
29
|
- [`generateDocumentV2`](#generatedocumentv2)
|
|
30
30
|
- [`convertDocument`](#convertdocument)
|
|
31
|
+
- [`validateTemplate`](#validatetemplate)
|
|
31
32
|
|
|
32
33
|
**Schemas**
|
|
33
34
|
- [`S3Reference`](#s3reference)
|
|
@@ -39,6 +40,9 @@ const { data } = await documentClient.getTemplateMeta(...)
|
|
|
39
40
|
- [`DocxTemplaterErrorDetails`](#docxtemplatererrordetails)
|
|
40
41
|
- [`DocxTemplaterErrorDetail`](#docxtemplatererrordetail)
|
|
41
42
|
- [`ErrorCode`](#errorcode)
|
|
43
|
+
- [`TemplateValidationRequest`](#templatevalidationrequest)
|
|
44
|
+
- [`TemplateValidationResponse`](#templatevalidationresponse)
|
|
45
|
+
- [`TemplateIssue`](#templateissue)
|
|
42
46
|
- [`TemplateSettings`](#templatesettings)
|
|
43
47
|
- [`DocumentMetaRequest`](#documentmetarequest)
|
|
44
48
|
- [`DocumentMetaResponse`](#documentmetaresponse)
|
|
@@ -110,7 +114,7 @@ const { data } = await client.generateDocumentV2(
|
|
|
110
114
|
}
|
|
111
115
|
},
|
|
112
116
|
context_entity_id: 'bcd0aab9-b544-42b0-8bfb-6d449d02eacc',
|
|
113
|
-
user_id: 100321,
|
|
117
|
+
user_id: '100321',
|
|
114
118
|
language: 'de',
|
|
115
119
|
variable_payload: {
|
|
116
120
|
additionalProperties: 'string'
|
|
@@ -132,7 +136,7 @@ const { data } = await client.generateDocumentV2(
|
|
|
132
136
|
template_with_datatable: false,
|
|
133
137
|
enabled_template_settings_persistence: false,
|
|
134
138
|
misconfigured_margins: false,
|
|
135
|
-
file_entity_id: '
|
|
139
|
+
file_entity_id: '123e4567-e89b-12d3-a456-426614174000'
|
|
136
140
|
}
|
|
137
141
|
},
|
|
138
142
|
)
|
|
@@ -215,7 +219,7 @@ const { data } = await client.generateDocumentV2(
|
|
|
215
219
|
"template_with_datatable": false,
|
|
216
220
|
"enabled_template_settings_persistence": false,
|
|
217
221
|
"misconfigured_margins": false,
|
|
218
|
-
"file_entity_id": "
|
|
222
|
+
"file_entity_id": "123e4567-e89b-12d3-a456-426614174000"
|
|
219
223
|
}
|
|
220
224
|
}
|
|
221
225
|
```
|
|
@@ -266,6 +270,72 @@ const { data } = await client.convertDocument(
|
|
|
266
270
|
|
|
267
271
|
---
|
|
268
272
|
|
|
273
|
+
### `validateTemplate`
|
|
274
|
+
|
|
275
|
+
Validates a document template's variable syntax and, optionally, proposes a hotfixed copy of it.
|
|
276
|
+
|
|
277
|
+
`POST /v2/templates:validate`
|
|
278
|
+
|
|
279
|
+
```ts
|
|
280
|
+
const { data } = await client.validateTemplate(
|
|
281
|
+
null,
|
|
282
|
+
{
|
|
283
|
+
template_document: {
|
|
284
|
+
filename: 'Umzugsmeldung.xlsx',
|
|
285
|
+
s3ref: {
|
|
286
|
+
bucket: 'document-api-prod',
|
|
287
|
+
key: 'uploads/my-template.pdf'
|
|
288
|
+
}
|
|
289
|
+
},
|
|
290
|
+
fix: true,
|
|
291
|
+
fix_level: 'safe'
|
|
292
|
+
},
|
|
293
|
+
)
|
|
294
|
+
```
|
|
295
|
+
|
|
296
|
+
<details>
|
|
297
|
+
<summary>Response</summary>
|
|
298
|
+
|
|
299
|
+
```json
|
|
300
|
+
{
|
|
301
|
+
"valid": false,
|
|
302
|
+
"fixed": true,
|
|
303
|
+
"issues": [
|
|
304
|
+
{
|
|
305
|
+
"id": "unopened_tag",
|
|
306
|
+
"file": "xl/sharedStrings.xml",
|
|
307
|
+
"location": "Tabelle1!N4",
|
|
308
|
+
"context": "…Datum: {system.date}} Unterschrift…",
|
|
309
|
+
"explanation": "The tag is missing an opening brace.",
|
|
310
|
+
"fixable": true,
|
|
311
|
+
"confidence": "high",
|
|
312
|
+
"rule": "balance_opening_delimiter",
|
|
313
|
+
"before": "{system.date}}",
|
|
314
|
+
"after": "{{system.date}}"
|
|
315
|
+
}
|
|
316
|
+
],
|
|
317
|
+
"unresolved_errors": [
|
|
318
|
+
{
|
|
319
|
+
"id": "string",
|
|
320
|
+
"context": "string",
|
|
321
|
+
"explanation": "string"
|
|
322
|
+
}
|
|
323
|
+
],
|
|
324
|
+
"fixed_document": {
|
|
325
|
+
"s3ref": {
|
|
326
|
+
"bucket": "document-api-prod",
|
|
327
|
+
"key": "uploads/my-template.pdf"
|
|
328
|
+
},
|
|
329
|
+
"filename": "Umzugsmeldung (fixed).xlsx",
|
|
330
|
+
"preview_url": "https://example.com/path"
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
```
|
|
334
|
+
|
|
335
|
+
</details>
|
|
336
|
+
|
|
337
|
+
---
|
|
338
|
+
|
|
269
339
|
## Schemas
|
|
270
340
|
|
|
271
341
|
### `S3Reference`
|
|
@@ -282,7 +352,7 @@ type S3Reference = {
|
|
|
282
352
|
```ts
|
|
283
353
|
type ErrorOutput = {
|
|
284
354
|
error_message?: string
|
|
285
|
-
error_code?: "PARSE_ERROR" | "DOC_TO_PDF_CONVERT_ERROR" | "INTERNAL_ERROR" | "INVALID_TEMPLATE_FORMAT"
|
|
355
|
+
error_code?: "PARSE_ERROR" | "DOC_TO_PDF_CONVERT_ERROR" | "INTERNAL_ERROR" | "INVALID_TEMPLATE_FORMAT" | "TEMPLATE_NOT_FOUND"
|
|
286
356
|
error_details?: Array<{
|
|
287
357
|
explanation?: string
|
|
288
358
|
context?: {
|
|
@@ -395,7 +465,76 @@ Error codes for document generation:
|
|
|
395
465
|
- INTERNAL_ERROR - In
|
|
396
466
|
|
|
397
467
|
```ts
|
|
398
|
-
type ErrorCode = "PARSE_ERROR" | "DOC_TO_PDF_CONVERT_ERROR" | "INTERNAL_ERROR" | "INVALID_TEMPLATE_FORMAT"
|
|
468
|
+
type ErrorCode = "PARSE_ERROR" | "DOC_TO_PDF_CONVERT_ERROR" | "INTERNAL_ERROR" | "INVALID_TEMPLATE_FORMAT" | "TEMPLATE_NOT_FOUND"
|
|
469
|
+
```
|
|
470
|
+
|
|
471
|
+
### `TemplateValidationRequest`
|
|
472
|
+
|
|
473
|
+
```ts
|
|
474
|
+
type TemplateValidationRequest = {
|
|
475
|
+
template_document: {
|
|
476
|
+
filename?: string
|
|
477
|
+
s3ref: {
|
|
478
|
+
bucket: { ... }
|
|
479
|
+
key: { ... }
|
|
480
|
+
}
|
|
481
|
+
}
|
|
482
|
+
fix?: boolean
|
|
483
|
+
fix_level?: "safe" | "aggressive"
|
|
484
|
+
}
|
|
485
|
+
```
|
|
486
|
+
|
|
487
|
+
### `TemplateValidationResponse`
|
|
488
|
+
|
|
489
|
+
```ts
|
|
490
|
+
type TemplateValidationResponse = {
|
|
491
|
+
valid?: boolean
|
|
492
|
+
fixed?: boolean
|
|
493
|
+
issues?: Array<{
|
|
494
|
+
id?: string
|
|
495
|
+
file?: string
|
|
496
|
+
location?: string
|
|
497
|
+
context?: string
|
|
498
|
+
explanation?: string
|
|
499
|
+
fixable?: boolean
|
|
500
|
+
confidence?: "high" | "medium" | "low"
|
|
501
|
+
rule?: string
|
|
502
|
+
before?: string
|
|
503
|
+
after?: string
|
|
504
|
+
}>
|
|
505
|
+
unresolved_errors?: Array<{
|
|
506
|
+
id?: string
|
|
507
|
+
context?: string
|
|
508
|
+
explanation?: string
|
|
509
|
+
}>
|
|
510
|
+
fixed_document?: {
|
|
511
|
+
s3ref?: {
|
|
512
|
+
bucket: { ... }
|
|
513
|
+
key: { ... }
|
|
514
|
+
}
|
|
515
|
+
filename?: string
|
|
516
|
+
preview_url?: string // uri
|
|
517
|
+
}
|
|
518
|
+
}
|
|
519
|
+
```
|
|
520
|
+
|
|
521
|
+
### `TemplateIssue`
|
|
522
|
+
|
|
523
|
+
A single template syntax problem, and the repair proposed for it
|
|
524
|
+
|
|
525
|
+
```ts
|
|
526
|
+
type TemplateIssue = {
|
|
527
|
+
id?: string
|
|
528
|
+
file?: string
|
|
529
|
+
location?: string
|
|
530
|
+
context?: string
|
|
531
|
+
explanation?: string
|
|
532
|
+
fixable?: boolean
|
|
533
|
+
confidence?: "high" | "medium" | "low"
|
|
534
|
+
rule?: string
|
|
535
|
+
before?: string
|
|
536
|
+
after?: string
|
|
537
|
+
}
|
|
399
538
|
```
|
|
400
539
|
|
|
401
540
|
### `TemplateSettings`
|
|
@@ -525,7 +664,7 @@ type DocumentGenerationV2Response = {
|
|
|
525
664
|
}
|
|
526
665
|
error_output?: {
|
|
527
666
|
error_message?: string
|
|
528
|
-
error_code?: "PARSE_ERROR" | "DOC_TO_PDF_CONVERT_ERROR" | "INTERNAL_ERROR" | "INVALID_TEMPLATE_FORMAT"
|
|
667
|
+
error_code?: "PARSE_ERROR" | "DOC_TO_PDF_CONVERT_ERROR" | "INTERNAL_ERROR" | "INVALID_TEMPLATE_FORMAT" | "TEMPLATE_NOT_FOUND"
|
|
529
668
|
error_details?: Array<{
|
|
530
669
|
explanation?: { ... }
|
|
531
670
|
context?: { ... }
|
package/docs/journey.md
CHANGED
|
@@ -54,6 +54,8 @@ const { data } = await journeyClient.getJourneysByOrgId(...)
|
|
|
54
54
|
**Schemas**
|
|
55
55
|
- [`EnvironmentMapEntry`](#environmentmapentry)
|
|
56
56
|
- [`EnvironmentMap`](#environmentmap)
|
|
57
|
+
- [`EnvironmentLink`](#environmentlink)
|
|
58
|
+
- [`EnvironmentLinkList`](#environmentlinklist)
|
|
57
59
|
- [`JourneyEnvironmentResponse`](#journeyenvironmentresponse)
|
|
58
60
|
- [`JourneyEnvironmentVariablesResponse`](#journeyenvironmentvariablesresponse)
|
|
59
61
|
- [`GetJourneysResponse`](#getjourneysresponse)
|
|
@@ -2198,16 +2200,55 @@ type EnvironmentMap = {
|
|
|
2198
2200
|
}
|
|
2199
2201
|
```
|
|
2200
2202
|
|
|
2203
|
+
### `EnvironmentLink`
|
|
2204
|
+
|
|
2205
|
+
One link a customer clicks. `label` and `description` are each either a
|
|
2206
|
+
plain string or one string per language, deciding that independently.
|
|
2207
|
+
Mirrors environments-api's `LinkFields`.
|
|
2208
|
+
|
|
2209
|
+
|
|
2210
|
+
```ts
|
|
2211
|
+
type EnvironmentLink = {
|
|
2212
|
+
url: string
|
|
2213
|
+
label: string | Record<string, string>
|
|
2214
|
+
description?: string | Record<string, string>
|
|
2215
|
+
}
|
|
2216
|
+
```
|
|
2217
|
+
|
|
2218
|
+
### `EnvironmentLinkList`
|
|
2219
|
+
|
|
2220
|
+
A list of links, served under this service's own `List`<Link>`` type
|
|
2221
|
+
token. environments-api types the variable `List` and declares the
|
|
2222
|
+
element type inside the value; journey-api composes the two so a
|
|
2223
|
+
consumer needs only one discriminant.
|
|
2224
|
+
|
|
2225
|
+
|
|
2226
|
+
```ts
|
|
2227
|
+
type EnvironmentLinkList = {
|
|
2228
|
+
itemType: "Link"
|
|
2229
|
+
fallbackLanguage?: string
|
|
2230
|
+
items: Array<{
|
|
2231
|
+
url: string
|
|
2232
|
+
label: string | Record<string, string>
|
|
2233
|
+
description?: string | Record<string, string>
|
|
2234
|
+
}>
|
|
2235
|
+
}
|
|
2236
|
+
```
|
|
2237
|
+
|
|
2201
2238
|
### `JourneyEnvironmentResponse`
|
|
2202
2239
|
|
|
2203
2240
|
```ts
|
|
2204
2241
|
type JourneyEnvironmentResponse = {
|
|
2205
2242
|
items: Array<{
|
|
2206
2243
|
datasourceId: string
|
|
2207
|
-
type: "Text" | "Number" | "Boolean" | "Map"
|
|
2244
|
+
type: "Text" | "Number" | "Boolean" | "Map" | "List<Link>"
|
|
2208
2245
|
value: string | number | boolean | {
|
|
2209
2246
|
fallbackLanguage?: { ... }
|
|
2210
2247
|
options: { ... }
|
|
2248
|
+
} | {
|
|
2249
|
+
itemType: { ... }
|
|
2250
|
+
fallbackLanguage?: { ... }
|
|
2251
|
+
items: { ... }
|
|
2211
2252
|
}
|
|
2212
2253
|
}>
|
|
2213
2254
|
errors: Array<{
|
|
@@ -2223,10 +2264,14 @@ type JourneyEnvironmentResponse = {
|
|
|
2223
2264
|
type JourneyEnvironmentVariablesResponse = {
|
|
2224
2265
|
items: Array<{
|
|
2225
2266
|
key: string
|
|
2226
|
-
type: "Map"
|
|
2267
|
+
type: "Map" | "List<Link>"
|
|
2227
2268
|
value: {
|
|
2228
2269
|
fallbackLanguage?: { ... }
|
|
2229
2270
|
options: { ... }
|
|
2271
|
+
} | {
|
|
2272
|
+
itemType: { ... }
|
|
2273
|
+
fallbackLanguage?: { ... }
|
|
2274
|
+
items: { ... }
|
|
2230
2275
|
}
|
|
2231
2276
|
description?: string
|
|
2232
2277
|
}>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@epilot/sdk",
|
|
3
|
-
"version": "2.20.
|
|
3
|
+
"version": "2.20.27",
|
|
4
4
|
"description": "JavaScript/TypeScript SDK for epilot APIs",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -328,6 +328,16 @@
|
|
|
328
328
|
},
|
|
329
329
|
"./workflow-definition/openapi.json": "./definitions/workflow-definition.json"
|
|
330
330
|
},
|
|
331
|
+
"scripts": {
|
|
332
|
+
"generate": "tsx ../../scripts/generate-sdk-v2.ts && pnpm lint:fix",
|
|
333
|
+
"build": "tsup",
|
|
334
|
+
"build:watch": "tsup --watch",
|
|
335
|
+
"test": "vitest run",
|
|
336
|
+
"test:watch": "vitest",
|
|
337
|
+
"lint": "biome check src",
|
|
338
|
+
"lint:fix": "biome check src --fix",
|
|
339
|
+
"prepublishOnly": "npm run build"
|
|
340
|
+
},
|
|
331
341
|
"keywords": [
|
|
332
342
|
"epilot",
|
|
333
343
|
"sdk",
|
|
@@ -524,14 +534,5 @@
|
|
|
524
534
|
"./dist/apis/workflow-definition.d.ts"
|
|
525
535
|
]
|
|
526
536
|
}
|
|
527
|
-
},
|
|
528
|
-
"scripts": {
|
|
529
|
-
"generate": "tsx ../../scripts/generate-sdk-v2.ts && pnpm lint:fix",
|
|
530
|
-
"build": "tsup",
|
|
531
|
-
"build:watch": "tsup --watch",
|
|
532
|
-
"test": "vitest run",
|
|
533
|
-
"test:watch": "vitest",
|
|
534
|
-
"lint": "biome check src",
|
|
535
|
-
"lint:fix": "biome check src --fix"
|
|
536
537
|
}
|
|
537
|
-
}
|
|
538
|
+
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import "./chunk-YPSWSI3M.js";
|
|
2
|
-
|
|
3
|
-
// src/docs/document.json
|
|
4
|
-
var document_default = '# Document API\n\n- **Base URL:** `https://document.sls.epilot.io`\n- **Full API Docs:** [https://docs.epilot.io/api/document](https://docs.epilot.io/api/document)\n\n## Usage\n\n```ts\nimport { epilot } from \'@epilot/sdk\'\n\nepilot.authorize(() => \'<token>\')\nconst { data } = await epilot.document.getTemplateMeta(...)\n```\n\n### Tree-shakeable import\n\n```ts\nimport { getClient, authorize } from \'@epilot/sdk/document\'\n\nconst documentClient = getClient()\nauthorize(documentClient, () => \'<token>\')\nconst { data } = await documentClient.getTemplateMeta(...)\n```\n\n## Operations\n\n**Documents**\n- [`getTemplateMeta`](#gettemplatemeta)\n- [`generateDocumentV2`](#generatedocumentv2)\n- [`convertDocument`](#convertdocument)\n\n**Schemas**\n- [`S3Reference`](#s3reference)\n- [`ErrorOutput`](#erroroutput)\n- [`InvalidCustomVariableErrorDetails`](#invalidcustomvariableerrordetails)\n- [`InvalidCustomVariableErrorDetail`](#invalidcustomvariableerrordetail)\n- [`InternalErrorDetails`](#internalerrordetails)\n- [`InternalErrorDetail`](#internalerrordetail)\n- [`DocxTemplaterErrorDetails`](#docxtemplatererrordetails)\n- [`DocxTemplaterErrorDetail`](#docxtemplatererrordetail)\n- [`ErrorCode`](#errorcode)\n- [`TemplateSettings`](#templatesettings)\n- [`DocumentMetaRequest`](#documentmetarequest)\n- [`DocumentMetaResponse`](#documentmetaresponse)\n- [`DocumentGenerationV2Request`](#documentgenerationv2request)\n- [`DocumentGenerationV2Response`](#documentgenerationv2response)\n- [`ConvertDocumentRequest`](#convertdocumentrequest)\n- [`ConvertDocumentResponse`](#convertdocumentresponse)\n\n### `getTemplateMeta`\n\nGet metadata for a document template\n\n`POST /v2/documents:meta`\n\n```ts\nconst { data } = await client.getTemplateMeta(\n null,\n {\n template_document: {\n s3ref: {\n bucket: \'document-api-prod\',\n key: \'uploads/my-template.pdf\'\n }\n }\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "page_margins": {\n "top": 2.54,\n "bottom": 2.54,\n "left": 2.54,\n "right": 2.54,\n "header": 2.54,\n "footer": 2.54\n },\n "variables": ["order.billing_contact.0.salutation", "order.billing_contact.0.title", "order_table", "stayHardStatic", "opportunity[attribute_name]", "opportunity[\\"attribute_name\\"]", "opportunity.[attribute_name]", "attribute_name", "opportunities.0.attribute_name", "opportunities[0].attribute_name", "contact.opportunities[0].attribute_name", "opportunities[Primary].attribute_name"]\n}\n```\n\n</details>\n\n---\n\n### `generateDocumentV2`\n\nGenerates documents from templates with variables.\n\n`POST /v2/documents:generate`\n\n```ts\nconst { data } = await client.generateDocumentV2(\n {\n job_id: \'example\',\n mode: \'example\',\n preview_mode: \'example\',\n },\n {\n template_document: {\n filename: \'my-template-{{order.order_number}}.docx\',\n s3ref: {\n bucket: \'document-api-prod\',\n key: \'uploads/my-template.pdf\'\n }\n },\n context_entity_id: \'bcd0aab9-b544-42b0-8bfb-6d449d02eacc\',\n user_id: 100321,\n language: \'de\',\n variable_payload: {\n additionalProperties: \'string\'\n },\n context_data: {\n additionalProperties: \'string\'\n },\n template_settings: {\n custom_margins: {\n top: 2.54,\n bottom: 2.54\n },\n suggested_margins: {\n top: 2.54,\n bottom: 2.54\n },\n display_margin_guidelines: true,\n enable_data_table_margin_autofix: false,\n template_with_datatable: false,\n enabled_template_settings_persistence: false,\n misconfigured_margins: false,\n file_entity_id: \'1a2b3c4d-5e6f-7g8h-9i0j-1k2l3m4n5o6p\'\n }\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "job_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "job_status": "STARTED",\n "message": "string",\n "ics_output": {\n "output_document": {\n "s3ref": {\n "bucket": "document-api-preview-prod",\n "key": "preview/my-appointment.ics"\n }\n }\n },\n "pdf_output": {\n "preview_url": "https://document-api-prod.s3.eu-central-1.amazonaws.com/preview/my-template-OR-001.pdf",\n "output_document": {\n "s3ref": {\n "bucket": "document-api-preview-prod",\n "key": "preview/my-template.pdf"\n }\n }\n },\n "docx_output": {\n "preview_url": "https://document-api-prod.s3.eu-central-1.amazonaws.com/preview/my-template-OR-001.docx",\n "output_document": {\n "s3ref": {\n "bucket": "document-api-preview-prod",\n "key": "preview/my-template.docx"\n }\n }\n },\n "xlsx_output": {\n "preview_url": "https://document-api-prod.s3.eu-central-1.amazonaws.com/preview/my-template-OR-001.xlsx",\n "output_document": {\n "s3ref": {\n "bucket": "document-api-preview-prod",\n "key": "preview/my-template.xlsx"\n }\n }\n },\n "error_output": {\n "error_message": "string",\n "error_code": "PARSE_ERROR",\n "error_details": [\n {\n "explanation": "string",\n "context": {\n "invalid_variables": [\n {\n "variable": "string",\n "error": "string"\n }\n ]\n }\n }\n ]\n },\n "variable_payload": {\n "additionalProperties": "string"\n },\n "template_settings": {\n "custom_margins": {\n "top": 2.54,\n "bottom": 2.54\n },\n "suggested_margins": {\n "top": 2.54,\n "bottom": 2.54\n },\n "display_margin_guidelines": true,\n "enable_data_table_margin_autofix": false,\n "template_with_datatable": false,\n "enabled_template_settings_persistence": false,\n "misconfigured_margins": false,\n "file_entity_id": "1a2b3c4d-5e6f-7g8h-9i0j-1k2l3m4n5o6p"\n }\n}\n```\n\n</details>\n\n---\n\n### `convertDocument`\n\nConverts a document to a different format.\n\n`POST /v2/documents:convert`\n\n```ts\nconst { data } = await client.convertDocument(\n null,\n {\n language: \'de\',\n input_document: {\n s3ref: {\n bucket: \'document-api-prod\',\n key: \'uploads/my-template.pdf\'\n }\n },\n output_format: \'pdf\',\n output_filename: \'converted.pdf\'\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "output_document": {\n "preview_url": "https://document-api-prod.s3.eu-central-1.amazonaws.com/preview/converted.pdf",\n "s3ref": {\n "bucket": "document-api-prod",\n "key": "uploads/my-template.pdf"\n }\n }\n}\n```\n\n</details>\n\n---\n\n## Schemas\n\n### `S3Reference`\n\n```ts\ntype S3Reference = {\n bucket: string\n key: string\n}\n```\n\n### `ErrorOutput`\n\n```ts\ntype ErrorOutput = {\n error_message?: string\n error_code?: "PARSE_ERROR" | "DOC_TO_PDF_CONVERT_ERROR" | "INTERNAL_ERROR" | "INVALID_TEMPLATE_FORMAT"\n error_details?: Array<{\n explanation?: string\n context?: {\n invalid_variables?: { ... }\n }\n }> | Array<{\n items?: {\n name?: { ... }\n message?: { ... }\n stack?: { ... }\n cause?: { ... }\n }\n }> | Array<{\n id?: string\n context?: string\n explanation?: string\n }>\n}\n```\n\n### `InvalidCustomVariableErrorDetails`\n\nError details for invalid custom variables. This error will appear under \'PARSE_ERROR\' error code.\n\n```ts\ntype InvalidCustomVariableErrorDetails = Array<{\n explanation?: string\n context?: {\n invalid_variables?: Array<{\n variable?: { ... }\n error?: { ... }\n }>\n }\n}>\n```\n\n### `InvalidCustomVariableErrorDetail`\n\n```ts\ntype InvalidCustomVariableErrorDetail = {\n explanation?: string\n context?: {\n invalid_variables?: Array<{\n variable?: { ... }\n error?: { ... }\n }>\n }\n}\n```\n\n### `InternalErrorDetails`\n\nError details for internal error. This error will appear under \'INTERNAL_ERROR\' error code.\n\n```ts\ntype InternalErrorDetails = Array<{\n items?: {\n name?: string\n message?: string\n stack?: string\n cause?: string\n }\n}>\n```\n\n### `InternalErrorDetail`\n\nInternal error detail\n\n```ts\ntype InternalErrorDetail = {\n name?: string\n message?: string\n stack?: string\n cause?: string\n}\n```\n\n### `DocxTemplaterErrorDetails`\n\nError details for DocxTemplater error. This error will appear under \'PARSE_ERROR\' error code.\nSee https://docxtemplater.com/docs/errors/#error-schema for more details.\n\n\n```ts\ntype DocxTemplaterErrorDetails = Array<{\n id?: string\n context?: string\n explanation?: string\n}>\n```\n\n### `DocxTemplaterErrorDetail`\n\nDocxTemplater error detail\n\n```ts\ntype DocxTemplaterErrorDetail = {\n id?: string\n context?: string\n explanation?: string\n}\n```\n\n### `ErrorCode`\n\nError codes for document generation:\n- PARSE_ERROR - Error while parsing the document. Normally related with a bad template using the wrong DocxTemplater syntax.\n- DOC_TO_PDF_CONVERT_ERROR - Error while converting the document to PDF. Normally related with a ConvertAPI failure.\n- INTERNAL_ERROR - In\n\n```ts\ntype ErrorCode = "PARSE_ERROR" | "DOC_TO_PDF_CONVERT_ERROR" | "INTERNAL_ERROR" | "INVALID_TEMPLATE_FORMAT"\n```\n\n### `TemplateSettings`\n\nTemplate Settings for document generation\n\n```ts\ntype TemplateSettings = {\n custom_margins?: {\n top?: number\n bottom?: number\n }\n suggested_margins?: {\n top?: number\n bottom?: number\n }\n display_margin_guidelines?: boolean\n enable_data_table_margin_autofix?: boolean\n template_with_datatable?: boolean\n enabled_template_settings_persistence?: boolean\n misconfigured_margins?: boolean\n file_entity_id?: string // uuid\n}\n```\n\n### `DocumentMetaRequest`\n\n```ts\ntype DocumentMetaRequest = {\n template_document?: {\n s3ref?: {\n bucket: { ... }\n key: { ... }\n }\n }\n}\n```\n\n### `DocumentMetaResponse`\n\n```ts\ntype DocumentMetaResponse = {\n page_margins?: {\n top?: number\n bottom?: number\n left?: number\n right?: number\n header?: number\n footer?: number\n }\n variables?: string[]\n}\n```\n\n### `DocumentGenerationV2Request`\n\n```ts\ntype DocumentGenerationV2Request = {\n template_document: {\n filename?: string\n s3ref?: {\n bucket: { ... }\n key: { ... }\n }\n }\n context_entity_id?: string // uuid\n user_id?: string\n language?: string\n variable_payload?: {\n additionalProperties?: string\n }\n context_data?: {\n additionalProperties?: string\n }\n template_settings?: {\n custom_margins?: {\n top?: { ... }\n bottom?: { ... }\n }\n suggested_margins?: {\n top?: { ... }\n bottom?: { ... }\n }\n display_margin_guidelines?: boolean\n enable_data_table_margin_autofix?: boolean\n template_with_datatable?: boolean\n enabled_template_settings_persistence?: boolean\n misconfigured_margins?: boolean\n file_entity_id?: string // uuid\n }\n}\n```\n\n### `DocumentGenerationV2Response`\n\n```ts\ntype DocumentGenerationV2Response = {\n job_id?: string // uuid\n job_status?: "STARTED" | "PROCESSING" | "SUCCESS" | "FAILED"\n message?: string\n ics_output?: {\n output_document?: {\n filename?: { ... }\n s3ref?: { ... }\n }\n }\n pdf_output?: {\n preview_url?: string\n output_document?: {\n filename?: { ... }\n s3ref?: { ... }\n }\n }\n docx_output?: {\n preview_url?: string\n output_document?: {\n filename?: { ... }\n s3ref?: { ... }\n }\n }\n xlsx_output?: {\n preview_url?: string\n output_document?: {\n filename?: { ... }\n s3ref?: { ... }\n }\n }\n error_output?: {\n error_message?: string\n error_code?: "PARSE_ERROR" | "DOC_TO_PDF_CONVERT_ERROR" | "INTERNAL_ERROR" | "INVALID_TEMPLATE_FORMAT"\n error_details?: Array<{\n explanation?: { ... }\n context?: { ... }\n }> | Array<{\n items?: { ... }\n }> | Array<{\n id?: { ... }\n context?: { ... }\n explanation?: { ... }\n }>\n }\n variable_payload?: {\n additionalProperties?: string\n }\n template_settings?: {\n custom_margins?: {\n top?: { ... }\n bottom?: { ... }\n }\n suggested_margins?: {\n top?: { ... }\n bottom?: { ... }\n }\n display_margin_guidelines?: boolean\n enable_data_table_margin_autofix?: boolean\n template_with_datatable?: boolean\n enabled_template_settings_persistence?: boolean\n misconfigured_margins?: boolean\n file_entity_id?: string // uuid\n }\n}\n```\n\n### `ConvertDocumentRequest`\n\n```ts\ntype ConvertDocumentRequest = {\n language?: string\n input_document: {\n s3ref: {\n bucket: { ... }\n key: { ... }\n }\n }\n output_format: "pdf"\n output_filename?: string\n}\n```\n\n### `ConvertDocumentResponse`\n\n```ts\ntype ConvertDocumentResponse = {\n output_document?: {\n preview_url?: string\n s3ref?: {\n bucket: { ... }\n key: { ... }\n }\n }\n}\n```\n';
|
|
5
|
-
export {
|
|
6
|
-
document_default as default
|
|
7
|
-
};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('./chunk-NJK5F5TF.cjs');
|
|
2
|
-
|
|
3
|
-
// src/docs/document.json
|
|
4
|
-
var document_default = '# Document API\n\n- **Base URL:** `https://document.sls.epilot.io`\n- **Full API Docs:** [https://docs.epilot.io/api/document](https://docs.epilot.io/api/document)\n\n## Usage\n\n```ts\nimport { epilot } from \'@epilot/sdk\'\n\nepilot.authorize(() => \'<token>\')\nconst { data } = await epilot.document.getTemplateMeta(...)\n```\n\n### Tree-shakeable import\n\n```ts\nimport { getClient, authorize } from \'@epilot/sdk/document\'\n\nconst documentClient = getClient()\nauthorize(documentClient, () => \'<token>\')\nconst { data } = await documentClient.getTemplateMeta(...)\n```\n\n## Operations\n\n**Documents**\n- [`getTemplateMeta`](#gettemplatemeta)\n- [`generateDocumentV2`](#generatedocumentv2)\n- [`convertDocument`](#convertdocument)\n\n**Schemas**\n- [`S3Reference`](#s3reference)\n- [`ErrorOutput`](#erroroutput)\n- [`InvalidCustomVariableErrorDetails`](#invalidcustomvariableerrordetails)\n- [`InvalidCustomVariableErrorDetail`](#invalidcustomvariableerrordetail)\n- [`InternalErrorDetails`](#internalerrordetails)\n- [`InternalErrorDetail`](#internalerrordetail)\n- [`DocxTemplaterErrorDetails`](#docxtemplatererrordetails)\n- [`DocxTemplaterErrorDetail`](#docxtemplatererrordetail)\n- [`ErrorCode`](#errorcode)\n- [`TemplateSettings`](#templatesettings)\n- [`DocumentMetaRequest`](#documentmetarequest)\n- [`DocumentMetaResponse`](#documentmetaresponse)\n- [`DocumentGenerationV2Request`](#documentgenerationv2request)\n- [`DocumentGenerationV2Response`](#documentgenerationv2response)\n- [`ConvertDocumentRequest`](#convertdocumentrequest)\n- [`ConvertDocumentResponse`](#convertdocumentresponse)\n\n### `getTemplateMeta`\n\nGet metadata for a document template\n\n`POST /v2/documents:meta`\n\n```ts\nconst { data } = await client.getTemplateMeta(\n null,\n {\n template_document: {\n s3ref: {\n bucket: \'document-api-prod\',\n key: \'uploads/my-template.pdf\'\n }\n }\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "page_margins": {\n "top": 2.54,\n "bottom": 2.54,\n "left": 2.54,\n "right": 2.54,\n "header": 2.54,\n "footer": 2.54\n },\n "variables": ["order.billing_contact.0.salutation", "order.billing_contact.0.title", "order_table", "stayHardStatic", "opportunity[attribute_name]", "opportunity[\\"attribute_name\\"]", "opportunity.[attribute_name]", "attribute_name", "opportunities.0.attribute_name", "opportunities[0].attribute_name", "contact.opportunities[0].attribute_name", "opportunities[Primary].attribute_name"]\n}\n```\n\n</details>\n\n---\n\n### `generateDocumentV2`\n\nGenerates documents from templates with variables.\n\n`POST /v2/documents:generate`\n\n```ts\nconst { data } = await client.generateDocumentV2(\n {\n job_id: \'example\',\n mode: \'example\',\n preview_mode: \'example\',\n },\n {\n template_document: {\n filename: \'my-template-{{order.order_number}}.docx\',\n s3ref: {\n bucket: \'document-api-prod\',\n key: \'uploads/my-template.pdf\'\n }\n },\n context_entity_id: \'bcd0aab9-b544-42b0-8bfb-6d449d02eacc\',\n user_id: 100321,\n language: \'de\',\n variable_payload: {\n additionalProperties: \'string\'\n },\n context_data: {\n additionalProperties: \'string\'\n },\n template_settings: {\n custom_margins: {\n top: 2.54,\n bottom: 2.54\n },\n suggested_margins: {\n top: 2.54,\n bottom: 2.54\n },\n display_margin_guidelines: true,\n enable_data_table_margin_autofix: false,\n template_with_datatable: false,\n enabled_template_settings_persistence: false,\n misconfigured_margins: false,\n file_entity_id: \'1a2b3c4d-5e6f-7g8h-9i0j-1k2l3m4n5o6p\'\n }\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "job_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "job_status": "STARTED",\n "message": "string",\n "ics_output": {\n "output_document": {\n "s3ref": {\n "bucket": "document-api-preview-prod",\n "key": "preview/my-appointment.ics"\n }\n }\n },\n "pdf_output": {\n "preview_url": "https://document-api-prod.s3.eu-central-1.amazonaws.com/preview/my-template-OR-001.pdf",\n "output_document": {\n "s3ref": {\n "bucket": "document-api-preview-prod",\n "key": "preview/my-template.pdf"\n }\n }\n },\n "docx_output": {\n "preview_url": "https://document-api-prod.s3.eu-central-1.amazonaws.com/preview/my-template-OR-001.docx",\n "output_document": {\n "s3ref": {\n "bucket": "document-api-preview-prod",\n "key": "preview/my-template.docx"\n }\n }\n },\n "xlsx_output": {\n "preview_url": "https://document-api-prod.s3.eu-central-1.amazonaws.com/preview/my-template-OR-001.xlsx",\n "output_document": {\n "s3ref": {\n "bucket": "document-api-preview-prod",\n "key": "preview/my-template.xlsx"\n }\n }\n },\n "error_output": {\n "error_message": "string",\n "error_code": "PARSE_ERROR",\n "error_details": [\n {\n "explanation": "string",\n "context": {\n "invalid_variables": [\n {\n "variable": "string",\n "error": "string"\n }\n ]\n }\n }\n ]\n },\n "variable_payload": {\n "additionalProperties": "string"\n },\n "template_settings": {\n "custom_margins": {\n "top": 2.54,\n "bottom": 2.54\n },\n "suggested_margins": {\n "top": 2.54,\n "bottom": 2.54\n },\n "display_margin_guidelines": true,\n "enable_data_table_margin_autofix": false,\n "template_with_datatable": false,\n "enabled_template_settings_persistence": false,\n "misconfigured_margins": false,\n "file_entity_id": "1a2b3c4d-5e6f-7g8h-9i0j-1k2l3m4n5o6p"\n }\n}\n```\n\n</details>\n\n---\n\n### `convertDocument`\n\nConverts a document to a different format.\n\n`POST /v2/documents:convert`\n\n```ts\nconst { data } = await client.convertDocument(\n null,\n {\n language: \'de\',\n input_document: {\n s3ref: {\n bucket: \'document-api-prod\',\n key: \'uploads/my-template.pdf\'\n }\n },\n output_format: \'pdf\',\n output_filename: \'converted.pdf\'\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "output_document": {\n "preview_url": "https://document-api-prod.s3.eu-central-1.amazonaws.com/preview/converted.pdf",\n "s3ref": {\n "bucket": "document-api-prod",\n "key": "uploads/my-template.pdf"\n }\n }\n}\n```\n\n</details>\n\n---\n\n## Schemas\n\n### `S3Reference`\n\n```ts\ntype S3Reference = {\n bucket: string\n key: string\n}\n```\n\n### `ErrorOutput`\n\n```ts\ntype ErrorOutput = {\n error_message?: string\n error_code?: "PARSE_ERROR" | "DOC_TO_PDF_CONVERT_ERROR" | "INTERNAL_ERROR" | "INVALID_TEMPLATE_FORMAT"\n error_details?: Array<{\n explanation?: string\n context?: {\n invalid_variables?: { ... }\n }\n }> | Array<{\n items?: {\n name?: { ... }\n message?: { ... }\n stack?: { ... }\n cause?: { ... }\n }\n }> | Array<{\n id?: string\n context?: string\n explanation?: string\n }>\n}\n```\n\n### `InvalidCustomVariableErrorDetails`\n\nError details for invalid custom variables. This error will appear under \'PARSE_ERROR\' error code.\n\n```ts\ntype InvalidCustomVariableErrorDetails = Array<{\n explanation?: string\n context?: {\n invalid_variables?: Array<{\n variable?: { ... }\n error?: { ... }\n }>\n }\n}>\n```\n\n### `InvalidCustomVariableErrorDetail`\n\n```ts\ntype InvalidCustomVariableErrorDetail = {\n explanation?: string\n context?: {\n invalid_variables?: Array<{\n variable?: { ... }\n error?: { ... }\n }>\n }\n}\n```\n\n### `InternalErrorDetails`\n\nError details for internal error. This error will appear under \'INTERNAL_ERROR\' error code.\n\n```ts\ntype InternalErrorDetails = Array<{\n items?: {\n name?: string\n message?: string\n stack?: string\n cause?: string\n }\n}>\n```\n\n### `InternalErrorDetail`\n\nInternal error detail\n\n```ts\ntype InternalErrorDetail = {\n name?: string\n message?: string\n stack?: string\n cause?: string\n}\n```\n\n### `DocxTemplaterErrorDetails`\n\nError details for DocxTemplater error. This error will appear under \'PARSE_ERROR\' error code.\nSee https://docxtemplater.com/docs/errors/#error-schema for more details.\n\n\n```ts\ntype DocxTemplaterErrorDetails = Array<{\n id?: string\n context?: string\n explanation?: string\n}>\n```\n\n### `DocxTemplaterErrorDetail`\n\nDocxTemplater error detail\n\n```ts\ntype DocxTemplaterErrorDetail = {\n id?: string\n context?: string\n explanation?: string\n}\n```\n\n### `ErrorCode`\n\nError codes for document generation:\n- PARSE_ERROR - Error while parsing the document. Normally related with a bad template using the wrong DocxTemplater syntax.\n- DOC_TO_PDF_CONVERT_ERROR - Error while converting the document to PDF. Normally related with a ConvertAPI failure.\n- INTERNAL_ERROR - In\n\n```ts\ntype ErrorCode = "PARSE_ERROR" | "DOC_TO_PDF_CONVERT_ERROR" | "INTERNAL_ERROR" | "INVALID_TEMPLATE_FORMAT"\n```\n\n### `TemplateSettings`\n\nTemplate Settings for document generation\n\n```ts\ntype TemplateSettings = {\n custom_margins?: {\n top?: number\n bottom?: number\n }\n suggested_margins?: {\n top?: number\n bottom?: number\n }\n display_margin_guidelines?: boolean\n enable_data_table_margin_autofix?: boolean\n template_with_datatable?: boolean\n enabled_template_settings_persistence?: boolean\n misconfigured_margins?: boolean\n file_entity_id?: string // uuid\n}\n```\n\n### `DocumentMetaRequest`\n\n```ts\ntype DocumentMetaRequest = {\n template_document?: {\n s3ref?: {\n bucket: { ... }\n key: { ... }\n }\n }\n}\n```\n\n### `DocumentMetaResponse`\n\n```ts\ntype DocumentMetaResponse = {\n page_margins?: {\n top?: number\n bottom?: number\n left?: number\n right?: number\n header?: number\n footer?: number\n }\n variables?: string[]\n}\n```\n\n### `DocumentGenerationV2Request`\n\n```ts\ntype DocumentGenerationV2Request = {\n template_document: {\n filename?: string\n s3ref?: {\n bucket: { ... }\n key: { ... }\n }\n }\n context_entity_id?: string // uuid\n user_id?: string\n language?: string\n variable_payload?: {\n additionalProperties?: string\n }\n context_data?: {\n additionalProperties?: string\n }\n template_settings?: {\n custom_margins?: {\n top?: { ... }\n bottom?: { ... }\n }\n suggested_margins?: {\n top?: { ... }\n bottom?: { ... }\n }\n display_margin_guidelines?: boolean\n enable_data_table_margin_autofix?: boolean\n template_with_datatable?: boolean\n enabled_template_settings_persistence?: boolean\n misconfigured_margins?: boolean\n file_entity_id?: string // uuid\n }\n}\n```\n\n### `DocumentGenerationV2Response`\n\n```ts\ntype DocumentGenerationV2Response = {\n job_id?: string // uuid\n job_status?: "STARTED" | "PROCESSING" | "SUCCESS" | "FAILED"\n message?: string\n ics_output?: {\n output_document?: {\n filename?: { ... }\n s3ref?: { ... }\n }\n }\n pdf_output?: {\n preview_url?: string\n output_document?: {\n filename?: { ... }\n s3ref?: { ... }\n }\n }\n docx_output?: {\n preview_url?: string\n output_document?: {\n filename?: { ... }\n s3ref?: { ... }\n }\n }\n xlsx_output?: {\n preview_url?: string\n output_document?: {\n filename?: { ... }\n s3ref?: { ... }\n }\n }\n error_output?: {\n error_message?: string\n error_code?: "PARSE_ERROR" | "DOC_TO_PDF_CONVERT_ERROR" | "INTERNAL_ERROR" | "INVALID_TEMPLATE_FORMAT"\n error_details?: Array<{\n explanation?: { ... }\n context?: { ... }\n }> | Array<{\n items?: { ... }\n }> | Array<{\n id?: { ... }\n context?: { ... }\n explanation?: { ... }\n }>\n }\n variable_payload?: {\n additionalProperties?: string\n }\n template_settings?: {\n custom_margins?: {\n top?: { ... }\n bottom?: { ... }\n }\n suggested_margins?: {\n top?: { ... }\n bottom?: { ... }\n }\n display_margin_guidelines?: boolean\n enable_data_table_margin_autofix?: boolean\n template_with_datatable?: boolean\n enabled_template_settings_persistence?: boolean\n misconfigured_margins?: boolean\n file_entity_id?: string // uuid\n }\n}\n```\n\n### `ConvertDocumentRequest`\n\n```ts\ntype ConvertDocumentRequest = {\n language?: string\n input_document: {\n s3ref: {\n bucket: { ... }\n key: { ... }\n }\n }\n output_format: "pdf"\n output_filename?: string\n}\n```\n\n### `ConvertDocumentResponse`\n\n```ts\ntype ConvertDocumentResponse = {\n output_document?: {\n preview_url?: string\n s3ref?: {\n bucket: { ... }\n key: { ... }\n }\n }\n}\n```\n';
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
exports.default = document_default;
|