@hermeticacomms/sdk-node 0.0.0-stage → 0.4.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.
- package/LICENSE +9 -0
- package/README.md +12 -2
- package/dist/contracts/analytics.d.ts +405 -0
- package/dist/contracts/analytics.js +77 -0
- package/dist/contracts/auth.d.ts +363 -0
- package/dist/contracts/auth.js +130 -0
- package/dist/contracts/billing.d.ts +143 -0
- package/dist/contracts/billing.js +32 -0
- package/dist/contracts/campaigns.d.ts +915 -0
- package/dist/contracts/campaigns.js +276 -0
- package/dist/contracts/common.d.ts +57 -0
- package/dist/contracts/common.js +35 -0
- package/dist/contracts/connectors.d.ts +179 -0
- package/dist/contracts/connectors.js +46 -0
- package/dist/contracts/consent.d.ts +628 -0
- package/dist/contracts/consent.js +194 -0
- package/dist/contracts/content-blocks.d.ts +165 -0
- package/dist/contracts/content-blocks.js +62 -0
- package/dist/contracts/content-library.d.ts +347 -0
- package/dist/contracts/content-library.js +52 -0
- package/dist/contracts/content.d.ts +955 -0
- package/dist/contracts/content.js +194 -0
- package/dist/contracts/delivery.d.ts +602 -0
- package/dist/contracts/delivery.js +220 -0
- package/dist/contracts/events.d.ts +514 -0
- package/dist/contracts/events.js +180 -0
- package/dist/contracts/experiments.d.ts +378 -0
- package/dist/contracts/experiments.js +140 -0
- package/dist/contracts/identity.d.ts +761 -0
- package/dist/contracts/identity.js +226 -0
- package/dist/contracts/index.d.ts +15 -0
- package/dist/contracts/index.js +15 -0
- package/dist/contracts/integrations.d.ts +445 -0
- package/dist/contracts/integrations.js +139 -0
- package/dist/contracts/leads.d.ts +733 -0
- package/dist/contracts/leads.js +125 -0
- package/dist/contracts/metrics.d.ts +465 -0
- package/dist/contracts/metrics.js +96 -0
- package/dist/contracts/outbound.d.ts +15535 -0
- package/dist/contracts/outbound.js +432 -0
- package/dist/contracts/pickers.d.ts +12 -0
- package/dist/contracts/pickers.js +20 -0
- package/dist/contracts/platform-admin.d.ts +244 -0
- package/dist/contracts/platform-admin.js +98 -0
- package/dist/contracts/postcards.d.ts +79 -0
- package/dist/contracts/postcards.js +29 -0
- package/dist/contracts/push.d.ts +530 -0
- package/dist/contracts/push.js +102 -0
- package/dist/contracts/rcs.d.ts +39 -0
- package/dist/contracts/rcs.js +19 -0
- package/dist/contracts/segments.d.ts +3187 -0
- package/dist/contracts/segments.js +421 -0
- package/dist/contracts/workflow-nodes.d.ts +2130 -0
- package/dist/contracts/workflow-nodes.js +346 -0
- package/dist/contracts/workflows.d.ts +46811 -0
- package/dist/contracts/workflows.js +350 -0
- package/dist/contracts/x10-platform.d.ts +2603 -0
- package/dist/contracts/x10-platform.js +129 -0
- package/dist/http.d.ts +30 -0
- package/dist/http.js +65 -0
- package/dist/index.d.ts +11631 -0
- package/dist/index.js +63 -0
- package/dist/platform.d.ts +163 -0
- package/dist/platform.js +40 -0
- package/dist/resources.d.ts +1338 -0
- package/dist/resources.js +56 -0
- package/dist/signature.d.ts +5 -0
- package/dist/signature.js +19 -0
- package/dist/x10.d.ts +1608 -0
- package/dist/x10.js +66 -0
- package/dist/z10.d.ts +256 -0
- package/dist/z10.js +46 -0
- package/package.json +40 -4
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { Id, PageQuery, Timestamp, pageResult } from './common.js';
|
|
3
|
+
import { EnrollProspectsResult, ProspectInput } from './outbound.js';
|
|
4
|
+
export const FinderKind = z.enum(['apollo', 'hunter', 'pdl', 'dropcontact', 'findymail']);
|
|
5
|
+
export const VerifierKind = z.enum(['zerobounce', 'neverbounce', 'kickbox', 'millionverifier', 'smtp']);
|
|
6
|
+
export const PhoneProviderKind = z.enum(['twilio_lookup', 'telnyx_lookup']);
|
|
7
|
+
export const LeadProviderKind = z.enum([...FinderKind.options, ...VerifierKind.options, ...PhoneProviderKind.options]);
|
|
8
|
+
export const ConnectLeadProviderBody = z.object({
|
|
9
|
+
kind: LeadProviderKind,
|
|
10
|
+
name: z.string().trim().min(1).max(100),
|
|
11
|
+
/** Not needed for the built-in `smtp` probe. */
|
|
12
|
+
apiKey: z.string().min(1).max(500).optional(),
|
|
13
|
+
priority: z.number().int().min(0).max(1000).default(100),
|
|
14
|
+
creditLimit: z.number().int().min(0).nullish(),
|
|
15
|
+
});
|
|
16
|
+
export const LeadProviderDto = z.object({
|
|
17
|
+
id: Id, kind: LeadProviderKind, role: z.enum(['finder', 'verifier', 'phone']), name: z.string(), priority: z.number().int(), enabled: z.boolean(),
|
|
18
|
+
creditsUsed: z.number().int(), creditLimit: z.number().int().nullable(), createdAt: Timestamp,
|
|
19
|
+
keyVerified: z.boolean().nullable().describe('true: the provider accepted the key at the last check (on connect or POST /v1/leads/providers/{id}/test). false: rejected, or not checked yet (keyCheckedAt null). null: no key (smtp)'),
|
|
20
|
+
keyCheckedAt: Timestamp.nullable().optional(), keyError: z.string().nullable().optional(),
|
|
21
|
+
});
|
|
22
|
+
export const UpdateLeadProviderBody = z.object({ enabled: z.boolean().optional(), priority: z.number().int().min(0).max(1000).optional(), creditLimit: z.number().int().min(0).nullable().optional() });
|
|
23
|
+
export const LeadCriteria = z.object({
|
|
24
|
+
titles: z.array(z.string().max(100)).max(20).default([]),
|
|
25
|
+
seniorities: z.array(z.string().max(50)).max(10).default([]),
|
|
26
|
+
industries: z.array(z.string().max(100)).max(20).default([]),
|
|
27
|
+
companySizes: z.array(z.string().max(30)).max(10).default([]),
|
|
28
|
+
locations: z.array(z.string().max(100)).max(20).default([]),
|
|
29
|
+
technologies: z.array(z.string().max(100)).max(20).default([]),
|
|
30
|
+
domains: z.array(z.string().max(253)).max(50).default([]),
|
|
31
|
+
});
|
|
32
|
+
export const LeadSearchBody = z.object({ providerId: Id, criteria: LeadCriteria, limit: z.number().int().min(1).max(100).default(25) });
|
|
33
|
+
export const SaveSearchBody = z.object({ name: z.string().trim().min(1).max(200), providerId: Id, criteria: LeadCriteria });
|
|
34
|
+
export const LeadSearchSchedule = z.enum(['daily', 'weekly']);
|
|
35
|
+
export const SavedSearchDto = z.object({
|
|
36
|
+
id: Id, name: z.string(), providerId: Id, criteria: LeadCriteria, createdAt: Timestamp,
|
|
37
|
+
runEvery: LeadSearchSchedule.nullable(), autoEnrich: z.boolean(), maxResults: z.number().int(),
|
|
38
|
+
lastRunAt: Timestamp.nullable(), lastRunCount: z.number().int().nullable(), lastError: z.string().nullable(),
|
|
39
|
+
});
|
|
40
|
+
export const LeadStatus = z.enum(['preview', 'revealed', 'pushed']);
|
|
41
|
+
export const EmailStatus = z.enum(['valid', 'invalid', 'risky', 'catch_all', 'unknown', 'disposable']);
|
|
42
|
+
export const LeadDto = z.object({
|
|
43
|
+
id: Id, providerKind: z.string(), firstName: z.string().nullable(), lastName: z.string().nullable(), title: z.string().nullable(), company: z.string().nullable(),
|
|
44
|
+
domain: z.string().nullable(), email: z.string().nullable(), phone: z.string().nullable(), linkedinUrl: z.string().nullable(), country: z.string().nullable(),
|
|
45
|
+
hasEmail: z.boolean(), emailStatus: EmailStatus.nullable(), status: LeadStatus, profileId: Id.nullable(),
|
|
46
|
+
provenance: z.record(z.string(), z.object({ provider: z.string(), confidence: z.number().nullable(), at: z.string() })),
|
|
47
|
+
createdAt: Timestamp,
|
|
48
|
+
});
|
|
49
|
+
export const LeadListQuery = PageQuery.extend({ status: LeadStatus.optional() });
|
|
50
|
+
export const LeadPage = pageResult(LeadDto);
|
|
51
|
+
export const LeadSearchResult = z.object({ items: z.array(LeadDto), cached: z.boolean() });
|
|
52
|
+
export const LeadIdsBody = z.object({ leadIds: z.array(Id).min(1).max(100) });
|
|
53
|
+
export const RevealResult = z.object({ items: z.array(LeadDto), creditsSpent: z.number().int(), errors: z.array(z.object({ leadId: Id, error: z.string() })) });
|
|
54
|
+
export const VerifyPolicy = z.object({
|
|
55
|
+
skipInvalid: z.boolean().default(true),
|
|
56
|
+
skipRisky: z.boolean().default(true),
|
|
57
|
+
skipCatchAll: z.boolean().default(true),
|
|
58
|
+
skipUnknown: z.boolean().default(false),
|
|
59
|
+
skipRole: z.boolean().default(false),
|
|
60
|
+
});
|
|
61
|
+
export const DEFAULT_VERIFY_POLICY = VerifyPolicy.parse({});
|
|
62
|
+
export const PushBody = z.object({
|
|
63
|
+
leadIds: z.array(Id).min(1).max(100),
|
|
64
|
+
sequenceId: Id.optional(),
|
|
65
|
+
policy: VerifyPolicy.default(DEFAULT_VERIFY_POLICY),
|
|
66
|
+
});
|
|
67
|
+
export const CsvLeadImportBody = z.object({
|
|
68
|
+
rows: z.array(ProspectInput).min(1).max(5000),
|
|
69
|
+
sequenceId: Id.optional(),
|
|
70
|
+
policy: VerifyPolicy.default(DEFAULT_VERIFY_POLICY),
|
|
71
|
+
});
|
|
72
|
+
export const PushResult = z.object({
|
|
73
|
+
imported: z.number().int(),
|
|
74
|
+
skipped: z.array(z.object({ ref: z.string(), reason: z.string() })),
|
|
75
|
+
enroll: EnrollProspectsResult.nullable(),
|
|
76
|
+
});
|
|
77
|
+
export const VerificationDto = z.object({
|
|
78
|
+
email: z.string(), status: EmailStatus, risk: z.number().int(), flags: z.array(z.string()), provider: z.string(), checkedAt: Timestamp,
|
|
79
|
+
});
|
|
80
|
+
export const VerifyBody = z.object({ email: z.string().max(320), force: z.boolean().default(false) });
|
|
81
|
+
export const LeadJobKind = z.enum(['clean', 'enrich']);
|
|
82
|
+
export const StartCleanBody = z.object({ emails: z.array(z.string().max(320)).min(1).max(10_000), maxBounceRate: z.number().min(0).max(1).default(0.05) });
|
|
83
|
+
export const StartEnrichBody = z.object({ leadIds: z.array(Id).min(1).max(500), waterfallId: Id.optional() });
|
|
84
|
+
export const CleanReportRow = z.object({ email: z.string(), status: EmailStatus, risk: z.number().int(), flags: z.array(z.string()) });
|
|
85
|
+
export const LeadJobDto = z.object({
|
|
86
|
+
id: Id, kind: LeadJobKind, status: z.enum(['queued', 'running', 'done', 'failed']), total: z.number().int(), processed: z.number().int(),
|
|
87
|
+
summary: z.record(z.string(), z.unknown()), error: z.string().nullable(), createdAt: Timestamp,
|
|
88
|
+
});
|
|
89
|
+
export const LeadJobReport = LeadJobDto.extend({ rows: z.array(CleanReportRow) });
|
|
90
|
+
export const LeadJobPage = pageResult(LeadJobDto);
|
|
91
|
+
export const CreditsDto = z.object({ providers: z.array(z.object({ id: Id, name: z.string(), kind: LeadProviderKind, used: z.number().int(), limit: z.number().int().nullable() })), totalUsed: z.number().int() });
|
|
92
|
+
export const DisposableBody = z.object({ domains: z.array(z.string().max(253)).min(1).max(100_000) });
|
|
93
|
+
export const DisposableResult = z.object({ added: z.number().int() });
|
|
94
|
+
// ---- companies (accounts) and phone line type
|
|
95
|
+
export const CompanyDto = z.object({
|
|
96
|
+
id: Id, domain: z.string(), name: z.string(), industry: z.string().nullable(), sizeBand: z.string().nullable(), country: z.string().nullable(),
|
|
97
|
+
suppressed: z.boolean(), suppressionReason: z.string().nullable(), leadCount: z.number().int(), contactCount: z.number().int(), createdAt: Timestamp,
|
|
98
|
+
stage: z.string().optional(), ownerUserId: Id.nullable().optional(),
|
|
99
|
+
customFields: z.record(z.string(), z.unknown()).optional(), score: z.number().int().optional(),
|
|
100
|
+
});
|
|
101
|
+
export const CompanyListQuery = PageQuery.extend({ q: z.string().max(100).optional(), suppressed: z.coerce.boolean().optional() });
|
|
102
|
+
export const CompanyPage = pageResult(CompanyDto);
|
|
103
|
+
export const CompanyLinkFields = z.object({ isPrimary: z.boolean(), jobTitle: z.string().nullable(), role: z.string().nullable() });
|
|
104
|
+
/** Every company the contact is linked to, primary first; `link` carries the link fields. */
|
|
105
|
+
export const M3ProfileCompanies = z.object({ items: z.array(CompanyDto.extend({ link: CompanyLinkFields.optional() })) });
|
|
106
|
+
export const CompanyDetail = CompanyDto.extend({ leads: z.array(LeadDto), profileIds: z.array(Id), contacts: z.array(CompanyLinkFields.extend({ profileId: Id })).optional() });
|
|
107
|
+
export const CreateCompanyBody = z.object({
|
|
108
|
+
domain: z.string().trim().min(3).max(253), name: z.string().trim().min(1).max(200).optional(), industry: z.string().max(100).optional(),
|
|
109
|
+
sizeBand: z.string().max(30).optional(), country: z.string().length(2).optional(),
|
|
110
|
+
/** Values for the workspace's company fields (`GET /v1/leads/company-fields`); validated against that registry. */
|
|
111
|
+
customFields: z.record(z.string().max(64), z.unknown()).optional(),
|
|
112
|
+
});
|
|
113
|
+
export const ImportCompaniesBody = z.object({ rows: z.array(CreateCompanyBody).min(1).max(1000) });
|
|
114
|
+
export const ImportCompaniesResult = z.object({ imported: z.number().int(), skipped: z.array(z.object({ row: z.number().int(), domain: z.string(), reason: z.string() })) });
|
|
115
|
+
export const UpdateCompanyBody = CreateCompanyBody.omit({ domain: true }).partial();
|
|
116
|
+
export const SuppressCompanyBody = z.object({ reason: z.string().trim().max(200).optional() });
|
|
117
|
+
export const LinkCompanyBody = z.object({
|
|
118
|
+
profileId: Id,
|
|
119
|
+
/** true: make this the contact's primary company; false: an extra link; omitted: primary only if the contact has none. */
|
|
120
|
+
primary: z.boolean().optional(),
|
|
121
|
+
jobTitle: z.string().trim().max(200).nullish(), role: z.string().trim().max(100).nullish(),
|
|
122
|
+
});
|
|
123
|
+
export const LineType = z.enum(['mobile', 'landline', 'voip', 'toll_free', 'other', 'unknown']);
|
|
124
|
+
export const PhoneLookupBody = z.object({ phone: z.string().max(40), country: z.string().length(2).optional(), force: z.boolean().default(false) });
|
|
125
|
+
export const PhoneLookupDto = z.object({ phone: z.string(), lineType: LineType, carrier: z.string().nullable(), landline: z.boolean(), provider: z.string(), checkedAt: Timestamp });
|
|
@@ -0,0 +1,465 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const CONDITION_OPS: readonly ['eq', 'neq', 'gt', 'gte', 'lt', 'lte', 'contains', 'not_contains', 'starts_with', 'ends_with', 'exists', 'not_exists', 'in', 'not_in', 'between'];
|
|
3
|
+
export declare const PropertyCondition: z.ZodObject<{
|
|
4
|
+
property: z.ZodString;
|
|
5
|
+
op: z.ZodDefault<z.ZodEnum<{
|
|
6
|
+
between: "between";
|
|
7
|
+
contains: "contains";
|
|
8
|
+
ends_with: "ends_with";
|
|
9
|
+
eq: "eq";
|
|
10
|
+
exists: "exists";
|
|
11
|
+
gt: "gt";
|
|
12
|
+
gte: "gte";
|
|
13
|
+
in: "in";
|
|
14
|
+
lt: "lt";
|
|
15
|
+
lte: "lte";
|
|
16
|
+
neq: "neq";
|
|
17
|
+
not_contains: "not_contains";
|
|
18
|
+
not_exists: "not_exists";
|
|
19
|
+
not_in: "not_in";
|
|
20
|
+
starts_with: "starts_with";
|
|
21
|
+
}>>;
|
|
22
|
+
value: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>>;
|
|
23
|
+
}, z.core.$strip>;
|
|
24
|
+
export type PropertyCondition = z.infer<typeof PropertyCondition>;
|
|
25
|
+
export declare const EventExplorerQuery: z.ZodObject<{
|
|
26
|
+
limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
27
|
+
cursor: z.ZodOptional<z.ZodUUID>;
|
|
28
|
+
name: z.ZodOptional<z.ZodString>;
|
|
29
|
+
profileId: z.ZodOptional<z.ZodUUID>;
|
|
30
|
+
from: z.ZodOptional<z.ZodISODateTime>;
|
|
31
|
+
to: z.ZodOptional<z.ZodISODateTime>;
|
|
32
|
+
filter: z.ZodOptional<z.ZodString>;
|
|
33
|
+
sort: z.ZodOptional<z.ZodEnum<{
|
|
34
|
+
"-datetime": "-datetime";
|
|
35
|
+
datetime: "datetime";
|
|
36
|
+
}>>;
|
|
37
|
+
include: z.ZodOptional<z.ZodString>;
|
|
38
|
+
journeyId: z.ZodOptional<z.ZodUUID>;
|
|
39
|
+
broadcastId: z.ZodOptional<z.ZodUUID>;
|
|
40
|
+
app: z.ZodOptional<z.ZodString>;
|
|
41
|
+
}, z.core.$strip>;
|
|
42
|
+
export declare const EventExplorerPage: z.ZodObject<{
|
|
43
|
+
items: z.ZodArray<z.ZodObject<{
|
|
44
|
+
id: z.ZodUUID;
|
|
45
|
+
name: z.ZodString;
|
|
46
|
+
profileId: z.ZodNullable<z.ZodUUID>;
|
|
47
|
+
anonymousId: z.ZodNullable<z.ZodString>;
|
|
48
|
+
occurredAt: z.ZodISODateTime;
|
|
49
|
+
source: z.ZodEnum<{
|
|
50
|
+
browser: "browser";
|
|
51
|
+
integration: "integration";
|
|
52
|
+
server: "server";
|
|
53
|
+
system: "system";
|
|
54
|
+
}>;
|
|
55
|
+
properties: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
56
|
+
value: z.ZodNullable<z.ZodNumber>;
|
|
57
|
+
currency: z.ZodNullable<z.ZodString>;
|
|
58
|
+
metric: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
59
|
+
name: z.ZodString;
|
|
60
|
+
category: z.ZodString;
|
|
61
|
+
goal: z.ZodBoolean;
|
|
62
|
+
}, z.core.$strip>>>;
|
|
63
|
+
profile: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
64
|
+
id: z.ZodUUID;
|
|
65
|
+
email: z.ZodNullable<z.ZodString>;
|
|
66
|
+
firstName: z.ZodNullable<z.ZodString>;
|
|
67
|
+
lastName: z.ZodNullable<z.ZodString>;
|
|
68
|
+
}, z.core.$strip>>>;
|
|
69
|
+
}, z.core.$strip>>;
|
|
70
|
+
nextCursor: z.ZodNullable<z.ZodUUID>;
|
|
71
|
+
}, z.core.$strip>;
|
|
72
|
+
/** Matching events as CSV text (first 50,000). */
|
|
73
|
+
export declare const EventExportResult: z.ZodObject<{
|
|
74
|
+
filename: z.ZodString;
|
|
75
|
+
csv: z.ZodString;
|
|
76
|
+
count: z.ZodNumber;
|
|
77
|
+
truncated: z.ZodBoolean;
|
|
78
|
+
}, z.core.$strip>;
|
|
79
|
+
export declare const MetricSummary: z.ZodObject<{
|
|
80
|
+
name: z.ZodString;
|
|
81
|
+
kind: z.ZodEnum<{
|
|
82
|
+
custom: "custom";
|
|
83
|
+
event: "event";
|
|
84
|
+
}>;
|
|
85
|
+
customMetricId: z.ZodNullable<z.ZodUUID>;
|
|
86
|
+
category: z.ZodEnum<{
|
|
87
|
+
custom: "custom";
|
|
88
|
+
standard: "standard";
|
|
89
|
+
}>;
|
|
90
|
+
goal: z.ZodBoolean;
|
|
91
|
+
eventCount: z.ZodNumber;
|
|
92
|
+
lastEventAt: z.ZodNullable<z.ZodISODateTime>;
|
|
93
|
+
firstSeenAt: z.ZodNullable<z.ZodISODateTime>;
|
|
94
|
+
}, z.core.$strip>;
|
|
95
|
+
export declare const MetricList: z.ZodObject<{
|
|
96
|
+
items: z.ZodArray<z.ZodObject<{
|
|
97
|
+
name: z.ZodString;
|
|
98
|
+
kind: z.ZodEnum<{
|
|
99
|
+
custom: "custom";
|
|
100
|
+
event: "event";
|
|
101
|
+
}>;
|
|
102
|
+
customMetricId: z.ZodNullable<z.ZodUUID>;
|
|
103
|
+
category: z.ZodEnum<{
|
|
104
|
+
custom: "custom";
|
|
105
|
+
standard: "standard";
|
|
106
|
+
}>;
|
|
107
|
+
goal: z.ZodBoolean;
|
|
108
|
+
eventCount: z.ZodNumber;
|
|
109
|
+
lastEventAt: z.ZodNullable<z.ZodISODateTime>;
|
|
110
|
+
firstSeenAt: z.ZodNullable<z.ZodISODateTime>;
|
|
111
|
+
}, z.core.$strip>>;
|
|
112
|
+
}, z.core.$strip>;
|
|
113
|
+
export declare const ObservedProperty: z.ZodObject<{
|
|
114
|
+
key: z.ZodString;
|
|
115
|
+
types: z.ZodArray<z.ZodString>;
|
|
116
|
+
seen: z.ZodNumber;
|
|
117
|
+
}, z.core.$strip>;
|
|
118
|
+
export declare const MetricDetail: z.ZodObject<{
|
|
119
|
+
name: z.ZodString;
|
|
120
|
+
kind: z.ZodEnum<{
|
|
121
|
+
custom: "custom";
|
|
122
|
+
event: "event";
|
|
123
|
+
}>;
|
|
124
|
+
customMetricId: z.ZodNullable<z.ZodUUID>;
|
|
125
|
+
category: z.ZodEnum<{
|
|
126
|
+
custom: "custom";
|
|
127
|
+
standard: "standard";
|
|
128
|
+
}>;
|
|
129
|
+
goal: z.ZodBoolean;
|
|
130
|
+
eventCount: z.ZodNumber;
|
|
131
|
+
lastEventAt: z.ZodNullable<z.ZodISODateTime>;
|
|
132
|
+
firstSeenAt: z.ZodNullable<z.ZodISODateTime>;
|
|
133
|
+
schema: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
134
|
+
properties: z.ZodArray<z.ZodObject<{
|
|
135
|
+
key: z.ZodString;
|
|
136
|
+
types: z.ZodArray<z.ZodString>;
|
|
137
|
+
seen: z.ZodNumber;
|
|
138
|
+
}, z.core.$strip>>;
|
|
139
|
+
}, z.core.$strip>;
|
|
140
|
+
export declare const MetricParams: z.ZodObject<{
|
|
141
|
+
name: z.ZodString;
|
|
142
|
+
}, z.core.$strip>;
|
|
143
|
+
export declare const AGGREGATE_MEASUREMENTS: readonly ['count', 'unique', 'sum_value', 'avg_value', 'sum_property', 'avg_property'];
|
|
144
|
+
export declare const INTERVALS: readonly ['hour', 'day', 'week', 'month'];
|
|
145
|
+
export declare const MetricAggregateQuery: z.ZodObject<{
|
|
146
|
+
metric: z.ZodString;
|
|
147
|
+
measurement: z.ZodDefault<z.ZodEnum<{
|
|
148
|
+
avg_property: "avg_property";
|
|
149
|
+
avg_value: "avg_value";
|
|
150
|
+
count: "count";
|
|
151
|
+
sum_property: "sum_property";
|
|
152
|
+
sum_value: "sum_value";
|
|
153
|
+
unique: "unique";
|
|
154
|
+
}>>;
|
|
155
|
+
measurementProperty: z.ZodOptional<z.ZodString>;
|
|
156
|
+
interval: z.ZodDefault<z.ZodEnum<{
|
|
157
|
+
day: "day";
|
|
158
|
+
hour: "hour";
|
|
159
|
+
month: "month";
|
|
160
|
+
week: "week";
|
|
161
|
+
}>>;
|
|
162
|
+
by: z.ZodOptional<z.ZodString>;
|
|
163
|
+
from: z.ZodCodec<z.ZodUnion<readonly [z.ZodISODateTime, z.ZodString]>, z.ZodISODateTime>;
|
|
164
|
+
to: z.ZodCodec<z.ZodUnion<readonly [z.ZodISODateTime, z.ZodString]>, z.ZodISODateTime>;
|
|
165
|
+
timezone: z.ZodOptional<z.ZodString>;
|
|
166
|
+
filter: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
167
|
+
property: z.ZodString;
|
|
168
|
+
op: z.ZodDefault<z.ZodEnum<{
|
|
169
|
+
between: "between";
|
|
170
|
+
contains: "contains";
|
|
171
|
+
ends_with: "ends_with";
|
|
172
|
+
eq: "eq";
|
|
173
|
+
exists: "exists";
|
|
174
|
+
gt: "gt";
|
|
175
|
+
gte: "gte";
|
|
176
|
+
in: "in";
|
|
177
|
+
lt: "lt";
|
|
178
|
+
lte: "lte";
|
|
179
|
+
neq: "neq";
|
|
180
|
+
not_contains: "not_contains";
|
|
181
|
+
not_exists: "not_exists";
|
|
182
|
+
not_in: "not_in";
|
|
183
|
+
starts_with: "starts_with";
|
|
184
|
+
}>>;
|
|
185
|
+
value: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>>;
|
|
186
|
+
}, z.core.$strip>>>;
|
|
187
|
+
topN: z.ZodDefault<z.ZodNumber>;
|
|
188
|
+
app: z.ZodOptional<z.ZodString>;
|
|
189
|
+
}, z.core.$strip>;
|
|
190
|
+
export declare const MetricListQuery: z.ZodObject<{
|
|
191
|
+
app: z.ZodOptional<z.ZodString>;
|
|
192
|
+
}, z.core.$strip>;
|
|
193
|
+
export type MetricAggregateQuery = z.input<typeof MetricAggregateQuery>;
|
|
194
|
+
export declare const MetricAggregateResult: z.ZodObject<{
|
|
195
|
+
metric: z.ZodString;
|
|
196
|
+
measurement: z.ZodString;
|
|
197
|
+
interval: z.ZodString;
|
|
198
|
+
timezone: z.ZodString;
|
|
199
|
+
by: z.ZodNullable<z.ZodString>;
|
|
200
|
+
buckets: z.ZodArray<z.ZodString>;
|
|
201
|
+
series: z.ZodArray<z.ZodObject<{
|
|
202
|
+
key: z.ZodString;
|
|
203
|
+
values: z.ZodArray<z.ZodNumber>;
|
|
204
|
+
total: z.ZodNumber;
|
|
205
|
+
}, z.core.$strip>>;
|
|
206
|
+
total: z.ZodNumber;
|
|
207
|
+
}, z.core.$strip>;
|
|
208
|
+
export declare const MetricSource: z.ZodObject<{
|
|
209
|
+
event: z.ZodString;
|
|
210
|
+
conditions: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
211
|
+
property: z.ZodString;
|
|
212
|
+
op: z.ZodDefault<z.ZodEnum<{
|
|
213
|
+
between: "between";
|
|
214
|
+
contains: "contains";
|
|
215
|
+
ends_with: "ends_with";
|
|
216
|
+
eq: "eq";
|
|
217
|
+
exists: "exists";
|
|
218
|
+
gt: "gt";
|
|
219
|
+
gte: "gte";
|
|
220
|
+
in: "in";
|
|
221
|
+
lt: "lt";
|
|
222
|
+
lte: "lte";
|
|
223
|
+
neq: "neq";
|
|
224
|
+
not_contains: "not_contains";
|
|
225
|
+
not_exists: "not_exists";
|
|
226
|
+
not_in: "not_in";
|
|
227
|
+
starts_with: "starts_with";
|
|
228
|
+
}>>;
|
|
229
|
+
value: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>>;
|
|
230
|
+
}, z.core.$strip>>>;
|
|
231
|
+
}, z.core.$strip>;
|
|
232
|
+
export declare const CustomMetricDefinition: z.ZodObject<{
|
|
233
|
+
sources: z.ZodArray<z.ZodObject<{
|
|
234
|
+
event: z.ZodString;
|
|
235
|
+
conditions: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
236
|
+
property: z.ZodString;
|
|
237
|
+
op: z.ZodDefault<z.ZodEnum<{
|
|
238
|
+
between: "between";
|
|
239
|
+
contains: "contains";
|
|
240
|
+
ends_with: "ends_with";
|
|
241
|
+
eq: "eq";
|
|
242
|
+
exists: "exists";
|
|
243
|
+
gt: "gt";
|
|
244
|
+
gte: "gte";
|
|
245
|
+
in: "in";
|
|
246
|
+
lt: "lt";
|
|
247
|
+
lte: "lte";
|
|
248
|
+
neq: "neq";
|
|
249
|
+
not_contains: "not_contains";
|
|
250
|
+
not_exists: "not_exists";
|
|
251
|
+
not_in: "not_in";
|
|
252
|
+
starts_with: "starts_with";
|
|
253
|
+
}>>;
|
|
254
|
+
value: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>>;
|
|
255
|
+
}, z.core.$strip>>>;
|
|
256
|
+
}, z.core.$strip>>;
|
|
257
|
+
valueProperty: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
258
|
+
}, z.core.$strip>;
|
|
259
|
+
export declare const CreateCustomMetricBody: z.ZodObject<{
|
|
260
|
+
name: z.ZodString;
|
|
261
|
+
description: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
262
|
+
definition: z.ZodObject<{
|
|
263
|
+
sources: z.ZodArray<z.ZodObject<{
|
|
264
|
+
event: z.ZodString;
|
|
265
|
+
conditions: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
266
|
+
property: z.ZodString;
|
|
267
|
+
op: z.ZodDefault<z.ZodEnum<{
|
|
268
|
+
between: "between";
|
|
269
|
+
contains: "contains";
|
|
270
|
+
ends_with: "ends_with";
|
|
271
|
+
eq: "eq";
|
|
272
|
+
exists: "exists";
|
|
273
|
+
gt: "gt";
|
|
274
|
+
gte: "gte";
|
|
275
|
+
in: "in";
|
|
276
|
+
lt: "lt";
|
|
277
|
+
lte: "lte";
|
|
278
|
+
neq: "neq";
|
|
279
|
+
not_contains: "not_contains";
|
|
280
|
+
not_exists: "not_exists";
|
|
281
|
+
not_in: "not_in";
|
|
282
|
+
starts_with: "starts_with";
|
|
283
|
+
}>>;
|
|
284
|
+
value: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>>;
|
|
285
|
+
}, z.core.$strip>>>;
|
|
286
|
+
}, z.core.$strip>>;
|
|
287
|
+
valueProperty: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
288
|
+
}, z.core.$strip>;
|
|
289
|
+
}, z.core.$strip>;
|
|
290
|
+
export declare const UpdateCustomMetricBody: z.ZodObject<{
|
|
291
|
+
name: z.ZodOptional<z.ZodString>;
|
|
292
|
+
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
293
|
+
definition: z.ZodOptional<z.ZodObject<{
|
|
294
|
+
sources: z.ZodArray<z.ZodObject<{
|
|
295
|
+
event: z.ZodString;
|
|
296
|
+
conditions: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
297
|
+
property: z.ZodString;
|
|
298
|
+
op: z.ZodDefault<z.ZodEnum<{
|
|
299
|
+
between: "between";
|
|
300
|
+
contains: "contains";
|
|
301
|
+
ends_with: "ends_with";
|
|
302
|
+
eq: "eq";
|
|
303
|
+
exists: "exists";
|
|
304
|
+
gt: "gt";
|
|
305
|
+
gte: "gte";
|
|
306
|
+
in: "in";
|
|
307
|
+
lt: "lt";
|
|
308
|
+
lte: "lte";
|
|
309
|
+
neq: "neq";
|
|
310
|
+
not_contains: "not_contains";
|
|
311
|
+
not_exists: "not_exists";
|
|
312
|
+
not_in: "not_in";
|
|
313
|
+
starts_with: "starts_with";
|
|
314
|
+
}>>;
|
|
315
|
+
value: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>>;
|
|
316
|
+
}, z.core.$strip>>>;
|
|
317
|
+
}, z.core.$strip>>;
|
|
318
|
+
valueProperty: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
319
|
+
}, z.core.$strip>>;
|
|
320
|
+
}, z.core.$strip>;
|
|
321
|
+
export declare const CustomMetricDto: z.ZodObject<{
|
|
322
|
+
id: z.ZodUUID;
|
|
323
|
+
name: z.ZodString;
|
|
324
|
+
description: z.ZodNullable<z.ZodString>;
|
|
325
|
+
definition: z.ZodObject<{
|
|
326
|
+
sources: z.ZodArray<z.ZodObject<{
|
|
327
|
+
event: z.ZodString;
|
|
328
|
+
conditions: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
329
|
+
property: z.ZodString;
|
|
330
|
+
op: z.ZodDefault<z.ZodEnum<{
|
|
331
|
+
between: "between";
|
|
332
|
+
contains: "contains";
|
|
333
|
+
ends_with: "ends_with";
|
|
334
|
+
eq: "eq";
|
|
335
|
+
exists: "exists";
|
|
336
|
+
gt: "gt";
|
|
337
|
+
gte: "gte";
|
|
338
|
+
in: "in";
|
|
339
|
+
lt: "lt";
|
|
340
|
+
lte: "lte";
|
|
341
|
+
neq: "neq";
|
|
342
|
+
not_contains: "not_contains";
|
|
343
|
+
not_exists: "not_exists";
|
|
344
|
+
not_in: "not_in";
|
|
345
|
+
starts_with: "starts_with";
|
|
346
|
+
}>>;
|
|
347
|
+
value: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>>;
|
|
348
|
+
}, z.core.$strip>>>;
|
|
349
|
+
}, z.core.$strip>>;
|
|
350
|
+
valueProperty: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
351
|
+
}, z.core.$strip>;
|
|
352
|
+
createdAt: z.ZodISODateTime;
|
|
353
|
+
updatedAt: z.ZodISODateTime;
|
|
354
|
+
}, z.core.$strip>;
|
|
355
|
+
export declare const CustomMetricList: z.ZodObject<{
|
|
356
|
+
items: z.ZodArray<z.ZodObject<{
|
|
357
|
+
id: z.ZodUUID;
|
|
358
|
+
name: z.ZodString;
|
|
359
|
+
description: z.ZodNullable<z.ZodString>;
|
|
360
|
+
definition: z.ZodObject<{
|
|
361
|
+
sources: z.ZodArray<z.ZodObject<{
|
|
362
|
+
event: z.ZodString;
|
|
363
|
+
conditions: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
364
|
+
property: z.ZodString;
|
|
365
|
+
op: z.ZodDefault<z.ZodEnum<{
|
|
366
|
+
between: "between";
|
|
367
|
+
contains: "contains";
|
|
368
|
+
ends_with: "ends_with";
|
|
369
|
+
eq: "eq";
|
|
370
|
+
exists: "exists";
|
|
371
|
+
gt: "gt";
|
|
372
|
+
gte: "gte";
|
|
373
|
+
in: "in";
|
|
374
|
+
lt: "lt";
|
|
375
|
+
lte: "lte";
|
|
376
|
+
neq: "neq";
|
|
377
|
+
not_contains: "not_contains";
|
|
378
|
+
not_exists: "not_exists";
|
|
379
|
+
not_in: "not_in";
|
|
380
|
+
starts_with: "starts_with";
|
|
381
|
+
}>>;
|
|
382
|
+
value: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>>;
|
|
383
|
+
}, z.core.$strip>>>;
|
|
384
|
+
}, z.core.$strip>>;
|
|
385
|
+
valueProperty: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
386
|
+
}, z.core.$strip>;
|
|
387
|
+
createdAt: z.ZodISODateTime;
|
|
388
|
+
updatedAt: z.ZodISODateTime;
|
|
389
|
+
}, z.core.$strip>>;
|
|
390
|
+
}, z.core.$strip>;
|
|
391
|
+
export declare const MAPPED_ROLES: readonly ['placed_order', 'viewed_product', 'started_checkout', 'added_to_cart', 'submitted_form'];
|
|
392
|
+
export declare const MappedMetricRole: z.ZodEnum<{
|
|
393
|
+
added_to_cart: "added_to_cart";
|
|
394
|
+
placed_order: "placed_order";
|
|
395
|
+
started_checkout: "started_checkout";
|
|
396
|
+
submitted_form: "submitted_form";
|
|
397
|
+
viewed_product: "viewed_product";
|
|
398
|
+
}>;
|
|
399
|
+
export declare const MappedMetricDto: z.ZodObject<{
|
|
400
|
+
role: z.ZodEnum<{
|
|
401
|
+
added_to_cart: "added_to_cart";
|
|
402
|
+
placed_order: "placed_order";
|
|
403
|
+
started_checkout: "started_checkout";
|
|
404
|
+
submitted_form: "submitted_form";
|
|
405
|
+
viewed_product: "viewed_product";
|
|
406
|
+
}>;
|
|
407
|
+
metricName: z.ZodString;
|
|
408
|
+
configured: z.ZodBoolean;
|
|
409
|
+
}, z.core.$strip>;
|
|
410
|
+
export declare const MappedMetricList: z.ZodObject<{
|
|
411
|
+
items: z.ZodArray<z.ZodObject<{
|
|
412
|
+
role: z.ZodEnum<{
|
|
413
|
+
added_to_cart: "added_to_cart";
|
|
414
|
+
placed_order: "placed_order";
|
|
415
|
+
started_checkout: "started_checkout";
|
|
416
|
+
submitted_form: "submitted_form";
|
|
417
|
+
viewed_product: "viewed_product";
|
|
418
|
+
}>;
|
|
419
|
+
metricName: z.ZodString;
|
|
420
|
+
configured: z.ZodBoolean;
|
|
421
|
+
}, z.core.$strip>>;
|
|
422
|
+
}, z.core.$strip>;
|
|
423
|
+
export declare const SetMappedMetricBody: z.ZodObject<{
|
|
424
|
+
metricName: z.ZodString;
|
|
425
|
+
}, z.core.$strip>;
|
|
426
|
+
export declare const UsedByItem: z.ZodObject<{
|
|
427
|
+
kind: z.ZodEnum<{
|
|
428
|
+
campaign: "campaign";
|
|
429
|
+
custom_metric: "custom_metric";
|
|
430
|
+
form: "form";
|
|
431
|
+
segment: "segment";
|
|
432
|
+
sender_pool: "sender_pool";
|
|
433
|
+
workflow: "workflow";
|
|
434
|
+
}>;
|
|
435
|
+
id: z.ZodUUID;
|
|
436
|
+
name: z.ZodString;
|
|
437
|
+
status: z.ZodNullable<z.ZodString>;
|
|
438
|
+
via: z.ZodString;
|
|
439
|
+
}, z.core.$strip>;
|
|
440
|
+
export declare const UsedByResult: z.ZodObject<{
|
|
441
|
+
items: z.ZodArray<z.ZodObject<{
|
|
442
|
+
kind: z.ZodEnum<{
|
|
443
|
+
campaign: "campaign";
|
|
444
|
+
custom_metric: "custom_metric";
|
|
445
|
+
form: "form";
|
|
446
|
+
segment: "segment";
|
|
447
|
+
sender_pool: "sender_pool";
|
|
448
|
+
workflow: "workflow";
|
|
449
|
+
}>;
|
|
450
|
+
id: z.ZodUUID;
|
|
451
|
+
name: z.ZodString;
|
|
452
|
+
status: z.ZodNullable<z.ZodString>;
|
|
453
|
+
via: z.ZodString;
|
|
454
|
+
}, z.core.$strip>>;
|
|
455
|
+
}, z.core.$strip>;
|
|
456
|
+
export declare const UsedByParams: z.ZodObject<{
|
|
457
|
+
kind: z.ZodEnum<{
|
|
458
|
+
list: "list";
|
|
459
|
+
metric: "metric";
|
|
460
|
+
segment: "segment";
|
|
461
|
+
sender: "sender";
|
|
462
|
+
template: "template";
|
|
463
|
+
}>;
|
|
464
|
+
id: z.ZodString;
|
|
465
|
+
}, z.core.$strip>;
|