@reopt-ai/data-contract 0.6.2 → 0.7.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/dist/client.cjs +228 -321
- package/dist/client.cjs.map +1 -1
- package/dist/client.d.cts +57 -71
- package/dist/client.d.cts.map +1 -0
- package/dist/client.d.ts +57 -71
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +228 -322
- package/dist/client.js.map +1 -1
- package/dist/control.cjs +158 -54
- package/dist/control.cjs.map +1 -1
- package/dist/control.d.cts +124 -140
- package/dist/control.d.cts.map +1 -0
- package/dist/control.d.ts +124 -140
- package/dist/control.d.ts.map +1 -0
- package/dist/control.js +134 -54
- package/dist/control.js.map +1 -1
- package/dist/events-BUIeU60t.d.cts +142 -0
- package/dist/events-BUIeU60t.d.cts.map +1 -0
- package/dist/events-BUIeU60t.d.ts +142 -0
- package/dist/events-BUIeU60t.d.ts.map +1 -0
- package/dist/events.cjs +110 -15
- package/dist/events.cjs.map +1 -1
- package/dist/events.d.cts +2 -59
- package/dist/events.d.ts +2 -59
- package/dist/events.js +101 -15
- package/dist/events.js.map +1 -1
- package/dist/identity.cjs +150 -55
- package/dist/identity.cjs.map +1 -1
- package/dist/identity.d.cts +21 -20
- package/dist/identity.d.cts.map +1 -0
- package/dist/identity.d.ts +21 -20
- package/dist/identity.d.ts.map +1 -0
- package/dist/identity.js +126 -56
- package/dist/identity.js.map +1 -1
- package/dist/index.cjs +46 -25
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +37 -54
- package/dist/index.d.cts.map +1 -0
- package/dist/index.d.ts +37 -54
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +36 -25
- package/dist/index.js.map +1 -1
- package/dist/ingest.cjs +152 -57
- package/dist/ingest.cjs.map +1 -1
- package/dist/ingest.d.cts +185 -196
- package/dist/ingest.d.cts.map +1 -0
- package/dist/ingest.d.ts +185 -196
- package/dist/ingest.d.ts.map +1 -0
- package/dist/ingest.js +126 -57
- package/dist/ingest.js.map +1 -1
- package/dist/query.cjs +284 -84
- package/dist/query.cjs.map +1 -1
- package/dist/query.d.cts +458 -471
- package/dist/query.d.cts.map +1 -0
- package/dist/query.d.ts +458 -471
- package/dist/query.d.ts.map +1 -0
- package/dist/query.js +245 -84
- package/dist/query.js.map +1 -1
- package/dist/report.cjs +104 -74
- package/dist/report.cjs.map +1 -1
- package/dist/report.d.cts +182 -136
- package/dist/report.d.cts.map +1 -0
- package/dist/report.d.ts +182 -136
- package/dist/report.d.ts.map +1 -0
- package/dist/report.js +93 -74
- package/dist/report.js.map +1 -1
- package/dist/version-B_0qb1_K.cjs +53 -0
- package/dist/version-B_0qb1_K.cjs.map +1 -0
- package/dist/version-C09Cyf4R.js +12 -0
- package/dist/version-C09Cyf4R.js.map +1 -0
- package/dist/{version-BANKB6Og.d.ts → version-CGujUGWd.d.cts} +5 -3
- package/dist/version-CGujUGWd.d.cts.map +1 -0
- package/dist/{version-BANKB6Og.d.cts → version-CGujUGWd.d.ts} +5 -3
- package/dist/version-CGujUGWd.d.ts.map +1 -0
- package/package.json +69 -28
- package/dist/chunk-33BCA2LH.js +0 -53
- package/dist/chunk-33BCA2LH.js.map +0 -1
- package/dist/chunk-3EEANNYN.cjs +0 -62
- package/dist/chunk-3EEANNYN.cjs.map +0 -1
- package/dist/chunk-AOS53KAV.cjs +0 -19
- package/dist/chunk-AOS53KAV.cjs.map +0 -1
- package/dist/chunk-BA52YA7N.cjs +0 -179
- package/dist/chunk-BA52YA7N.cjs.map +0 -1
- package/dist/chunk-DUJSYMYY.js +0 -179
- package/dist/chunk-DUJSYMYY.js.map +0 -1
- package/dist/chunk-FMOKJTQD.js +0 -160
- package/dist/chunk-FMOKJTQD.js.map +0 -1
- package/dist/chunk-FP2X3PRK.js +0 -62
- package/dist/chunk-FP2X3PRK.js.map +0 -1
- package/dist/chunk-FQSCQSMP.cjs +0 -160
- package/dist/chunk-FQSCQSMP.cjs.map +0 -1
- package/dist/chunk-FUGY5ANJ.cjs +0 -361
- package/dist/chunk-FUGY5ANJ.cjs.map +0 -1
- package/dist/chunk-IY4MXH35.js +0 -204
- package/dist/chunk-IY4MXH35.js.map +0 -1
- package/dist/chunk-L3WJGIKD.js +0 -361
- package/dist/chunk-L3WJGIKD.js.map +0 -1
- package/dist/chunk-LA5F5KR6.cjs +0 -204
- package/dist/chunk-LA5F5KR6.cjs.map +0 -1
- package/dist/chunk-YSAEOYPD.cjs +0 -53
- package/dist/chunk-YSAEOYPD.cjs.map +0 -1
- package/dist/chunk-ZCKVMUIQ.js +0 -19
- package/dist/chunk-ZCKVMUIQ.js.map +0 -1
package/dist/control.d.ts
CHANGED
|
@@ -1,22 +1,5 @@
|
|
|
1
|
-
import { z } from
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* `POST /api/v1/organizations` · `/api/v1/projects` and friends — the
|
|
5
|
-
* provisioning contract.
|
|
6
|
-
*
|
|
7
|
-
* A project-scoped client credential cannot authenticate the creation of the
|
|
8
|
-
* project it is scoped to, and an organization key cannot authenticate the
|
|
9
|
-
* creation of its own organization. So provisioning runs on two credentials
|
|
10
|
-
* above the client one: a platform key that creates organizations and writes
|
|
11
|
-
* quotas, and an organization key that creates and deletes projects inside one
|
|
12
|
-
* organization.
|
|
13
|
-
*
|
|
14
|
-
* Quota writes sit with the platform key on purpose. Organization keys are held
|
|
15
|
-
* one-per-workspace by the caller and so have a wide exposure surface; a leaked
|
|
16
|
-
* one that could raise its own limits would turn a credential leak into an
|
|
17
|
-
* unbounded bill.
|
|
18
|
-
*/
|
|
19
|
-
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
//#region src/control.d.ts
|
|
20
3
|
declare const PLATFORM_KEY_HEADER = "reopt-platform-key";
|
|
21
4
|
declare const ORG_KEY_HEADER = "reopt-org-key";
|
|
22
5
|
/**
|
|
@@ -28,114 +11,114 @@ declare const ORG_KEY_HEADER = "reopt-org-key";
|
|
|
28
11
|
*/
|
|
29
12
|
declare const zExternalId: z.ZodString;
|
|
30
13
|
declare const zCreateOrganizationInput: z.ZodObject<{
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
14
|
+
externalId: z.ZodString;
|
|
15
|
+
name: z.ZodString;
|
|
16
|
+
slug: z.ZodOptional<z.ZodString>;
|
|
17
|
+
monthlyEventQuota: z.ZodOptional<z.ZodNumber>;
|
|
18
|
+
monthlyCreditQuota: z.ZodOptional<z.ZodNumber>;
|
|
36
19
|
}, z.core.$strip>;
|
|
37
20
|
type CreateOrganizationInput = z.input<typeof zCreateOrganizationInput>;
|
|
38
21
|
declare const zOrganization: z.ZodObject<{
|
|
22
|
+
id: z.ZodString;
|
|
23
|
+
externalId: z.ZodString;
|
|
24
|
+
name: z.ZodString;
|
|
25
|
+
slug: z.ZodString;
|
|
26
|
+
monthlyEventQuota: z.ZodNumber;
|
|
27
|
+
monthlyCreditQuota: z.ZodNumber;
|
|
28
|
+
}, z.core.$strip>;
|
|
29
|
+
declare const zCreateOrganizationResponse: z.ZodObject<{
|
|
30
|
+
created: z.ZodBoolean;
|
|
31
|
+
organization: z.ZodObject<{
|
|
39
32
|
id: z.ZodString;
|
|
40
33
|
externalId: z.ZodString;
|
|
41
34
|
name: z.ZodString;
|
|
42
35
|
slug: z.ZodString;
|
|
43
36
|
monthlyEventQuota: z.ZodNumber;
|
|
44
37
|
monthlyCreditQuota: z.ZodNumber;
|
|
45
|
-
}, z.core.$strip>;
|
|
46
|
-
|
|
47
|
-
created: z.ZodBoolean;
|
|
48
|
-
organization: z.ZodObject<{
|
|
49
|
-
id: z.ZodString;
|
|
50
|
-
externalId: z.ZodString;
|
|
51
|
-
name: z.ZodString;
|
|
52
|
-
slug: z.ZodString;
|
|
53
|
-
monthlyEventQuota: z.ZodNumber;
|
|
54
|
-
monthlyCreditQuota: z.ZodNumber;
|
|
55
|
-
}, z.core.$strip>;
|
|
56
|
-
orgKey: z.ZodOptional<z.ZodString>;
|
|
38
|
+
}, z.core.$strip>;
|
|
39
|
+
orgKey: z.ZodOptional<z.ZodString>;
|
|
57
40
|
}, z.core.$strip>;
|
|
58
41
|
type CreateOrganizationResponse = z.infer<typeof zCreateOrganizationResponse>;
|
|
59
42
|
declare const zRotateOrganizationKeyResponse: z.ZodObject<{
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
43
|
+
organizationId: z.ZodString;
|
|
44
|
+
keyPrefix: z.ZodString;
|
|
45
|
+
orgKey: z.ZodString;
|
|
63
46
|
}, z.core.$strip>;
|
|
64
47
|
type RotateOrganizationKeyResponse = z.infer<typeof zRotateOrganizationKeyResponse>;
|
|
65
48
|
declare const zUpdateOrganizationQuotaInput: z.ZodObject<{
|
|
66
|
-
|
|
67
|
-
|
|
49
|
+
monthlyEventQuota: z.ZodOptional<z.ZodNumber>;
|
|
50
|
+
monthlyCreditQuota: z.ZodOptional<z.ZodNumber>;
|
|
68
51
|
}, z.core.$strip>;
|
|
69
52
|
type UpdateOrganizationQuotaInput = z.input<typeof zUpdateOrganizationQuotaInput>;
|
|
70
53
|
declare const zUpdateOrganizationQuotaResponse: z.ZodObject<{
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
54
|
+
organization: z.ZodObject<{
|
|
55
|
+
id: z.ZodString;
|
|
56
|
+
externalId: z.ZodString;
|
|
57
|
+
name: z.ZodString;
|
|
58
|
+
slug: z.ZodString;
|
|
59
|
+
monthlyEventQuota: z.ZodNumber;
|
|
60
|
+
monthlyCreditQuota: z.ZodNumber;
|
|
61
|
+
}, z.core.$strip>;
|
|
79
62
|
}, z.core.$strip>;
|
|
80
63
|
type UpdateOrganizationQuotaResponse = z.infer<typeof zUpdateOrganizationQuotaResponse>;
|
|
81
64
|
declare const zCreateProjectInput: z.ZodObject<{
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
65
|
+
externalId: z.ZodString;
|
|
66
|
+
name: z.ZodString;
|
|
67
|
+
domain: z.ZodOptional<z.ZodString>;
|
|
68
|
+
timezone: z.ZodOptional<z.ZodString>;
|
|
69
|
+
retentionDays: z.ZodOptional<z.ZodNumber>;
|
|
87
70
|
}, z.core.$strip>;
|
|
88
71
|
type CreateProjectInput = z.input<typeof zCreateProjectInput>;
|
|
89
72
|
declare const zProject: z.ZodObject<{
|
|
73
|
+
id: z.ZodString;
|
|
74
|
+
externalId: z.ZodString;
|
|
75
|
+
organizationId: z.ZodString;
|
|
76
|
+
name: z.ZodString;
|
|
77
|
+
timezone: z.ZodString;
|
|
78
|
+
retentionDays: z.ZodNullable<z.ZodNumber>;
|
|
79
|
+
}, z.core.$strip>;
|
|
80
|
+
declare const zCreateProjectResponse: z.ZodObject<{
|
|
81
|
+
created: z.ZodBoolean;
|
|
82
|
+
project: z.ZodObject<{
|
|
90
83
|
id: z.ZodString;
|
|
91
84
|
externalId: z.ZodString;
|
|
92
85
|
organizationId: z.ZodString;
|
|
93
86
|
name: z.ZodString;
|
|
94
87
|
timezone: z.ZodString;
|
|
95
88
|
retentionDays: z.ZodNullable<z.ZodNumber>;
|
|
96
|
-
}, z.core.$strip>;
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
organizationId: z.ZodString;
|
|
103
|
-
name: z.ZodString;
|
|
104
|
-
timezone: z.ZodString;
|
|
105
|
-
retentionDays: z.ZodNullable<z.ZodNumber>;
|
|
89
|
+
}, z.core.$strip>;
|
|
90
|
+
clients: z.ZodObject<{
|
|
91
|
+
browser: z.ZodObject<{
|
|
92
|
+
id: z.ZodString;
|
|
93
|
+
writeKey: z.ZodString;
|
|
94
|
+
scopes: z.ZodArray<z.ZodString>;
|
|
106
95
|
}, z.core.$strip>;
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
scopes: z.ZodArray<z.ZodString>;
|
|
112
|
-
}, z.core.$strip>;
|
|
113
|
-
server: z.ZodObject<{
|
|
114
|
-
id: z.ZodString;
|
|
115
|
-
clientSecret: z.ZodOptional<z.ZodString>;
|
|
116
|
-
scopes: z.ZodArray<z.ZodString>;
|
|
117
|
-
}, z.core.$strip>;
|
|
96
|
+
server: z.ZodObject<{
|
|
97
|
+
id: z.ZodString;
|
|
98
|
+
clientSecret: z.ZodOptional<z.ZodString>;
|
|
99
|
+
scopes: z.ZodArray<z.ZodString>;
|
|
118
100
|
}, z.core.$strip>;
|
|
101
|
+
}, z.core.$strip>;
|
|
119
102
|
}, z.core.$strip>;
|
|
120
103
|
type CreateProjectResponse = z.infer<typeof zCreateProjectResponse>;
|
|
121
104
|
declare const zRotateClientSecretResponse: z.ZodObject<{
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
105
|
+
projectId: z.ZodString;
|
|
106
|
+
clientId: z.ZodString;
|
|
107
|
+
clientSecret: z.ZodString;
|
|
125
108
|
}, z.core.$strip>;
|
|
126
109
|
type RotateClientSecretResponse = z.infer<typeof zRotateClientSecretResponse>;
|
|
127
110
|
declare const zDeleteProjectInput: z.ZodObject<{
|
|
128
|
-
|
|
129
|
-
|
|
111
|
+
purge: z.ZodLiteral<true>;
|
|
112
|
+
externalId: z.ZodString;
|
|
130
113
|
}, z.core.$strip>;
|
|
131
114
|
type DeleteProjectInput = z.input<typeof zDeleteProjectInput>;
|
|
132
115
|
declare const zDeleteProjectResponse: z.ZodObject<{
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
116
|
+
projectId: z.ZodString;
|
|
117
|
+
purge: z.ZodEnum<{
|
|
118
|
+
queued: "queued";
|
|
119
|
+
"already-absent": "already-absent";
|
|
120
|
+
}>;
|
|
121
|
+
purgingAt: z.ZodOptional<z.ZodString>;
|
|
139
122
|
}, z.core.$strip>;
|
|
140
123
|
type DeleteProjectResponse = z.infer<typeof zDeleteProjectResponse>;
|
|
141
124
|
/**
|
|
@@ -146,78 +129,79 @@ type DeleteProjectResponse = z.infer<typeof zDeleteProjectResponse>;
|
|
|
146
129
|
*/
|
|
147
130
|
declare const EVENT_META_STATUSES: readonly ["active", "deprecated", "archived", "internal"];
|
|
148
131
|
declare const zEventMetaStatus: z.ZodEnum<{
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
132
|
+
active: "active";
|
|
133
|
+
deprecated: "deprecated";
|
|
134
|
+
archived: "archived";
|
|
135
|
+
internal: "internal";
|
|
153
136
|
}>;
|
|
154
137
|
type EventMetaStatus = z.infer<typeof zEventMetaStatus>;
|
|
155
138
|
declare const zEventName: z.ZodString;
|
|
156
139
|
declare const zUpsertEventMetaInput: z.ZodObject<{
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
140
|
+
conversion: z.ZodOptional<z.ZodBoolean>;
|
|
141
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
142
|
+
active: "active";
|
|
143
|
+
deprecated: "deprecated";
|
|
144
|
+
archived: "archived";
|
|
145
|
+
internal: "internal";
|
|
146
|
+
}>>;
|
|
147
|
+
rollupProperties: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
165
148
|
}, z.core.$strict>;
|
|
166
149
|
type UpsertEventMetaInput = z.infer<typeof zUpsertEventMetaInput>;
|
|
167
150
|
declare const zEventMetaResponse: z.ZodObject<{
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
151
|
+
projectId: z.ZodString;
|
|
152
|
+
name: z.ZodString;
|
|
153
|
+
conversion: z.ZodBoolean;
|
|
154
|
+
status: z.ZodEnum<{
|
|
155
|
+
active: "active";
|
|
156
|
+
deprecated: "deprecated";
|
|
157
|
+
archived: "archived";
|
|
158
|
+
internal: "internal";
|
|
159
|
+
}>;
|
|
160
|
+
rollupProperties: z.ZodArray<z.ZodString>;
|
|
161
|
+
changed: z.ZodArray<z.ZodString>;
|
|
162
|
+
updatedAt: z.ZodString;
|
|
180
163
|
}, z.core.$strip>;
|
|
181
164
|
type EventMetaResponse = z.infer<typeof zEventMetaResponse>;
|
|
182
165
|
declare const CONTROL_ERROR_CODES: readonly ["unauthorized", "organization_scope_mismatch", "external_id_conflict", "project_external_id_mismatch", "not_found", "validation_failed", "rate_limited", "internal_error"];
|
|
183
166
|
declare const zControlErrorCode: z.ZodEnum<{
|
|
167
|
+
validation_failed: "validation_failed";
|
|
168
|
+
unauthorized: "unauthorized";
|
|
169
|
+
rate_limited: "rate_limited";
|
|
170
|
+
internal_error: "internal_error";
|
|
171
|
+
organization_scope_mismatch: "organization_scope_mismatch";
|
|
172
|
+
external_id_conflict: "external_id_conflict";
|
|
173
|
+
project_external_id_mismatch: "project_external_id_mismatch";
|
|
174
|
+
not_found: "not_found";
|
|
175
|
+
}>;
|
|
176
|
+
type ControlErrorCode = z.infer<typeof zControlErrorCode>;
|
|
177
|
+
declare const zControlError: z.ZodObject<{
|
|
178
|
+
status: z.ZodNumber;
|
|
179
|
+
code: z.ZodEnum<{
|
|
180
|
+
validation_failed: "validation_failed";
|
|
184
181
|
unauthorized: "unauthorized";
|
|
182
|
+
rate_limited: "rate_limited";
|
|
183
|
+
internal_error: "internal_error";
|
|
185
184
|
organization_scope_mismatch: "organization_scope_mismatch";
|
|
186
185
|
external_id_conflict: "external_id_conflict";
|
|
187
186
|
project_external_id_mismatch: "project_external_id_mismatch";
|
|
188
187
|
not_found: "not_found";
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
declare const zControlError: z.ZodObject<{
|
|
195
|
-
status: z.ZodNumber;
|
|
196
|
-
code: z.ZodEnum<{
|
|
197
|
-
unauthorized: "unauthorized";
|
|
198
|
-
organization_scope_mismatch: "organization_scope_mismatch";
|
|
199
|
-
external_id_conflict: "external_id_conflict";
|
|
200
|
-
project_external_id_mismatch: "project_external_id_mismatch";
|
|
201
|
-
not_found: "not_found";
|
|
202
|
-
validation_failed: "validation_failed";
|
|
203
|
-
rate_limited: "rate_limited";
|
|
204
|
-
internal_error: "internal_error";
|
|
205
|
-
}>;
|
|
206
|
-
error: z.ZodString;
|
|
207
|
-
message: z.ZodOptional<z.ZodString>;
|
|
208
|
-
errors: z.ZodOptional<z.ZodUnknown>;
|
|
209
|
-
requestId: z.ZodOptional<z.ZodString>;
|
|
188
|
+
}>;
|
|
189
|
+
error: z.ZodString;
|
|
190
|
+
message: z.ZodOptional<z.ZodString>;
|
|
191
|
+
errors: z.ZodOptional<z.ZodUnknown>;
|
|
192
|
+
requestId: z.ZodOptional<z.ZodString>;
|
|
210
193
|
}, z.core.$strip>;
|
|
211
194
|
type ControlError = z.infer<typeof zControlError>;
|
|
212
195
|
/** Paths, so the client and the route handlers cannot drift apart. */
|
|
213
196
|
declare const CONTROL_API_PATHS: {
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
197
|
+
readonly organizations: "/api/v1/organizations";
|
|
198
|
+
readonly organization: (id: string) => string;
|
|
199
|
+
readonly organizationKeys: (id: string) => string;
|
|
200
|
+
readonly projects: "/api/v1/projects";
|
|
201
|
+
readonly project: (id: string) => string;
|
|
202
|
+
readonly clientRotate: (projectId: string, clientId: string) => string;
|
|
203
|
+
readonly projectEvent: (projectId: string, name: string) => string;
|
|
221
204
|
};
|
|
222
|
-
|
|
223
|
-
export { CONTROL_API_PATHS, CONTROL_ERROR_CODES,
|
|
205
|
+
//#endregion
|
|
206
|
+
export { CONTROL_API_PATHS, CONTROL_ERROR_CODES, ControlError, ControlErrorCode, CreateOrganizationInput, CreateOrganizationResponse, CreateProjectInput, CreateProjectResponse, DeleteProjectInput, DeleteProjectResponse, EVENT_META_STATUSES, EventMetaResponse, EventMetaStatus, ORG_KEY_HEADER, PLATFORM_KEY_HEADER, RotateClientSecretResponse, RotateOrganizationKeyResponse, UpdateOrganizationQuotaInput, UpdateOrganizationQuotaResponse, UpsertEventMetaInput, zControlError, zControlErrorCode, zCreateOrganizationInput, zCreateOrganizationResponse, zCreateProjectInput, zCreateProjectResponse, zDeleteProjectInput, zDeleteProjectResponse, zEventMetaResponse, zEventMetaStatus, zEventName, zExternalId, zOrganization, zProject, zRotateClientSecretResponse, zRotateOrganizationKeyResponse, zUpdateOrganizationQuotaInput, zUpdateOrganizationQuotaResponse, zUpsertEventMetaInput };
|
|
207
|
+
//# sourceMappingURL=control.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"control.d.ts","names":[],"sources":["../src/control.ts"],"mappings":";;cAoBa;cACA;;;;;;;;cASA,aAAW,EAAA;cAIX,0BAAwB,EAAA;;;;;;GAWnC,EAAA,KAAA;KACU,0BAA0B,EAAE,aAAa;cAExC,eAAa,EAAA;;;;;;;GAOxB,EAAA,KAAA;cAEW,6BAA2B,EAAA;;;;;;;;;;;GAYtC,EAAA,KAAA;KACU,6BAA6B,EAAE,aAAa;cAE3C,gCAA8B,EAAA;;;;GAKzC,EAAA,KAAA;KACU,gCAAgC,EAAE,aAAa;cAE9C,+BAA6B,EAAA;;;GAOtC,EAAA,KAAA;KACQ,+BAA+B,EAAE,aAAa;cAE7C,kCAAgC,EAAA;;;;;;;;;GAA4C,EAAA,KAAA;KAC7E,kCAAkC,EAAE,aAAa;cAIhD,qBAAmB,EAAA;;;;;;GAO9B,EAAA,KAAA;KACU,qBAAqB,EAAE,aAAa;cAEnC,UAAQ,EAAA;;;;;;;GAQnB,EAAA,KAAA;cAEW,wBAAsB,EAAA;;;;;;;;;;;;;;;;;;;;;;GAsBjC,EAAA,KAAA;KACU,wBAAwB,EAAE,aAAa;cAEtC,6BAA2B,EAAA;;;;GAKtC,EAAA,KAAA;K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
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
1
|
+
import { zInstant } from "./index.js";
|
|
2
|
+
import { zTimezone } from "./query.js";
|
|
3
|
+
import { z } from "zod";
|
|
4
|
+
//#region src/control.ts
|
|
5
|
+
const PLATFORM_KEY_HEADER = "reopt-platform-key";
|
|
6
|
+
const ORG_KEY_HEADER = "reopt-org-key";
|
|
7
|
+
const zExternalId = z.string().min(1).max(191);
|
|
8
|
+
const zCreateOrganizationInput = z.object({
|
|
9
|
+
externalId: zExternalId,
|
|
10
|
+
name: z.string().min(1).max(200),
|
|
11
|
+
slug: z.string().min(1).max(100).regex(/^[a-z0-9-]+$/, "lowercase letters, digits and hyphens only").optional(),
|
|
12
|
+
monthlyEventQuota: z.number().int().nonnegative().optional(),
|
|
13
|
+
monthlyCreditQuota: z.number().int().nonnegative().optional()
|
|
14
|
+
});
|
|
15
|
+
const zOrganization = z.object({
|
|
16
|
+
id: z.string(),
|
|
17
|
+
externalId: zExternalId,
|
|
18
|
+
name: z.string(),
|
|
19
|
+
slug: z.string(),
|
|
20
|
+
monthlyEventQuota: z.number().int(),
|
|
21
|
+
monthlyCreditQuota: z.number().int()
|
|
22
|
+
});
|
|
23
|
+
const zCreateOrganizationResponse = z.object({
|
|
24
|
+
created: z.boolean(),
|
|
25
|
+
organization: zOrganization,
|
|
26
|
+
orgKey: z.string().optional()
|
|
27
|
+
});
|
|
28
|
+
const zRotateOrganizationKeyResponse = z.object({
|
|
29
|
+
organizationId: z.string(),
|
|
30
|
+
keyPrefix: z.string(),
|
|
31
|
+
orgKey: z.string()
|
|
32
|
+
});
|
|
33
|
+
const zUpdateOrganizationQuotaInput = z.object({
|
|
34
|
+
monthlyEventQuota: z.number().int().nonnegative().optional(),
|
|
35
|
+
monthlyCreditQuota: z.number().int().nonnegative().optional()
|
|
36
|
+
}).refine((value) => value.monthlyEventQuota !== void 0 || value.monthlyCreditQuota !== void 0, { message: "at least one quota must be given" });
|
|
37
|
+
const zUpdateOrganizationQuotaResponse = z.object({ organization: zOrganization });
|
|
38
|
+
const zCreateProjectInput = z.object({
|
|
39
|
+
externalId: zExternalId,
|
|
40
|
+
name: z.string().min(1).max(200),
|
|
41
|
+
domain: z.string().max(253).optional(),
|
|
42
|
+
timezone: zTimezone.optional(),
|
|
43
|
+
retentionDays: z.number().int().min(1).max(3650).optional()
|
|
44
|
+
});
|
|
45
|
+
const zProject = z.object({
|
|
46
|
+
id: z.string(),
|
|
47
|
+
externalId: zExternalId,
|
|
48
|
+
organizationId: z.string(),
|
|
49
|
+
name: z.string(),
|
|
50
|
+
timezone: z.string(),
|
|
51
|
+
retentionDays: z.number().int().nullable()
|
|
52
|
+
});
|
|
53
|
+
const zCreateProjectResponse = z.object({
|
|
54
|
+
created: z.boolean(),
|
|
55
|
+
project: zProject,
|
|
56
|
+
clients: z.object({
|
|
57
|
+
browser: z.object({
|
|
58
|
+
id: z.string(),
|
|
59
|
+
writeKey: z.string(),
|
|
60
|
+
scopes: z.array(z.string())
|
|
61
|
+
}),
|
|
62
|
+
server: z.object({
|
|
63
|
+
id: z.string(),
|
|
64
|
+
clientSecret: z.string().optional(),
|
|
65
|
+
scopes: z.array(z.string())
|
|
66
|
+
})
|
|
67
|
+
})
|
|
68
|
+
});
|
|
69
|
+
const zRotateClientSecretResponse = z.object({
|
|
70
|
+
projectId: z.string(),
|
|
71
|
+
clientId: z.string(),
|
|
72
|
+
clientSecret: z.string()
|
|
73
|
+
});
|
|
74
|
+
const zDeleteProjectInput = z.object({
|
|
75
|
+
purge: z.literal(true),
|
|
76
|
+
externalId: zExternalId
|
|
77
|
+
});
|
|
78
|
+
const zDeleteProjectResponse = z.object({
|
|
79
|
+
projectId: z.string(),
|
|
80
|
+
purge: z.enum(["queued", "already-absent"]),
|
|
81
|
+
purgingAt: zInstant.optional()
|
|
82
|
+
});
|
|
83
|
+
const EVENT_META_STATUSES = [
|
|
84
|
+
"active",
|
|
85
|
+
"deprecated",
|
|
86
|
+
"archived",
|
|
87
|
+
"internal"
|
|
88
|
+
];
|
|
89
|
+
const zEventMetaStatus = z.enum(EVENT_META_STATUSES);
|
|
90
|
+
const zEventName = z.string().min(1).max(200);
|
|
91
|
+
const zUpsertEventMetaInput = z.object({
|
|
92
|
+
conversion: z.boolean().optional(),
|
|
93
|
+
status: zEventMetaStatus.optional(),
|
|
94
|
+
rollupProperties: z.array(z.string().min(1).max(200)).max(20).optional()
|
|
95
|
+
}).strict();
|
|
96
|
+
const zEventMetaResponse = z.object({
|
|
97
|
+
projectId: z.string(),
|
|
98
|
+
name: z.string(),
|
|
99
|
+
conversion: z.boolean(),
|
|
100
|
+
status: zEventMetaStatus,
|
|
101
|
+
rollupProperties: z.array(z.string()),
|
|
102
|
+
changed: z.array(z.string()),
|
|
103
|
+
updatedAt: zInstant
|
|
104
|
+
});
|
|
105
|
+
const CONTROL_ERROR_CODES = [
|
|
106
|
+
"unauthorized",
|
|
107
|
+
"organization_scope_mismatch",
|
|
108
|
+
"external_id_conflict",
|
|
109
|
+
"project_external_id_mismatch",
|
|
110
|
+
"not_found",
|
|
111
|
+
"validation_failed",
|
|
112
|
+
"rate_limited",
|
|
113
|
+
"internal_error"
|
|
114
|
+
];
|
|
115
|
+
const zControlErrorCode = z.enum(CONTROL_ERROR_CODES);
|
|
116
|
+
const zControlError = z.object({
|
|
117
|
+
status: z.number().int(),
|
|
118
|
+
code: zControlErrorCode,
|
|
119
|
+
error: z.string(),
|
|
120
|
+
message: z.string().optional(),
|
|
121
|
+
errors: z.unknown().optional(),
|
|
122
|
+
requestId: z.string().optional()
|
|
123
|
+
});
|
|
124
|
+
const CONTROL_API_PATHS = {
|
|
125
|
+
organizations: "/api/v1/organizations",
|
|
126
|
+
organization: (id) => `/api/v1/organizations/${encodeURIComponent(id)}`,
|
|
127
|
+
organizationKeys: (id) => `/api/v1/organizations/${encodeURIComponent(id)}/keys`,
|
|
128
|
+
projects: "/api/v1/projects",
|
|
129
|
+
project: (id) => `/api/v1/projects/${encodeURIComponent(id)}`,
|
|
130
|
+
clientRotate: (projectId, clientId) => `/api/v1/projects/${encodeURIComponent(projectId)}/clients/${encodeURIComponent(clientId)}/rotate`,
|
|
131
|
+
projectEvent: (projectId, name) => `/api/v1/projects/${encodeURIComponent(projectId)}/events/${encodeURIComponent(name)}`
|
|
55
132
|
};
|
|
133
|
+
//#endregion
|
|
134
|
+
export { CONTROL_API_PATHS, CONTROL_ERROR_CODES, EVENT_META_STATUSES, ORG_KEY_HEADER, PLATFORM_KEY_HEADER, zControlError, zControlErrorCode, zCreateOrganizationInput, zCreateOrganizationResponse, zCreateProjectInput, zCreateProjectResponse, zDeleteProjectInput, zDeleteProjectResponse, zEventMetaResponse, zEventMetaStatus, zEventName, zExternalId, zOrganization, zProject, zRotateClientSecretResponse, zRotateOrganizationKeyResponse, zUpdateOrganizationQuotaInput, zUpdateOrganizationQuotaResponse, zUpsertEventMetaInput };
|
|
135
|
+
|
|
56
136
|
//# sourceMappingURL=control.js.map
|
package/dist/control.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
1
|
+
{"version":3,"file":"control.js","names":[],"sources":["../src/control.ts"],"sourcesContent":["/**\n * `POST /api/v1/organizations` · `/api/v1/projects` and friends — the\n * provisioning contract.\n *\n * A project-scoped client credential cannot authenticate the creation of the\n * project it is scoped to, and an organization key cannot authenticate the\n * creation of its own organization. So provisioning runs on two credentials\n * above the client one: a platform key that creates organizations and writes\n * quotas, and an organization key that creates and deletes projects inside one\n * organization.\n *\n * Quota writes sit with the platform key on purpose. Organization keys are held\n * one-per-workspace by the caller and so have a wide exposure surface; a leaked\n * one that could raise its own limits would turn a credential leak into an\n * unbounded bill.\n */\nimport { z } from \"zod\";\nimport { zInstant } from \"./index.js\";\nimport { zTimezone } from \"./query.js\";\n\nexport const PLATFORM_KEY_HEADER = \"reopt-platform-key\";\nexport const ORG_KEY_HEADER = \"reopt-org-key\";\n\n/**\n * The caller's own id for the thing being provisioned.\n *\n * Preferred over an `Idempotency-Key` header because this domain has a real\n * natural key — the caller already has a stable id for the workspace or brand —\n * and a header would make the caller store a second one just to retry safely.\n */\nexport const zExternalId = z.string().min(1).max(191);\n\n// ─── Organizations ──────────────────────────────────────────────────────────\n\nexport const zCreateOrganizationInput = z.object({\n externalId: zExternalId,\n name: z.string().min(1).max(200),\n slug: z\n .string()\n .min(1)\n .max(100)\n .regex(/^[a-z0-9-]+$/, \"lowercase letters, digits and hyphens only\")\n .optional(),\n monthlyEventQuota: z.number().int().nonnegative().optional(),\n monthlyCreditQuota: z.number().int().nonnegative().optional(),\n});\nexport type CreateOrganizationInput = z.input<typeof zCreateOrganizationInput>;\n\nexport const zOrganization = z.object({\n id: z.string(),\n externalId: zExternalId,\n name: z.string(),\n slug: z.string(),\n monthlyEventQuota: z.number().int(),\n monthlyCreditQuota: z.number().int(),\n});\n\nexport const zCreateOrganizationResponse = z.object({\n /** `false` when this externalId already had an organization. */\n created: z.boolean(),\n organization: zOrganization,\n /**\n * Plaintext, returned here and nowhere else.\n *\n * Absent when `created` is `false`: re-issuing on every retry would let a\n * retry quietly multiply live credentials. A caller that lost the key rotates\n * instead — see `POST /api/v1/organizations/{id}/keys`.\n */\n orgKey: z.string().optional(),\n});\nexport type CreateOrganizationResponse = z.infer<typeof zCreateOrganizationResponse>;\n\nexport const zRotateOrganizationKeyResponse = z.object({\n organizationId: z.string(),\n keyPrefix: z.string(),\n /** Plaintext, returned once. Every previously issued key is revoked immediately. */\n orgKey: z.string(),\n});\nexport type RotateOrganizationKeyResponse = z.infer<typeof zRotateOrganizationKeyResponse>;\n\nexport const zUpdateOrganizationQuotaInput = z\n .object({\n monthlyEventQuota: z.number().int().nonnegative().optional(),\n monthlyCreditQuota: z.number().int().nonnegative().optional(),\n })\n .refine((value) => value.monthlyEventQuota !== undefined || value.monthlyCreditQuota !== undefined, {\n message: \"at least one quota must be given\",\n });\nexport type UpdateOrganizationQuotaInput = z.input<typeof zUpdateOrganizationQuotaInput>;\n\nexport const zUpdateOrganizationQuotaResponse = z.object({ organization: zOrganization });\nexport type UpdateOrganizationQuotaResponse = z.infer<typeof zUpdateOrganizationQuotaResponse>;\n\n// ─── Projects ───────────────────────────────────────────────────────────────\n\nexport const zCreateProjectInput = z.object({\n externalId: zExternalId,\n name: z.string().min(1).max(200),\n domain: z.string().max(253).optional(),\n /** Becomes the project's default for every query that omits one. */\n timezone: zTimezone.optional(),\n retentionDays: z.number().int().min(1).max(3650).optional(),\n});\nexport type CreateProjectInput = z.input<typeof zCreateProjectInput>;\n\nexport const zProject = z.object({\n id: z.string(),\n externalId: zExternalId,\n organizationId: z.string(),\n name: z.string(),\n /** The applied value — `\"UTC\"` when none was given. */\n timezone: z.string(),\n retentionDays: z.number().int().nullable(),\n});\n\nexport const zCreateProjectResponse = z.object({\n created: z.boolean(),\n project: zProject,\n /**\n * Two credentials, not one. A key embedded in a browser bundle must not also\n * be able to read the project's analytics, so the browser write key and the\n * server secret are separate rows with different reach.\n */\n clients: z.object({\n browser: z.object({\n id: z.string(),\n /** Public by design, and recoverable — it ships in page source anyway. */\n writeKey: z.string(),\n scopes: z.array(z.string()),\n }),\n server: z.object({\n id: z.string(),\n /** Plaintext, returned once. Absent when `created` is `false`. */\n clientSecret: z.string().optional(),\n scopes: z.array(z.string()),\n }),\n }),\n});\nexport type CreateProjectResponse = z.infer<typeof zCreateProjectResponse>;\n\nexport const zRotateClientSecretResponse = z.object({\n projectId: z.string(),\n clientId: z.string(),\n /** Plaintext, returned once. The previous secret stops working immediately. */\n clientSecret: z.string(),\n});\nexport type RotateClientSecretResponse = z.infer<typeof zRotateClientSecretResponse>;\n\nexport const zDeleteProjectInput = z.object({\n /**\n * A field in the body rather than `?purge=true`. This deletes the project's\n * Postgres rows and every analytics row behind it, with no undo — and a query\n * parameter is far too easy to fire from shell history or a mis-copied URL.\n */\n purge: z.literal(true),\n /** Checked against the project on record; a mismatch is refused. */\n externalId: zExternalId,\n});\nexport type DeleteProjectInput = z.input<typeof zDeleteProjectInput>;\n\nexport const zDeleteProjectResponse = z.object({\n projectId: z.string(),\n /** Idempotent, but it still says which of the two happened. */\n purge: z.enum([\"queued\", \"already-absent\"]),\n /** When the purge was marked. Absent for `already-absent`. */\n purgingAt: zInstant.optional(),\n});\nexport type DeleteProjectResponse = z.infer<typeof zDeleteProjectResponse>;\n\n// ─── Errors ─────────────────────────────────────────────────────────────────\n\n// ─── Event metadata ─────────────────────────────────────────────────────────\n\n/**\n * `PUT /api/v1/projects/{projectId}/events/{name}` — catalogue settings for\n * one event name. Provisioning calls it to mark `form.submitted` a conversion\n * and an operational probe `internal`; the call is idempotent so a retried\n * provisioning run is harmless.\n */\nexport const EVENT_META_STATUSES = [\"active\", \"deprecated\", \"archived\", \"internal\"] as const;\nexport const zEventMetaStatus = z.enum(EVENT_META_STATUSES);\nexport type EventMetaStatus = z.infer<typeof zEventMetaStatus>;\n\nexport const zEventName = z.string().min(1).max(200);\n\nexport const zUpsertEventMetaInput = z\n .object({\n conversion: z.boolean().optional(),\n /** `internal` events are left out of every metric unless a query opts in. */\n status: zEventMetaStatus.optional(),\n /** Property keys the hourly rollups break this event down by. */\n rollupProperties: z.array(z.string().min(1).max(200)).max(20).optional(),\n })\n .strict();\nexport type UpsertEventMetaInput = z.infer<typeof zUpsertEventMetaInput>;\n\nexport const zEventMetaResponse = z.object({\n projectId: z.string(),\n name: z.string(),\n conversion: z.boolean(),\n status: zEventMetaStatus,\n rollupProperties: z.array(z.string()),\n /** Fields this call actually changed; empty on a repeat. */\n changed: z.array(z.string()),\n updatedAt: zInstant,\n});\nexport type EventMetaResponse = z.infer<typeof zEventMetaResponse>;\n\nexport const CONTROL_ERROR_CODES = [\n /** 401 — missing or invalid platform key / organization key. */\n \"unauthorized\",\n /** 403 — the organization key belongs to a different organization. */\n \"organization_scope_mismatch\",\n /**\n * 409 — this externalId exists with a materially different configuration.\n * Only fields whose change alters results are compared (see the docs); a\n * renamed brand is not a conflict.\n */\n \"external_id_conflict\",\n /** 409 — the externalId in a delete body does not match the project's. */\n \"project_external_id_mismatch\",\n /** 404 — no such organization or project, on an endpoint that is not idempotent. */\n \"not_found\",\n /** 400 — input failed the schema. */\n \"validation_failed\",\n /** 429 — per-credential rate limit. */\n \"rate_limited\",\n /** 500 — unexpected server failure. */\n \"internal_error\",\n] as const;\nexport const zControlErrorCode = z.enum(CONTROL_ERROR_CODES);\nexport type ControlErrorCode = z.infer<typeof zControlErrorCode>;\n\nexport const zControlError = z.object({\n status: z.number().int(),\n code: zControlErrorCode,\n error: z.string(),\n message: z.string().optional(),\n errors: z.unknown().optional(),\n requestId: z.string().optional(),\n});\nexport type ControlError = z.infer<typeof zControlError>;\n\n/** Paths, so the client and the route handlers cannot drift apart. */\nexport const CONTROL_API_PATHS = {\n organizations: \"/api/v1/organizations\",\n organization: (id: string) => `/api/v1/organizations/${encodeURIComponent(id)}`,\n organizationKeys: (id: string) => `/api/v1/organizations/${encodeURIComponent(id)}/keys`,\n projects: \"/api/v1/projects\",\n project: (id: string) => `/api/v1/projects/${encodeURIComponent(id)}`,\n clientRotate: (projectId: string, clientId: string) =>\n `/api/v1/projects/${encodeURIComponent(projectId)}/clients/${encodeURIComponent(clientId)}/rotate`,\n projectEvent: (projectId: string, name: string) =>\n `/api/v1/projects/${encodeURIComponent(projectId)}/events/${encodeURIComponent(name)}`,\n} as const;\n"],"mappings":";;;;AAoBA,MAAa,sBAAsB;AACnC,MAAa,iBAAiB;AAS9B,MAAa,cAAc,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,GAAG;AAIpD,MAAa,2BAA2B,EAAE,OAAO;CAC/C,YAAY;CACZ,MAAM,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,GAAG;CAC/B,MAAM,EACH,OAAO,CAAC,CACR,IAAI,CAAC,CAAC,CACN,IAAI,GAAG,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