tychat-contracts 1.6.26 → 1.6.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/dist/campaigns/campaign-recipient.dto.d.ts +25 -0
- package/dist/campaigns/campaign-recipient.dto.d.ts.map +1 -0
- package/dist/campaigns/campaign-recipient.dto.js +2 -0
- package/dist/campaigns/campaign-refund.dto.d.ts +32 -0
- package/dist/campaigns/campaign-refund.dto.d.ts.map +1 -0
- package/dist/campaigns/campaign-refund.dto.js +2 -0
- package/dist/campaigns/campaign-status.dto.d.ts +11 -0
- package/dist/campaigns/campaign-status.dto.d.ts.map +1 -0
- package/dist/campaigns/campaign-status.dto.js +33 -0
- package/dist/campaigns/campaign-template.dto.d.ts +34 -0
- package/dist/campaigns/campaign-template.dto.d.ts.map +1 -0
- package/dist/campaigns/campaign-template.dto.js +2 -0
- package/dist/campaigns/campaign.dto.d.ts +45 -0
- package/dist/campaigns/campaign.dto.d.ts.map +1 -0
- package/dist/campaigns/campaign.dto.js +2 -0
- package/dist/campaigns/create-campaign.dto.d.ts +59 -0
- package/dist/campaigns/create-campaign.dto.d.ts.map +1 -0
- package/dist/campaigns/create-campaign.dto.js +2 -0
- package/dist/campaigns/index.d.ts +7 -0
- package/dist/campaigns/index.d.ts.map +1 -0
- package/dist/campaigns/index.js +22 -0
- package/dist/configurations/app-module-policy.enums.d.ts +1 -1
- package/dist/configurations/app-module-policy.enums.d.ts.map +1 -1
- package/dist/configurations/app-module-policy.enums.js +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/package.json +1 -1
- package/src/campaigns/campaign-recipient.dto.ts +26 -0
- package/src/campaigns/campaign-refund.dto.ts +34 -0
- package/src/campaigns/campaign-status.dto.ts +44 -0
- package/src/campaigns/campaign-template.dto.ts +38 -0
- package/src/campaigns/campaign.dto.ts +47 -0
- package/src/campaigns/create-campaign.dto.ts +70 -0
- package/src/campaigns/index.ts +6 -0
- package/src/configurations/app-module-policy.enums.ts +1 -0
- package/src/index.ts +1 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { RecipientStatusDto } from './campaign-status.dto';
|
|
2
|
+
export interface CampaignRecipientDto {
|
|
3
|
+
id: string;
|
|
4
|
+
campaignId: string;
|
|
5
|
+
patientId: string;
|
|
6
|
+
phoneNumber: string;
|
|
7
|
+
patientName: string | null;
|
|
8
|
+
status: RecipientStatusDto;
|
|
9
|
+
whatsappMessageId: string | null;
|
|
10
|
+
errorMessage: string | null;
|
|
11
|
+
sentAt: string | null;
|
|
12
|
+
deliveredAt: string | null;
|
|
13
|
+
readAt: string | null;
|
|
14
|
+
repliedAt: string | null;
|
|
15
|
+
retryCount: number;
|
|
16
|
+
createdAt: string;
|
|
17
|
+
updatedAt: string;
|
|
18
|
+
}
|
|
19
|
+
export interface CampaignRecipientListResponseDto {
|
|
20
|
+
items: CampaignRecipientDto[];
|
|
21
|
+
total: number;
|
|
22
|
+
page: number;
|
|
23
|
+
limit: number;
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=campaign-recipient.dto.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"campaign-recipient.dto.d.ts","sourceRoot":"","sources":["../../src/campaigns/campaign-recipient.dto.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAEhE,MAAM,WAAW,oBAAoB;IACnC,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,MAAM,EAAE,kBAAkB,CAAC;IAC3B,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,gCAAgC;IAC/C,KAAK,EAAE,oBAAoB,EAAE,CAAC;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { RefundCaseStatusDto } from './campaign-status.dto';
|
|
2
|
+
import type { CampaignDto } from './campaign.dto';
|
|
3
|
+
export interface CampaignRefundCaseDto {
|
|
4
|
+
id: string;
|
|
5
|
+
tenantId: string;
|
|
6
|
+
campaignId: string;
|
|
7
|
+
campaign?: CampaignDto;
|
|
8
|
+
status: RefundCaseStatusDto;
|
|
9
|
+
totalPaidCents: number;
|
|
10
|
+
amountUsedCents: number;
|
|
11
|
+
refundAmountCents: number;
|
|
12
|
+
messagesSentBeforeCancel: number;
|
|
13
|
+
cancellationReason: string | null;
|
|
14
|
+
adminNotes: string | null;
|
|
15
|
+
processedByAdminId: string | null;
|
|
16
|
+
processedAt: string | null;
|
|
17
|
+
createdAt: string;
|
|
18
|
+
updatedAt: string;
|
|
19
|
+
}
|
|
20
|
+
export interface CampaignRefundCaseListResponseDto {
|
|
21
|
+
items: CampaignRefundCaseDto[];
|
|
22
|
+
total: number;
|
|
23
|
+
page: number;
|
|
24
|
+
limit: number;
|
|
25
|
+
}
|
|
26
|
+
export interface ProcessRefundRequestDto {
|
|
27
|
+
refundCaseId: string;
|
|
28
|
+
newStatus: 'analyzing' | 'approved' | 'rejected' | 'processed';
|
|
29
|
+
adminNotes?: string;
|
|
30
|
+
processedByAdminId?: string;
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=campaign-refund.dto.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"campaign-refund.dto.d.ts","sourceRoot":"","sources":["../../src/campaigns/campaign-refund.dto.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD,MAAM,WAAW,qBAAqB;IACpC,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,WAAW,CAAC;IACvB,MAAM,EAAE,mBAAmB,CAAC;IAC5B,cAAc,EAAE,MAAM,CAAC;IACvB,eAAe,EAAE,MAAM,CAAC;IACxB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,wBAAwB,EAAE,MAAM,CAAC;IACjC,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,iCAAiC;IAChD,KAAK,EAAE,qBAAqB,EAAE,CAAC;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,uBAAuB;IACtC,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,WAAW,GAAG,UAAU,GAAG,UAAU,GAAG,WAAW,CAAC;IAC/D,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const CAMPAIGN_STATUSES: readonly ["draft", "awaiting_template", "awaiting_payment", "ready", "sending", "paused", "completed", "cancelled", "pending_refund", "refund_approved"];
|
|
2
|
+
export type CampaignStatusDto = (typeof CAMPAIGN_STATUSES)[number];
|
|
3
|
+
export declare const RECIPIENT_STATUSES: readonly ["pending", "queued", "sent", "delivered", "read", "failed", "skipped"];
|
|
4
|
+
export type RecipientStatusDto = (typeof RECIPIENT_STATUSES)[number];
|
|
5
|
+
export declare const TEMPLATE_META_STATUSES: readonly ["pending", "approved", "rejected"];
|
|
6
|
+
export type TemplateMetaStatusDto = (typeof TEMPLATE_META_STATUSES)[number];
|
|
7
|
+
export declare const TEMPLATE_CATEGORIES: readonly ["MARKETING", "UTILITY"];
|
|
8
|
+
export type TemplateCategoryDto = (typeof TEMPLATE_CATEGORIES)[number];
|
|
9
|
+
export declare const REFUND_CASE_STATUSES: readonly ["pending", "analyzing", "approved", "rejected", "processed"];
|
|
10
|
+
export type RefundCaseStatusDto = (typeof REFUND_CASE_STATUSES)[number];
|
|
11
|
+
//# sourceMappingURL=campaign-status.dto.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"campaign-status.dto.d.ts","sourceRoot":"","sources":["../../src/campaigns/campaign-status.dto.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,iBAAiB,0JAWpB,CAAC;AAEX,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEnE,eAAO,MAAM,kBAAkB,kFAQrB,CAAC;AAEX,MAAM,MAAM,kBAAkB,GAAG,CAAC,OAAO,kBAAkB,CAAC,CAAC,MAAM,CAAC,CAAC;AAErE,eAAO,MAAM,sBAAsB,8CAA+C,CAAC;AAEnF,MAAM,MAAM,qBAAqB,GAAG,CAAC,OAAO,sBAAsB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE5E,eAAO,MAAM,mBAAmB,mCAAoC,CAAC;AAErE,MAAM,MAAM,mBAAmB,GAAG,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEvE,eAAO,MAAM,oBAAoB,wEAMvB,CAAC;AAEX,MAAM,MAAM,mBAAmB,GAAG,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,CAAC,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.REFUND_CASE_STATUSES = exports.TEMPLATE_CATEGORIES = exports.TEMPLATE_META_STATUSES = exports.RECIPIENT_STATUSES = exports.CAMPAIGN_STATUSES = void 0;
|
|
4
|
+
exports.CAMPAIGN_STATUSES = [
|
|
5
|
+
'draft',
|
|
6
|
+
'awaiting_template',
|
|
7
|
+
'awaiting_payment',
|
|
8
|
+
'ready',
|
|
9
|
+
'sending',
|
|
10
|
+
'paused',
|
|
11
|
+
'completed',
|
|
12
|
+
'cancelled',
|
|
13
|
+
'pending_refund',
|
|
14
|
+
'refund_approved',
|
|
15
|
+
];
|
|
16
|
+
exports.RECIPIENT_STATUSES = [
|
|
17
|
+
'pending',
|
|
18
|
+
'queued',
|
|
19
|
+
'sent',
|
|
20
|
+
'delivered',
|
|
21
|
+
'read',
|
|
22
|
+
'failed',
|
|
23
|
+
'skipped',
|
|
24
|
+
];
|
|
25
|
+
exports.TEMPLATE_META_STATUSES = ['pending', 'approved', 'rejected'];
|
|
26
|
+
exports.TEMPLATE_CATEGORIES = ['MARKETING', 'UTILITY'];
|
|
27
|
+
exports.REFUND_CASE_STATUSES = [
|
|
28
|
+
'pending',
|
|
29
|
+
'analyzing',
|
|
30
|
+
'approved',
|
|
31
|
+
'rejected',
|
|
32
|
+
'processed',
|
|
33
|
+
];
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { TemplateCategoryDto, TemplateMetaStatusDto } from './campaign-status.dto';
|
|
2
|
+
export interface CampaignTemplateDto {
|
|
3
|
+
id: string;
|
|
4
|
+
tenantId: string;
|
|
5
|
+
name: string;
|
|
6
|
+
languageCode: string;
|
|
7
|
+
category: TemplateCategoryDto | null;
|
|
8
|
+
metaTemplateName: string | null;
|
|
9
|
+
metaTemplateId: string | null;
|
|
10
|
+
metaStatus: TemplateMetaStatusDto | null;
|
|
11
|
+
headerText: string | null;
|
|
12
|
+
bodyText: string;
|
|
13
|
+
footerText: string | null;
|
|
14
|
+
buttons: Record<string, unknown>[] | null;
|
|
15
|
+
isOfficial: boolean;
|
|
16
|
+
metaSyncedAt: string | null;
|
|
17
|
+
createdAt: string;
|
|
18
|
+
updatedAt: string;
|
|
19
|
+
}
|
|
20
|
+
export interface CampaignTemplateListResponseDto {
|
|
21
|
+
items: CampaignTemplateDto[];
|
|
22
|
+
}
|
|
23
|
+
export interface TemplateVariablePreviewDto {
|
|
24
|
+
variableName: string;
|
|
25
|
+
sampleValue: string;
|
|
26
|
+
}
|
|
27
|
+
export interface TemplatePreviewRequestDto {
|
|
28
|
+
bodyText: string;
|
|
29
|
+
variables: TemplateVariablePreviewDto[];
|
|
30
|
+
}
|
|
31
|
+
export interface TemplatePreviewResponseDto {
|
|
32
|
+
previewText: string;
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=campaign-template.dto.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"campaign-template.dto.d.ts","sourceRoot":"","sources":["../../src/campaigns/campaign-template.dto.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAExF,MAAM,WAAW,mBAAmB;IAClC,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,mBAAmB,GAAG,IAAI,CAAC;IACrC,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,UAAU,EAAE,qBAAqB,GAAG,IAAI,CAAC;IACzC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,GAAG,IAAI,CAAC;IAC1C,UAAU,EAAE,OAAO,CAAC;IACpB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,+BAA+B;IAC9C,KAAK,EAAE,mBAAmB,EAAE,CAAC;CAC9B;AAED,MAAM,WAAW,0BAA0B;IACzC,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,yBAAyB;IACxC,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,0BAA0B,EAAE,CAAC;CACzC;AAED,MAAM,WAAW,0BAA0B;IACzC,WAAW,EAAE,MAAM,CAAC;CACrB"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { CampaignStatusDto, TemplateCategoryDto } from './campaign-status.dto';
|
|
2
|
+
export interface CampaignDto {
|
|
3
|
+
id: string;
|
|
4
|
+
tenantId: string;
|
|
5
|
+
name: string;
|
|
6
|
+
status: CampaignStatusDto;
|
|
7
|
+
templateId: string | null;
|
|
8
|
+
isOfficial: boolean;
|
|
9
|
+
templateCategory: TemplateCategoryDto | null;
|
|
10
|
+
audienceFilters: Record<string, unknown>[] | null;
|
|
11
|
+
totalRecipients: number;
|
|
12
|
+
sentCount: number;
|
|
13
|
+
deliveredCount: number;
|
|
14
|
+
readCount: number;
|
|
15
|
+
failedCount: number;
|
|
16
|
+
repliedCount: number;
|
|
17
|
+
delayBetweenSendsMs: number;
|
|
18
|
+
estimatedCostCents: number;
|
|
19
|
+
actualCostCents: number;
|
|
20
|
+
billingId: string | null;
|
|
21
|
+
paymentConfirmed: boolean;
|
|
22
|
+
scheduledAt: string | null;
|
|
23
|
+
startedAt: string | null;
|
|
24
|
+
completedAt: string | null;
|
|
25
|
+
pausedAt: string | null;
|
|
26
|
+
createdByUserId: string | null;
|
|
27
|
+
createdAt: string;
|
|
28
|
+
updatedAt: string;
|
|
29
|
+
}
|
|
30
|
+
export interface CampaignListResponseDto {
|
|
31
|
+
items: CampaignDto[];
|
|
32
|
+
total: number;
|
|
33
|
+
page: number;
|
|
34
|
+
limit: number;
|
|
35
|
+
}
|
|
36
|
+
export interface CampaignStatsDto {
|
|
37
|
+
total: number;
|
|
38
|
+
pending: number;
|
|
39
|
+
sent: number;
|
|
40
|
+
delivered: number;
|
|
41
|
+
read: number;
|
|
42
|
+
failed: number;
|
|
43
|
+
replied: number;
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=campaign.dto.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"campaign.dto.d.ts","sourceRoot":"","sources":["../../src/campaigns/campaign.dto.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAEpF,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,iBAAiB,CAAC;IAC1B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,UAAU,EAAE,OAAO,CAAC;IACpB,gBAAgB,EAAE,mBAAmB,GAAG,IAAI,CAAC;IAC7C,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,GAAG,IAAI,CAAC;IAClD,eAAe,EAAE,MAAM,CAAC;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,EAAE,MAAM,CAAC;IACvB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,kBAAkB,EAAE,MAAM,CAAC;IAC3B,eAAe,EAAE,MAAM,CAAC;IACxB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,uBAAuB;IACtC,KAAK,EAAE,WAAW,EAAE,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;CACjB"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import type { TemplateCategoryDto } from './campaign-status.dto';
|
|
2
|
+
export interface CreateCampaignRequestDto {
|
|
3
|
+
name: string;
|
|
4
|
+
templateId?: string;
|
|
5
|
+
isOfficial?: boolean;
|
|
6
|
+
audienceFilters?: Record<string, unknown>[];
|
|
7
|
+
delayBetweenSendsMs?: number;
|
|
8
|
+
scheduledAt?: string;
|
|
9
|
+
}
|
|
10
|
+
export interface UpdateCampaignRequestDto {
|
|
11
|
+
name?: string;
|
|
12
|
+
templateId?: string;
|
|
13
|
+
audienceFilters?: Record<string, unknown>[];
|
|
14
|
+
delayBetweenSendsMs?: number;
|
|
15
|
+
scheduledAt?: string;
|
|
16
|
+
}
|
|
17
|
+
export interface CreateCampaignTemplateRequestDto {
|
|
18
|
+
name: string;
|
|
19
|
+
languageCode?: string;
|
|
20
|
+
category?: TemplateCategoryDto;
|
|
21
|
+
bodyText: string;
|
|
22
|
+
headerText?: string;
|
|
23
|
+
footerText?: string;
|
|
24
|
+
isOfficial?: boolean;
|
|
25
|
+
buttons?: Record<string, unknown>[];
|
|
26
|
+
}
|
|
27
|
+
export interface StartCampaignRequestDto {
|
|
28
|
+
campaignId: string;
|
|
29
|
+
}
|
|
30
|
+
export interface PauseCampaignRequestDto {
|
|
31
|
+
campaignId: string;
|
|
32
|
+
}
|
|
33
|
+
export interface ResumeCampaignRequestDto {
|
|
34
|
+
campaignId: string;
|
|
35
|
+
}
|
|
36
|
+
export interface CancelCampaignRequestDto {
|
|
37
|
+
campaignId: string;
|
|
38
|
+
reason?: string;
|
|
39
|
+
}
|
|
40
|
+
export interface ConfirmCampaignPaymentRequestDto {
|
|
41
|
+
campaignId: string;
|
|
42
|
+
billingId: string;
|
|
43
|
+
}
|
|
44
|
+
export interface PopulateRecipientsRequestDto {
|
|
45
|
+
campaignId: string;
|
|
46
|
+
}
|
|
47
|
+
export interface PopulateRecipientsResponseDto {
|
|
48
|
+
count: number;
|
|
49
|
+
}
|
|
50
|
+
export interface CampaignCostEstimateRequestDto {
|
|
51
|
+
campaignId: string;
|
|
52
|
+
}
|
|
53
|
+
export interface CampaignCostEstimateResponseDto {
|
|
54
|
+
totalRecipients: number;
|
|
55
|
+
costPerMessageCents: number;
|
|
56
|
+
estimatedTotalCents: number;
|
|
57
|
+
category: TemplateCategoryDto;
|
|
58
|
+
}
|
|
59
|
+
//# sourceMappingURL=create-campaign.dto.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-campaign.dto.d.ts","sourceRoot":"","sources":["../../src/campaigns/create-campaign.dto.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAEjE,MAAM,WAAW,wBAAwB;IACvC,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC;IAC5C,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,wBAAwB;IACvC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC;IAC5C,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,gCAAgC;IAC/C,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,mBAAmB,CAAC;IAC/B,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC;CACrC;AAED,MAAM,WAAW,uBAAuB;IACtC,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,uBAAuB;IACtC,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,wBAAwB;IACvC,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,wBAAwB;IACvC,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,gCAAgC;IAC/C,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,4BAA4B;IAC3C,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,6BAA6B;IAC5C,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,8BAA8B;IAC7C,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,+BAA+B;IAC9C,eAAe,EAAE,MAAM,CAAC;IACxB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,mBAAmB,EAAE,MAAM,CAAC;IAC5B,QAAQ,EAAE,mBAAmB,CAAC;CAC/B"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export * from './campaign-status.dto';
|
|
2
|
+
export * from './campaign.dto';
|
|
3
|
+
export * from './campaign-template.dto';
|
|
4
|
+
export * from './campaign-recipient.dto';
|
|
5
|
+
export * from './campaign-refund.dto';
|
|
6
|
+
export * from './create-campaign.dto';
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/campaigns/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,yBAAyB,CAAC;AACxC,cAAc,0BAA0B,CAAC;AACzC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./campaign-status.dto"), exports);
|
|
18
|
+
__exportStar(require("./campaign.dto"), exports);
|
|
19
|
+
__exportStar(require("./campaign-template.dto"), exports);
|
|
20
|
+
__exportStar(require("./campaign-recipient.dto"), exports);
|
|
21
|
+
__exportStar(require("./campaign-refund.dto"), exports);
|
|
22
|
+
__exportStar(require("./create-campaign.dto"), exports);
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Módulos da aplicação web do tenant (Tychat-v2), controlados por plano e override por tenant.
|
|
3
3
|
* Valores estáveis para API e persistência.
|
|
4
4
|
*/
|
|
5
|
-
export declare const TYCHAT_APP_MODULE_KEYS: readonly ["dashboard", "check_in", "check_out", "schedule", "conversations", "patients", "patients_documents", "patients_legal_terms", "clinic_legal_terms", "legal_terms_digital_signature", "patients_anamneses", "clinic_anamneses", "ai_conversation", "follow_up", "funnel", "satisfaction", "clinic", "billings", "connections", "settings"];
|
|
5
|
+
export declare const TYCHAT_APP_MODULE_KEYS: readonly ["dashboard", "check_in", "check_out", "schedule", "conversations", "patients", "patients_documents", "patients_legal_terms", "clinic_legal_terms", "legal_terms_digital_signature", "patients_anamneses", "clinic_anamneses", "ai_conversation", "follow_up", "funnel", "satisfaction", "clinic", "billings", "connections", "settings", "campaigns"];
|
|
6
6
|
export type TychatAppModuleKey = (typeof TYCHAT_APP_MODULE_KEYS)[number];
|
|
7
7
|
export declare const TYCHAT_APP_MODULE_POLICY_LEVELS: readonly ["default", "plan", "tenant"];
|
|
8
8
|
export type TychatAppModulePolicyLevel = (typeof TYCHAT_APP_MODULE_POLICY_LEVELS)[number];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app-module-policy.enums.d.ts","sourceRoot":"","sources":["../../src/configurations/app-module-policy.enums.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,sBAAsB,
|
|
1
|
+
{"version":3,"file":"app-module-policy.enums.d.ts","sourceRoot":"","sources":["../../src/configurations/app-module-policy.enums.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,sBAAsB,iWAsBzB,CAAC;AAEX,MAAM,MAAM,kBAAkB,GAAG,CAAC,OAAO,sBAAsB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEzE,eAAO,MAAM,+BAA+B,wCAAyC,CAAC;AACtF,MAAM,MAAM,0BAA0B,GAAG,CAAC,OAAO,+BAA+B,CAAC,CAAC,MAAM,CAAC,CAAC"}
|
package/dist/index.d.ts
CHANGED
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,mBAAmB,CAAC;AAClC,cAAc,MAAM,CAAC;AACrB,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,mBAAmB,CAAC;AAClC,cAAc,MAAM,CAAC;AACrB,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC"}
|
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { RecipientStatusDto } from './campaign-status.dto';
|
|
2
|
+
|
|
3
|
+
export interface CampaignRecipientDto {
|
|
4
|
+
id: string;
|
|
5
|
+
campaignId: string;
|
|
6
|
+
patientId: string;
|
|
7
|
+
phoneNumber: string;
|
|
8
|
+
patientName: string | null;
|
|
9
|
+
status: RecipientStatusDto;
|
|
10
|
+
whatsappMessageId: string | null;
|
|
11
|
+
errorMessage: string | null;
|
|
12
|
+
sentAt: string | null;
|
|
13
|
+
deliveredAt: string | null;
|
|
14
|
+
readAt: string | null;
|
|
15
|
+
repliedAt: string | null;
|
|
16
|
+
retryCount: number;
|
|
17
|
+
createdAt: string;
|
|
18
|
+
updatedAt: string;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface CampaignRecipientListResponseDto {
|
|
22
|
+
items: CampaignRecipientDto[];
|
|
23
|
+
total: number;
|
|
24
|
+
page: number;
|
|
25
|
+
limit: number;
|
|
26
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { RefundCaseStatusDto } from './campaign-status.dto';
|
|
2
|
+
import type { CampaignDto } from './campaign.dto';
|
|
3
|
+
|
|
4
|
+
export interface CampaignRefundCaseDto {
|
|
5
|
+
id: string;
|
|
6
|
+
tenantId: string;
|
|
7
|
+
campaignId: string;
|
|
8
|
+
campaign?: CampaignDto;
|
|
9
|
+
status: RefundCaseStatusDto;
|
|
10
|
+
totalPaidCents: number;
|
|
11
|
+
amountUsedCents: number;
|
|
12
|
+
refundAmountCents: number;
|
|
13
|
+
messagesSentBeforeCancel: number;
|
|
14
|
+
cancellationReason: string | null;
|
|
15
|
+
adminNotes: string | null;
|
|
16
|
+
processedByAdminId: string | null;
|
|
17
|
+
processedAt: string | null;
|
|
18
|
+
createdAt: string;
|
|
19
|
+
updatedAt: string;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface CampaignRefundCaseListResponseDto {
|
|
23
|
+
items: CampaignRefundCaseDto[];
|
|
24
|
+
total: number;
|
|
25
|
+
page: number;
|
|
26
|
+
limit: number;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export interface ProcessRefundRequestDto {
|
|
30
|
+
refundCaseId: string;
|
|
31
|
+
newStatus: 'analyzing' | 'approved' | 'rejected' | 'processed';
|
|
32
|
+
adminNotes?: string;
|
|
33
|
+
processedByAdminId?: string;
|
|
34
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
export const CAMPAIGN_STATUSES = [
|
|
2
|
+
'draft',
|
|
3
|
+
'awaiting_template',
|
|
4
|
+
'awaiting_payment',
|
|
5
|
+
'ready',
|
|
6
|
+
'sending',
|
|
7
|
+
'paused',
|
|
8
|
+
'completed',
|
|
9
|
+
'cancelled',
|
|
10
|
+
'pending_refund',
|
|
11
|
+
'refund_approved',
|
|
12
|
+
] as const;
|
|
13
|
+
|
|
14
|
+
export type CampaignStatusDto = (typeof CAMPAIGN_STATUSES)[number];
|
|
15
|
+
|
|
16
|
+
export const RECIPIENT_STATUSES = [
|
|
17
|
+
'pending',
|
|
18
|
+
'queued',
|
|
19
|
+
'sent',
|
|
20
|
+
'delivered',
|
|
21
|
+
'read',
|
|
22
|
+
'failed',
|
|
23
|
+
'skipped',
|
|
24
|
+
] as const;
|
|
25
|
+
|
|
26
|
+
export type RecipientStatusDto = (typeof RECIPIENT_STATUSES)[number];
|
|
27
|
+
|
|
28
|
+
export const TEMPLATE_META_STATUSES = ['pending', 'approved', 'rejected'] as const;
|
|
29
|
+
|
|
30
|
+
export type TemplateMetaStatusDto = (typeof TEMPLATE_META_STATUSES)[number];
|
|
31
|
+
|
|
32
|
+
export const TEMPLATE_CATEGORIES = ['MARKETING', 'UTILITY'] as const;
|
|
33
|
+
|
|
34
|
+
export type TemplateCategoryDto = (typeof TEMPLATE_CATEGORIES)[number];
|
|
35
|
+
|
|
36
|
+
export const REFUND_CASE_STATUSES = [
|
|
37
|
+
'pending',
|
|
38
|
+
'analyzing',
|
|
39
|
+
'approved',
|
|
40
|
+
'rejected',
|
|
41
|
+
'processed',
|
|
42
|
+
] as const;
|
|
43
|
+
|
|
44
|
+
export type RefundCaseStatusDto = (typeof REFUND_CASE_STATUSES)[number];
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { TemplateCategoryDto, TemplateMetaStatusDto } from './campaign-status.dto';
|
|
2
|
+
|
|
3
|
+
export interface CampaignTemplateDto {
|
|
4
|
+
id: string;
|
|
5
|
+
tenantId: string;
|
|
6
|
+
name: string;
|
|
7
|
+
languageCode: string;
|
|
8
|
+
category: TemplateCategoryDto | null;
|
|
9
|
+
metaTemplateName: string | null;
|
|
10
|
+
metaTemplateId: string | null;
|
|
11
|
+
metaStatus: TemplateMetaStatusDto | null;
|
|
12
|
+
headerText: string | null;
|
|
13
|
+
bodyText: string;
|
|
14
|
+
footerText: string | null;
|
|
15
|
+
buttons: Record<string, unknown>[] | null;
|
|
16
|
+
isOfficial: boolean;
|
|
17
|
+
metaSyncedAt: string | null;
|
|
18
|
+
createdAt: string;
|
|
19
|
+
updatedAt: string;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface CampaignTemplateListResponseDto {
|
|
23
|
+
items: CampaignTemplateDto[];
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export interface TemplateVariablePreviewDto {
|
|
27
|
+
variableName: string;
|
|
28
|
+
sampleValue: string;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export interface TemplatePreviewRequestDto {
|
|
32
|
+
bodyText: string;
|
|
33
|
+
variables: TemplateVariablePreviewDto[];
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export interface TemplatePreviewResponseDto {
|
|
37
|
+
previewText: string;
|
|
38
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { CampaignStatusDto, TemplateCategoryDto } from './campaign-status.dto';
|
|
2
|
+
|
|
3
|
+
export interface CampaignDto {
|
|
4
|
+
id: string;
|
|
5
|
+
tenantId: string;
|
|
6
|
+
name: string;
|
|
7
|
+
status: CampaignStatusDto;
|
|
8
|
+
templateId: string | null;
|
|
9
|
+
isOfficial: boolean;
|
|
10
|
+
templateCategory: TemplateCategoryDto | null;
|
|
11
|
+
audienceFilters: Record<string, unknown>[] | null;
|
|
12
|
+
totalRecipients: number;
|
|
13
|
+
sentCount: number;
|
|
14
|
+
deliveredCount: number;
|
|
15
|
+
readCount: number;
|
|
16
|
+
failedCount: number;
|
|
17
|
+
repliedCount: number;
|
|
18
|
+
delayBetweenSendsMs: number;
|
|
19
|
+
estimatedCostCents: number;
|
|
20
|
+
actualCostCents: number;
|
|
21
|
+
billingId: string | null;
|
|
22
|
+
paymentConfirmed: boolean;
|
|
23
|
+
scheduledAt: string | null;
|
|
24
|
+
startedAt: string | null;
|
|
25
|
+
completedAt: string | null;
|
|
26
|
+
pausedAt: string | null;
|
|
27
|
+
createdByUserId: string | null;
|
|
28
|
+
createdAt: string;
|
|
29
|
+
updatedAt: string;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export interface CampaignListResponseDto {
|
|
33
|
+
items: CampaignDto[];
|
|
34
|
+
total: number;
|
|
35
|
+
page: number;
|
|
36
|
+
limit: number;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export interface CampaignStatsDto {
|
|
40
|
+
total: number;
|
|
41
|
+
pending: number;
|
|
42
|
+
sent: number;
|
|
43
|
+
delivered: number;
|
|
44
|
+
read: number;
|
|
45
|
+
failed: number;
|
|
46
|
+
replied: number;
|
|
47
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import type { TemplateCategoryDto } from './campaign-status.dto';
|
|
2
|
+
|
|
3
|
+
export interface CreateCampaignRequestDto {
|
|
4
|
+
name: string;
|
|
5
|
+
templateId?: string;
|
|
6
|
+
isOfficial?: boolean;
|
|
7
|
+
audienceFilters?: Record<string, unknown>[];
|
|
8
|
+
delayBetweenSendsMs?: number;
|
|
9
|
+
scheduledAt?: string;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export interface UpdateCampaignRequestDto {
|
|
13
|
+
name?: string;
|
|
14
|
+
templateId?: string;
|
|
15
|
+
audienceFilters?: Record<string, unknown>[];
|
|
16
|
+
delayBetweenSendsMs?: number;
|
|
17
|
+
scheduledAt?: string;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export interface CreateCampaignTemplateRequestDto {
|
|
21
|
+
name: string;
|
|
22
|
+
languageCode?: string;
|
|
23
|
+
category?: TemplateCategoryDto;
|
|
24
|
+
bodyText: string;
|
|
25
|
+
headerText?: string;
|
|
26
|
+
footerText?: string;
|
|
27
|
+
isOfficial?: boolean;
|
|
28
|
+
buttons?: Record<string, unknown>[];
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export interface StartCampaignRequestDto {
|
|
32
|
+
campaignId: string;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export interface PauseCampaignRequestDto {
|
|
36
|
+
campaignId: string;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export interface ResumeCampaignRequestDto {
|
|
40
|
+
campaignId: string;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export interface CancelCampaignRequestDto {
|
|
44
|
+
campaignId: string;
|
|
45
|
+
reason?: string;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export interface ConfirmCampaignPaymentRequestDto {
|
|
49
|
+
campaignId: string;
|
|
50
|
+
billingId: string;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export interface PopulateRecipientsRequestDto {
|
|
54
|
+
campaignId: string;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export interface PopulateRecipientsResponseDto {
|
|
58
|
+
count: number;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export interface CampaignCostEstimateRequestDto {
|
|
62
|
+
campaignId: string;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export interface CampaignCostEstimateResponseDto {
|
|
66
|
+
totalRecipients: number;
|
|
67
|
+
costPerMessageCents: number;
|
|
68
|
+
estimatedTotalCents: number;
|
|
69
|
+
category: TemplateCategoryDto;
|
|
70
|
+
}
|
package/src/index.ts
CHANGED