@keystrokehq/posthog 0.0.8 → 0.0.9

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 (48) hide show
  1. package/dist/_official/index.d.mts +1 -1
  2. package/dist/_official/index.mjs +1 -1
  3. package/dist/_runtime/index.d.mts +1 -2
  4. package/dist/_runtime/index.mjs +1 -1
  5. package/dist/actions.d.mts +13 -13
  6. package/dist/actions.mjs +1 -1
  7. package/dist/annotations.d.mts +6 -6
  8. package/dist/annotations.mjs +1 -1
  9. package/dist/capture.d.mts +8 -8
  10. package/dist/capture.mjs +1 -1
  11. package/dist/client.d.mts +1 -2
  12. package/dist/client.mjs +1 -1
  13. package/dist/cohorts.d.mts +9 -9
  14. package/dist/cohorts.mjs +1 -1
  15. package/dist/connection.d.mts +1 -1
  16. package/dist/connection.mjs +1 -1
  17. package/dist/dashboards.d.mts +17 -17
  18. package/dist/dashboards.mjs +1 -1
  19. package/dist/decide.d.mts +3 -3
  20. package/dist/decide.mjs +1 -1
  21. package/dist/events-management.d.mts +11 -11
  22. package/dist/events-management.mjs +1 -1
  23. package/dist/factory-C3ssyfSy.mjs +7 -0
  24. package/dist/feature-flags.d.mts +16 -16
  25. package/dist/feature-flags.mjs +1 -1
  26. package/dist/http-BYcjqxPi.mjs +84 -0
  27. package/dist/insights.d.mts +17 -17
  28. package/dist/insights.mjs +1 -1
  29. package/dist/{integration-Td6D39_E.d.mts → integration-BN7xcpga.d.mts} +15 -5
  30. package/dist/integration-D0HdrI0T.mjs +120 -0
  31. package/dist/organizations.d.mts +12 -12
  32. package/dist/organizations.mjs +1 -1
  33. package/dist/persons.d.mts +16 -16
  34. package/dist/persons.mjs +1 -1
  35. package/dist/projects.d.mts +14 -14
  36. package/dist/projects.mjs +1 -1
  37. package/dist/schemas.d.mts +3 -3
  38. package/dist/session-recordings.d.mts +15 -15
  39. package/dist/session-recordings.mjs +1 -1
  40. package/dist/surveys.d.mts +16 -16
  41. package/dist/surveys.mjs +1 -1
  42. package/dist/triggers.d.mts +5 -3
  43. package/dist/triggers.mjs +52 -3
  44. package/dist/webhook-management.d.mts +10 -10
  45. package/dist/webhook-management.mjs +1 -1
  46. package/package.json +4 -4
  47. package/dist/factory-DYDvHOGb.mjs +0 -8
  48. package/dist/integration-Doy2Dwli.mjs +0 -30
