@keystrokehq/posthog 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/README.md +237 -0
  2. package/dist/_official/index.d.mts +2 -0
  3. package/dist/_official/index.mjs +3 -0
  4. package/dist/_runtime/index.d.mts +7 -0
  5. package/dist/_runtime/index.mjs +3 -0
  6. package/dist/actions.d.mts +244 -0
  7. package/dist/actions.mjs +129 -0
  8. package/dist/annotations.d.mts +185 -0
  9. package/dist/annotations.mjs +141 -0
  10. package/dist/capture.d.mts +177 -0
  11. package/dist/capture.mjs +241 -0
  12. package/dist/client.d.mts +51 -0
  13. package/dist/client.mjs +200 -0
  14. package/dist/cohorts.d.mts +229 -0
  15. package/dist/cohorts.mjs +185 -0
  16. package/dist/connection.d.mts +2 -0
  17. package/dist/connection.mjs +3 -0
  18. package/dist/dashboards.d.mts +434 -0
  19. package/dist/dashboards.mjs +356 -0
  20. package/dist/decide.d.mts +74 -0
  21. package/dist/decide.mjs +75 -0
  22. package/dist/errors.d.mts +58 -0
  23. package/dist/errors.mjs +120 -0
  24. package/dist/events-management.d.mts +294 -0
  25. package/dist/events-management.mjs +242 -0
  26. package/dist/factory-DYDvHOGb.mjs +8 -0
  27. package/dist/feature-flags.d.mts +416 -0
  28. package/dist/feature-flags.mjs +317 -0
  29. package/dist/index.d.mts +1 -0
  30. package/dist/index.mjs +1 -0
  31. package/dist/insights.d.mts +409 -0
  32. package/dist/insights.mjs +346 -0
  33. package/dist/integration-CsCBBu4d.d.mts +53 -0
  34. package/dist/integration-Doy2Dwli.mjs +30 -0
  35. package/dist/organizations.d.mts +257 -0
  36. package/dist/organizations.mjs +219 -0
  37. package/dist/persons.d.mts +369 -0
  38. package/dist/persons.mjs +345 -0
  39. package/dist/projects.d.mts +348 -0
  40. package/dist/projects.mjs +287 -0
  41. package/dist/schemas.d.mts +351 -0
  42. package/dist/schemas.mjs +302 -0
  43. package/dist/session-recordings.d.mts +391 -0
  44. package/dist/session-recordings.mjs +308 -0
  45. package/dist/surveys.d.mts +287 -0
  46. package/dist/surveys.mjs +208 -0
  47. package/dist/triggers.d.mts +115 -0
  48. package/dist/triggers.mjs +330 -0
  49. package/dist/webhook-management.d.mts +188 -0
  50. package/dist/webhook-management.mjs +152 -0
  51. package/package.json +147 -0
