@keystrokehq/segment 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.
Files changed (80) hide show
  1. package/README.md +52 -173
  2. package/dist/{client.mjs → client-DQfeZzLR.mjs} +28 -3
  3. package/dist/credential-sets/index.d.mts +2 -0
  4. package/dist/credential-sets/index.mjs +3 -0
  5. package/dist/index.d.mts +4 -1
  6. package/dist/index.mjs +5 -1
  7. package/dist/operations/index.d.mts +2 -0
  8. package/dist/operations/index.mjs +3 -0
  9. package/dist/schemas/index.mjs +1 -1
  10. package/dist/segment.credential-set-BTTrkHO7.mjs +33 -0
  11. package/dist/{integration-CeShwMIi.d.mts → segment.credential-set-BgROtI_9.d.mts} +28 -37
  12. package/dist/{triggers.d.mts → triggers/index.d.mts} +72 -6
  13. package/dist/{triggers.mjs → triggers/index.mjs} +136 -7
  14. package/dist/workspace-list-spaces.operation-DKWX3vl5.mjs +5200 -0
  15. package/dist/workspace-list-spaces.operation-QbDIgfRG.d.mts +6548 -0
  16. package/package.json +11 -123
  17. package/dist/_official/index.d.mts +0 -2
  18. package/dist/_official/index.mjs +0 -3
  19. package/dist/_runtime/index.d.mts +0 -1
  20. package/dist/_runtime/index.mjs +0 -1
  21. package/dist/audiences.d.mts +0 -282
  22. package/dist/audiences.mjs +0 -205
  23. package/dist/client.d.mts +0 -90
  24. package/dist/computed-traits.d.mts +0 -215
  25. package/dist/computed-traits.mjs +0 -149
  26. package/dist/connection.d.mts +0 -2
  27. package/dist/connection.mjs +0 -3
  28. package/dist/crud-DV9e4Spi.mjs +0 -140
  29. package/dist/deletion-suppression.d.mts +0 -191
  30. package/dist/deletion-suppression.mjs +0 -103
  31. package/dist/delivery-overview.d.mts +0 -79
  32. package/dist/delivery-overview.mjs +0 -54
  33. package/dist/destination-filters.d.mts +0 -190
  34. package/dist/destination-filters.mjs +0 -115
  35. package/dist/destinations.d.mts +0 -473
  36. package/dist/destinations.mjs +0 -257
  37. package/dist/edge-functions.d.mts +0 -168
  38. package/dist/edge-functions.mjs +0 -72
  39. package/dist/errors-4FGnrowW.mjs +0 -27
  40. package/dist/events-catalog.d.mts +0 -111
  41. package/dist/events-catalog.mjs +0 -65
  42. package/dist/events.d.mts +0 -167
  43. package/dist/events.mjs +0 -134
  44. package/dist/factory-DRwj5eiU.mjs +0 -7
  45. package/dist/functions.d.mts +0 -347
  46. package/dist/functions.mjs +0 -180
  47. package/dist/iam-groups.d.mts +0 -284
  48. package/dist/iam-groups.mjs +0 -144
  49. package/dist/iam-users.d.mts +0 -205
  50. package/dist/iam-users.mjs +0 -91
  51. package/dist/integration-B9FOjHPc.mjs +0 -115
  52. package/dist/labels.d.mts +0 -100
  53. package/dist/labels.mjs +0 -58
  54. package/dist/monitoring.d.mts +0 -182
  55. package/dist/monitoring.mjs +0 -88
  56. package/dist/profiles-sync.d.mts +0 -127
  57. package/dist/profiles-sync.mjs +0 -89
  58. package/dist/profiles.d.mts +0 -197
  59. package/dist/profiles.mjs +0 -137
  60. package/dist/reverse-etl.d.mts +0 -448
  61. package/dist/reverse-etl.mjs +0 -228
  62. package/dist/roles.d.mts +0 -48
  63. package/dist/roles.mjs +0 -25
  64. package/dist/sources.d.mts +0 -560
  65. package/dist/sources.mjs +0 -259
  66. package/dist/tracking-plans.d.mts +0 -351
  67. package/dist/tracking-plans.mjs +0 -160
  68. package/dist/tracking.d.mts +0 -499
  69. package/dist/tracking.mjs +0 -255
  70. package/dist/transformations.d.mts +0 -188
  71. package/dist/transformations.mjs +0 -83
  72. package/dist/usage.d.mts +0 -70
  73. package/dist/usage.mjs +0 -55
  74. package/dist/verification.d.mts +0 -17
  75. package/dist/verification.mjs +0 -51
  76. package/dist/warehouses.d.mts +0 -341
  77. package/dist/warehouses.mjs +0 -176
  78. package/dist/workspaces.d.mts +0 -95
  79. package/dist/workspaces.mjs +0 -67
  80. /package/dist/{common-CdGiJbjq.mjs → common-DUU0airJ.mjs} +0 -0
