@keystrokehq/segment 0.0.8 → 0.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. package/dist/_official/index.d.mts +1 -1
  2. package/dist/_official/index.mjs +1 -1
  3. package/dist/audiences.d.mts +9 -9
  4. package/dist/audiences.mjs +1 -1
  5. package/dist/client.d.mts +1 -1
  6. package/dist/computed-traits.d.mts +7 -7
  7. package/dist/computed-traits.mjs +1 -1
  8. package/dist/connection.d.mts +1 -1
  9. package/dist/connection.mjs +1 -1
  10. package/dist/{crud-SWa_79Hg.mjs → crud-DV9e4Spi.mjs} +1 -1
  11. package/dist/deletion-suppression.d.mts +6 -6
  12. package/dist/deletion-suppression.mjs +2 -2
  13. package/dist/delivery-overview.d.mts +3 -3
  14. package/dist/delivery-overview.mjs +1 -1
  15. package/dist/destination-filters.d.mts +6 -6
  16. package/dist/destination-filters.mjs +1 -1
  17. package/dist/destinations.d.mts +15 -15
  18. package/dist/destinations.mjs +2 -2
  19. package/dist/edge-functions.d.mts +6 -6
  20. package/dist/edge-functions.mjs +2 -2
  21. package/dist/events-catalog.d.mts +4 -4
  22. package/dist/events-catalog.mjs +1 -1
  23. package/dist/factory-DRwj5eiU.mjs +7 -0
  24. package/dist/functions.d.mts +16 -16
  25. package/dist/functions.mjs +2 -2
  26. package/dist/iam-groups.d.mts +10 -10
  27. package/dist/iam-groups.mjs +2 -2
  28. package/dist/iam-users.d.mts +7 -7
  29. package/dist/iam-users.mjs +2 -2
  30. package/dist/integration-B9FOjHPc.mjs +115 -0
  31. package/dist/{integration-DJ9tRlCV.d.mts → integration-CeShwMIi.d.mts} +3 -4
  32. package/dist/labels.d.mts +4 -4
  33. package/dist/labels.mjs +2 -2
  34. package/dist/monitoring.d.mts +6 -6
  35. package/dist/monitoring.mjs +1 -1
  36. package/dist/profiles-sync.d.mts +5 -5
  37. package/dist/profiles-sync.mjs +1 -1
  38. package/dist/profiles.d.mts +7 -7
  39. package/dist/profiles.mjs +1 -1
  40. package/dist/reverse-etl.d.mts +13 -13
  41. package/dist/reverse-etl.mjs +2 -2
  42. package/dist/roles.d.mts +2 -2
  43. package/dist/roles.mjs +1 -1
  44. package/dist/sources.d.mts +17 -17
  45. package/dist/sources.mjs +2 -2
  46. package/dist/tracking-plans.d.mts +12 -12
  47. package/dist/tracking-plans.mjs +2 -2
  48. package/dist/tracking.d.mts +9 -9
  49. package/dist/tracking.mjs +1 -1
  50. package/dist/transformations.d.mts +6 -6
  51. package/dist/transformations.mjs +1 -1
  52. package/dist/triggers.d.mts +3 -3
  53. package/dist/triggers.mjs +53 -3
  54. package/dist/usage.d.mts +3 -3
  55. package/dist/usage.mjs +1 -1
  56. package/dist/warehouses.d.mts +12 -12
  57. package/dist/warehouses.mjs +2 -2
  58. package/dist/workspaces.d.mts +4 -4
  59. package/dist/workspaces.mjs +1 -1
  60. package/package.json +4 -4
  61. package/dist/factory-CvfKfzMq.mjs +0 -8
  62. package/dist/integration-B5zYasBZ.mjs +0 -25
@@ -1,5 +1,5 @@
1
1
  import { a as segmentLooseObjectSchema, n as segmentIdSchema } from "./common-CdGiJbjq.mjs";
2
- import { n as crudList, r as crudMutate, t as crudGet } from "./crud-SWa_79Hg.mjs";
2
+ import { n as crudList, r as crudMutate, t as crudGet } from "./crud-DV9e4Spi.mjs";
3
3
  import { z } from "zod";
