tychat-contracts 1.6.50 → 1.6.52
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/appointments/appointment-procedure.dto.d.ts +5 -0
- package/dist/appointments/appointment-procedure.dto.d.ts.map +1 -1
- package/dist/appointments/appointment-procedure.dto.js +33 -1
- package/dist/appointments/appointment.dto.d.ts +4 -0
- package/dist/appointments/appointment.dto.d.ts.map +1 -1
- package/dist/campaigns/campaign-template-header-media.dto.d.ts +23 -0
- package/dist/campaigns/campaign-template-header-media.dto.d.ts.map +1 -0
- package/dist/campaigns/campaign-template-header-media.dto.js +2 -0
- package/dist/campaigns/campaign-template.dto.d.ts +3 -1
- package/dist/campaigns/campaign-template.dto.d.ts.map +1 -1
- package/dist/campaigns/create-campaign.dto.d.ts +3 -1
- package/dist/campaigns/create-campaign.dto.d.ts.map +1 -1
- package/dist/campaigns/index.d.ts +1 -0
- package/dist/campaigns/index.d.ts.map +1 -1
- package/dist/campaigns/index.js +1 -0
- package/package.json +1 -1
- package/src/appointments/appointment-procedure.dto.ts +31 -0
- package/src/appointments/appointment.dto.ts +4 -0
- package/src/campaigns/campaign-template-header-media.dto.ts +25 -0
- package/src/campaigns/campaign-template.dto.ts +45 -42
- package/src/campaigns/create-campaign.dto.ts +80 -77
- package/src/campaigns/index.ts +1 -0
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
export declare const APPOINTMENT_PROCEDURE_PRICING_TYPES: readonly ["fixed", "variable"];
|
|
2
|
+
export type AppointmentProcedurePricingTypeDto = (typeof APPOINTMENT_PROCEDURE_PRICING_TYPES)[number];
|
|
1
3
|
/**
|
|
2
4
|
* DTO for creating a procedure linked to an appointment.
|
|
3
5
|
* Procedures belong to appointments (not directly to patients).
|
|
@@ -10,5 +12,8 @@ export declare class AppointmentProcedureDto {
|
|
|
10
12
|
observation?: string | null;
|
|
11
13
|
side_effects?: string | null;
|
|
12
14
|
return_days?: number | null;
|
|
15
|
+
pricing_type?: AppointmentProcedurePricingTypeDto;
|
|
16
|
+
min_value?: number | null;
|
|
17
|
+
max_value?: number | null;
|
|
13
18
|
}
|
|
14
19
|
//# sourceMappingURL=appointment-procedure.dto.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"appointment-procedure.dto.d.ts","sourceRoot":"","sources":["../../src/appointments/appointment-procedure.dto.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"appointment-procedure.dto.d.ts","sourceRoot":"","sources":["../../src/appointments/appointment-procedure.dto.ts"],"names":[],"mappings":"AAYA,eAAO,MAAM,mCAAmC,gCAAiC,CAAC;AAClF,MAAM,MAAM,kCAAkC,GAC5C,CAAC,OAAO,mCAAmC,CAAC,CAAC,MAAM,CAAC,CAAC;AAEvD;;;GAGG;AACH,qBAAa,uBAAuB;IASlC,IAAI,EAAE,MAAM,CAAC;IAOb,KAAK,EAAE,MAAM,CAAC;IAOd,QAAQ,EAAE,OAAO,CAAC;IAQlB,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAU5B,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAU5B,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAQ7B,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAU5B,YAAY,CAAC,EAAE,kCAAkC,CAAC;IAQlD,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAQ1B,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B"}
|
|
@@ -9,9 +9,10 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
9
9
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.AppointmentProcedureDto = void 0;
|
|
12
|
+
exports.AppointmentProcedureDto = exports.APPOINTMENT_PROCEDURE_PRICING_TYPES = void 0;
|
|
13
13
|
const swagger_1 = require("@nestjs/swagger");
|
|
14
14
|
const class_validator_1 = require("class-validator");
|
|
15
|
+
exports.APPOINTMENT_PROCEDURE_PRICING_TYPES = ['fixed', 'variable'];
|
|
15
16
|
/**
|
|
16
17
|
* DTO for creating a procedure linked to an appointment.
|
|
17
18
|
* Procedures belong to appointments (not directly to patients).
|
|
@@ -24,6 +25,9 @@ class AppointmentProcedureDto {
|
|
|
24
25
|
observation;
|
|
25
26
|
side_effects;
|
|
26
27
|
return_days;
|
|
28
|
+
pricing_type;
|
|
29
|
+
min_value;
|
|
30
|
+
max_value;
|
|
27
31
|
}
|
|
28
32
|
exports.AppointmentProcedureDto = AppointmentProcedureDto;
|
|
29
33
|
__decorate([
|
|
@@ -93,3 +97,31 @@ __decorate([
|
|
|
93
97
|
(0, class_validator_1.IsNumber)({ maxDecimalPlaces: 0 }),
|
|
94
98
|
__metadata("design:type", Object)
|
|
95
99
|
], AppointmentProcedureDto.prototype, "return_days", void 0);
|
|
100
|
+
__decorate([
|
|
101
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
102
|
+
description: 'Tipo de precificação do catálogo no agendamento (snapshot). Valor final definido pelo médico na consulta quando variable.',
|
|
103
|
+
enum: exports.APPOINTMENT_PROCEDURE_PRICING_TYPES,
|
|
104
|
+
example: 'variable',
|
|
105
|
+
}),
|
|
106
|
+
(0, class_validator_1.IsOptional)(),
|
|
107
|
+
(0, class_validator_1.IsIn)(exports.APPOINTMENT_PROCEDURE_PRICING_TYPES),
|
|
108
|
+
__metadata("design:type", String)
|
|
109
|
+
], AppointmentProcedureDto.prototype, "pricing_type", void 0);
|
|
110
|
+
__decorate([
|
|
111
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
112
|
+
description: 'Valor mínimo da faixa (snapshot do catálogo)',
|
|
113
|
+
example: 120,
|
|
114
|
+
}),
|
|
115
|
+
(0, class_validator_1.IsOptional)(),
|
|
116
|
+
(0, class_validator_1.IsNumber)({ maxDecimalPlaces: 2 }),
|
|
117
|
+
__metadata("design:type", Object)
|
|
118
|
+
], AppointmentProcedureDto.prototype, "min_value", void 0);
|
|
119
|
+
__decorate([
|
|
120
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
121
|
+
description: 'Valor máximo da faixa (snapshot do catálogo)',
|
|
122
|
+
example: 220,
|
|
123
|
+
}),
|
|
124
|
+
(0, class_validator_1.IsOptional)(),
|
|
125
|
+
(0, class_validator_1.IsNumber)({ maxDecimalPlaces: 2 }),
|
|
126
|
+
__metadata("design:type", Object)
|
|
127
|
+
], AppointmentProcedureDto.prototype, "max_value", void 0);
|
|
@@ -12,6 +12,10 @@ export interface AppointmentProcedureResponseDto {
|
|
|
12
12
|
sideEffects: string | null;
|
|
13
13
|
/** Recommended number of days until a return visit (used for return follow-up). */
|
|
14
14
|
returnDays: number | null;
|
|
15
|
+
/** Pricing snapshot from catalog at booking time. */
|
|
16
|
+
pricingType?: 'fixed' | 'variable' | null;
|
|
17
|
+
minValue?: number | null;
|
|
18
|
+
maxValue?: number | null;
|
|
15
19
|
createdAt?: string;
|
|
16
20
|
updatedAt?: string;
|
|
17
21
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"appointment.dto.d.ts","sourceRoot":"","sources":["../../src/appointments/appointment.dto.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAEpF,mEAAmE;AACnE,MAAM,WAAW,+BAA+B;IAC9C,EAAE,EAAE,MAAM,CAAC;IACX,aAAa,EAAE,MAAM,CAAC;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,OAAO,CAAC;IAClB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,yEAAyE;IACzE,WAAW,EAAE,MAAM,GAAG,IAAI,CA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E,MAAM,GAAG,IAAI,CAAC;IAC1B,qDAAqD;IACrD,WAAW,CAAC,EAAE,OAAO,GAAG,UAAU,GAAG,IAAI,CAAC;IAC1C,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAC;IAMX,SAAS,EAAE,MAAM,CAAC;IAKlB,MAAM,EAAE,MAAM,CAAC;IAKf,IAAI,EAAE,MAAM,CAAC;IAKb,gBAAgB,EAAE,OAAO,CAAC;IAK1B,iBAAiB,EAAE,OAAO,CAAC;IAK3B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAKlB,WAAW,CAAC,EAAE,MAAM,CAAC;IAKrB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAK5B,MAAM,EAAE,oBAAoB,CAAC;IAK7B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAK5B,eAAe,EAAE,kBAAkB,CAAC;IAKpC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAK3B,uBAAuB,CAAC,EAAE,MAAM,CAAC;IAIjC,UAAU,CAAC,EAAE,+BAA+B,EAAE,CAAC;CAChD"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/** Formato do header de template oficial (Meta Cloud API). */
|
|
2
|
+
export type TemplateHeaderFormatDto = 'TEXT' | 'IMAGE' | 'VIDEO' | 'DOCUMENT';
|
|
3
|
+
/** Resposta do upload de mídia para header de template (Meta + storage opcional). */
|
|
4
|
+
export interface UploadTemplateHeaderMediaResponseDto {
|
|
5
|
+
headerHandle: string;
|
|
6
|
+
messagingMediaId: string;
|
|
7
|
+
mimeType: string;
|
|
8
|
+
sizeBytes: number;
|
|
9
|
+
/** URL pública opcional persistida no storage da plataforma. */
|
|
10
|
+
previewUrl?: string;
|
|
11
|
+
}
|
|
12
|
+
/** URL temporária da Meta (GET /{media-id}) para pré-visualização. */
|
|
13
|
+
export interface TemplateHeaderMediaPreviewUrlResponseDto {
|
|
14
|
+
mediaId: string;
|
|
15
|
+
url: string;
|
|
16
|
+
mimeType: string;
|
|
17
|
+
}
|
|
18
|
+
/** Bytes da mídia de header para proxy de pré-visualização. */
|
|
19
|
+
export interface TemplateHeaderMediaPreviewBinaryResponseDto {
|
|
20
|
+
mimeType: string;
|
|
21
|
+
fileBase64: string;
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=campaign-template-header-media.dto.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"campaign-template-header-media.dto.d.ts","sourceRoot":"","sources":["../../src/campaigns/campaign-template-header-media.dto.ts"],"names":[],"mappings":"AAAA,8DAA8D;AAC9D,MAAM,MAAM,uBAAuB,GAAG,MAAM,GAAG,OAAO,GAAG,OAAO,GAAG,UAAU,CAAC;AAE9E,qFAAqF;AACrF,MAAM,WAAW,oCAAoC;IACnD,YAAY,EAAE,MAAM,CAAC;IACrB,gBAAgB,EAAE,MAAM,CAAC;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,gEAAgE;IAChE,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,sEAAsE;AACtE,MAAM,WAAW,wCAAwC;IACvD,OAAO,EAAE,MAAM,CAAC;IAChB,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,+DAA+D;AAC/D,MAAM,WAAW,2CAA2C;IAC1D,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;CACpB"}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import type { TemplateCategoryDto, TemplateMetaStatusDto } from './campaign-status.dto';
|
|
2
|
+
import type { TemplateHeaderFormatDto } from './campaign-template-header-media.dto';
|
|
3
|
+
export type { TemplateHeaderFormatDto };
|
|
2
4
|
export interface CampaignTemplateDto {
|
|
3
5
|
id: string;
|
|
4
6
|
tenantId: string;
|
|
@@ -9,7 +11,7 @@ export interface CampaignTemplateDto {
|
|
|
9
11
|
metaTemplateId: string | null;
|
|
10
12
|
metaStatus: TemplateMetaStatusDto | null;
|
|
11
13
|
headerText: string | null;
|
|
12
|
-
headerFormat?:
|
|
14
|
+
headerFormat?: TemplateHeaderFormatDto | null;
|
|
13
15
|
headerMediaHandle?: string | null;
|
|
14
16
|
headerMediaId?: string | null;
|
|
15
17
|
headerMediaPreviewUrl?: string | null;
|
|
@@ -1 +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;
|
|
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;AACxF,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,sCAAsC,CAAC;AAEpF,YAAY,EAAE,uBAAuB,EAAE,CAAC;AAExC,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,YAAY,CAAC,EAAE,uBAAuB,GAAG,IAAI,CAAC;IAC9C,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,qBAAqB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtC,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"}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import type { TemplateCategoryDto } from './campaign-status.dto';
|
|
2
|
+
import type { TemplateHeaderFormatDto } from './campaign-template-header-media.dto';
|
|
3
|
+
export type { TemplateHeaderFormatDto };
|
|
2
4
|
export interface CreateCampaignRequestDto {
|
|
3
5
|
name: string;
|
|
4
6
|
templateId?: string;
|
|
@@ -20,7 +22,7 @@ export interface CreateCampaignTemplateRequestDto {
|
|
|
20
22
|
category?: TemplateCategoryDto;
|
|
21
23
|
bodyText: string;
|
|
22
24
|
headerText?: string;
|
|
23
|
-
headerFormat?:
|
|
25
|
+
headerFormat?: TemplateHeaderFormatDto;
|
|
24
26
|
headerMediaHandle?: string;
|
|
25
27
|
/** Numeric Meta messaging media id from header upload (required to send media headers). */
|
|
26
28
|
headerMediaId?: string;
|
|
@@ -1 +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;
|
|
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;AACjE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,sCAAsC,CAAC;AAEpF,YAAY,EAAE,uBAAuB,EAAE,CAAC;AAExC,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,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],"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"}
|
|
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,sCAAsC,CAAC;AACrD,cAAc,yBAAyB,CAAC;AACxC,cAAc,0BAA0B,CAAC;AACzC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC"}
|
package/dist/campaigns/index.js
CHANGED
|
@@ -16,6 +16,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./campaign-status.dto"), exports);
|
|
18
18
|
__exportStar(require("./campaign.dto"), exports);
|
|
19
|
+
__exportStar(require("./campaign-template-header-media.dto"), exports);
|
|
19
20
|
__exportStar(require("./campaign-template.dto"), exports);
|
|
20
21
|
__exportStar(require("./campaign-recipient.dto"), exports);
|
|
21
22
|
__exportStar(require("./campaign-refund.dto"), exports);
|
package/package.json
CHANGED
|
@@ -2,6 +2,7 @@ import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
|
|
|
2
2
|
import {
|
|
3
3
|
IsBoolean,
|
|
4
4
|
IsDateString,
|
|
5
|
+
IsIn,
|
|
5
6
|
IsNotEmpty,
|
|
6
7
|
IsNumber,
|
|
7
8
|
IsOptional,
|
|
@@ -9,6 +10,10 @@ import {
|
|
|
9
10
|
MaxLength,
|
|
10
11
|
} from 'class-validator';
|
|
11
12
|
|
|
13
|
+
export const APPOINTMENT_PROCEDURE_PRICING_TYPES = ['fixed', 'variable'] as const;
|
|
14
|
+
export type AppointmentProcedurePricingTypeDto =
|
|
15
|
+
(typeof APPOINTMENT_PROCEDURE_PRICING_TYPES)[number];
|
|
16
|
+
|
|
12
17
|
/**
|
|
13
18
|
* DTO for creating a procedure linked to an appointment.
|
|
14
19
|
* Procedures belong to appointments (not directly to patients).
|
|
@@ -73,4 +78,30 @@ export class AppointmentProcedureDto {
|
|
|
73
78
|
@IsOptional()
|
|
74
79
|
@IsNumber({ maxDecimalPlaces: 0 })
|
|
75
80
|
return_days?: number | null;
|
|
81
|
+
|
|
82
|
+
@ApiPropertyOptional({
|
|
83
|
+
description:
|
|
84
|
+
'Tipo de precificação do catálogo no agendamento (snapshot). Valor final definido pelo médico na consulta quando variable.',
|
|
85
|
+
enum: APPOINTMENT_PROCEDURE_PRICING_TYPES,
|
|
86
|
+
example: 'variable',
|
|
87
|
+
})
|
|
88
|
+
@IsOptional()
|
|
89
|
+
@IsIn(APPOINTMENT_PROCEDURE_PRICING_TYPES)
|
|
90
|
+
pricing_type?: AppointmentProcedurePricingTypeDto;
|
|
91
|
+
|
|
92
|
+
@ApiPropertyOptional({
|
|
93
|
+
description: 'Valor mínimo da faixa (snapshot do catálogo)',
|
|
94
|
+
example: 120,
|
|
95
|
+
})
|
|
96
|
+
@IsOptional()
|
|
97
|
+
@IsNumber({ maxDecimalPlaces: 2 })
|
|
98
|
+
min_value?: number | null;
|
|
99
|
+
|
|
100
|
+
@ApiPropertyOptional({
|
|
101
|
+
description: 'Valor máximo da faixa (snapshot do catálogo)',
|
|
102
|
+
example: 220,
|
|
103
|
+
})
|
|
104
|
+
@IsOptional()
|
|
105
|
+
@IsNumber({ maxDecimalPlaces: 2 })
|
|
106
|
+
max_value?: number | null;
|
|
76
107
|
}
|
|
@@ -13,6 +13,10 @@ export interface AppointmentProcedureResponseDto {
|
|
|
13
13
|
sideEffects: string | null;
|
|
14
14
|
/** Recommended number of days until a return visit (used for return follow-up). */
|
|
15
15
|
returnDays: number | null;
|
|
16
|
+
/** Pricing snapshot from catalog at booking time. */
|
|
17
|
+
pricingType?: 'fixed' | 'variable' | null;
|
|
18
|
+
minValue?: number | null;
|
|
19
|
+
maxValue?: number | null;
|
|
16
20
|
createdAt?: string;
|
|
17
21
|
updatedAt?: string;
|
|
18
22
|
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/** Formato do header de template oficial (Meta Cloud API). */
|
|
2
|
+
export type TemplateHeaderFormatDto = 'TEXT' | 'IMAGE' | 'VIDEO' | 'DOCUMENT';
|
|
3
|
+
|
|
4
|
+
/** Resposta do upload de mídia para header de template (Meta + storage opcional). */
|
|
5
|
+
export interface UploadTemplateHeaderMediaResponseDto {
|
|
6
|
+
headerHandle: string;
|
|
7
|
+
messagingMediaId: string;
|
|
8
|
+
mimeType: string;
|
|
9
|
+
sizeBytes: number;
|
|
10
|
+
/** URL pública opcional persistida no storage da plataforma. */
|
|
11
|
+
previewUrl?: string;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/** URL temporária da Meta (GET /{media-id}) para pré-visualização. */
|
|
15
|
+
export interface TemplateHeaderMediaPreviewUrlResponseDto {
|
|
16
|
+
mediaId: string;
|
|
17
|
+
url: string;
|
|
18
|
+
mimeType: string;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/** Bytes da mídia de header para proxy de pré-visualização. */
|
|
22
|
+
export interface TemplateHeaderMediaPreviewBinaryResponseDto {
|
|
23
|
+
mimeType: string;
|
|
24
|
+
fileBase64: string;
|
|
25
|
+
}
|
|
@@ -1,42 +1,45 @@
|
|
|
1
|
-
import type { TemplateCategoryDto, TemplateMetaStatusDto } from './campaign-status.dto';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
1
|
+
import type { TemplateCategoryDto, TemplateMetaStatusDto } from './campaign-status.dto';
|
|
2
|
+
import type { TemplateHeaderFormatDto } from './campaign-template-header-media.dto';
|
|
3
|
+
|
|
4
|
+
export type { TemplateHeaderFormatDto };
|
|
5
|
+
|
|
6
|
+
export interface CampaignTemplateDto {
|
|
7
|
+
id: string;
|
|
8
|
+
tenantId: string;
|
|
9
|
+
name: string;
|
|
10
|
+
languageCode: string;
|
|
11
|
+
category: TemplateCategoryDto | null;
|
|
12
|
+
metaTemplateName: string | null;
|
|
13
|
+
metaTemplateId: string | null;
|
|
14
|
+
metaStatus: TemplateMetaStatusDto | null;
|
|
15
|
+
headerText: string | null;
|
|
16
|
+
headerFormat?: TemplateHeaderFormatDto | null;
|
|
17
|
+
headerMediaHandle?: string | null;
|
|
18
|
+
headerMediaId?: string | null;
|
|
19
|
+
headerMediaPreviewUrl?: string | null;
|
|
20
|
+
bodyText: string;
|
|
21
|
+
footerText: string | null;
|
|
22
|
+
buttons: Record<string, unknown>[] | null;
|
|
23
|
+
isOfficial: boolean;
|
|
24
|
+
metaSyncedAt: string | null;
|
|
25
|
+
createdAt: string;
|
|
26
|
+
updatedAt: string;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export interface CampaignTemplateListResponseDto {
|
|
30
|
+
items: CampaignTemplateDto[];
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export interface TemplateVariablePreviewDto {
|
|
34
|
+
variableName: string;
|
|
35
|
+
sampleValue: string;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export interface TemplatePreviewRequestDto {
|
|
39
|
+
bodyText: string;
|
|
40
|
+
variables: TemplateVariablePreviewDto[];
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export interface TemplatePreviewResponseDto {
|
|
44
|
+
previewText: string;
|
|
45
|
+
}
|
|
@@ -1,77 +1,80 @@
|
|
|
1
|
-
import type { TemplateCategoryDto } from './campaign-status.dto';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
1
|
+
import type { TemplateCategoryDto } from './campaign-status.dto';
|
|
2
|
+
import type { TemplateHeaderFormatDto } from './campaign-template-header-media.dto';
|
|
3
|
+
|
|
4
|
+
export type { TemplateHeaderFormatDto };
|
|
5
|
+
|
|
6
|
+
export interface CreateCampaignRequestDto {
|
|
7
|
+
name: string;
|
|
8
|
+
templateId?: string;
|
|
9
|
+
isOfficial?: boolean;
|
|
10
|
+
audienceFilters?: Record<string, unknown>[];
|
|
11
|
+
delayBetweenSendsMs?: number;
|
|
12
|
+
scheduledAt?: string;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface UpdateCampaignRequestDto {
|
|
16
|
+
name?: string;
|
|
17
|
+
templateId?: string;
|
|
18
|
+
audienceFilters?: Record<string, unknown>[];
|
|
19
|
+
delayBetweenSendsMs?: number;
|
|
20
|
+
scheduledAt?: string;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export interface CreateCampaignTemplateRequestDto {
|
|
24
|
+
name: string;
|
|
25
|
+
languageCode?: string;
|
|
26
|
+
category?: TemplateCategoryDto;
|
|
27
|
+
bodyText: string;
|
|
28
|
+
headerText?: string;
|
|
29
|
+
headerFormat?: TemplateHeaderFormatDto;
|
|
30
|
+
headerMediaHandle?: string;
|
|
31
|
+
/** Numeric Meta messaging media id from header upload (required to send media headers). */
|
|
32
|
+
headerMediaId?: string;
|
|
33
|
+
headerMediaPreviewUrl?: string;
|
|
34
|
+
headerMediaMimeType?: string;
|
|
35
|
+
headerMediaSizeBytes?: number;
|
|
36
|
+
footerText?: string;
|
|
37
|
+
isOfficial?: boolean;
|
|
38
|
+
buttons?: Record<string, unknown>[];
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export interface StartCampaignRequestDto {
|
|
42
|
+
campaignId: string;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export interface PauseCampaignRequestDto {
|
|
46
|
+
campaignId: string;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export interface ResumeCampaignRequestDto {
|
|
50
|
+
campaignId: string;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export interface CancelCampaignRequestDto {
|
|
54
|
+
campaignId: string;
|
|
55
|
+
reason?: string;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export interface ConfirmCampaignPaymentRequestDto {
|
|
59
|
+
campaignId: string;
|
|
60
|
+
billingId: string;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export interface PopulateRecipientsRequestDto {
|
|
64
|
+
campaignId: string;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export interface PopulateRecipientsResponseDto {
|
|
68
|
+
count: number;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export interface CampaignCostEstimateRequestDto {
|
|
72
|
+
campaignId: string;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export interface CampaignCostEstimateResponseDto {
|
|
76
|
+
totalRecipients: number;
|
|
77
|
+
costPerMessageCents: number;
|
|
78
|
+
estimatedTotalCents: number;
|
|
79
|
+
category: TemplateCategoryDto;
|
|
80
|
+
}
|
package/src/campaigns/index.ts
CHANGED