@@ -0,0 +1,120 @@
1
+ import { CredentialSet, Operation } from "@keystrokehq/core";
2
+ import { z } from "zod";
3
+
4
+ //#region ../../packages/integration-authoring/dist/official/runtime.mjs
5
+ const REGISTRY_KEY = "__ks_official_integration_metadata_registry";
6
+ function getRegistry() {
7
+ const globalStore = globalThis;
8
+ if (!globalStore[REGISTRY_KEY]) globalStore[REGISTRY_KEY] = /* @__PURE__ */ new WeakMap();
9
+ return globalStore[REGISTRY_KEY];
10
+ }
11
+ function registerOfficialOperation(operation, metadata) {
12
+ getRegistry().set(operation, Object.freeze({ ...metadata }));
13
+ }
14
+
15
+ //#endregion
16
+ //#region ../../packages/integration-authoring/dist/official/index.mjs
17
+ const OFFICIAL_CREDENTIAL_SET_ID_PREFIX = "keystroke:";
18
+ function stripOfficialCredentialSetIdPrefix(id) {
19
+ return id.startsWith(OFFICIAL_CREDENTIAL_SET_ID_PREFIX) ? id.slice(10) : id;
20
+ }
21
+ /**
22
+ * Creates a factory for Keystroke-official integration operations.
23
+ *
24
+ * It keeps the same flat `run(input, credentials)` ergonomics as the generic
25
+ * operation factory, while registering official metadata for builder/runtime
26
+ * operation metadata.
27
+ */
28
+ function createOfficialOperationFactory(credentialSet) {
29
+ const integrationId = stripOfficialCredentialSetIdPrefix(credentialSet.id);
30
+ return (config) => {
31
+ const wrappedRun = async (input, ctx) => {
32
+ const creds = ctx.credentials[credentialSet.id];
33
+ return config.run(input, creds);
34
+ };
35
+ const operation = new Operation({
36
+ id: config.id,
37
+ name: config.name,
38
+ description: config.description,
39
+ input: config.input,
40
+ output: config.output,
41
+ credentialSets: [credentialSet],
42
+ ...config.tags !== void 0 ? { tags: config.tags } : {},
43
+ ...config.needsApproval !== void 0 ? { needsApproval: config.needsApproval } : {},
44
+ ...config.requiredOAuthScopes !== void 0 ? { requiredOAuthScopes: config.requiredOAuthScopes } : {},
45
+ ...config.retries !== void 0 ? { retries: config.retries } : {},
46
+ ...config.timeout !== void 0 ? { timeout: config.timeout } : {},
47
+ ...config.maxDurationMs !== void 0 ? { maxDurationMs: config.maxDurationMs } : {},
48
+ run: wrappedRun
49
+ });
50
+ registerOfficialOperation(operation, { integrationId });
51
+ return operation;
52
+ };
53
+ }
54
+ /**
55
+ * Creates an official integration bundle from a single config object.
56
+ *
57
+ * - Creates the public `CredentialSet` internally.
58
+ * - Accepts optional `internal` fields for Keystroke-owned platform credentials.
59
+ */
60
+ function defineOfficialIntegration(config) {
61
+ const internalCredentialSets = config.internal ?? {};
62
+ const allInternalCredentialSets = [
63
+ ...internalCredentialSets.providerApp ? [internalCredentialSets.providerApp] : [],
64
+ ...internalCredentialSets.providerAppVariants ?? [],
65
+ ...internalCredentialSets.webhookVerification ? [internalCredentialSets.webhookVerification] : [],
66
+ ...internalCredentialSets.other ?? []
67
+ ];
68
+ const credentialSet = new CredentialSet({
69
+ id: config.id,
70
+ name: config.name,
71
+ description: config.description,
72
+ auth: config.auth,
73
+ ...config.connections ? { connections: config.connections } : {},
74
+ ...config.proxy ? { proxy: config.proxy } : {},
75
+ ...config.needsRawSecret === true ? { needsRawSecret: true } : {}
76
+ });
77
+ return Object.freeze({
78
+ integration: {
79
+ id: config.id,
80
+ name: config.name,
81
+ ...config.description !== void 0 ? { description: config.description } : {},
82
+ auth: config.auth,
83
+ ...config.proxy ? { proxy: config.proxy } : {},
84
+ ...config.needsRawSecret === true ? { needsRawSecret: true } : {},
85
+ ...config.connections ? { connections: config.connections } : {}
86
+ },
87
+ credentialSet,
88
+ internalCredentialSets,
89
+ allInternalCredentialSets
90
+ });
91
+ }
92
+
93
+ //#endregion
94
+ //#region src/integration.ts
95
+ const posthogAuthSchema = z.object({
96
+ POSTHOG_PERSONAL_API_KEY: z.string().min(1),
97
+ POSTHOG_PROJECT_API_KEY: z.string().min(1).optional(),
98
+ POSTHOG_HOST: z.url().default("https://us.posthog.com"),
99
+ POSTHOG_PROJECT_ID: z.string().min(1).optional(),
100
+ POSTHOG_SCOPES: z.array(z.string()).optional()
101
+ });
102
+ /**
103
+ * PostHog integration — product analytics, feature flags, experiments,
104
+ * session replay, surveys, and data-platform management.
105
+ *
106
+ * The personal API key is injected as `Authorization: Bearer` for every
107
+ * management request (see `./client.ts`). The optional project API key
108
+ * is required only for capture/decide operations.
109
+ */
110
+ const posthogOfficialIntegration = {
111
+ id: "posthog",
112
+ name: "PostHog",
113
+ description: "PostHog product analytics, feature flags, experiments, session replay, surveys, and data-platform management",
114
+ auth: posthogAuthSchema
115
+ };
116
+ const posthogBundle = defineOfficialIntegration(posthogOfficialIntegration);
117
+ const posthog = posthogBundle.credentialSet;
118
+
119
+ //#endregion
120
+ export { createOfficialOperationFactory as i, posthogBundle as n, posthogOfficialIntegration as r, posthog as t };
@@ -1,6 +1,6 @@
1
+ import * as _keystrokehq_core0 from "@keystrokehq/core";
1
2
  import { z } from "zod";
