@keystrokehq/segment 0.0.1
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 +232 -0
- package/dist/_official/index.d.mts +2 -0
- package/dist/_official/index.mjs +3 -0
- package/dist/_runtime/index.d.mts +1 -0
- package/dist/_runtime/index.mjs +1 -0
- package/dist/audiences.d.mts +282 -0
- package/dist/audiences.mjs +205 -0
- package/dist/client.d.mts +90 -0
- package/dist/client.mjs +337 -0
- package/dist/common-CdGiJbjq.mjs +56 -0
- package/dist/computed-traits.d.mts +215 -0
- package/dist/computed-traits.mjs +149 -0
- package/dist/connection.d.mts +2 -0
- package/dist/connection.mjs +3 -0
- package/dist/crud-SWa_79Hg.mjs +140 -0
- package/dist/deletion-suppression.d.mts +191 -0
- package/dist/deletion-suppression.mjs +103 -0
- package/dist/delivery-overview.d.mts +79 -0
- package/dist/delivery-overview.mjs +54 -0
- package/dist/destination-filters.d.mts +190 -0
- package/dist/destination-filters.mjs +115 -0
- package/dist/destinations.d.mts +473 -0
- package/dist/destinations.mjs +257 -0
- package/dist/edge-functions.d.mts +168 -0
- package/dist/edge-functions.mjs +72 -0
- package/dist/errors-4FGnrowW.mjs +27 -0
- package/dist/events-catalog.d.mts +111 -0
- package/dist/events-catalog.mjs +65 -0
- package/dist/events.d.mts +167 -0
- package/dist/events.mjs +134 -0
- package/dist/factory-CvfKfzMq.mjs +8 -0
- package/dist/functions.d.mts +347 -0
- package/dist/functions.mjs +180 -0
- package/dist/iam-groups.d.mts +284 -0
- package/dist/iam-groups.mjs +144 -0
- package/dist/iam-users.d.mts +205 -0
- package/dist/iam-users.mjs +91 -0
- package/dist/index.d.mts +1 -0
- package/dist/index.mjs +1 -0
- package/dist/integration-B5zYasBZ.mjs +25 -0
- package/dist/integration-D2yRaKFR.d.mts +67 -0
- package/dist/labels.d.mts +100 -0
- package/dist/labels.mjs +58 -0
- package/dist/monitoring.d.mts +182 -0
- package/dist/monitoring.mjs +88 -0
- package/dist/profiles-sync.d.mts +127 -0
- package/dist/profiles-sync.mjs +89 -0
- package/dist/profiles.d.mts +197 -0
- package/dist/profiles.mjs +137 -0
- package/dist/reverse-etl.d.mts +448 -0
- package/dist/reverse-etl.mjs +228 -0
- package/dist/roles.d.mts +48 -0
- package/dist/roles.mjs +25 -0
- package/dist/schemas/index.d.mts +57 -0
- package/dist/schemas/index.mjs +3 -0
- package/dist/sources.d.mts +560 -0
- package/dist/sources.mjs +259 -0
- package/dist/tracking-plans.d.mts +351 -0
- package/dist/tracking-plans.mjs +160 -0
- package/dist/tracking.d.mts +499 -0
- package/dist/tracking.mjs +255 -0
- package/dist/transformations.d.mts +188 -0
- package/dist/transformations.mjs +83 -0
- package/dist/triggers.d.mts +54 -0
- package/dist/triggers.mjs +341 -0
- package/dist/usage.d.mts +70 -0
- package/dist/usage.mjs +55 -0
- package/dist/verification.d.mts +17 -0
- package/dist/verification.mjs +51 -0
- package/dist/warehouses.d.mts +341 -0
- package/dist/warehouses.mjs +176 -0
- package/dist/workspaces.d.mts +95 -0
- package/dist/workspaces.mjs +67 -0
- package/package.json +188 -0
package/dist/roles.d.mts
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import * as _keystrokehq_core_credential_set0 from "@keystrokehq/core/credential-set";
|
|
3
|
+
import * as _keystrokehq_core0 from "@keystrokehq/core";
|
|
4
|
+
|
|
5
|
+
//#region src/roles.d.ts
|
|
6
|
+
declare const roleSchema: z.ZodObject<{
|
|
7
|
+
id: z.ZodString;
|
|
8
|
+
name: z.ZodOptional<z.ZodString>;
|
|
9
|
+
description: z.ZodOptional<z.ZodString>;
|
|
10
|
+
permissions: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
11
|
+
}, z.core.$catchall<z.ZodUnknown>>;
|
|
12
|
+
declare const listRoles: _keystrokehq_core0.Operation<z.ZodIntersection<z.ZodObject<{
|
|
13
|
+
pageSize: z.ZodOptional<z.ZodNumber>;
|
|
14
|
+
pageToken: z.ZodOptional<z.ZodString>;
|
|
15
|
+
}, z.core.$strip>, z.ZodObject<{}, z.core.$strip>>, z.ZodObject<{
|
|
16
|
+
items: z.ZodArray<z.ZodObject<{
|
|
17
|
+
id: z.ZodString;
|
|
18
|
+
name: z.ZodOptional<z.ZodString>;
|
|
19
|
+
description: z.ZodOptional<z.ZodString>;
|
|
20
|
+
permissions: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
21
|
+
}, z.core.$catchall<z.ZodUnknown>>>;
|
|
22
|
+
nextPageToken: z.ZodOptional<z.ZodString>;
|
|
23
|
+
totalEntries: z.ZodOptional<z.ZodNumber>;
|
|
24
|
+
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"segment", z.ZodObject<{
|
|
25
|
+
SEGMENT_PUBLIC_API_TOKEN: z.ZodString;
|
|
26
|
+
SEGMENT_REGION: z.ZodDefault<z.ZodEnum<{
|
|
27
|
+
us: "us";
|
|
28
|
+
eu: "eu";
|
|
29
|
+
}>>;
|
|
30
|
+
SEGMENT_DEFAULT_WRITE_KEY: z.ZodOptional<z.ZodString>;
|
|
31
|
+
SEGMENT_WRITE_KEYS_JSON: z.ZodOptional<z.ZodString>;
|
|
32
|
+
SEGMENT_PROFILE_API_TOKEN: z.ZodOptional<z.ZodString>;
|
|
33
|
+
SEGMENT_PROFILE_SPACE_ID: z.ZodOptional<z.ZodString>;
|
|
34
|
+
SEGMENT_WEBHOOK_SHARED_SECRET: z.ZodOptional<z.ZodString>;
|
|
35
|
+
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
36
|
+
SEGMENT_PUBLIC_API_TOKEN: z.ZodString;
|
|
37
|
+
SEGMENT_REGION: z.ZodDefault<z.ZodEnum<{
|
|
38
|
+
us: "us";
|
|
39
|
+
eu: "eu";
|
|
40
|
+
}>>;
|
|
41
|
+
SEGMENT_DEFAULT_WRITE_KEY: z.ZodOptional<z.ZodString>;
|
|
42
|
+
SEGMENT_WRITE_KEYS_JSON: z.ZodOptional<z.ZodString>;
|
|
43
|
+
SEGMENT_PROFILE_API_TOKEN: z.ZodOptional<z.ZodString>;
|
|
44
|
+
SEGMENT_PROFILE_SPACE_ID: z.ZodOptional<z.ZodString>;
|
|
45
|
+
SEGMENT_WEBHOOK_SHARED_SECRET: z.ZodOptional<z.ZodString>;
|
|
46
|
+
}, z.core.$strip>>[] | undefined>], undefined>;
|
|
47
|
+
//#endregion
|
|
48
|
+
export { listRoles, roleSchema };
|
package/dist/roles.mjs
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { a as segmentLooseObjectSchema, n as segmentIdSchema } from "./common-CdGiJbjq.mjs";
|
|
2
|
+
import { n as crudList } from "./crud-SWa_79Hg.mjs";
|
|
3
|
+
import { z } from "zod";
|
|
4
|
+
|
|
5
|
+
//#region src/roles.ts
|
|
6
|
+
/**
|
|
7
|
+
* segment/roles.ts — IAM roles (read-only). 1 action (PLAN § 6.15).
|
|
8
|
+
*/
|
|
9
|
+
const roleSchema = segmentLooseObjectSchema({
|
|
10
|
+
id: segmentIdSchema,
|
|
11
|
+
name: z.string().optional(),
|
|
12
|
+
description: z.string().optional(),
|
|
13
|
+
permissions: z.array(z.record(z.string(), z.unknown())).optional()
|
|
14
|
+
});
|
|
15
|
+
const listRoles = crudList({
|
|
16
|
+
id: "segment.iam.roles.list",
|
|
17
|
+
name: "List IAM roles",
|
|
18
|
+
description: "List IAM roles available in the workspace.",
|
|
19
|
+
path: "/roles",
|
|
20
|
+
itemsKey: "roles",
|
|
21
|
+
item: roleSchema
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
//#endregion
|
|
25
|
+
export { listRoles, roleSchema };
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
//#region src/schemas/common.d.ts
|
|
4
|
+
/** Non-empty trimmed string. */
|
|
5
|
+
declare const segmentIdSchema: z.ZodString;
|
|
6
|
+
/** ISO-8601 timestamp as emitted by Segment. Accept either a real ISO-8601
|
|
7
|
+
* datetime or any non-empty string (Segment occasionally returns
|
|
8
|
+
* human-readable dates for some `finishedAt` fields). */
|
|
9
|
+
declare const segmentTimestampSchema: z.ZodUnion<readonly [z.ZodISODateTime, z.ZodString]>;
|
|
10
|
+
/** Forward-only cursor token the Public API returns on list endpoints under
|
|
11
|
+
* `pagination.next`. */
|
|
12
|
+
declare const segmentCursorSchema: z.ZodString;
|
|
13
|
+
/** A permissively-typed object. Used for provider fields we pass through
|
|
14
|
+
* untouched (e.g. destination settings blobs whose shape depends on which
|
|
15
|
+
* destination is configured). Parsed so we never leak unknown values into
|
|
16
|
+
* typed outputs, but we accept any keys. */
|
|
17
|
+
declare function segmentLooseObjectSchema<T extends z.ZodRawShape>(shape?: T): z.ZodObject<{ -readonly [P in keyof T]: T[P] }, z.core.$catchall<z.ZodUnknown>>;
|
|
18
|
+
/** Segment Public API pagination envelope. */
|
|
19
|
+
declare const segmentPaginationSchema: z.ZodObject<{
|
|
20
|
+
current: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
21
|
+
next: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
22
|
+
previous: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
23
|
+
totalEntries: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
24
|
+
}, z.core.$strip>;
|
|
25
|
+
type SegmentPagination = z.infer<typeof segmentPaginationSchema>;
|
|
26
|
+
/** Common pagination input fields accepted by every list op. */
|
|
27
|
+
declare const segmentPaginationInputSchema: z.ZodObject<{
|
|
28
|
+
pageSize: z.ZodOptional<z.ZodNumber>;
|
|
29
|
+
pageToken: z.ZodOptional<z.ZodString>;
|
|
30
|
+
}, z.core.$strip>;
|
|
31
|
+
type SegmentPaginationInput = z.infer<typeof segmentPaginationInputSchema>;
|
|
32
|
+
/** Segment label — `key:value`. */
|
|
33
|
+
declare const segmentLabelSchema: z.ZodObject<{
|
|
34
|
+
key: z.ZodString;
|
|
35
|
+
value: z.ZodString;
|
|
36
|
+
description: z.ZodOptional<z.ZodString>;
|
|
37
|
+
}, z.core.$strip>;
|
|
38
|
+
type SegmentLabel = z.infer<typeof segmentLabelSchema>;
|
|
39
|
+
/** Envelope for a Public API list response. The actual payload key is the
|
|
40
|
+
* resource name (`sources`, `destinations`, …); callers wrap with the
|
|
41
|
+
* resource-specific schema. */
|
|
42
|
+
declare function segmentListEnvelopeSchema<T extends z.ZodTypeAny>(itemsKey: string, item: T): z.ZodObject<{
|
|
43
|
+
[x: string]: z.ZodArray<T> | z.ZodOptional<z.ZodObject<{
|
|
44
|
+
current: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
45
|
+
next: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
46
|
+
previous: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
47
|
+
totalEntries: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
48
|
+
}, z.core.$strip>>;
|
|
49
|
+
pagination: z.ZodOptional<z.ZodObject<{
|
|
50
|
+
current: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
51
|
+
next: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
52
|
+
previous: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
53
|
+
totalEntries: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
54
|
+
}, z.core.$strip>>;
|
|
55
|
+
}, z.core.$catchall<z.ZodUnknown>>;
|
|
56
|
+
//#endregion
|
|
57
|
+
export { SegmentLabel, SegmentPagination, SegmentPaginationInput, segmentCursorSchema, segmentIdSchema, segmentLabelSchema, segmentListEnvelopeSchema, segmentLooseObjectSchema, segmentPaginationInputSchema, segmentPaginationSchema, segmentTimestampSchema };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { a as segmentLooseObjectSchema, c as segmentTimestampSchema, i as segmentListEnvelopeSchema, n as segmentIdSchema, o as segmentPaginationInputSchema, r as segmentLabelSchema, s as segmentPaginationSchema, t as segmentCursorSchema } from "../common-CdGiJbjq.mjs";
|
|
2
|
+
|
|
3
|
+
export { segmentCursorSchema, segmentIdSchema, segmentLabelSchema, segmentListEnvelopeSchema, segmentLooseObjectSchema, segmentPaginationInputSchema, segmentPaginationSchema, segmentTimestampSchema };
|