@keystrokehq/segment 0.0.16 → 0.1.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 +10 -104
- package/dist/action.cjs +21 -0
- package/dist/action.cjs.map +1 -0
- package/dist/action.mjs +21 -0
- package/dist/action.mjs.map +1 -0
- package/dist/actions/add-labels-to-source.cjs +27 -0
- package/dist/actions/add-labels-to-source.cjs.map +1 -0
- package/dist/actions/add-labels-to-source.d.cts +9 -0
- package/dist/actions/add-labels-to-source.d.cts.map +1 -0
- package/dist/actions/add-labels-to-source.d.mts +9 -0
- package/dist/actions/add-labels-to-source.d.mts.map +1 -0
- package/dist/actions/add-labels-to-source.mjs +26 -0
- package/dist/actions/add-labels-to-source.mjs.map +1 -0
- package/dist/actions/alias.cjs +23 -0
- package/dist/actions/alias.cjs.map +1 -0
- package/dist/actions/alias.d.cts +9 -0
- package/dist/actions/alias.d.cts.map +1 -0
- package/dist/actions/alias.d.mts +9 -0
- package/dist/actions/alias.d.mts.map +1 -0
- package/dist/actions/alias.mjs +20 -0
- package/dist/actions/alias.mjs.map +1 -0
- package/dist/actions/batch.cjs +21 -0
- package/dist/actions/batch.cjs.map +1 -0
- package/dist/actions/batch.d.cts +9 -0
- package/dist/actions/batch.d.cts.map +1 -0
- package/dist/actions/batch.d.mts +9 -0
- package/dist/actions/batch.d.mts.map +1 -0
- package/dist/actions/batch.mjs +18 -0
- package/dist/actions/batch.mjs.map +1 -0
- package/dist/actions/delete-source.cjs +17 -0
- package/dist/actions/delete-source.cjs.map +1 -0
- package/dist/actions/delete-source.d.cts +9 -0
- package/dist/actions/delete-source.d.cts.map +1 -0
- package/dist/actions/delete-source.d.mts +9 -0
- package/dist/actions/delete-source.d.mts.map +1 -0
- package/dist/actions/delete-source.mjs +16 -0
- package/dist/actions/delete-source.mjs.map +1 -0
- package/dist/actions/get-daily-per-source-api-calls-usage.cjs +37 -0
- package/dist/actions/get-daily-per-source-api-calls-usage.cjs.map +1 -0
- package/dist/actions/get-daily-per-source-api-calls-usage.d.cts +9 -0
- package/dist/actions/get-daily-per-source-api-calls-usage.d.cts.map +1 -0
- package/dist/actions/get-daily-per-source-api-calls-usage.d.mts +9 -0
- package/dist/actions/get-daily-per-source-api-calls-usage.d.mts.map +1 -0
- package/dist/actions/get-daily-per-source-api-calls-usage.mjs +36 -0
- package/dist/actions/get-daily-per-source-api-calls-usage.mjs.map +1 -0
- package/dist/actions/get-destination.cjs +78 -0
- package/dist/actions/get-destination.cjs.map +1 -0
- package/dist/actions/get-destination.d.cts +9 -0
- package/dist/actions/get-destination.d.cts.map +1 -0
- package/dist/actions/get-destination.d.mts +9 -0
- package/dist/actions/get-destination.d.mts.map +1 -0
- package/dist/actions/get-destination.mjs +77 -0
- package/dist/actions/get-destination.mjs.map +1 -0
- package/dist/actions/group.cjs +25 -0
- package/dist/actions/group.cjs.map +1 -0
- package/dist/actions/group.d.cts +9 -0
- package/dist/actions/group.d.cts.map +1 -0
- package/dist/actions/group.d.mts +9 -0
- package/dist/actions/group.d.mts.map +1 -0
- package/dist/actions/group.mjs +22 -0
- package/dist/actions/group.mjs.map +1 -0
- package/dist/actions/identify.cjs +25 -0
- package/dist/actions/identify.cjs.map +1 -0
- package/dist/actions/identify.d.cts +9 -0
- package/dist/actions/identify.d.cts.map +1 -0
- package/dist/actions/identify.d.mts +9 -0
- package/dist/actions/identify.d.mts.map +1 -0
- package/dist/actions/identify.mjs +22 -0
- package/dist/actions/identify.mjs.map +1 -0
- package/dist/actions/import-historical-data.cjs +20 -0
- package/dist/actions/import-historical-data.cjs.map +1 -0
- package/dist/actions/import-historical-data.d.cts +9 -0
- package/dist/actions/import-historical-data.d.cts.map +1 -0
- package/dist/actions/import-historical-data.d.mts +9 -0
- package/dist/actions/import-historical-data.d.mts.map +1 -0
- package/dist/actions/import-historical-data.mjs +17 -0
- package/dist/actions/import-historical-data.mjs.map +1 -0
- package/dist/actions/index.cjs +35 -0
- package/dist/actions/index.d.cts +18 -0
- package/dist/actions/index.d.mts +18 -0
- package/dist/actions/index.mjs +18 -0
- package/dist/actions/list-connected-warehouses-from-source.cjs +55 -0
- package/dist/actions/list-connected-warehouses-from-source.cjs.map +1 -0
- package/dist/actions/list-connected-warehouses-from-source.d.cts +9 -0
- package/dist/actions/list-connected-warehouses-from-source.d.cts.map +1 -0
- package/dist/actions/list-connected-warehouses-from-source.d.mts +9 -0
- package/dist/actions/list-connected-warehouses-from-source.d.mts.map +1 -0
- package/dist/actions/list-connected-warehouses-from-source.mjs +54 -0
- package/dist/actions/list-connected-warehouses-from-source.mjs.map +1 -0
- package/dist/actions/list-delivery-metrics-summary-from-destination.cjs +41 -0
- package/dist/actions/list-delivery-metrics-summary-from-destination.cjs.map +1 -0
- package/dist/actions/list-delivery-metrics-summary-from-destination.d.cts +9 -0
- package/dist/actions/list-delivery-metrics-summary-from-destination.d.cts.map +1 -0
- package/dist/actions/list-delivery-metrics-summary-from-destination.d.mts +9 -0
- package/dist/actions/list-delivery-metrics-summary-from-destination.d.mts.map +1 -0
- package/dist/actions/list-delivery-metrics-summary-from-destination.mjs +40 -0
- package/dist/actions/list-delivery-metrics-summary-from-destination.mjs.map +1 -0
- package/dist/actions/list-schema-settings-in-source.cjs +44 -0
- package/dist/actions/list-schema-settings-in-source.cjs.map +1 -0
- package/dist/actions/list-schema-settings-in-source.d.cts +9 -0
- package/dist/actions/list-schema-settings-in-source.d.cts.map +1 -0
- package/dist/actions/list-schema-settings-in-source.d.mts +9 -0
- package/dist/actions/list-schema-settings-in-source.d.mts.map +1 -0
- package/dist/actions/list-schema-settings-in-source.mjs +43 -0
- package/dist/actions/list-schema-settings-in-source.mjs.map +1 -0
- package/dist/actions/page.cjs +26 -0
- package/dist/actions/page.cjs.map +1 -0
- package/dist/actions/page.d.cts +9 -0
- package/dist/actions/page.d.cts.map +1 -0
- package/dist/actions/page.d.mts +9 -0
- package/dist/actions/page.d.mts.map +1 -0
- package/dist/actions/page.mjs +23 -0
- package/dist/actions/page.mjs.map +1 -0
- package/dist/actions/remove-source-write-key.cjs +20 -0
- package/dist/actions/remove-source-write-key.cjs.map +1 -0
- package/dist/actions/remove-source-write-key.d.cts +9 -0
- package/dist/actions/remove-source-write-key.d.cts.map +1 -0
- package/dist/actions/remove-source-write-key.d.mts +9 -0
- package/dist/actions/remove-source-write-key.d.mts.map +1 -0
- package/dist/actions/remove-source-write-key.mjs +19 -0
- package/dist/actions/remove-source-write-key.mjs.map +1 -0
- package/dist/actions/screen.cjs +25 -0
- package/dist/actions/screen.cjs.map +1 -0
- package/dist/actions/screen.d.cts +9 -0
- package/dist/actions/screen.d.cts.map +1 -0
- package/dist/actions/screen.d.mts +9 -0
- package/dist/actions/screen.d.mts.map +1 -0
- package/dist/actions/screen.mjs +22 -0
- package/dist/actions/screen.mjs.map +1 -0
- package/dist/actions/track.cjs +25 -0
- package/dist/actions/track.cjs.map +1 -0
- package/dist/actions/track.d.cts +9 -0
- package/dist/actions/track.d.cts.map +1 -0
- package/dist/actions/track.d.mts +9 -0
- package/dist/actions/track.d.mts.map +1 -0
- package/dist/actions/track.mjs +22 -0
- package/dist/actions/track.mjs.map +1 -0
- package/dist/actions/update-source.cjs +51 -0
- package/dist/actions/update-source.cjs.map +1 -0
- package/dist/actions/update-source.d.cts +9 -0
- package/dist/actions/update-source.d.cts.map +1 -0
- package/dist/actions/update-source.d.mts +9 -0
- package/dist/actions/update-source.d.mts.map +1 -0
- package/dist/actions/update-source.mjs +50 -0
- package/dist/actions/update-source.mjs.map +1 -0
- package/dist/app.cjs +9 -0
- package/dist/app.cjs.map +1 -0
- package/dist/app.d.cts +5 -0
- package/dist/app.d.cts.map +1 -0
- package/dist/app.d.mts +5 -0
- package/dist/app.d.mts.map +1 -0
- package/dist/app.mjs +10 -0
- package/dist/app.mjs.map +1 -0
- package/dist/catalog.cjs +15 -0
- package/dist/catalog.cjs.map +1 -0
- package/dist/catalog.d.cts +14 -0
- package/dist/catalog.d.cts.map +1 -0
- package/dist/catalog.d.mts +14 -0
- package/dist/catalog.d.mts.map +1 -0
- package/dist/catalog.mjs +15 -0
- package/dist/catalog.mjs.map +1 -0
- package/dist/execute.cjs +18 -0
- package/dist/execute.cjs.map +1 -0
- package/dist/execute.mjs +18 -0
- package/dist/execute.mjs.map +1 -0
- package/dist/index.cjs +40 -0
- package/dist/index.d.cts +20 -0
- package/dist/index.d.mts +20 -4
- package/dist/index.mjs +21 -5
- package/package.json +31 -60
- package/LICENSE +0 -21
- package/dist/client-DQfeZzLR.mjs +0 -362
- package/dist/common-DUU0airJ.mjs +0 -56
- package/dist/credential-sets/index.d.mts +0 -2
- package/dist/credential-sets/index.mjs +0 -3
- package/dist/operations/index.d.mts +0 -2
- package/dist/operations/index.mjs +0 -3
- package/dist/schemas/index.d.mts +0 -57
- package/dist/schemas/index.mjs +0 -3
- package/dist/segment.credential-set-BTTrkHO7.mjs +0 -33
- package/dist/segment.credential-set-BgROtI_9.d.mts +0 -57
- package/dist/triggers/index.d.mts +0 -110
- package/dist/triggers/index.mjs +0 -367
- package/dist/workspace-list-spaces.operation-DKWX3vl5.mjs +0 -5200
- package/dist/workspace-list-spaces.operation-DNIUfIuv.d.mts +0 -6548
package/README.md
CHANGED
|
@@ -1,111 +1,17 @@
|
|
|
1
1
|
# @keystrokehq/segment
|
|
2
2
|
|
|
3
|
-
Keystroke integration
|
|
3
|
+
Keystroke-managed integration.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
- **Tracking API** (`api.segment.io` / `events.eu1.segmentapis.com`) — event ingestion
|
|
9
|
-
- **Profile API** (`profiles.segment.com`) — Engage profile reads
|
|
10
|
-
|
|
11
|
-
## Install
|
|
12
|
-
|
|
13
|
-
```bash
|
|
14
|
-
pnpm add @keystrokehq/segment
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
## Package exports
|
|
18
|
-
|
|
19
|
-
Import from the canonical barrel subpaths:
|
|
20
|
-
|
|
21
|
-
- `@keystrokehq/segment` — credential sets, operations, and schemas
|
|
22
|
-
- `@keystrokehq/segment/credential-sets` — `segmentCredentialSet`, `segmentAuthSchema`, `SegmentCredentials`
|
|
23
|
-
- `@keystrokehq/segment/operations` — all 160 Segment operations (+ `*Tool` aliases)
|
|
24
|
-
- `@keystrokehq/segment/schemas` — shared Zod schemas and inferred types
|
|
25
|
-
- `@keystrokehq/segment/triggers` — `polling` namespace and direct-binding polling helpers
|
|
26
|
-
|
|
27
|
-
## Credentials
|
|
28
|
-
|
|
29
|
-
Segment has no end-user OAuth flow. Configure tokens in Segment and paste them into a Keystroke manual connection:
|
|
30
|
-
|
|
31
|
-
| Field | Required | Unlocks |
|
|
32
|
-
|-------|----------|---------|
|
|
33
|
-
| `SEGMENT_PUBLIC_API_TOKEN` | yes | Public API (management + polling triggers) |
|
|
34
|
-
| `SEGMENT_REGION` | default `us` | `'us'` \| `'eu'` — Public + Tracking API hosts |
|
|
35
|
-
| `SEGMENT_DEFAULT_WRITE_KEY` | optional | Tracking when no per-call `sourceId` |
|
|
36
|
-
| `SEGMENT_WRITE_KEYS_JSON` | optional | JSON map `{ [sourceId]: writeKey }` for Tracking |
|
|
37
|
-
| `SEGMENT_PROFILE_API_TOKEN` | optional | Profile API |
|
|
38
|
-
| `SEGMENT_PROFILE_SPACE_ID` | optional | Default Engage space for Profile API |
|
|
39
|
-
| `SEGMENT_WEBHOOK_SHARED_SECRET` | optional | Webhook signature verification (future triggers) |
|
|
40
|
-
|
|
41
|
-
```ts
|
|
42
|
-
import { segmentCredentialSet } from '@keystrokehq/segment/credential-sets';
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
## Quickstart
|
|
46
|
-
|
|
47
|
-
### Track an event
|
|
48
|
-
|
|
49
|
-
```ts
|
|
50
|
-
import { trackOperation } from '@keystrokehq/segment/operations';
|
|
51
|
-
|
|
52
|
-
await trackOperation.run(
|
|
53
|
-
{ userId: 'u_123', event: 'Signup Completed', properties: { plan: 'pro' } },
|
|
54
|
-
{ credentials: { segment: connectionCreds } }
|
|
55
|
-
);
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
### List destinations
|
|
59
|
-
|
|
60
|
-
```ts
|
|
61
|
-
import { listDestinationsOperation } from '@keystrokehq/segment/operations';
|
|
62
|
-
|
|
63
|
-
const { items, nextPageToken } = await listDestinationsOperation.run(
|
|
64
|
-
{ pageSize: 50 },
|
|
65
|
-
{ credentials: { segment: connectionCreds } }
|
|
66
|
-
);
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
### Poll a reverse-ETL run
|
|
5
|
+
**App:** `segment`
|
|
6
|
+
**Version:** `20260615_00`
|
|
7
|
+
**Actions:** 17
|
|
70
8
|
|
|
71
9
|
```ts
|
|
72
|
-
import {
|
|
10
|
+
import { defineAgent } from "@keystrokehq/keystroke/agent";
|
|
11
|
+
import { segmentAddLabelsToSource } from "@keystrokehq/segment/actions";
|
|
73
12
|
|
|
74
|
-
export
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
);
|
|
13
|
+
export default defineAgent({
|
|
14
|
+
key: "segment-agent",
|
|
15
|
+
tools: [segmentAddLabelsToSource],
|
|
16
|
+
});
|
|
78
17
|
```
|
|
79
|
-
|
|
80
|
-
## Operations (160)
|
|
81
|
-
|
|
82
|
-
Operations are grouped by domain id prefix (`segment.tracking.*`, `segment.sources.*`, `segment.destinations.*`, …). Import individual operations from `@keystrokehq/segment/operations` or the root barrel.
|
|
83
|
-
|
|
84
|
-
Domains: tracking (8), sources (16), destinations (14), tracking-plans (11), functions (10), warehouses (11), audiences (8), computed-traits (6), monitoring (5), destination-filters (5), transformations (5), labels (3), iam groups/users/roles (16), events catalog (3), edge-functions (5), reverse-etl (12), profiles-sync (4), deletion (5), delivery-overview (2), usage (2), workspaces (3), profiles (6).
|
|
85
|
-
|
|
86
|
-
## Triggers
|
|
87
|
-
|
|
88
|
-
`@keystrokehq/segment/triggers` exports:
|
|
89
|
-
|
|
90
|
-
- `polling` — nine Public API polling bindings (`audienceSyncCompleted`, reverse-ETL run pollers, `functionsDeploymentCompleted`, `trackingPlanViolationDetected`, `sourceCreated`, `destinationCreated`, `deletionRegulationCompleted`)
|
|
91
|
-
- Named helpers — same functions exported directly for ergonomic imports
|
|
92
|
-
|
|
93
|
-
Webhook trigger bindings are documented for future use; event schemas live under `src/events/` for when Segment webhook destinations are wired.
|
|
94
|
-
|
|
95
|
-
## Caveats
|
|
96
|
-
|
|
97
|
-
- **`SEGMENT_REGION = 'eu'`** routes both Tracking and Public API to EU hosts.
|
|
98
|
-
- **Write-key fan-out** — Tracking operations accept optional `sourceId`; resolved from `SEGMENT_WRITE_KEYS_JSON` or `SEGMENT_DEFAULT_WRITE_KEY`.
|
|
99
|
-
- **Batch limits** — 500 KB per batch, 32 KB per event; `tracking.batch` splits automatically.
|
|
100
|
-
- **No official SDK** — hand-rolled `fetch` client in `src/utils/client.ts` for Workers/isolate compatibility.
|
|
101
|
-
|
|
102
|
-
## References
|
|
103
|
-
|
|
104
|
-
- Tracking API: https://segment.com/docs/connections/sources/catalog/libraries/server/http-api/
|
|
105
|
-
- Public API: https://docs.segmentapis.com/
|
|
106
|
-
- Profile API: https://segment.com/docs/unify/profile-api/
|
|
107
|
-
- Regional endpoints: https://segment.com/docs/guides/regional-segment/
|
|
108
|
-
|
|
109
|
-
## License
|
|
110
|
-
|
|
111
|
-
MIT
|
package/dist/action.cjs
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
const require_app = require("./app.cjs");
|
|
2
|
+
const require_execute = require("./execute.cjs");
|
|
3
|
+
require("zod");
|
|
4
|
+
//#region src/action.ts
|
|
5
|
+
/** Bind one gateway tool to a typed app action; the call's output is parsed against `def.output`. */
|
|
6
|
+
function action(tool, def) {
|
|
7
|
+
return require_app.segment.action({
|
|
8
|
+
slug: def.slug,
|
|
9
|
+
name: def.name,
|
|
10
|
+
description: def.description,
|
|
11
|
+
input: def.input,
|
|
12
|
+
output: def.output,
|
|
13
|
+
async run(input) {
|
|
14
|
+
return def.output.parse(await require_execute.executeSegmentTool(tool, input));
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
//#endregion
|
|
19
|
+
exports.action = action;
|
|
20
|
+
|
|
21
|
+
//# sourceMappingURL=action.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"action.cjs","names":["segment","executeSegmentTool"],"sources":["../src/action.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { segment } from \"./app\";\nimport { executeSegmentTool } from \"./execute\";\n\n/** Bind one gateway tool to a typed app action; the call's output is parsed against `def.output`. */\nexport function action(\n tool: string,\n def: {\n slug: string;\n name: string;\n description: string;\n input: z.ZodTypeAny;\n output: z.ZodTypeAny;\n },\n) {\n return segment.action({\n slug: def.slug,\n name: def.name,\n description: def.description,\n input: def.input,\n output: def.output,\n async run(input) {\n return def.output.parse(await executeSegmentTool(tool, input as Record<string, unknown>));\n },\n });\n}\n"],"mappings":";;;;;AAMA,SAAgB,OACd,MACA,KAOA;CACA,OAAOA,YAAAA,QAAQ,OAAO;EACpB,MAAM,IAAI;EACV,MAAM,IAAI;EACV,aAAa,IAAI;EACjB,OAAO,IAAI;EACX,QAAQ,IAAI;EACZ,MAAM,IAAI,OAAO;GACf,OAAO,IAAI,OAAO,MAAM,MAAMC,gBAAAA,mBAAmB,MAAM,KAAgC,CAAC;EAC1F;CACF,CAAC;AACH"}
|
package/dist/action.mjs
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { segment } from "./app.mjs";
|
|
2
|
+
import { executeSegmentTool } from "./execute.mjs";
|
|
3
|
+
import "zod";
|
|
4
|
+
//#region src/action.ts
|
|
5
|
+
/** Bind one gateway tool to a typed app action; the call's output is parsed against `def.output`. */
|
|
6
|
+
function action(tool, def) {
|
|
7
|
+
return segment.action({
|
|
8
|
+
slug: def.slug,
|
|
9
|
+
name: def.name,
|
|
10
|
+
description: def.description,
|
|
11
|
+
input: def.input,
|
|
12
|
+
output: def.output,
|
|
13
|
+
async run(input) {
|
|
14
|
+
return def.output.parse(await executeSegmentTool(tool, input));
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
//#endregion
|
|
19
|
+
export { action };
|
|
20
|
+
|
|
21
|
+
//# sourceMappingURL=action.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"action.mjs","names":[],"sources":["../src/action.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { segment } from \"./app\";\nimport { executeSegmentTool } from \"./execute\";\n\n/** Bind one gateway tool to a typed app action; the call's output is parsed against `def.output`. */\nexport function action(\n tool: string,\n def: {\n slug: string;\n name: string;\n description: string;\n input: z.ZodTypeAny;\n output: z.ZodTypeAny;\n },\n) {\n return segment.action({\n slug: def.slug,\n name: def.name,\n description: def.description,\n input: def.input,\n output: def.output,\n async run(input) {\n return def.output.parse(await executeSegmentTool(tool, input as Record<string, unknown>));\n },\n });\n}\n"],"mappings":";;;;;AAMA,SAAgB,OACd,MACA,KAOA;CACA,OAAO,QAAQ,OAAO;EACpB,MAAM,IAAI;EACV,MAAM,IAAI;EACV,aAAa,IAAI;EACjB,OAAO,IAAI;EACX,QAAQ,IAAI;EACZ,MAAM,IAAI,OAAO;GACf,OAAO,IAAI,OAAO,MAAM,MAAM,mBAAmB,MAAM,KAAgC,CAAC;EAC1F;CACF,CAAC;AACH"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
const require_action = require("../action.cjs");
|
|
2
|
+
let zod = require("zod");
|
|
3
|
+
//#region src/actions/add-labels-to-source.ts
|
|
4
|
+
const SegmentAddLabelsToSourceInput = zod.z.object({
|
|
5
|
+
labels: zod.z.array(zod.z.object({
|
|
6
|
+
key: zod.z.string().describe("Label key"),
|
|
7
|
+
value: zod.z.string().describe("Label value")
|
|
8
|
+
}).describe("A single key/value label.")).describe("List of labels to associate with the Source. Must include at least one label."),
|
|
9
|
+
sourceId: zod.z.string().describe("ID of the Source (1-255 characters)")
|
|
10
|
+
}).describe("Request schema to add existing labels to a Segment Source.");
|
|
11
|
+
const SegmentAddLabelsToSource_LabelItemSchema = zod.z.object({
|
|
12
|
+
key: zod.z.string().describe("Label key"),
|
|
13
|
+
value: zod.z.string().describe("Label value")
|
|
14
|
+
}).describe("A single key/value label.");
|
|
15
|
+
const SegmentAddLabelsToSource_AddLabelsToSourceResponseDataSchema = zod.z.object({ labels: zod.z.array(SegmentAddLabelsToSource_LabelItemSchema).describe("Labels now associated with the Source") }).describe("Envelope containing the response labels.");
|
|
16
|
+
const SegmentAddLabelsToSourceOutput = zod.z.object({ data: SegmentAddLabelsToSource_AddLabelsToSourceResponseDataSchema.nullable() }).describe("Response schema containing all labels now associated with the Source.");
|
|
17
|
+
const segmentAddLabelsToSource = require_action.action("SEGMENT_ADD_LABELS_TO_SOURCE", {
|
|
18
|
+
slug: "segment-add-labels-to-source",
|
|
19
|
+
name: "Add Labels to Source",
|
|
20
|
+
description: "Tool to add existing labels to a Source. Use when you have the source ID and want to tag it with metadata labels.",
|
|
21
|
+
input: SegmentAddLabelsToSourceInput,
|
|
22
|
+
output: SegmentAddLabelsToSourceOutput
|
|
23
|
+
});
|
|
24
|
+
//#endregion
|
|
25
|
+
exports.segmentAddLabelsToSource = segmentAddLabelsToSource;
|
|
26
|
+
|
|
27
|
+
//# sourceMappingURL=add-labels-to-source.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"add-labels-to-source.cjs","names":["z","action"],"sources":["../../src/actions/add-labels-to-source.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const SegmentAddLabelsToSourceInput: z.ZodTypeAny = z.object({\n labels: z.array(z.object({\n key: z.string().describe(\"Label key\"),\n value: z.string().describe(\"Label value\"),\n}).describe(\"A single key/value label.\")).describe(\"List of labels to associate with the Source. Must include at least one label.\"),\n sourceId: z.string().describe(\"ID of the Source (1-255 characters)\"),\n}).describe(\"Request schema to add existing labels to a Segment Source.\");\nconst SegmentAddLabelsToSource_LabelItemSchema: z.ZodTypeAny = z.object({\n key: z.string().describe(\"Label key\"),\n value: z.string().describe(\"Label value\"),\n}).describe(\"A single key/value label.\");\nconst SegmentAddLabelsToSource_AddLabelsToSourceResponseDataSchema: z.ZodTypeAny = z.object({\n labels: z.array(SegmentAddLabelsToSource_LabelItemSchema).describe(\"Labels now associated with the Source\"),\n}).describe(\"Envelope containing the response labels.\");\nexport const SegmentAddLabelsToSourceOutput: z.ZodTypeAny = z.object({\n data: SegmentAddLabelsToSource_AddLabelsToSourceResponseDataSchema.nullable(),\n}).describe(\"Response schema containing all labels now associated with the Source.\");\n\nexport const segmentAddLabelsToSource = action(\"SEGMENT_ADD_LABELS_TO_SOURCE\", {\n slug: \"segment-add-labels-to-source\",\n name: \"Add Labels to Source\",\n description: \"Tool to add existing labels to a Source. Use when you have the source ID and want to tag it with metadata labels.\",\n input: SegmentAddLabelsToSourceInput,\n output: SegmentAddLabelsToSourceOutput,\n});\n"],"mappings":";;;AAIA,MAAa,gCAA8CA,IAAAA,EAAE,OAAO;CAClE,QAAQA,IAAAA,EAAE,MAAMA,IAAAA,EAAE,OAAO;EACzB,KAAKA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,WAAW;EACpC,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,aAAa;CAC1C,CAAC,CAAC,CAAC,SAAS,2BAA2B,CAAC,CAAC,CAAC,SAAS,+EAA+E;CAChI,UAAUA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,qCAAqC;AACrE,CAAC,CAAC,CAAC,SAAS,4DAA4D;AACxE,MAAM,2CAAyDA,IAAAA,EAAE,OAAO;CACtE,KAAKA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,WAAW;CACpC,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,aAAa;AAC1C,CAAC,CAAC,CAAC,SAAS,2BAA2B;AACvC,MAAM,+DAA6EA,IAAAA,EAAE,OAAO,EAC1F,QAAQA,IAAAA,EAAE,MAAM,wCAAwC,CAAC,CAAC,SAAS,uCAAuC,EAC5G,CAAC,CAAC,CAAC,SAAS,0CAA0C;AACtD,MAAa,iCAA+CA,IAAAA,EAAE,OAAO,EACnE,MAAM,6DAA6D,SAAS,EAC9E,CAAC,CAAC,CAAC,SAAS,uEAAuE;AAEnF,MAAa,2BAA2BC,eAAAA,OAAO,gCAAgC;CAC7E,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
//#region src/actions/add-labels-to-source.d.ts
|
|
4
|
+
declare const SegmentAddLabelsToSourceInput: z.ZodTypeAny;
|
|
5
|
+
declare const SegmentAddLabelsToSourceOutput: z.ZodTypeAny;
|
|
6
|
+
declare const segmentAddLabelsToSource: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { segmentAddLabelsToSource };
|
|
9
|
+
//# sourceMappingURL=add-labels-to-source.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"add-labels-to-source.d.cts","names":[],"sources":["../../src/actions/add-labels-to-source.ts"],"mappings":";;;cAIa,6BAAA,EAA+B,CAAA,CAAE,UAM2B;AAAA,cAQ5D,8BAAA,EAAgC,CAAA,CAAE,UAEqC;AAAA,cAEvE,wBAAA,gCAAwB,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
//#region src/actions/add-labels-to-source.d.ts
|
|
4
|
+
declare const SegmentAddLabelsToSourceInput: z.ZodTypeAny;
|
|
5
|
+
declare const SegmentAddLabelsToSourceOutput: z.ZodTypeAny;
|
|
6
|
+
declare const segmentAddLabelsToSource: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { segmentAddLabelsToSource };
|
|
9
|
+
//# sourceMappingURL=add-labels-to-source.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"add-labels-to-source.d.mts","names":[],"sources":["../../src/actions/add-labels-to-source.ts"],"mappings":";;;cAIa,6BAAA,EAA+B,CAAA,CAAE,UAM2B;AAAA,cAQ5D,8BAAA,EAAgC,CAAA,CAAE,UAEqC;AAAA,cAEvE,wBAAA,gCAAwB,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { action } from "../action.mjs";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
//#region src/actions/add-labels-to-source.ts
|
|
4
|
+
const SegmentAddLabelsToSourceInput = z.object({
|
|
5
|
+
labels: z.array(z.object({
|
|
6
|
+
key: z.string().describe("Label key"),
|
|
7
|
+
value: z.string().describe("Label value")
|
|
8
|
+
}).describe("A single key/value label.")).describe("List of labels to associate with the Source. Must include at least one label."),
|
|
9
|
+
sourceId: z.string().describe("ID of the Source (1-255 characters)")
|
|
10
|
+
}).describe("Request schema to add existing labels to a Segment Source.");
|
|
11
|
+
const SegmentAddLabelsToSource_LabelItemSchema = z.object({
|
|
12
|
+
key: z.string().describe("Label key"),
|
|
13
|
+
value: z.string().describe("Label value")
|
|
14
|
+
}).describe("A single key/value label.");
|
|
15
|
+
const SegmentAddLabelsToSource_AddLabelsToSourceResponseDataSchema = z.object({ labels: z.array(SegmentAddLabelsToSource_LabelItemSchema).describe("Labels now associated with the Source") }).describe("Envelope containing the response labels.");
|
|
16
|
+
const segmentAddLabelsToSource = action("SEGMENT_ADD_LABELS_TO_SOURCE", {
|
|
17
|
+
slug: "segment-add-labels-to-source",
|
|
18
|
+
name: "Add Labels to Source",
|
|
19
|
+
description: "Tool to add existing labels to a Source. Use when you have the source ID and want to tag it with metadata labels.",
|
|
20
|
+
input: SegmentAddLabelsToSourceInput,
|
|
21
|
+
output: z.object({ data: SegmentAddLabelsToSource_AddLabelsToSourceResponseDataSchema.nullable() }).describe("Response schema containing all labels now associated with the Source.")
|
|
22
|
+
});
|
|
23
|
+
//#endregion
|
|
24
|
+
export { segmentAddLabelsToSource };
|
|
25
|
+
|
|
26
|
+
//# sourceMappingURL=add-labels-to-source.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"add-labels-to-source.mjs","names":[],"sources":["../../src/actions/add-labels-to-source.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const SegmentAddLabelsToSourceInput: z.ZodTypeAny = z.object({\n labels: z.array(z.object({\n key: z.string().describe(\"Label key\"),\n value: z.string().describe(\"Label value\"),\n}).describe(\"A single key/value label.\")).describe(\"List of labels to associate with the Source. Must include at least one label.\"),\n sourceId: z.string().describe(\"ID of the Source (1-255 characters)\"),\n}).describe(\"Request schema to add existing labels to a Segment Source.\");\nconst SegmentAddLabelsToSource_LabelItemSchema: z.ZodTypeAny = z.object({\n key: z.string().describe(\"Label key\"),\n value: z.string().describe(\"Label value\"),\n}).describe(\"A single key/value label.\");\nconst SegmentAddLabelsToSource_AddLabelsToSourceResponseDataSchema: z.ZodTypeAny = z.object({\n labels: z.array(SegmentAddLabelsToSource_LabelItemSchema).describe(\"Labels now associated with the Source\"),\n}).describe(\"Envelope containing the response labels.\");\nexport const SegmentAddLabelsToSourceOutput: z.ZodTypeAny = z.object({\n data: SegmentAddLabelsToSource_AddLabelsToSourceResponseDataSchema.nullable(),\n}).describe(\"Response schema containing all labels now associated with the Source.\");\n\nexport const segmentAddLabelsToSource = action(\"SEGMENT_ADD_LABELS_TO_SOURCE\", {\n slug: \"segment-add-labels-to-source\",\n name: \"Add Labels to Source\",\n description: \"Tool to add existing labels to a Source. Use when you have the source ID and want to tag it with metadata labels.\",\n input: SegmentAddLabelsToSourceInput,\n output: SegmentAddLabelsToSourceOutput,\n});\n"],"mappings":";;;AAIA,MAAa,gCAA8C,EAAE,OAAO;CAClE,QAAQ,EAAE,MAAM,EAAE,OAAO;EACzB,KAAK,EAAE,OAAO,CAAC,CAAC,SAAS,WAAW;EACpC,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,aAAa;CAC1C,CAAC,CAAC,CAAC,SAAS,2BAA2B,CAAC,CAAC,CAAC,SAAS,+EAA+E;CAChI,UAAU,EAAE,OAAO,CAAC,CAAC,SAAS,qCAAqC;AACrE,CAAC,CAAC,CAAC,SAAS,4DAA4D;AACxE,MAAM,2CAAyD,EAAE,OAAO;CACtE,KAAK,EAAE,OAAO,CAAC,CAAC,SAAS,WAAW;CACpC,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,aAAa;AAC1C,CAAC,CAAC,CAAC,SAAS,2BAA2B;AACvC,MAAM,+DAA6E,EAAE,OAAO,EAC1F,QAAQ,EAAE,MAAM,wCAAwC,CAAC,CAAC,SAAS,uCAAuC,EAC5G,CAAC,CAAC,CAAC,SAAS,0CAA0C;AAKtD,MAAa,2BAA2B,OAAO,gCAAgC;CAC7E,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAT0D,EAAE,OAAO,EACnE,MAAM,6DAA6D,SAAS,EAC9E,CAAC,CAAC,CAAC,SAAS,uEAOF;AACV,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
const require_action = require("../action.cjs");
|
|
2
|
+
let zod = require("zod");
|
|
3
|
+
//#region src/actions/alias.ts
|
|
4
|
+
const SegmentAliasInput = zod.z.object({
|
|
5
|
+
userId: zod.z.string().describe("New known unique identifier for the user.").optional(),
|
|
6
|
+
context: zod.z.record(zod.z.string(), zod.z.unknown()).describe("Additional context (e.g., ip, locale).").optional(),
|
|
7
|
+
timestamp: zod.z.string().describe("ISO-8601 timestamp for the event; server time used if omitted.").optional(),
|
|
8
|
+
previousId: zod.z.string().describe("Previous unique identifier for the user."),
|
|
9
|
+
anonymousId: zod.z.string().describe("Anonymous identifier for the user.").optional(),
|
|
10
|
+
integrations: zod.z.object({}).describe("Per-destination enable/disable controls.").optional()
|
|
11
|
+
}).describe("Request model for aliasing two user identities via Segment HTTP API.\nExactly one of 'userId' or 'anonymousId' must be provided.");
|
|
12
|
+
const SegmentAliasOutput = zod.z.object({}).describe("Empty response indicating alias was accepted. Success is indicated by HTTP 200 status code.");
|
|
13
|
+
const segmentAlias = require_action.action("SEGMENT_ALIAS", {
|
|
14
|
+
slug: "segment-alias",
|
|
15
|
+
name: "Segment Alias",
|
|
16
|
+
description: "Tool to alias a previous user ID to a new user ID. Use when merging anonymous and known identities.",
|
|
17
|
+
input: SegmentAliasInput,
|
|
18
|
+
output: SegmentAliasOutput
|
|
19
|
+
});
|
|
20
|
+
//#endregion
|
|
21
|
+
exports.segmentAlias = segmentAlias;
|
|
22
|
+
|
|
23
|
+
//# sourceMappingURL=alias.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"alias.cjs","names":["z","action"],"sources":["../../src/actions/alias.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const SegmentAliasInput: z.ZodTypeAny = z.object({\n userId: z.string().describe(\"New known unique identifier for the user.\").optional(),\n context: z.record(z.string(), z.unknown()).describe(\"Additional context (e.g., ip, locale).\").optional(),\n timestamp: z.string().describe(\"ISO-8601 timestamp for the event; server time used if omitted.\").optional(),\n previousId: z.string().describe(\"Previous unique identifier for the user.\"),\n anonymousId: z.string().describe(\"Anonymous identifier for the user.\").optional(),\n integrations: z.object({}).describe(\"Per-destination enable/disable controls.\").optional(),\n}).describe(\"Request model for aliasing two user identities via Segment HTTP API.\\nExactly one of 'userId' or 'anonymousId' must be provided.\");\nexport const SegmentAliasOutput: z.ZodTypeAny = z.object({}).describe(\"Empty response indicating alias was accepted. Success is indicated by HTTP 200 status code.\");\n\nexport const segmentAlias = action(\"SEGMENT_ALIAS\", {\n slug: \"segment-alias\",\n name: \"Segment Alias\",\n description: \"Tool to alias a previous user ID to a new user ID. Use when merging anonymous and known identities.\",\n input: SegmentAliasInput,\n output: SegmentAliasOutput,\n});\n"],"mappings":";;;AAIA,MAAa,oBAAkCA,IAAAA,EAAE,OAAO;CACtD,QAAQA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,2CAA2C,CAAC,CAAC,SAAS;CAClF,SAASA,IAAAA,EAAE,OAAOA,IAAAA,EAAE,OAAO,GAAGA,IAAAA,EAAE,QAAQ,CAAC,CAAC,CAAC,SAAS,wCAAwC,CAAC,CAAC,SAAS;CACvG,WAAWA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,gEAAgE,CAAC,CAAC,SAAS;CAC1G,YAAYA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,0CAA0C;CAC1E,aAAaA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,oCAAoC,CAAC,CAAC,SAAS;CAChF,cAAcA,IAAAA,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS,0CAA0C,CAAC,CAAC,SAAS;AAC3F,CAAC,CAAC,CAAC,SAAS,kIAAkI;AAC9I,MAAa,qBAAmCA,IAAAA,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS,6FAA6F;AAEnK,MAAa,eAAeC,eAAAA,OAAO,iBAAiB;CAClD,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
//#region src/actions/alias.d.ts
|
|
4
|
+
declare const SegmentAliasInput: z.ZodTypeAny;
|
|
5
|
+
declare const SegmentAliasOutput: z.ZodTypeAny;
|
|
6
|
+
declare const segmentAlias: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { segmentAlias };
|
|
9
|
+
//# sourceMappingURL=alias.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"alias.d.cts","names":[],"sources":["../../src/actions/alias.ts"],"mappings":";;;cAIa,iBAAA,EAAmB,CAAA,CAAE,UAO6G;AAAA,cAClI,kBAAA,EAAoB,CAAA,CAAE,UAAiI;AAAA,cAEvJ,YAAA,gCAAY,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
//#region src/actions/alias.d.ts
|
|
4
|
+
declare const SegmentAliasInput: z.ZodTypeAny;
|
|
5
|
+
declare const SegmentAliasOutput: z.ZodTypeAny;
|
|
6
|
+
declare const segmentAlias: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { segmentAlias };
|
|
9
|
+
//# sourceMappingURL=alias.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"alias.d.mts","names":[],"sources":["../../src/actions/alias.ts"],"mappings":";;;cAIa,iBAAA,EAAmB,CAAA,CAAE,UAO6G;AAAA,cAClI,kBAAA,EAAoB,CAAA,CAAE,UAAiI;AAAA,cAEvJ,YAAA,gCAAY,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { action } from "../action.mjs";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
const segmentAlias = action("SEGMENT_ALIAS", {
|
|
4
|
+
slug: "segment-alias",
|
|
5
|
+
name: "Segment Alias",
|
|
6
|
+
description: "Tool to alias a previous user ID to a new user ID. Use when merging anonymous and known identities.",
|
|
7
|
+
input: z.object({
|
|
8
|
+
userId: z.string().describe("New known unique identifier for the user.").optional(),
|
|
9
|
+
context: z.record(z.string(), z.unknown()).describe("Additional context (e.g., ip, locale).").optional(),
|
|
10
|
+
timestamp: z.string().describe("ISO-8601 timestamp for the event; server time used if omitted.").optional(),
|
|
11
|
+
previousId: z.string().describe("Previous unique identifier for the user."),
|
|
12
|
+
anonymousId: z.string().describe("Anonymous identifier for the user.").optional(),
|
|
13
|
+
integrations: z.object({}).describe("Per-destination enable/disable controls.").optional()
|
|
14
|
+
}).describe("Request model for aliasing two user identities via Segment HTTP API.\nExactly one of 'userId' or 'anonymousId' must be provided."),
|
|
15
|
+
output: z.object({}).describe("Empty response indicating alias was accepted. Success is indicated by HTTP 200 status code.")
|
|
16
|
+
});
|
|
17
|
+
//#endregion
|
|
18
|
+
export { segmentAlias };
|
|
19
|
+
|
|
20
|
+
//# sourceMappingURL=alias.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"alias.mjs","names":[],"sources":["../../src/actions/alias.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const SegmentAliasInput: z.ZodTypeAny = z.object({\n userId: z.string().describe(\"New known unique identifier for the user.\").optional(),\n context: z.record(z.string(), z.unknown()).describe(\"Additional context (e.g., ip, locale).\").optional(),\n timestamp: z.string().describe(\"ISO-8601 timestamp for the event; server time used if omitted.\").optional(),\n previousId: z.string().describe(\"Previous unique identifier for the user.\"),\n anonymousId: z.string().describe(\"Anonymous identifier for the user.\").optional(),\n integrations: z.object({}).describe(\"Per-destination enable/disable controls.\").optional(),\n}).describe(\"Request model for aliasing two user identities via Segment HTTP API.\\nExactly one of 'userId' or 'anonymousId' must be provided.\");\nexport const SegmentAliasOutput: z.ZodTypeAny = z.object({}).describe(\"Empty response indicating alias was accepted. Success is indicated by HTTP 200 status code.\");\n\nexport const segmentAlias = action(\"SEGMENT_ALIAS\", {\n slug: \"segment-alias\",\n name: \"Segment Alias\",\n description: \"Tool to alias a previous user ID to a new user ID. Use when merging anonymous and known identities.\",\n input: SegmentAliasInput,\n output: SegmentAliasOutput,\n});\n"],"mappings":";;AAcA,MAAa,eAAe,OAAO,iBAAiB;CAClD,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAd6C,EAAE,OAAO;EACtD,QAAQ,EAAE,OAAO,CAAC,CAAC,SAAS,2CAA2C,CAAC,CAAC,SAAS;EAClF,SAAS,EAAE,OAAO,EAAE,OAAO,GAAG,EAAE,QAAQ,CAAC,CAAC,CAAC,SAAS,wCAAwC,CAAC,CAAC,SAAS;EACvG,WAAW,EAAE,OAAO,CAAC,CAAC,SAAS,gEAAgE,CAAC,CAAC,SAAS;EAC1G,YAAY,EAAE,OAAO,CAAC,CAAC,SAAS,0CAA0C;EAC1E,aAAa,EAAE,OAAO,CAAC,CAAC,SAAS,oCAAoC,CAAC,CAAC,SAAS;EAChF,cAAc,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS,0CAA0C,CAAC,CAAC,SAAS;CAC3F,CAAC,CAAC,CAAC,SAAS,kIAOH;CACP,QAP8C,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS,6FAO5D;AACV,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
const require_action = require("../action.cjs");
|
|
2
|
+
let zod = require("zod");
|
|
3
|
+
//#region src/actions/batch.ts
|
|
4
|
+
const SegmentBatchInput = zod.z.object({
|
|
5
|
+
batch: zod.z.array(zod.z.record(zod.z.string(), zod.z.unknown())).describe("Array of analytics calls (identify, track, page, screen, or group). Each item must include 'type' and required fields per call type."),
|
|
6
|
+
context: zod.z.record(zod.z.string(), zod.z.unknown()).describe("Optional top-level context merged into each call's context.").optional(),
|
|
7
|
+
writeKey: zod.z.string().describe("Segment write key; required when using Bearer authentication.").optional(),
|
|
8
|
+
integrations: zod.z.record(zod.z.string(), zod.z.unknown()).describe("Optional top-level integrations merged into each call's integrations.").optional()
|
|
9
|
+
}).describe("Request schema for sending multiple analytics calls in a single batch request.");
|
|
10
|
+
const SegmentBatchOutput = zod.z.object({}).describe("Response schema for the batch call. Typically empty for accepted requests.");
|
|
11
|
+
const segmentBatch = require_action.action("SEGMENT_BATCH", {
|
|
12
|
+
slug: "segment-batch",
|
|
13
|
+
name: "Batch Segment Analytics Events",
|
|
14
|
+
description: "Tool to send multiple analytics calls in a single batch request. Use when you want to reduce HTTP overhead by batching Identify/Track/Page/Screen/Group calls into one request.",
|
|
15
|
+
input: SegmentBatchInput,
|
|
16
|
+
output: SegmentBatchOutput
|
|
17
|
+
});
|
|
18
|
+
//#endregion
|
|
19
|
+
exports.segmentBatch = segmentBatch;
|
|
20
|
+
|
|
21
|
+
//# sourceMappingURL=batch.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"batch.cjs","names":["z","action"],"sources":["../../src/actions/batch.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const SegmentBatchInput: z.ZodTypeAny = z.object({\n batch: z.array(z.record(z.string(), z.unknown())).describe(\"Array of analytics calls (identify, track, page, screen, or group). Each item must include 'type' and required fields per call type.\"),\n context: z.record(z.string(), z.unknown()).describe(\"Optional top-level context merged into each call's context.\").optional(),\n writeKey: z.string().describe(\"Segment write key; required when using Bearer authentication.\").optional(),\n integrations: z.record(z.string(), z.unknown()).describe(\"Optional top-level integrations merged into each call's integrations.\").optional(),\n}).describe(\"Request schema for sending multiple analytics calls in a single batch request.\");\nexport const SegmentBatchOutput: z.ZodTypeAny = z.object({}).describe(\"Response schema for the batch call. Typically empty for accepted requests.\");\n\nexport const segmentBatch = action(\"SEGMENT_BATCH\", {\n slug: \"segment-batch\",\n name: \"Batch Segment Analytics Events\",\n description: \"Tool to send multiple analytics calls in a single batch request. Use when you want to reduce HTTP overhead by batching Identify/Track/Page/Screen/Group calls into one request.\",\n input: SegmentBatchInput,\n output: SegmentBatchOutput,\n});\n"],"mappings":";;;AAIA,MAAa,oBAAkCA,IAAAA,EAAE,OAAO;CACtD,OAAOA,IAAAA,EAAE,MAAMA,IAAAA,EAAE,OAAOA,IAAAA,EAAE,OAAO,GAAGA,IAAAA,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,SAAS,sIAAsI;CACjM,SAASA,IAAAA,EAAE,OAAOA,IAAAA,EAAE,OAAO,GAAGA,IAAAA,EAAE,QAAQ,CAAC,CAAC,CAAC,SAAS,6DAA6D,CAAC,CAAC,SAAS;CAC5H,UAAUA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,+DAA+D,CAAC,CAAC,SAAS;CACxG,cAAcA,IAAAA,EAAE,OAAOA,IAAAA,EAAE,OAAO,GAAGA,IAAAA,EAAE,QAAQ,CAAC,CAAC,CAAC,SAAS,uEAAuE,CAAC,CAAC,SAAS;AAC7I,CAAC,CAAC,CAAC,SAAS,gFAAgF;AAC5F,MAAa,qBAAmCA,IAAAA,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS,4EAA4E;AAElJ,MAAa,eAAeC,eAAAA,OAAO,iBAAiB;CAClD,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
//#region src/actions/batch.d.ts
|
|
4
|
+
declare const SegmentBatchInput: z.ZodTypeAny;
|
|
5
|
+
declare const SegmentBatchOutput: z.ZodTypeAny;
|
|
6
|
+
declare const segmentBatch: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { segmentBatch };
|
|
9
|
+
//# sourceMappingURL=batch.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"batch.d.cts","names":[],"sources":["../../src/actions/batch.ts"],"mappings":";;;cAIa,iBAAA,EAAmB,CAAA,CAAE,UAK2D;AAAA,cAChF,kBAAA,EAAoB,CAAA,CAAE,UAAgH;AAAA,cAEtI,YAAA,gCAAY,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
//#region src/actions/batch.d.ts
|
|
4
|
+
declare const SegmentBatchInput: z.ZodTypeAny;
|
|
5
|
+
declare const SegmentBatchOutput: z.ZodTypeAny;
|
|
6
|
+
declare const segmentBatch: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { segmentBatch };
|
|
9
|
+
//# sourceMappingURL=batch.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"batch.d.mts","names":[],"sources":["../../src/actions/batch.ts"],"mappings":";;;cAIa,iBAAA,EAAmB,CAAA,CAAE,UAK2D;AAAA,cAChF,kBAAA,EAAoB,CAAA,CAAE,UAAgH;AAAA,cAEtI,YAAA,gCAAY,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { action } from "../action.mjs";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
const segmentBatch = action("SEGMENT_BATCH", {
|
|
4
|
+
slug: "segment-batch",
|
|
5
|
+
name: "Batch Segment Analytics Events",
|
|
6
|
+
description: "Tool to send multiple analytics calls in a single batch request. Use when you want to reduce HTTP overhead by batching Identify/Track/Page/Screen/Group calls into one request.",
|
|
7
|
+
input: z.object({
|
|
8
|
+
batch: z.array(z.record(z.string(), z.unknown())).describe("Array of analytics calls (identify, track, page, screen, or group). Each item must include 'type' and required fields per call type."),
|
|
9
|
+
context: z.record(z.string(), z.unknown()).describe("Optional top-level context merged into each call's context.").optional(),
|
|
10
|
+
writeKey: z.string().describe("Segment write key; required when using Bearer authentication.").optional(),
|
|
11
|
+
integrations: z.record(z.string(), z.unknown()).describe("Optional top-level integrations merged into each call's integrations.").optional()
|
|
12
|
+
}).describe("Request schema for sending multiple analytics calls in a single batch request."),
|
|
13
|
+
output: z.object({}).describe("Response schema for the batch call. Typically empty for accepted requests.")
|
|
14
|
+
});
|
|
15
|
+
//#endregion
|
|
16
|
+
export { segmentBatch };
|
|
17
|
+
|
|
18
|
+
//# sourceMappingURL=batch.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"batch.mjs","names":[],"sources":["../../src/actions/batch.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const SegmentBatchInput: z.ZodTypeAny = z.object({\n batch: z.array(z.record(z.string(), z.unknown())).describe(\"Array of analytics calls (identify, track, page, screen, or group). Each item must include 'type' and required fields per call type.\"),\n context: z.record(z.string(), z.unknown()).describe(\"Optional top-level context merged into each call's context.\").optional(),\n writeKey: z.string().describe(\"Segment write key; required when using Bearer authentication.\").optional(),\n integrations: z.record(z.string(), z.unknown()).describe(\"Optional top-level integrations merged into each call's integrations.\").optional(),\n}).describe(\"Request schema for sending multiple analytics calls in a single batch request.\");\nexport const SegmentBatchOutput: z.ZodTypeAny = z.object({}).describe(\"Response schema for the batch call. Typically empty for accepted requests.\");\n\nexport const segmentBatch = action(\"SEGMENT_BATCH\", {\n slug: \"segment-batch\",\n name: \"Batch Segment Analytics Events\",\n description: \"Tool to send multiple analytics calls in a single batch request. Use when you want to reduce HTTP overhead by batching Identify/Track/Page/Screen/Group calls into one request.\",\n input: SegmentBatchInput,\n output: SegmentBatchOutput,\n});\n"],"mappings":";;AAYA,MAAa,eAAe,OAAO,iBAAiB;CAClD,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAZ6C,EAAE,OAAO;EACtD,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,SAAS,sIAAsI;EACjM,SAAS,EAAE,OAAO,EAAE,OAAO,GAAG,EAAE,QAAQ,CAAC,CAAC,CAAC,SAAS,6DAA6D,CAAC,CAAC,SAAS;EAC5H,UAAU,EAAE,OAAO,CAAC,CAAC,SAAS,+DAA+D,CAAC,CAAC,SAAS;EACxG,cAAc,EAAE,OAAO,EAAE,OAAO,GAAG,EAAE,QAAQ,CAAC,CAAC,CAAC,SAAS,uEAAuE,CAAC,CAAC,SAAS;CAC7I,CAAC,CAAC,CAAC,SAAS,gFAOH;CACP,QAP8C,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS,4EAO5D;AACV,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
const require_action = require("../action.cjs");
|
|
2
|
+
let zod = require("zod");
|
|
3
|
+
//#region src/actions/delete-source.ts
|
|
4
|
+
const SegmentDeleteSourceInput = zod.z.object({ sourceId: zod.z.string().describe("The Source ID. Length 1–255 characters.") }).describe("Parameters to delete a Segment Source. Provide the sourceId to identify the Source to remove.");
|
|
5
|
+
const SegmentDeleteSource_DeleteSourceDataSchema = zod.z.object({ status: zod.z.string().describe("Operation outcome; returns 'SUCCESS' on successful deletion.") }).describe("Envelope for deletion result.");
|
|
6
|
+
const SegmentDeleteSourceOutput = zod.z.object({ data: SegmentDeleteSource_DeleteSourceDataSchema.nullable() });
|
|
7
|
+
const segmentDeleteSource = require_action.action("SEGMENT_DELETE_SOURCE", {
|
|
8
|
+
slug: "segment-delete-source",
|
|
9
|
+
name: "Delete Source",
|
|
10
|
+
description: "Tool to delete a Segment Source. Use when you need to permanently remove a Source by its ID after confirmation.",
|
|
11
|
+
input: SegmentDeleteSourceInput,
|
|
12
|
+
output: SegmentDeleteSourceOutput
|
|
13
|
+
});
|
|
14
|
+
//#endregion
|
|
15
|
+
exports.segmentDeleteSource = segmentDeleteSource;
|
|
16
|
+
|
|
17
|
+
//# sourceMappingURL=delete-source.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delete-source.cjs","names":["z","action"],"sources":["../../src/actions/delete-source.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const SegmentDeleteSourceInput: z.ZodTypeAny = z.object({\n sourceId: z.string().describe(\"The Source ID. Length 1–255 characters.\"),\n}).describe(\"Parameters to delete a Segment Source. Provide the sourceId to identify the Source to remove.\");\nconst SegmentDeleteSource_DeleteSourceDataSchema: z.ZodTypeAny = z.object({\n status: z.string().describe(\"Operation outcome; returns 'SUCCESS' on successful deletion.\"),\n}).describe(\"Envelope for deletion result.\");\nexport const SegmentDeleteSourceOutput: z.ZodTypeAny = z.object({\n data: SegmentDeleteSource_DeleteSourceDataSchema.nullable(),\n});\n\nexport const segmentDeleteSource = action(\"SEGMENT_DELETE_SOURCE\", {\n slug: \"segment-delete-source\",\n name: \"Delete Source\",\n description: \"Tool to delete a Segment Source. Use when you need to permanently remove a Source by its ID after confirmation.\",\n input: SegmentDeleteSourceInput,\n output: SegmentDeleteSourceOutput,\n});\n"],"mappings":";;;AAIA,MAAa,2BAAyCA,IAAAA,EAAE,OAAO,EAC7D,UAAUA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,yCAAyC,EACzE,CAAC,CAAC,CAAC,SAAS,+FAA+F;AAC3G,MAAM,6CAA2DA,IAAAA,EAAE,OAAO,EACxE,QAAQA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,8DAA8D,EAC5F,CAAC,CAAC,CAAC,SAAS,+BAA+B;AAC3C,MAAa,4BAA0CA,IAAAA,EAAE,OAAO,EAC9D,MAAM,2CAA2C,SAAS,EAC5D,CAAC;AAED,MAAa,sBAAsBC,eAAAA,OAAO,yBAAyB;CACjE,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
//#region src/actions/delete-source.d.ts
|
|
4
|
+
declare const SegmentDeleteSourceInput: z.ZodTypeAny;
|
|
5
|
+
declare const SegmentDeleteSourceOutput: z.ZodTypeAny;
|
|
6
|
+
declare const segmentDeleteSource: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { segmentDeleteSource };
|
|
9
|
+
//# sourceMappingURL=delete-source.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delete-source.d.cts","names":[],"sources":["../../src/actions/delete-source.ts"],"mappings":";;;cAIa,wBAAA,EAA0B,CAAA,CAAE,UAEmE;AAAA,cAI/F,yBAAA,EAA2B,CAAA,CAAE,UAExC;AAAA,cAEW,mBAAA,gCAAmB,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
//#region src/actions/delete-source.d.ts
|
|
4
|
+
declare const SegmentDeleteSourceInput: z.ZodTypeAny;
|
|
5
|
+
declare const SegmentDeleteSourceOutput: z.ZodTypeAny;
|
|
6
|
+
declare const segmentDeleteSource: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { segmentDeleteSource };
|
|
9
|
+
//# sourceMappingURL=delete-source.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delete-source.d.mts","names":[],"sources":["../../src/actions/delete-source.ts"],"mappings":";;;cAIa,wBAAA,EAA0B,CAAA,CAAE,UAEmE;AAAA,cAI/F,yBAAA,EAA2B,CAAA,CAAE,UAExC;AAAA,cAEW,mBAAA,gCAAmB,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { action } from "../action.mjs";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
//#region src/actions/delete-source.ts
|
|
4
|
+
const SegmentDeleteSourceInput = z.object({ sourceId: z.string().describe("The Source ID. Length 1–255 characters.") }).describe("Parameters to delete a Segment Source. Provide the sourceId to identify the Source to remove.");
|
|
5
|
+
const SegmentDeleteSource_DeleteSourceDataSchema = z.object({ status: z.string().describe("Operation outcome; returns 'SUCCESS' on successful deletion.") }).describe("Envelope for deletion result.");
|
|
6
|
+
const segmentDeleteSource = action("SEGMENT_DELETE_SOURCE", {
|
|
7
|
+
slug: "segment-delete-source",
|
|
8
|
+
name: "Delete Source",
|
|
9
|
+
description: "Tool to delete a Segment Source. Use when you need to permanently remove a Source by its ID after confirmation.",
|
|
10
|
+
input: SegmentDeleteSourceInput,
|
|
11
|
+
output: z.object({ data: SegmentDeleteSource_DeleteSourceDataSchema.nullable() })
|
|
12
|
+
});
|
|
13
|
+
//#endregion
|
|
14
|
+
export { segmentDeleteSource };
|
|
15
|
+
|
|
16
|
+
//# sourceMappingURL=delete-source.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delete-source.mjs","names":[],"sources":["../../src/actions/delete-source.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const SegmentDeleteSourceInput: z.ZodTypeAny = z.object({\n sourceId: z.string().describe(\"The Source ID. Length 1–255 characters.\"),\n}).describe(\"Parameters to delete a Segment Source. Provide the sourceId to identify the Source to remove.\");\nconst SegmentDeleteSource_DeleteSourceDataSchema: z.ZodTypeAny = z.object({\n status: z.string().describe(\"Operation outcome; returns 'SUCCESS' on successful deletion.\"),\n}).describe(\"Envelope for deletion result.\");\nexport const SegmentDeleteSourceOutput: z.ZodTypeAny = z.object({\n data: SegmentDeleteSource_DeleteSourceDataSchema.nullable(),\n});\n\nexport const segmentDeleteSource = action(\"SEGMENT_DELETE_SOURCE\", {\n slug: \"segment-delete-source\",\n name: \"Delete Source\",\n description: \"Tool to delete a Segment Source. Use when you need to permanently remove a Source by its ID after confirmation.\",\n input: SegmentDeleteSourceInput,\n output: SegmentDeleteSourceOutput,\n});\n"],"mappings":";;;AAIA,MAAa,2BAAyC,EAAE,OAAO,EAC7D,UAAU,EAAE,OAAO,CAAC,CAAC,SAAS,yCAAyC,EACzE,CAAC,CAAC,CAAC,SAAS,+FAA+F;AAC3G,MAAM,6CAA2D,EAAE,OAAO,EACxE,QAAQ,EAAE,OAAO,CAAC,CAAC,SAAS,8DAA8D,EAC5F,CAAC,CAAC,CAAC,SAAS,+BAA+B;AAK3C,MAAa,sBAAsB,OAAO,yBAAyB;CACjE,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QATqD,EAAE,OAAO,EAC9D,MAAM,2CAA2C,SAAS,EAC5D,CAOU;AACV,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
const require_action = require("../action.cjs");
|
|
2
|
+
let zod = require("zod");
|
|
3
|
+
//#region src/actions/get-daily-per-source-api-calls-usage.ts
|
|
4
|
+
const SegmentGetDailyPerSourceApiCallsUsageInput = zod.z.object({
|
|
5
|
+
period: zod.z.string().describe("Start of the usage period in ISO-8601 format (YYYY-MM-DD), e.g. '2021-02-01'."),
|
|
6
|
+
pagination: zod.z.object({
|
|
7
|
+
count: zod.z.number().int().describe("Page size (number of records to return). Defaults to 200 if omitted.").optional(),
|
|
8
|
+
cursor: zod.z.string().describe("Cursor token for the next page of results.").optional()
|
|
9
|
+
}).describe("Pagination parameters for querying source daily API calls usage.").optional()
|
|
10
|
+
}).describe("Request parameters to fetch daily API call counts per source.");
|
|
11
|
+
const SegmentGetDailyPerSourceApiCallsUsage_PaginationMetaSchema = zod.z.object({
|
|
12
|
+
next: zod.z.string().describe("Cursor for the next page, if any.").nullable().optional(),
|
|
13
|
+
current: zod.z.string().describe("Cursor for the current page."),
|
|
14
|
+
previous: zod.z.string().describe("Cursor for the previous page, if any.").nullable().optional(),
|
|
15
|
+
totalEntries: zod.z.number().int().describe("Total number of records available.")
|
|
16
|
+
});
|
|
17
|
+
const SegmentGetDailyPerSourceApiCallsUsage_DailyPerSourceUsageRecordSchema = zod.z.object({
|
|
18
|
+
apiCalls: zod.z.string().describe("API call count for the source and day."),
|
|
19
|
+
sourceId: zod.z.string().describe("Source identifier."),
|
|
20
|
+
timestamp: zod.z.string().describe("Date this usage applies to in ISO-8601 format.")
|
|
21
|
+
});
|
|
22
|
+
const SegmentGetDailyPerSourceApiCallsUsage_GetDailyPerSourceApiCallsUsageResponseDataSchema = zod.z.object({
|
|
23
|
+
pagination: SegmentGetDailyPerSourceApiCallsUsage_PaginationMetaSchema.nullable(),
|
|
24
|
+
dailyPerSourceAPICallsUsage: zod.z.array(SegmentGetDailyPerSourceApiCallsUsage_DailyPerSourceUsageRecordSchema).describe("List of daily API call usage records per source.")
|
|
25
|
+
});
|
|
26
|
+
const SegmentGetDailyPerSourceApiCallsUsageOutput = zod.z.object({ data: SegmentGetDailyPerSourceApiCallsUsage_GetDailyPerSourceApiCallsUsageResponseDataSchema.nullable() });
|
|
27
|
+
const segmentGetDailyPerSourceApiCallsUsage = require_action.action("SEGMENT_GET_DAILY_PER_SOURCE_API_CALLS_USAGE", {
|
|
28
|
+
slug: "segment-get-daily-per-source-api-calls-usage",
|
|
29
|
+
name: "Get Daily Per Source API Calls Usage",
|
|
30
|
+
description: "Tool to fetch daily API call counts per source for a given period. Use when you need daily breakdown of API usage by source after determining the reporting period.",
|
|
31
|
+
input: SegmentGetDailyPerSourceApiCallsUsageInput,
|
|
32
|
+
output: SegmentGetDailyPerSourceApiCallsUsageOutput
|
|
33
|
+
});
|
|
34
|
+
//#endregion
|
|
35
|
+
exports.segmentGetDailyPerSourceApiCallsUsage = segmentGetDailyPerSourceApiCallsUsage;
|
|
36
|
+
|
|
37
|
+
//# sourceMappingURL=get-daily-per-source-api-calls-usage.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-daily-per-source-api-calls-usage.cjs","names":["z","action"],"sources":["../../src/actions/get-daily-per-source-api-calls-usage.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const SegmentGetDailyPerSourceApiCallsUsageInput: z.ZodTypeAny = z.object({\n period: z.string().describe(\"Start of the usage period in ISO-8601 format (YYYY-MM-DD), e.g. '2021-02-01'.\"),\n pagination: z.object({\n count: z.number().int().describe(\"Page size (number of records to return). Defaults to 200 if omitted.\").optional(),\n cursor: z.string().describe(\"Cursor token for the next page of results.\").optional(),\n}).describe(\"Pagination parameters for querying source daily API calls usage.\").optional(),\n}).describe(\"Request parameters to fetch daily API call counts per source.\");\nconst SegmentGetDailyPerSourceApiCallsUsage_PaginationMetaSchema: z.ZodTypeAny = z.object({\n next: z.string().describe(\"Cursor for the next page, if any.\").nullable().optional(),\n current: z.string().describe(\"Cursor for the current page.\"),\n previous: z.string().describe(\"Cursor for the previous page, if any.\").nullable().optional(),\n totalEntries: z.number().int().describe(\"Total number of records available.\"),\n});\nconst SegmentGetDailyPerSourceApiCallsUsage_DailyPerSourceUsageRecordSchema: z.ZodTypeAny = z.object({\n apiCalls: z.string().describe(\"API call count for the source and day.\"),\n sourceId: z.string().describe(\"Source identifier.\"),\n timestamp: z.string().describe(\"Date this usage applies to in ISO-8601 format.\"),\n});\nconst SegmentGetDailyPerSourceApiCallsUsage_GetDailyPerSourceApiCallsUsageResponseDataSchema: z.ZodTypeAny = z.object({\n pagination: SegmentGetDailyPerSourceApiCallsUsage_PaginationMetaSchema.nullable(),\n dailyPerSourceAPICallsUsage: z.array(SegmentGetDailyPerSourceApiCallsUsage_DailyPerSourceUsageRecordSchema).describe(\"List of daily API call usage records per source.\"),\n});\nexport const SegmentGetDailyPerSourceApiCallsUsageOutput: z.ZodTypeAny = z.object({\n data: SegmentGetDailyPerSourceApiCallsUsage_GetDailyPerSourceApiCallsUsageResponseDataSchema.nullable(),\n});\n\nexport const segmentGetDailyPerSourceApiCallsUsage = action(\"SEGMENT_GET_DAILY_PER_SOURCE_API_CALLS_USAGE\", {\n slug: \"segment-get-daily-per-source-api-calls-usage\",\n name: \"Get Daily Per Source API Calls Usage\",\n description: \"Tool to fetch daily API call counts per source for a given period. Use when you need daily breakdown of API usage by source after determining the reporting period.\",\n input: SegmentGetDailyPerSourceApiCallsUsageInput,\n output: SegmentGetDailyPerSourceApiCallsUsageOutput,\n});\n"],"mappings":";;;AAIA,MAAa,6CAA2DA,IAAAA,EAAE,OAAO;CAC/E,QAAQA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,+EAA+E;CAC3G,YAAYA,IAAAA,EAAE,OAAO;EACrB,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,sEAAsE,CAAC,CAAC,SAAS;EAClH,QAAQA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,4CAA4C,CAAC,CAAC,SAAS;CACrF,CAAC,CAAC,CAAC,SAAS,kEAAkE,CAAC,CAAC,SAAS;AACzF,CAAC,CAAC,CAAC,SAAS,+DAA+D;AAC3E,MAAM,6DAA2EA,IAAAA,EAAE,OAAO;CACxF,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,mCAAmC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACnF,SAASA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,8BAA8B;CAC3D,UAAUA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,uCAAuC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC3F,cAAcA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,oCAAoC;AAC9E,CAAC;AACD,MAAM,wEAAsFA,IAAAA,EAAE,OAAO;CACnG,UAAUA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,wCAAwC;CACtE,UAAUA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,oBAAoB;CAClD,WAAWA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,gDAAgD;AACjF,CAAC;AACD,MAAM,yFAAuGA,IAAAA,EAAE,OAAO;CACpH,YAAY,2DAA2D,SAAS;CAChF,6BAA6BA,IAAAA,EAAE,MAAM,qEAAqE,CAAC,CAAC,SAAS,kDAAkD;AACzK,CAAC;AACD,MAAa,8CAA4DA,IAAAA,EAAE,OAAO,EAChF,MAAM,uFAAuF,SAAS,EACxG,CAAC;AAED,MAAa,wCAAwCC,eAAAA,OAAO,gDAAgD;CAC1G,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
//#region src/actions/get-daily-per-source-api-calls-usage.d.ts
|
|
4
|
+
declare const SegmentGetDailyPerSourceApiCallsUsageInput: z.ZodTypeAny;
|
|
5
|
+
declare const SegmentGetDailyPerSourceApiCallsUsageOutput: z.ZodTypeAny;
|
|
6
|
+
declare const segmentGetDailyPerSourceApiCallsUsage: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { segmentGetDailyPerSourceApiCallsUsage };
|
|
9
|
+
//# sourceMappingURL=get-daily-per-source-api-calls-usage.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-daily-per-source-api-calls-usage.d.cts","names":[],"sources":["../../src/actions/get-daily-per-source-api-calls-usage.ts"],"mappings":";;;cAIa,0CAAA,EAA4C,CAAA,CAAE,UAMiB;AAAA,cAgB/D,2CAAA,EAA6C,CAAA,CAAE,UAE1D;AAAA,cAEW,qCAAA,gCAAqC,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
|