@opencx/mcp 1.15.48 → 1.15.49
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/companies.spec.js +59 -0
- package/dist/companies.spec.js.map +1 -1
- package/dist/schema.d.ts +91 -2
- package/dist/schema.d.ts.map +1 -1
- package/dist/tools/companies.d.ts.map +1 -1
- package/dist/tools/companies.js +55 -0
- package/dist/tools/companies.js.map +1 -1
- package/dist/tools/contact-segment-schemas.d.ts +42 -42
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"companies.d.ts","sourceRoot":"","sources":["../../src/tools/companies.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAGzE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"companies.d.ts","sourceRoot":"","sources":["../../src/tools/companies.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAGzE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAoCrD,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,YAAY,QAqO3E"}
|
package/dist/tools/companies.js
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { jsonContent } from '../api-client.js';
|
|
3
|
+
/** Every op the search route accepts — `satisfies` breaks here if the API drops one. */
|
|
4
|
+
const CUSTOM_DATA_OPS = [
|
|
5
|
+
'exists',
|
|
6
|
+
'not_exists',
|
|
7
|
+
'eq',
|
|
8
|
+
'neq',
|
|
9
|
+
'contains',
|
|
10
|
+
'before',
|
|
11
|
+
'after',
|
|
12
|
+
];
|
|
3
13
|
/** Name one teammate, by id or email — never both. Shared by both write tools. */
|
|
4
14
|
const ownerInput = z.object({
|
|
5
15
|
id: z.number().int().optional().describe('OpenCX user id of the owning teammate'),
|
|
@@ -20,6 +30,51 @@ export function registerCompanyTools(server, client) {
|
|
|
20
30
|
const data = (await client.GET('/companies', { params: { query: { page, limit } } })).data;
|
|
21
31
|
return jsonContent(data);
|
|
22
32
|
});
|
|
33
|
+
server.registerTool('search_companies', {
|
|
34
|
+
description: 'Find companies by owning teammate, by attribute conditions (all must hold), or by a substring of the name or external_id, sorted and paged. Use list_companies or get_company first to see which attribute keys and value formats exist. `before` / `after` take a YYYY-MM-DD day and match attributes holding an ISO date or timestamp, or a Unix timestamp; the day itself matches neither.',
|
|
35
|
+
inputSchema: {
|
|
36
|
+
owner_ids: z
|
|
37
|
+
.array(z.number().int())
|
|
38
|
+
.optional()
|
|
39
|
+
.describe('Owned by any of these teammates (OpenCX user ids). ORed with unowned.'),
|
|
40
|
+
unowned: z.literal(true).optional().describe('Include companies nobody owns'),
|
|
41
|
+
custom_data: z
|
|
42
|
+
.array(z.object({
|
|
43
|
+
key: z.string().min(1).describe('Attribute key'),
|
|
44
|
+
op: z.enum(CUSTOM_DATA_OPS),
|
|
45
|
+
value: z
|
|
46
|
+
.string()
|
|
47
|
+
.optional()
|
|
48
|
+
.describe('Required for every op except exists / not_exists'),
|
|
49
|
+
}))
|
|
50
|
+
.optional()
|
|
51
|
+
.describe('Attribute conditions, all of which must hold'),
|
|
52
|
+
search: z
|
|
53
|
+
.string()
|
|
54
|
+
.optional()
|
|
55
|
+
.describe('Case-insensitive substring of the name or external_id'),
|
|
56
|
+
ordering_field: z.enum(['name', 'created_at', 'contacts_count']).optional(),
|
|
57
|
+
ordering_direction: z.enum(['asc', 'desc']).optional(),
|
|
58
|
+
page: z.number().int().min(1).optional().describe('Page number, starting at 1'),
|
|
59
|
+
limit: z.number().int().min(1).max(200).optional().describe('Companies per page, max 200'),
|
|
60
|
+
},
|
|
61
|
+
}, async (params) => {
|
|
62
|
+
const body = {
|
|
63
|
+
filters: {
|
|
64
|
+
owner_ids: params.owner_ids,
|
|
65
|
+
unowned: params.unowned,
|
|
66
|
+
custom_data: params.custom_data,
|
|
67
|
+
},
|
|
68
|
+
search: params.search,
|
|
69
|
+
ordering: params.ordering_field || params.ordering_direction
|
|
70
|
+
? { field: params.ordering_field, direction: params.ordering_direction }
|
|
71
|
+
: undefined,
|
|
72
|
+
page: params.page,
|
|
73
|
+
limit: params.limit,
|
|
74
|
+
};
|
|
75
|
+
const data = (await client.POST('/companies/search', { body })).data;
|
|
76
|
+
return jsonContent(data);
|
|
77
|
+
});
|
|
23
78
|
server.registerTool('get_company', {
|
|
24
79
|
description: 'Retrieve one company by its OpenCX id, including its attributes and its agent_owner.',
|
|
25
80
|
inputSchema: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"companies.js","sourceRoot":"","sources":["../../src/tools/companies.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"companies.js","sourceRoot":"","sources":["../../src/tools/companies.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAgB/C,wFAAwF;AACxF,MAAM,eAAe,GAAG;IACtB,QAAQ;IACR,YAAY;IACZ,IAAI;IACJ,KAAK;IACL,UAAU;IACV,QAAQ;IACR,OAAO;CACmC,CAAC;AAE7C,kFAAkF;AAClF,MAAM,UAAU,GAAG,CAAC,CAAC,MAAM,CAAC;IAC1B,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,uCAAuC,CAAC;IACjF,KAAK,EAAE,CAAC;SACL,MAAM,EAAE;SACR,KAAK,EAAE;SACP,QAAQ,EAAE;SACV,QAAQ,CAAC,+EAA+E,CAAC;CAC7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;KACF,EACD,KAAK,EAAE,EAAE,UAAU,EAAE,WAAW,EAAE,EAAE,EAAE;QACpC,MAAM,IAAI,GAAG,CACX,MAAM,MAAM,CAAC,MAAM,CAAC,gDAAgD,EAAE;YACpE,MAAM,EAAE,EAAE,IAAI,EAAE,EAAE,UAAU,EAAE,WAAW,EAAE,EAAE;SAC9C,CAAC,CACH,CAAC,IAAI,CAAC;QACP,OAAO,WAAW,CAAC,IAAI,CAAC,CAAC;IAC3B,CAAC,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -22,12 +22,12 @@ export declare const contactSegmentDefinitionSchema: z.ZodNullable<z.ZodObject<{
|
|
|
22
22
|
type: z.ZodLiteral<"contacts_created_at_between">;
|
|
23
23
|
}, "strip", z.ZodTypeAny, {
|
|
24
24
|
type: "contacts_created_at_between";
|
|
25
|
-
after?: string | undefined;
|
|
26
25
|
before?: string | undefined;
|
|
26
|
+
after?: string | undefined;
|
|
27
27
|
}, {
|
|
28
28
|
type: "contacts_created_at_between";
|
|
29
|
-
after?: string | undefined;
|
|
30
29
|
before?: string | undefined;
|
|
30
|
+
after?: string | undefined;
|
|
31
31
|
}>, z.ZodObject<{
|
|
32
32
|
type: z.ZodLiteral<"contacts_email_domain_name_in">;
|
|
33
33
|
domain_name_in: z.ZodArray<z.ZodString, "many">;
|
|
@@ -109,24 +109,24 @@ export declare const contactSegmentDefinitionSchema: z.ZodNullable<z.ZodObject<{
|
|
|
109
109
|
type: z.ZodLiteral<"last_contacted_at_between">;
|
|
110
110
|
}, "strip", z.ZodTypeAny, {
|
|
111
111
|
type: "last_contacted_at_between";
|
|
112
|
-
after?: string | undefined;
|
|
113
112
|
before?: string | undefined;
|
|
113
|
+
after?: string | undefined;
|
|
114
114
|
}, {
|
|
115
115
|
type: "last_contacted_at_between";
|
|
116
|
-
after?: string | undefined;
|
|
117
116
|
before?: string | undefined;
|
|
117
|
+
after?: string | undefined;
|
|
118
118
|
}>, z.ZodObject<{
|
|
119
119
|
after: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
120
120
|
before: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
121
121
|
type: z.ZodLiteral<"last_contacted_at_with_handoff_between">;
|
|
122
122
|
}, "strip", z.ZodTypeAny, {
|
|
123
123
|
type: "last_contacted_at_with_handoff_between";
|
|
124
|
-
after?: string | undefined;
|
|
125
124
|
before?: string | undefined;
|
|
125
|
+
after?: string | undefined;
|
|
126
126
|
}, {
|
|
127
127
|
type: "last_contacted_at_with_handoff_between";
|
|
128
|
-
after?: string | undefined;
|
|
129
128
|
before?: string | undefined;
|
|
129
|
+
after?: string | undefined;
|
|
130
130
|
}>, z.ZodObject<{
|
|
131
131
|
type: z.ZodLiteral<"contact_has_phone">;
|
|
132
132
|
has: z.ZodBoolean;
|
|
@@ -170,34 +170,34 @@ export declare const contactSegmentDefinitionSchema: z.ZodNullable<z.ZodObject<{
|
|
|
170
170
|
op: z.ZodEnum<["exists", "not_exists", "eq", "neq", "contains"]>;
|
|
171
171
|
value: z.ZodOptional<z.ZodString>;
|
|
172
172
|
}, "strip", z.ZodTypeAny, {
|
|
173
|
-
key: string;
|
|
174
173
|
op: "exists" | "not_exists" | "eq" | "neq" | "contains";
|
|
174
|
+
key: string;
|
|
175
175
|
value?: string | undefined;
|
|
176
176
|
}, {
|
|
177
|
-
key: string;
|
|
178
177
|
op: "exists" | "not_exists" | "eq" | "neq" | "contains";
|
|
178
|
+
key: string;
|
|
179
179
|
value?: string | undefined;
|
|
180
180
|
}>, "atleastone">;
|
|
181
181
|
}, "strip", z.ZodTypeAny, {
|
|
182
182
|
type: "contacts_custom_data";
|
|
183
183
|
conditions: [{
|
|
184
|
-
key: string;
|
|
185
184
|
op: "exists" | "not_exists" | "eq" | "neq" | "contains";
|
|
185
|
+
key: string;
|
|
186
186
|
value?: string | undefined;
|
|
187
187
|
}, ...{
|
|
188
|
-
key: string;
|
|
189
188
|
op: "exists" | "not_exists" | "eq" | "neq" | "contains";
|
|
189
|
+
key: string;
|
|
190
190
|
value?: string | undefined;
|
|
191
191
|
}[]];
|
|
192
192
|
}, {
|
|
193
193
|
type: "contacts_custom_data";
|
|
194
194
|
conditions: [{
|
|
195
|
-
key: string;
|
|
196
195
|
op: "exists" | "not_exists" | "eq" | "neq" | "contains";
|
|
196
|
+
key: string;
|
|
197
197
|
value?: string | undefined;
|
|
198
198
|
}, ...{
|
|
199
|
-
key: string;
|
|
200
199
|
op: "exists" | "not_exists" | "eq" | "neq" | "contains";
|
|
200
|
+
key: string;
|
|
201
201
|
value?: string | undefined;
|
|
202
202
|
}[]];
|
|
203
203
|
}>]>, "many">;
|
|
@@ -209,8 +209,8 @@ export declare const contactSegmentDefinitionSchema: z.ZodNullable<z.ZodObject<{
|
|
|
209
209
|
type: "contact_id_in";
|
|
210
210
|
} | {
|
|
211
211
|
type: "contacts_created_at_between";
|
|
212
|
-
after?: string | undefined;
|
|
213
212
|
before?: string | undefined;
|
|
213
|
+
after?: string | undefined;
|
|
214
214
|
} | {
|
|
215
215
|
type: "contacts_email_domain_name_in";
|
|
216
216
|
domain_name_in: string[];
|
|
@@ -238,12 +238,12 @@ export declare const contactSegmentDefinitionSchema: z.ZodNullable<z.ZodObject<{
|
|
|
238
238
|
belongs?: boolean | undefined;
|
|
239
239
|
} | {
|
|
240
240
|
type: "last_contacted_at_between";
|
|
241
|
-
after?: string | undefined;
|
|
242
241
|
before?: string | undefined;
|
|
242
|
+
after?: string | undefined;
|
|
243
243
|
} | {
|
|
244
244
|
type: "last_contacted_at_with_handoff_between";
|
|
245
|
-
after?: string | undefined;
|
|
246
245
|
before?: string | undefined;
|
|
246
|
+
after?: string | undefined;
|
|
247
247
|
} | {
|
|
248
248
|
has: boolean;
|
|
249
249
|
type: "contact_has_phone";
|
|
@@ -259,12 +259,12 @@ export declare const contactSegmentDefinitionSchema: z.ZodNullable<z.ZodObject<{
|
|
|
259
259
|
} | {
|
|
260
260
|
type: "contacts_custom_data";
|
|
261
261
|
conditions: [{
|
|
262
|
-
key: string;
|
|
263
262
|
op: "exists" | "not_exists" | "eq" | "neq" | "contains";
|
|
263
|
+
key: string;
|
|
264
264
|
value?: string | undefined;
|
|
265
265
|
}, ...{
|
|
266
|
-
key: string;
|
|
267
266
|
op: "exists" | "not_exists" | "eq" | "neq" | "contains";
|
|
267
|
+
key: string;
|
|
268
268
|
value?: string | undefined;
|
|
269
269
|
}[]];
|
|
270
270
|
})[];
|
|
@@ -276,8 +276,8 @@ export declare const contactSegmentDefinitionSchema: z.ZodNullable<z.ZodObject<{
|
|
|
276
276
|
type: "contact_id_in";
|
|
277
277
|
} | {
|
|
278
278
|
type: "contacts_created_at_between";
|
|
279
|
-
after?: string | undefined;
|
|
280
279
|
before?: string | undefined;
|
|
280
|
+
after?: string | undefined;
|
|
281
281
|
} | {
|
|
282
282
|
type: "contacts_email_domain_name_in";
|
|
283
283
|
domain_name_in: string[];
|
|
@@ -305,12 +305,12 @@ export declare const contactSegmentDefinitionSchema: z.ZodNullable<z.ZodObject<{
|
|
|
305
305
|
belongs?: boolean | undefined;
|
|
306
306
|
} | {
|
|
307
307
|
type: "last_contacted_at_between";
|
|
308
|
-
after?: string | undefined;
|
|
309
308
|
before?: string | undefined;
|
|
309
|
+
after?: string | undefined;
|
|
310
310
|
} | {
|
|
311
311
|
type: "last_contacted_at_with_handoff_between";
|
|
312
|
-
after?: string | undefined;
|
|
313
312
|
before?: string | undefined;
|
|
313
|
+
after?: string | undefined;
|
|
314
314
|
} | {
|
|
315
315
|
has: boolean;
|
|
316
316
|
type: "contact_has_phone";
|
|
@@ -326,12 +326,12 @@ export declare const contactSegmentDefinitionSchema: z.ZodNullable<z.ZodObject<{
|
|
|
326
326
|
} | {
|
|
327
327
|
type: "contacts_custom_data";
|
|
328
328
|
conditions: [{
|
|
329
|
-
key: string;
|
|
330
329
|
op: "exists" | "not_exists" | "eq" | "neq" | "contains";
|
|
330
|
+
key: string;
|
|
331
331
|
value?: string | undefined;
|
|
332
332
|
}, ...{
|
|
333
|
-
key: string;
|
|
334
333
|
op: "exists" | "not_exists" | "eq" | "neq" | "contains";
|
|
334
|
+
key: string;
|
|
335
335
|
value?: string | undefined;
|
|
336
336
|
}[]];
|
|
337
337
|
})[];
|
|
@@ -345,8 +345,8 @@ export declare const contactSegmentDefinitionSchema: z.ZodNullable<z.ZodObject<{
|
|
|
345
345
|
type: "contact_id_in";
|
|
346
346
|
} | {
|
|
347
347
|
type: "contacts_created_at_between";
|
|
348
|
-
after?: string | undefined;
|
|
349
348
|
before?: string | undefined;
|
|
349
|
+
after?: string | undefined;
|
|
350
350
|
} | {
|
|
351
351
|
type: "contacts_email_domain_name_in";
|
|
352
352
|
domain_name_in: string[];
|
|
@@ -374,12 +374,12 @@ export declare const contactSegmentDefinitionSchema: z.ZodNullable<z.ZodObject<{
|
|
|
374
374
|
belongs?: boolean | undefined;
|
|
375
375
|
} | {
|
|
376
376
|
type: "last_contacted_at_between";
|
|
377
|
-
after?: string | undefined;
|
|
378
377
|
before?: string | undefined;
|
|
378
|
+
after?: string | undefined;
|
|
379
379
|
} | {
|
|
380
380
|
type: "last_contacted_at_with_handoff_between";
|
|
381
|
-
after?: string | undefined;
|
|
382
381
|
before?: string | undefined;
|
|
382
|
+
after?: string | undefined;
|
|
383
383
|
} | {
|
|
384
384
|
has: boolean;
|
|
385
385
|
type: "contact_has_phone";
|
|
@@ -395,12 +395,12 @@ export declare const contactSegmentDefinitionSchema: z.ZodNullable<z.ZodObject<{
|
|
|
395
395
|
} | {
|
|
396
396
|
type: "contacts_custom_data";
|
|
397
397
|
conditions: [{
|
|
398
|
-
key: string;
|
|
399
398
|
op: "exists" | "not_exists" | "eq" | "neq" | "contains";
|
|
399
|
+
key: string;
|
|
400
400
|
value?: string | undefined;
|
|
401
401
|
}, ...{
|
|
402
|
-
key: string;
|
|
403
402
|
op: "exists" | "not_exists" | "eq" | "neq" | "contains";
|
|
403
|
+
key: string;
|
|
404
404
|
value?: string | undefined;
|
|
405
405
|
}[]];
|
|
406
406
|
})[];
|
|
@@ -412,8 +412,8 @@ export declare const contactSegmentDefinitionSchema: z.ZodNullable<z.ZodObject<{
|
|
|
412
412
|
type: "contact_id_in";
|
|
413
413
|
} | {
|
|
414
414
|
type: "contacts_created_at_between";
|
|
415
|
-
after?: string | undefined;
|
|
416
415
|
before?: string | undefined;
|
|
416
|
+
after?: string | undefined;
|
|
417
417
|
} | {
|
|
418
418
|
type: "contacts_email_domain_name_in";
|
|
419
419
|
domain_name_in: string[];
|
|
@@ -441,12 +441,12 @@ export declare const contactSegmentDefinitionSchema: z.ZodNullable<z.ZodObject<{
|
|
|
441
441
|
belongs?: boolean | undefined;
|
|
442
442
|
} | {
|
|
443
443
|
type: "last_contacted_at_between";
|
|
444
|
-
after?: string | undefined;
|
|
445
444
|
before?: string | undefined;
|
|
445
|
+
after?: string | undefined;
|
|
446
446
|
} | {
|
|
447
447
|
type: "last_contacted_at_with_handoff_between";
|
|
448
|
-
after?: string | undefined;
|
|
449
448
|
before?: string | undefined;
|
|
449
|
+
after?: string | undefined;
|
|
450
450
|
} | {
|
|
451
451
|
has: boolean;
|
|
452
452
|
type: "contact_has_phone";
|
|
@@ -462,12 +462,12 @@ export declare const contactSegmentDefinitionSchema: z.ZodNullable<z.ZodObject<{
|
|
|
462
462
|
} | {
|
|
463
463
|
type: "contacts_custom_data";
|
|
464
464
|
conditions: [{
|
|
465
|
-
key: string;
|
|
466
465
|
op: "exists" | "not_exists" | "eq" | "neq" | "contains";
|
|
466
|
+
key: string;
|
|
467
467
|
value?: string | undefined;
|
|
468
468
|
}, ...{
|
|
469
|
-
key: string;
|
|
470
469
|
op: "exists" | "not_exists" | "eq" | "neq" | "contains";
|
|
470
|
+
key: string;
|
|
471
471
|
value?: string | undefined;
|
|
472
472
|
}[]];
|
|
473
473
|
})[];
|
|
@@ -481,8 +481,8 @@ export declare const contactSegmentDefinitionSchema: z.ZodNullable<z.ZodObject<{
|
|
|
481
481
|
type: "contact_id_in";
|
|
482
482
|
} | {
|
|
483
483
|
type: "contacts_created_at_between";
|
|
484
|
-
after?: string | undefined;
|
|
485
484
|
before?: string | undefined;
|
|
485
|
+
after?: string | undefined;
|
|
486
486
|
} | {
|
|
487
487
|
type: "contacts_email_domain_name_in";
|
|
488
488
|
domain_name_in: string[];
|
|
@@ -510,12 +510,12 @@ export declare const contactSegmentDefinitionSchema: z.ZodNullable<z.ZodObject<{
|
|
|
510
510
|
belongs?: boolean | undefined;
|
|
511
511
|
} | {
|
|
512
512
|
type: "last_contacted_at_between";
|
|
513
|
-
after?: string | undefined;
|
|
514
513
|
before?: string | undefined;
|
|
514
|
+
after?: string | undefined;
|
|
515
515
|
} | {
|
|
516
516
|
type: "last_contacted_at_with_handoff_between";
|
|
517
|
-
after?: string | undefined;
|
|
518
517
|
before?: string | undefined;
|
|
518
|
+
after?: string | undefined;
|
|
519
519
|
} | {
|
|
520
520
|
has: boolean;
|
|
521
521
|
type: "contact_has_phone";
|
|
@@ -531,12 +531,12 @@ export declare const contactSegmentDefinitionSchema: z.ZodNullable<z.ZodObject<{
|
|
|
531
531
|
} | {
|
|
532
532
|
type: "contacts_custom_data";
|
|
533
533
|
conditions: [{
|
|
534
|
-
key: string;
|
|
535
534
|
op: "exists" | "not_exists" | "eq" | "neq" | "contains";
|
|
535
|
+
key: string;
|
|
536
536
|
value?: string | undefined;
|
|
537
537
|
}, ...{
|
|
538
|
-
key: string;
|
|
539
538
|
op: "exists" | "not_exists" | "eq" | "neq" | "contains";
|
|
539
|
+
key: string;
|
|
540
540
|
value?: string | undefined;
|
|
541
541
|
}[]];
|
|
542
542
|
})[];
|
|
@@ -548,8 +548,8 @@ export declare const contactSegmentDefinitionSchema: z.ZodNullable<z.ZodObject<{
|
|
|
548
548
|
type: "contact_id_in";
|
|
549
549
|
} | {
|
|
550
550
|
type: "contacts_created_at_between";
|
|
551
|
-
after?: string | undefined;
|
|
552
551
|
before?: string | undefined;
|
|
552
|
+
after?: string | undefined;
|
|
553
553
|
} | {
|
|
554
554
|
type: "contacts_email_domain_name_in";
|
|
555
555
|
domain_name_in: string[];
|
|
@@ -577,12 +577,12 @@ export declare const contactSegmentDefinitionSchema: z.ZodNullable<z.ZodObject<{
|
|
|
577
577
|
belongs?: boolean | undefined;
|
|
578
578
|
} | {
|
|
579
579
|
type: "last_contacted_at_between";
|
|
580
|
-
after?: string | undefined;
|
|
581
580
|
before?: string | undefined;
|
|
581
|
+
after?: string | undefined;
|
|
582
582
|
} | {
|
|
583
583
|
type: "last_contacted_at_with_handoff_between";
|
|
584
|
-
after?: string | undefined;
|
|
585
584
|
before?: string | undefined;
|
|
585
|
+
after?: string | undefined;
|
|
586
586
|
} | {
|
|
587
587
|
has: boolean;
|
|
588
588
|
type: "contact_has_phone";
|
|
@@ -598,12 +598,12 @@ export declare const contactSegmentDefinitionSchema: z.ZodNullable<z.ZodObject<{
|
|
|
598
598
|
} | {
|
|
599
599
|
type: "contacts_custom_data";
|
|
600
600
|
conditions: [{
|
|
601
|
-
key: string;
|
|
602
601
|
op: "exists" | "not_exists" | "eq" | "neq" | "contains";
|
|
602
|
+
key: string;
|
|
603
603
|
value?: string | undefined;
|
|
604
604
|
}, ...{
|
|
605
|
-
key: string;
|
|
606
605
|
op: "exists" | "not_exists" | "eq" | "neq" | "contains";
|
|
606
|
+
key: string;
|
|
607
607
|
value?: string | undefined;
|
|
608
608
|
}[]];
|
|
609
609
|
})[];
|
package/package.json
CHANGED