@opens/gateways 1.5.1 → 1.7.0

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.
Files changed (37) hide show
  1. package/dist/assets/contracts/index.d.mts +33 -0
  2. package/dist/assets/contracts/index.d.ts +33 -0
  3. package/dist/assets/contracts/index.js +19 -0
  4. package/dist/assets/contracts/index.js.map +1 -0
  5. package/dist/assets/contracts/index.mjs +1 -0
  6. package/dist/assets/contracts/index.mjs.map +1 -0
  7. package/dist/campaigns/contracts/index.d.mts +248 -0
  8. package/dist/campaigns/contracts/index.d.ts +248 -0
  9. package/dist/campaigns/contracts/index.js +19 -0
  10. package/dist/campaigns/contracts/index.js.map +1 -0
  11. package/dist/campaigns/contracts/index.mjs +1 -0
  12. package/dist/campaigns/contracts/index.mjs.map +1 -0
  13. package/dist/chat-adapter/contracts/index.d.mts +67 -0
  14. package/dist/chat-adapter/contracts/index.d.ts +67 -0
  15. package/dist/chat-adapter/contracts/index.js +19 -0
  16. package/dist/chat-adapter/contracts/index.js.map +1 -0
  17. package/dist/chat-adapter/contracts/index.mjs +1 -0
  18. package/dist/chat-adapter/contracts/index.mjs.map +1 -0
  19. package/dist/chat-config/contracts/index.d.mts +201 -0
  20. package/dist/chat-config/contracts/index.d.ts +201 -0
  21. package/dist/chat-config/contracts/index.js +19 -0
  22. package/dist/chat-config/contracts/index.js.map +1 -0
  23. package/dist/chat-config/contracts/index.mjs +1 -0
  24. package/dist/chat-config/contracts/index.mjs.map +1 -0
  25. package/dist/customer-service/contracts/index.d.mts +95 -0
  26. package/dist/customer-service/contracts/index.d.ts +95 -0
  27. package/dist/customer-service/contracts/index.js +19 -0
  28. package/dist/customer-service/contracts/index.js.map +1 -0
  29. package/dist/customer-service/contracts/index.mjs +1 -0
  30. package/dist/customer-service/contracts/index.mjs.map +1 -0
  31. package/dist/index.d.mts +15 -615
  32. package/dist/index.d.ts +15 -615
  33. package/dist/index.js +15 -4
  34. package/dist/index.js.map +1 -1
  35. package/dist/index.mjs +15 -4
  36. package/dist/index.mjs.map +1 -1
  37. package/package.json +8 -2
