@keystrokehq/posthog 0.0.9 → 0.0.16-integration-id-canonicalization.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +28 -48
- package/dist/{client.mjs → client-BZWd9-On.mjs} +195 -4
- package/dist/credential-sets/index.d.mts +2 -0
- package/dist/credential-sets/index.mjs +3 -0
- package/dist/index.d.mts +4 -1
- package/dist/index.mjs +5 -1
- package/dist/operations/index.d.mts +2 -0
- package/dist/operations/index.mjs +3 -0
- package/dist/posthog.credential-set-C8TimFgo.d.mts +30 -0
- package/dist/posthog.credential-set-DwYnDkeD.mjs +28 -0
- package/dist/{schemas.d.mts → schemas/index.d.mts} +4 -4
- package/dist/{schemas.mjs → schemas/index.mjs} +1 -1
- package/dist/surveys-update.operation-C0MYZZ04.mjs +3836 -0
- package/dist/surveys-update.operation-gxREsmzk.d.mts +4578 -0
- package/dist/{triggers.d.mts → triggers/index.d.mts} +4 -4
- package/dist/{triggers.mjs → triggers/index.mjs} +5 -6
- package/package.json +13 -85
- package/dist/_official/index.d.mts +0 -2
- package/dist/_official/index.mjs +0 -3
- package/dist/_runtime/index.d.mts +0 -6
- package/dist/_runtime/index.mjs +0 -3
- package/dist/actions.d.mts +0 -244
- package/dist/actions.mjs +0 -129
- package/dist/annotations.d.mts +0 -185
- package/dist/annotations.mjs +0 -141
- package/dist/capture.d.mts +0 -177
- package/dist/capture.mjs +0 -241
- package/dist/client.d.mts +0 -50
- package/dist/cohorts.d.mts +0 -229
- package/dist/cohorts.mjs +0 -185
- package/dist/connection.d.mts +0 -2
- package/dist/connection.mjs +0 -3
- package/dist/dashboards.d.mts +0 -434
- package/dist/dashboards.mjs +0 -356
- package/dist/decide.d.mts +0 -74
- package/dist/decide.mjs +0 -75
- package/dist/errors.d.mts +0 -58
- package/dist/errors.mjs +0 -120
- package/dist/events-management.d.mts +0 -294
- package/dist/events-management.mjs +0 -242
- package/dist/factory-C3ssyfSy.mjs +0 -7
- package/dist/feature-flags.d.mts +0 -416
- package/dist/feature-flags.mjs +0 -317
- package/dist/http-BYcjqxPi.mjs +0 -84
- package/dist/insights.d.mts +0 -409
- package/dist/insights.mjs +0 -346
- package/dist/integration-BN7xcpga.d.mts +0 -63
- package/dist/integration-D0HdrI0T.mjs +0 -120
- package/dist/organizations.d.mts +0 -257
- package/dist/organizations.mjs +0 -219
- package/dist/persons.d.mts +0 -369
- package/dist/persons.mjs +0 -345
- package/dist/projects.d.mts +0 -348
- package/dist/projects.mjs +0 -287
- package/dist/session-recordings.d.mts +0 -391
- package/dist/session-recordings.mjs +0 -308
- package/dist/surveys.d.mts +0 -287
- package/dist/surveys.mjs +0 -208
- package/dist/webhook-management.d.mts +0 -188
- package/dist/webhook-management.mjs +0 -152
package/dist/organizations.d.mts
DELETED
|
@@ -1,257 +0,0 @@
|
|
|
1
|
-
import * as _keystrokehq_core0 from "@keystrokehq/core";
|
|
2
|
-
import { z } from "zod";
|
|
3
|
-
import * as _keystrokehq_core_credential_set0 from "@keystrokehq/core/credential-set";
|
|
4
|
-
|
|
5
|
-
//#region src/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 };
|
package/dist/organizations.mjs
DELETED
|
@@ -1,219 +0,0 @@
|
|
|
1
|
-
import { createPosthogManagementClient } from "./client.mjs";
|
|
2
|
-
import { organizationSchema, paginatedResponseSchema, projectMemberSchema } from "./schemas.mjs";
|
|
3
|
-
import { t as posthogOperation } from "./factory-C3ssyfSy.mjs";
|
|
4
|
-
import { z } from "zod";
|
|
5
|
-
|
|
6
|
-
//#region src/organizations.ts
|
|
7
|
-
/**
|
|
8
|
-
* posthog/organizations.ts
|
|
9
|
-
*
|
|
10
|
-
* Organization + org members + org invites.
|
|
11
|
-
*
|
|
12
|
-
* Docs: https://posthog.com/docs/api/organizations
|
|
13
|
-
*/
|
|
14
|
-
const orgInput = { organizationId: z.string().min(1) };
|
|
15
|
-
const listOrganizations = posthogOperation({
|
|
16
|
-
id: "posthog.organizations-list",
|
|
17
|
-
name: "PostHog List Organizations",
|
|
18
|
-
description: "List organizations the personal API key can access",
|
|
19
|
-
input: z.object({
|
|
20
|
-
limit: z.number().int().min(1).max(200).optional(),
|
|
21
|
-
offset: z.number().int().min(0).optional()
|
|
22
|
-
}),
|
|
23
|
-
output: paginatedResponseSchema(organizationSchema),
|
|
24
|
-
run: async (input, credentials) => {
|
|
25
|
-
return createPosthogManagementClient(credentials).request({
|
|
26
|
-
method: "GET",
|
|
27
|
-
path: "/api/organizations/",
|
|
28
|
-
query: {
|
|
29
|
-
limit: input.limit,
|
|
30
|
-
offset: input.offset
|
|
31
|
-
}
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
});
|
|
35
|
-
const getOrganization = posthogOperation({
|
|
36
|
-
id: "posthog.organizations-get",
|
|
37
|
-
name: "PostHog Get Organization",
|
|
38
|
-
description: "Retrieve an organization by id",
|
|
39
|
-
input: z.object(orgInput),
|
|
40
|
-
output: organizationSchema,
|
|
41
|
-
run: async (input, credentials) => {
|
|
42
|
-
return createPosthogManagementClient(credentials).request({
|
|
43
|
-
method: "GET",
|
|
44
|
-
path: `/api/organizations/${input.organizationId}/`
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
});
|
|
48
|
-
const createOrganization = posthogOperation({
|
|
49
|
-
id: "posthog.organizations-create",
|
|
50
|
-
name: "PostHog Create Organization",
|
|
51
|
-
description: "Create a new organization",
|
|
52
|
-
input: z.object({
|
|
53
|
-
name: z.string().min(1),
|
|
54
|
-
slug: z.string().optional()
|
|
55
|
-
}),
|
|
56
|
-
output: organizationSchema,
|
|
57
|
-
needsApproval: true,
|
|
58
|
-
run: async (input, credentials) => {
|
|
59
|
-
return createPosthogManagementClient(credentials).request({
|
|
60
|
-
method: "POST",
|
|
61
|
-
path: "/api/organizations/",
|
|
62
|
-
body: input
|
|
63
|
-
});
|
|
64
|
-
}
|
|
65
|
-
});
|
|
66
|
-
const updateOrganization = posthogOperation({
|
|
67
|
-
id: "posthog.organizations-update",
|
|
68
|
-
name: "PostHog Update Organization",
|
|
69
|
-
description: "Partial update to an organization",
|
|
70
|
-
input: z.object({
|
|
71
|
-
...orgInput,
|
|
72
|
-
name: z.string().optional(),
|
|
73
|
-
slug: z.string().optional()
|
|
74
|
-
}),
|
|
75
|
-
output: organizationSchema,
|
|
76
|
-
needsApproval: true,
|
|
77
|
-
run: async (input, credentials) => {
|
|
78
|
-
const client = createPosthogManagementClient(credentials);
|
|
79
|
-
const { organizationId, ...body } = input;
|
|
80
|
-
return client.request({
|
|
81
|
-
method: "PATCH",
|
|
82
|
-
path: `/api/organizations/${organizationId}/`,
|
|
83
|
-
body
|
|
84
|
-
});
|
|
85
|
-
}
|
|
86
|
-
});
|
|
87
|
-
const deleteOrganization = posthogOperation({
|
|
88
|
-
id: "posthog.organizations-delete",
|
|
89
|
-
name: "PostHog Delete Organization",
|
|
90
|
-
description: "Delete an organization",
|
|
91
|
-
input: z.object(orgInput),
|
|
92
|
-
output: z.object({ success: z.boolean() }),
|
|
93
|
-
needsApproval: true,
|
|
94
|
-
run: async (input, credentials) => {
|
|
95
|
-
await createPosthogManagementClient(credentials).request({
|
|
96
|
-
method: "DELETE",
|
|
97
|
-
path: `/api/organizations/${input.organizationId}/`
|
|
98
|
-
});
|
|
99
|
-
return { success: true };
|
|
100
|
-
}
|
|
101
|
-
});
|
|
102
|
-
const listOrganizationMembers = posthogOperation({
|
|
103
|
-
id: "posthog.organization-members-list",
|
|
104
|
-
name: "PostHog List Organization Members",
|
|
105
|
-
description: "List members of an organization",
|
|
106
|
-
input: z.object({
|
|
107
|
-
...orgInput,
|
|
108
|
-
limit: z.number().int().min(1).max(200).optional(),
|
|
109
|
-
offset: z.number().int().min(0).optional()
|
|
110
|
-
}),
|
|
111
|
-
output: paginatedResponseSchema(projectMemberSchema),
|
|
112
|
-
run: async (input, credentials) => {
|
|
113
|
-
return createPosthogManagementClient(credentials).request({
|
|
114
|
-
method: "GET",
|
|
115
|
-
path: `/api/organizations/${input.organizationId}/members/`,
|
|
116
|
-
query: {
|
|
117
|
-
limit: input.limit,
|
|
118
|
-
offset: input.offset
|
|
119
|
-
}
|
|
120
|
-
});
|
|
121
|
-
}
|
|
122
|
-
});
|
|
123
|
-
const updateOrganizationMember = posthogOperation({
|
|
124
|
-
id: "posthog.organization-members-update",
|
|
125
|
-
name: "PostHog Update Organization Member",
|
|
126
|
-
description: "Update an organization member's role",
|
|
127
|
-
input: z.object({
|
|
128
|
-
...orgInput,
|
|
129
|
-
userUuid: z.string().min(1),
|
|
130
|
-
level: z.number().int()
|
|
131
|
-
}),
|
|
132
|
-
output: projectMemberSchema,
|
|
133
|
-
needsApproval: true,
|
|
134
|
-
run: async (input, credentials) => {
|
|
135
|
-
return createPosthogManagementClient(credentials).request({
|
|
136
|
-
method: "PATCH",
|
|
137
|
-
path: `/api/organizations/${input.organizationId}/members/${input.userUuid}/`,
|
|
138
|
-
body: { level: input.level }
|
|
139
|
-
});
|
|
140
|
-
}
|
|
141
|
-
});
|
|
142
|
-
const removeOrganizationMember = posthogOperation({
|
|
143
|
-
id: "posthog.organization-members-remove",
|
|
144
|
-
name: "PostHog Remove Organization Member",
|
|
145
|
-
description: "Remove a user from an organization",
|
|
146
|
-
input: z.object({
|
|
147
|
-
...orgInput,
|
|
148
|
-
userUuid: z.string().min(1)
|
|
149
|
-
}),
|
|
150
|
-
output: z.object({ success: z.boolean() }),
|
|
151
|
-
needsApproval: true,
|
|
152
|
-
run: async (input, credentials) => {
|
|
153
|
-
await createPosthogManagementClient(credentials).request({
|
|
154
|
-
method: "DELETE",
|
|
155
|
-
path: `/api/organizations/${input.organizationId}/members/${input.userUuid}/`
|
|
156
|
-
});
|
|
157
|
-
return { success: true };
|
|
158
|
-
}
|
|
159
|
-
});
|
|
160
|
-
const listOrganizationInvites = posthogOperation({
|
|
161
|
-
id: "posthog.organization-invites-list",
|
|
162
|
-
name: "PostHog List Organization Invites",
|
|
163
|
-
description: "List outstanding invites for an organization",
|
|
164
|
-
input: z.object({
|
|
165
|
-
...orgInput,
|
|
166
|
-
limit: z.number().int().min(1).max(200).optional()
|
|
167
|
-
}),
|
|
168
|
-
output: paginatedResponseSchema(z.record(z.string(), z.unknown())),
|
|
169
|
-
run: async (input, credentials) => {
|
|
170
|
-
return createPosthogManagementClient(credentials).request({
|
|
171
|
-
method: "GET",
|
|
172
|
-
path: `/api/organizations/${input.organizationId}/invites/`,
|
|
173
|
-
query: { limit: input.limit }
|
|
174
|
-
});
|
|
175
|
-
}
|
|
176
|
-
});
|
|
177
|
-
const createOrganizationInvite = posthogOperation({
|
|
178
|
-
id: "posthog.organization-invites-create",
|
|
179
|
-
name: "PostHog Create Organization Invite",
|
|
180
|
-
description: "Invite a user to an organization",
|
|
181
|
-
input: z.object({
|
|
182
|
-
...orgInput,
|
|
183
|
-
target_email: z.email(),
|
|
184
|
-
level: z.number().int().optional(),
|
|
185
|
-
first_name: z.string().optional()
|
|
186
|
-
}),
|
|
187
|
-
output: z.record(z.string(), z.unknown()),
|
|
188
|
-
needsApproval: true,
|
|
189
|
-
run: async (input, credentials) => {
|
|
190
|
-
const client = createPosthogManagementClient(credentials);
|
|
191
|
-
const { organizationId, ...body } = input;
|
|
192
|
-
return client.request({
|
|
193
|
-
method: "POST",
|
|
194
|
-
path: `/api/organizations/${organizationId}/invites/`,
|
|
195
|
-
body
|
|
196
|
-
});
|
|
197
|
-
}
|
|
198
|
-
});
|
|
199
|
-
const deleteOrganizationInvite = posthogOperation({
|
|
200
|
-
id: "posthog.organization-invites-delete",
|
|
201
|
-
name: "PostHog Delete Organization Invite",
|
|
202
|
-
description: "Revoke an organization invite",
|
|
203
|
-
input: z.object({
|
|
204
|
-
...orgInput,
|
|
205
|
-
inviteId: z.string().min(1)
|
|
206
|
-
}),
|
|
207
|
-
output: z.object({ success: z.boolean() }),
|
|
208
|
-
needsApproval: true,
|
|
209
|
-
run: async (input, credentials) => {
|
|
210
|
-
await createPosthogManagementClient(credentials).request({
|
|
211
|
-
method: "DELETE",
|
|
212
|
-
path: `/api/organizations/${input.organizationId}/invites/${input.inviteId}/`
|
|
213
|
-
});
|
|
214
|
-
return { success: true };
|
|
215
|
-
}
|
|
216
|
-
});
|
|
217
|
-
|
|
218
|
-
//#endregion
|
|
219
|
-
export { createOrganization, createOrganizationInvite, deleteOrganization, deleteOrganizationInvite, getOrganization, listOrganizationInvites, listOrganizationMembers, listOrganizations, removeOrganizationMember, updateOrganization, updateOrganizationMember };
|