@oneclick.dev/cms-core-modules 0.0.124 → 0.0.125
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/dist/AppointmentListTable-CWzbwqR-.js +1 -0
- package/dist/AppointmentListTable-DoZuBstk.mjs +270 -0
- package/dist/ContentEditor-BlNbqkAz.js +324 -0
- package/dist/{ContentEditor-DX1bTQKs.mjs → ContentEditor-D754iLJS.mjs} +8074 -27026
- package/dist/{Detail-B7pe808q.mjs → Detail-BOxWQ1QQ.mjs} +2 -2
- package/dist/{Detail-B_Q7Qkuz.mjs → Detail-BfKW0uZE.mjs} +2 -2
- package/dist/Detail-DFVu2F38.mjs +11 -0
- package/dist/{Detail-t3tOcy3X.js → Detail-DJea_fCd.js} +1 -1
- package/dist/{Detail-CNiLIEh9.js → Detail-DPJacXfm.js} +1 -1
- package/dist/Detail-DSLZ7_bM.js +1 -0
- package/dist/{Detail-BESGmY7z.js → Detail-DUGThL9Y.js} +1 -1
- package/dist/{Detail-DNxAzeCs.mjs → Detail-D_LlEeHu.mjs} +2 -2
- package/dist/Overview-0hFXiuYo.js +1 -0
- package/dist/Overview-BTx5LF4J.js +1 -0
- package/dist/Overview-CCu2PHai.mjs +289 -0
- package/dist/Overview-D2u-leeO.js +1 -0
- package/dist/Overview-D_2wozCG.mjs +1733 -0
- package/dist/Overview-Dffo-zH4.mjs +11 -0
- package/dist/{TableCalculationWidget-CrqcLGfU.mjs → TableCalculationWidget-B_LFoOYm.mjs} +3 -3
- package/dist/{TableCalculationWidget-CkQPrVUd.js → TableCalculationWidget-CahOIcbk.js} +1 -1
- package/dist/TableDataWidget-BwqWFH4A.js +1 -0
- package/dist/TableDataWidget-RsVxcDsL.mjs +112 -0
- package/dist/TableOverviewCard-BPWCqo56.js +1 -0
- package/dist/{TableOverviewCard-Ci0d4o4w.mjs → TableOverviewCard-D667DDag.mjs} +113 -127
- package/dist/TableResultView.vue_vue_type_script_setup_true_lang-C3XiOXgb.js +1 -0
- package/dist/TableResultView.vue_vue_type_script_setup_true_lang-sp0TLio0.mjs +547 -0
- package/dist/{TableRowActionCard-BhdnnPaq.mjs → TableRowActionCard-BPYJ-Kjy.mjs} +95 -101
- package/dist/TableRowActionCard-Bnqj1YIe.js +1 -0
- package/dist/TableView-CwhZ9YN2.js +4 -0
- package/dist/TableView-DX9PKS8N.mjs +9673 -0
- package/dist/TemplateBuilder.vue_vue_type_script_setup_true_lang-BgDdzbLe.js +1 -0
- package/dist/TemplateBuilder.vue_vue_type_script_setup_true_lang-D85V4nrQ.mjs +2886 -0
- package/dist/cms-core-modules.css +1 -1
- package/dist/dateRangePresets-CaPVagHY.mjs +453 -0
- package/dist/dateRangePresets-gxQCiZ6c.js +1 -0
- package/dist/index-6hZ6MYY6.js +1 -0
- package/dist/index-BVmmicu3.mjs +14 -0
- package/dist/index-ChHD_1Cf.js +144 -0
- package/dist/index-CvV4nVWI.js +1 -0
- package/dist/index-DH2z0W_w.mjs +19012 -0
- package/dist/index-DZKzj48V.mjs +17 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.mjs +237 -103
- package/dist/orders-C_sz8J9b.js +1 -0
- package/dist/{orders-BfTLIm7U.mjs → orders-Cgdggzvx.mjs} +84 -84
- package/dist/server-handlers.cjs.js +1 -1
- package/dist/server-handlers.mjs +2055 -1123
- package/dist/src/appointments/chat-components/AppointmentListTable.vue.d.ts +3 -0
- package/dist/src/appointments/index.d.ts +93 -3
- package/dist/src/appointments/reservation-summary.d.ts +48 -0
- package/dist/src/appointments/server.d.ts +1 -0
- package/dist/src/appointments/tools.d.ts +93 -3
- package/dist/src/filezone/config.d.ts +31 -0
- package/dist/src/filezone/index.d.ts +43 -0
- package/dist/src/filezone/index.vue.d.ts +2 -0
- package/dist/src/filezone/metadata.d.ts +2 -0
- package/dist/src/filezone/pages/Overview.vue.d.ts +4 -0
- package/dist/src/filezone/permissions.d.ts +5 -0
- package/dist/src/filezone/routes.d.ts +5 -0
- package/dist/src/filezone/server.d.ts +36 -0
- package/dist/src/index.d.ts +2 -0
- package/dist/src/mailTemplates/builder-types.d.ts +40 -0
- package/dist/src/mailTemplates/components/BlockRenderer.vue.d.ts +24 -0
- package/dist/src/mailTemplates/components/DesignPanel.vue.d.ts +13 -0
- package/dist/src/mailTemplates/components/EmailCanvas.vue.d.ts +44 -0
- package/dist/src/mailTemplates/components/RichTextEditor.vue.d.ts +10 -0
- package/dist/src/mailTemplates/components/RightSidebar.vue.d.ts +18 -0
- package/dist/src/mailTemplates/components/SettingsPanel.vue.d.ts +15 -0
- package/dist/src/mailTemplates/components/TemplateBuilder.vue.d.ts +2 -0
- package/dist/src/mailTemplates/components/TemplateList.vue.d.ts +19 -1
- package/dist/src/mailTemplates/components/rich-text.d.ts +6 -0
- package/dist/src/mailTemplates/config.d.ts +10 -4
- package/dist/src/mailTemplates/defaults.d.ts +10 -0
- package/dist/src/mailTemplates/editor-state.d.ts +21 -0
- package/dist/src/mailTemplates/index.d.ts +11 -5
- package/dist/src/mailTemplates/index.vue.d.ts +2 -4
- package/dist/src/mailTemplates/metadata.d.ts +1 -1
- package/dist/src/mailTemplates/pages/Detail.vue.d.ts +1 -13
- package/dist/src/mailTemplates/pages/Overview.vue.d.ts +1 -13
- package/dist/src/mailTemplates/server.d.ts +23 -0
- package/dist/src/server-handlers.d.ts +4 -0
- package/dist/src/table/badge-filter-utils.d.ts +8 -0
- package/dist/src/table/chat-components/TableOverviewCard.vue.d.ts +2 -7
- package/dist/src/table/chat-components/TableResultView.vue.d.ts +3 -7
- package/dist/src/table/components/TableDisplayCell.vue.d.ts +8 -0
- package/dist/src/table/components/columns/BadgeColumnSettings.vue.d.ts +9 -0
- package/dist/src/table/components/columns/ColumnColorSelect.vue.d.ts +11 -0
- package/dist/src/table/components/columns/ColumnDisplaySettings.vue.d.ts +9 -0
- package/dist/src/table/components/columns/ColumnTypeSelect.vue.d.ts +11 -0
- package/dist/src/table/components/columns/ColumnValueSourceInput.vue.d.ts +15 -0
- package/dist/src/table/components/columns/DialogTableColumnItem.vue.d.ts +8 -11
- package/dist/src/table/components/columns/ProgressColumnSettings.vue.d.ts +8 -0
- package/dist/src/table/components/stats/StatDialog.vue.d.ts +6 -10
- package/dist/src/table/components/stats/Stats.vue.d.ts +9 -15
- package/dist/src/table/composables/useTableClock.d.ts +4 -0
- package/dist/src/table/display-utils.d.ts +35 -0
- package/dist/src/table/row-value.d.ts +1 -0
- package/dist/src/table/stat-utils.d.ts +9 -0
- package/dist/src/table/tool-utils.d.ts +1 -1
- package/dist/src/table/types.d.ts +54 -1
- package/dist/src/whatsappBusiness/analytics.d.ts +4 -0
- package/dist/src/whatsappBusiness/components/AccountPanel.vue.d.ts +2 -0
- package/dist/src/whatsappBusiness/components/InsightsPanel.vue.d.ts +5 -0
- package/dist/src/whatsappBusiness/components/TemplateDialog.vue.d.ts +14 -0
- package/dist/src/whatsappBusiness/components/TemplatesPanel.vue.d.ts +5 -0
- package/dist/src/whatsappBusiness/components/presentation.d.ts +4 -0
- package/dist/src/whatsappBusiness/config.d.ts +51 -0
- package/dist/src/whatsappBusiness/connection.d.ts +77 -0
- package/dist/src/whatsappBusiness/index.d.ts +63 -0
- package/dist/src/whatsappBusiness/index.vue.d.ts +5 -0
- package/dist/src/whatsappBusiness/metadata.d.ts +2 -0
- package/dist/src/whatsappBusiness/pages/Overview.vue.d.ts +2 -0
- package/dist/src/whatsappBusiness/permissions.d.ts +5 -0
- package/dist/src/whatsappBusiness/provider.d.ts +21 -0
- package/dist/src/whatsappBusiness/routes.d.ts +5 -0
- package/dist/src/whatsappBusiness/server.d.ts +14 -0
- package/dist/src/whatsappBusiness/templates.d.ts +94 -0
- package/dist/src/whatsappBusiness/types.d.ts +162 -0
- package/dist/{tool-sandbox-DoF1PsyS.js → tool-sandbox-BSkKdH7V.js} +1 -1
- package/dist/{tool-sandbox-DdkMLkDK.mjs → tool-sandbox-DU9b1B7v.mjs} +1 -1
- package/dist/{types-ibC3-e1N.mjs → types-B5MifmeF.mjs} +339 -273
- package/dist/types-D5dgTskW.js +1 -0
- package/dist/{useTableAgentTools-D5mzGf3A.js → useTableAgentTools-BrUot49I.js} +1 -1
- package/dist/{useTableAgentTools-DcN3kYRL.mjs → useTableAgentTools-r5InEI4p.mjs} +8 -8
- package/dist/{vee-validate-zod-BQElPD0m.js → vee-validate-zod-CWZwNTWE.js} +1 -1
- package/dist/{vee-validate-zod-CN16K2x9.mjs → vee-validate-zod-D0WaDgDZ.mjs} +1 -1
- package/package.json +2 -2
- package/src/appointments/tools.ts +52 -2
- package/dist/AppointmentListTable-DZJNmTMb.mjs +0 -177
- package/dist/AppointmentListTable-Dieu9US_.js +0 -1
- package/dist/ContentEditor-BcIUumah.js +0 -467
- package/dist/Detail-Byk781b4.mjs +0 -26
- package/dist/Detail-mvSGbnFU.js +0 -1
- package/dist/Overview-BDlBCUI_.js +0 -1
- package/dist/Overview-Su8ZUbMs.mjs +0 -26
- package/dist/TableDataWidget-7qvC3Egd.js +0 -1
- package/dist/TableDataWidget-DMTSoGRO.mjs +0 -121
- package/dist/TableOverviewCard-AFq-puJs.js +0 -1
- package/dist/TableResultView.vue_vue_type_script_setup_true_lang-CBn-Oxl9.mjs +0 -534
- package/dist/TableResultView.vue_vue_type_script_setup_true_lang-C_Lv-SmJ.js +0 -1
- package/dist/TableRowActionCard-IzB6tNN-.js +0 -1
- package/dist/TableView-6mdrL3zx.js +0 -4
- package/dist/TableView-Du5nOE6R.mjs +0 -8228
- package/dist/TemplateList.vue_vue_type_script_setup_true_lang-B_AtWnHa.js +0 -1
- package/dist/TemplateList.vue_vue_type_script_setup_true_lang-Cmovy7kk.mjs +0 -40
- package/dist/dateRangePresets-B-l5b_wR.mjs +0 -48
- package/dist/dateRangePresets-CPWqst_x.js +0 -1
- package/dist/orders-DUa2PVoa.js +0 -1
- package/dist/types-BMraG1kN.js +0 -1
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { WhatsAppTemplate } from '../types';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
open: boolean;
|
|
4
|
+
template: WhatsAppTemplate | null;
|
|
5
|
+
canManage: boolean;
|
|
6
|
+
};
|
|
7
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
8
|
+
"update:open": (open: boolean) => any;
|
|
9
|
+
saved: () => any;
|
|
10
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
11
|
+
"onUpdate:open"?: ((open: boolean) => any) | undefined;
|
|
12
|
+
onSaved?: (() => any) | undefined;
|
|
13
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
14
|
+
export default _default;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
canManage: boolean;
|
|
3
|
+
};
|
|
4
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLElement>;
|
|
5
|
+
export default _default;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare function readableError(error: unknown, fallback: string): string;
|
|
2
|
+
export declare function displayValue(value: unknown): string;
|
|
3
|
+
export declare function numberLabel(value: number | null | undefined): string;
|
|
4
|
+
export declare function dateLabel(value: string | number | null | undefined, timeZone?: string): string;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { ResolveConfig } from '@oneclick.dev/cms-kit';
|
|
2
|
+
export declare const config: {
|
|
3
|
+
readonly account: {
|
|
4
|
+
readonly label: "WhatsApp integration";
|
|
5
|
+
readonly description: "Select a WhatsApp Business account connected in your Studio project integrations.";
|
|
6
|
+
readonly type: "resource";
|
|
7
|
+
readonly accept: ["WHATSAPP"];
|
|
8
|
+
readonly required: true;
|
|
9
|
+
};
|
|
10
|
+
readonly defaultDays: {
|
|
11
|
+
readonly label: "Default insights period";
|
|
12
|
+
readonly description: "The period shown when opening template insights.";
|
|
13
|
+
readonly type: "select";
|
|
14
|
+
readonly default: "30";
|
|
15
|
+
readonly options: [{
|
|
16
|
+
readonly label: "Last 7 days";
|
|
17
|
+
readonly value: "7";
|
|
18
|
+
}, {
|
|
19
|
+
readonly label: "Last 30 days";
|
|
20
|
+
readonly value: "30";
|
|
21
|
+
}, {
|
|
22
|
+
readonly label: "Last 90 days";
|
|
23
|
+
readonly value: "90";
|
|
24
|
+
}];
|
|
25
|
+
};
|
|
26
|
+
} & {
|
|
27
|
+
readonly account: {
|
|
28
|
+
readonly label: "WhatsApp integration";
|
|
29
|
+
readonly description: "Select a WhatsApp Business account connected in your Studio project integrations.";
|
|
30
|
+
readonly type: "resource";
|
|
31
|
+
readonly accept: ["WHATSAPP"];
|
|
32
|
+
readonly required: true;
|
|
33
|
+
};
|
|
34
|
+
readonly defaultDays: {
|
|
35
|
+
readonly label: "Default insights period";
|
|
36
|
+
readonly description: "The period shown when opening template insights.";
|
|
37
|
+
readonly type: "select";
|
|
38
|
+
readonly default: "30";
|
|
39
|
+
readonly options: [{
|
|
40
|
+
readonly label: "Last 7 days";
|
|
41
|
+
readonly value: "7";
|
|
42
|
+
}, {
|
|
43
|
+
readonly label: "Last 30 days";
|
|
44
|
+
readonly value: "30";
|
|
45
|
+
}, {
|
|
46
|
+
readonly label: "Last 90 days";
|
|
47
|
+
readonly value: "90";
|
|
48
|
+
}];
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
export type ConfigValues = ResolveConfig<typeof config>;
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { providerHttpError, GraphRequest } from './provider';
|
|
3
|
+
import { WhatsAppConnectionTest, WhatsAppPhone } from './types';
|
|
4
|
+
export declare const whatsAppGraphIdSchema: z.ZodString;
|
|
5
|
+
export declare const whatsAppAccessTokenSchema: z.ZodString;
|
|
6
|
+
export declare const whatsAppConnectionTestSchema: z.ZodObject<{
|
|
7
|
+
wabaId: z.ZodString;
|
|
8
|
+
accessToken: z.ZodString;
|
|
9
|
+
}, "strict", z.ZodTypeAny, {
|
|
10
|
+
wabaId: string;
|
|
11
|
+
accessToken: string;
|
|
12
|
+
}, {
|
|
13
|
+
wabaId: string;
|
|
14
|
+
accessToken: string;
|
|
15
|
+
}>;
|
|
16
|
+
export declare const whatsAppConnectionSchema: z.ZodObject<{
|
|
17
|
+
wabaId: z.ZodString;
|
|
18
|
+
accessToken: z.ZodString;
|
|
19
|
+
} & {
|
|
20
|
+
phoneNumberId: z.ZodString;
|
|
21
|
+
}, "strict", z.ZodTypeAny, {
|
|
22
|
+
wabaId: string;
|
|
23
|
+
phoneNumberId: string;
|
|
24
|
+
accessToken: string;
|
|
25
|
+
}, {
|
|
26
|
+
wabaId: string;
|
|
27
|
+
phoneNumberId: string;
|
|
28
|
+
accessToken: string;
|
|
29
|
+
}>;
|
|
30
|
+
declare const verificationSchema: z.ZodObject<{
|
|
31
|
+
wabaId: z.ZodString;
|
|
32
|
+
accessToken: z.ZodString;
|
|
33
|
+
} & {
|
|
34
|
+
phoneNumberId: z.ZodOptional<z.ZodString>;
|
|
35
|
+
}, "strict", z.ZodTypeAny, {
|
|
36
|
+
wabaId: string;
|
|
37
|
+
accessToken: string;
|
|
38
|
+
phoneNumberId?: string | undefined;
|
|
39
|
+
}, {
|
|
40
|
+
wabaId: string;
|
|
41
|
+
accessToken: string;
|
|
42
|
+
phoneNumberId?: string | undefined;
|
|
43
|
+
}>;
|
|
44
|
+
export type WhatsAppConnectionInput = z.infer<typeof verificationSchema>;
|
|
45
|
+
export declare const WHATSAPP_PHONE_FIELDS = "id,display_phone_number,verified_name,quality_rating,code_verification_status";
|
|
46
|
+
export declare function serializeWhatsAppPhone(raw: Record<string, any>): WhatsAppPhone;
|
|
47
|
+
/** Reusable by Studio integration setup; never stores or returns credentials. */
|
|
48
|
+
export declare function verifyWhatsAppConnection(input: WhatsAppConnectionInput, graph?: GraphRequest): Promise<WhatsAppConnectionTest>;
|
|
49
|
+
export declare const whatsappBusinessConnection: {
|
|
50
|
+
verify: typeof verifyWhatsAppConnection;
|
|
51
|
+
testSchema: z.ZodObject<{
|
|
52
|
+
wabaId: z.ZodString;
|
|
53
|
+
accessToken: z.ZodString;
|
|
54
|
+
}, "strict", z.ZodTypeAny, {
|
|
55
|
+
wabaId: string;
|
|
56
|
+
accessToken: string;
|
|
57
|
+
}, {
|
|
58
|
+
wabaId: string;
|
|
59
|
+
accessToken: string;
|
|
60
|
+
}>;
|
|
61
|
+
connectSchema: z.ZodObject<{
|
|
62
|
+
wabaId: z.ZodString;
|
|
63
|
+
accessToken: z.ZodString;
|
|
64
|
+
} & {
|
|
65
|
+
phoneNumberId: z.ZodString;
|
|
66
|
+
}, "strict", z.ZodTypeAny, {
|
|
67
|
+
wabaId: string;
|
|
68
|
+
phoneNumberId: string;
|
|
69
|
+
accessToken: string;
|
|
70
|
+
}, {
|
|
71
|
+
wabaId: string;
|
|
72
|
+
phoneNumberId: string;
|
|
73
|
+
accessToken: string;
|
|
74
|
+
}>;
|
|
75
|
+
toHttpError: typeof providerHttpError;
|
|
76
|
+
};
|
|
77
|
+
export {};
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
component: () => Promise<typeof import("./index.vue")>;
|
|
3
|
+
metadata: import('@oneclick.dev/cms-kit').ModuleMetadata;
|
|
4
|
+
config: {
|
|
5
|
+
readonly account: {
|
|
6
|
+
readonly label: "WhatsApp integration";
|
|
7
|
+
readonly description: "Select a WhatsApp Business account connected in your Studio project integrations.";
|
|
8
|
+
readonly type: "resource";
|
|
9
|
+
readonly accept: ["WHATSAPP"];
|
|
10
|
+
readonly required: true;
|
|
11
|
+
};
|
|
12
|
+
readonly defaultDays: {
|
|
13
|
+
readonly label: "Default insights period";
|
|
14
|
+
readonly description: "The period shown when opening template insights.";
|
|
15
|
+
readonly type: "select";
|
|
16
|
+
readonly default: "30";
|
|
17
|
+
readonly options: [{
|
|
18
|
+
readonly label: "Last 7 days";
|
|
19
|
+
readonly value: "7";
|
|
20
|
+
}, {
|
|
21
|
+
readonly label: "Last 30 days";
|
|
22
|
+
readonly value: "30";
|
|
23
|
+
}, {
|
|
24
|
+
readonly label: "Last 90 days";
|
|
25
|
+
readonly value: "90";
|
|
26
|
+
}];
|
|
27
|
+
};
|
|
28
|
+
} & {
|
|
29
|
+
readonly account: {
|
|
30
|
+
readonly label: "WhatsApp integration";
|
|
31
|
+
readonly description: "Select a WhatsApp Business account connected in your Studio project integrations.";
|
|
32
|
+
readonly type: "resource";
|
|
33
|
+
readonly accept: ["WHATSAPP"];
|
|
34
|
+
readonly required: true;
|
|
35
|
+
};
|
|
36
|
+
readonly defaultDays: {
|
|
37
|
+
readonly label: "Default insights period";
|
|
38
|
+
readonly description: "The period shown when opening template insights.";
|
|
39
|
+
readonly type: "select";
|
|
40
|
+
readonly default: "30";
|
|
41
|
+
readonly options: [{
|
|
42
|
+
readonly label: "Last 7 days";
|
|
43
|
+
readonly value: "7";
|
|
44
|
+
}, {
|
|
45
|
+
readonly label: "Last 30 days";
|
|
46
|
+
readonly value: "30";
|
|
47
|
+
}, {
|
|
48
|
+
readonly label: "Last 90 days";
|
|
49
|
+
readonly value: "90";
|
|
50
|
+
}];
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
routes: {
|
|
54
|
+
path: string;
|
|
55
|
+
component: () => Promise<typeof import("./pages/Overview.vue")>;
|
|
56
|
+
}[];
|
|
57
|
+
permissions: {
|
|
58
|
+
key: string;
|
|
59
|
+
name: string;
|
|
60
|
+
description: string;
|
|
61
|
+
}[];
|
|
62
|
+
};
|
|
63
|
+
export default _default;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
config: Record<string, unknown>;
|
|
3
|
+
};
|
|
4
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
5
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLElement>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export declare const GRAPH_BASE = "https://graph.facebook.com/v25.0/";
|
|
2
|
+
export type GraphParams = Record<string, string | number | boolean | undefined>;
|
|
3
|
+
export type GraphRequest = (token: string, path: string, options?: {
|
|
4
|
+
method?: 'GET' | 'POST';
|
|
5
|
+
query?: GraphParams;
|
|
6
|
+
body?: Record<string, unknown>;
|
|
7
|
+
timeoutMs?: number;
|
|
8
|
+
}) => Promise<Record<string, any>>;
|
|
9
|
+
export declare class WhatsAppProviderError extends Error {
|
|
10
|
+
readonly statusCode: number;
|
|
11
|
+
readonly code: number | null;
|
|
12
|
+
constructor(statusCode: number, message: string, code?: number | null);
|
|
13
|
+
}
|
|
14
|
+
/** The only outbound transport. Never accept an absolute URL or follow paging.next. */
|
|
15
|
+
export declare function createGraphRequest(fetcher?: typeof fetch): GraphRequest;
|
|
16
|
+
/** Shares a wall-clock deadline and request cap across paginated/parallel reads. */
|
|
17
|
+
export declare function budgetGraphRequest(graph: GraphRequest, maxRequests: number, timeoutMs: number): GraphRequest;
|
|
18
|
+
export declare function providerHttpError(error: unknown): never;
|
|
19
|
+
export declare function nullableText(value: unknown, limit?: number): string | null;
|
|
20
|
+
export declare function nextCursor(data: Record<string, any>): string | null;
|
|
21
|
+
export declare function providerRows(data: Record<string, any>): Record<string, any>[];
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { GraphRequest } from './provider';
|
|
2
|
+
export declare const MODULE_KEY = "whatsappBusiness";
|
|
3
|
+
export interface ModuleHandlerDeps {
|
|
4
|
+
decrypt: (value: string) => string;
|
|
5
|
+
/** Test seam. Production always uses the fixed Meta transport. */
|
|
6
|
+
graphRequest?: GraphRequest;
|
|
7
|
+
now?: () => Date;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Account/templates only. No webhook changes, message bodies, message sending or inbox storage.
|
|
11
|
+
* Provider docs: developers.facebook.com/documentation/business-messaging/whatsapp/
|
|
12
|
+
* analytics.md, templates/template-management.md, business-phone-numbers/phone-numbers.md.
|
|
13
|
+
*/
|
|
14
|
+
export declare function createServerHandler(deps: ModuleHandlerDeps): import('h3').EventHandler<import('h3').EventHandlerRequest, any>;
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { WhatsAppTemplate, WhatsAppTemplateDraft } from './types';
|
|
3
|
+
export declare const templateDraftSchema: z.ZodObject<{
|
|
4
|
+
name: z.ZodString;
|
|
5
|
+
language: z.ZodString;
|
|
6
|
+
category: z.ZodEnum<["UTILITY", "MARKETING"]>;
|
|
7
|
+
headerText: z.ZodOptional<z.ZodString>;
|
|
8
|
+
headerExample: z.ZodOptional<z.ZodString>;
|
|
9
|
+
bodyText: z.ZodEffects<z.ZodString, string, string>;
|
|
10
|
+
bodyExamples: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
11
|
+
footerText: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
12
|
+
buttons: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
13
|
+
type: z.ZodLiteral<"QUICK_REPLY">;
|
|
14
|
+
text: z.ZodEffects<z.ZodString, string, string>;
|
|
15
|
+
}, "strict", z.ZodTypeAny, {
|
|
16
|
+
type: "QUICK_REPLY";
|
|
17
|
+
text: string;
|
|
18
|
+
}, {
|
|
19
|
+
type: "QUICK_REPLY";
|
|
20
|
+
text: string;
|
|
21
|
+
}>, z.ZodObject<{
|
|
22
|
+
type: z.ZodLiteral<"URL">;
|
|
23
|
+
text: z.ZodEffects<z.ZodString, string, string>;
|
|
24
|
+
url: z.ZodEffects<z.ZodString, string, string>;
|
|
25
|
+
}, "strict", z.ZodTypeAny, {
|
|
26
|
+
type: "URL";
|
|
27
|
+
text: string;
|
|
28
|
+
url: string;
|
|
29
|
+
}, {
|
|
30
|
+
type: "URL";
|
|
31
|
+
text: string;
|
|
32
|
+
url: string;
|
|
33
|
+
}>, z.ZodObject<{
|
|
34
|
+
type: z.ZodLiteral<"PHONE_NUMBER">;
|
|
35
|
+
text: z.ZodEffects<z.ZodString, string, string>;
|
|
36
|
+
phoneNumber: z.ZodString;
|
|
37
|
+
}, "strict", z.ZodTypeAny, {
|
|
38
|
+
type: "PHONE_NUMBER";
|
|
39
|
+
text: string;
|
|
40
|
+
phoneNumber: string;
|
|
41
|
+
}, {
|
|
42
|
+
type: "PHONE_NUMBER";
|
|
43
|
+
text: string;
|
|
44
|
+
phoneNumber: string;
|
|
45
|
+
}>]>, "many">>;
|
|
46
|
+
}, "strict", z.ZodTypeAny, {
|
|
47
|
+
name: string;
|
|
48
|
+
category: "UTILITY" | "MARKETING";
|
|
49
|
+
language: string;
|
|
50
|
+
bodyText: string;
|
|
51
|
+
buttons?: ({
|
|
52
|
+
type: "QUICK_REPLY";
|
|
53
|
+
text: string;
|
|
54
|
+
} | {
|
|
55
|
+
type: "URL";
|
|
56
|
+
text: string;
|
|
57
|
+
url: string;
|
|
58
|
+
} | {
|
|
59
|
+
type: "PHONE_NUMBER";
|
|
60
|
+
text: string;
|
|
61
|
+
phoneNumber: string;
|
|
62
|
+
})[] | undefined;
|
|
63
|
+
footerText?: string | undefined;
|
|
64
|
+
headerText?: string | undefined;
|
|
65
|
+
headerExample?: string | undefined;
|
|
66
|
+
bodyExamples?: string[] | undefined;
|
|
67
|
+
}, {
|
|
68
|
+
name: string;
|
|
69
|
+
category: "UTILITY" | "MARKETING";
|
|
70
|
+
language: string;
|
|
71
|
+
bodyText: string;
|
|
72
|
+
buttons?: ({
|
|
73
|
+
type: "QUICK_REPLY";
|
|
74
|
+
text: string;
|
|
75
|
+
} | {
|
|
76
|
+
type: "URL";
|
|
77
|
+
text: string;
|
|
78
|
+
url: string;
|
|
79
|
+
} | {
|
|
80
|
+
type: "PHONE_NUMBER";
|
|
81
|
+
text: string;
|
|
82
|
+
phoneNumber: string;
|
|
83
|
+
})[] | undefined;
|
|
84
|
+
footerText?: string | undefined;
|
|
85
|
+
headerText?: string | undefined;
|
|
86
|
+
headerExample?: string | undefined;
|
|
87
|
+
bodyExamples?: string[] | undefined;
|
|
88
|
+
}>;
|
|
89
|
+
/** Positional numbering is sequential; unsupported braces or named fields fail closed. */
|
|
90
|
+
export declare function parameterSignature(text: string): string[];
|
|
91
|
+
export declare function parseTemplateDraft(input: unknown): WhatsAppTemplateDraft;
|
|
92
|
+
export declare function templateComponents(draft: WhatsAppTemplateDraft): Record<string, unknown>[];
|
|
93
|
+
export declare function serializeTemplate(raw: Record<string, any>): WhatsAppTemplate;
|
|
94
|
+
export declare function assertCompatibleEdit(previous: WhatsAppTemplate, draft: WhatsAppTemplateDraft): void;
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
export type WhatsAppPeriod = 7 | 30 | 90;
|
|
2
|
+
export type Availability = 'available' | 'empty' | 'unavailable';
|
|
3
|
+
export interface WhatsAppPermissions {
|
|
4
|
+
view: boolean;
|
|
5
|
+
manageTemplates: boolean;
|
|
6
|
+
manageInsights: boolean;
|
|
7
|
+
}
|
|
8
|
+
export interface WhatsAppConnection {
|
|
9
|
+
/** Metadata for the project integration selected by module config.account. */
|
|
10
|
+
connected: boolean;
|
|
11
|
+
canManageConnection: boolean;
|
|
12
|
+
permissions: WhatsAppPermissions;
|
|
13
|
+
wabaId: string | null;
|
|
14
|
+
phoneNumberId: string | null;
|
|
15
|
+
displayPhoneNumber: string | null;
|
|
16
|
+
verifiedName: string | null;
|
|
17
|
+
updatedAt: string | null;
|
|
18
|
+
}
|
|
19
|
+
export interface WhatsAppPhone {
|
|
20
|
+
id: string;
|
|
21
|
+
displayPhoneNumber: string | null;
|
|
22
|
+
verifiedName: string | null;
|
|
23
|
+
qualityRating: string | null;
|
|
24
|
+
verificationStatus: string | null;
|
|
25
|
+
}
|
|
26
|
+
export interface WhatsAppConnectionTest {
|
|
27
|
+
wabaId: string;
|
|
28
|
+
wabaName: string | null;
|
|
29
|
+
phones: WhatsAppPhone[];
|
|
30
|
+
truncated: boolean;
|
|
31
|
+
}
|
|
32
|
+
export type WhatsAppTemplateButton = {
|
|
33
|
+
type: 'QUICK_REPLY';
|
|
34
|
+
text: string;
|
|
35
|
+
} | {
|
|
36
|
+
type: 'URL';
|
|
37
|
+
text: string;
|
|
38
|
+
url: string;
|
|
39
|
+
} | {
|
|
40
|
+
type: 'PHONE_NUMBER';
|
|
41
|
+
text: string;
|
|
42
|
+
phoneNumber: string;
|
|
43
|
+
};
|
|
44
|
+
/** Deliberately limited to standard text templates with positional parameters. */
|
|
45
|
+
export interface WhatsAppTemplateDraft {
|
|
46
|
+
name: string;
|
|
47
|
+
language: string;
|
|
48
|
+
category: 'UTILITY' | 'MARKETING';
|
|
49
|
+
headerText?: string;
|
|
50
|
+
headerExample?: string;
|
|
51
|
+
bodyText: string;
|
|
52
|
+
bodyExamples?: string[];
|
|
53
|
+
footerText?: string;
|
|
54
|
+
buttons?: WhatsAppTemplateButton[];
|
|
55
|
+
}
|
|
56
|
+
export interface WhatsAppTemplateComponent {
|
|
57
|
+
type: string;
|
|
58
|
+
format?: string;
|
|
59
|
+
text?: string;
|
|
60
|
+
buttons?: Array<{
|
|
61
|
+
type: string;
|
|
62
|
+
text?: string;
|
|
63
|
+
url?: string;
|
|
64
|
+
phoneNumber?: string;
|
|
65
|
+
}>;
|
|
66
|
+
}
|
|
67
|
+
export interface WhatsAppTemplate {
|
|
68
|
+
id: string;
|
|
69
|
+
name: string;
|
|
70
|
+
language: string;
|
|
71
|
+
category: string;
|
|
72
|
+
status: string;
|
|
73
|
+
quality: string | null;
|
|
74
|
+
rejectionReason: string | null;
|
|
75
|
+
components: WhatsAppTemplateComponent[];
|
|
76
|
+
editable: boolean;
|
|
77
|
+
editReason: string | null;
|
|
78
|
+
draft: WhatsAppTemplateDraft | null;
|
|
79
|
+
}
|
|
80
|
+
export interface WhatsAppTemplatePage {
|
|
81
|
+
templates: WhatsAppTemplate[];
|
|
82
|
+
nextCursor: string | null;
|
|
83
|
+
}
|
|
84
|
+
export interface WhatsAppTemplateMutation {
|
|
85
|
+
id: string;
|
|
86
|
+
status: string | null;
|
|
87
|
+
category: string | null;
|
|
88
|
+
success: boolean;
|
|
89
|
+
}
|
|
90
|
+
export interface WhatsAppSection<T> {
|
|
91
|
+
state: Availability;
|
|
92
|
+
reason: string | null;
|
|
93
|
+
data: T | null;
|
|
94
|
+
}
|
|
95
|
+
export interface WhatsAppAccount {
|
|
96
|
+
id: string;
|
|
97
|
+
name: string | null;
|
|
98
|
+
status: string | null;
|
|
99
|
+
currency: string | null;
|
|
100
|
+
verificationStatus: string | null;
|
|
101
|
+
reviewStatus: string | null;
|
|
102
|
+
}
|
|
103
|
+
export interface WhatsAppHealth {
|
|
104
|
+
canSendMessage: string | null;
|
|
105
|
+
entities: Array<{
|
|
106
|
+
id: string | null;
|
|
107
|
+
type: string | null;
|
|
108
|
+
canSendMessage: string | null;
|
|
109
|
+
}>;
|
|
110
|
+
}
|
|
111
|
+
export interface WhatsAppProfile {
|
|
112
|
+
about: string | null;
|
|
113
|
+
address: string | null;
|
|
114
|
+
description: string | null;
|
|
115
|
+
email: string | null;
|
|
116
|
+
vertical: string | null;
|
|
117
|
+
websites: string[];
|
|
118
|
+
}
|
|
119
|
+
export interface WhatsAppOverview {
|
|
120
|
+
account: WhatsAppSection<WhatsAppAccount>;
|
|
121
|
+
phone: WhatsAppSection<WhatsAppPhone>;
|
|
122
|
+
health: WhatsAppSection<WhatsAppHealth>;
|
|
123
|
+
profile: WhatsAppSection<WhatsAppProfile>;
|
|
124
|
+
}
|
|
125
|
+
export interface WhatsAppDailyMetric {
|
|
126
|
+
start: number;
|
|
127
|
+
end: number;
|
|
128
|
+
sent: number | null;
|
|
129
|
+
delivered: number | null;
|
|
130
|
+
}
|
|
131
|
+
export interface WhatsAppMessageAnalytics {
|
|
132
|
+
sent: number | null;
|
|
133
|
+
delivered: number | null;
|
|
134
|
+
points: WhatsAppDailyMetric[];
|
|
135
|
+
}
|
|
136
|
+
export interface WhatsAppTemplateMetric {
|
|
137
|
+
id: string;
|
|
138
|
+
name: string;
|
|
139
|
+
language: string;
|
|
140
|
+
sent: number | null;
|
|
141
|
+
delivered: number | null;
|
|
142
|
+
read: number | null;
|
|
143
|
+
clicked: number | null;
|
|
144
|
+
amountSpent: number | null;
|
|
145
|
+
}
|
|
146
|
+
export interface WhatsAppTemplateAnalytics {
|
|
147
|
+
templates: WhatsAppTemplateMetric[];
|
|
148
|
+
currency: string | null;
|
|
149
|
+
truncated: boolean;
|
|
150
|
+
}
|
|
151
|
+
export interface WhatsAppInsights {
|
|
152
|
+
days: WhatsAppPeriod;
|
|
153
|
+
start: number;
|
|
154
|
+
end: number;
|
|
155
|
+
timezone: 'UTC';
|
|
156
|
+
phoneNumber: string;
|
|
157
|
+
enabled: boolean | null;
|
|
158
|
+
canEnable: boolean;
|
|
159
|
+
/** Selected phone only. Template analytics below cover the whole WABA. */
|
|
160
|
+
messages: WhatsAppSection<WhatsAppMessageAnalytics>;
|
|
161
|
+
templates: WhatsAppSection<WhatsAppTemplateAnalytics>;
|
|
162
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const p=require("./TableResultView.vue_vue_type_script_setup_true_lang-
|
|
1
|
+
"use strict";const p=require("./TableResultView.vue_vue_type_script_setup_true_lang-C3XiOXgb.js"),_=1500,E=8*1024*1024,S=256*1024,g=2e4,T=String.raw`
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
4
|
const nativePostMessage = self.postMessage.bind(self);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { s as p } from "./TableResultView.vue_vue_type_script_setup_true_lang-
|
|
1
|
+
import { s as p } from "./TableResultView.vue_vue_type_script_setup_true_lang-sp0TLio0.mjs";
|
|
2
2
|
const E = 1500, S = 8 * 1024 * 1024, _ = 256 * 1024, g = 2e4, M = String.raw`
|
|
3
3
|
'use strict';
|
|
4
4
|
|