package/dist/sources.mjs DELETED
@@ -1,259 +0,0 @@
1
- import { t as SegmentApiError } from "./errors-4FGnrowW.mjs";
2
- import { createSegmentClient } from "./client.mjs";
3
- import { a as segmentLooseObjectSchema, n as segmentIdSchema, r as segmentLabelSchema } from "./common-CdGiJbjq.mjs";
4
- import { t as segmentOperation } from "./factory-DRwj5eiU.mjs";
5
- import { n as crudList, r as crudMutate, t as crudGet } from "./crud-DV9e4Spi.mjs";
6
- import { z } from "zod";
7
-
8
- //#region src/sources.ts
9
- /**
10
- * segment/sources.ts
11
- *
12
- * Public API source CRUD + write-key management + schema settings + label
13
- * attachment + connected warehouse/destination/tracking-plan views + filters.
14
- *
15
- * 16 actions total (PLAN.md § 6.2). The 5 canonical CRUD actions use the
16
- * package-internal `crud` helpers; the rest are written directly because
17
- * they have resource-shaped inputs/outputs that don't fit the generic CRUD
18
- * pattern.
19
- */
20
- const segmentSourceSchema = segmentLooseObjectSchema({
21
- id: segmentIdSchema,
22
- slug: z.string().optional(),
23
- name: z.string().optional(),
24
- enabled: z.boolean().optional(),
25
- workspaceId: z.string().optional(),
26
- writeKeys: z.array(z.string()).optional(),
27
- labels: z.array(segmentLabelSchema).optional(),
28
- metadata: z.record(z.string(), z.unknown()).optional()
29
- });
30
- const sourceCreateBody = {
31
- slug: z.string().min(1),
32
- name: z.string().min(1).optional(),
33
- enabled: z.boolean().optional(),
34
- metadata: z.record(z.string(), z.unknown()).optional()
35
- };
36
- const sourceUpdateBody = {
37
- name: z.string().optional(),
38
- enabled: z.boolean().optional(),
39
- slug: z.string().optional(),
40
- metadata: z.record(z.string(), z.unknown()).optional()
41
- };
42
- const listSources = crudList({
43
- id: "segment.sources.list",
44
- name: "List sources",
45
- description: "Paginated list of Segment sources in the workspace.",
46
- path: "/sources",
47
- itemsKey: "sources",
48
- item: segmentSourceSchema
49
- });
50
- const getSource = crudGet({
51
- id: "segment.sources.get",
52
- name: "Get source",
53
- description: "Fetch a Segment source by id.",
54
- path: "/sources/{id}",
55
- output: segmentSourceSchema,
56
- unwrapKey: "source"
57
- });
58
- const createSource = crudMutate({
59
- id: "segment.sources.create",
60
- name: "Create source",
61
- description: "Create a new Segment source.",
62
- method: "POST",
63
- path: "/sources",
64
- bodyShape: sourceCreateBody,
65
- output: segmentSourceSchema,
66
- unwrapKey: "source"
67
- });
68
- const updateSource = crudMutate({
69
- id: "segment.sources.update",
70
- name: "Update source",
71
- description: "Patch a Segment source.",
72
- method: "PATCH",
73
- path: "/sources/{id}",
74
- bodyShape: sourceUpdateBody,
75
- output: segmentSourceSchema,
76
- unwrapKey: "source"
77
- });
78
- const deleteSource = crudMutate({
79
- id: "segment.sources.delete",
80
- name: "Delete source",
81
- description: "Delete a Segment source. Irreversible — archive data first.",
82
- method: "DELETE",
83
- path: "/sources/{id}",
84
- output: z.object({ deleted: z.literal(true) }).or(segmentLooseObjectSchema({}))
85
- });
86
- const writeKeyEntrySchema = segmentLooseObjectSchema({
87
- id: z.string().optional(),
88
- value: z.string().optional(),
89
- writeKey: z.string().optional(),
90
- createdAt: z.string().optional(),
91
- lastUsedAt: z.string().optional()
92
- });
93
- const listWriteKeys = segmentOperation({
94
- id: "segment.sources.listWriteKeys",
95
- name: "List write keys",
96
- description: "List every write key registered on a source.",
97
- input: z.object({ id: segmentIdSchema }),
98
- output: z.object({ items: z.array(writeKeyEntrySchema) }),
99
- run: async (input, credentials) => {
100
- const rec = await createSegmentClient(credentials).publicApi.request(`/sources/${encodeURIComponent(input.id)}/write-keys`);
101
- return { items: (rec.data?.writeKeys ?? rec.writeKeys ?? []).map((entry) => writeKeyEntrySchema.parse(entry)) };
102
- }
103
- });
104
- const rotateWriteKey = segmentOperation({
105
- id: "segment.sources.rotateWriteKey",
106
- name: "Rotate write key",
107
- description: "Create a new write key for the source. The old key continues to work until explicitly removed.",
108
- input: z.object({ id: segmentIdSchema }),
109
- output: writeKeyEntrySchema,
110
- needsApproval: true,
111
- run: async (input, credentials) => {
112
- const body = await createSegmentClient(credentials).publicApi.request(`/sources/${encodeURIComponent(input.id)}/write-keys`, { method: "POST" });
113
- const rec = body;
114
- return writeKeyEntrySchema.parse(rec.data?.writeKey ?? rec.writeKey ?? body);
115
- }
116
- });
117
- const removeWriteKey = segmentOperation({
118
- id: "segment.sources.removeWriteKey",
119
- name: "Remove write key",
120
- description: "Delete a write key from a source. Refuses to delete the last remaining key unless `force: true` is passed.",
121
- input: z.object({
122
- id: segmentIdSchema,
123
- writeKey: z.string().min(1),
124
- force: z.boolean().optional()
125
- }),
126
- output: z.object({ removed: z.literal(true) }),
127
- needsApproval: true,
128
- run: async (input, credentials) => {
129
- const client = createSegmentClient(credentials);
130
- if (!input.force) {
131
- const rec = await client.publicApi.request(`/sources/${encodeURIComponent(input.id)}/write-keys`);
132
- if ((rec.data?.writeKeys ?? rec.writeKeys ?? []).length <= 1) throw new SegmentApiError({
133
- kind: "validation",
134
- message: `Refusing to delete the last remaining write key on source ${input.id}. Pass { force: true } to override.`
135
- });
136
- }
137
- await client.publicApi.request(`/sources/${encodeURIComponent(input.id)}/write-keys/${encodeURIComponent(input.writeKey)}`, { method: "DELETE" });
138
- return { removed: true };
139
- }
140
- });
141
- const schemaSettingsSchema = segmentLooseObjectSchema({
142
- forwardingBlockedEventsTo: z.string().optional(),
143
- forwardingViolationsTo: z.string().optional(),
144
- commonEventOnViolations: z.string().optional(),
145
- identifyEnabled: z.boolean().optional(),
146
- trackEnabled: z.boolean().optional(),
147
- groupEnabled: z.boolean().optional()
148
- });
149
- const listSchemaSettings = segmentOperation({
150
- id: "segment.sources.listSchemaSettings",
151
- name: "List schema settings",
152
- description: "Read tracking schema enforcement settings for a source.",
153
- input: z.object({ id: segmentIdSchema }),
154
- output: schemaSettingsSchema,
155
- run: async (input, credentials) => {
156
- const body = await createSegmentClient(credentials).publicApi.request(`/sources/${encodeURIComponent(input.id)}/schema-settings`);
157
- const rec = body;
158
- return schemaSettingsSchema.parse(rec.data ?? body);
159
- }
160
- });
161
- const updateSchemaSettings = segmentOperation({
162
- id: "segment.sources.updateSchemaSettings",
163
- name: "Update schema settings",
164
- description: "Patch tracking schema enforcement settings for a source.",
165
- input: z.object({
166
- id: segmentIdSchema,
167
- forwardingBlockedEventsTo: z.string().optional(),
168
- forwardingViolationsTo: z.string().optional(),
169
- commonEventOnViolations: z.string().optional(),
170
- identifyEnabled: z.boolean().optional(),
171
- trackEnabled: z.boolean().optional(),
172
- groupEnabled: z.boolean().optional()
173
- }),
174
- output: schemaSettingsSchema,
175
- needsApproval: true,
176
- run: async (input, credentials) => {
177
- const client = createSegmentClient(credentials);
178
- const { id, ...body } = input;
179
- const response = await client.publicApi.request(`/sources/${encodeURIComponent(id)}/schema-settings`, {
180
- method: "PATCH",
181
- body
182
- });
183
- const rec = response;
184
- return schemaSettingsSchema.parse(rec.data ?? response);
185
- }
186
- });
187
- const labelInputSchema = z.object({
188
- id: segmentIdSchema,
189
- labels: z.array(segmentLabelSchema).min(1)
190
- });
191
- const addLabels = segmentOperation({
192
- id: "segment.sources.addLabels",
193
- name: "Add labels to source",
194
- description: "Attach one or more labels to a source.",
195
- input: labelInputSchema,
196
- output: z.object({ labels: z.array(segmentLabelSchema) }),
197
- needsApproval: true,
198
- run: async (input, credentials) => {
199
- return { labels: ((await createSegmentClient(credentials).publicApi.request(`/sources/${encodeURIComponent(input.id)}/labels`, {
200
- method: "POST",
201
- body: { labels: input.labels }
202
- })).data?.labels ?? input.labels).map((l) => segmentLabelSchema.parse(l)) };
203
- }
204
- });
205
- const removeLabels = segmentOperation({
206
- id: "segment.sources.removeLabels",
207
- name: "Remove labels from source",
208
- description: "Detach one or more labels from a source.",
209
- input: labelInputSchema,
210
- output: z.object({ removed: z.literal(true) }),
211
- needsApproval: true,
212
- run: async (input, credentials) => {
213
- await createSegmentClient(credentials).publicApi.request(`/sources/${encodeURIComponent(input.id)}/labels`, {
214
- method: "DELETE",
215
- body: { labels: input.labels }
216
- });
217
- return { removed: true };
218
- }
219
- });
220
- const connectedWarehouseSchema = segmentLooseObjectSchema({
221
- id: segmentIdSchema,
222
- name: z.string().optional(),
223
- enabled: z.boolean().optional()
224
- });
225
- const connectedDestinationSchema = segmentLooseObjectSchema({
226
- id: segmentIdSchema,
227
- name: z.string().optional(),
228
- enabled: z.boolean().optional()
229
- });
230
- const connectedTrackingPlanSchema = segmentLooseObjectSchema({
231
- id: segmentIdSchema,
232
- name: z.string().optional()
233
- });
234
- const destinationFilterSchema = segmentLooseObjectSchema({
235
- id: segmentIdSchema,
236
- if: z.string().optional(),
237
- actions: z.array(z.record(z.string(), z.unknown())).optional(),
238
- enabled: z.boolean().optional()
239
- });
240
- function listRelatedOp(actionId, name, description, pathSuffix, itemsKey, item) {
241
- return segmentOperation({
242
- id: actionId,
243
- name,
244
- description,
245
- input: z.object({ id: segmentIdSchema }),
246
- output: z.object({ items: z.array(item) }),
247
- run: async (input, credentials) => {
248
- const rec = await createSegmentClient(credentials).publicApi.request(`/sources/${encodeURIComponent(input.id)}${pathSuffix}`);
249
- return { items: (rec.data?.[itemsKey] ?? rec[itemsKey] ?? []).map((entry) => item.parse(entry)) };
250
- }
251
- });
252
- }
253
- const listConnectedWarehouses = listRelatedOp("segment.sources.listConnectedWarehouses", "List warehouses connected to source", "Warehouses currently syncing from this source.", "/connected-warehouses", "warehouses", connectedWarehouseSchema);
254
- const listConnectedDestinations = listRelatedOp("segment.sources.listConnectedDestinations", "List destinations connected to source", "Destinations currently receiving data from this source.", "/connected-destinations", "destinations", connectedDestinationSchema);
255
- const listConnectedTrackingPlans = listRelatedOp("segment.sources.listConnectedTrackingPlans", "List tracking plans connected to source", "Tracking plans enforced against this source.", "/tracking-plan-connections", "trackingPlans", connectedTrackingPlanSchema);
256
- const listFilters = listRelatedOp("segment.sources.listFilters", "List destination filters on source", "Destination filter rules attached to this source.", "/destination-filters", "filters", destinationFilterSchema);
257
-
258
- //#endregion
259
- export { addLabels, createSource, deleteSource, getSource, listConnectedDestinations, listConnectedTrackingPlans, listConnectedWarehouses, listFilters, listSchemaSettings, listSources, listWriteKeys, removeLabels, removeWriteKey, rotateWriteKey, segmentSourceSchema, updateSchemaSettings, updateSource };
@@ -1,351 +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/tracking-plans.d.ts
6
- declare const listTrackingPlans: _keystrokehq_core0.Operation<z.ZodIntersection<z.ZodObject<{
7
- pageSize: z.ZodOptional<z.ZodNumber>;
8
- pageToken: z.ZodOptional<z.ZodString>;
9
- }, z.core.$strip>, z.ZodObject<{}, z.core.$strip>>, z.ZodObject<{
10
- items: z.ZodArray<z.ZodObject<{
11
- id: z.ZodString;
12
- slug: z.ZodOptional<z.ZodString>;
13
- name: z.ZodOptional<z.ZodString>;
14
- description: z.ZodOptional<z.ZodString>;
15
- type: z.ZodOptional<z.ZodString>;
16
- }, z.core.$catchall<z.ZodUnknown>>>;
17
- nextPageToken: z.ZodOptional<z.ZodString>;
18
- totalEntries: z.ZodOptional<z.ZodNumber>;
19
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"segment", z.ZodObject<{
20
- SEGMENT_PUBLIC_API_TOKEN: z.ZodString;
21
- SEGMENT_REGION: z.ZodDefault<z.ZodEnum<{
22
- us: "us";
23
- eu: "eu";
24
- }>>;
25
- SEGMENT_DEFAULT_WRITE_KEY: z.ZodOptional<z.ZodString>;
26
- SEGMENT_WRITE_KEYS_JSON: z.ZodOptional<z.ZodString>;
27
- SEGMENT_PROFILE_API_TOKEN: z.ZodOptional<z.ZodString>;
28
- SEGMENT_PROFILE_SPACE_ID: z.ZodOptional<z.ZodString>;
29
- SEGMENT_WEBHOOK_SHARED_SECRET: z.ZodOptional<z.ZodString>;
30
- }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
31
- SEGMENT_PUBLIC_API_TOKEN: z.ZodString;
32
- SEGMENT_REGION: z.ZodDefault<z.ZodEnum<{
33
- us: "us";
34
- eu: "eu";
35
- }>>;
36
- SEGMENT_DEFAULT_WRITE_KEY: z.ZodOptional<z.ZodString>;
37
- SEGMENT_WRITE_KEYS_JSON: z.ZodOptional<z.ZodString>;
38
- SEGMENT_PROFILE_API_TOKEN: z.ZodOptional<z.ZodString>;
39
- SEGMENT_PROFILE_SPACE_ID: z.ZodOptional<z.ZodString>;
40
- SEGMENT_WEBHOOK_SHARED_SECRET: z.ZodOptional<z.ZodString>;
41
- }, z.core.$strip>>[] | undefined>], undefined>;
42
- declare const getTrackingPlan: _keystrokehq_core0.Operation<z.ZodObject<{
43
- [x: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
44
- }, z.core.$strip>, z.ZodObject<{
45
- id: z.ZodString;
46
- slug: z.ZodOptional<z.ZodString>;
47
- name: z.ZodOptional<z.ZodString>;
48
- description: z.ZodOptional<z.ZodString>;
49
- type: z.ZodOptional<z.ZodString>;
50
- }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"segment", z.ZodObject<{
51
- SEGMENT_PUBLIC_API_TOKEN: z.ZodString;
52
- SEGMENT_REGION: z.ZodDefault<z.ZodEnum<{
53
- us: "us";
54
- eu: "eu";
55
- }>>;
56
- SEGMENT_DEFAULT_WRITE_KEY: z.ZodOptional<z.ZodString>;
57
- SEGMENT_WRITE_KEYS_JSON: z.ZodOptional<z.ZodString>;
58
- SEGMENT_PROFILE_API_TOKEN: z.ZodOptional<z.ZodString>;
59
- SEGMENT_PROFILE_SPACE_ID: z.ZodOptional<z.ZodString>;
60
- SEGMENT_WEBHOOK_SHARED_SECRET: z.ZodOptional<z.ZodString>;
61
- }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
62
- SEGMENT_PUBLIC_API_TOKEN: z.ZodString;
63
- SEGMENT_REGION: z.ZodDefault<z.ZodEnum<{
64
- us: "us";
65
- eu: "eu";
66
- }>>;
67
- SEGMENT_DEFAULT_WRITE_KEY: z.ZodOptional<z.ZodString>;
68
- SEGMENT_WRITE_KEYS_JSON: z.ZodOptional<z.ZodString>;
69
- SEGMENT_PROFILE_API_TOKEN: z.ZodOptional<z.ZodString>;
70
- SEGMENT_PROFILE_SPACE_ID: z.ZodOptional<z.ZodString>;
71
- SEGMENT_WEBHOOK_SHARED_SECRET: z.ZodOptional<z.ZodString>;
72
- }, z.core.$strip>>[] | undefined>], undefined>;
73
- declare const createTrackingPlan: _keystrokehq_core0.Operation<z.ZodObject<{
74
- [x: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
75
- }, z.core.$strip>, z.ZodObject<{
76
- id: z.ZodString;
77
- slug: z.ZodOptional<z.ZodString>;
78
- name: z.ZodOptional<z.ZodString>;
79
- description: z.ZodOptional<z.ZodString>;
80
- type: z.ZodOptional<z.ZodString>;
81
- }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"segment", z.ZodObject<{
82
- SEGMENT_PUBLIC_API_TOKEN: z.ZodString;
83
- SEGMENT_REGION: z.ZodDefault<z.ZodEnum<{
84
- us: "us";
85
- eu: "eu";
86
- }>>;
87
- SEGMENT_DEFAULT_WRITE_KEY: z.ZodOptional<z.ZodString>;
88
- SEGMENT_WRITE_KEYS_JSON: z.ZodOptional<z.ZodString>;
89
- SEGMENT_PROFILE_API_TOKEN: z.ZodOptional<z.ZodString>;
90
- SEGMENT_PROFILE_SPACE_ID: z.ZodOptional<z.ZodString>;
91
- SEGMENT_WEBHOOK_SHARED_SECRET: z.ZodOptional<z.ZodString>;
92
- }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
93
- SEGMENT_PUBLIC_API_TOKEN: z.ZodString;
94
- SEGMENT_REGION: z.ZodDefault<z.ZodEnum<{
95
- us: "us";
96
- eu: "eu";
97
- }>>;
98
- SEGMENT_DEFAULT_WRITE_KEY: z.ZodOptional<z.ZodString>;
99
- SEGMENT_WRITE_KEYS_JSON: z.ZodOptional<z.ZodString>;
100
- SEGMENT_PROFILE_API_TOKEN: z.ZodOptional<z.ZodString>;
101
- SEGMENT_PROFILE_SPACE_ID: z.ZodOptional<z.ZodString>;
102
- SEGMENT_WEBHOOK_SHARED_SECRET: z.ZodOptional<z.ZodString>;
103
- }, z.core.$strip>>[] | undefined>], undefined>;
104
- declare const updateTrackingPlan: _keystrokehq_core0.Operation<z.ZodObject<{
105
- [x: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
106
- }, z.core.$strip>, z.ZodObject<{
107
- id: z.ZodString;
108
- slug: z.ZodOptional<z.ZodString>;
109
- name: z.ZodOptional<z.ZodString>;
110
- description: z.ZodOptional<z.ZodString>;
111
- type: z.ZodOptional<z.ZodString>;
112
- }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"segment", z.ZodObject<{
113
- SEGMENT_PUBLIC_API_TOKEN: z.ZodString;
114
- SEGMENT_REGION: z.ZodDefault<z.ZodEnum<{
115
- us: "us";
116
- eu: "eu";
117
- }>>;
118
- SEGMENT_DEFAULT_WRITE_KEY: z.ZodOptional<z.ZodString>;
119
- SEGMENT_WRITE_KEYS_JSON: z.ZodOptional<z.ZodString>;
120
- SEGMENT_PROFILE_API_TOKEN: z.ZodOptional<z.ZodString>;
121
- SEGMENT_PROFILE_SPACE_ID: z.ZodOptional<z.ZodString>;
122
- SEGMENT_WEBHOOK_SHARED_SECRET: z.ZodOptional<z.ZodString>;
123
- }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
124
- SEGMENT_PUBLIC_API_TOKEN: z.ZodString;
125
- SEGMENT_REGION: z.ZodDefault<z.ZodEnum<{
126
- us: "us";
127
- eu: "eu";
128
- }>>;
129
- SEGMENT_DEFAULT_WRITE_KEY: z.ZodOptional<z.ZodString>;
130
- SEGMENT_WRITE_KEYS_JSON: z.ZodOptional<z.ZodString>;
131
- SEGMENT_PROFILE_API_TOKEN: z.ZodOptional<z.ZodString>;
132
- SEGMENT_PROFILE_SPACE_ID: z.ZodOptional<z.ZodString>;
133
- SEGMENT_WEBHOOK_SHARED_SECRET: z.ZodOptional<z.ZodString>;
134
- }, z.core.$strip>>[] | undefined>], undefined>;
135
- declare const deleteTrackingPlan: _keystrokehq_core0.Operation<z.ZodObject<{
136
- [x: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
137
- }, z.core.$strip>, z.ZodObject<{}, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"segment", z.ZodObject<{
138
- SEGMENT_PUBLIC_API_TOKEN: z.ZodString;
139
- SEGMENT_REGION: z.ZodDefault<z.ZodEnum<{
140
- us: "us";
141
- eu: "eu";
142
- }>>;
143
- SEGMENT_DEFAULT_WRITE_KEY: z.ZodOptional<z.ZodString>;
144
- SEGMENT_WRITE_KEYS_JSON: z.ZodOptional<z.ZodString>;
145
- SEGMENT_PROFILE_API_TOKEN: z.ZodOptional<z.ZodString>;
146
- SEGMENT_PROFILE_SPACE_ID: z.ZodOptional<z.ZodString>;
147
- SEGMENT_WEBHOOK_SHARED_SECRET: z.ZodOptional<z.ZodString>;
148
- }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
149
- SEGMENT_PUBLIC_API_TOKEN: z.ZodString;
150
- SEGMENT_REGION: z.ZodDefault<z.ZodEnum<{
151
- us: "us";
152
- eu: "eu";
153
- }>>;
154
- SEGMENT_DEFAULT_WRITE_KEY: z.ZodOptional<z.ZodString>;
155
- SEGMENT_WRITE_KEYS_JSON: z.ZodOptional<z.ZodString>;
156
- SEGMENT_PROFILE_API_TOKEN: z.ZodOptional<z.ZodString>;
157
- SEGMENT_PROFILE_SPACE_ID: z.ZodOptional<z.ZodString>;
158
- SEGMENT_WEBHOOK_SHARED_SECRET: z.ZodOptional<z.ZodString>;
159
- }, z.core.$strip>>[] | undefined>], undefined>;
160
- declare const listTrackingPlanRules: _keystrokehq_core0.Operation<z.ZodObject<{
161
- id: z.ZodString;
162
- }, z.core.$strip>, z.ZodObject<{
163
- items: z.ZodArray<z.ZodObject<{
164
- key: z.ZodOptional<z.ZodString>;
165
- type: z.ZodOptional<z.ZodString>;
166
- version: z.ZodOptional<z.ZodNumber>;
167
- description: z.ZodOptional<z.ZodString>;
168
- }, z.core.$catchall<z.ZodUnknown>>>;
169
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"segment", z.ZodObject<{
170
- SEGMENT_PUBLIC_API_TOKEN: z.ZodString;
171
- SEGMENT_REGION: z.ZodDefault<z.ZodEnum<{
172
- us: "us";
173
- eu: "eu";
174
- }>>;
175
- SEGMENT_DEFAULT_WRITE_KEY: z.ZodOptional<z.ZodString>;
176
- SEGMENT_WRITE_KEYS_JSON: z.ZodOptional<z.ZodString>;
177
- SEGMENT_PROFILE_API_TOKEN: z.ZodOptional<z.ZodString>;
178
- SEGMENT_PROFILE_SPACE_ID: z.ZodOptional<z.ZodString>;
179
- SEGMENT_WEBHOOK_SHARED_SECRET: z.ZodOptional<z.ZodString>;
180
- }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
181
- SEGMENT_PUBLIC_API_TOKEN: z.ZodString;
182
- SEGMENT_REGION: z.ZodDefault<z.ZodEnum<{
183
- us: "us";
184
- eu: "eu";
185
- }>>;
186
- SEGMENT_DEFAULT_WRITE_KEY: z.ZodOptional<z.ZodString>;
187
- SEGMENT_WRITE_KEYS_JSON: z.ZodOptional<z.ZodString>;
188
- SEGMENT_PROFILE_API_TOKEN: z.ZodOptional<z.ZodString>;
189
- SEGMENT_PROFILE_SPACE_ID: z.ZodOptional<z.ZodString>;
190
- SEGMENT_WEBHOOK_SHARED_SECRET: z.ZodOptional<z.ZodString>;
191
- }, z.core.$strip>>[] | undefined>], undefined>;
192
- declare const replaceTrackingPlanRules: _keystrokehq_core0.Operation<z.ZodObject<{
193
- id: z.ZodString;
194
- rules: z.ZodArray<z.ZodObject<{
195
- key: z.ZodOptional<z.ZodString>;
196
- type: z.ZodOptional<z.ZodString>;
197
- version: z.ZodOptional<z.ZodNumber>;
198
- description: z.ZodOptional<z.ZodString>;
199
- }, z.core.$catchall<z.ZodUnknown>>>;
200
- }, z.core.$strip>, z.ZodObject<{
201
- items: z.ZodArray<z.ZodObject<{
202
- key: z.ZodOptional<z.ZodString>;
203
- type: z.ZodOptional<z.ZodString>;
204
- version: z.ZodOptional<z.ZodNumber>;
205
- description: z.ZodOptional<z.ZodString>;
206
- }, z.core.$catchall<z.ZodUnknown>>>;
207
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"segment", z.ZodObject<{
208
- SEGMENT_PUBLIC_API_TOKEN: z.ZodString;
209
- SEGMENT_REGION: z.ZodDefault<z.ZodEnum<{
210
- us: "us";
211
- eu: "eu";
212
- }>>;
213
- SEGMENT_DEFAULT_WRITE_KEY: z.ZodOptional<z.ZodString>;
214
- SEGMENT_WRITE_KEYS_JSON: z.ZodOptional<z.ZodString>;
215
- SEGMENT_PROFILE_API_TOKEN: z.ZodOptional<z.ZodString>;
216
- SEGMENT_PROFILE_SPACE_ID: z.ZodOptional<z.ZodString>;
217
- SEGMENT_WEBHOOK_SHARED_SECRET: z.ZodOptional<z.ZodString>;
218
- }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
219
- SEGMENT_PUBLIC_API_TOKEN: z.ZodString;
220
- SEGMENT_REGION: z.ZodDefault<z.ZodEnum<{
221
- us: "us";
222
- eu: "eu";
223
- }>>;
224
- SEGMENT_DEFAULT_WRITE_KEY: z.ZodOptional<z.ZodString>;
225
- SEGMENT_WRITE_KEYS_JSON: z.ZodOptional<z.ZodString>;
226
- SEGMENT_PROFILE_API_TOKEN: z.ZodOptional<z.ZodString>;
227
- SEGMENT_PROFILE_SPACE_ID: z.ZodOptional<z.ZodString>;
228
- SEGMENT_WEBHOOK_SHARED_SECRET: z.ZodOptional<z.ZodString>;
229
- }, z.core.$strip>>[] | undefined>], undefined>;
230
- declare const listTrackingPlanSources: _keystrokehq_core0.Operation<z.ZodObject<{
231
- id: z.ZodString;
232
- }, z.core.$strip>, z.ZodObject<{
233
- items: z.ZodArray<z.ZodObject<{
234
- sourceId: z.ZodString;
235
- trackingPlanId: z.ZodOptional<z.ZodString>;
236
- }, z.core.$catchall<z.ZodUnknown>>>;
237
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"segment", z.ZodObject<{
238
- SEGMENT_PUBLIC_API_TOKEN: z.ZodString;
239
- SEGMENT_REGION: z.ZodDefault<z.ZodEnum<{
240
- us: "us";
241
- eu: "eu";
242
- }>>;
243
- SEGMENT_DEFAULT_WRITE_KEY: z.ZodOptional<z.ZodString>;
244
- SEGMENT_WRITE_KEYS_JSON: z.ZodOptional<z.ZodString>;
245
- SEGMENT_PROFILE_API_TOKEN: z.ZodOptional<z.ZodString>;
246
- SEGMENT_PROFILE_SPACE_ID: z.ZodOptional<z.ZodString>;
247
- SEGMENT_WEBHOOK_SHARED_SECRET: z.ZodOptional<z.ZodString>;
248
- }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
249
- SEGMENT_PUBLIC_API_TOKEN: z.ZodString;
250
- SEGMENT_REGION: z.ZodDefault<z.ZodEnum<{
251
- us: "us";
252
- eu: "eu";
253
- }>>;
254
- SEGMENT_DEFAULT_WRITE_KEY: z.ZodOptional<z.ZodString>;
255
- SEGMENT_WRITE_KEYS_JSON: z.ZodOptional<z.ZodString>;
256
- SEGMENT_PROFILE_API_TOKEN: z.ZodOptional<z.ZodString>;
257
- SEGMENT_PROFILE_SPACE_ID: z.ZodOptional<z.ZodString>;
258
- SEGMENT_WEBHOOK_SHARED_SECRET: z.ZodOptional<z.ZodString>;
259
- }, z.core.$strip>>[] | undefined>], undefined>;
260
- declare const connectTrackingPlanSource: _keystrokehq_core0.Operation<z.ZodObject<{
261
- id: z.ZodString;
262
- sourceId: z.ZodString;
263
- }, z.core.$strip>, z.ZodObject<{
264
- sourceId: z.ZodString;
265
- trackingPlanId: z.ZodOptional<z.ZodString>;
266
- }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"segment", z.ZodObject<{
267
- SEGMENT_PUBLIC_API_TOKEN: z.ZodString;
268
- SEGMENT_REGION: z.ZodDefault<z.ZodEnum<{
269
- us: "us";
270
- eu: "eu";
271
- }>>;
272
- SEGMENT_DEFAULT_WRITE_KEY: z.ZodOptional<z.ZodString>;
273
- SEGMENT_WRITE_KEYS_JSON: z.ZodOptional<z.ZodString>;
274
- SEGMENT_PROFILE_API_TOKEN: z.ZodOptional<z.ZodString>;
275
- SEGMENT_PROFILE_SPACE_ID: z.ZodOptional<z.ZodString>;
276
- SEGMENT_WEBHOOK_SHARED_SECRET: z.ZodOptional<z.ZodString>;
277
- }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
278
- SEGMENT_PUBLIC_API_TOKEN: z.ZodString;
279
- SEGMENT_REGION: z.ZodDefault<z.ZodEnum<{
280
- us: "us";
281
- eu: "eu";
282
- }>>;
283
- SEGMENT_DEFAULT_WRITE_KEY: z.ZodOptional<z.ZodString>;
284
- SEGMENT_WRITE_KEYS_JSON: z.ZodOptional<z.ZodString>;
285
- SEGMENT_PROFILE_API_TOKEN: z.ZodOptional<z.ZodString>;
286
- SEGMENT_PROFILE_SPACE_ID: z.ZodOptional<z.ZodString>;
287
- SEGMENT_WEBHOOK_SHARED_SECRET: z.ZodOptional<z.ZodString>;
288
- }, z.core.$strip>>[] | undefined>], undefined>;
289
- declare const disconnectTrackingPlanSource: _keystrokehq_core0.Operation<z.ZodObject<{
290
- id: z.ZodString;
291
- sourceId: z.ZodString;
292
- }, z.core.$strip>, z.ZodObject<{
293
- removed: z.ZodLiteral<true>;
294
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"segment", z.ZodObject<{
295
- SEGMENT_PUBLIC_API_TOKEN: z.ZodString;
296
- SEGMENT_REGION: z.ZodDefault<z.ZodEnum<{
297
- us: "us";
298
- eu: "eu";
299
- }>>;
300
- SEGMENT_DEFAULT_WRITE_KEY: z.ZodOptional<z.ZodString>;
301
- SEGMENT_WRITE_KEYS_JSON: z.ZodOptional<z.ZodString>;
302
- SEGMENT_PROFILE_API_TOKEN: z.ZodOptional<z.ZodString>;
303
- SEGMENT_PROFILE_SPACE_ID: z.ZodOptional<z.ZodString>;
304
- SEGMENT_WEBHOOK_SHARED_SECRET: z.ZodOptional<z.ZodString>;
305
- }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
306
- SEGMENT_PUBLIC_API_TOKEN: z.ZodString;
307
- SEGMENT_REGION: z.ZodDefault<z.ZodEnum<{
308
- us: "us";
309
- eu: "eu";
310
- }>>;
311
- SEGMENT_DEFAULT_WRITE_KEY: z.ZodOptional<z.ZodString>;
312
- SEGMENT_WRITE_KEYS_JSON: z.ZodOptional<z.ZodString>;
313
- SEGMENT_PROFILE_API_TOKEN: z.ZodOptional<z.ZodString>;
314
- SEGMENT_PROFILE_SPACE_ID: z.ZodOptional<z.ZodString>;
315
- SEGMENT_WEBHOOK_SHARED_SECRET: z.ZodOptional<z.ZodString>;
316
- }, z.core.$strip>>[] | undefined>], undefined>;
317
- declare const listTrackingPlanViolations: _keystrokehq_core0.Operation<z.ZodObject<{
318
- id: z.ZodString;
319
- }, z.core.$strip>, z.ZodObject<{
320
- items: z.ZodArray<z.ZodObject<{
321
- id: z.ZodString;
322
- eventType: z.ZodOptional<z.ZodString>;
323
- messageId: z.ZodOptional<z.ZodString>;
324
- violationReason: z.ZodOptional<z.ZodString>;
325
- timestamp: z.ZodOptional<z.ZodString>;
326
- }, z.core.$catchall<z.ZodUnknown>>>;
327
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"segment", z.ZodObject<{
328
- SEGMENT_PUBLIC_API_TOKEN: z.ZodString;
329
- SEGMENT_REGION: z.ZodDefault<z.ZodEnum<{
330
- us: "us";
331
- eu: "eu";
332
- }>>;
333
- SEGMENT_DEFAULT_WRITE_KEY: z.ZodOptional<z.ZodString>;
334
- SEGMENT_WRITE_KEYS_JSON: z.ZodOptional<z.ZodString>;
335
- SEGMENT_PROFILE_API_TOKEN: z.ZodOptional<z.ZodString>;
336
- SEGMENT_PROFILE_SPACE_ID: z.ZodOptional<z.ZodString>;
337
- SEGMENT_WEBHOOK_SHARED_SECRET: z.ZodOptional<z.ZodString>;
338
- }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
339
- SEGMENT_PUBLIC_API_TOKEN: z.ZodString;
340
- SEGMENT_REGION: z.ZodDefault<z.ZodEnum<{
341
- us: "us";
342
- eu: "eu";
343
- }>>;
344
- SEGMENT_DEFAULT_WRITE_KEY: z.ZodOptional<z.ZodString>;
345
- SEGMENT_WRITE_KEYS_JSON: z.ZodOptional<z.ZodString>;
346
- SEGMENT_PROFILE_API_TOKEN: z.ZodOptional<z.ZodString>;
347
- SEGMENT_PROFILE_SPACE_ID: z.ZodOptional<z.ZodString>;
348
- SEGMENT_WEBHOOK_SHARED_SECRET: z.ZodOptional<z.ZodString>;
349
- }, z.core.$strip>>[] | undefined>], undefined>;
350
- //#endregion
351
- export { connectTrackingPlanSource, createTrackingPlan, deleteTrackingPlan, disconnectTrackingPlanSource, getTrackingPlan, listTrackingPlanRules, listTrackingPlanSources, listTrackingPlanViolations, listTrackingPlans, replaceTrackingPlanRules, updateTrackingPlan };