@@ -0,0 +1,33 @@
1
+ /** Request payload for obtaining a presigned upload URL. */
2
+ interface GetPresignedUrlRequest {
3
+ /** The name of the file to upload. */
4
+ fileName: string;
5
+ /** The destination key for the file in the bucket. */
6
+ key: string;
7
+ /** The unique identifier of the company. */
8
+ companyId: string;
9
+ }
10
+ /** Response returned when generating a presigned URL. */
11
+ interface UploadPresignedUrlResponse {
12
+ /** The destination key for the file. */
13
+ key: string;
14
+ /** The destination bucket. */
15
+ bucket: string;
16
+ /** The presigned URL to upload the file to. */
17
+ presignedUrl: string;
18
+ }
19
+ /** Alias for UploadPresignedUrlResponse to support legacy imports. */
20
+ type IUploadPresignedUrlResponse = UploadPresignedUrlResponse;
21
+ /** Response returned by the Assets API when converting an audio file to M4A. */
22
+ interface AudioConvertResponse {
23
+ /** The MIME type of the converted audio (e.g. 'audio/mp4'). */
24
+ mimetype: string;
25
+ /** The file extension of the converted audio (e.g. 'm4a'). */
26
+ extension: string;
27
+ /** The base64-encoded audio data. */
28
+ data: string;
29
+ /** The filename of the converted audio. */
30
+ filename: string;
31
+ }
32
+
33
+ export type { AudioConvertResponse, GetPresignedUrlRequest, IUploadPresignedUrlResponse, UploadPresignedUrlResponse };
@@ -0,0 +1,33 @@
1
+ /** Request payload for obtaining a presigned upload URL. */
2
+ interface GetPresignedUrlRequest {
3
+ /** The name of the file to upload. */
4
+ fileName: string;
5
+ /** The destination key for the file in the bucket. */
6
+ key: string;
7
+ /** The unique identifier of the company. */
8
+ companyId: string;
9
+ }
10
+ /** Response returned when generating a presigned URL. */
11
+ interface UploadPresignedUrlResponse {
12
+ /** The destination key for the file. */
13
+ key: string;
14
+ /** The destination bucket. */
15
+ bucket: string;
16
+ /** The presigned URL to upload the file to. */
17
+ presignedUrl: string;
18
+ }
19
+ /** Alias for UploadPresignedUrlResponse to support legacy imports. */
20
+ type IUploadPresignedUrlResponse = UploadPresignedUrlResponse;
21
+ /** Response returned by the Assets API when converting an audio file to M4A. */
22
+ interface AudioConvertResponse {
23
+ /** The MIME type of the converted audio (e.g. 'audio/mp4'). */
24
+ mimetype: string;
25
+ /** The file extension of the converted audio (e.g. 'm4a'). */
26
+ extension: string;
27
+ /** The base64-encoded audio data. */
28
+ data: string;
29
+ /** The filename of the converted audio. */
30
+ filename: string;
31
+ }
32
+
33
+ export type { AudioConvertResponse, GetPresignedUrlRequest, IUploadPresignedUrlResponse, UploadPresignedUrlResponse };
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from === "object" || typeof from === "function") {
8
+ for (let key of __getOwnPropNames(from))
9
+ if (!__hasOwnProp.call(to, key) && key !== except)
10
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
+ }
12
+ return to;
13
+ };
14
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
+
16
+ // src/assets/contracts/index.ts
17
+ var contracts_exports = {};
18
+ module.exports = __toCommonJS(contracts_exports);
19
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/assets/contracts/index.ts"],"sourcesContent":["export * from './assets';\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,248 @@
1
+ /** Campaign status literals. */
2
+ type CampaignStatus = 'ongoing' | 'finished' | 'paused' | 'scheduled';
3
+ /** Campaign provider literals. */
4
+ type CampaignProvider = 'whatsapp';
5
+ /** WhatsApp template component structure. */
6
+ interface WhatsAppTemplateComponent {
7
+ type: string;
8
+ parameters: {
9
+ type: string;
10
+ text?: string;
11
+ }[];
12
+ }
13
+ /** WhatsApp payload used when dispatching campaign messages. */
14
+ interface WhatsAppPayload {
15
+ template: {
16
+ name: string;
17
+ components: WhatsAppTemplateComponent[];
18
+ language: string;
19
+ status: string;
20
+ category: string;
21
+ id: string;
22
+ };
23
+ templateOptions: {
24
+ buttonsVariablesValues?: (string | null)[] | null;
25
+ bodyVariablesValues?: string[];
26
+ headerVariablesValues?: string[];
27
+ headerFileInfos?: {
28
+ filename: string;
29
+ fileUrl: string;
30
+ parsedFilename: string;
31
+ };
32
+ };
33
+ }
34
+ /** Contact filter applied when adding contacts to a campaign. */
35
+ interface CampaignContactFilter {
36
+ excludeDeclinedMarketing?: boolean;
37
+ }
38
+ /** Schedule configuration for a campaign. */
39
+ interface CampaignSchedule {
40
+ startAt?: string;
41
+ repeat?: {
42
+ delay?: number;
43
+ count?: number;
44
+ until?: string;
45
+ };
46
+ }
47
+ /** Campaign entity returned by the Campaigns API. */
48
+ interface Campaign {
49
+ id: string;
50
+ sid: number;
51
+ companyId: string;
52
+ createdBy: string;
53
+ assignedTo: string;
54
+ name?: string;
55
+ provider: CampaignProvider;
56
+ providerId: number;
57
+ providerConfigId: string;
58
+ associatedRuleId?: string;
59
+ payload: WhatsAppPayload;
60
+ conversionRuleIds: string[];
61
+ status: CampaignStatus;
62
+ expiresAt?: string;
63
+ createdAt: string;
64
+ updatedAt: string;
65
+ failedCampaignAttempts: number;
66
+ queuedCampaignAttempts: number;
67
+ deliveredCampaignAttempts: number;
68
+ convertedCampaignAttempts: number;
69
+ categoryId?: number;
70
+ contactFilter?: CampaignContactFilter;
71
+ schedule?: CampaignSchedule;
72
+ }
73
+ /** Paginated response returned by the Campaigns API for list endpoints. */
74
+ interface CampaignPaginatedResponse {
75
+ total: number;
76
+ limit: number;
77
+ skip: number;
78
+ data: Campaign[];
79
+ }
80
+ /** Request payload for creating a campaign. */
81
+ interface CreateCampaignRequest {
82
+ name: string;
83
+ payload: WhatsAppPayload;
84
+ provider: CampaignProvider;
85
+ companyId: string;
86
+ createdBy: string;
87
+ providerId: number;
88
+ providerConfigId: string;
89
+ schedule: CampaignSchedule;
90
+ associatedRuleId?: string;
91
+ assignedTo?: string;
92
+ expiresAt?: string;
93
+ }
94
+ /** Request payload for updating a campaign. */
95
+ interface PatchCampaignRequest {
96
+ name?: string;
97
+ expiresAt?: string;
98
+ status?: CampaignStatus;
99
+ categoryId?: number;
100
+ contactFilter?: CampaignContactFilter;
101
+ }
102
+ /** Query parameters for listing campaigns. */
103
+ interface CampaignQueryParams {
104
+ companyId?: string;
105
+ status?: CampaignStatus;
106
+ createdBy?: string;
107
+ assignedTo?: string;
108
+ name?: string;
109
+ $limit?: number;
110
+ $skip?: number;
111
+ }
112
+ /** User entity returned by the Campaigns API. */
113
+ interface CampaignUser {
114
+ id: string;
115
+ name: string;
116
+ status: 'new' | 'activated' | 'disabled';
117
+ }
118
+
119
+ /** Dispatch status literals for a campaign contact. */
120
+ type CampaignContactDispatchStatus = 'scheduled' | 'queued' | 'delivered' | 'converted' | 'failed';
121
+ /** Campaign status literals accepted by campaign contact queries. */
122
+ type CampaignContactCampaignStatus = 'ongoing' | 'finished';
123
+ /** Primitive values accepted by REST query filters. */
124
+ type CampaignContactQueryValue = string | number | boolean;
125
+ /** Sort direction accepted by REST query parameters. */
126
+ type CampaignContactSortDirection = 1 | -1;
127
+ /** Query operators accepted by REST query filters. */
128
+ type CampaignContactQueryOperators<T extends CampaignContactQueryValue> = {
129
+ $eq?: T;
130
+ $ne?: T;
131
+ $in?: T[];
132
+ $nin?: T[];
133
+ $lt?: T;
134
+ $lte?: T;
135
+ $gt?: T;
136
+ $gte?: T;
137
+ };
138
+ /** Case-insensitive LIKE operator accepted by contact name and endpoint filters. */
139
+ type CampaignContactLikeQueryOperators = {
140
+ $ilike?: string;
141
+ };
142
+ /** Campaign contact entity returned by the Campaign Contacts API. */
143
+ interface CampaignContactResponse {
144
+ id: string;
145
+ contactId: string;
146
+ campaignId: string;
147
+ createdAt: string;
148
+ updatedAt: string;
149
+ contactEndpointId?: string;
150
+ dispatchStatusMessage: string;
151
+ contactName?: string;
152
+ contactEndpoint?: string;
153
+ metadata?: unknown;
154
+ communicationChannelId: string;
155
+ dispatchStatus: CampaignContactDispatchStatus;
156
+ isMessageRead?: boolean;
157
+ }
158
+ /** Paginated response returned by the Campaign Contacts API for list endpoints. */
159
+ type CampaignContactPaginatedResponse = {
160
+ total: number;
161
+ limit: number;
162
+ skip: number;
163
+ data: CampaignContactResponse[];
164
+ };
165
+ /** Request payload for creating a campaign contact. */
166
+ type CreateCampaignContactRequest = {
167
+ contactId: string;
168
+ campaignId: string;
169
+ contactEndpointId?: string;
170
+ contactName?: string;
171
+ contactEndpoint?: string;
172
+ metadata?: unknown;
173
+ };
174
+ /** Request payload for partially updating a campaign contact. */
175
+ type PatchCampaignContactRequest = {
176
+ id?: string;
177
+ contactId?: string;
178
+ campaignId?: string;
179
+ createdAt?: string;
180
+ updatedAt?: string;
181
+ contactEndpointId?: string;
182
+ dispatchStatusMessage?: string;
183
+ contactName?: string;
184
+ contactEndpoint?: string;
185
+ metadata?: unknown;
186
+ communicationChannelId?: string;
187
+ dispatchStatus?: CampaignContactDispatchStatus;
188
+ isMessageRead?: boolean;
189
+ };
190
+ /** Sort fields accepted when listing campaign contacts. */
191
+ type CampaignContactSortParams = {
192
+ contactId?: CampaignContactSortDirection;
193
+ createdAt?: CampaignContactSortDirection;
194
+ updatedAt?: CampaignContactSortDirection;
195
+ campaignId?: CampaignContactSortDirection;
196
+ dispatchStatus?: CampaignContactSortDirection;
197
+ contactName?: CampaignContactSortDirection;
198
+ contactEndpoint?: CampaignContactSortDirection;
199
+ contactEndpointId?: CampaignContactSortDirection;
200
+ communicationChannelId?: CampaignContactSortDirection;
201
+ };
202
+ /** Query parameters for listing campaign contacts. */
203
+ type CampaignContactQueryParams = {
204
+ contactId?: string | CampaignContactQueryOperators<string>;
205
+ createdAt?: string | CampaignContactQueryOperators<string>;
206
+ updatedAt?: string | CampaignContactQueryOperators<string>;
207
+ campaignId?: string | CampaignContactQueryOperators<string>;
208
+ dispatchStatus?: CampaignContactDispatchStatus | CampaignContactQueryOperators<CampaignContactDispatchStatus>;
209
+ contactName?: string | CampaignContactQueryOperators<string> | CampaignContactLikeQueryOperators;
210
+ contactEndpoint?: string | CampaignContactQueryOperators<string> | CampaignContactLikeQueryOperators;
211
+ contactEndpointId?: string | CampaignContactQueryOperators<string>;
212
+ communicationChannelId?: string | CampaignContactQueryOperators<string>;
213
+ 'campaign.status'?: CampaignContactCampaignStatus | CampaignContactQueryOperators<CampaignContactCampaignStatus>;
214
+ $limit?: number;
215
+ $skip?: number;
216
+ $sort?: CampaignContactSortParams;
217
+ $select?: (keyof CampaignContactResponse)[];
218
+ };
219
+
220
+ /** Work group entity returned by the Campaigns API. */
221
+ interface CampaignWorkGroup {
222
+ id: string;
223
+ name: string;
224
+ companyId: string;
225
+ }
226
+ /** Paginated response returned when listing work groups. */
227
+ interface CampaignWorkGroupPaginatedResponse {
228
+ total: number;
229
+ limit: number;
230
+ skip: number;
231
+ data: CampaignWorkGroup[];
232
+ }
233
+ /** Query parameters for listing work groups. */
234
+ interface CampaignWorkGroupQueryParams {
235
+ id?: string;
236
+ name?: string;
237
+ companyId?: string;
238
+ $limit?: number;
239
+ $skip?: number;
240
+ }
241
+ /** Request payload for creating a work group. */
242
+ interface CreateCampaignWorkGroupRequest {
243
+ id: string;
244
+ name: string;
245
+ companyId: string;
246
+ }
247
+
248
+ export type { Campaign, CampaignContactCampaignStatus, CampaignContactDispatchStatus, CampaignContactFilter, CampaignContactLikeQueryOperators, CampaignContactPaginatedResponse, CampaignContactQueryOperators, CampaignContactQueryParams, CampaignContactQueryValue, CampaignContactResponse, CampaignContactSortDirection, CampaignContactSortParams, CampaignPaginatedResponse, CampaignProvider, CampaignQueryParams, CampaignSchedule, CampaignStatus, CampaignUser, CampaignWorkGroup, CampaignWorkGroupPaginatedResponse, CampaignWorkGroupQueryParams, CreateCampaignContactRequest, CreateCampaignRequest, CreateCampaignWorkGroupRequest, PatchCampaignContactRequest, PatchCampaignRequest, WhatsAppPayload, WhatsAppTemplateComponent };
@@ -0,0 +1,248 @@
1
+ /** Campaign status literals. */
2
+ type CampaignStatus = 'ongoing' | 'finished' | 'paused' | 'scheduled';
3
+ /** Campaign provider literals. */
4
+ type CampaignProvider = 'whatsapp';
5
+ /** WhatsApp template component structure. */
6
+ interface WhatsAppTemplateComponent {
7
+ type: string;
8
+ parameters: {
9
+ type: string;
10
+ text?: string;
11
+ }[];
12
+ }
13
+ /** WhatsApp payload used when dispatching campaign messages. */
14
+ interface WhatsAppPayload {
15
+ template: {
16
+ name: string;
17
+ components: WhatsAppTemplateComponent[];
18
+ language: string;
19
+ status: string;
20
+ category: string;
21
+ id: string;
22
+ };
23
+ templateOptions: {
24
+ buttonsVariablesValues?: (string | null)[] | null;
25
+ bodyVariablesValues?: string[];
26
+ headerVariablesValues?: string[];
27
+ headerFileInfos?: {
28
+ filename: string;
29
+ fileUrl: string;
30
+ parsedFilename: string;
31
+ };
32
+ };
33
+ }
34
+ /** Contact filter applied when adding contacts to a campaign. */
35
+ interface CampaignContactFilter {
36
+ excludeDeclinedMarketing?: boolean;
37
+ }
38
+ /** Schedule configuration for a campaign. */
39
+ interface CampaignSchedule {
40
+ startAt?: string;
41
+ repeat?: {
42
+ delay?: number;
43
+ count?: number;
44
+ until?: string;
45
+ };
46
+ }
47
+ /** Campaign entity returned by the Campaigns API. */
48
+ interface Campaign {
49
+ id: string;
50
+ sid: number;
51
+ companyId: string;
52
+ createdBy: string;
53
+ assignedTo: string;
54
+ name?: string;
55
+ provider: CampaignProvider;
56
+ providerId: number;
57
+ providerConfigId: string;
58
+ associatedRuleId?: string;
59
+ payload: WhatsAppPayload;
60
+ conversionRuleIds: string[];
61
+ status: CampaignStatus;
62
+ expiresAt?: string;
63
+ createdAt: string;
64
+ updatedAt: string;
65
+ failedCampaignAttempts: number;
66
+ queuedCampaignAttempts: number;
67
+ deliveredCampaignAttempts: number;
68
+ convertedCampaignAttempts: number;
69
+ categoryId?: number;
70
+ contactFilter?: CampaignContactFilter;
71
+ schedule?: CampaignSchedule;
72
+ }
73
+ /** Paginated response returned by the Campaigns API for list endpoints. */
74
+ interface CampaignPaginatedResponse {
75
+ total: number;
76
+ limit: number;
77
+ skip: number;
78
+ data: Campaign[];
79
+ }
80
+ /** Request payload for creating a campaign. */
81
+ interface CreateCampaignRequest {
82
+ name: string;
83
+ payload: WhatsAppPayload;
84
+ provider: CampaignProvider;
85
+ companyId: string;
86
+ createdBy: string;
87
+ providerId: number;
88
+ providerConfigId: string;
89
+ schedule: CampaignSchedule;
90
+ associatedRuleId?: string;
91
+ assignedTo?: string;
92
+ expiresAt?: string;
93
+ }
94
+ /** Request payload for updating a campaign. */
95
+ interface PatchCampaignRequest {
96
+ name?: string;
97
+ expiresAt?: string;
98
+ status?: CampaignStatus;
99
+ categoryId?: number;
100
+ contactFilter?: CampaignContactFilter;
101
+ }
102
+ /** Query parameters for listing campaigns. */
103
+ interface CampaignQueryParams {
104
+ companyId?: string;
105
+ status?: CampaignStatus;
106
+ createdBy?: string;
107
+ assignedTo?: string;
108
+ name?: string;
109
+ $limit?: number;
110
+ $skip?: number;
111
+ }
112
+ /** User entity returned by the Campaigns API. */
113
+ interface CampaignUser {
114
+ id: string;
115
+ name: string;
116
+ status: 'new' | 'activated' | 'disabled';
117
+ }
118
+
119
+ /** Dispatch status literals for a campaign contact. */
120
+ type CampaignContactDispatchStatus = 'scheduled' | 'queued' | 'delivered' | 'converted' | 'failed';
121
+ /** Campaign status literals accepted by campaign contact queries. */
122
+ type CampaignContactCampaignStatus = 'ongoing' | 'finished';
123
+ /** Primitive values accepted by REST query filters. */
124
+ type CampaignContactQueryValue = string | number | boolean;
125
+ /** Sort direction accepted by REST query parameters. */
126
+ type CampaignContactSortDirection = 1 | -1;
127
+ /** Query operators accepted by REST query filters. */
128
+ type CampaignContactQueryOperators<T extends CampaignContactQueryValue> = {
129
+ $eq?: T;
130
+ $ne?: T;
131
+ $in?: T[];
132
+ $nin?: T[];
133
+ $lt?: T;
134
+ $lte?: T;
135
+ $gt?: T;
136
+ $gte?: T;
137
+ };
138
+ /** Case-insensitive LIKE operator accepted by contact name and endpoint filters. */
139
+ type CampaignContactLikeQueryOperators = {
140
+ $ilike?: string;
141
+ };
142
+ /** Campaign contact entity returned by the Campaign Contacts API. */
143
+ interface CampaignContactResponse {
144
+ id: string;
145
+ contactId: string;
146
+ campaignId: string;
147
+ createdAt: string;
148
+ updatedAt: string;
149
+ contactEndpointId?: string;
150
+ dispatchStatusMessage: string;
151
+ contactName?: string;
152
+ contactEndpoint?: string;
153
+ metadata?: unknown;
154
+ communicationChannelId: string;
155
+ dispatchStatus: CampaignContactDispatchStatus;
156
+ isMessageRead?: boolean;
157
+ }
158
+ /** Paginated response returned by the Campaign Contacts API for list endpoints. */
159
+ type CampaignContactPaginatedResponse = {
160
+ total: number;
161
+ limit: number;
162
+ skip: number;
163
+ data: CampaignContactResponse[];
164
+ };
165
+ /** Request payload for creating a campaign contact. */
166
+ type CreateCampaignContactRequest = {
167
+ contactId: string;
168
+ campaignId: string;
169
+ contactEndpointId?: string;
170
+ contactName?: string;
171
+ contactEndpoint?: string;
172
+ metadata?: unknown;
173
+ };
174
+ /** Request payload for partially updating a campaign contact. */
175
+ type PatchCampaignContactRequest = {
176
+ id?: string;
177
+ contactId?: string;
178
+ campaignId?: string;
179
+ createdAt?: string;
180
+ updatedAt?: string;
181
+ contactEndpointId?: string;
182
+ dispatchStatusMessage?: string;
183
+ contactName?: string;
184
+ contactEndpoint?: string;
185
+ metadata?: unknown;
186
+ communicationChannelId?: string;
187
+ dispatchStatus?: CampaignContactDispatchStatus;
188
+ isMessageRead?: boolean;
189
+ };
190
+ /** Sort fields accepted when listing campaign contacts. */
191
+ type CampaignContactSortParams = {
192
+ contactId?: CampaignContactSortDirection;
193
+ createdAt?: CampaignContactSortDirection;
194
+ updatedAt?: CampaignContactSortDirection;
195
+ campaignId?: CampaignContactSortDirection;
196
+ dispatchStatus?: CampaignContactSortDirection;
197
+ contactName?: CampaignContactSortDirection;
198
+ contactEndpoint?: CampaignContactSortDirection;
199
+ contactEndpointId?: CampaignContactSortDirection;
200
+ communicationChannelId?: CampaignContactSortDirection;
201
+ };
202
+ /** Query parameters for listing campaign contacts. */
203
+ type CampaignContactQueryParams = {
204
+ contactId?: string | CampaignContactQueryOperators<string>;
205
+ createdAt?: string | CampaignContactQueryOperators<string>;
206
+ updatedAt?: string | CampaignContactQueryOperators<string>;
207
+ campaignId?: string | CampaignContactQueryOperators<string>;
208
+ dispatchStatus?: CampaignContactDispatchStatus | CampaignContactQueryOperators<CampaignContactDispatchStatus>;
209
+ contactName?: string | CampaignContactQueryOperators<string> | CampaignContactLikeQueryOperators;
210
+ contactEndpoint?: string | CampaignContactQueryOperators<string> | CampaignContactLikeQueryOperators;
211
+ contactEndpointId?: string | CampaignContactQueryOperators<string>;
212
+ communicationChannelId?: string | CampaignContactQueryOperators<string>;
213
+ 'campaign.status'?: CampaignContactCampaignStatus | CampaignContactQueryOperators<CampaignContactCampaignStatus>;
214
+ $limit?: number;
215
+ $skip?: number;
216
+ $sort?: CampaignContactSortParams;
217
+ $select?: (keyof CampaignContactResponse)[];
218
+ };
219
+
220
+ /** Work group entity returned by the Campaigns API. */
221
+ interface CampaignWorkGroup {
222
+ id: string;
223
+ name: string;
224
+ companyId: string;
225
+ }
226
+ /** Paginated response returned when listing work groups. */
227
+ interface CampaignWorkGroupPaginatedResponse {
228
+ total: number;
229
+ limit: number;
230
+ skip: number;
231
+ data: CampaignWorkGroup[];
232
+ }
233
+ /** Query parameters for listing work groups. */
234
+ interface CampaignWorkGroupQueryParams {
235
+ id?: string;
236
+ name?: string;
237
+ companyId?: string;
238
+ $limit?: number;
239
+ $skip?: number;
240
+ }
241
+ /** Request payload for creating a work group. */
242
+ interface CreateCampaignWorkGroupRequest {
243
+ id: string;
244
+ name: string;
245
+ companyId: string;
246
+ }
247
+
248
+ export type { Campaign, CampaignContactCampaignStatus, CampaignContactDispatchStatus, CampaignContactFilter, CampaignContactLikeQueryOperators, CampaignContactPaginatedResponse, CampaignContactQueryOperators, CampaignContactQueryParams, CampaignContactQueryValue, CampaignContactResponse, CampaignContactSortDirection, CampaignContactSortParams, CampaignPaginatedResponse, CampaignProvider, CampaignQueryParams, CampaignSchedule, CampaignStatus, CampaignUser, CampaignWorkGroup, CampaignWorkGroupPaginatedResponse, CampaignWorkGroupQueryParams, CreateCampaignContactRequest, CreateCampaignRequest, CreateCampaignWorkGroupRequest, PatchCampaignContactRequest, PatchCampaignRequest, WhatsAppPayload, WhatsAppTemplateComponent };
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from === "object" || typeof from === "function") {
8
+ for (let key of __getOwnPropNames(from))
9
+ if (!__hasOwnProp.call(to, key) && key !== except)
10
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
+ }
12
+ return to;
13
+ };
14
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
+
16
+ // src/campaigns/contracts/index.ts
17
+ var contracts_exports = {};
18
+ module.exports = __toCommonJS(contracts_exports);
19
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/campaigns/contracts/index.ts"],"sourcesContent":["export * from './campaign';\nexport * from './campaign-contacts';\nexport * from './work-group';\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,67 @@
1
+ /** Parameters for retrieving configuration templates. */
2
+ interface GetConfigTemplatesParams {
3
+ /** Optional template name filter. */
4
+ templateName?: string;
5
+ /** Optional maximum number of templates to return. */
6
+ limit?: number;
7
+ /** Optional status filter (e.g. 'APPROVED', 'REJECTED', 'PENDING'). */
8
+ status?: string;
9
+ /** Optional category filter (e.g. 'UTILITY', 'MARKETING', 'AUTHENTICATION'). */
10
+ category?: string;
11
+ /** Optional pagination cursor token/URL. */
12
+ next?: string;
13
+ /** Optional pagination cursor 'after' parameter. */
14
+ after?: string;
15
+ }
16
+ /** Component of a message template. */
17
+ interface MessageTemplateComponent {
18
+ /** Type of the component (e.g. 'HEADER', 'BODY', 'FOOTER', 'BUTTONS'). */
19
+ type: string;
20
+ /** Format of the component (e.g. 'TEXT', 'IMAGE', 'DOCUMENT', 'VIDEO'). */
21
+ format?: string;
22
+ /** Text content of the component. */
23
+ text?: string;
24
+ /** List of buttons in the component if type is 'BUTTONS'. */
25
+ buttons?: Array<{
26
+ type: string;
27
+ text: string;
28
+ url?: string;
29
+ phoneNumber?: string;
30
+ }>;
31
+ }
32
+ /** Details of a message template. */
33
+ interface MessageTemplate {
34
+ /** Name of the message template. */
35
+ name: string;
36
+ /** Status of the template (e.g. 'APPROVED', 'REJECTED', 'PENDING'). */
37
+ status: string;
38
+ /** Category of the template (e.g. 'UTILITY', 'MARKETING', 'AUTHENTICATION'). */
39
+ category: string;
40
+ /** Language locale of the template (e.g. 'pt_BR', 'en_US'). */
41
+ language: string;
42
+ /** Components that build up the template content. */
43
+ components: MessageTemplateComponent[];
44
+ /** Unique identifier of the template. */
45
+ id: string;
46
+ }
47
+ /** Pagination information for the template query response. */
48
+ interface ConfigTemplatesPaging {
49
+ /** Cursors used to paginate results. */
50
+ cursors?: {
51
+ /** Cursor pointing to the start of the current range. */
52
+ before?: string;
53
+ /** Cursor pointing to the end of the current range. */
54
+ after?: string;
55
+ };
56
+ /** URL for the next page of results. */
57
+ next?: string;
58
+ }
59
+ /** Response containing the list of message templates configured. */
60
+ interface GetConfigTemplatesResponse {
61
+ /** List of message templates. */
62
+ data: MessageTemplate[];
63
+ /** Pagination information. */
64
+ paging?: ConfigTemplatesPaging;
65
+ }
66
+
67
+ export type { ConfigTemplatesPaging, GetConfigTemplatesParams, GetConfigTemplatesResponse, MessageTemplate, MessageTemplateComponent };