4
4
 
5
5
  //#region src/transformations.ts
@@ -1,7 +1,7 @@
1
- import { r as segment } from "./integration-DJ9tRlCV.mjs";
1
+ import { r as segment } from "./integration-CeShwMIi.mjs";
2
2
  import { SegmentAudienceSyncEvent, SegmentDeletionRegulationEvent, SegmentDestinationCreatedEvent, SegmentFunctionVersionEvent, SegmentReverseEtlRunEvent, SegmentSourceCreatedEvent, SegmentTrackingPlanViolationEvent } from "./events.mjs";
3
- import { IntegrationTriggerBindingOptions } from "@keystrokehq/integration-authoring";
4
- import { BoundTrigger } from "@keystrokehq/core";
3
+ import { BoundTrigger, Operation } from "@keystrokehq/core";
4
+ import { z } from "zod";
5
5
  import { PollingTriggerManifest } from "@keystrokehq/core/trigger";
6
6
 
7
7
  //#region src/triggers.d.ts
package/dist/triggers.mjs CHANGED
@@ -1,8 +1,58 @@
1
- import { t as segment } from "./integration-B5zYasBZ.mjs";
1
+ import { t as segment } from "./integration-B9FOjHPc.mjs";
2
2
  import { createSegmentClient } from "./client.mjs";
3
3
  import { segmentAudienceSyncEventSchema, segmentDeletionRegulationEventSchema, segmentDestinationCreatedEventSchema, segmentFunctionVersionEventSchema, segmentReverseEtlRunEventSchema, segmentSourceCreatedEventSchema, segmentTrackingPlanViolationEventSchema } from "./events.mjs";
4
- import { createPollingTriggerBindingFactory } from "@keystrokehq/integration-authoring";
4
+ import { Operation } from "@keystrokehq/core";
5
+ import { z } from "zod";
6
+ import { pollingTrigger } from "@keystrokehq/core/trigger";
5
7
 
8
+ //#region ../../packages/integration-authoring/dist/index.mjs
9
+ const IntegrationConfigSchema = z.object({
10
+ id: z.string().min(1),
11
+ name: z.string().min(1),
12
+ description: z.string().optional()
13
+ });
14
+ function resolveMetadata(metadata, defaults) {
15
+ return {
16
+ id: metadata?.id ?? defaults.defaultId,
17
+ description: metadata?.description ?? defaults.defaultDescription
18
+ };
19
+ }
20
+ function resolveAuthorPayload(payload, mapPayload) {
21
+ if (!mapPayload) return payload;
22
+ return mapPayload(payload);
23
+ }
24
+ function createIntegrationTriggerBindingFactory(config) {
25
+ const bind = (options) => {
26
+ const resolvedMetadata = resolveMetadata(options, config);
27
+ const baseTrigger = config.createBaseTrigger(resolvedMetadata);
28
+ const userTransform = options?.transform;
29
+ return baseTrigger({ transform: userTransform || config.mapPayload ? (runtimePayload, request) => {
30
+ const authorPayload = resolveAuthorPayload(runtimePayload, config.mapPayload);
31
+ if (authorPayload === null) throw new Error(`Trigger "${resolvedMetadata.id}" mapPayload returned null after the trigger filter passed; tighten the trigger filter schema.`);
32
+ if (!userTransform) return authorPayload;
33
+ return userTransform(authorPayload, request);
34
+ } : void 0 });
35
+ };
36
+ return Object.freeze(bind);
37
+ }
38
+ function createPollingTriggerBindingFactory(config) {
39
+ return createIntegrationTriggerBindingFactory({
40
+ defaultId: config.defaultId,
41
+ defaultDescription: config.defaultDescription,
42
+ mapPayload: config.mapPayload,
43
+ createBaseTrigger: (metadata) => pollingTrigger({
44
+ id: metadata.id,
45
+ description: metadata.description,
46
+ schedule: config.schedule,
47
+ response: config.response,
48
+ poll: config.poll,
49
+ ...config.credentialSets ? { credentialSets: config.credentialSets } : {},
50
+ ...config.filter ? { filter: config.filter } : {}
51
+ })
52
+ });
53
+ }
54
+
55
+ //#endregion
6
56
  //#region src/triggers.ts
