@periskope/types 0.6.462 → 0.6.464

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.
@@ -0,0 +1,431 @@
1
+ import { Merge, OverrideProperties } from 'type-fest';
2
+ import { OrgPlanEnterprise, OrgPlanNonEnterprise } from './types';
3
+ export type BillingVersion = 'v1' | 'v2';
4
+ export declare enum AllPlansV2 {
5
+ FREE_TRIAL = "v2-free-trial",
6
+ MONTHLY_STARTER = "v2-monthly-starter",
7
+ YEARLY_STARTER = "v2-annual-starter",
8
+ MONTHLY_PRO = "v2-monthly-pro",
9
+ YEARLY_PRO = "v2-annual-pro"
10
+ }
11
+ export type AddonPackId = SeatAddonPackId | RecurringAddonPackId;
12
+ /** V2-only — per-seat user & phone add-ons (tier-specific). */
13
+ export type SeatAddonPackId = 'v2-additional-phone-pro' | 'v2-additional-user-pro' | 'v2-additional-phone-starter' | 'v2-additional-user-starter';
14
+ /** Shared by v1 and v2 — recurring optional add-ons. */
15
+ export type RecurringAddonPackId = 'priority-support-pack' | 'automation-pack';
16
+ /** Shared by v1 and v2 — one-time charge packs. `ai-pack`: 1,000 AI credits per quantity unit. */
17
+ export type ChargesPack = 'ai-pack' | 'bulk-message-credits' | 'guided-onboarding' | 'support-call' | 'support-call-pack';
18
+ /** Packs with no billing-version prefix — included under both v1 and v2. */
19
+ export type GenericPackId = RecurringAddonPackId | ChargesPack;
20
+ export declare const GENERIC_PACK_IDS: readonly GenericPackId[];
21
+ export type UsageType = 'ai_credits' | 'automation_rules' | 'bm_credits';
22
+ export type UsageAllowances = Partial<Record<UsageType, number>>;
23
+ export type UsageConsumption = Partial<Record<UsageType, number>>;
24
+ /** Recurring add-on flags derived from subscription line items. */
25
+ export type V2AddonEntitlements = Partial<Record<RecurringAddonPackId, boolean>>;
26
+ export type OrgPlanV2 = Merge<OverrideProperties<OrgPlanEnterprise | OrgPlanNonEnterprise, {
27
+ plan_id: AllPlansV2;
28
+ }>, {
29
+ billing_version: 'v2';
30
+ usage_allowances?: UsageAllowances;
31
+ usage_consumption?: UsageConsumption;
32
+ addon_entitlements?: V2AddonEntitlements;
33
+ /** Paid one-time charge invoice ids already granted — webhook idempotency. */
34
+ processed_charge_invoices?: string[];
35
+ }>;
36
+ export type OrgPlanV1 = (OrgPlanEnterprise | OrgPlanNonEnterprise) & {
37
+ billing_version?: 'v1';
38
+ };
39
+ export type AnyOrgPlan = OrgPlanV1 | OrgPlanV2;
40
+ export declare const isV2Plan: (plan: AnyOrgPlan) => plan is OrgPlanV2;
41
+ export type BillingEntity = 'IN' | 'US';
42
+ /** Line item passed to Chargebee item-price / subscription APIs. */
43
+ export type BillingV2LineItem = {
44
+ item_price_id: string;
45
+ quantity?: number;
46
+ unit_price?: number;
47
+ };
48
+ /** Headers required on all billing V2 requests. */
49
+ export type BillingV2RequestHeaders = {
50
+ org_id: string;
51
+ 'x-periskope-trace-id'?: string;
52
+ };
53
+ export type BillingFrequency = 'monthly' | 'yearly';
54
+ export type BillingPlanTier = 'starter' | 'pro';
55
+ /** Money in major currency units (e.g. 2400 = ₹2,400). */
56
+ export type BillingMoney = {
57
+ amount: number;
58
+ currency_code: string;
59
+ };
60
+ export type BillingPriceItem = {
61
+ item_price_id: string;
62
+ item_id: string;
63
+ lookup_key: string | null;
64
+ name: string;
65
+ description: string | null;
66
+ price: BillingMoney;
67
+ frequency: BillingFrequency | null;
68
+ period: number | null;
69
+ status: string;
70
+ };
71
+ export type BillingVersionPrices = {
72
+ plan: BillingPriceItem[];
73
+ addons: BillingPriceItem[];
74
+ charges: BillingPriceItem[];
75
+ };
76
+ export type GetPricesParams = {
77
+ currency: string;
78
+ };
79
+ export type GetPricesResponse = {
80
+ v1: BillingVersionPrices;
81
+ v2: BillingVersionPrices;
82
+ };
83
+ export type SeatAddonConfig = {
84
+ pack_id: SeatAddonPackId;
85
+ label: string;
86
+ unit_price: BillingMoney;
87
+ /** Included in base plan before add-on quantity applies (typically 1). */
88
+ included_quantity: number;
89
+ };
90
+ export type GetSeatAddonsParams = {
91
+ currency: string;
92
+ plan_key: AllPlansV2;
93
+ };
94
+ export type GetSeatAddonsResponse = {
95
+ users: SeatAddonConfig;
96
+ phones: SeatAddonConfig;
97
+ credits_per_seat_per_month: number;
98
+ };
99
+ export type RecurringAddonBillingModel = 'quantity' | 'flat';
100
+ export type RecurringAddonOption = {
101
+ pack_id: RecurringAddonPackId;
102
+ name: string;
103
+ description: string;
104
+ billing_model: RecurringAddonBillingModel;
105
+ unit_price: BillingMoney;
106
+ /** e.g. "pack" for automation rules. */
107
+ unit_label?: string;
108
+ /** Automation rules included per pack unit (`automation-pack` — default `25`). */
109
+ rules_per_pack?: number;
110
+ };
111
+ export type GetRecurringAddonsParams = {
112
+ currency: string;
113
+ };
114
+ export type GetRecurringAddonsResponse = {
115
+ automation_pack: RecurringAddonOption;
116
+ priority_support: RecurringAddonOption;
117
+ };
118
+ export type OrderSummaryItemType = 'plan' | 'addon' | 'charge';
119
+ export type OrderSummaryItem = {
120
+ type: OrderSummaryItemType;
121
+ item_price_id: string;
122
+ lookup_key: string | null;
123
+ name: string;
124
+ description: string | null;
125
+ quantity: number;
126
+ unit_price: BillingMoney;
127
+ amount: BillingMoney;
128
+ /** null for one-time charge line items */
129
+ frequency: BillingFrequency | null;
130
+ };
131
+ export type GetOrderSummaryRequestBody = {
132
+ subscription_id?: string;
133
+ line_items: BillingV2LineItem[];
134
+ coupon_id?: string;
135
+ };
136
+ export type OrderSummaryNextCharge = {
137
+ /** Unix timestamp for the next recurring charge. */
138
+ date: number;
139
+ amount: BillingMoney;
140
+ };
141
+ export type GetOrderSummaryResponse = {
142
+ frequency: BillingFrequency;
143
+ currency_code: string;
144
+ items: OrderSummaryItem[];
145
+ /** Line items with quantity > 0 — for "Subtotal (N items)". */
146
+ item_count: number;
147
+ /** Pre-adjustment subtotal from Chargebee invoice_estimate.sub_total. */
148
+ subtotal: BillingMoney;
149
+ /** Promotional / account credits applied — null when none on estimate. */
150
+ credits_applied: BillingMoney | null;
151
+ /** null when no coupon on the estimate. */
152
+ coupon: AppliedCouponSummary | null;
153
+ /** Amount due after credits and coupon (invoice_estimate.total). */
154
+ total: BillingMoney;
155
+ /** Prorated amount due now (invoice_estimate.amount_due). */
156
+ due_today: BillingMoney;
157
+ /** Next full recurring charge — null when not available on estimate. */
158
+ next_charge: OrderSummaryNextCharge | null;
159
+ };
160
+ export type GetChargeOrderSummaryRequestBody = {
161
+ line_items: BillingV2LineItem[];
162
+ /** Chargebee coupon id — resolve via POST /get-coupon-details */
163
+ coupon_id?: string;
164
+ /** Override currency (e.g. INR, USD). Omit to use customer default. */
165
+ currency?: string;
166
+ };
167
+ export type GetChargeOrderSummaryResponse = {
168
+ currency_code: string;
169
+ items: OrderSummaryItem[];
170
+ /** Line items with quantity > 0 */
171
+ item_count: number;
172
+ subtotal: BillingMoney;
173
+ credits_applied: BillingMoney | null;
174
+ coupon: AppliedCouponSummary | null;
175
+ total: BillingMoney;
176
+ /** Amount due now — equals total for one-time charges (no proration). */
177
+ due_today: BillingMoney;
178
+ };
179
+ export type CouponDiscountType = 'fixed_amount' | 'percentage' | 'offer_quantity';
180
+ export type GetCouponDetailsRequestBody = {
181
+ coupon_code: string;
182
+ };
183
+ export type GetCouponDetailsResponse = {
184
+ coupon_id: string;
185
+ coupon_code: string;
186
+ name: string | null;
187
+ discount_type: CouponDiscountType;
188
+ /** Set when discount_type is percentage; otherwise null. */
189
+ discount_percentage: number | null;
190
+ /** Set when discount_type is fixed_amount; otherwise null. */
191
+ discount_amount: BillingMoney | null;
192
+ duration_type: 'one_time' | 'forever' | 'limited_period';
193
+ status: string;
194
+ };
195
+ export type AppliedCouponSummary = {
196
+ coupon_id: string;
197
+ name: string | null;
198
+ discount_type: CouponDiscountType;
199
+ discount_percentage: number | null;
200
+ discount_amount: BillingMoney | null;
201
+ /** Coupon discount applied on this estimate — null when coupon present but discount is zero. */
202
+ applied_amount: BillingMoney | null;
203
+ };
204
+ export type CreateCheckoutSessionRequestBody = {
205
+ success_url: string;
206
+ cancel_url: string;
207
+ line_items: BillingV2LineItem[];
208
+ subscription_id?: string;
209
+ /** Chargebee coupon ids — resolve via POST /get-coupon-details */
210
+ coupon_ids?: string[];
211
+ /** When upgrading an existing sub with coupons. Default `true`. */
212
+ replace_coupon_list?: boolean;
213
+ };
214
+ export type CreateCheckoutSessionResponse = {
215
+ url: string;
216
+ hosted_page_id: string | null;
217
+ expires_at: number | null;
218
+ };
219
+ export type CreateChargeCheckoutSessionRequestBody = {
220
+ line_items: BillingV2LineItem[];
221
+ currency?: string;
222
+ };
223
+ export type CreateChargeCheckoutSessionResponse = {
224
+ url: string;
225
+ hosted_page_id: string | null;
226
+ expires_at: number | null;
227
+ };
228
+ export type CreateCustomerPortalRequestBody = {
229
+ redirect_url: string;
230
+ };
231
+ export type CreateCustomerPortalResponse = {
232
+ url: string;
233
+ expires_at?: number;
234
+ };
235
+ export type UpdateSubscriptionRequestBody = {
236
+ subscription_id: string;
237
+ line_items: BillingV2LineItem[];
238
+ replace_addon_list?: boolean;
239
+ };
240
+ export type UpdateSubscriptionResponse = {
241
+ subscription_id: string;
242
+ status: string;
243
+ current_term_start: number | null;
244
+ current_term_end: number | null;
245
+ cancelled_at: number | null;
246
+ };
247
+ export type CancelSubscriptionRequestBody = {
248
+ subscription_id: string;
249
+ };
250
+ export type CancelSubscriptionResponse = {
251
+ subscription_id: string;
252
+ status: string;
253
+ cancelled_at?: number;
254
+ };
255
+ export type ResumeCancelledSubscriptionRequestBody = {
256
+ subscription_id: string;
257
+ };
258
+ export type ResumeCancelledSubscriptionResponse = {
259
+ subscription_id: string;
260
+ status: string;
261
+ };
262
+ export type BillingV2InvoiceSummary = {
263
+ invoice_id: string;
264
+ status: string;
265
+ amount_due: BillingMoney;
266
+ date: number;
267
+ };
268
+ export type GetUnpaidInvoicesResponse = BillingV2InvoiceSummary[];
269
+ export type GetLatestNextInvoiceResponse = {
270
+ latest_invoice: BillingV2InvoiceSummary | null;
271
+ next_invoice: {
272
+ amount: BillingMoney;
273
+ date: number;
274
+ } | null;
275
+ };
276
+ export type GetInvoiceLinkResponse = {
277
+ url: string;
278
+ } | null;
279
+ export type DownloadInvoiceParams = {
280
+ invoice_id: string;
281
+ };
282
+ export type DownloadInvoiceResponse = {
283
+ url: string;
284
+ valid_till?: number;
285
+ };
286
+ export type GetRecentInvoicesParams = {
287
+ /** Max invoices to return (default 10, max 50). Customer resolved from org_id — do not pass customer_id. */
288
+ limit?: number;
289
+ };
290
+ export type RecentInvoiceLineItem = {
291
+ description: string | null;
292
+ entity_description: string | null;
293
+ quantity: number;
294
+ amount: BillingMoney;
295
+ };
296
+ /** Chargebee invoice row — aligned with dashboard fields (ID, status, type, total, credits). */
297
+ export type ChargebeeInvoiceSummary = {
298
+ invoice_id: string;
299
+ /** Primary display title — first line item description from Chargebee. */
300
+ name: string;
301
+ description: string | null;
302
+ status: string;
303
+ /** `recurring` → "Recurring"; otherwise "One-time" on Chargebee. */
304
+ type: 'recurring' | 'one_time';
305
+ recurring: boolean;
306
+ /** Invoice created date (Chargebee `date`). */
307
+ date: number | null;
308
+ due_date: number | null;
309
+ paid_at: number | null;
310
+ subscription_id: string | null;
311
+ total: BillingMoney;
312
+ amount_due: BillingMoney;
313
+ amount_paid: BillingMoney;
314
+ /** Promotional / account credits applied ("Credits Issued" on Chargebee). */
315
+ credits_applied: BillingMoney | null;
316
+ line_items: RecentInvoiceLineItem[];
317
+ download_url: string | null;
318
+ download_valid_till: number | null;
319
+ };
320
+ export type RecentInvoice = ChargebeeInvoiceSummary;
321
+ export type GetRecentInvoicesResponse = RecentInvoice[];
322
+ /** Billing address fields accepted by Chargebee customer.updateBillingInfo. */
323
+ export type BillingAddress = {
324
+ first_name?: string;
325
+ last_name?: string;
326
+ email?: string;
327
+ company?: string;
328
+ phone?: string;
329
+ line1?: string;
330
+ line2?: string;
331
+ line3?: string;
332
+ city?: string;
333
+ state_code?: string;
334
+ state?: string;
335
+ country?: string;
336
+ zip?: string;
337
+ vat_number?: string;
338
+ };
339
+ export type UpdateBillingDetailsRequestBody = {
340
+ billing_address: BillingAddress;
341
+ /** When country is IN, optionally move free-trial customer to IN entity. Defaults to US behaviour otherwise. */
342
+ move_to_entity?: BillingEntity;
343
+ };
344
+ export type UpdateBillingDetailsResponse = {
345
+ customer_id: string;
346
+ billing_address: BillingAddress;
347
+ preferred_currency_code: string;
348
+ };
349
+ export type GetUsageResponse = {
350
+ allowances: UsageAllowances;
351
+ consumption: UsageConsumption;
352
+ };
353
+ /** Upcoming renewal charge — null when no subscription or estimate unavailable. */
354
+ export type PlanSummaryNextInvoice = {
355
+ amount: BillingMoney;
356
+ date: number;
357
+ /** e.g. "USD 56.00 on 18 Jul 2026" */
358
+ label: string;
359
+ };
360
+ /** Scheduled end-of-term cancellation — null when subscription will renew. */
361
+ export type PlanSummaryCancelsOn = {
362
+ date: number;
363
+ /** e.g. "Cancels on 18 Jul 2026" */
364
+ label: string;
365
+ };
366
+ export type PlanSummarySection = {
367
+ current_plan: string;
368
+ /** null when org_plan is not seeded yet */
369
+ plan_id: AllPlansV2 | string | null;
370
+ billing_frequency: BillingFrequency | 'weekly' | 'custom';
371
+ users: number;
372
+ phones: number;
373
+ /** null on free trial — no recurring rules allowance */
374
+ rules_allowance: number | null;
375
+ /** null on free trial — recurring BM only; free trial has top-up via charge_packs */
376
+ bm_credits_allowance: number | null;
377
+ /** null on free trial — recurring AI from seats; purchased top-up via charge_packs */
378
+ ai_credits_allowance: number | null;
379
+ /** null on free trial, when scheduled to cancel, or when no upcoming renewal */
380
+ next_invoice: PlanSummaryNextInvoice | null;
381
+ /** null unless subscription is scheduled to cancel at period end (`non_renewing`) */
382
+ cancels_on: PlanSummaryCancelsOn | null;
383
+ };
384
+ export type PlanSummarySubscriptionStatus = 'active' | 'unpaid' | 'inactive';
385
+ export type PlanSummaryInvoice = ChargebeeInvoiceSummary & {
386
+ /** Hosted payment page — null unless status is payment_due / not_paid. */
387
+ payment_url: string | null;
388
+ };
389
+ export type PlanSummaryChargePack = {
390
+ pack_id: 'bulk-message-credits' | 'ai-pack';
391
+ lookup_key: string;
392
+ name: string;
393
+ /** Total purchased credits granted (from usage_allowances). */
394
+ purchased_credits: number | null;
395
+ /** Remaining after consumption — null when zero. */
396
+ remaining_credits: number | null;
397
+ };
398
+ export type GetPlanSummaryResponse = {
399
+ billing_version: BillingVersion;
400
+ summary: PlanSummarySection;
401
+ subscription_status: PlanSummarySubscriptionStatus;
402
+ /** Newest first — empty when customer has no invoices. */
403
+ last_5_invoices: PlanSummaryInvoice[];
404
+ /** BM + AI one-time top-ups — empty when no purchased balance. */
405
+ charge_packs: PlanSummaryChargePack[];
406
+ /** Purchased top-up allowances and consumption from org_plan (V2). */
407
+ usage: {
408
+ allowances: UsageAllowances;
409
+ consumption: UsageConsumption;
410
+ remaining: UsageAllowances;
411
+ } | null;
412
+ };
413
+ /** Raw Chargebee webhook POST body. */
414
+ export type ChargebeeWebhookEventPayload = {
415
+ id: string;
416
+ occurred_at: number;
417
+ event_type: string;
418
+ content: Record<string, unknown>;
419
+ source?: string;
420
+ webhook_status?: string;
421
+ };
422
+ export type ChargebeeV2EventHandleResult = {
423
+ received: true;
424
+ handled: boolean;
425
+ event_id: string;
426
+ event_type: string;
427
+ billing_version?: BillingVersion;
428
+ org_id?: string;
429
+ reason?: string;
430
+ };
431
+ //# sourceMappingURL=billing.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"billing.types.d.ts","sourceRoot":"","sources":["../src/billing.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAEtD,OAAO,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAIlE,MAAM,MAAM,cAAc,GAAG,IAAI,GAAG,IAAI,CAAC;AAEzC,oBAAY,UAAU;IACpB,UAAU,kBAAkB;IAC5B,eAAe,uBAAuB;IACtC,cAAc,sBAAsB;IACpC,WAAW,mBAAm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,EAAE,CAAC;IACtC,sEAAsE;IACtE,KAAK,EAAE;QACL,UAAU,EAAE,eAAe,CAAC;QAC5B,WAAW,EAAE,gBAAgB,CAAC;QAC9B,SAAS,EAAE,eAAe,CAAC;KAC5B,GAAG,IAAI,CAAC;CACV,CAAC;AAIF,uCAAuC;AACvC,MAAM,MAAM,4BAA4B,GAAG;IACzC,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACjC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF,MAAM,MAAM,4BAA4B,GAAG;IACzC,QAAQ,EAAE,IAAI,CAAC;IACf,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,eAAe,CAAC,EAAE,cAAc,CAAC;IACjC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC"}
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isV2Plan = exports.GENERIC_PACK_IDS = exports.AllPlansV2 = void 0;
4
+ var AllPlansV2;
5
+ (function (AllPlansV2) {
6
+ AllPlansV2["FREE_TRIAL"] = "v2-free-trial";
7
+ AllPlansV2["MONTHLY_STARTER"] = "v2-monthly-starter";
8
+ AllPlansV2["YEARLY_STARTER"] = "v2-annual-starter";
9
+ AllPlansV2["MONTHLY_PRO"] = "v2-monthly-pro";
10
+ AllPlansV2["YEARLY_PRO"] = "v2-annual-pro";
11
+ })(AllPlansV2 || (exports.AllPlansV2 = AllPlansV2 = {}));
12
+ exports.GENERIC_PACK_IDS = [
13
+ 'priority-support-pack',
14
+ 'automation-pack',
15
+ 'ai-pack',
16
+ 'bulk-message-credits',
17
+ 'guided-onboarding',
18
+ 'support-call',
19
+ 'support-call-pack',
20
+ ];
21
+ const isV2Plan = (plan) => plan.billing_version === 'v2';
22
+ exports.isV2Plan = isV2Plan;
package/dist/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ export * from './billing.types';
1
2
  export * from './object.types';
