@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.
- package/dist/_official/index.d.mts +1 -1
- package/dist/_official/index.mjs +1 -1
- package/dist/_runtime/index.d.mts +1 -2
- package/dist/_runtime/index.mjs +1 -1
- package/dist/actions.d.mts +13 -13
- package/dist/actions.mjs +1 -1
- package/dist/annotations.d.mts +6 -6
- package/dist/annotations.mjs +1 -1
- package/dist/capture.d.mts +8 -8
- package/dist/capture.mjs +1 -1
- package/dist/client.d.mts +1 -2
- package/dist/client.mjs +1 -1
- package/dist/cohorts.d.mts +9 -9
- package/dist/cohorts.mjs +1 -1
- package/dist/connection.d.mts +1 -1
- package/dist/connection.mjs +1 -1
- package/dist/dashboards.d.mts +17 -17
- package/dist/dashboards.mjs +1 -1
- package/dist/decide.d.mts +3 -3
- package/dist/decide.mjs +1 -1
- package/dist/events-management.d.mts +11 -11
- package/dist/events-management.mjs +1 -1
- package/dist/factory-C3ssyfSy.mjs +7 -0
- package/dist/feature-flags.d.mts +16 -16
- package/dist/feature-flags.mjs +1 -1
- package/dist/http-BYcjqxPi.mjs +84 -0
- package/dist/insights.d.mts +17 -17
- package/dist/insights.mjs +1 -1
- package/dist/{integration-Td6D39_E.d.mts → integration-BN7xcpga.d.mts} +15 -5
- package/dist/integration-D0HdrI0T.mjs +120 -0
- package/dist/organizations.d.mts +12 -12
- package/dist/organizations.mjs +1 -1
- package/dist/persons.d.mts +16 -16
- package/dist/persons.mjs +1 -1
- package/dist/projects.d.mts +14 -14
- package/dist/projects.mjs +1 -1
- package/dist/schemas.d.mts +3 -3
- package/dist/session-recordings.d.mts +15 -15
- package/dist/session-recordings.mjs +1 -1
- package/dist/surveys.d.mts +16 -16
- package/dist/surveys.mjs +1 -1
- package/dist/triggers.d.mts +5 -3
- package/dist/triggers.mjs +52 -3
- package/dist/webhook-management.d.mts +10 -10
- package/dist/webhook-management.mjs +1 -1
- package/package.json +4 -4
- package/dist/factory-DYDvHOGb.mjs +0 -8
- package/dist/integration-Doy2Dwli.mjs +0 -30
|
@@ -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/events-management.d.ts
|
|
6
6
|
declare const listEvents: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
@@ -35,7 +35,7 @@ declare const listEvents: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
|
35
35
|
elements: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
36
36
|
elements_chain: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
37
37
|
}, z.core.$strip>>;
|
|
38
|
-
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"
|
|
38
|
+
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"posthog", z.ZodObject<{
|
|
39
39
|
POSTHOG_PERSONAL_API_KEY: z.ZodString;
|
|
40
40
|
POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
|
|
41
41
|
POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
|
|
@@ -69,7 +69,7 @@ declare const getEvent: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
|
69
69
|
}, z.core.$strip>>>;
|
|
70
70
|
elements: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
71
71
|
elements_chain: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
72
|
-
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"
|
|
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>;
|
|
@@ -86,7 +86,7 @@ declare const getEventValues: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
|
86
86
|
key: z.ZodString;
|
|
87
87
|
value: z.ZodOptional<z.ZodString>;
|
|
88
88
|
projectId: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
89
|
-
}, z.core.$strip>, z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"
|
|
89
|
+
}, z.core.$strip>, z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"posthog", z.ZodObject<{
|
|
90
90
|
POSTHOG_PERSONAL_API_KEY: z.ZodString;
|
|
91
91
|
POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
|
|
92
92
|
POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
|
|
@@ -118,7 +118,7 @@ declare const listEventDefinitions: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
|
118
118
|
verified_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
119
119
|
created_at: z.ZodOptional<z.ZodString>;
|
|
120
120
|
}, z.core.$strip>>;
|
|
121
|
-
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"
|
|
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>;
|
|
@@ -143,7 +143,7 @@ declare const getEventDefinition: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
|
143
143
|
verified: z.ZodOptional<z.ZodBoolean>;
|
|
144
144
|
verified_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
145
145
|
created_at: z.ZodOptional<z.ZodString>;
|
|
146
|
-
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"
|
|
146
|
+
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"posthog", z.ZodObject<{
|
|
147
147
|
POSTHOG_PERSONAL_API_KEY: z.ZodString;
|
|
148
148
|
POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
|
|
149
149
|
POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
|
|
@@ -172,7 +172,7 @@ declare const updateEventDefinition: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
|
172
172
|
verified: z.ZodOptional<z.ZodBoolean>;
|
|
173
173
|
verified_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
174
174
|
created_at: z.ZodOptional<z.ZodString>;
|
|
175
|
-
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"
|
|
175
|
+
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"posthog", z.ZodObject<{
|
|
176
176
|
POSTHOG_PERSONAL_API_KEY: z.ZodString;
|
|
177
177
|
POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
|
|
178
178
|
POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
|
|
@@ -190,7 +190,7 @@ declare const deleteEventDefinition: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
|
190
190
|
projectId: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
191
191
|
}, z.core.$strip>, z.ZodObject<{
|
|
192
192
|
success: z.ZodBoolean;
|
|
193
|
-
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"
|
|
193
|
+
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"posthog", z.ZodObject<{
|
|
194
194
|
POSTHOG_PERSONAL_API_KEY: z.ZodString;
|
|
195
195
|
POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
|
|
196
196
|
POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
|
|
@@ -224,7 +224,7 @@ declare const listPropertyDefinitions: _keystrokehq_core0.Operation<z.ZodObject<
|
|
|
224
224
|
verified_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
225
225
|
created_at: z.ZodOptional<z.ZodString>;
|
|
226
226
|
}, z.core.$strip>>;
|
|
227
|
-
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"
|
|
227
|
+
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"posthog", z.ZodObject<{
|
|
228
228
|
POSTHOG_PERSONAL_API_KEY: z.ZodString;
|
|
229
229
|
POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
|
|
230
230
|
POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
|
|
@@ -249,7 +249,7 @@ declare const getPropertyDefinition: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
|
249
249
|
verified: z.ZodOptional<z.ZodBoolean>;
|
|
250
250
|
verified_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
251
251
|
created_at: z.ZodOptional<z.ZodString>;
|
|
252
|
-
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"
|
|
252
|
+
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"posthog", z.ZodObject<{
|
|
253
253
|
POSTHOG_PERSONAL_API_KEY: z.ZodString;
|
|
254
254
|
POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
|
|
255
255
|
POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
|
|
@@ -277,7 +277,7 @@ declare const updatePropertyDefinition: _keystrokehq_core0.Operation<z.ZodObject
|
|
|
277
277
|
verified: z.ZodOptional<z.ZodBoolean>;
|
|
278
278
|
verified_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
279
279
|
created_at: z.ZodOptional<z.ZodString>;
|
|
280
|
-
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"
|
|
280
|
+
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"posthog", z.ZodObject<{
|
|
281
281
|
POSTHOG_PERSONAL_API_KEY: z.ZodString;
|
|
282
282
|
POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
|
|
283
283
|
POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createPosthogManagementClient } from "./client.mjs";
|
|
2
2
|
import { analyticsEventSchema, eventDefinitionSchema, paginatedResponseSchema, projectIdInputShape } from "./schemas.mjs";
|
|
3
|
-
import { t as posthogOperation } from "./factory-
|
|
3
|
+
import { t as posthogOperation } from "./factory-C3ssyfSy.mjs";
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
|
|
6
6
|
//#region src/events-management.ts
|
package/dist/feature-flags.d.mts
CHANGED
|
@@ -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/feature-flags.d.ts
|
|
6
6
|
declare const listFeatureFlags: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
@@ -32,7 +32,7 @@ declare const listFeatureFlags: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
|
32
32
|
rollout_percentage: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
33
33
|
version: z.ZodOptional<z.ZodNumber>;
|
|
34
34
|
}, z.core.$strip>>;
|
|
35
|
-
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"
|
|
35
|
+
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"posthog", z.ZodObject<{
|
|
36
36
|
POSTHOG_PERSONAL_API_KEY: z.ZodString;
|
|
37
37
|
POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
|
|
38
38
|
POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
|
|
@@ -64,7 +64,7 @@ declare const getFeatureFlag: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
|
64
64
|
ensure_experience_continuity: z.ZodOptional<z.ZodBoolean>;
|
|
65
65
|
rollout_percentage: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
66
66
|
version: z.ZodOptional<z.ZodNumber>;
|
|
67
|
-
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"
|
|
67
|
+
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"posthog", z.ZodObject<{
|
|
68
68
|
POSTHOG_PERSONAL_API_KEY: z.ZodString;
|
|
69
69
|
POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
|
|
70
70
|
POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
|
|
@@ -107,7 +107,7 @@ declare const createFeatureFlag: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
|
107
107
|
ensure_experience_continuity: z.ZodOptional<z.ZodBoolean>;
|
|
108
108
|
rollout_percentage: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
109
109
|
version: z.ZodOptional<z.ZodNumber>;
|
|
110
|
-
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"
|
|
110
|
+
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"posthog", z.ZodObject<{
|
|
111
111
|
POSTHOG_PERSONAL_API_KEY: z.ZodString;
|
|
112
112
|
POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
|
|
113
113
|
POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
|
|
@@ -151,7 +151,7 @@ declare const updateFeatureFlag: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
|
151
151
|
ensure_experience_continuity: z.ZodOptional<z.ZodBoolean>;
|
|
152
152
|
rollout_percentage: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
153
153
|
version: z.ZodOptional<z.ZodNumber>;
|
|
154
|
-
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"
|
|
154
|
+
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"posthog", z.ZodObject<{
|
|
155
155
|
POSTHOG_PERSONAL_API_KEY: z.ZodString;
|
|
156
156
|
POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
|
|
157
157
|
POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
|
|
@@ -183,7 +183,7 @@ declare const deleteFeatureFlag: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
|
183
183
|
ensure_experience_continuity: z.ZodOptional<z.ZodBoolean>;
|
|
184
184
|
rollout_percentage: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
185
185
|
version: z.ZodOptional<z.ZodNumber>;
|
|
186
|
-
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"
|
|
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>;
|
|
@@ -215,7 +215,7 @@ declare const enableFeatureFlag: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
|
215
215
|
ensure_experience_continuity: z.ZodOptional<z.ZodBoolean>;
|
|
216
216
|
rollout_percentage: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
217
217
|
version: z.ZodOptional<z.ZodNumber>;
|
|
218
|
-
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"
|
|
218
|
+
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"posthog", z.ZodObject<{
|
|
219
219
|
POSTHOG_PERSONAL_API_KEY: z.ZodString;
|
|
220
220
|
POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
|
|
221
221
|
POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
|
|
@@ -247,7 +247,7 @@ declare const disableFeatureFlag: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
|
247
247
|
ensure_experience_continuity: z.ZodOptional<z.ZodBoolean>;
|
|
248
248
|
rollout_percentage: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
249
249
|
version: z.ZodOptional<z.ZodNumber>;
|
|
250
|
-
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"
|
|
250
|
+
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"posthog", z.ZodObject<{
|
|
251
251
|
POSTHOG_PERSONAL_API_KEY: z.ZodString;
|
|
252
252
|
POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
|
|
253
253
|
POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
|
|
@@ -266,7 +266,7 @@ declare const getFeatureFlagActivity: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
|
266
266
|
projectId: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
267
267
|
}, z.core.$strip>, z.ZodObject<{
|
|
268
268
|
results: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
269
|
-
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"
|
|
269
|
+
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"posthog", z.ZodObject<{
|
|
270
270
|
POSTHOG_PERSONAL_API_KEY: z.ZodString;
|
|
271
271
|
POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
|
|
272
272
|
POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
|
|
@@ -281,7 +281,7 @@ declare const getFeatureFlagActivity: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
|
281
281
|
}, z.core.$strip>>[] | undefined>], undefined>;
|
|
282
282
|
declare const getMyFeatureFlags: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
283
283
|
projectId: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
284
|
-
}, z.core.$strip>, z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"
|
|
284
|
+
}, z.core.$strip>, z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"posthog", z.ZodObject<{
|
|
285
285
|
POSTHOG_PERSONAL_API_KEY: z.ZodString;
|
|
286
286
|
POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
|
|
287
287
|
POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
|
|
@@ -307,7 +307,7 @@ declare const getFeatureFlagRoleAccess: _keystrokehq_core0.Operation<z.ZodObject
|
|
|
307
307
|
role: z.ZodOptional<z.ZodNumber>;
|
|
308
308
|
added_at: z.ZodOptional<z.ZodString>;
|
|
309
309
|
}, z.core.$strip>>;
|
|
310
|
-
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"
|
|
310
|
+
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"posthog", z.ZodObject<{
|
|
311
311
|
POSTHOG_PERSONAL_API_KEY: z.ZodString;
|
|
312
312
|
POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
|
|
313
313
|
POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
|
|
@@ -329,7 +329,7 @@ declare const createFeatureFlagRoleAccess: _keystrokehq_core0.Operation<z.ZodObj
|
|
|
329
329
|
feature_flag: z.ZodOptional<z.ZodNumber>;
|
|
330
330
|
role: z.ZodOptional<z.ZodNumber>;
|
|
331
331
|
added_at: z.ZodOptional<z.ZodString>;
|
|
332
|
-
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"
|
|
332
|
+
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"posthog", z.ZodObject<{
|
|
333
333
|
POSTHOG_PERSONAL_API_KEY: z.ZodString;
|
|
334
334
|
POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
|
|
335
335
|
POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
|
|
@@ -348,7 +348,7 @@ declare const deleteFeatureFlagRoleAccess: _keystrokehq_core0.Operation<z.ZodObj
|
|
|
348
348
|
projectId: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
349
349
|
}, z.core.$strip>, z.ZodObject<{
|
|
350
350
|
success: z.ZodBoolean;
|
|
351
|
-
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"
|
|
351
|
+
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"posthog", z.ZodObject<{
|
|
352
352
|
POSTHOG_PERSONAL_API_KEY: z.ZodString;
|
|
353
353
|
POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
|
|
354
354
|
POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
|
|
@@ -366,7 +366,7 @@ declare const getFeatureFlagDashboards: _keystrokehq_core0.Operation<z.ZodObject
|
|
|
366
366
|
projectId: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
367
367
|
}, z.core.$strip>, z.ZodObject<{
|
|
368
368
|
results: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
369
|
-
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"
|
|
369
|
+
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"posthog", z.ZodObject<{
|
|
370
370
|
POSTHOG_PERSONAL_API_KEY: z.ZodString;
|
|
371
371
|
POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
|
|
372
372
|
POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
|
|
@@ -383,7 +383,7 @@ declare const getFeatureFlagRemoteConfig: _keystrokehq_core0.Operation<z.ZodObje
|
|
|
383
383
|
distinctId: z.ZodString;
|
|
384
384
|
id: z.ZodNumber;
|
|
385
385
|
projectId: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
386
|
-
}, z.core.$strip>, z.ZodRecord<z.ZodString, z.ZodUnknown>, readonly [_keystrokehq_core0.CredentialSet<"
|
|
386
|
+
}, z.core.$strip>, z.ZodRecord<z.ZodString, z.ZodUnknown>, readonly [_keystrokehq_core0.CredentialSet<"posthog", z.ZodObject<{
|
|
387
387
|
POSTHOG_PERSONAL_API_KEY: z.ZodString;
|
|
388
388
|
POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
|
|
389
389
|
POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
|
|
@@ -399,7 +399,7 @@ declare const getFeatureFlagRemoteConfig: _keystrokehq_core0.Operation<z.ZodObje
|
|
|
399
399
|
declare const getFeatureFlagStatus: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
400
400
|
id: z.ZodNumber;
|
|
401
401
|
projectId: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
402
|
-
}, z.core.$strip>, z.ZodRecord<z.ZodString, z.ZodUnknown>, readonly [_keystrokehq_core0.CredentialSet<"
|
|
402
|
+
}, z.core.$strip>, z.ZodRecord<z.ZodString, z.ZodUnknown>, readonly [_keystrokehq_core0.CredentialSet<"posthog", z.ZodObject<{
|
|
403
403
|
POSTHOG_PERSONAL_API_KEY: z.ZodString;
|
|
404
404
|
POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
|
|
405
405
|
POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
|
package/dist/feature-flags.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createPosthogManagementClient } from "./client.mjs";
|
|
2
2
|
import { featureFlagFiltersSchema, featureFlagRoleAccessSchema, featureFlagSchema, paginatedResponseSchema, projectIdInputShape } from "./schemas.mjs";
|
|
3
|
-
import { t as posthogOperation } from "./factory-
|
|
3
|
+
import { t as posthogOperation } from "./factory-C3ssyfSy.mjs";
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
|
|
6
6
|
//#region src/feature-flags.ts
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
//#region ../../packages/integration-authoring/dist/http.mjs
|
|
2
|
+
/**
|
|
3
|
+
* Typed error thrown by `createJsonRestClient` for non-2xx responses.
|
|
4
|
+
*
|
|
5
|
+
* Includes the full HTTP status, status text, response headers, raw body
|
|
6
|
+
* string, and request URL/method so callers can make structured decisions
|
|
7
|
+
* (retry on 5xx, map 401/403 to `CredentialRevokedError`, read
|
|
8
|
+
* `Retry-After`, etc.) instead of parsing error messages.
|
|
9
|
+
*/
|
|
10
|
+
var JsonRestError = class extends Error {
|
|
11
|
+
name = "JsonRestError";
|
|
12
|
+
status;
|
|
13
|
+
statusText;
|
|
14
|
+
body;
|
|
15
|
+
headers;
|
|
16
|
+
url;
|
|
17
|
+
method;
|
|
18
|
+
constructor(init) {
|
|
19
|
+
super(`${init.errorPrefix}: ${init.status} ${init.statusText}${init.body ? ` — ${init.body}` : ""}`);
|
|
20
|
+
this.status = init.status;
|
|
21
|
+
this.statusText = init.statusText;
|
|
22
|
+
this.body = init.body;
|
|
23
|
+
this.headers = init.headers;
|
|
24
|
+
this.url = init.url;
|
|
25
|
+
this.method = init.method;
|
|
26
|
+
}
|
|
27
|
+
/** True for 401 and 403 responses (auth / permission failures). */
|
|
28
|
+
static isAuthError(error) {
|
|
29
|
+
return isJsonRestError(error) && (error.status === 401 || error.status === 403);
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* Structural type guard for `JsonRestError`. Tolerates cross-realm errors by
|
|
34
|
+
* checking the `name` property instead of relying on `instanceof`.
|
|
35
|
+
*/
|
|
36
|
+
function isJsonRestError(error) {
|
|
37
|
+
if (!error || typeof error !== "object") return false;
|
|
38
|
+
const candidate = error;
|
|
39
|
+
return candidate.name === "JsonRestError" && typeof candidate.status === "number" && typeof candidate.body === "string";
|
|
40
|
+
}
|
|
41
|
+
function buildQueryString(query) {
|
|
42
|
+
if (!query) return "";
|
|
43
|
+
const params = new URLSearchParams();
|
|
44
|
+
for (const [key, value] of Object.entries(query)) if (value !== void 0 && value !== null) params.set(key, String(value));
|
|
45
|
+
const qs = params.toString();
|
|
46
|
+
return qs ? `?${qs}` : "";
|
|
47
|
+
}
|
|
48
|
+
function createJsonRestClient(config) {
|
|
49
|
+
const fetchImpl = config.fetchImpl ?? fetch;
|
|
50
|
+
const request = async (options) => {
|
|
51
|
+
const { method, path, body, query, headers: requestHeaders } = options;
|
|
52
|
+
const url = `${config.baseUrl}${path}${buildQueryString(query)}`;
|
|
53
|
+
const headers = {
|
|
54
|
+
Accept: "application/json",
|
|
55
|
+
...config.defaultHeaders,
|
|
56
|
+
...config.authHeaders(),
|
|
57
|
+
...requestHeaders
|
|
58
|
+
};
|
|
59
|
+
if (body !== void 0) headers["Content-Type"] ??= "application/json";
|
|
60
|
+
const response = await fetchImpl(url, {
|
|
61
|
+
method,
|
|
62
|
+
headers,
|
|
63
|
+
body: body !== void 0 ? JSON.stringify(body) : void 0
|
|
64
|
+
});
|
|
65
|
+
if (!response.ok) {
|
|
66
|
+
const errorBody = await response.text().catch(() => "");
|
|
67
|
+
throw new JsonRestError({
|
|
68
|
+
errorPrefix: config.errorPrefix,
|
|
69
|
+
status: response.status,
|
|
70
|
+
statusText: response.statusText,
|
|
71
|
+
body: errorBody,
|
|
72
|
+
headers: response.headers,
|
|
73
|
+
url,
|
|
74
|
+
method
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
if (response.status === 204) return;
|
|
78
|
+
return await response.json();
|
|
79
|
+
};
|
|
80
|
+
return { request };
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
//#endregion
|
|
84
|
+
export { isJsonRestError as n, createJsonRestClient as t };
|
package/dist/insights.d.mts
CHANGED
|
@@ -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/insights.d.ts
|
|
6
6
|
declare const listInsights: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
@@ -33,7 +33,7 @@ declare const listInsights: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
|
33
33
|
dashboards: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
34
34
|
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
35
35
|
}, z.core.$strip>>;
|
|
36
|
-
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"
|
|
36
|
+
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"posthog", z.ZodObject<{
|
|
37
37
|
POSTHOG_PERSONAL_API_KEY: z.ZodString;
|
|
38
38
|
POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
|
|
39
39
|
POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
|
|
@@ -65,7 +65,7 @@ declare const getInsight: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
|
65
65
|
deleted: z.ZodOptional<z.ZodBoolean>;
|
|
66
66
|
dashboards: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
67
67
|
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
68
|
-
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"
|
|
68
|
+
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"posthog", z.ZodObject<{
|
|
69
69
|
POSTHOG_PERSONAL_API_KEY: z.ZodString;
|
|
70
70
|
POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
|
|
71
71
|
POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
|
|
@@ -105,7 +105,7 @@ declare const createInsight: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
|
105
105
|
deleted: z.ZodOptional<z.ZodBoolean>;
|
|
106
106
|
dashboards: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
107
107
|
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
108
|
-
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"
|
|
108
|
+
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"posthog", z.ZodObject<{
|
|
109
109
|
POSTHOG_PERSONAL_API_KEY: z.ZodString;
|
|
110
110
|
POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
|
|
111
111
|
POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
|
|
@@ -146,7 +146,7 @@ declare const updateInsight: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
|
146
146
|
deleted: z.ZodOptional<z.ZodBoolean>;
|
|
147
147
|
dashboards: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
148
148
|
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
149
|
-
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"
|
|
149
|
+
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"posthog", z.ZodObject<{
|
|
150
150
|
POSTHOG_PERSONAL_API_KEY: z.ZodString;
|
|
151
151
|
POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
|
|
152
152
|
POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
|
|
@@ -178,7 +178,7 @@ declare const deleteInsight: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
|
178
178
|
deleted: z.ZodOptional<z.ZodBoolean>;
|
|
179
179
|
dashboards: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
180
180
|
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
181
|
-
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"
|
|
181
|
+
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"posthog", z.ZodObject<{
|
|
182
182
|
POSTHOG_PERSONAL_API_KEY: z.ZodString;
|
|
183
183
|
POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
|
|
184
184
|
POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
|
|
@@ -197,7 +197,7 @@ declare const getInsightActivity: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
|
197
197
|
projectId: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
198
198
|
}, z.core.$strip>, z.ZodObject<{
|
|
199
199
|
results: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
200
|
-
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"
|
|
200
|
+
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"posthog", z.ZodObject<{
|
|
201
201
|
POSTHOG_PERSONAL_API_KEY: z.ZodString;
|
|
202
202
|
POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
|
|
203
203
|
POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
|
|
@@ -215,7 +215,7 @@ declare const getInsightsActivityFeed: _keystrokehq_core0.Operation<z.ZodObject<
|
|
|
215
215
|
projectId: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
216
216
|
}, z.core.$strip>, z.ZodObject<{
|
|
217
217
|
results: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
218
|
-
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"
|
|
218
|
+
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"posthog", z.ZodObject<{
|
|
219
219
|
POSTHOG_PERSONAL_API_KEY: z.ZodString;
|
|
220
220
|
POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
|
|
221
221
|
POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
|
|
@@ -235,7 +235,7 @@ declare const getInsightSharing: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
|
235
235
|
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
236
236
|
access_token: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
237
237
|
created_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
238
|
-
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"
|
|
238
|
+
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"posthog", z.ZodObject<{
|
|
239
239
|
POSTHOG_PERSONAL_API_KEY: z.ZodString;
|
|
240
240
|
POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
|
|
241
241
|
POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
|
|
@@ -256,7 +256,7 @@ declare const updateInsightSharing: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
|
256
256
|
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
257
257
|
access_token: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
258
258
|
created_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
259
|
-
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"
|
|
259
|
+
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"posthog", z.ZodObject<{
|
|
260
260
|
POSTHOG_PERSONAL_API_KEY: z.ZodString;
|
|
261
261
|
POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
|
|
262
262
|
POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
|
|
@@ -293,7 +293,7 @@ declare const getMyInsights: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
|
293
293
|
dashboards: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
294
294
|
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
295
295
|
}, z.core.$strip>>;
|
|
296
|
-
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"
|
|
296
|
+
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"posthog", z.ZodObject<{
|
|
297
297
|
POSTHOG_PERSONAL_API_KEY: z.ZodString;
|
|
298
298
|
POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
|
|
299
299
|
POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
|
|
@@ -311,7 +311,7 @@ declare const markInsightViewed: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
|
311
311
|
projectId: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
312
312
|
}, z.core.$strip>, z.ZodObject<{
|
|
313
313
|
success: z.ZodBoolean;
|
|
314
|
-
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"
|
|
314
|
+
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"posthog", z.ZodObject<{
|
|
315
315
|
POSTHOG_PERSONAL_API_KEY: z.ZodString;
|
|
316
316
|
POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
|
|
317
317
|
POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
|
|
@@ -328,7 +328,7 @@ declare const executeInsightQuery: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
|
328
328
|
query: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
329
329
|
refresh: z.ZodOptional<z.ZodBoolean>;
|
|
330
330
|
projectId: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
331
|
-
}, z.core.$strip>, z.ZodRecord<z.ZodString, z.ZodUnknown>, readonly [_keystrokehq_core0.CredentialSet<"
|
|
331
|
+
}, z.core.$strip>, z.ZodRecord<z.ZodString, z.ZodUnknown>, 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>;
|
|
@@ -344,7 +344,7 @@ declare const executeInsightQuery: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
|
344
344
|
declare const getInsightRetention: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
345
345
|
query: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
346
346
|
projectId: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
347
|
-
}, z.core.$strip>, z.ZodRecord<z.ZodString, z.ZodUnknown>, readonly [_keystrokehq_core0.CredentialSet<"
|
|
347
|
+
}, z.core.$strip>, z.ZodRecord<z.ZodString, z.ZodUnknown>, readonly [_keystrokehq_core0.CredentialSet<"posthog", z.ZodObject<{
|
|
348
348
|
POSTHOG_PERSONAL_API_KEY: z.ZodString;
|
|
349
349
|
POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
|
|
350
350
|
POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
|
|
@@ -360,7 +360,7 @@ declare const getInsightRetention: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
|
360
360
|
declare const getInsightFunnel: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
361
361
|
query: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
362
362
|
projectId: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
363
|
-
}, z.core.$strip>, z.ZodRecord<z.ZodString, z.ZodUnknown>, readonly [_keystrokehq_core0.CredentialSet<"
|
|
363
|
+
}, z.core.$strip>, z.ZodRecord<z.ZodString, z.ZodUnknown>, readonly [_keystrokehq_core0.CredentialSet<"posthog", z.ZodObject<{
|
|
364
364
|
POSTHOG_PERSONAL_API_KEY: z.ZodString;
|
|
365
365
|
POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
|
|
366
366
|
POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
|
|
@@ -376,7 +376,7 @@ declare const getInsightFunnel: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
|
376
376
|
declare const getInsightPath: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
377
377
|
query: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
378
378
|
projectId: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
379
|
-
}, z.core.$strip>, z.ZodRecord<z.ZodString, z.ZodUnknown>, readonly [_keystrokehq_core0.CredentialSet<"
|
|
379
|
+
}, z.core.$strip>, z.ZodRecord<z.ZodString, z.ZodUnknown>, readonly [_keystrokehq_core0.CredentialSet<"posthog", z.ZodObject<{
|
|
380
380
|
POSTHOG_PERSONAL_API_KEY: z.ZodString;
|
|
381
381
|
POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
|
|
382
382
|
POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
|
|
@@ -392,7 +392,7 @@ declare const getInsightPath: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
|
392
392
|
declare const getInsightTrend: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
393
393
|
query: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
394
394
|
projectId: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
395
|
-
}, z.core.$strip>, z.ZodRecord<z.ZodString, z.ZodUnknown>, readonly [_keystrokehq_core0.CredentialSet<"
|
|
395
|
+
}, z.core.$strip>, z.ZodRecord<z.ZodString, z.ZodUnknown>, readonly [_keystrokehq_core0.CredentialSet<"posthog", z.ZodObject<{
|
|
396
396
|
POSTHOG_PERSONAL_API_KEY: z.ZodString;
|
|
397
397
|
POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
|
|
398
398
|
POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
|
package/dist/insights.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createPosthogManagementClient } from "./client.mjs";
|
|
2
2
|
import { insightSchema, paginatedResponseSchema, projectIdInputShape, sharingConfigurationSchema } from "./schemas.mjs";
|
|
3
|
-
import { t as posthogOperation } from "./factory-
|
|
3
|
+
import { t as posthogOperation } from "./factory-C3ssyfSy.mjs";
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
|
|
6
6
|
//#region src/insights.ts
|
|
@@ -1,9 +1,19 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _keystrokehq_core0 from "@keystrokehq/core";
|
|
2
|
+
import { CredentialSet, Operation } from "@keystrokehq/core";
|
|
2
3
|
import { z } from "zod";
|
|
3
4
|
import * as _keystrokehq_core_credential_set0 from "@keystrokehq/core/credential-set";
|
|
4
5
|
import { InferCredentialSetAuth } from "@keystrokehq/core/credential-set";
|
|
5
|
-
import * as _keystrokehq_core0 from "@keystrokehq/core";
|
|
6
6
|
|
|
7
|
+
//#region ../../packages/integration-authoring/dist/official/index.d.mts
|
|
8
|
+
/**
|
|
9
|
+
* Creates a factory for Keystroke-official integration operations.
|
|
10
|
+
*
|
|
11
|
+
* It keeps the same flat `run(input, credentials)` ergonomics as the generic
|
|
12
|
+
* operation factory, while registering official metadata for builder/runtime
|
|
13
|
+
* operation metadata.
|
|
14
|
+
*/
|
|
15
|
+
declare function createOfficialOperationFactory(credentialSet: any): (config: any) => Operation<any, any, any[], undefined>;
|
|
16
|
+
//#endregion
|
|
7
17
|
//#region src/integration.d.ts
|
|
8
18
|
/**
|
|
9
19
|
* PostHog integration — product analytics, feature flags, experiments,
|
|
@@ -25,14 +35,14 @@ declare const posthogOfficialIntegration: {
|
|
|
25
35
|
POSTHOG_SCOPES: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
26
36
|
}, z.core.$strip>;
|
|
27
37
|
};
|
|
28
|
-
declare const posthogBundle:
|
|
38
|
+
declare const posthogBundle: undefined<"posthog", z.ZodObject<{
|
|
29
39
|
POSTHOG_PERSONAL_API_KEY: z.ZodString;
|
|
30
40
|
POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
|
|
31
41
|
POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
|
|
32
42
|
POSTHOG_PROJECT_ID: z.ZodOptional<z.ZodString>;
|
|
33
43
|
POSTHOG_SCOPES: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
34
44
|
}, z.core.$strip>>;
|
|
35
|
-
declare const posthog: _keystrokehq_core0.CredentialSet<"
|
|
45
|
+
declare const posthog: _keystrokehq_core0.CredentialSet<"posthog", z.ZodObject<{
|
|
36
46
|
POSTHOG_PERSONAL_API_KEY: z.ZodString;
|
|
37
47
|
POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
|
|
38
48
|
POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
|
|
@@ -50,4 +60,4 @@ declare const posthog: _keystrokehq_core0.CredentialSet<"keystroke:posthog", z.Z
|
|
|
50
60
|
*/
|
|
51
61
|
type PosthogCredentials = InferCredentialSetAuth<typeof posthog>;
|
|
52
62
|
//#endregion
|
|
53
|
-
export { posthogOfficialIntegration as i, posthog as n, posthogBundle as r, PosthogCredentials as t };
|
|
63
|
+
export { createOfficialOperationFactory as a, posthogOfficialIntegration as i, posthog as n, posthogBundle as r, PosthogCredentials as t };
|