7
57
  function buildPollingBinding(definition, options) {
8
58
  const schedule = options?.schedule ?? definition.defaultSchedule;
@@ -13,7 +63,7 @@ function buildPollingBinding(definition, options) {
13
63
  credentialSets: [segment],
14
64
  response: definition.eventSchema,
15
65
  poll: async (ctx) => {
16
- const credentials = ctx.credentials["keystroke:segment"];
66
+ const credentials = ctx.credentials["segment"];
17
67
  return definition.poll(credentials, ctx.lastPolledAt);
18
68
  }
19
69
  })({
package/dist/usage.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/usage.d.ts
6
6
  declare const getDailyPerSourceUsage: _keystrokehq_core0.Operation<z.ZodObject<{
@@ -13,7 +13,7 @@ declare const getDailyPerSourceUsage: _keystrokehq_core0.Operation<z.ZodObject<{
13
13
  sourceId: z.ZodOptional<z.ZodString>;
14
14
  callCount: z.ZodOptional<z.ZodNumber>;
15
15
  }, z.core.$catchall<z.ZodUnknown>>>;
16
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:segment", z.ZodObject<{
16
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"segment", z.ZodObject<{
17
17
  SEGMENT_PUBLIC_API_TOKEN: z.ZodString;
18
18
  SEGMENT_REGION: z.ZodDefault<z.ZodEnum<{
19
19
  us: "us";
@@ -43,7 +43,7 @@ declare const getMonthlyWorkspaceUsage: _keystrokehq_core0.Operation<z.ZodObject
43
43
  mtu: z.ZodOptional<z.ZodNumber>;
44
44
  events: z.ZodOptional<z.ZodNumber>;
45
45
  breakdowns: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
46
- }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:segment", z.ZodObject<{
46
+ }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"segment", z.ZodObject<{
47
47
  SEGMENT_PUBLIC_API_TOKEN: z.ZodString;
48
48
  SEGMENT_REGION: z.ZodDefault<z.ZodEnum<{
49
49
  us: "us";
package/dist/usage.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import { createSegmentClient } from "./client.mjs";
2
2
  import { a as segmentLooseObjectSchema } from "./common-CdGiJbjq.mjs";
3
- import { t as segmentOperation } from "./factory-CvfKfzMq.mjs";
3
+ import { t as segmentOperation } from "./factory-DRwj5eiU.mjs";
4
4
  import { z } from "zod";
5
5
 
6
6
  //#region src/usage.ts
@@ -1,6 +1,6 @@
1
+ import * as _keystrokehq_core0 from "@keystrokehq/core";
1
2
  import { z } from "zod";
2
3
  import * as _keystrokehq_core_credential_set0 from "@keystrokehq/core/credential-set";
3
- import * as _keystrokehq_core0 from "@keystrokehq/core";
4
4
 
5
5
  //#region src/warehouses.d.ts
6
6
  declare const warehouseSchema: z.ZodObject<{
@@ -23,7 +23,7 @@ declare const listWarehouses: _keystrokehq_core0.Operation<z.ZodIntersection<z.Z
23
23
  }, z.core.$catchall<z.ZodUnknown>>>;
24
24
  nextPageToken: z.ZodOptional<z.ZodString>;
25
25
  totalEntries: z.ZodOptional<z.ZodNumber>;
26
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:segment", z.ZodObject<{
26
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"segment", z.ZodObject<{
27
27
  SEGMENT_PUBLIC_API_TOKEN: z.ZodString;
28
28
  SEGMENT_REGION: z.ZodDefault<z.ZodEnum<{
29
29
  us: "us";
@@ -54,7 +54,7 @@ declare const getWarehouse: _keystrokehq_core0.Operation<z.ZodObject<{
54
54
  enabled: z.ZodOptional<z.ZodBoolean>;
55
55
  metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
56
56
  settings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
57
- }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:segment", z.ZodObject<{
57
+ }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"segment", z.ZodObject<{
58
58
  SEGMENT_PUBLIC_API_TOKEN: z.ZodString;
59
59
  SEGMENT_REGION: z.ZodDefault<z.ZodEnum<{
60
60
  us: "us";
@@ -85,7 +85,7 @@ declare const createWarehouse: _keystrokehq_core0.Operation<z.ZodObject<{
85
85
  enabled: z.ZodOptional<z.ZodBoolean>;
86
86
  metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
87
87
  settings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
88
- }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:segment", z.ZodObject<{
88
+ }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"segment", z.ZodObject<{
89
89
  SEGMENT_PUBLIC_API_TOKEN: z.ZodString;
90
90
  SEGMENT_REGION: z.ZodDefault<z.ZodEnum<{
91
91
  us: "us";
@@ -116,7 +116,7 @@ declare const updateWarehouse: _keystrokehq_core0.Operation<z.ZodObject<{
116
116
  enabled: z.ZodOptional<z.ZodBoolean>;
117
117
  metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
118
118
  settings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
119
- }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:segment", z.ZodObject<{
119
+ }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"segment", z.ZodObject<{
120
120
  SEGMENT_PUBLIC_API_TOKEN: z.ZodString;
121
121
  SEGMENT_REGION: z.ZodDefault<z.ZodEnum<{
122
122
  us: "us";
@@ -141,7 +141,7 @@ declare const updateWarehouse: _keystrokehq_core0.Operation<z.ZodObject<{
141
141
  }, z.core.$strip>>[] | undefined>], undefined>;
142
142
  declare const deleteWarehouse: _keystrokehq_core0.Operation<z.ZodObject<{
143
143
  [x: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
144
- }, z.core.$strip>, z.ZodObject<{}, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:segment", z.ZodObject<{
144
+ }, z.core.$strip>, z.ZodObject<{}, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"segment", z.ZodObject<{
145
145
  SEGMENT_PUBLIC_API_TOKEN: z.ZodString;
146
146
  SEGMENT_REGION: z.ZodDefault<z.ZodEnum<{
147
147
  us: "us";
@@ -172,7 +172,7 @@ declare const listConnectedSources: _keystrokehq_core0.Operation<z.ZodObject<{
172
172
  name: z.ZodOptional<z.ZodString>;
173
173
  enabled: z.ZodOptional<z.ZodBoolean>;
174
174
  }, z.core.$catchall<z.ZodUnknown>>>;
175
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:segment", z.ZodObject<{
175
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"segment", z.ZodObject<{
176
176
  SEGMENT_PUBLIC_API_TOKEN: z.ZodString;
177
177
  SEGMENT_REGION: z.ZodDefault<z.ZodEnum<{
178
178
  us: "us";
@@ -200,7 +200,7 @@ declare const connectSourceToWarehouse: _keystrokehq_core0.Operation<z.ZodObject
200
200
  sourceId: z.ZodString;
201
201
  }, z.core.$strip>, z.ZodObject<{
202
202
  connected: z.ZodLiteral<true>;
203
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:segment", z.ZodObject<{
203
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"segment", z.ZodObject<{
204
204
  SEGMENT_PUBLIC_API_TOKEN: z.ZodString;
205
205
  SEGMENT_REGION: z.ZodDefault<z.ZodEnum<{
206
206
  us: "us";
@@ -228,7 +228,7 @@ declare const disconnectSourceFromWarehouse: _keystrokehq_core0.Operation<z.ZodO
228
228
  sourceId: z.ZodString;
229
229
  }, z.core.$strip>, z.ZodObject<{
230
230
  disconnected: z.ZodLiteral<true>;
231
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:segment", z.ZodObject<{
231
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"segment", z.ZodObject<{
232
232
  SEGMENT_PUBLIC_API_TOKEN: z.ZodString;
233
233
  SEGMENT_REGION: z.ZodDefault<z.ZodEnum<{
234
234
  us: "us";
@@ -256,7 +256,7 @@ declare const getSelectiveSync: _keystrokehq_core0.Operation<z.ZodObject<{
256
256
  }, z.core.$strip>, z.ZodObject<{
257
257
  warehouseId: z.ZodOptional<z.ZodString>;
258
258
  items: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
259
- }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:segment", z.ZodObject<{
259
+ }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"segment", z.ZodObject<{
260
260
  SEGMENT_PUBLIC_API_TOKEN: z.ZodString;
261
261
  SEGMENT_REGION: z.ZodDefault<z.ZodEnum<{
262
262
  us: "us";
@@ -285,7 +285,7 @@ declare const updateSelectiveSync: _keystrokehq_core0.Operation<z.ZodObject<{
285
285
  }, z.core.$strip>, z.ZodObject<{
286
286
  warehouseId: z.ZodOptional<z.ZodString>;
287
287
  items: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
288
- }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:segment", z.ZodObject<{
288
+ }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"segment", z.ZodObject<{
289
289
  SEGMENT_PUBLIC_API_TOKEN: z.ZodString;
290
290
  SEGMENT_REGION: z.ZodDefault<z.ZodEnum<{
291
291
  us: "us";
@@ -314,7 +314,7 @@ declare const testWarehouseConnection: _keystrokehq_core0.Operation<z.ZodObject<
314
314
  success: z.ZodOptional<z.ZodBoolean>;
315
315
  message: z.ZodOptional<z.ZodString>;
316
316
  details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
317
- }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:segment", z.ZodObject<{
317
+ }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"segment", z.ZodObject<{
318
318
  SEGMENT_PUBLIC_API_TOKEN: z.ZodString;
319
319
  SEGMENT_REGION: z.ZodDefault<z.ZodEnum<{
320
320
  us: "us";
@@ -1,7 +1,7 @@
1
1
  import { createSegmentClient } from "./client.mjs";
2
2
  import { a as segmentLooseObjectSchema, n as segmentIdSchema } from "./common-CdGiJbjq.mjs";
3
- import { t as segmentOperation } from "./factory-CvfKfzMq.mjs";
4
- import { n as crudList, r as crudMutate, t as crudGet } from "./crud-SWa_79Hg.mjs";
3
+ import { t as segmentOperation } from "./factory-DRwj5eiU.mjs";
4
+ import { n as crudList, r as crudMutate, t as crudGet } from "./crud-DV9e4Spi.mjs";
5
5
  import { z } from "zod";
6
6
 
7
7
  //#region src/warehouses.ts
@@ -1,6 +1,6 @@
1
+ import * as _keystrokehq_core0 from "@keystrokehq/core";
1
2
  import { z } from "zod";
2
3
  import * as _keystrokehq_core_credential_set0 from "@keystrokehq/core/credential-set";
3
- import * as _keystrokehq_core0 from "@keystrokehq/core";
4
4
 
5
5
  //#region src/workspaces.d.ts
6
6
  declare const getWorkspace: _keystrokehq_core0.Operation<z.ZodObject<{}, z.core.$strip>, z.ZodObject<{
@@ -8,7 +8,7 @@ declare const getWorkspace: _keystrokehq_core0.Operation<z.ZodObject<{}, z.core.
8
8
  name: z.ZodOptional<z.ZodString>;
9
9
  slug: z.ZodOptional<z.ZodString>;
10
10
  region: z.ZodOptional<z.ZodString>;
11
- }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:segment", z.ZodObject<{
11
+ }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"segment", z.ZodObject<{
12
12
  SEGMENT_PUBLIC_API_TOKEN: z.ZodString;
13
13
  SEGMENT_REGION: z.ZodDefault<z.ZodEnum<{
14
14
  us: "us";
@@ -38,7 +38,7 @@ declare const listSpaces: _keystrokehq_core0.Operation<z.ZodObject<{}, z.core.$s
38
38
  slug: z.ZodOptional<z.ZodString>;
39
39
  description: z.ZodOptional<z.ZodString>;
40
40
  }, z.core.$catchall<z.ZodUnknown>>>;
41
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:segment", z.ZodObject<{
41
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"segment", z.ZodObject<{
42
42
  SEGMENT_PUBLIC_API_TOKEN: z.ZodString;
43
43
  SEGMENT_REGION: z.ZodDefault<z.ZodEnum<{
44
44
  us: "us";
@@ -68,7 +68,7 @@ declare const getSpace: _keystrokehq_core0.Operation<z.ZodObject<{
68
68
  name: z.ZodOptional<z.ZodString>;
69
69
  slug: z.ZodOptional<z.ZodString>;
70
70
  description: z.ZodOptional<z.ZodString>;
71
- }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:segment", z.ZodObject<{
71
+ }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"segment", z.ZodObject<{
72
72
  SEGMENT_PUBLIC_API_TOKEN: z.ZodString;
73
73
  SEGMENT_REGION: z.ZodDefault<z.ZodEnum<{
74
74
  us: "us";
@@ -1,6 +1,6 @@
1
1
  import { createSegmentClient } from "./client.mjs";
2
2
  import { a as segmentLooseObjectSchema, n as segmentIdSchema } from "./common-CdGiJbjq.mjs";
3
- import { t as segmentOperation } from "./factory-CvfKfzMq.mjs";
3
+ import { t as segmentOperation } from "./factory-DRwj5eiU.mjs";
4
4
  import { z } from "zod";
5
5
 
6
6
  //#region src/workspaces.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@keystrokehq/segment",
3
- "version": "0.0.8",
3
+ "version": "0.0.9",
4
4
  "private": false,
5
5
  "sideEffects": false,
6
6
  "type": "module",
@@ -144,7 +144,6 @@
144
144
  "LICENSE"
145
145
  ],
146
146
  "dependencies": {
147
- "@keystrokehq/integration-authoring": "^0.0.8",
148
147
  "zod": "^4.3.6"
149
148
  },
150
149
  "peerDependencies": {
@@ -155,9 +154,10 @@
155
154
  "tsdown": "^0.20.3",
156
155
  "typescript": "^5.9.3",
157
156
  "vitest": "^4.0.18",
158
- "@keystrokehq/core": "^0.0.8",
157
+ "@keystrokehq/core": "^0.0.12",
159
158
  "@keystrokehq/test-utils": "0.0.0",
160
- "@keystrokehq/typescript-config": "0.0.0"
159
+ "@keystrokehq/typescript-config": "0.0.0",
160
+ "@keystrokehq/integration-authoring": "0.0.9"
161
161
  },
162
162
  "keywords": [
163
163
  "segment",
@@ -1,8 +0,0 @@
1
- import { t as segment } from "./integration-B5zYasBZ.mjs";
2
- import { createOfficialOperationFactory } from "@keystrokehq/integration-authoring/official";
3
-
4
- //#region src/factory.ts
5
- const segmentOperation = createOfficialOperationFactory(segment);
6
-
7
- //#endregion
8
- export { segmentOperation as t };
@@ -1,25 +0,0 @@
1
- import { defineOfficialIntegration } from "@keystrokehq/integration-authoring/official";
2
- import { z } from "zod";
3
-
4
- //#region src/integration.ts
5
- const segmentRegionSchema = z.enum(["us", "eu"]);
6
- const segmentAuthSchema = z.object({
7
- SEGMENT_PUBLIC_API_TOKEN: z.string().min(1),
8
- SEGMENT_REGION: segmentRegionSchema.default("us"),
9
- SEGMENT_DEFAULT_WRITE_KEY: z.string().min(1).optional(),
10
- SEGMENT_WRITE_KEYS_JSON: z.string().optional(),
11
- SEGMENT_PROFILE_API_TOKEN: z.string().min(1).optional(),
12
- SEGMENT_PROFILE_SPACE_ID: z.string().min(1).optional(),
13
- SEGMENT_WEBHOOK_SHARED_SECRET: z.string().min(1).optional()
14
- });
15
- const segmentOfficialIntegration = {
16
- id: "segment",
17
- name: "Segment",
18
- description: "Twilio Segment Customer Data Platform — track events, manage sources/destinations/tracking plans/warehouses, audiences, reverse ETL, and monitor delivery from Keystroke workflows.",
19
- auth: segmentAuthSchema
20
- };
21
- const segmentBundle = defineOfficialIntegration(segmentOfficialIntegration);
22
- const segment = segmentBundle.credentialSet;
23
-
24
- //#endregion
25
- export { segmentBundle as n, segmentOfficialIntegration as r, segment as t };