2
3
  import * as _keystrokehq_core_credential_set0 from "@keystrokehq/core/credential-set";
3
- import * as _keystrokehq_core0 from "@keystrokehq/core";
4
4
 
5
5
  //#region src/organizations.d.ts
6
6
  declare const listOrganizations: _keystrokehq_core0.Operation<z.ZodObject<{
@@ -20,7 +20,7 @@ declare const listOrganizations: _keystrokehq_core0.Operation<z.ZodObject<{
20
20
  plugins_access_level: z.ZodOptional<z.ZodNumber>;
21
21
  teams: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
22
22
  }, z.core.$strip>>;
23
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:posthog", z.ZodObject<{
23
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"posthog", z.ZodObject<{
24
24
  POSTHOG_PERSONAL_API_KEY: z.ZodString;
25
25
  POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
26
26
  POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
@@ -44,7 +44,7 @@ declare const getOrganization: _keystrokehq_core0.Operation<z.ZodObject<{
44
44
  membership_level: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
45
45
  plugins_access_level: z.ZodOptional<z.ZodNumber>;
46
46
  teams: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
47
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:posthog", z.ZodObject<{
47
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"posthog", z.ZodObject<{
48
48
  POSTHOG_PERSONAL_API_KEY: z.ZodString;
49
49
  POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
50
50
  POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
@@ -69,7 +69,7 @@ declare const createOrganization: _keystrokehq_core0.Operation<z.ZodObject<{
69
69
  membership_level: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
70
70
  plugins_access_level: z.ZodOptional<z.ZodNumber>;
71
71
  teams: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
72
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:posthog", z.ZodObject<{
72
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"posthog", z.ZodObject<{
73
73
  POSTHOG_PERSONAL_API_KEY: z.ZodString;
74
74
  POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
75
75
  POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
@@ -95,7 +95,7 @@ declare const updateOrganization: _keystrokehq_core0.Operation<z.ZodObject<{
95
95
  membership_level: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
96
96
  plugins_access_level: z.ZodOptional<z.ZodNumber>;
97
97
  teams: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
98
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:posthog", z.ZodObject<{
98
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"posthog", z.ZodObject<{
99
99
  POSTHOG_PERSONAL_API_KEY: z.ZodString;
100
100
  POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
101
101
  POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
@@ -112,7 +112,7 @@ declare const deleteOrganization: _keystrokehq_core0.Operation<z.ZodObject<{
112
112
  organizationId: z.ZodString;
113
113
  }, z.core.$strip>, z.ZodObject<{
114
114
  success: z.ZodBoolean;
115
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:posthog", z.ZodObject<{
115
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"posthog", z.ZodObject<{
116
116
  POSTHOG_PERSONAL_API_KEY: z.ZodString;
117
117
  POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
118
118
  POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
@@ -141,7 +141,7 @@ declare const listOrganizationMembers: _keystrokehq_core0.Operation<z.ZodObject<
141
141
  joined_at: z.ZodOptional<z.ZodString>;
142
142
  updated_at: z.ZodOptional<z.ZodString>;
143
143
  }, z.core.$strip>>;
144
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:posthog", z.ZodObject<{
144
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"posthog", z.ZodObject<{
145
145
  POSTHOG_PERSONAL_API_KEY: z.ZodString;
146
146
  POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
147
147
  POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
@@ -165,7 +165,7 @@ declare const updateOrganizationMember: _keystrokehq_core0.Operation<z.ZodObject
165
165
  parent_level: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
166
166
  joined_at: z.ZodOptional<z.ZodString>;
167
167
  updated_at: z.ZodOptional<z.ZodString>;
168
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:posthog", z.ZodObject<{
168
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"posthog", z.ZodObject<{
169
169
  POSTHOG_PERSONAL_API_KEY: z.ZodString;
170
170
  POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
171
171
  POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
@@ -183,7 +183,7 @@ declare const removeOrganizationMember: _keystrokehq_core0.Operation<z.ZodObject
183
183
  organizationId: z.ZodString;
184
184
  }, z.core.$strip>, z.ZodObject<{
185
185
  success: z.ZodBoolean;
186
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:posthog", z.ZodObject<{
186
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"posthog", z.ZodObject<{
187
187
  POSTHOG_PERSONAL_API_KEY: z.ZodString;
188
188
  POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
189
189
  POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
@@ -204,7 +204,7 @@ declare const listOrganizationInvites: _keystrokehq_core0.Operation<z.ZodObject<
204
204
  previous: z.ZodNullable<z.ZodString>;
205
205
  count: z.ZodNumber;
206
206
  results: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
207
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:posthog", z.ZodObject<{
207
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"posthog", z.ZodObject<{
208
208
  POSTHOG_PERSONAL_API_KEY: z.ZodString;
209
209
  POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
210
210
  POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
@@ -222,7 +222,7 @@ declare const createOrganizationInvite: _keystrokehq_core0.Operation<z.ZodObject
222
222
  level: z.ZodOptional<z.ZodNumber>;
223
223
  first_name: z.ZodOptional<z.ZodString>;
224
224
  organizationId: z.ZodString;
225
- }, z.core.$strip>, z.ZodRecord<z.ZodString, z.ZodUnknown>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:posthog", z.ZodObject<{
225
+ }, z.core.$strip>, z.ZodRecord<z.ZodString, z.ZodUnknown>, readonly [_keystrokehq_core0.CredentialSet<"posthog", z.ZodObject<{
226
226
  POSTHOG_PERSONAL_API_KEY: z.ZodString;
227
227
  POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
228
228
  POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
@@ -240,7 +240,7 @@ declare const deleteOrganizationInvite: _keystrokehq_core0.Operation<z.ZodObject
240
240
  organizationId: z.ZodString;
241
241
  }, z.core.$strip>, z.ZodObject<{
242
242
  success: z.ZodBoolean;
243
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:posthog", z.ZodObject<{
243
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"posthog", z.ZodObject<{
244
244
  POSTHOG_PERSONAL_API_KEY: z.ZodString;
245
245
  POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
246
246
  POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
@@ -1,6 +1,6 @@
1
1
  import { createPosthogManagementClient } from "./client.mjs";
2
2
  import { organizationSchema, paginatedResponseSchema, projectMemberSchema } from "./schemas.mjs";
3
- import { t as posthogOperation } from "./factory-DYDvHOGb.mjs";
3
+ import { t as posthogOperation } from "./factory-C3ssyfSy.mjs";
4
4
  import { z } from "zod";
5
5
 
6
6
  //#region src/organizations.ts
@@ -1,6 +1,6 @@
1
+ import * as _keystrokehq_core0 from "@keystrokehq/core";
1
2
  import { z } from "zod";
2
3
  import * as _keystrokehq_core_credential_set0 from "@keystrokehq/core/credential-set";
3
- import * as _keystrokehq_core0 from "@keystrokehq/core";
4
4
 
5
5
  //#region src/persons.d.ts
6
6
  declare const listPersons: _keystrokehq_core0.Operation<z.ZodObject<{
@@ -24,7 +24,7 @@ declare const listPersons: _keystrokehq_core0.Operation<z.ZodObject<{
24
24
  created_at: z.ZodOptional<z.ZodString>;
25
25
  is_identified: z.ZodOptional<z.ZodBoolean>;
26
26
  }, z.core.$strip>>;
27
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:posthog", z.ZodObject<{
27
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"posthog", z.ZodObject<{
28
28
  POSTHOG_PERSONAL_API_KEY: z.ZodString;
29
29
  POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
30
30
  POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
@@ -48,7 +48,7 @@ declare const getPerson: _keystrokehq_core0.Operation<z.ZodObject<{
48
48
  name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
49
49
  created_at: z.ZodOptional<z.ZodString>;
50
50
  is_identified: z.ZodOptional<z.ZodBoolean>;
51
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:posthog", z.ZodObject<{
51
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"posthog", z.ZodObject<{
52
52
  POSTHOG_PERSONAL_API_KEY: z.ZodString;
53
53
  POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
54
54
  POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
@@ -74,7 +74,7 @@ declare const updatePerson: _keystrokehq_core0.Operation<z.ZodObject<{
74
74
  name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
75
75
  created_at: z.ZodOptional<z.ZodString>;
76
76
  is_identified: z.ZodOptional<z.ZodBoolean>;
77
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:posthog", z.ZodObject<{
77
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"posthog", z.ZodObject<{
78
78
  POSTHOG_PERSONAL_API_KEY: z.ZodString;
79
79
  POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
80
80
  POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
@@ -93,7 +93,7 @@ declare const deletePerson: _keystrokehq_core0.Operation<z.ZodObject<{
93
93
  projectId: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
94
94
  }, z.core.$strip>, z.ZodObject<{
95
95
  success: z.ZodBoolean;
96
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:posthog", z.ZodObject<{
96
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"posthog", z.ZodObject<{
97
97
  POSTHOG_PERSONAL_API_KEY: z.ZodString;
98
98
  POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
99
99
  POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
@@ -118,7 +118,7 @@ declare const mergePersons: _keystrokehq_core0.Operation<z.ZodObject<{
118
118
  name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
119
119
  created_at: z.ZodOptional<z.ZodString>;
120
120
  is_identified: z.ZodOptional<z.ZodBoolean>;
121
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:posthog", z.ZodObject<{
121
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"posthog", z.ZodObject<{
122
122
  POSTHOG_PERSONAL_API_KEY: z.ZodString;
123
123
  POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
124
124
  POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
@@ -137,7 +137,7 @@ declare const splitPerson: _keystrokehq_core0.Operation<z.ZodObject<{
137
137
  projectId: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
138
138
  }, z.core.$strip>, z.ZodObject<{
139
139
  success: z.ZodBoolean;
140
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:posthog", z.ZodObject<{
140
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"posthog", z.ZodObject<{
141
141
  POSTHOG_PERSONAL_API_KEY: z.ZodString;
142
142
  POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
143
143
  POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
@@ -163,7 +163,7 @@ declare const updatePersonProperty: _keystrokehq_core0.Operation<z.ZodObject<{
163
163
  name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
164
164
  created_at: z.ZodOptional<z.ZodString>;
165
165
  is_identified: z.ZodOptional<z.ZodBoolean>;
166
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:posthog", z.ZodObject<{
166
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"posthog", z.ZodObject<{
167
167
  POSTHOG_PERSONAL_API_KEY: z.ZodString;
168
168
  POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
169
169
  POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
@@ -182,7 +182,7 @@ declare const deletePersonProperty: _keystrokehq_core0.Operation<z.ZodObject<{
182
182
  projectId: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
183
183
  }, z.core.$strip>, z.ZodObject<{
184
184
  success: z.ZodBoolean;
185
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:posthog", z.ZodObject<{
185
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"posthog", z.ZodObject<{
186
186
  POSTHOG_PERSONAL_API_KEY: z.ZodString;
187
187
  POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
188
188
  POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
@@ -201,7 +201,7 @@ declare const getPersonActivity: _keystrokehq_core0.Operation<z.ZodObject<{
201
201
  projectId: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
202
202
  }, z.core.$strip>, z.ZodObject<{
203
203
  results: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
204
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:posthog", z.ZodObject<{
204
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"posthog", z.ZodObject<{
205
205
  POSTHOG_PERSONAL_API_KEY: z.ZodString;
206
206
  POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
207
207
  POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
@@ -219,7 +219,7 @@ declare const getPersonsActivityFeed: _keystrokehq_core0.Operation<z.ZodObject<{
219
219
  projectId: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
220
220
  }, z.core.$strip>, z.ZodObject<{
221
221
  results: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
222
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:posthog", z.ZodObject<{
222
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"posthog", z.ZodObject<{
223
223
  POSTHOG_PERSONAL_API_KEY: z.ZodString;
224
224
  POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
225
225
  POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
@@ -236,7 +236,7 @@ declare const getPersonsValues: _keystrokehq_core0.Operation<z.ZodObject<{
236
236
  key: z.ZodString;
237
237
  value: z.ZodOptional<z.ZodString>;
238
238
  projectId: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
239
- }, z.core.$strip>, z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:posthog", z.ZodObject<{
239
+ }, z.core.$strip>, z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"posthog", z.ZodObject<{
240
240
  POSTHOG_PERSONAL_API_KEY: z.ZodString;
241
241
  POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
242
242
  POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
@@ -267,7 +267,7 @@ declare const getPersonsFunnel: _keystrokehq_core0.Operation<z.ZodObject<{
267
267
  created_at: z.ZodOptional<z.ZodString>;
268
268
  is_identified: z.ZodOptional<z.ZodBoolean>;
269
269
  }, z.core.$strip>>;
270
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:posthog", z.ZodObject<{
270
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"posthog", z.ZodObject<{
271
271
  POSTHOG_PERSONAL_API_KEY: z.ZodString;
272
272
  POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
273
273
  POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
@@ -298,7 +298,7 @@ declare const getPersonsTrends: _keystrokehq_core0.Operation<z.ZodObject<{
298
298
  created_at: z.ZodOptional<z.ZodString>;
299
299
  is_identified: z.ZodOptional<z.ZodBoolean>;
300
300
  }, z.core.$strip>>;
301
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:posthog", z.ZodObject<{
301
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"posthog", z.ZodObject<{
302
302
  POSTHOG_PERSONAL_API_KEY: z.ZodString;
303
303
  POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
304
304
  POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
@@ -328,7 +328,7 @@ declare const getPersonsLifecycle: _keystrokehq_core0.Operation<z.ZodObject<{
328
328
  created_at: z.ZodOptional<z.ZodString>;
329
329
  is_identified: z.ZodOptional<z.ZodBoolean>;
330
330
  }, z.core.$strip>>;
331
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:posthog", z.ZodObject<{
331
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"posthog", z.ZodObject<{
332
332
  POSTHOG_PERSONAL_API_KEY: z.ZodString;
333
333
  POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
334
334
  POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
@@ -352,7 +352,7 @@ declare const resetPersonName: _keystrokehq_core0.Operation<z.ZodObject<{
352
352
  name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
353
353
  created_at: z.ZodOptional<z.ZodString>;
354
354
  is_identified: z.ZodOptional<z.ZodBoolean>;
355
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:posthog", z.ZodObject<{
355
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"posthog", z.ZodObject<{
356
356
  POSTHOG_PERSONAL_API_KEY: z.ZodString;
357
357
  POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
358
358
  POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
package/dist/persons.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import { createPosthogManagementClient } from "./client.mjs";
2
2
  import { paginatedResponseSchema, personSchema, projectIdInputShape, propertiesBagSchema } from "./schemas.mjs";
3
- import { t as posthogOperation } from "./factory-DYDvHOGb.mjs";
3
+ import { t as posthogOperation } from "./factory-C3ssyfSy.mjs";
4
4
  import { z } from "zod";
5
5
 
6
6
  //#region src/persons.ts
@@ -1,6 +1,6 @@
1
+ import * as _keystrokehq_core0 from "@keystrokehq/core";
1
2
  import { z } from "zod";
2
3
  import * as _keystrokehq_core_credential_set0 from "@keystrokehq/core/credential-set";
3
- import * as _keystrokehq_core0 from "@keystrokehq/core";
4
4
 
5
5
  //#region src/projects.d.ts
6
6
  declare const listProjects: _keystrokehq_core0.Operation<z.ZodObject<{
@@ -27,7 +27,7 @@ declare const listProjects: _keystrokehq_core0.Operation<z.ZodObject<{
27
27
  timezone: z.ZodOptional<z.ZodString>;
28
28
  access_control: z.ZodOptional<z.ZodBoolean>;
29
29
  }, z.core.$strip>>;
30
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:posthog", z.ZodObject<{
30
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"posthog", z.ZodObject<{
31
31
  POSTHOG_PERSONAL_API_KEY: z.ZodString;
32
32
  POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
33
33
  POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
@@ -57,7 +57,7 @@ declare const getProject: _keystrokehq_core0.Operation<z.ZodObject<{
57
57
  is_demo: z.ZodOptional<z.ZodBoolean>;
58
58
  timezone: z.ZodOptional<z.ZodString>;
59
59
  access_control: z.ZodOptional<z.ZodBoolean>;
60
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:posthog", z.ZodObject<{
60
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"posthog", z.ZodObject<{
61
61
  POSTHOG_PERSONAL_API_KEY: z.ZodString;
62
62
  POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
63
63
  POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
@@ -97,7 +97,7 @@ declare const createProject: _keystrokehq_core0.Operation<z.ZodObject<{
97
97
  is_demo: z.ZodOptional<z.ZodBoolean>;
98
98
  timezone: z.ZodOptional<z.ZodString>;
99
99
  access_control: z.ZodOptional<z.ZodBoolean>;
100
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:posthog", z.ZodObject<{
100
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"posthog", z.ZodObject<{
101
101
  POSTHOG_PERSONAL_API_KEY: z.ZodString;
102
102
  POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
103
103
  POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
@@ -137,7 +137,7 @@ declare const updateProject: _keystrokehq_core0.Operation<z.ZodObject<{
137
137
  is_demo: z.ZodOptional<z.ZodBoolean>;
138
138
  timezone: z.ZodOptional<z.ZodString>;
139
139
  access_control: z.ZodOptional<z.ZodBoolean>;
140
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:posthog", z.ZodObject<{
140
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"posthog", z.ZodObject<{
141
141
  POSTHOG_PERSONAL_API_KEY: z.ZodString;
142
142
  POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
143
143
  POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
@@ -154,7 +154,7 @@ declare const deleteProject: _keystrokehq_core0.Operation<z.ZodObject<{
154
154
  projectId: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
155
155
  }, z.core.$strip>, z.ZodObject<{
156
156
  success: z.ZodBoolean;
157
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:posthog", z.ZodObject<{
157
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"posthog", z.ZodObject<{
158
158
  POSTHOG_PERSONAL_API_KEY: z.ZodString;
159
159
  POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
160
160
  POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
@@ -184,7 +184,7 @@ declare const rotateProjectApiKey: _keystrokehq_core0.Operation<z.ZodObject<{
184
184
  is_demo: z.ZodOptional<z.ZodBoolean>;
185
185
  timezone: z.ZodOptional<z.ZodString>;
186
186
  access_control: z.ZodOptional<z.ZodBoolean>;
187
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:posthog", z.ZodObject<{
187
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"posthog", z.ZodObject<{
188
188
  POSTHOG_PERSONAL_API_KEY: z.ZodString;
189
189
  POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
190
190
  POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
@@ -202,7 +202,7 @@ declare const getProjectActivity: _keystrokehq_core0.Operation<z.ZodObject<{
202
202
  projectId: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
203
203
  }, z.core.$strip>, z.ZodObject<{
204
204
  results: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
205
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:posthog", z.ZodObject<{
205
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"posthog", z.ZodObject<{
206
206
  POSTHOG_PERSONAL_API_KEY: z.ZodString;
207
207
  POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
208
208
  POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
@@ -220,7 +220,7 @@ declare const getProjectIsGeneric: _keystrokehq_core0.Operation<z.ZodObject<{
220
220
  projectId: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
221
221
  }, z.core.$strip>, z.ZodObject<{
222
222
  is_generic_email_provider: z.ZodBoolean;
223
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:posthog", z.ZodObject<{
223
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"posthog", z.ZodObject<{
224
224
  POSTHOG_PERSONAL_API_KEY: z.ZodString;
225
225
  POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
226
226
  POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
@@ -236,7 +236,7 @@ declare const getProjectIsGeneric: _keystrokehq_core0.Operation<z.ZodObject<{
236
236
  declare const addUserIntegration: _keystrokehq_core0.Operation<z.ZodObject<{
237
237
  properties: z.ZodRecord<z.ZodString, z.ZodUnknown>;
238
238
  projectId: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
239
- }, z.core.$strip>, z.ZodRecord<z.ZodString, z.ZodUnknown>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:posthog", z.ZodObject<{
239
+ }, z.core.$strip>, z.ZodRecord<z.ZodString, z.ZodUnknown>, readonly [_keystrokehq_core0.CredentialSet<"posthog", z.ZodObject<{
240
240
  POSTHOG_PERSONAL_API_KEY: z.ZodString;
241
241
  POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
242
242
  POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
@@ -265,7 +265,7 @@ declare const listProjectMembers: _keystrokehq_core0.Operation<z.ZodObject<{
265
265
  joined_at: z.ZodOptional<z.ZodString>;
266
266
  updated_at: z.ZodOptional<z.ZodString>;
267
267
  }, z.core.$strip>>;
268
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:posthog", z.ZodObject<{
268
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"posthog", z.ZodObject<{
269
269
  POSTHOG_PERSONAL_API_KEY: z.ZodString;
270
270
  POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
271
271
  POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
@@ -289,7 +289,7 @@ declare const addProjectMember: _keystrokehq_core0.Operation<z.ZodObject<{
289
289
  parent_level: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
290
290
  joined_at: z.ZodOptional<z.ZodString>;
291
291
  updated_at: z.ZodOptional<z.ZodString>;
292
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:posthog", z.ZodObject<{
292
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"posthog", z.ZodObject<{
293
293
  POSTHOG_PERSONAL_API_KEY: z.ZodString;
294
294
  POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
295
295
  POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
@@ -313,7 +313,7 @@ declare const updateProjectMember: _keystrokehq_core0.Operation<z.ZodObject<{
313
313
  parent_level: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
314
314
  joined_at: z.ZodOptional<z.ZodString>;
315
315
  updated_at: z.ZodOptional<z.ZodString>;
316
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:posthog", z.ZodObject<{
316
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"posthog", z.ZodObject<{
317
317
  POSTHOG_PERSONAL_API_KEY: z.ZodString;
318
318
  POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
319
319
  POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
@@ -331,7 +331,7 @@ declare const removeProjectMember: _keystrokehq_core0.Operation<z.ZodObject<{
331
331
  projectId: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
332
332
  }, z.core.$strip>, z.ZodObject<{
333
333
  success: z.ZodBoolean;
334
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:posthog", z.ZodObject<{
334
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"posthog", z.ZodObject<{
335
335
  POSTHOG_PERSONAL_API_KEY: z.ZodString;
336
336
  POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
337
337
  POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
package/dist/projects.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import { createPosthogManagementClient } from "./client.mjs";
2
2
  import { paginatedResponseSchema, projectMemberSchema, projectSchema, propertiesBagSchema } from "./schemas.mjs";
3
- import { t as posthogOperation } from "./factory-DYDvHOGb.mjs";
3
+ import { t as posthogOperation } from "./factory-C3ssyfSy.mjs";
4
4
  import { z } from "zod";
5
5
 
6
6
  //#region src/projects.ts
@@ -192,12 +192,12 @@ declare const surveySchema: z.ZodObject<{
192
192
  name: z.ZodOptional<z.ZodString>;
193
193
  description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
194
194
  type: z.ZodOptional<z.ZodEnum<{
195
+ email: "email";
195
196
  popover: "popover";
196
197
  api: "api";
197
198
  widget: "widget";
198
199
  button: "button";
199
200
  full_screen: "full_screen";
200
- email: "email";
201
201
  }>>;
202
202
  questions: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
203
203
  conditions: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
@@ -215,9 +215,9 @@ declare const actionStepSchema: z.ZodObject<{
215
215
  event: z.ZodOptional<z.ZodNullable<z.ZodString>>;
216
216
  url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
217
217
  url_matching: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
218
+ exact: "exact";
218
219
  contains: "contains";
219
220
  regex: "regex";
220
- exact: "exact";
221
221
  }>>>;
222
222
  text: z.ZodOptional<z.ZodNullable<z.ZodString>>;
223
223
  href: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -234,9 +234,9 @@ declare const actionSchema: z.ZodObject<{
234
234
  event: z.ZodOptional<z.ZodNullable<z.ZodString>>;
235
235
  url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
236
236
  url_matching: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
237
+ exact: "exact";
237
238
  contains: "contains";
238
239
  regex: "regex";
239
- exact: "exact";
240
240
  }>>>;
241
241
  text: z.ZodOptional<z.ZodNullable<z.ZodString>>;
242
242
  href: z.ZodOptional<z.ZodNullable<z.ZodString>>;