@bisondesk/commons-sdk 1.0.673 → 1.0.675
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/lib/messages.d.ts +4 -2
- package/lib/messages.d.ts.map +1 -1
- package/lib/messages.js +5 -1
- package/lib/messages.js.map +1 -1
- package/lib/notifications-whatsapp.d.ts +23 -0
- package/lib/notifications-whatsapp.d.ts.map +1 -1
- package/lib/notifications-whatsapp.js +11 -0
- package/lib/notifications-whatsapp.js.map +1 -1
- package/lib/ses.d.ts +1 -1
- package/lib/ses.d.ts.map +1 -1
- package/lib/ses.js.map +1 -1
- package/lib/types.d.ts +0 -1
- package/lib/types.d.ts.map +1 -1
- package/lib/types.js.map +1 -1
- package/package.json +1 -1
- package/src/messages.ts +13 -2
- package/src/notifications-whatsapp.ts +29 -0
- package/src/ses.ts +6 -1
- package/src/types.ts +0 -1
- package/tsconfig.tsbuildinfo +1 -1
package/lib/messages.d.ts
CHANGED
|
@@ -29,6 +29,10 @@ export type EmailMessageEvent = {
|
|
|
29
29
|
tenantId: string;
|
|
30
30
|
message: EmailMessage;
|
|
31
31
|
};
|
|
32
|
+
export declare enum EmailConfigurationSet {
|
|
33
|
+
Transactional = "bisondesk-transactional-config",
|
|
34
|
+
Marketing = "bisondesk-marketing-config"
|
|
35
|
+
}
|
|
32
36
|
export type TemplatedEmailRequest<T extends Record<string, unknown> = Record<string, unknown>> = {
|
|
33
37
|
data: T;
|
|
34
38
|
destinations: EmailDestination[];
|
|
@@ -38,7 +42,6 @@ export type TemplatedEmailRequest<T extends Record<string, unknown> = Record<str
|
|
|
38
42
|
template: string;
|
|
39
43
|
attachments?: AttachmentValue[];
|
|
40
44
|
headers?: Record<string, string>;
|
|
41
|
-
configurationSet?: string;
|
|
42
45
|
};
|
|
43
46
|
export type EmailRequest = {
|
|
44
47
|
references?: string[] | string;
|
|
@@ -49,7 +52,6 @@ export type EmailRequest = {
|
|
|
49
52
|
subject: string;
|
|
50
53
|
attachments?: AttachmentValue[];
|
|
51
54
|
headers?: Record<string, string>;
|
|
52
|
-
configurationSet?: string;
|
|
53
55
|
body: {
|
|
54
56
|
text?: string;
|
|
55
57
|
html: string;
|
package/lib/messages.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messages.d.ts","sourceRoot":"/","sources":["messages.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAE7C,MAAM,MAAM,YAAY,GAAG;IACzB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG,YAAY,GAAG;IAC5C,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,IAAI,GAAG,IAAI,GAAG,KAAK,CAAC;CAClC,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE;QACJ,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,IAAI,CAAC,EAAE,MAAM,CAAC;KACf,CAAC;CACH,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,eAAe,CAAC;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,YAAY,CAAC;IACrB,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB,YAAY,EAAE,gBAAgB,EAAE,CAAC;CAClC,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,YAAY,CAAC;CACvB,CAAC;
|
|
1
|
+
{"version":3,"file":"messages.d.ts","sourceRoot":"/","sources":["messages.ts"],"names":[],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B,MAAM,EAAE,YAAY,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,eAAe,EAAE,CAAC;IAChC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAClC,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG;IACzB,UAAU,CAAC,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC;IAE/B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,gBAAgB,EAAE,CAAC;IACjC,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB,MAAM,EAAE,YAAY,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,eAAe,EAAE,CAAC;IAChC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC,IAAI,EACA;QACE,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,IAAI,EAAE,MAAM,CAAC;KACd,GACD;QACE,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,IAAI,EAAE,MAAM,CAAC;KACd,CAAC;CACP,CAAC"}
|
package/lib/messages.js
CHANGED
|
@@ -1,2 +1,6 @@
|
|
|
1
|
-
export
|
|
1
|
+
export var EmailConfigurationSet;
|
|
2
|
+
(function (EmailConfigurationSet) {
|
|
3
|
+
EmailConfigurationSet["Transactional"] = "bisondesk-transactional-config";
|
|
4
|
+
EmailConfigurationSet["Marketing"] = "bisondesk-marketing-config";
|
|
5
|
+
})(EmailConfigurationSet || (EmailConfigurationSet = {}));
|
|
2
6
|
//# sourceMappingURL=messages.js.map
|
package/lib/messages.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messages.js","sourceRoot":"/","sources":["messages.ts"],"names":[],"mappings":"","sourcesContent":["import { AttachmentValue } from './types.js';\n\nexport type EmailAddress = {\n name?: string;\n email: string;\n};\n\nexport type EmailDestination = EmailAddress & {\n organizationId?: string;\n contactId?: string;\n addressType: 'TO' | 'CC' | 'BCC';\n};\n\nexport type EmailContent = {\n subject: string;\n body: {\n text?: string;\n html?: string;\n };\n};\n\nexport type EmailMessage = {\n id: string;\n sentAt: string;\n sentBy: string;\n content?: AttachmentValue;\n subject: string;\n source: EmailAddress;\n replyTo?: EmailAddress;\n destinations: EmailDestination[];\n};\n\nexport type EmailMessageEvent = {\n tenantId: string;\n message: EmailMessage;\n};\n\nexport type TemplatedEmailRequest<T extends Record<string, unknown> = Record<string, unknown>> = {\n data: T;\n destinations: EmailDestination[];\n replyTo?: EmailAddress;\n source: EmailAddress;\n subject: string;\n template: string;\n attachments?: AttachmentValue[];\n headers?: Record<string, string>;\n
|
|
1
|
+
{"version":3,"file":"messages.js","sourceRoot":"/","sources":["messages.ts"],"names":[],"mappings":"AA2CA,MAAM,CAAN,IAAY,qBAKX;AALD,WAAY,qBAAqB;IAE/B,yEAAgD,CAAA;IAEhD,iEAAwC,CAAA;AAC1C,CAAC,EALW,qBAAqB,KAArB,qBAAqB,QAKhC","sourcesContent":["import { AttachmentValue } from './types.js';\n\nexport type EmailAddress = {\n name?: string;\n email: string;\n};\n\nexport type EmailDestination = EmailAddress & {\n organizationId?: string;\n contactId?: string;\n addressType: 'TO' | 'CC' | 'BCC';\n};\n\nexport type EmailContent = {\n subject: string;\n body: {\n text?: string;\n html?: string;\n };\n};\n\nexport type EmailMessage = {\n id: string;\n sentAt: string;\n sentBy: string;\n content?: AttachmentValue;\n subject: string;\n source: EmailAddress;\n replyTo?: EmailAddress;\n destinations: EmailDestination[];\n};\n\nexport type EmailMessageEvent = {\n tenantId: string;\n message: EmailMessage;\n};\n\n/**\n * The SES configuration set an email is sent with. Every send passes one to the send functions\n * in `@bisondesk/commons/emails/send`, so no email falls back to its sending domain's default.\n * The sets' settings live in `templates/infra.yaml` (transactional) and\n * `templates/services/core.yaml` (marketing).\n */\nexport enum EmailConfigurationSet {\n /** Invoices, shares and notifications. Never checked by SES Auto Validation. */\n Transactional = 'bisondesk-transactional-config',\n /** Email campaigns. SES Auto Validation may drop recipients before sending. */\n Marketing = 'bisondesk-marketing-config',\n}\n\nexport type TemplatedEmailRequest<T extends Record<string, unknown> = Record<string, unknown>> = {\n data: T;\n destinations: EmailDestination[];\n replyTo?: EmailAddress;\n source: EmailAddress;\n subject: string;\n template: string;\n attachments?: AttachmentValue[];\n headers?: Record<string, string>;\n};\n\nexport type EmailRequest = {\n references?: string[] | string;\n /* messageId of the email to reply to */\n inReplyTo?: string;\n destinations: EmailDestination[];\n replyTo?: EmailAddress;\n source: EmailAddress;\n subject: string;\n attachments?: AttachmentValue[];\n headers?: Record<string, string>;\n body:\n | {\n text?: string;\n html: string;\n }\n | {\n html?: string;\n text: string;\n };\n};\n"]}
|
|
@@ -70,6 +70,28 @@ export type WhatsappNotificationMessage = {
|
|
|
70
70
|
param: string;
|
|
71
71
|
};
|
|
72
72
|
};
|
|
73
|
+
export declare enum WhatsappDeliveryStatus {
|
|
74
|
+
DELIVERED = "DELIVERED",
|
|
75
|
+
FAILED = "FAILED",
|
|
76
|
+
SUPPRESSED = "SUPPRESSED"
|
|
77
|
+
}
|
|
78
|
+
export declare enum WhatsappSuppressionReason {
|
|
79
|
+
NOT_ON_WHATSAPP = "NOT_ON_WHATSAPP",
|
|
80
|
+
DUPLICATE = "DUPLICATE"
|
|
81
|
+
}
|
|
82
|
+
export type WhatsappDeliveryEvent = {
|
|
83
|
+
tenantId: string;
|
|
84
|
+
requestId?: string;
|
|
85
|
+
dedupId: string;
|
|
86
|
+
templateId: string;
|
|
87
|
+
phone: string;
|
|
88
|
+
status: WhatsappDeliveryStatus;
|
|
89
|
+
reason?: string;
|
|
90
|
+
errorMessage?: string;
|
|
91
|
+
notWhatsappUser?: boolean;
|
|
92
|
+
suppressionReason?: WhatsappSuppressionReason;
|
|
93
|
+
occurredAt: string;
|
|
94
|
+
};
|
|
73
95
|
export declare const WHATSAPP_NOTIFICATION_SETTINGS_ID = "whatsapp-notification";
|
|
74
96
|
export type WhatsappNotificationSettings = {
|
|
75
97
|
whatsappPlugin: {
|
|
@@ -82,5 +104,6 @@ export type WhatsappNotificationSettings = {
|
|
|
82
104
|
};
|
|
83
105
|
websiteId: string;
|
|
84
106
|
originNumber: string;
|
|
107
|
+
notificationsOrgAllowlist?: string[];
|
|
85
108
|
};
|
|
86
109
|
//# sourceMappingURL=notifications-whatsapp.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notifications-whatsapp.d.ts","sourceRoot":"/","sources":["notifications-whatsapp.ts"],"names":[],"mappings":"AAAA,oBAAY,oBAAoB;IAC9B,QAAQ,aAAa;IACrB,KAAK,UAAU;IACf,KAAK,UAAU;IACf,IAAI,SAAS;CACd;AAED,eAAO,MAAM,mCAAmC,mBAAmB,CAAC;AACpE,eAAO,MAAM,kCAAkC,uBAAuB,CAAC;AAEvE,MAAM,MAAM,gCAAgC,GAAG;IAC7C,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,KAAK,CAAC;QACd,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,GAAG,CAAC,EAAE,MAAM,CAAC;KACd,CAAC,CAAC;CACJ,CAAC;AAEF,MAAM,MAAM,2BAA2B,GAAG;IACxC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,gCAAgC,EAAE,CAAC;IAC/C,IAAI,EAAE,MAAM,CAAC;IAEb,aAAa,EAAE,MAAM,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,OAAO,CAA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BAAyB,CAAC,EAAE,MAAM,EAAE,CAAC;CACtC,CAAC"}
|
|
@@ -22,5 +22,16 @@ export const hasWhatsappTemplateMediaHeader = (components) => components.some((c
|
|
|
22
22
|
export const fillWhatsappTemplateText = (text, variables) => variables.length === 0
|
|
23
23
|
? text
|
|
24
24
|
: text.replace(VARIABLE_PATTERN, (placeholder, index) => variables[Number(index) - 1] ?? placeholder);
|
|
25
|
+
export var WhatsappDeliveryStatus;
|
|
26
|
+
(function (WhatsappDeliveryStatus) {
|
|
27
|
+
WhatsappDeliveryStatus["DELIVERED"] = "DELIVERED";
|
|
28
|
+
WhatsappDeliveryStatus["FAILED"] = "FAILED";
|
|
29
|
+
WhatsappDeliveryStatus["SUPPRESSED"] = "SUPPRESSED";
|
|
30
|
+
})(WhatsappDeliveryStatus || (WhatsappDeliveryStatus = {}));
|
|
31
|
+
export var WhatsappSuppressionReason;
|
|
32
|
+
(function (WhatsappSuppressionReason) {
|
|
33
|
+
WhatsappSuppressionReason["NOT_ON_WHATSAPP"] = "NOT_ON_WHATSAPP";
|
|
34
|
+
WhatsappSuppressionReason["DUPLICATE"] = "DUPLICATE";
|
|
35
|
+
})(WhatsappSuppressionReason || (WhatsappSuppressionReason = {}));
|
|
25
36
|
export const WHATSAPP_NOTIFICATION_SETTINGS_ID = 'whatsapp-notification';
|
|
26
37
|
//# sourceMappingURL=notifications-whatsapp.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notifications-whatsapp.js","sourceRoot":"/","sources":["notifications-whatsapp.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,oBAKX;AALD,WAAY,oBAAoB;IAC9B,6CAAqB,CAAA;IACrB,uCAAe,CAAA;IACf,uCAAe,CAAA;IACf,qCAAa,CAAA;AACf,CAAC,EALW,oBAAoB,KAApB,oBAAoB,QAK/B;AAED,MAAM,CAAC,MAAM,mCAAmC,GAAG,gBAAgB,CAAC;AACpE,MAAM,CAAC,MAAM,kCAAkC,GAAG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,EAAE,SAAmB,EAAU,EAAE,CACpF,SAAS,CAAC,MAAM,KAAK,CAAC;IACpB,CAAC,CAAC,IAAI;IACN,CAAC,CAAC,IAAI,CAAC,OAAO,CACV,gBAAgB,EAChB,CAAC,WAAW,EAAE,KAAK,EAAE,EAAE,CAAC,SAAS,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,WAAW,CACpE,CAAC;AA6CR,MAAM,CAAC,MAAM,iCAAiC,GAAG,uBAAuB,CAAC","sourcesContent":["export enum WhatsappTemplateType {\n DOCUMENT = 'DOCUMENT',\n IMAGE = 'IMAGE',\n VIDEO = 'VIDEO',\n TEXT = 'TEXT',\n}\n\nexport const WHATSAPP_DOCUMENT_SHARE_TEMPLATE_ID = 'share_document';\nexport const WHATSAPP_VEHICLE_SHARE_TEMPLATE_ID = 'vehicle_suggestion';\n\nexport type WhatsappTemplateContentComponent = {\n type: string;\n text?: string;\n format?: string;\n buttons?: Array<{\n type?: string;\n text?: string;\n url?: string;\n }>;\n};\n\nexport type WhatsappTemplateTranslation = {\n id: string;\n name: string;\n language: string;\n status: string;\n category?: string;\n components: WhatsappTemplateContentComponent[];\n text: string;\n /** How many positional parameters Meta expects; 0 means the template can be sent as-is. */\n variableCount: number;\n syncedAt: string;\n deleted?: boolean;\n};\n\nexport const renderWhatsappTemplateText = (\n components: WhatsappTemplateContentComponent[],\n): string =>\n components\n .flatMap((component) => [component.text, ...(component.buttons ?? []).map((b) => b.text)])\n .filter((text): text is string => text != null)\n .join('\\n\\n');\n\n/** Meta's positional placeholders, e.g. the `{{2}}` in \"Hi {{1}}, your {{2}} is ready\". */\nconst VARIABLE_PATTERN = /\\{\\{\\s*(\\d+)\\s*\\}\\}/g;\n\n/**\n * How many parameters a send must supply. Meta numbers them from 1 and rejects a message whose\n * parameter count doesn't match, so the highest index is what matters — not how many distinct\n * placeholders the text happens to contain.\n */\nexport const countWhatsappTemplateVariables = (\n components: WhatsappTemplateContentComponent[],\n): number => {\n const indexes = components.flatMap((component) =>\n [...(component.text ?? '').matchAll(VARIABLE_PATTERN)].map(([, index]) => Number(index)),\n );\n\n return Math.max(0, ...indexes);\n};\n\n/**\n * Whether the template opens with a document, image or video. Such a template can only be sent\n * with that media supplied, which is why they belong to the flows that have one to attach.\n */\nexport const hasWhatsappTemplateMediaHeader = (\n components: WhatsappTemplateContentComponent[],\n): boolean =>\n components.some(\n (component) =>\n component.type.toUpperCase() === 'HEADER' &&\n component.format != null &&\n component.format.toUpperCase() !== WhatsappTemplateType.TEXT,\n );\n\n/** Substitutes the positional parameters back into the template's text, in Meta's 1-based order. */\nexport const fillWhatsappTemplateText = (text: string, variables: string[]): string =>\n variables.length === 0\n ? text\n : text.replace(\n VARIABLE_PATTERN,\n (placeholder, index) => variables[Number(index) - 1] ?? placeholder,\n );\n\nexport type WhatsappNotificationEvent = {\n tenantId: string;\n userId: string;\n message: WhatsappNotificationMessage;\n};\n\nexport type TextHeader = {\n format: WhatsappTemplateType.TEXT;\n param: string;\n};\n\nexport type MediaHeader = {\n format: WhatsappTemplateType.IMAGE | WhatsappTemplateType.VIDEO;\n link: string;\n};\n\nexport type DocumentHeader = {\n format: WhatsappTemplateType.DOCUMENT;\n filename: string;\n link: string;\n};\n\nexport type WhatsappNotificationMessage = {\n templateId: string;\n language?: string;\n dedupId: string;\n destination: {\n organizationId?: string;\n contactId?: string;\n phone: string;\n name?: string;\n };\n body?: {\n text?: string; // template text, useful for Crisp to show the message that was sent to our salespeople\n params: string[];\n };\n header?: DocumentHeader | MediaHeader | TextHeader;\n dynamicUrl?: {\n buttonIndex: number;\n param: string;\n };\n};\n\nexport const WHATSAPP_NOTIFICATION_SETTINGS_ID = 'whatsapp-notification';\n\nexport type WhatsappNotificationSettings = {\n whatsappPlugin: { identifier: string; key: string };\n bisondeskPlugin: { identifier: string; key: string };\n websiteId: string;\n originNumber: string;\n};\n"]}
|
|
1
|
+
{"version":3,"file":"notifications-whatsapp.js","sourceRoot":"/","sources":["notifications-whats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C,EAAE,CACX,UAAU,CAAC,IAAI,CACb,CAAC,SAAS,EAAE,EAAE,CACZ,SAAS,CAAC,IAAI,CAAC,WAAW,EAAE,KAAK,QAAQ;IACzC,SAAS,CAAC,MAAM,IAAI,IAAI;IACxB,SAAS,CAAC,MAAM,CAAC,WAAW,EAAE,KAAK,oBAAoB,CAAC,IAAI,CAC/D,CAAC;AAGJ,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,IAAY,EAAE,SAAmB,EAAU,EAAE,CACpF,SAAS,CAAC,MAAM,KAAK,CAAC;IACpB,CAAC,CAAC,IAAI;IACN,CAAC,CAAC,IAAI,CAAC,OAAO,CACV,gBAAgB,EAChB,CAAC,WAAW,EAAE,KAAK,EAAE,EAAE,CAAC,SAAS,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,WAAW,CACpE,CAAC;AA6CR,MAAM,CAAN,IAAY,sBAIX;AAJD,WAAY,sBAAsB;IAChC,iDAAuB,CAAA;IACvB,2CAAiB,CAAA;IACjB,mDAAyB,CAAA;AAC3B,CAAC,EAJW,sBAAsB,KAAtB,sBAAsB,QAIjC;AAED,MAAM,CAAN,IAAY,yBAGX;AAHD,WAAY,yBAAyB;IACnC,gEAAmC,CAAA;IACnC,oDAAuB,CAAA;AACzB,CAAC,EAHW,yBAAyB,KAAzB,yBAAyB,QAGpC;AAiBD,MAAM,CAAC,MAAM,iCAAiC,GAAG,uBAAuB,CAAC","sourcesContent":["export enum WhatsappTemplateType {\n DOCUMENT = 'DOCUMENT',\n IMAGE = 'IMAGE',\n VIDEO = 'VIDEO',\n TEXT = 'TEXT',\n}\n\nexport const WHATSAPP_DOCUMENT_SHARE_TEMPLATE_ID = 'share_document';\nexport const WHATSAPP_VEHICLE_SHARE_TEMPLATE_ID = 'vehicle_suggestion';\n\nexport type WhatsappTemplateContentComponent = {\n type: string;\n text?: string;\n format?: string;\n buttons?: Array<{\n type?: string;\n text?: string;\n url?: string;\n }>;\n};\n\nexport type WhatsappTemplateTranslation = {\n id: string;\n name: string;\n language: string;\n status: string;\n category?: string;\n components: WhatsappTemplateContentComponent[];\n text: string;\n /** How many positional parameters Meta expects; 0 means the template can be sent as-is. */\n variableCount: number;\n syncedAt: string;\n deleted?: boolean;\n};\n\nexport const renderWhatsappTemplateText = (\n components: WhatsappTemplateContentComponent[],\n): string =>\n components\n .flatMap((component) => [component.text, ...(component.buttons ?? []).map((b) => b.text)])\n .filter((text): text is string => text != null)\n .join('\\n\\n');\n\n/** Meta's positional placeholders, e.g. the `{{2}}` in \"Hi {{1}}, your {{2}} is ready\". */\nconst VARIABLE_PATTERN = /\\{\\{\\s*(\\d+)\\s*\\}\\}/g;\n\n/**\n * How many parameters a send must supply. Meta numbers them from 1 and rejects a message whose\n * parameter count doesn't match, so the highest index is what matters — not how many distinct\n * placeholders the text happens to contain.\n */\nexport const countWhatsappTemplateVariables = (\n components: WhatsappTemplateContentComponent[],\n): number => {\n const indexes = components.flatMap((component) =>\n [...(component.text ?? '').matchAll(VARIABLE_PATTERN)].map(([, index]) => Number(index)),\n );\n\n return Math.max(0, ...indexes);\n};\n\n/**\n * Whether the template opens with a document, image or video. Such a template can only be sent\n * with that media supplied, which is why they belong to the flows that have one to attach.\n */\nexport const hasWhatsappTemplateMediaHeader = (\n components: WhatsappTemplateContentComponent[],\n): boolean =>\n components.some(\n (component) =>\n component.type.toUpperCase() === 'HEADER' &&\n component.format != null &&\n component.format.toUpperCase() !== WhatsappTemplateType.TEXT,\n );\n\n/** Substitutes the positional parameters back into the template's text, in Meta's 1-based order. */\nexport const fillWhatsappTemplateText = (text: string, variables: string[]): string =>\n variables.length === 0\n ? text\n : text.replace(\n VARIABLE_PATTERN,\n (placeholder, index) => variables[Number(index) - 1] ?? placeholder,\n );\n\nexport type WhatsappNotificationEvent = {\n tenantId: string;\n userId: string;\n message: WhatsappNotificationMessage;\n};\n\nexport type TextHeader = {\n format: WhatsappTemplateType.TEXT;\n param: string;\n};\n\nexport type MediaHeader = {\n format: WhatsappTemplateType.IMAGE | WhatsappTemplateType.VIDEO;\n link: string;\n};\n\nexport type DocumentHeader = {\n format: WhatsappTemplateType.DOCUMENT;\n filename: string;\n link: string;\n};\n\nexport type WhatsappNotificationMessage = {\n templateId: string;\n language?: string;\n dedupId: string;\n destination: {\n organizationId?: string;\n contactId?: string;\n phone: string;\n name?: string;\n };\n body?: {\n text?: string; // template text, useful for Crisp to show the message that was sent to our salespeople\n params: string[];\n };\n header?: DocumentHeader | MediaHeader | TextHeader;\n dynamicUrl?: {\n buttonIndex: number;\n param: string;\n };\n};\n\nexport enum WhatsappDeliveryStatus {\n DELIVERED = 'DELIVERED',\n FAILED = 'FAILED',\n SUPPRESSED = 'SUPPRESSED',\n}\n\nexport enum WhatsappSuppressionReason {\n NOT_ON_WHATSAPP = 'NOT_ON_WHATSAPP',\n DUPLICATE = 'DUPLICATE',\n}\n\n// see docs/adr/0026-whatsapp-leasing-notifications-alongside-email.md\nexport type WhatsappDeliveryEvent = {\n tenantId: string;\n requestId?: string; // absent when the message was suppressed before reaching Crisp\n dedupId: string;\n templateId: string;\n phone: string;\n status: WhatsappDeliveryStatus;\n reason?: string;\n errorMessage?: string;\n notWhatsappUser?: boolean;\n suppressionReason?: WhatsappSuppressionReason;\n occurredAt: string;\n};\n\nexport const WHATSAPP_NOTIFICATION_SETTINGS_ID = 'whatsapp-notification';\n\nexport type WhatsappNotificationSettings = {\n whatsappPlugin: { identifier: string; key: string };\n bisondeskPlugin: { identifier: string; key: string };\n websiteId: string;\n originNumber: string;\n // Phased rollout of the invoice summaries and overdue reminders: an absent list means every\n // organization (the end state); a configured list restricts the send to exactly those ids.\n notificationsOrgAllowlist?: string[];\n};\n"]}
|
package/lib/ses.d.ts
CHANGED
|
@@ -21,7 +21,7 @@ export type BounceTypes = {
|
|
|
21
21
|
bounceSubType: 'Undetermined';
|
|
22
22
|
} | {
|
|
23
23
|
bounceType: 'Permanent';
|
|
24
|
-
bounceSubType: 'General' | 'NoEmail' | 'Suppressed' | 'OnAccountSuppressionList';
|
|
24
|
+
bounceSubType: 'General' | 'NoEmail' | 'Suppressed' | 'OnAccountSuppressionList' | 'EmailValidationSuppressed';
|
|
25
25
|
} | {
|
|
26
26
|
bounceType: 'Transient';
|
|
27
27
|
bounceSubType: 'General' | 'MailboxFull' | 'MessageTooLarge' | 'ContentRejected' | 'AttachmentRejected';
|
package/lib/ses.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ses.d.ts","sourceRoot":"/","sources":["ses.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,oBAAoB,GAC5B,qBAAqB,GACrB,wBAAwB,GACxB,uBAAuB,GACvB,mBAAmB,GACnB,qBAAqB,GACrB,mBAAmB,GACnB,oBAAoB,GACpB,+BAA+B,GAC/B,4BAA4B,CAAC;AAEjC,MAAM,MAAM,qBAAqB,GAAG;IAClC,IAAI,EAAE;QACJ,SAAS,EAAE,MAAM,CAAC;QAClB,SAAS,EAAE,MAAM,CAAC;QAClB,MAAM,EAAE,MAAM,CAAC;QACf,SAAS,EAAE,MAAM,CAAC;QAClB,gBAAgB,EAAE,MAAM,CAAC;QACzB,WAAW,EAAE,MAAM,EAAE,CAAC;QACtB,gBAAgB,EAAE,OAAO,CAAC;QAC1B,OAAO,EAAE;YAAE,IAAI,EAAE,MAAM,CAAC;YAAC,KAAK,EAAE,MAAM,CAAA;SAAE,EAAE,CAAC;QAC3C,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC,CAAC;QACjD,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;KAChC,CAAC;CACH,CAAC;AAEF,MAAM,MAAM,WAAW,GACnB;IAAE,UAAU,EAAE,cAAc,CAAC;IAAC,aAAa,EAAE,cAAc,CAAA;CAAE,GAC7D;IACE,UAAU,EAAE,WAAW,CAAC;IACxB,aAAa,
|
|
1
|
+
{"version":3,"file":"ses.d.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.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ses.js","sourceRoot":"/","sources":["ses.ts"],"names":[],"mappings":"","sourcesContent":["// based on https://github.com/aws/aws-sdk-js-v3/issues/6141#issuecomment-2136010046\n\nexport type SESEventNotification =\n | SESBounceNotification\n | SESComplaintNotification\n | SESDeliveryNotification\n | SESSendNotification\n | SESRejectNotification\n | SESOpenNotification\n | SESClickNotification\n | SESRenderingFailureNotification\n | SESDeliveryDelayNotification;\n\nexport type SESCommonNotification = {\n mail: {\n timestamp: string;\n messageId: string;\n source: string;\n sourceArn: string;\n sendingAccountId: string;\n destination: string[];\n headersTruncated: boolean;\n headers: { name: string; value: string }[];\n commonHeaders: Record<string, string | string[]>;\n tags: Record<string, string[]>;\n };\n};\n\nexport type BounceTypes =\n | { bounceType: 'Undetermined'; bounceSubType: 'Undetermined' }\n | {\n bounceType: 'Permanent';\n bounceSubType
|
|
1
|
+
{"version":3,"file":"ses.js","sourceRoot":"/","sources":["ses.ts"],"names":[],"mappings":"","sourcesContent":["// based on https://github.com/aws/aws-sdk-js-v3/issues/6141#issuecomment-2136010046\n\nexport type SESEventNotification =\n | SESBounceNotification\n | SESComplaintNotification\n | SESDeliveryNotification\n | SESSendNotification\n | SESRejectNotification\n | SESOpenNotification\n | SESClickNotification\n | SESRenderingFailureNotification\n | SESDeliveryDelayNotification;\n\nexport type SESCommonNotification = {\n mail: {\n timestamp: string;\n messageId: string;\n source: string;\n sourceArn: string;\n sendingAccountId: string;\n destination: string[];\n headersTruncated: boolean;\n headers: { name: string; value: string }[];\n commonHeaders: Record<string, string | string[]>;\n tags: Record<string, string[]>;\n };\n};\n\nexport type BounceTypes =\n | { bounceType: 'Undetermined'; bounceSubType: 'Undetermined' }\n | {\n bounceType: 'Permanent';\n bounceSubType:\n | 'General'\n | 'NoEmail'\n | 'Suppressed'\n | 'OnAccountSuppressionList'\n | 'EmailValidationSuppressed';\n }\n | {\n bounceType: 'Transient';\n bounceSubType:\n | 'General'\n | 'MailboxFull'\n | 'MessageTooLarge'\n | 'ContentRejected'\n | 'AttachmentRejected';\n };\n\nexport type SESBounceNotification = SESCommonNotification & {\n eventType: 'Bounce';\n bounce: BounceTypes & {\n bouncedRecipients: {\n emailAddress: string;\n action?: string;\n status?: string;\n diagnosticCode?: string;\n }[];\n timestamp: string;\n feedbackId: string;\n reportingMTA?: string;\n };\n};\n\nexport type SESComplaintNotification = SESCommonNotification & {\n eventType: 'Complaint';\n complaint: {\n complainedRecipients: { emailAddress: string }[];\n timestamp: string;\n feedbackId: string;\n complaintSubType?: string;\n userAgent?: string;\n complaintFeedbackType?: 'abuse' | 'auth-failure' | 'fraud' | 'not-spam' | 'other' | 'virus';\n arrivalDate?: string;\n };\n};\n\nexport type SESDeliveryNotification = SESCommonNotification & {\n eventType: 'Delivery';\n delivery: {\n timestamp: string;\n processingTimeMillis: number;\n recipients: string[];\n smtpResponse: string;\n reportingMTA?: string;\n };\n};\nexport type SESSendNotification = SESCommonNotification & {\n eventType: 'Send';\n send: {};\n};\nexport type SESRejectNotification = SESCommonNotification & {\n eventType: 'Reject';\n reject: {\n reason: string;\n };\n};\nexport type SESOpenNotification = SESCommonNotification & {\n eventType: 'Open';\n open: {\n ipAddress: string;\n timestamp: string;\n userAgent: string;\n };\n};\nexport type SESClickNotification = SESCommonNotification & {\n eventType: 'Click';\n click: {\n ipAddress: string;\n link: string;\n linkTags: Record<string, string[]>;\n timestamp: string;\n userAgent: string;\n };\n};\nexport type SESRenderingFailureNotification = SESCommonNotification & {\n eventType: 'Rendering Failure';\n failure: {\n templateName: string;\n errorMessage: string;\n };\n};\nexport type SESDeliveryDelayNotification = SESCommonNotification & {\n eventType: 'DeliveryDelay';\n deliveryDelay: {\n delayType:\n | 'InternalFailure'\n | 'General'\n | 'MailboxFull'\n | 'SpamDetected'\n | 'RecipientServerError'\n | 'IPFailure'\n | 'TransientCommunicationFailure'\n | 'BYOIPHostNameLookupUnavailable'\n | 'Undetermined'\n | 'SendingDeferral';\n delayedRecipients: { emailAddress: string; status: string; diagnosticCode: string }[];\n expirationTime: string;\n reportingMTA?: string;\n timestamp: string;\n };\n};\n"]}
|
package/lib/types.d.ts
CHANGED
|
@@ -165,7 +165,6 @@ export type ShareEmailRequest = {
|
|
|
165
165
|
subject: string;
|
|
166
166
|
attachments?: AttachmentValue[];
|
|
167
167
|
headers?: Record<string, string>;
|
|
168
|
-
configurationSet?: string;
|
|
169
168
|
};
|
|
170
169
|
export type WhatsAppContact = {
|
|
171
170
|
phone: PhoneNumberValue | PhoneNumberRawValue;
|
package/lib/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"/","sources":["types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAEjD,YAAY,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAE9D,MAAM,MAAM,aAAa,CAAC,CAAC,EAAE,CAAC,GAAG,EAAE,IAAI;IACrC,OAAO,EAAE,CAAC,EAAE,CAAC;IACb,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,IAAI,EAAE,CAAC,CAAC;IACR,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,QAAQ,CAAC,CAAC,EAAE,CAAC,GAAG,EAAE,IAAI;IAChC,OAAO,EAAE,CAAC,EAAE,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,CAAC,CAAC;IACR,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AA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B,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG;IACnC,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,+BAA+B,GAAG;IAC5C,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;CACvB,CAAC"}
|
package/lib/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"/","sources":["types.ts"],"names":[],"mappings":"AAsDA,MAAM,CAAN,IAAY,MAEX;AAFD,WAAY,MAAM;IAChB,+BAAqB,CAAA;AACvB,CAAC,EAFW,MAAM,KAAN,MAAM,QAEjB;AAuHD,MAAM,CAAN,IAAY,eAGX;AAHD,WAAY,eAAe;IACzB,gCAAa,CAAA;IACb,wCAAqB,CAAA;AACvB,CAAC,EAHW,eAAe,KAAf,eAAe,QAG1B","sourcesContent":["import { AppRoles, TopLevelActions } from './constants.js';\nimport { LocationValue } from './locations.js';\nimport { EmailDestination } from './messages.js';\n\nexport type { GPSCoord, LocationValue } from './locations.js';\n\nexport type PaginatedList<T, M = {}> = {\n results: T[];\n nextToken?: undefined;\n meta: M;\n totalCount: number;\n};\n\nexport type PaginationRequest = {\n limit: number;\n offset: number;\n};\n\nexport type NextList<T, M = {}> = {\n results: T[];\n nextToken?: string;\n meta: M;\n totalCount?: number;\n};\n\nexport type NextRequest = {\n limit?: number;\n nextToken?: string;\n};\n\nexport type PaginatedRequest = {\n limit?: number;\n offset?: number;\n};\nexport type Requester = {\n lang: string;\n roles: AppRoles[];\n actions: TopLevelActions[];\n tenantId: string;\n tenantLang: string;\n userAgent?: string;\n source?: string;\n userId: string;\n isAdmin: boolean;\n isApi: boolean;\n isHuman: boolean;\n};\n\nexport type Option = {\n value: string | number;\n label: string;\n color?: string;\n};\n\nexport enum Region {\n euWest1 = 'eu-west-1',\n}\n\nexport type ErrorResponse = {\n message?: string;\n data?: unknown;\n};\n\nexport type MultiLangValue = { key?: string } & { [languageCode: string]: string };\n\nexport type CognitoInfo = {\n userPoolId: string;\n appClientId: string;\n};\n\nexport type SearchPermissions = {\n users: string[];\n roles: AppRoles[];\n};\n\nexport type PhoneNumberValue = {\n country: string;\n e164: string;\n international: string;\n national: string;\n};\n\nexport type PhoneNumberRawValue = {\n defaultCountry?: string;\n input: string;\n};\n\nexport type LinkValue = {\n text?: string;\n url: string;\n};\n\nexport type Document = {\n type: string; // passport, driving_license, ...\n displayName: string;\n file: AttachmentValue;\n};\n\nexport type AttachmentValue = {\n contentType: string;\n fileName: string;\n id: string;\n previewSrc?: string;\n size: number;\n uploadedAt: string;\n uploadedBy: string;\n url: string;\n descriptions?: string | MultiLangValue;\n};\n\nexport type VatLayerResponseLog = {\n response: VatLayerResponse;\n raw: any;\n};\n\nexport type VatLayerResponse = {\n vatNumber: string;\n viesStatus: 'ok' | 'failure';\n} & (\n | { formatValid: boolean; viesValid: false; validAt?: undefined; countryCode?: string }\n | {\n formatValid: true;\n viesValid: boolean;\n validAt: string;\n countryCode: string;\n name: string;\n addressLines: string[];\n }\n);\n\nexport type VatValidationResponse = {\n vatNumber: string;\n formatValid?: boolean;\n viesStatus: 'ok' | 'failure';\n countryCode?: string;\n} & (\n | { viesValid: false; validAt?: undefined }\n | {\n viesValid: true;\n validAt: string;\n name?: string;\n normalizedAddress?: LocationValue;\n officialAddress?: string[];\n }\n);\n\nexport type VatValidationRequest = {\n defaultCountry?: string;\n input: string;\n cacheDays?: number;\n};\n\nexport type CurrencyListResponse = {\n currencies: Record<string, { label: string }>;\n};\n\nexport type CurrencyConversionRequest = {\n sourceCurrency: string;\n targetCurrency?: string;\n};\n\nexport type DefaultVatRateRequest = {\n branchId?: string;\n organizationId?: string;\n};\n\nexport type DefaultVatRateResponse = {\n defaultVatRate: string;\n};\n\nexport type CurrencyConversionResponse = {\n sourceCurrency: string;\n rates: Record<string, string>;\n};\n\nexport enum TransactionType {\n sale = 'sale',\n purchase = 'purchase',\n}\n\nexport type ShareEmailRequest = {\n country: string; // Lowercase ISO 3166-1 alpha-2 code, e.g. 'be'\n destinations: EmailDestination[];\n message: string;\n subject: string;\n attachments?: AttachmentValue[];\n headers?: Record<string, string>;\n
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"/","sources":["types.ts"],"names":[],"mappings":"AAsDA,MAAM,CAAN,IAAY,MAEX;AAFD,WAAY,MAAM;IAChB,+BAAqB,CAAA;AACvB,CAAC,EAFW,MAAM,KAAN,MAAM,QAEjB;AAuHD,MAAM,CAAN,IAAY,eAGX;AAHD,WAAY,eAAe;IACzB,gCAAa,CAAA;IACb,wCAAqB,CAAA;AACvB,CAAC,EAHW,eAAe,KAAf,eAAe,QAG1B","sourcesContent":["import { AppRoles, TopLevelActions } from './constants.js';\nimport { LocationValue } from './locations.js';\nimport { EmailDestination } from './messages.js';\n\nexport type { GPSCoord, LocationValue } from './locations.js';\n\nexport type PaginatedList<T, M = {}> = {\n results: T[];\n nextToken?: undefined;\n meta: M;\n totalCount: number;\n};\n\nexport type PaginationRequest = {\n limit: number;\n offset: number;\n};\n\nexport type NextList<T, M = {}> = {\n results: T[];\n nextToken?: string;\n meta: M;\n totalCount?: number;\n};\n\nexport type NextRequest = {\n limit?: number;\n nextToken?: string;\n};\n\nexport type PaginatedRequest = {\n limit?: number;\n offset?: number;\n};\nexport type Requester = {\n lang: string;\n roles: AppRoles[];\n actions: TopLevelActions[];\n tenantId: string;\n tenantLang: string;\n userAgent?: string;\n source?: string;\n userId: string;\n isAdmin: boolean;\n isApi: boolean;\n isHuman: boolean;\n};\n\nexport type Option = {\n value: string | number;\n label: string;\n color?: string;\n};\n\nexport enum Region {\n euWest1 = 'eu-west-1',\n}\n\nexport type ErrorResponse = {\n message?: string;\n data?: unknown;\n};\n\nexport type MultiLangValue = { key?: string } & { [languageCode: string]: string };\n\nexport type CognitoInfo = {\n userPoolId: string;\n appClientId: string;\n};\n\nexport type SearchPermissions = {\n users: string[];\n roles: AppRoles[];\n};\n\nexport type PhoneNumberValue = {\n country: string;\n e164: string;\n international: string;\n national: string;\n};\n\nexport type PhoneNumberRawValue = {\n defaultCountry?: string;\n input: string;\n};\n\nexport type LinkValue = {\n text?: string;\n url: string;\n};\n\nexport type Document = {\n type: string; // passport, driving_license, ...\n displayName: string;\n file: AttachmentValue;\n};\n\nexport type AttachmentValue = {\n contentType: string;\n fileName: string;\n id: string;\n previewSrc?: string;\n size: number;\n uploadedAt: string;\n uploadedBy: string;\n url: string;\n descriptions?: string | MultiLangValue;\n};\n\nexport type VatLayerResponseLog = {\n response: VatLayerResponse;\n raw: any;\n};\n\nexport type VatLayerResponse = {\n vatNumber: string;\n viesStatus: 'ok' | 'failure';\n} & (\n | { formatValid: boolean; viesValid: false; validAt?: undefined; countryCode?: string }\n | {\n formatValid: true;\n viesValid: boolean;\n validAt: string;\n countryCode: string;\n name: string;\n addressLines: string[];\n }\n);\n\nexport type VatValidationResponse = {\n vatNumber: string;\n formatValid?: boolean;\n viesStatus: 'ok' | 'failure';\n countryCode?: string;\n} & (\n | { viesValid: false; validAt?: undefined }\n | {\n viesValid: true;\n validAt: string;\n name?: string;\n normalizedAddress?: LocationValue;\n officialAddress?: string[];\n }\n);\n\nexport type VatValidationRequest = {\n defaultCountry?: string;\n input: string;\n cacheDays?: number;\n};\n\nexport type CurrencyListResponse = {\n currencies: Record<string, { label: string }>;\n};\n\nexport type CurrencyConversionRequest = {\n sourceCurrency: string;\n targetCurrency?: string;\n};\n\nexport type DefaultVatRateRequest = {\n branchId?: string;\n organizationId?: string;\n};\n\nexport type DefaultVatRateResponse = {\n defaultVatRate: string;\n};\n\nexport type CurrencyConversionResponse = {\n sourceCurrency: string;\n rates: Record<string, string>;\n};\n\nexport enum TransactionType {\n sale = 'sale',\n purchase = 'purchase',\n}\n\nexport type ShareEmailRequest = {\n country: string; // Lowercase ISO 3166-1 alpha-2 code, e.g. 'be'\n destinations: EmailDestination[];\n message: string;\n subject: string;\n attachments?: AttachmentValue[];\n headers?: Record<string, string>;\n};\n\nexport type WhatsAppContact = {\n phone: PhoneNumberValue | PhoneNumberRawValue;\n name?: string;\n /**\n * Any language the sending flow's template is approved in — both share flows validate against\n * the tenant's catalogue at send time.\n */\n language: string;\n};\n\nexport type ShareWhatsappRequest = {\n contacts: WhatsAppContact[];\n};\n\nexport type DistributiveOmit<T, K extends PropertyKey> = T extends any ? Omit<T, K> : never;\n\nexport type ChangeRecord = {\n oldValue?: any;\n newValue?: any;\n modifiedBy?: string;\n modifiedAt: string;\n};\n\nexport type LinkWebsiteUserRequest = {\n tenantId: string;\n websiteUserId: string;\n email: string;\n vatNumber: string;\n};\n\nexport type DeleteWebsiteContactLinkRequest = {\n tenantId: string;\n websiteUserId: string;\n};\n"]}
|
package/package.json
CHANGED
package/src/messages.ts
CHANGED
|
@@ -35,6 +35,19 @@ export type EmailMessageEvent = {
|
|
|
35
35
|
message: EmailMessage;
|
|
36
36
|
};
|
|
37
37
|
|
|
38
|
+
/**
|
|
39
|
+
* The SES configuration set an email is sent with. Every send passes one to the send functions
|
|
40
|
+
* in `@bisondesk/commons/emails/send`, so no email falls back to its sending domain's default.
|
|
41
|
+
* The sets' settings live in `templates/infra.yaml` (transactional) and
|
|
42
|
+
* `templates/services/core.yaml` (marketing).
|
|
43
|
+
*/
|
|
44
|
+
export enum EmailConfigurationSet {
|
|
45
|
+
/** Invoices, shares and notifications. Never checked by SES Auto Validation. */
|
|
46
|
+
Transactional = 'bisondesk-transactional-config',
|
|
47
|
+
/** Email campaigns. SES Auto Validation may drop recipients before sending. */
|
|
48
|
+
Marketing = 'bisondesk-marketing-config',
|
|
49
|
+
}
|
|
50
|
+
|
|
38
51
|
export type TemplatedEmailRequest<T extends Record<string, unknown> = Record<string, unknown>> = {
|
|
39
52
|
data: T;
|
|
40
53
|
destinations: EmailDestination[];
|
|
@@ -44,7 +57,6 @@ export type TemplatedEmailRequest<T extends Record<string, unknown> = Record<str
|
|
|
44
57
|
template: string;
|
|
45
58
|
attachments?: AttachmentValue[];
|
|
46
59
|
headers?: Record<string, string>;
|
|
47
|
-
configurationSet?: string;
|
|
48
60
|
};
|
|
49
61
|
|
|
50
62
|
export type EmailRequest = {
|
|
@@ -57,7 +69,6 @@ export type EmailRequest = {
|
|
|
57
69
|
subject: string;
|
|
58
70
|
attachments?: AttachmentValue[];
|
|
59
71
|
headers?: Record<string, string>;
|
|
60
|
-
configurationSet?: string;
|
|
61
72
|
body:
|
|
62
73
|
| {
|
|
63
74
|
text?: string;
|
|
@@ -125,6 +125,32 @@ export type WhatsappNotificationMessage = {
|
|
|
125
125
|
};
|
|
126
126
|
};
|
|
127
127
|
|
|
128
|
+
export enum WhatsappDeliveryStatus {
|
|
129
|
+
DELIVERED = 'DELIVERED',
|
|
130
|
+
FAILED = 'FAILED',
|
|
131
|
+
SUPPRESSED = 'SUPPRESSED',
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
export enum WhatsappSuppressionReason {
|
|
135
|
+
NOT_ON_WHATSAPP = 'NOT_ON_WHATSAPP',
|
|
136
|
+
DUPLICATE = 'DUPLICATE',
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
// see docs/adr/0026-whatsapp-leasing-notifications-alongside-email.md
|
|
140
|
+
export type WhatsappDeliveryEvent = {
|
|
141
|
+
tenantId: string;
|
|
142
|
+
requestId?: string; // absent when the message was suppressed before reaching Crisp
|
|
143
|
+
dedupId: string;
|
|
144
|
+
templateId: string;
|
|
145
|
+
phone: string;
|
|
146
|
+
status: WhatsappDeliveryStatus;
|
|
147
|
+
reason?: string;
|
|
148
|
+
errorMessage?: string;
|
|
149
|
+
notWhatsappUser?: boolean;
|
|
150
|
+
suppressionReason?: WhatsappSuppressionReason;
|
|
151
|
+
occurredAt: string;
|
|
152
|
+
};
|
|
153
|
+
|
|
128
154
|
export const WHATSAPP_NOTIFICATION_SETTINGS_ID = 'whatsapp-notification';
|
|
129
155
|
|
|
130
156
|
export type WhatsappNotificationSettings = {
|
|
@@ -132,4 +158,7 @@ export type WhatsappNotificationSettings = {
|
|
|
132
158
|
bisondeskPlugin: { identifier: string; key: string };
|
|
133
159
|
websiteId: string;
|
|
134
160
|
originNumber: string;
|
|
161
|
+
// Phased rollout of the invoice summaries and overdue reminders: an absent list means every
|
|
162
|
+
// organization (the end state); a configured list restricts the send to exactly those ids.
|
|
163
|
+
notificationsOrgAllowlist?: string[];
|
|
135
164
|
};
|
package/src/ses.ts
CHANGED
|
@@ -30,7 +30,12 @@ export type BounceTypes =
|
|
|
30
30
|
| { bounceType: 'Undetermined'; bounceSubType: 'Undetermined' }
|
|
31
31
|
| {
|
|
32
32
|
bounceType: 'Permanent';
|
|
33
|
-
bounceSubType:
|
|
33
|
+
bounceSubType:
|
|
34
|
+
| 'General'
|
|
35
|
+
| 'NoEmail'
|
|
36
|
+
| 'Suppressed'
|
|
37
|
+
| 'OnAccountSuppressionList'
|
|
38
|
+
| 'EmailValidationSuppressed';
|
|
34
39
|
}
|
|
35
40
|
| {
|
|
36
41
|
bounceType: 'Transient';
|