2
3
  export * from './rules.types';
3
4
  export * from './supabase.types';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,SAAS,CAAC;AACxB,cAAc,mBAAmB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,SAAS,CAAC;AACxB,cAAc,mBAAmB,CAAC"}
package/dist/index.js CHANGED
@@ -14,6 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./billing.types"), exports);
17
18
  __exportStar(require("./object.types"), exports);
18
19
  __exportStar(require("./rules.types"), exports);
19
20
  __exportStar(require("./supabase.types"), exports);
@@ -432,31 +432,31 @@ export type Rule = OverrideProperties<Tables<'tbl_automation_rules'>, {
432
432
  export declare const RuleInfoSchemaMap: {
433
433
  message: {
434
434
  triggers: readonly ["message.created", "message.updated", "message.flagged", "message.unflagged", "message.deleted"];
435
- variableMaps: (Record<"message.chat_id" | "message.org_id" | "message.org_phone" | "message.author" | "message.body" | "message.flag_status" | "message.has_quoted_msg" | "message.media" | "message.message_id" | "message.message_ticket_id" | "message.message_type" | "message.performed_by" | "message.sender_phone" | "message.timestamp" | "message.is_last_message", VariableNameValueType> | Record<"sender.org_id" | "sender.contact_id" | "sender.contact_name" | "sender.is_internal" | "sender.is_admin" | "sender.labels", VariableNameValueType> | Record<"chat.chat_id" | "chat.created_at" | "chat.org_id" | "chat.org_phone" | "chat.labels" | "chat.assigned_to" | "chat.chat_name" | "chat.chat_type" | "chat.group_description" | "chat.info_admins_only" | "chat.chat_org_phones" | "chat.messages_admins_only" | "chat.custom_properties" | "chat.initiated_by" | "chat.has_flagged_messages" | "chat.members" | "chat.assignee_name", VariableNameValueType>)[];
435
+ variableMaps: (Record<"message.org_id" | "message.chat_id" | "message.org_phone" | "message.author" | "message.body" | "message.flag_status" | "message.has_quoted_msg" | "message.media" | "message.message_id" | "message.message_ticket_id" | "message.message_type" | "message.performed_by" | "message.sender_phone" | "message.timestamp" | "message.is_last_message", VariableNameValueType> | Record<"sender.org_id" | "sender.contact_id" | "sender.contact_name" | "sender.is_internal" | "sender.is_admin" | "sender.labels", VariableNameValueType> | Record<"chat.created_at" | "chat.org_id" | "chat.chat_id" | "chat.org_phone" | "chat.labels" | "chat.assigned_to" | "chat.chat_name" | "chat.chat_type" | "chat.group_description" | "chat.info_admins_only" | "chat.chat_org_phones" | "chat.messages_admins_only" | "chat.custom_properties" | "chat.initiated_by" | "chat.has_flagged_messages" | "chat.members" | "chat.assignee_name", VariableNameValueType>)[];
436
436
  };
437
437
  ticket: {
438
438
  triggers: readonly ["ticket.created", "ticket.updated", "ticket.closed", "ticket.label.updated", "ticket.message.attached"];
439
- variableMaps: (Record<"message.chat_id" | "message.org_id" | "message.org_phone" | "message.author" | "message.body" | "message.flag_status" | "message.has_quoted_msg" | "message.media" | "message.message_id" | "message.message_ticket_id" | "message.message_type" | "message.performed_by" | "message.sender_phone" | "message.timestamp" | "message.is_last_message", VariableNameValueType> | Record<"sender.org_id" | "sender.contact_id" | "sender.contact_name" | "sender.is_internal" | "sender.is_admin" | "sender.labels", VariableNameValueType> | Record<"chat.chat_id" | "chat.created_at" | "chat.org_id" | "chat.org_phone" | "chat.labels" | "chat.assigned_to" | "chat.chat_name" | "chat.chat_type" | "chat.group_description" | "chat.info_admins_only" | "chat.chat_org_phones" | "chat.messages_admins_only" | "chat.custom_properties" | "chat.initiated_by" | "chat.has_flagged_messages" | "chat.members" | "chat.assignee_name", VariableNameValueType> | Record<"ticket.assignee" | "ticket.chat_id" | "ticket.created_at" | "ticket.due_date" | "ticket.org_id" | "ticket.priority" | "ticket.status" | "ticket.ticket_id" | "ticket.is_deleted" | "ticket.labels" | "ticket.custom_properties" | "ticket.subject" | "ticket.raised_by", VariableNameValueType>)[];
439
+ variableMaps: (Record<"message.org_id" | "message.chat_id" | "message.org_phone" | "message.author" | "message.body" | "message.flag_status" | "message.has_quoted_msg" | "message.media" | "message.message_id" | "message.message_ticket_id" | "message.message_type" | "message.performed_by" | "message.sender_phone" | "message.timestamp" | "message.is_last_message", VariableNameValueType> | Record<"sender.org_id" | "sender.contact_id" | "sender.contact_name" | "sender.is_internal" | "sender.is_admin" | "sender.labels", VariableNameValueType> | Record<"chat.created_at" | "chat.org_id" | "chat.chat_id" | "chat.org_phone" | "chat.labels" | "chat.assigned_to" | "chat.chat_name" | "chat.chat_type" | "chat.group_description" | "chat.info_admins_only" | "chat.chat_org_phones" | "chat.messages_admins_only" | "chat.custom_properties" | "chat.initiated_by" | "chat.has_flagged_messages" | "chat.members" | "chat.assignee_name", VariableNameValueType> | Record<"ticket.created_at" | "ticket.org_id" | "ticket.chat_id" | "ticket.ticket_id" | "ticket.assignee" | "ticket.due_date" | "ticket.priority" | "ticket.status" | "ticket.is_deleted" | "ticket.labels" | "ticket.custom_properties" | "ticket.subject" | "ticket.raised_by", VariableNameValueType>)[];
440
440
  };
441
441
  chat: {
442
442
  triggers: readonly ["chat.created", "chat.label.updated"];
443
- variableMaps: Record<"chat.chat_id" | "chat.created_at" | "chat.org_id" | "chat.org_phone" | "chat.labels" | "chat.assigned_to" | "chat.chat_name" | "chat.chat_type" | "chat.group_description" | "chat.info_admins_only" | "chat.chat_org_phones" | "chat.messages_admins_only" | "chat.custom_properties" | "chat.initiated_by" | "chat.has_flagged_messages" | "chat.members" | "chat.assignee_name", VariableNameValueType>[];
443
+ variableMaps: Record<"chat.created_at" | "chat.org_id" | "chat.chat_id" | "chat.org_phone" | "chat.labels" | "chat.assigned_to" | "chat.chat_name" | "chat.chat_type" | "chat.group_description" | "chat.info_admins_only" | "chat.chat_org_phones" | "chat.messages_admins_only" | "chat.custom_properties" | "chat.initiated_by" | "chat.has_flagged_messages" | "chat.members" | "chat.assignee_name", VariableNameValueType>[];
444
444
  };
445
445
  reaction: {
446
446
  triggers: readonly ["reaction.added"];
447
- variableMaps: (Record<"message.chat_id" | "message.org_id" | "message.org_phone" | "message.author" | "message.body" | "message.flag_status" | "message.has_quoted_msg" | "message.media" | "message.message_id" | "message.message_ticket_id" | "message.message_type" | "message.performed_by" | "message.sender_phone" | "message.timestamp" | "message.is_last_message", VariableNameValueType> | Record<"sender.org_id" | "sender.contact_id" | "sender.contact_name" | "sender.is_internal" | "sender.is_admin" | "sender.labels", VariableNameValueType> | Record<"chat.chat_id" | "chat.created_at" | "chat.org_id" | "chat.org_phone" | "chat.labels" | "chat.assigned_to" | "chat.chat_name" | "chat.chat_type" | "chat.group_description" | "chat.info_admins_only" | "chat.chat_org_phones" | "chat.messages_admins_only" | "chat.custom_properties" | "chat.initiated_by" | "chat.has_flagged_messages" | "chat.members" | "chat.assignee_name", VariableNameValueType> | Record<"reaction.chat_id" | "reaction.reaction" | "reaction.message_id" | "reaction.sender_id" | "reaction.reaction_id", VariableNameValueType>)[];
447
+ variableMaps: (Record<"message.org_id" | "message.chat_id" | "message.org_phone" | "message.author" | "message.body" | "message.flag_status" | "message.has_quoted_msg" | "message.media" | "message.message_id" | "message.message_ticket_id" | "message.message_type" | "message.performed_by" | "message.sender_phone" | "message.timestamp" | "message.is_last_message", VariableNameValueType> | Record<"sender.org_id" | "sender.contact_id" | "sender.contact_name" | "sender.is_internal" | "sender.is_admin" | "sender.labels", VariableNameValueType> | Record<"chat.created_at" | "chat.org_id" | "chat.chat_id" | "chat.org_phone" | "chat.labels" | "chat.assigned_to" | "chat.chat_name" | "chat.chat_type" | "chat.group_description" | "chat.info_admins_only" | "chat.chat_org_phones" | "chat.messages_admins_only" | "chat.custom_properties" | "chat.initiated_by" | "chat.has_flagged_messages" | "chat.members" | "chat.assignee_name", VariableNameValueType> | Record<"reaction.chat_id" | "reaction.reaction" | "reaction.message_id" | "reaction.sender_id" | "reaction.reaction_id", VariableNameValueType>)[];
448
448
  };
449
449
  task: {
450
450
  triggers: readonly ["task.created", "task.assignee.updated"];
451
- variableMaps: (Record<"chat.chat_id" | "chat.created_at" | "chat.org_id" | "chat.org_phone" | "chat.labels" | "chat.assigned_to" | "chat.chat_name" | "chat.chat_type" | "chat.group_description" | "chat.info_admins_only" | "chat.chat_org_phones" | "chat.messages_admins_only" | "chat.custom_properties" | "chat.initiated_by" | "chat.has_flagged_messages" | "chat.members" | "chat.assignee_name", VariableNameValueType> | Record<"task.assignee" | "task.created_at" | "task.due_date" | "task.notes" | "task.org_id" | "task.priority" | "task.status" | "task.task_id" | "task.title", VariableNameValueType>)[];
451
+ variableMaps: (Record<"chat.created_at" | "chat.org_id" | "chat.chat_id" | "chat.org_phone" | "chat.labels" | "chat.assigned_to" | "chat.chat_name" | "chat.chat_type" | "chat.group_description" | "chat.info_admins_only" | "chat.chat_org_phones" | "chat.messages_admins_only" | "chat.custom_properties" | "chat.initiated_by" | "chat.has_flagged_messages" | "chat.members" | "chat.assignee_name", VariableNameValueType> | Record<"task.created_at" | "task.org_id" | "task.assignee" | "task.due_date" | "task.notes" | "task.priority" | "task.status" | "task.task_id" | "task.title", VariableNameValueType>)[];
452
452
  };
453
453
  call: {
454
454
  triggers: readonly ["call.created"];
455
- variableMaps: (Record<"chat.chat_id" | "chat.created_at" | "chat.org_id" | "chat.org_phone" | "chat.labels" | "chat.assigned_to" | "chat.chat_name" | "chat.chat_type" | "chat.group_description" | "chat.info_admins_only" | "chat.chat_org_phones" | "chat.messages_admins_only" | "chat.custom_properties" | "chat.initiated_by" | "chat.has_flagged_messages" | "chat.members" | "chat.assignee_name", VariableNameValueType> | Record<"call_notification.chat_id" | "call_notification.org_id" | "call_notification.author" | "call_notification.timestamp" | "call_notification.notification_id" | "call_notification.isVideo" | "call_notification.isOutgoing" | "call_notification.call_result", VariableNameValueType>)[];
455
+ variableMaps: (Record<"chat.created_at" | "chat.org_id" | "chat.chat_id" | "chat.org_phone" | "chat.labels" | "chat.assigned_to" | "chat.chat_name" | "chat.chat_type" | "chat.group_description" | "chat.info_admins_only" | "chat.chat_org_phones" | "chat.messages_admins_only" | "chat.custom_properties" | "chat.initiated_by" | "chat.has_flagged_messages" | "chat.members" | "chat.assignee_name", VariableNameValueType> | Record<"call_notification.org_id" | "call_notification.chat_id" | "call_notification.author" | "call_notification.timestamp" | "call_notification.notification_id" | "call_notification.isVideo" | "call_notification.isOutgoing" | "call_notification.call_result", VariableNameValueType>)[];
456
456
  };
457
457
  member: {
458
458
  triggers: readonly ["member.joined"];
459
- variableMaps: (Record<"chat.chat_id" | "chat.created_at" | "chat.org_id" | "chat.org_phone" | "chat.labels" | "chat.assigned_to" | "chat.chat_name" | "chat.chat_type" | "chat.group_description" | "chat.info_admins_only" | "chat.chat_org_phones" | "chat.messages_admins_only" | "chat.custom_properties" | "chat.initiated_by" | "chat.has_flagged_messages" | "chat.members" | "chat.assignee_name", VariableNameValueType> | Record<"member_notification.chat_id" | "member_notification.org_id" | "member_notification.type" | "member_notification.org_phone" | "member_notification.timestamp" | "member_notification.notification_id" | "member_notification.recipientids", VariableNameValueType>)[];
459
+ variableMaps: (Record<"chat.created_at" | "chat.org_id" | "chat.chat_id" | "chat.org_phone" | "chat.labels" | "chat.assigned_to" | "chat.chat_name" | "chat.chat_type" | "chat.group_description" | "chat.info_admins_only" | "chat.chat_org_phones" | "chat.messages_admins_only" | "chat.custom_properties" | "chat.initiated_by" | "chat.has_flagged_messages" | "chat.members" | "chat.assignee_name", VariableNameValueType> | Record<"member_notification.type" | "member_notification.org_id" | "member_notification.chat_id" | "member_notification.org_phone" | "member_notification.timestamp" | "member_notification.notification_id" | "member_notification.recipientids", VariableNameValueType>)[];
460
460
  };
461
461
  };
462
462
  export declare const additionalAssigneeOptions: {