@@ -0,0 +1,346 @@
1
+ import { createPosthogManagementClient } from "./client.mjs";
2
+ import { insightSchema, paginatedResponseSchema, projectIdInputShape, sharingConfigurationSchema } from "./schemas.mjs";
3
+ import { t as posthogOperation } from "./factory-DYDvHOGb.mjs";
4
+ import { z } from "zod";
5
+
6
+ //#region src/insights.ts
7
+ /**
8
+ * posthog/insights.ts
9
+ *
10
+ * Insight CRUD, query execution, activity, and sharing.
11
+ *
12
+ * Docs: https://posthog.com/docs/api/insights
13
+ */
14
+ const idInput = {
15
+ ...projectIdInputShape,
16
+ id: z.number().int()
17
+ };
18
+ const writeShape = {
19
+ name: z.string().optional(),
20
+ description: z.string().nullable().optional(),
21
+ filters: z.record(z.string(), z.unknown()).optional(),
22
+ query: z.record(z.string(), z.unknown()).nullable().optional(),
23
+ favorited: z.boolean().optional(),
24
+ saved: z.boolean().optional(),
25
+ dashboards: z.array(z.number().int()).optional(),
26
+ tags: z.array(z.string()).optional(),
27
+ deleted: z.boolean().optional()
28
+ };
29
+ const listInsights = posthogOperation({
30
+ id: "posthog_insights_list",
31
+ name: "PostHog List Insights",
32
+ description: "List insights in a project",
33
+ input: z.object({
34
+ ...projectIdInputShape,
35
+ limit: z.number().int().min(1).max(500).optional(),
36
+ offset: z.number().int().min(0).optional(),
37
+ search: z.string().optional(),
38
+ favorited: z.boolean().optional(),
39
+ saved: z.boolean().optional(),
40
+ created_by: z.number().int().optional(),
41
+ dashboards: z.array(z.number().int()).optional()
42
+ }),
43
+ output: paginatedResponseSchema(insightSchema),
44
+ run: async (input, credentials) => {
45
+ const client = createPosthogManagementClient(credentials);
46
+ const projectId = client.projectId(input.projectId);
47
+ return client.request({
48
+ method: "GET",
49
+ path: `/api/projects/${projectId}/insights/`,
50
+ query: {
51
+ limit: input.limit,
52
+ offset: input.offset,
53
+ search: input.search,
54
+ favorited: input.favorited,
55
+ saved: input.saved,
56
+ created_by: input.created_by,
57
+ ...input.dashboards ? { dashboards: input.dashboards.join(",") } : {}
58
+ }
59
+ });
60
+ }
61
+ });
62
+ const getInsight = posthogOperation({
63
+ id: "posthog_insights_get",
64
+ name: "PostHog Get Insight",
65
+ description: "Retrieve a single insight by id",
66
+ input: z.object(idInput),
67
+ output: insightSchema,
68
+ run: async (input, credentials) => {
69
+ const client = createPosthogManagementClient(credentials);
70
+ const projectId = client.projectId(input.projectId);
71
+ return client.request({
72
+ method: "GET",
73
+ path: `/api/projects/${projectId}/insights/${input.id}/`
74
+ });
75
+ }
76
+ });
77
+ const createInsight = posthogOperation({
78
+ id: "posthog_insights_create",
79
+ name: "PostHog Create Insight",
80
+ description: "Create a new insight",
81
+ input: z.object({
82
+ ...projectIdInputShape,
83
+ ...writeShape
84
+ }),
85
+ output: insightSchema,
86
+ needsApproval: true,
87
+ run: async (input, credentials) => {
88
+ const client = createPosthogManagementClient(credentials);
89
+ const projectId = client.projectId(input.projectId);
90
+ const { projectId: _pid, ...body } = input;
91
+ return client.request({
92
+ method: "POST",
93
+ path: `/api/projects/${projectId}/insights/`,
94
+ body
95
+ });
96
+ }
97
+ });
98
+ const updateInsight = posthogOperation({
99
+ id: "posthog_insights_update",
100
+ name: "PostHog Update Insight",
101
+ description: "Partial update to an insight",
102
+ input: z.object({
103
+ ...idInput,
104
+ ...writeShape
105
+ }),
106
+ output: insightSchema,
107
+ needsApproval: true,
108
+ run: async (input, credentials) => {
109
+ const client = createPosthogManagementClient(credentials);
110
+ const projectId = client.projectId(input.projectId);
111
+ const { projectId: _pid, id, ...body } = input;
112
+ return client.request({
113
+ method: "PATCH",
114
+ path: `/api/projects/${projectId}/insights/${id}/`,
115
+ body
116
+ });
117
+ }
118
+ });
119
+ const deleteInsight = posthogOperation({
120
+ id: "posthog_insights_delete",
121
+ name: "PostHog Delete Insight",
122
+ description: "Soft-delete an insight",
123
+ input: z.object(idInput),
124
+ output: insightSchema,
125
+ needsApproval: true,
126
+ run: async (input, credentials) => {
127
+ const client = createPosthogManagementClient(credentials);
128
+ const projectId = client.projectId(input.projectId);
129
+ return client.request({
130
+ method: "PATCH",
131
+ path: `/api/projects/${projectId}/insights/${input.id}/`,
132
+ body: { deleted: true }
133
+ });
134
+ }
135
+ });
136
+ const getInsightActivity = posthogOperation({
137
+ id: "posthog_insights_activity",
138
+ name: "PostHog Insight Activity",
139
+ description: "Fetch activity log for an insight",
140
+ input: z.object({
141
+ ...idInput,
142
+ limit: z.number().int().min(1).max(200).optional()
143
+ }),
144
+ output: z.object({ results: z.array(z.record(z.string(), z.unknown())) }),
145
+ run: async (input, credentials) => {
146
+ const client = createPosthogManagementClient(credentials);
147
+ const projectId = client.projectId(input.projectId);
148
+ return client.request({
149
+ method: "GET",
150
+ path: `/api/projects/${projectId}/insights/${input.id}/activity/`,
151
+ query: { limit: input.limit }
152
+ });
153
+ }
154
+ });
155
+ const getInsightsActivityFeed = posthogOperation({
156
+ id: "posthog_insights_activity_feed",
157
+ name: "PostHog Insights Activity Feed",
158
+ description: "Fetch the project-wide insights activity feed",
159
+ input: z.object({
160
+ ...projectIdInputShape,
161
+ limit: z.number().int().min(1).max(200).optional()
162
+ }),
163
+ output: z.object({ results: z.array(z.record(z.string(), z.unknown())) }),
164
+ run: async (input, credentials) => {
165
+ const client = createPosthogManagementClient(credentials);
166
+ const projectId = client.projectId(input.projectId);
167
+ return client.request({
168
+ method: "GET",
169
+ path: `/api/projects/${projectId}/insights/activity/`,
170
+ query: { limit: input.limit }
171
+ });
172
+ }
173
+ });
174
+ const getInsightSharing = posthogOperation({
175
+ id: "posthog_insights_sharing_get",
176
+ name: "PostHog Get Insight Sharing",
177
+ description: "Fetch sharing configuration for an insight",
178
+ input: z.object(idInput),
179
+ output: sharingConfigurationSchema,
180
+ run: async (input, credentials) => {
181
+ const client = createPosthogManagementClient(credentials);
182
+ const projectId = client.projectId(input.projectId);
183
+ return client.request({
184
+ method: "GET",
185
+ path: `/api/projects/${projectId}/insights/${input.id}/sharing/`
186
+ });
187
+ }
188
+ });
189
+ const updateInsightSharing = posthogOperation({
190
+ id: "posthog_insights_sharing_update",
191
+ name: "PostHog Update Insight Sharing",
192
+ description: "Enable or disable sharing for an insight",
193
+ input: z.object({
194
+ ...idInput,
195
+ enabled: z.boolean()
196
+ }),
197
+ output: sharingConfigurationSchema,
198
+ needsApproval: true,
199
+ run: async (input, credentials) => {
200
+ const client = createPosthogManagementClient(credentials);
201
+ const projectId = client.projectId(input.projectId);
202
+ return client.request({
203
+ method: "PATCH",
204
+ path: `/api/projects/${projectId}/insights/${input.id}/sharing/`,
205
+ body: { enabled: input.enabled }
206
+ });
207
+ }
208
+ });
209
+ const getMyInsights = posthogOperation({
210
+ id: "posthog_insights_my_insights",
211
+ name: "PostHog My Insights",
212
+ description: "Fetch insights owned by the calling user",
213
+ input: z.object({
214
+ ...projectIdInputShape,
215
+ limit: z.number().int().min(1).max(500).optional()
216
+ }),
217
+ output: paginatedResponseSchema(insightSchema),
218
+ run: async (input, credentials) => {
219
+ const client = createPosthogManagementClient(credentials);
220
+ const projectId = client.projectId(input.projectId);
221
+ return client.request({
222
+ method: "GET",
223
+ path: `/api/projects/${projectId}/insights/my_last_viewed/`,
224
+ query: { limit: input.limit }
225
+ });
226
+ }
227
+ });
228
+ const markInsightViewed = posthogOperation({
229
+ id: "posthog_insights_viewed",
230
+ name: "PostHog Mark Insight Viewed",
231
+ description: "Record that the calling user viewed an insight",
232
+ input: z.object(idInput),
233
+ output: z.object({ success: z.boolean() }),
234
+ needsApproval: true,
235
+ run: async (input, credentials) => {
236
+ const client = createPosthogManagementClient(credentials);
237
+ const projectId = client.projectId(input.projectId);
238
+ await client.request({
239
+ method: "POST",
240
+ path: `/api/projects/${projectId}/insights/${input.id}/viewed/`
241
+ });
242
+ return { success: true };
243
+ }
244
+ });
245
+ const executeInsightQuery = posthogOperation({
246
+ id: "posthog_insights_trend",
247
+ name: "PostHog Execute Insight Query",
248
+ description: "Execute an ad-hoc trend/funnel/retention/etc. query",
249
+ input: z.object({
250
+ ...projectIdInputShape,
251
+ query: z.record(z.string(), z.unknown()),
252
+ refresh: z.boolean().optional()
253
+ }),
254
+ output: z.record(z.string(), z.unknown()),
255
+ run: async (input, credentials) => {
256
+ const client = createPosthogManagementClient(credentials);
257
+ const projectId = client.projectId(input.projectId);
258
+ return client.request({
259
+ method: "POST",
260
+ path: `/api/projects/${projectId}/query/`,
261
+ body: {
262
+ query: input.query,
263
+ refresh: input.refresh ?? false
264
+ }
265
+ });
266
+ }
267
+ });
268
+ const getInsightRetention = posthogOperation({
269
+ id: "posthog_insights_retention",
270
+ name: "PostHog Insight Retention",
271
+ description: "Fetch retention report for an insight/query combination",
272
+ input: z.object({
273
+ ...projectIdInputShape,
274
+ query: z.record(z.string(), z.unknown())
275
+ }),
276
+ output: z.record(z.string(), z.unknown()),
277
+ run: async (input, credentials) => {
278
+ const client = createPosthogManagementClient(credentials);
279
+ const projectId = client.projectId(input.projectId);
280
+ return client.request({
281
+ method: "POST",
282
+ path: `/api/projects/${projectId}/insights/retention/`,
283
+ body: input.query
284
+ });
285
+ }
286
+ });
287
+ const getInsightFunnel = posthogOperation({
288
+ id: "posthog_insights_funnel",
289
+ name: "PostHog Insight Funnel",
290
+ description: "Execute a funnel query",
291
+ input: z.object({
292
+ ...projectIdInputShape,
293
+ query: z.record(z.string(), z.unknown())
294
+ }),
295
+ output: z.record(z.string(), z.unknown()),
296
+ run: async (input, credentials) => {
297
+ const client = createPosthogManagementClient(credentials);
298
+ const projectId = client.projectId(input.projectId);
299
+ return client.request({
300
+ method: "POST",
301
+ path: `/api/projects/${projectId}/insights/funnel/`,
302
+ body: input.query
303
+ });
304
+ }
305
+ });
306
+ const getInsightPath = posthogOperation({
307
+ id: "posthog_insights_path",
308
+ name: "PostHog Insight Path",
309
+ description: "Execute a user-path query",
310
+ input: z.object({
311
+ ...projectIdInputShape,
312
+ query: z.record(z.string(), z.unknown())
313
+ }),
314
+ output: z.record(z.string(), z.unknown()),
315
+ run: async (input, credentials) => {
316
+ const client = createPosthogManagementClient(credentials);
317
+ const projectId = client.projectId(input.projectId);
318
+ return client.request({
319
+ method: "POST",
320
+ path: `/api/projects/${projectId}/insights/path/`,
321
+ body: input.query
322
+ });
323
+ }
324
+ });
325
+ const getInsightTrend = posthogOperation({
326
+ id: "posthog_insights_trend_chart",
327
+ name: "PostHog Insight Trend",
328
+ description: "Execute a trend query",
329
+ input: z.object({
330
+ ...projectIdInputShape,
331
+ query: z.record(z.string(), z.unknown())
332
+ }),
333
+ output: z.record(z.string(), z.unknown()),
334
+ run: async (input, credentials) => {
335
+ const client = createPosthogManagementClient(credentials);
336
+ const projectId = client.projectId(input.projectId);
337
+ return client.request({
338
+ method: "POST",
339
+ path: `/api/projects/${projectId}/insights/trend/`,
340
+ body: input.query
341
+ });
342
+ }
343
+ });
344
+
345
+ //#endregion
346
+ export { createInsight, deleteInsight, executeInsightQuery, getInsight, getInsightActivity, getInsightFunnel, getInsightPath, getInsightRetention, getInsightSharing, getInsightTrend, getInsightsActivityFeed, getMyInsights, listInsights, markInsightViewed, updateInsight, updateInsightSharing };
@@ -0,0 +1,53 @@
1
+ import * as _keystrokehq_integration_authoring_official0 from "@keystrokehq/integration-authoring/official";
2
+ import { z } from "zod";
3
+ import * as _keystrokehq_core_credential_set0 from "@keystrokehq/core/credential-set";
4
+ import { InferCredentialSetAuth } from "@keystrokehq/core/credential-set";
5
+ import * as _keystrokehq_core0 from "@keystrokehq/core";
6
+
7
+ //#region src/integration.d.ts
8
+ /**
9
+ * PostHog integration — product analytics, feature flags, experiments,
10
+ * session replay, surveys, and data-platform management.
11
+ *
12
+ * The personal API key is injected as `Authorization: Bearer` for every
13
+ * management request (see `./client.ts`). The optional project API key
14
+ * is required only for capture/decide operations.
15
+ */
16
+ declare const posthogOfficialIntegration: {
17
+ id: "posthog";
18
+ name: string;
19
+ description: string;
20
+ auth: z.ZodObject<{
21
+ POSTHOG_PERSONAL_API_KEY: z.ZodString;
22
+ POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
23
+ POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
24
+ POSTHOG_PROJECT_ID: z.ZodOptional<z.ZodString>;
25
+ POSTHOG_SCOPES: z.ZodOptional<z.ZodArray<z.ZodString>>;
26
+ }, z.core.$strip>;
27
+ };
28
+ declare const posthogBundle: _keystrokehq_integration_authoring_official0.OfficialIntegrationBundle<"posthog", z.ZodObject<{
29
+ POSTHOG_PERSONAL_API_KEY: z.ZodString;
30
+ POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
31
+ POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
32
+ POSTHOG_PROJECT_ID: z.ZodOptional<z.ZodString>;
33
+ POSTHOG_SCOPES: z.ZodOptional<z.ZodArray<z.ZodString>>;
34
+ }, z.core.$strip>>;
35
+ declare const posthog: _keystrokehq_core0.CredentialSet<"posthog", z.ZodObject<{
36
+ POSTHOG_PERSONAL_API_KEY: z.ZodString;
37
+ POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
38
+ POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
39
+ POSTHOG_PROJECT_ID: z.ZodOptional<z.ZodString>;
40
+ POSTHOG_SCOPES: z.ZodOptional<z.ZodArray<z.ZodString>>;
41
+ }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
42
+ POSTHOG_PERSONAL_API_KEY: z.ZodString;
43
+ POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
44
+ POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
45
+ POSTHOG_PROJECT_ID: z.ZodOptional<z.ZodString>;
46
+ POSTHOG_SCOPES: z.ZodOptional<z.ZodArray<z.ZodString>>;
47
+ }, z.core.$strip>>[] | undefined>;
48
+ /**
49
+ * Credentials injected into steps. Derived from the integration definition.
50
+ */
51
+ type PosthogCredentials = InferCredentialSetAuth<typeof posthog>;
52
+ //#endregion
53
+ export { posthogOfficialIntegration as i, posthog as n, posthogBundle as r, PosthogCredentials as t };
@@ -0,0 +1,30 @@
1
+ import { defineOfficialIntegration } from "@keystrokehq/integration-authoring/official";
2
+ import { z } from "zod";
3
+
4
+ //#region src/integration.ts
5
+ const posthogAuthSchema = z.object({
6
+ POSTHOG_PERSONAL_API_KEY: z.string().min(1),
7
+ POSTHOG_PROJECT_API_KEY: z.string().min(1).optional(),
8
+ POSTHOG_HOST: z.url().default("https://us.posthog.com"),
9
+ POSTHOG_PROJECT_ID: z.string().min(1).optional(),
10
+ POSTHOG_SCOPES: z.array(z.string()).optional()
11
+ });
12
+ /**
13
+ * PostHog integration — product analytics, feature flags, experiments,
14
+ * session replay, surveys, and data-platform management.
15
+ *
16
+ * The personal API key is injected as `Authorization: Bearer` for every
17
+ * management request (see `./client.ts`). The optional project API key
18
+ * is required only for capture/decide operations.
19
+ */
20
+ const posthogOfficialIntegration = {
21
+ id: "posthog",
22
+ name: "PostHog",
23
+ description: "PostHog product analytics, feature flags, experiments, session replay, surveys, and data-platform management",
24
+ auth: posthogAuthSchema
25
+ };
26
+ const posthogBundle = defineOfficialIntegration(posthogOfficialIntegration);
27
+ const posthog = posthogBundle.credentialSet;
28
+
29
+ //#endregion
30
+ export { posthogBundle as n, posthogOfficialIntegration as r, posthog as t };
@@ -0,0 +1,257 @@
1
+ import { z } from "zod";
2
+ import * as _keystrokehq_core_credential_set0 from "@keystrokehq/core/credential-set";
3
+ import * as _keystrokehq_core0 from "@keystrokehq/core";
4
+
5
+ //#region src/organizations.d.ts
6
+ declare const listOrganizations: _keystrokehq_core0.Operation<z.ZodObject<{
7
+ limit: z.ZodOptional<z.ZodNumber>;
8
+ offset: z.ZodOptional<z.ZodNumber>;
9
+ }, z.core.$strip>, z.ZodObject<{
10
+ next: z.ZodNullable<z.ZodString>;
11
+ previous: z.ZodNullable<z.ZodString>;
12
+ count: z.ZodNumber;
13
+ results: z.ZodArray<z.ZodObject<{
14
+ id: z.ZodOptional<z.ZodString>;
15
+ name: z.ZodOptional<z.ZodString>;
16
+ slug: z.ZodOptional<z.ZodString>;
17
+ created_at: z.ZodOptional<z.ZodString>;
18
+ updated_at: z.ZodOptional<z.ZodString>;
19
+ membership_level: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
20
+ plugins_access_level: z.ZodOptional<z.ZodNumber>;
21
+ teams: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
22
+ }, z.core.$strip>>;
23
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"posthog", z.ZodObject<{
24
+ POSTHOG_PERSONAL_API_KEY: z.ZodString;
25
+ POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
26
+ POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
27
+ POSTHOG_PROJECT_ID: z.ZodOptional<z.ZodString>;
28
+ POSTHOG_SCOPES: z.ZodOptional<z.ZodArray<z.ZodString>>;
29
+ }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
30
+ POSTHOG_PERSONAL_API_KEY: z.ZodString;
31
+ POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
32
+ POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
33
+ POSTHOG_PROJECT_ID: z.ZodOptional<z.ZodString>;
34
+ POSTHOG_SCOPES: z.ZodOptional<z.ZodArray<z.ZodString>>;
35
+ }, z.core.$strip>>[] | undefined>], undefined>;
36
+ declare const getOrganization: _keystrokehq_core0.Operation<z.ZodObject<{
37
+ organizationId: z.ZodString;
38
+ }, z.core.$strip>, z.ZodObject<{
39
+ id: z.ZodOptional<z.ZodString>;
40
+ name: z.ZodOptional<z.ZodString>;
41
+ slug: z.ZodOptional<z.ZodString>;
42
+ created_at: z.ZodOptional<z.ZodString>;
43
+ updated_at: z.ZodOptional<z.ZodString>;
44
+ membership_level: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
45
+ plugins_access_level: z.ZodOptional<z.ZodNumber>;
46
+ teams: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
47
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"posthog", z.ZodObject<{
48
+ POSTHOG_PERSONAL_API_KEY: z.ZodString;
49
+ POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
50
+ POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
51
+ POSTHOG_PROJECT_ID: z.ZodOptional<z.ZodString>;
52
+ POSTHOG_SCOPES: z.ZodOptional<z.ZodArray<z.ZodString>>;
53
+ }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
54
+ POSTHOG_PERSONAL_API_KEY: z.ZodString;
55
+ POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
56
+ POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
57
+ POSTHOG_PROJECT_ID: z.ZodOptional<z.ZodString>;
58
+ POSTHOG_SCOPES: z.ZodOptional<z.ZodArray<z.ZodString>>;
59
+ }, z.core.$strip>>[] | undefined>], undefined>;
60
+ declare const createOrganization: _keystrokehq_core0.Operation<z.ZodObject<{
61
+ name: z.ZodString;
62
+ slug: z.ZodOptional<z.ZodString>;
63
+ }, z.core.$strip>, z.ZodObject<{
64
+ id: z.ZodOptional<z.ZodString>;
65
+ name: z.ZodOptional<z.ZodString>;
66
+ slug: z.ZodOptional<z.ZodString>;
67
+ created_at: z.ZodOptional<z.ZodString>;
68
+ updated_at: z.ZodOptional<z.ZodString>;
69
+ membership_level: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
70
+ plugins_access_level: z.ZodOptional<z.ZodNumber>;
71
+ teams: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
72
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"posthog", z.ZodObject<{
73
+ POSTHOG_PERSONAL_API_KEY: z.ZodString;
74
+ POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
75
+ POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
76
+ POSTHOG_PROJECT_ID: z.ZodOptional<z.ZodString>;
77
+ POSTHOG_SCOPES: z.ZodOptional<z.ZodArray<z.ZodString>>;
78
+ }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
79
+ POSTHOG_PERSONAL_API_KEY: z.ZodString;
80
+ POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
81
+ POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
82
+ POSTHOG_PROJECT_ID: z.ZodOptional<z.ZodString>;
83
+ POSTHOG_SCOPES: z.ZodOptional<z.ZodArray<z.ZodString>>;
84
+ }, z.core.$strip>>[] | undefined>], undefined>;
85
+ declare const updateOrganization: _keystrokehq_core0.Operation<z.ZodObject<{
86
+ name: z.ZodOptional<z.ZodString>;
87
+ slug: z.ZodOptional<z.ZodString>;
88
+ organizationId: z.ZodString;
89
+ }, z.core.$strip>, z.ZodObject<{
90
+ id: z.ZodOptional<z.ZodString>;
91
+ name: z.ZodOptional<z.ZodString>;
92
+ slug: z.ZodOptional<z.ZodString>;
93
+ created_at: z.ZodOptional<z.ZodString>;
94
+ updated_at: z.ZodOptional<z.ZodString>;
95
+ membership_level: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
96
+ plugins_access_level: z.ZodOptional<z.ZodNumber>;
97
+ teams: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
98
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"posthog", z.ZodObject<{
99
+ POSTHOG_PERSONAL_API_KEY: z.ZodString;
100
+ POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
101
+ POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
102
+ POSTHOG_PROJECT_ID: z.ZodOptional<z.ZodString>;
103
+ POSTHOG_SCOPES: z.ZodOptional<z.ZodArray<z.ZodString>>;
104
+ }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
105
+ POSTHOG_PERSONAL_API_KEY: z.ZodString;
106
+ POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
107
+ POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
108
+ POSTHOG_PROJECT_ID: z.ZodOptional<z.ZodString>;
109
+ POSTHOG_SCOPES: z.ZodOptional<z.ZodArray<z.ZodString>>;
110
+ }, z.core.$strip>>[] | undefined>], undefined>;
111
+ declare const deleteOrganization: _keystrokehq_core0.Operation<z.ZodObject<{
112
+ organizationId: z.ZodString;
113
+ }, z.core.$strip>, z.ZodObject<{
114
+ success: z.ZodBoolean;
115
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"posthog", z.ZodObject<{
116
+ POSTHOG_PERSONAL_API_KEY: z.ZodString;
117
+ POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
118
+ POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
119
+ POSTHOG_PROJECT_ID: z.ZodOptional<z.ZodString>;
120
+ POSTHOG_SCOPES: z.ZodOptional<z.ZodArray<z.ZodString>>;
121
+ }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
122
+ POSTHOG_PERSONAL_API_KEY: z.ZodString;
123
+ POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
124
+ POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
125
+ POSTHOG_PROJECT_ID: z.ZodOptional<z.ZodString>;
126
+ POSTHOG_SCOPES: z.ZodOptional<z.ZodArray<z.ZodString>>;
127
+ }, z.core.$strip>>[] | undefined>], undefined>;
128
+ declare const listOrganizationMembers: _keystrokehq_core0.Operation<z.ZodObject<{
129
+ limit: z.ZodOptional<z.ZodNumber>;
130
+ offset: z.ZodOptional<z.ZodNumber>;
131
+ organizationId: z.ZodString;
132
+ }, z.core.$strip>, z.ZodObject<{
133
+ next: z.ZodNullable<z.ZodString>;
134
+ previous: z.ZodNullable<z.ZodString>;
135
+ count: z.ZodNumber;
136
+ results: z.ZodArray<z.ZodObject<{
137
+ id: z.ZodOptional<z.ZodNumber>;
138
+ user: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
139
+ level: z.ZodOptional<z.ZodNumber>;
140
+ parent_level: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
141
+ joined_at: z.ZodOptional<z.ZodString>;
142
+ updated_at: z.ZodOptional<z.ZodString>;
143
+ }, z.core.$strip>>;
144
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"posthog", z.ZodObject<{
145
+ POSTHOG_PERSONAL_API_KEY: z.ZodString;
146
+ POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
147
+ POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
148
+ POSTHOG_PROJECT_ID: z.ZodOptional<z.ZodString>;
149
+ POSTHOG_SCOPES: z.ZodOptional<z.ZodArray<z.ZodString>>;
150
+ }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
151
+ POSTHOG_PERSONAL_API_KEY: z.ZodString;
152
+ POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
153
+ POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
154
+ POSTHOG_PROJECT_ID: z.ZodOptional<z.ZodString>;
155
+ POSTHOG_SCOPES: z.ZodOptional<z.ZodArray<z.ZodString>>;
156
+ }, z.core.$strip>>[] | undefined>], undefined>;
157
+ declare const updateOrganizationMember: _keystrokehq_core0.Operation<z.ZodObject<{
158
+ userUuid: z.ZodString;
159
+ level: z.ZodNumber;
160
+ organizationId: z.ZodString;
161
+ }, z.core.$strip>, z.ZodObject<{
162
+ id: z.ZodOptional<z.ZodNumber>;
163
+ user: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
164
+ level: z.ZodOptional<z.ZodNumber>;
165
+ parent_level: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
166
+ joined_at: z.ZodOptional<z.ZodString>;
167
+ updated_at: z.ZodOptional<z.ZodString>;
168
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"posthog", z.ZodObject<{
169
+ POSTHOG_PERSONAL_API_KEY: z.ZodString;
170
+ POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
171
+ POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
172
+ POSTHOG_PROJECT_ID: z.ZodOptional<z.ZodString>;
173
+ POSTHOG_SCOPES: z.ZodOptional<z.ZodArray<z.ZodString>>;
174
+ }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
175
+ POSTHOG_PERSONAL_API_KEY: z.ZodString;
176
+ POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
177
+ POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
178
+ POSTHOG_PROJECT_ID: z.ZodOptional<z.ZodString>;
179
+ POSTHOG_SCOPES: z.ZodOptional<z.ZodArray<z.ZodString>>;
180
+ }, z.core.$strip>>[] | undefined>], undefined>;
181
+ declare const removeOrganizationMember: _keystrokehq_core0.Operation<z.ZodObject<{
182
+ userUuid: z.ZodString;
183
+ organizationId: z.ZodString;
184
+ }, z.core.$strip>, z.ZodObject<{
185
+ success: z.ZodBoolean;
186
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"posthog", z.ZodObject<{
187
+ POSTHOG_PERSONAL_API_KEY: z.ZodString;
188
+ POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
189
+ POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
190
+ POSTHOG_PROJECT_ID: z.ZodOptional<z.ZodString>;
191
+ POSTHOG_SCOPES: z.ZodOptional<z.ZodArray<z.ZodString>>;
192
+ }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
193
+ POSTHOG_PERSONAL_API_KEY: z.ZodString;
194
+ POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
195
+ POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
196
+ POSTHOG_PROJECT_ID: z.ZodOptional<z.ZodString>;
197
+ POSTHOG_SCOPES: z.ZodOptional<z.ZodArray<z.ZodString>>;
198
+ }, z.core.$strip>>[] | undefined>], undefined>;
199
+ declare const listOrganizationInvites: _keystrokehq_core0.Operation<z.ZodObject<{
200
+ limit: z.ZodOptional<z.ZodNumber>;
201
+ organizationId: z.ZodString;
202
+ }, z.core.$strip>, z.ZodObject<{
203
+ next: z.ZodNullable<z.ZodString>;
204
+ previous: z.ZodNullable<z.ZodString>;
205
+ count: z.ZodNumber;
206
+ results: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
207
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"posthog", z.ZodObject<{
208
+ POSTHOG_PERSONAL_API_KEY: z.ZodString;
209
+ POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
210
+ POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
211
+ POSTHOG_PROJECT_ID: z.ZodOptional<z.ZodString>;
212
+ POSTHOG_SCOPES: z.ZodOptional<z.ZodArray<z.ZodString>>;
213
+ }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
214
+ POSTHOG_PERSONAL_API_KEY: z.ZodString;
215
+ POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
216
+ POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
217
+ POSTHOG_PROJECT_ID: z.ZodOptional<z.ZodString>;
218
+ POSTHOG_SCOPES: z.ZodOptional<z.ZodArray<z.ZodString>>;
219
+ }, z.core.$strip>>[] | undefined>], undefined>;
220
+ declare const createOrganizationInvite: _keystrokehq_core0.Operation<z.ZodObject<{
221
+ target_email: z.ZodEmail;
222
+ level: z.ZodOptional<z.ZodNumber>;
223
+ first_name: z.ZodOptional<z.ZodString>;
224
+ organizationId: z.ZodString;
225
+ }, z.core.$strip>, z.ZodRecord<z.ZodString, z.ZodUnknown>, readonly [_keystrokehq_core0.CredentialSet<"posthog", z.ZodObject<{
226
+ POSTHOG_PERSONAL_API_KEY: z.ZodString;
227
+ POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
228
+ POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
229
+ POSTHOG_PROJECT_ID: z.ZodOptional<z.ZodString>;
230
+ POSTHOG_SCOPES: z.ZodOptional<z.ZodArray<z.ZodString>>;
231
+ }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
232
+ POSTHOG_PERSONAL_API_KEY: z.ZodString;
233
+ POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
234
+ POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
235
+ POSTHOG_PROJECT_ID: z.ZodOptional<z.ZodString>;
236
+ POSTHOG_SCOPES: z.ZodOptional<z.ZodArray<z.ZodString>>;
237
+ }, z.core.$strip>>[] | undefined>], undefined>;
238
+ declare const deleteOrganizationInvite: _keystrokehq_core0.Operation<z.ZodObject<{
239
+ inviteId: z.ZodString;
240
+ organizationId: z.ZodString;
241
+ }, z.core.$strip>, z.ZodObject<{
242
+ success: z.ZodBoolean;
243
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"posthog", z.ZodObject<{
244
+ POSTHOG_PERSONAL_API_KEY: z.ZodString;
245
+ POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
246
+ POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
247
+ POSTHOG_PROJECT_ID: z.ZodOptional<z.ZodString>;
248
+ POSTHOG_SCOPES: z.ZodOptional<z.ZodArray<z.ZodString>>;
249
+ }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
250
+ POSTHOG_PERSONAL_API_KEY: z.ZodString;
251
+ POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
252
+ POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
253
+ POSTHOG_PROJECT_ID: z.ZodOptional<z.ZodString>;
254
+ POSTHOG_SCOPES: z.ZodOptional<z.ZodArray<z.ZodString>>;
255
+ }, z.core.$strip>>[] | undefined>], undefined>;
256
+ //#endregion
257
+ export { createOrganization, createOrganizationInvite, deleteOrganization, deleteOrganizationInvite, getOrganization, listOrganizationInvites, listOrganizationMembers, listOrganizations, removeOrganizationMember, updateOrganization, updateOrganizationMember };