@keystrokehq/posthog 0.0.9 → 0.0.16-integration-id-canonicalization.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/README.md +28 -48
- package/dist/{client.mjs → client-BZWd9-On.mjs} +195 -4
- package/dist/credential-sets/index.d.mts +2 -0
- package/dist/credential-sets/index.mjs +3 -0
- package/dist/index.d.mts +4 -1
- package/dist/index.mjs +5 -1
- package/dist/operations/index.d.mts +2 -0
- package/dist/operations/index.mjs +3 -0
- package/dist/posthog.credential-set-C8TimFgo.d.mts +30 -0
- package/dist/posthog.credential-set-DwYnDkeD.mjs +28 -0
- package/dist/{schemas.d.mts → schemas/index.d.mts} +4 -4
- package/dist/{schemas.mjs → schemas/index.mjs} +1 -1
- package/dist/surveys-update.operation-C0MYZZ04.mjs +3836 -0
- package/dist/surveys-update.operation-gxREsmzk.d.mts +4578 -0
- package/dist/{triggers.d.mts → triggers/index.d.mts} +4 -4
- package/dist/{triggers.mjs → triggers/index.mjs} +5 -6
- package/package.json +13 -85
- package/dist/_official/index.d.mts +0 -2
- package/dist/_official/index.mjs +0 -3
- package/dist/_runtime/index.d.mts +0 -6
- package/dist/_runtime/index.mjs +0 -3
- package/dist/actions.d.mts +0 -244
- package/dist/actions.mjs +0 -129
- package/dist/annotations.d.mts +0 -185
- package/dist/annotations.mjs +0 -141
- package/dist/capture.d.mts +0 -177
- package/dist/capture.mjs +0 -241
- package/dist/client.d.mts +0 -50
- package/dist/cohorts.d.mts +0 -229
- package/dist/cohorts.mjs +0 -185
- package/dist/connection.d.mts +0 -2
- package/dist/connection.mjs +0 -3
- package/dist/dashboards.d.mts +0 -434
- package/dist/dashboards.mjs +0 -356
- package/dist/decide.d.mts +0 -74
- package/dist/decide.mjs +0 -75
- package/dist/errors.d.mts +0 -58
- package/dist/errors.mjs +0 -120
- package/dist/events-management.d.mts +0 -294
- package/dist/events-management.mjs +0 -242
- package/dist/factory-C3ssyfSy.mjs +0 -7
- package/dist/feature-flags.d.mts +0 -416
- package/dist/feature-flags.mjs +0 -317
- package/dist/http-BYcjqxPi.mjs +0 -84
- package/dist/insights.d.mts +0 -409
- package/dist/insights.mjs +0 -346
- package/dist/integration-BN7xcpga.d.mts +0 -63
- package/dist/integration-D0HdrI0T.mjs +0 -120
- package/dist/organizations.d.mts +0 -257
- package/dist/organizations.mjs +0 -219
- package/dist/persons.d.mts +0 -369
- package/dist/persons.mjs +0 -345
- package/dist/projects.d.mts +0 -348
- package/dist/projects.mjs +0 -287
- package/dist/session-recordings.d.mts +0 -391
- package/dist/session-recordings.mjs +0 -308
- package/dist/surveys.d.mts +0 -287
- package/dist/surveys.mjs +0 -208
- package/dist/webhook-management.d.mts +0 -188
- package/dist/webhook-management.mjs +0 -152
package/dist/capture.mjs
DELETED
|
@@ -1,241 +0,0 @@
|
|
|
1
|
-
import { createPosthogIngestClient } from "./client.mjs";
|
|
2
|
-
import { captureResponseSchema, propertiesBagSchema } from "./schemas.mjs";
|
|
3
|
-
import { t as posthogOperation } from "./factory-C3ssyfSy.mjs";
|
|
4
|
-
import { z } from "zod";
|
|
5
|
-
|
|
6
|
-
//#region src/capture.ts
|
|
7
|
-
/**
|
|
8
|
-
* posthog/capture.ts
|
|
9
|
-
*
|
|
10
|
-
* Ingest operations — single event, batch capture, identify, alias, group
|
|
11
|
-
* identify, set person properties, set person properties once. All require
|
|
12
|
-
* the project API key on the credential set (not the personal API key).
|
|
13
|
-
*
|
|
14
|
-
* Docs: https://posthog.com/docs/api/capture
|
|
15
|
-
*/
|
|
16
|
-
const eventNameInput = {
|
|
17
|
-
event: z.string().min(1),
|
|
18
|
-
distinctId: z.string().min(1),
|
|
19
|
-
timestamp: z.iso.datetime().optional(),
|
|
20
|
-
uuid: z.string().optional(),
|
|
21
|
-
properties: propertiesBagSchema.optional()
|
|
22
|
-
};
|
|
23
|
-
/**
|
|
24
|
-
* Capture a single analytics event.
|
|
25
|
-
* Maps Sim archive tool S1 (`posthog_capture_event`).
|
|
26
|
-
*/
|
|
27
|
-
const captureEvent = posthogOperation({
|
|
28
|
-
id: "posthog.capture-event",
|
|
29
|
-
name: "PostHog Capture Event",
|
|
30
|
-
description: "Capture a single analytics event via the PostHog /capture endpoint",
|
|
31
|
-
input: z.object(eventNameInput),
|
|
32
|
-
output: captureResponseSchema,
|
|
33
|
-
needsApproval: true,
|
|
34
|
-
run: async (input, credentials) => {
|
|
35
|
-
const client = createPosthogIngestClient(credentials);
|
|
36
|
-
return client.request({
|
|
37
|
-
method: "POST",
|
|
38
|
-
path: "/capture/",
|
|
39
|
-
body: {
|
|
40
|
-
api_key: client.projectApiKey(),
|
|
41
|
-
event: input.event,
|
|
42
|
-
distinct_id: input.distinctId,
|
|
43
|
-
...input.properties ? { properties: input.properties } : {},
|
|
44
|
-
...input.timestamp ? { timestamp: input.timestamp } : {},
|
|
45
|
-
...input.uuid ? { uuid: input.uuid } : {}
|
|
46
|
-
}
|
|
47
|
-
});
|
|
48
|
-
}
|
|
49
|
-
});
|
|
50
|
-
/**
|
|
51
|
-
* Capture a batch of analytics events in one request.
|
|
52
|
-
* Maps Sim archive tool S2 (`posthog_capture_batch_events`).
|
|
53
|
-
*/
|
|
54
|
-
const captureBatch = posthogOperation({
|
|
55
|
-
id: "posthog.capture-batch-events",
|
|
56
|
-
name: "PostHog Capture Batch",
|
|
57
|
-
description: "Capture up to 100 analytics events via the PostHog /batch endpoint",
|
|
58
|
-
input: z.object({ events: z.array(z.object({
|
|
59
|
-
event: z.string().min(1),
|
|
60
|
-
distinct_id: z.string().min(1),
|
|
61
|
-
properties: propertiesBagSchema.optional(),
|
|
62
|
-
timestamp: z.iso.datetime().optional(),
|
|
63
|
-
uuid: z.string().optional()
|
|
64
|
-
})).min(1) }),
|
|
65
|
-
output: captureResponseSchema,
|
|
66
|
-
needsApproval: true,
|
|
67
|
-
run: async (input, credentials) => {
|
|
68
|
-
const client = createPosthogIngestClient(credentials);
|
|
69
|
-
return client.request({
|
|
70
|
-
method: "POST",
|
|
71
|
-
path: "/batch/",
|
|
72
|
-
body: {
|
|
73
|
-
api_key: client.projectApiKey(),
|
|
74
|
-
batch: input.events
|
|
75
|
-
}
|
|
76
|
-
});
|
|
77
|
-
}
|
|
78
|
-
});
|
|
79
|
-
/**
|
|
80
|
-
* Identify a person — associates distinct_id with a set of properties.
|
|
81
|
-
* Maps Sim archive tool S3 (`posthog_identify_person`).
|
|
82
|
-
*/
|
|
83
|
-
const identifyPerson = posthogOperation({
|
|
84
|
-
id: "posthog.identify-person",
|
|
85
|
-
name: "PostHog Identify Person",
|
|
86
|
-
description: "Associate a distinct_id with person properties via a $identify event",
|
|
87
|
-
input: z.object({
|
|
88
|
-
distinctId: z.string().min(1),
|
|
89
|
-
properties: propertiesBagSchema.optional(),
|
|
90
|
-
propertiesOnce: propertiesBagSchema.optional(),
|
|
91
|
-
timestamp: z.iso.datetime().optional()
|
|
92
|
-
}),
|
|
93
|
-
output: captureResponseSchema,
|
|
94
|
-
needsApproval: true,
|
|
95
|
-
run: async (input, credentials) => {
|
|
96
|
-
const client = createPosthogIngestClient(credentials);
|
|
97
|
-
const properties = {};
|
|
98
|
-
if (input.properties) properties.$set = input.properties;
|
|
99
|
-
if (input.propertiesOnce) properties.$set_once = input.propertiesOnce;
|
|
100
|
-
return client.request({
|
|
101
|
-
method: "POST",
|
|
102
|
-
path: "/capture/",
|
|
103
|
-
body: {
|
|
104
|
-
api_key: client.projectApiKey(),
|
|
105
|
-
event: "$identify",
|
|
106
|
-
distinct_id: input.distinctId,
|
|
107
|
-
properties,
|
|
108
|
-
...input.timestamp ? { timestamp: input.timestamp } : {}
|
|
109
|
-
}
|
|
110
|
-
});
|
|
111
|
-
}
|
|
112
|
-
});
|
|
113
|
-
/**
|
|
114
|
-
* Alias a distinct_id to an existing user.
|
|
115
|
-
* Maps Sim archive tool S4 (`posthog_alias_person`).
|
|
116
|
-
*/
|
|
117
|
-
const aliasPerson = posthogOperation({
|
|
118
|
-
id: "posthog.alias-person",
|
|
119
|
-
name: "PostHog Alias Person",
|
|
120
|
-
description: "Merge one distinct_id into another via a $create_alias event",
|
|
121
|
-
input: z.object({
|
|
122
|
-
distinctId: z.string().min(1),
|
|
123
|
-
alias: z.string().min(1),
|
|
124
|
-
timestamp: z.iso.datetime().optional()
|
|
125
|
-
}),
|
|
126
|
-
output: captureResponseSchema,
|
|
127
|
-
needsApproval: true,
|
|
128
|
-
run: async (input, credentials) => {
|
|
129
|
-
const client = createPosthogIngestClient(credentials);
|
|
130
|
-
return client.request({
|
|
131
|
-
method: "POST",
|
|
132
|
-
path: "/capture/",
|
|
133
|
-
body: {
|
|
134
|
-
api_key: client.projectApiKey(),
|
|
135
|
-
event: "$create_alias",
|
|
136
|
-
distinct_id: input.distinctId,
|
|
137
|
-
properties: { alias: input.alias },
|
|
138
|
-
...input.timestamp ? { timestamp: input.timestamp } : {}
|
|
139
|
-
}
|
|
140
|
-
});
|
|
141
|
-
}
|
|
142
|
-
});
|
|
143
|
-
/**
|
|
144
|
-
* Identify a group (multi-tenant properties).
|
|
145
|
-
* Maps Sim archive tool S5 (`posthog_group_identify`).
|
|
146
|
-
*/
|
|
147
|
-
const groupIdentify = posthogOperation({
|
|
148
|
-
id: "posthog.group-identify",
|
|
149
|
-
name: "PostHog Group Identify",
|
|
150
|
-
description: "Attach properties to a group (organization, project, etc.) via $groupidentify",
|
|
151
|
-
input: z.object({
|
|
152
|
-
distinctId: z.string().min(1),
|
|
153
|
-
groupType: z.string().min(1),
|
|
154
|
-
groupKey: z.string().min(1),
|
|
155
|
-
groupProperties: propertiesBagSchema.optional(),
|
|
156
|
-
timestamp: z.iso.datetime().optional()
|
|
157
|
-
}),
|
|
158
|
-
output: captureResponseSchema,
|
|
159
|
-
needsApproval: true,
|
|
160
|
-
run: async (input, credentials) => {
|
|
161
|
-
const client = createPosthogIngestClient(credentials);
|
|
162
|
-
return client.request({
|
|
163
|
-
method: "POST",
|
|
164
|
-
path: "/capture/",
|
|
165
|
-
body: {
|
|
166
|
-
api_key: client.projectApiKey(),
|
|
167
|
-
event: "$groupidentify",
|
|
168
|
-
distinct_id: input.distinctId,
|
|
169
|
-
properties: {
|
|
170
|
-
$group_type: input.groupType,
|
|
171
|
-
$group_key: input.groupKey,
|
|
172
|
-
$group_set: input.groupProperties ?? {}
|
|
173
|
-
},
|
|
174
|
-
...input.timestamp ? { timestamp: input.timestamp } : {}
|
|
175
|
-
}
|
|
176
|
-
});
|
|
177
|
-
}
|
|
178
|
-
});
|
|
179
|
-
/**
|
|
180
|
-
* Set person properties (overwrites prior values).
|
|
181
|
-
* Maps Sim archive tool S6 (`posthog_set_person_properties`).
|
|
182
|
-
*/
|
|
183
|
-
const setPersonProperties = posthogOperation({
|
|
184
|
-
id: "posthog.set-person-properties",
|
|
185
|
-
name: "PostHog Set Person Properties",
|
|
186
|
-
description: "Set (overwrite) properties on a person via a $set event",
|
|
187
|
-
input: z.object({
|
|
188
|
-
distinctId: z.string().min(1),
|
|
189
|
-
properties: propertiesBagSchema,
|
|
190
|
-
timestamp: z.iso.datetime().optional()
|
|
191
|
-
}),
|
|
192
|
-
output: captureResponseSchema,
|
|
193
|
-
needsApproval: true,
|
|
194
|
-
run: async (input, credentials) => {
|
|
195
|
-
const client = createPosthogIngestClient(credentials);
|
|
196
|
-
return client.request({
|
|
197
|
-
method: "POST",
|
|
198
|
-
path: "/capture/",
|
|
199
|
-
body: {
|
|
200
|
-
api_key: client.projectApiKey(),
|
|
201
|
-
event: "$set",
|
|
202
|
-
distinct_id: input.distinctId,
|
|
203
|
-
properties: { $set: input.properties },
|
|
204
|
-
...input.timestamp ? { timestamp: input.timestamp } : {}
|
|
205
|
-
}
|
|
206
|
-
});
|
|
207
|
-
}
|
|
208
|
-
});
|
|
209
|
-
/**
|
|
210
|
-
* Set person properties only if not already set.
|
|
211
|
-
* Maps Sim archive tool S7 (`posthog_set_person_properties_once`).
|
|
212
|
-
*/
|
|
213
|
-
const setPersonPropertiesOnce = posthogOperation({
|
|
214
|
-
id: "posthog.set-person-properties-once",
|
|
215
|
-
name: "PostHog Set Person Properties Once",
|
|
216
|
-
description: "Set properties on a person only if not already set ($set_once)",
|
|
217
|
-
input: z.object({
|
|
218
|
-
distinctId: z.string().min(1),
|
|
219
|
-
properties: propertiesBagSchema,
|
|
220
|
-
timestamp: z.iso.datetime().optional()
|
|
221
|
-
}),
|
|
222
|
-
output: captureResponseSchema,
|
|
223
|
-
needsApproval: true,
|
|
224
|
-
run: async (input, credentials) => {
|
|
225
|
-
const client = createPosthogIngestClient(credentials);
|
|
226
|
-
return client.request({
|
|
227
|
-
method: "POST",
|
|
228
|
-
path: "/capture/",
|
|
229
|
-
body: {
|
|
230
|
-
api_key: client.projectApiKey(),
|
|
231
|
-
event: "$set",
|
|
232
|
-
distinct_id: input.distinctId,
|
|
233
|
-
properties: { $set_once: input.properties },
|
|
234
|
-
...input.timestamp ? { timestamp: input.timestamp } : {}
|
|
235
|
-
}
|
|
236
|
-
});
|
|
237
|
-
}
|
|
238
|
-
});
|
|
239
|
-
|
|
240
|
-
//#endregion
|
|
241
|
-
export { aliasPerson, captureBatch, captureEvent, groupIdentify, identifyPerson, setPersonProperties, setPersonPropertiesOnce };
|
package/dist/client.d.mts
DELETED
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { t as PosthogCredentials } from "./integration-BN7xcpga.mjs";
|
|
2
|
-
|
|
3
|
-
//#region src/client.d.ts
|
|
4
|
-
/**
|
|
5
|
-
* Derive the ingest host (for `/capture`, `/batch`, `/decide`) from the
|
|
6
|
-
* management host. For cloud regions we swap to the `*.i.posthog.com`
|
|
7
|
-
* ingest origin; for self-hosted installs we reuse the configured host.
|
|
8
|
-
*/
|
|
9
|
-
declare function deriveIngestHost(managementHost: string): string;
|
|
10
|
-
interface PosthogRequestOptions {
|
|
11
|
-
readonly method: JsonRestMethod;
|
|
12
|
-
readonly path: string;
|
|
13
|
-
readonly body?: unknown;
|
|
14
|
-
readonly query?: Record<string, JsonRestQueryValue>;
|
|
15
|
-
readonly headers?: Record<string, string>;
|
|
16
|
-
}
|
|
17
|
-
interface PosthogManagementClient {
|
|
18
|
-
readonly request: <T = unknown>(options: PosthogRequestOptions) => Promise<T>;
|
|
19
|
-
/** Resolve the project id required by most `/api/projects/{id}/...` paths. */
|
|
20
|
-
readonly projectId: (override?: string | number) => string;
|
|
21
|
-
/**
|
|
22
|
-
* Walk a PostHog cursor-paginated list endpoint, yielding each page in
|
|
23
|
-
* order. Stops when `response.next` is null.
|
|
24
|
-
*/
|
|
25
|
-
readonly paginate: <TItem>(initial: PosthogRequestOptions, parsePage?: (page: PaginatedResponse<TItem>) => PaginatedResponse<TItem>) => AsyncGenerator<PaginatedResponse<TItem>, void, void>;
|
|
26
|
-
/** Collect every page of a cursor-paginated list into a single array. */
|
|
27
|
-
readonly listAll: <TItem>(initial: PosthogRequestOptions) => Promise<TItem[]>;
|
|
28
|
-
}
|
|
29
|
-
interface PaginatedResponse<TItem> {
|
|
30
|
-
readonly next: string | null;
|
|
31
|
-
readonly previous: string | null;
|
|
32
|
-
readonly count: number;
|
|
33
|
-
readonly results: TItem[];
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* Build the management client. Uses the personal API key as a bearer
|
|
37
|
-
* token. Throws immediately if the caller attempts an ingest path to
|
|
38
|
-
* prevent accidental token mixing.
|
|
39
|
-
*/
|
|
40
|
-
declare function createPosthogManagementClient(credentials: PosthogCredentials, fetchImpl?: typeof fetch): PosthogManagementClient;
|
|
41
|
-
interface PosthogIngestClient {
|
|
42
|
-
readonly request: <T = unknown>(options: PosthogRequestOptions) => Promise<T>;
|
|
43
|
-
/** Return the project API key, throwing a typed error if it is not set. */
|
|
44
|
-
readonly projectApiKey: () => string;
|
|
45
|
-
}
|
|
46
|
-
declare function createPosthogIngestClient(credentials: PosthogCredentials, fetchImpl?: typeof fetch): PosthogIngestClient;
|
|
47
|
-
type PosthogDecideClient = PosthogIngestClient;
|
|
48
|
-
declare function createPosthogDecideClient(credentials: PosthogCredentials, fetchImpl?: typeof fetch): PosthogDecideClient;
|
|
49
|
-
//#endregion
|
|
50
|
-
export { PaginatedResponse, PosthogDecideClient, PosthogIngestClient, PosthogManagementClient, PosthogRequestOptions, createPosthogDecideClient, createPosthogIngestClient, createPosthogManagementClient, deriveIngestHost };
|
package/dist/cohorts.d.mts
DELETED
|
@@ -1,229 +0,0 @@
|
|
|
1
|
-
import * as _keystrokehq_core0 from "@keystrokehq/core";
|
|
2
|
-
import { z } from "zod";
|
|
3
|
-
import * as _keystrokehq_core_credential_set0 from "@keystrokehq/core/credential-set";
|
|
4
|
-
|
|
5
|
-
//#region src/cohorts.d.ts
|
|
6
|
-
declare const listCohorts: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
7
|
-
limit: z.ZodOptional<z.ZodNumber>;
|
|
8
|
-
offset: z.ZodOptional<z.ZodNumber>;
|
|
9
|
-
search: z.ZodOptional<z.ZodString>;
|
|
10
|
-
projectId: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
11
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
12
|
-
next: z.ZodNullable<z.ZodString>;
|
|
13
|
-
previous: z.ZodNullable<z.ZodString>;
|
|
14
|
-
count: z.ZodNumber;
|
|
15
|
-
results: z.ZodArray<z.ZodObject<{
|
|
16
|
-
id: z.ZodOptional<z.ZodNumber>;
|
|
17
|
-
name: z.ZodOptional<z.ZodString>;
|
|
18
|
-
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
19
|
-
groups: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
20
|
-
is_static: z.ZodOptional<z.ZodBoolean>;
|
|
21
|
-
is_calculating: z.ZodOptional<z.ZodBoolean>;
|
|
22
|
-
count: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
23
|
-
created_at: z.ZodOptional<z.ZodString>;
|
|
24
|
-
deleted: z.ZodOptional<z.ZodBoolean>;
|
|
25
|
-
}, z.core.$strip>>;
|
|
26
|
-
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"posthog", z.ZodObject<{
|
|
27
|
-
POSTHOG_PERSONAL_API_KEY: z.ZodString;
|
|
28
|
-
POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
|
|
29
|
-
POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
|
|
30
|
-
POSTHOG_PROJECT_ID: z.ZodOptional<z.ZodString>;
|
|
31
|
-
POSTHOG_SCOPES: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
32
|
-
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
33
|
-
POSTHOG_PERSONAL_API_KEY: z.ZodString;
|
|
34
|
-
POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
|
|
35
|
-
POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
|
|
36
|
-
POSTHOG_PROJECT_ID: z.ZodOptional<z.ZodString>;
|
|
37
|
-
POSTHOG_SCOPES: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
38
|
-
}, z.core.$strip>>[] | undefined>], undefined>;
|
|
39
|
-
declare const getCohort: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
40
|
-
id: z.ZodNumber;
|
|
41
|
-
projectId: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
42
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
43
|
-
id: z.ZodOptional<z.ZodNumber>;
|
|
44
|
-
name: z.ZodOptional<z.ZodString>;
|
|
45
|
-
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
46
|
-
groups: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
47
|
-
is_static: z.ZodOptional<z.ZodBoolean>;
|
|
48
|
-
is_calculating: z.ZodOptional<z.ZodBoolean>;
|
|
49
|
-
count: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
50
|
-
created_at: z.ZodOptional<z.ZodString>;
|
|
51
|
-
deleted: z.ZodOptional<z.ZodBoolean>;
|
|
52
|
-
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"posthog", z.ZodObject<{
|
|
53
|
-
POSTHOG_PERSONAL_API_KEY: z.ZodString;
|
|
54
|
-
POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
|
|
55
|
-
POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
|
|
56
|
-
POSTHOG_PROJECT_ID: z.ZodOptional<z.ZodString>;
|
|
57
|
-
POSTHOG_SCOPES: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
58
|
-
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
59
|
-
POSTHOG_PERSONAL_API_KEY: z.ZodString;
|
|
60
|
-
POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
|
|
61
|
-
POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
|
|
62
|
-
POSTHOG_PROJECT_ID: z.ZodOptional<z.ZodString>;
|
|
63
|
-
POSTHOG_SCOPES: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
64
|
-
}, z.core.$strip>>[] | undefined>], undefined>;
|
|
65
|
-
declare const createCohort: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
66
|
-
name: z.ZodString;
|
|
67
|
-
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
68
|
-
groups: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
69
|
-
is_static: z.ZodOptional<z.ZodBoolean>;
|
|
70
|
-
deleted: z.ZodOptional<z.ZodBoolean>;
|
|
71
|
-
projectId: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
72
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
73
|
-
id: z.ZodOptional<z.ZodNumber>;
|
|
74
|
-
name: z.ZodOptional<z.ZodString>;
|
|
75
|
-
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
76
|
-
groups: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
77
|
-
is_static: z.ZodOptional<z.ZodBoolean>;
|
|
78
|
-
is_calculating: z.ZodOptional<z.ZodBoolean>;
|
|
79
|
-
count: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
80
|
-
created_at: z.ZodOptional<z.ZodString>;
|
|
81
|
-
deleted: z.ZodOptional<z.ZodBoolean>;
|
|
82
|
-
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"posthog", z.ZodObject<{
|
|
83
|
-
POSTHOG_PERSONAL_API_KEY: z.ZodString;
|
|
84
|
-
POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
|
|
85
|
-
POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
|
|
86
|
-
POSTHOG_PROJECT_ID: z.ZodOptional<z.ZodString>;
|
|
87
|
-
POSTHOG_SCOPES: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
88
|
-
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
89
|
-
POSTHOG_PERSONAL_API_KEY: z.ZodString;
|
|
90
|
-
POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
|
|
91
|
-
POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
|
|
92
|
-
POSTHOG_PROJECT_ID: z.ZodOptional<z.ZodString>;
|
|
93
|
-
POSTHOG_SCOPES: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
94
|
-
}, z.core.$strip>>[] | undefined>], undefined>;
|
|
95
|
-
declare const updateCohort: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
96
|
-
name: z.ZodOptional<z.ZodString>;
|
|
97
|
-
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
98
|
-
groups: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
99
|
-
is_static: z.ZodOptional<z.ZodBoolean>;
|
|
100
|
-
deleted: z.ZodOptional<z.ZodBoolean>;
|
|
101
|
-
id: z.ZodNumber;
|
|
102
|
-
projectId: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
103
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
104
|
-
id: z.ZodOptional<z.ZodNumber>;
|
|
105
|
-
name: z.ZodOptional<z.ZodString>;
|
|
106
|
-
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
107
|
-
groups: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
108
|
-
is_static: z.ZodOptional<z.ZodBoolean>;
|
|
109
|
-
is_calculating: z.ZodOptional<z.ZodBoolean>;
|
|
110
|
-
count: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
111
|
-
created_at: z.ZodOptional<z.ZodString>;
|
|
112
|
-
deleted: z.ZodOptional<z.ZodBoolean>;
|
|
113
|
-
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"posthog", z.ZodObject<{
|
|
114
|
-
POSTHOG_PERSONAL_API_KEY: z.ZodString;
|
|
115
|
-
POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
|
|
116
|
-
POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
|
|
117
|
-
POSTHOG_PROJECT_ID: z.ZodOptional<z.ZodString>;
|
|
118
|
-
POSTHOG_SCOPES: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
119
|
-
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
120
|
-
POSTHOG_PERSONAL_API_KEY: z.ZodString;
|
|
121
|
-
POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
|
|
122
|
-
POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
|
|
123
|
-
POSTHOG_PROJECT_ID: z.ZodOptional<z.ZodString>;
|
|
124
|
-
POSTHOG_SCOPES: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
125
|
-
}, z.core.$strip>>[] | undefined>], undefined>;
|
|
126
|
-
declare const deleteCohort: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
127
|
-
id: z.ZodNumber;
|
|
128
|
-
projectId: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
129
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
130
|
-
id: z.ZodOptional<z.ZodNumber>;
|
|
131
|
-
name: z.ZodOptional<z.ZodString>;
|
|
132
|
-
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
133
|
-
groups: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
134
|
-
is_static: z.ZodOptional<z.ZodBoolean>;
|
|
135
|
-
is_calculating: z.ZodOptional<z.ZodBoolean>;
|
|
136
|
-
count: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
137
|
-
created_at: z.ZodOptional<z.ZodString>;
|
|
138
|
-
deleted: z.ZodOptional<z.ZodBoolean>;
|
|
139
|
-
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"posthog", z.ZodObject<{
|
|
140
|
-
POSTHOG_PERSONAL_API_KEY: z.ZodString;
|
|
141
|
-
POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
|
|
142
|
-
POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
|
|
143
|
-
POSTHOG_PROJECT_ID: z.ZodOptional<z.ZodString>;
|
|
144
|
-
POSTHOG_SCOPES: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
145
|
-
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
146
|
-
POSTHOG_PERSONAL_API_KEY: z.ZodString;
|
|
147
|
-
POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
|
|
148
|
-
POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
|
|
149
|
-
POSTHOG_PROJECT_ID: z.ZodOptional<z.ZodString>;
|
|
150
|
-
POSTHOG_SCOPES: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
151
|
-
}, z.core.$strip>>[] | undefined>], undefined>;
|
|
152
|
-
declare const getCohortPersons: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
153
|
-
limit: z.ZodOptional<z.ZodNumber>;
|
|
154
|
-
offset: z.ZodOptional<z.ZodNumber>;
|
|
155
|
-
id: z.ZodNumber;
|
|
156
|
-
projectId: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
157
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
158
|
-
next: z.ZodNullable<z.ZodString>;
|
|
159
|
-
previous: z.ZodNullable<z.ZodString>;
|
|
160
|
-
count: z.ZodNumber;
|
|
161
|
-
results: z.ZodArray<z.ZodObject<{
|
|
162
|
-
id: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
163
|
-
uuid: z.ZodOptional<z.ZodString>;
|
|
164
|
-
distinct_ids: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
165
|
-
properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
166
|
-
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
167
|
-
created_at: z.ZodOptional<z.ZodString>;
|
|
168
|
-
is_identified: z.ZodOptional<z.ZodBoolean>;
|
|
169
|
-
}, z.core.$strip>>;
|
|
170
|
-
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"posthog", z.ZodObject<{
|
|
171
|
-
POSTHOG_PERSONAL_API_KEY: z.ZodString;
|
|
172
|
-
POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
|
|
173
|
-
POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
|
|
174
|
-
POSTHOG_PROJECT_ID: z.ZodOptional<z.ZodString>;
|
|
175
|
-
POSTHOG_SCOPES: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
176
|
-
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
177
|
-
POSTHOG_PERSONAL_API_KEY: z.ZodString;
|
|
178
|
-
POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
|
|
179
|
-
POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
|
|
180
|
-
POSTHOG_PROJECT_ID: z.ZodOptional<z.ZodString>;
|
|
181
|
-
POSTHOG_SCOPES: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
182
|
-
}, z.core.$strip>>[] | undefined>], undefined>;
|
|
183
|
-
declare const getCohortActivity: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
184
|
-
limit: z.ZodOptional<z.ZodNumber>;
|
|
185
|
-
id: z.ZodNumber;
|
|
186
|
-
projectId: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
187
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
188
|
-
results: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
189
|
-
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"posthog", z.ZodObject<{
|
|
190
|
-
POSTHOG_PERSONAL_API_KEY: z.ZodString;
|
|
191
|
-
POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
|
|
192
|
-
POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
|
|
193
|
-
POSTHOG_PROJECT_ID: z.ZodOptional<z.ZodString>;
|
|
194
|
-
POSTHOG_SCOPES: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
195
|
-
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
196
|
-
POSTHOG_PERSONAL_API_KEY: z.ZodString;
|
|
197
|
-
POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
|
|
198
|
-
POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
|
|
199
|
-
POSTHOG_PROJECT_ID: z.ZodOptional<z.ZodString>;
|
|
200
|
-
POSTHOG_SCOPES: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
201
|
-
}, z.core.$strip>>[] | undefined>], undefined>;
|
|
202
|
-
declare const duplicateCohortAsStatic: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
203
|
-
id: z.ZodNumber;
|
|
204
|
-
projectId: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
205
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
206
|
-
id: z.ZodOptional<z.ZodNumber>;
|
|
207
|
-
name: z.ZodOptional<z.ZodString>;
|
|
208
|
-
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
209
|
-
groups: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
210
|
-
is_static: z.ZodOptional<z.ZodBoolean>;
|
|
211
|
-
is_calculating: z.ZodOptional<z.ZodBoolean>;
|
|
212
|
-
count: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
213
|
-
created_at: z.ZodOptional<z.ZodString>;
|
|
214
|
-
deleted: z.ZodOptional<z.ZodBoolean>;
|
|
215
|
-
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"posthog", z.ZodObject<{
|
|
216
|
-
POSTHOG_PERSONAL_API_KEY: z.ZodString;
|
|
217
|
-
POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
|
|
218
|
-
POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
|
|
219
|
-
POSTHOG_PROJECT_ID: z.ZodOptional<z.ZodString>;
|
|
220
|
-
POSTHOG_SCOPES: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
221
|
-
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
222
|
-
POSTHOG_PERSONAL_API_KEY: z.ZodString;
|
|
223
|
-
POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
|
|
224
|
-
POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
|
|
225
|
-
POSTHOG_PROJECT_ID: z.ZodOptional<z.ZodString>;
|
|
226
|
-
POSTHOG_SCOPES: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
227
|
-
}, z.core.$strip>>[] | undefined>], undefined>;
|
|
228
|
-
//#endregion
|
|
229
|
-
export { createCohort, deleteCohort, duplicateCohortAsStatic, getCohort, getCohortActivity, getCohortPersons, listCohorts, updateCohort };
|