@uluops/ops-sdk 6.3.1 → 6.4.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/CHANGELOG.md +52 -0
- package/README.md +190 -1
- package/dist/client.d.ts +86 -3
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +71 -5
- package/dist/client.js.map +1 -1
- package/dist/config/constants.d.ts +1 -1
- package/dist/config/generated-version.d.ts +1 -1
- package/dist/config/generated-version.js +1 -1
- package/dist/config/validators.d.ts +25 -1
- package/dist/config/validators.d.ts.map +1 -1
- package/dist/config/validators.js +31 -1
- package/dist/config/validators.js.map +1 -1
- package/dist/errors/errors.d.ts +71 -0
- package/dist/errors/errors.d.ts.map +1 -1
- package/dist/errors/errors.js +99 -0
- package/dist/errors/errors.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/operations/admin.d.ts +100 -0
- package/dist/operations/admin.d.ts.map +1 -0
- package/dist/operations/admin.js +130 -0
- package/dist/operations/admin.js.map +1 -0
- package/dist/operations/auth.d.ts +21 -1
- package/dist/operations/auth.d.ts.map +1 -1
- package/dist/operations/auth.js +49 -3
- package/dist/operations/auth.js.map +1 -1
- package/dist/operations/orgs.d.ts +27 -0
- package/dist/operations/orgs.d.ts.map +1 -0
- package/dist/operations/orgs.js +34 -0
- package/dist/operations/orgs.js.map +1 -0
- package/dist/operations/projects.d.ts +46 -0
- package/dist/operations/projects.d.ts.map +1 -1
- package/dist/operations/projects.js +54 -1
- package/dist/operations/projects.js.map +1 -1
- package/dist/types/auth.d.ts +10 -0
- package/dist/types/auth.d.ts.map +1 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +1 -0
- package/dist/types/index.js.map +1 -1
- package/dist/types/rehome.d.ts +234 -0
- package/dist/types/rehome.d.ts.map +1 -0
- package/dist/types/rehome.js +171 -0
- package/dist/types/rehome.js.map +1 -0
- package/dist/types/response-schemas.d.ts +19 -0
- package/dist/types/response-schemas.d.ts.map +1 -1
- package/dist/types/response-schemas.js +19 -0
- package/dist/types/response-schemas.js.map +1 -1
- package/dist/types/schemas.d.ts +20 -0
- package/dist/types/schemas.d.ts.map +1 -1
- package/dist/types/schemas.js +22 -0
- package/dist/types/schemas.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Project re-home types (project-org-routing-and-rehome spec §4, D14/D19/D21).
|
|
3
|
+
*
|
|
4
|
+
* Three surfaces, three audiences, deliberately NOT one namespace:
|
|
5
|
+
*
|
|
6
|
+
* - `projects.rehome()` — the MEMBER path. Moves one project out of the
|
|
7
|
+
* caller's org context (the `org` option, or the client `orgSlug`) into
|
|
8
|
+
* another org the caller administers. This is the product capability.
|
|
9
|
+
* - `orgs.getVisibleAuditLog()` — the D19 FEED. Any member of an org can
|
|
10
|
+
* read the rows its writers marked org-visible; today that is a project
|
|
11
|
+
* leaving the org for someone's personal org.
|
|
12
|
+
* - `admin.*` — the platform-admin surface behind D20: session-only writes
|
|
13
|
+
* (a `ulr_` key gets `403 SESSION_REQUIRED`), plus the two key-readable
|
|
14
|
+
* ledgers. The Phase 4 migration script is the intended caller; an MCP tool
|
|
15
|
+
* deliberately does not exist for these.
|
|
16
|
+
*
|
|
17
|
+
* Wire casing is mixed BY CONTRACT and the schemas below pin it rather than
|
|
18
|
+
* normalise it: the re-home block (`from_org`, `to_org`, `audit_ids`) and the
|
|
19
|
+
* audit-row `details` are snake_case (spec §4.1 declares them so, and the
|
|
20
|
+
* details are written by the API as an opaque JSON blob the platform stores
|
|
21
|
+
* verbatim); the tombstone and ledger rows are camelCase business objects like
|
|
22
|
+
* every other read in this SDK. Normalising one side would make the SDK's
|
|
23
|
+
* types disagree with the curl a reader uses to check them.
|
|
24
|
+
*/
|
|
25
|
+
import { z } from 'zod';
|
|
26
|
+
/** Member path input. `targetOrg` is the slug; `reason` is optional here and REQUIRED on the admin path. */
|
|
27
|
+
export interface RehomeProjectInput {
|
|
28
|
+
/** Slug of the org the project should live in after the move. */
|
|
29
|
+
targetOrg: string;
|
|
30
|
+
/** Operator-authored free text, ≤ 500 chars. Stored on the tombstone; never rendered into an error. */
|
|
31
|
+
reason?: string;
|
|
32
|
+
}
|
|
33
|
+
/** Admin path input — same body, `reason` mandatory (spec §4.1, ratified 2026-09-13). */
|
|
34
|
+
export interface AdminRehomeProjectInput {
|
|
35
|
+
targetOrg: string;
|
|
36
|
+
/** Required: on the admin path the target org's only standing is the audit row plus this text. */
|
|
37
|
+
reason: string;
|
|
38
|
+
}
|
|
39
|
+
/** Filters for the reservation listing and the ledger. `org` accepts a UUID OR a slug (the API resolves either). */
|
|
40
|
+
export interface ProjectRehomeListQuery {
|
|
41
|
+
projectId?: string;
|
|
42
|
+
org?: string;
|
|
43
|
+
/** ISO 8601 lower bound on `createdAt`. */
|
|
44
|
+
since?: string;
|
|
45
|
+
/** 1–500. The API clamps; the reservation listing defaults to its own page size, the ledger to 100. */
|
|
46
|
+
limit?: number;
|
|
47
|
+
}
|
|
48
|
+
/** Ledger filters add the event kind and the `seq` cursor (pass `nextCursor` back verbatim). */
|
|
49
|
+
export interface ProjectRehomeEventListQuery extends ProjectRehomeListQuery {
|
|
50
|
+
event?: ProjectRehomeEventKind;
|
|
51
|
+
cursor?: string;
|
|
52
|
+
}
|
|
53
|
+
/** D19 feed paging. `cursor` is opaque — pass a prior page's `nextCursor` back verbatim. */
|
|
54
|
+
export interface OrgAuditFeedQuery {
|
|
55
|
+
cursor?: string;
|
|
56
|
+
/** 1–100. The API does NOT clamp: a value outside the range is a 400 (`OrgVisibleAuditLogQuery`, `.min(1).max(100)`). */
|
|
57
|
+
limit?: number;
|
|
58
|
+
}
|
|
59
|
+
/** `{ id, slug }` — both, because slugs retire on org deletion and ids are opaque to a reader (spec §4.1). */
|
|
60
|
+
export declare const OrgRefSchema: z.ZodObject<{
|
|
61
|
+
id: z.ZodString;
|
|
62
|
+
slug: z.ZodString;
|
|
63
|
+
}, z.core.$strip>;
|
|
64
|
+
export type OrgRef = z.infer<typeof OrgRefSchema>;
|
|
65
|
+
/**
|
|
66
|
+
* `POST /projects/:id/rehome` and its admin twin. The project read projection
|
|
67
|
+
* after the move (its `orgId` is the target) plus the re-home block.
|
|
68
|
+
*
|
|
69
|
+
* `audit_ids` is `[]` today: the platform ACL's `writeAuditLog` returns void,
|
|
70
|
+
* so there are no ids to hand back, and the API reports the field empty rather
|
|
71
|
+
* than omitting it because it is in the contract. The durable record is the
|
|
72
|
+
* ledger (`admin.listProjectRehomeEvents`), not this array.
|
|
73
|
+
*/
|
|
74
|
+
export declare const RehomeResponseSchema: z.ZodObject<{
|
|
75
|
+
id: z.ZodString;
|
|
76
|
+
name: z.ZodString;
|
|
77
|
+
domain: z.ZodOptional<z.ZodString>;
|
|
78
|
+
ownerId: z.ZodString;
|
|
79
|
+
orgId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
80
|
+
createdAt: z.ZodUnion<[z.ZodString, z.ZodString]>;
|
|
81
|
+
updatedAt: z.ZodUnion<[z.ZodString, z.ZodString]>;
|
|
82
|
+
rehome: z.ZodObject<{
|
|
83
|
+
from_org: z.ZodObject<{
|
|
84
|
+
id: z.ZodString;
|
|
85
|
+
slug: z.ZodString;
|
|
86
|
+
}, z.core.$strip>;
|
|
87
|
+
to_org: z.ZodObject<{
|
|
88
|
+
id: z.ZodString;
|
|
89
|
+
slug: z.ZodString;
|
|
90
|
+
}, z.core.$strip>;
|
|
91
|
+
audit_ids: z.ZodArray<z.ZodString>;
|
|
92
|
+
}, z.core.$strip>;
|
|
93
|
+
}, z.core.$strip>;
|
|
94
|
+
export type RehomeResponse = z.infer<typeof RehomeResponseSchema>;
|
|
95
|
+
/**
|
|
96
|
+
* A reservation (tombstone) row — `GET /admin/projects/rehomes`. One per
|
|
97
|
+
* vacated `(sourceOrgId, name)` address, pointing at where the project lives
|
|
98
|
+
* now. A reversal ANNIHILATES (A→B→A leaves no row), a release deletes; this
|
|
99
|
+
* listing is therefore the current redirect table, not the history — the
|
|
100
|
+
* history is {@link ProjectRehomeEventSchema}.
|
|
101
|
+
*/
|
|
102
|
+
export declare const ProjectRehomeSchema: z.ZodObject<{
|
|
103
|
+
id: z.ZodString;
|
|
104
|
+
sourceOrgId: z.ZodString;
|
|
105
|
+
name: z.ZodString;
|
|
106
|
+
projectId: z.ZodString;
|
|
107
|
+
targetOrgId: z.ZodString;
|
|
108
|
+
actorId: z.ZodNullable<z.ZodString>;
|
|
109
|
+
reason: z.ZodNullable<z.ZodString>;
|
|
110
|
+
createdAt: z.ZodUnion<[z.ZodString, z.ZodString]>;
|
|
111
|
+
}, z.core.$strip>;
|
|
112
|
+
export type ProjectRehome = z.infer<typeof ProjectRehomeSchema>;
|
|
113
|
+
/**
|
|
114
|
+
* Ledger event kinds (D21). Server-controlled and additive, so the schema
|
|
115
|
+
* accepts any string — the six known values are exported for callers that
|
|
116
|
+
* branch, and a seventh must not turn a successful read into a client outage
|
|
117
|
+
* (the `mergeProjects` conflict-kind lesson).
|
|
118
|
+
*/
|
|
119
|
+
export declare const PROJECT_REHOME_EVENT_KINDS: readonly ["moved", "repointed", "annihilated", "degenerate_dropped", "released", "hard_deleted"];
|
|
120
|
+
export type ProjectRehomeEventKind = (typeof PROJECT_REHOME_EVENT_KINDS)[number];
|
|
121
|
+
/** An append-only ledger row — `GET /admin/projects/rehome-events`. Nothing the API offers removes one. */
|
|
122
|
+
export declare const ProjectRehomeEventSchema: z.ZodObject<{
|
|
123
|
+
id: z.ZodString;
|
|
124
|
+
seq: z.ZodNumber;
|
|
125
|
+
event: z.ZodString;
|
|
126
|
+
projectId: z.ZodString;
|
|
127
|
+
projectName: z.ZodString;
|
|
128
|
+
fromOrgId: z.ZodNullable<z.ZodString>;
|
|
129
|
+
toOrgId: z.ZodNullable<z.ZodString>;
|
|
130
|
+
addressName: z.ZodNullable<z.ZodString>;
|
|
131
|
+
tombstoneId: z.ZodNullable<z.ZodString>;
|
|
132
|
+
actorId: z.ZodNullable<z.ZodString>;
|
|
133
|
+
viaAdminPath: z.ZodBoolean;
|
|
134
|
+
reason: z.ZodNullable<z.ZodString>;
|
|
135
|
+
cause: z.ZodNullable<z.ZodString>;
|
|
136
|
+
createdAt: z.ZodUnion<[z.ZodString, z.ZodString]>;
|
|
137
|
+
}, z.core.$strip>;
|
|
138
|
+
export type ProjectRehomeEvent = z.infer<typeof ProjectRehomeEventSchema>;
|
|
139
|
+
/** Reservation listing envelope. `total` is the MATCHING count, `returned` the page — they differ once paged. */
|
|
140
|
+
export declare const ProjectRehomeListResponseSchema: z.ZodObject<{
|
|
141
|
+
data: z.ZodArray<z.ZodObject<{
|
|
142
|
+
id: z.ZodString;
|
|
143
|
+
sourceOrgId: z.ZodString;
|
|
144
|
+
name: z.ZodString;
|
|
145
|
+
projectId: z.ZodString;
|
|
146
|
+
targetOrgId: z.ZodString;
|
|
147
|
+
actorId: z.ZodNullable<z.ZodString>;
|
|
148
|
+
reason: z.ZodNullable<z.ZodString>;
|
|
149
|
+
createdAt: z.ZodUnion<[z.ZodString, z.ZodString]>;
|
|
150
|
+
}, z.core.$strip>>;
|
|
151
|
+
total: z.ZodNumber;
|
|
152
|
+
returned: z.ZodNumber;
|
|
153
|
+
}, z.core.$strip>;
|
|
154
|
+
export type ProjectRehomeList = z.infer<typeof ProjectRehomeListResponseSchema>;
|
|
155
|
+
/** Ledger envelope — keyset-paged by `seq`; `nextCursor` is null on the last page. */
|
|
156
|
+
export declare const ProjectRehomeEventListResponseSchema: z.ZodObject<{
|
|
157
|
+
total: z.ZodNumber;
|
|
158
|
+
returned: z.ZodNumber;
|
|
159
|
+
data: z.ZodArray<z.ZodObject<{
|
|
160
|
+
id: z.ZodString;
|
|
161
|
+
seq: z.ZodNumber;
|
|
162
|
+
event: z.ZodString;
|
|
163
|
+
projectId: z.ZodString;
|
|
164
|
+
projectName: z.ZodString;
|
|
165
|
+
fromOrgId: z.ZodNullable<z.ZodString>;
|
|
166
|
+
toOrgId: z.ZodNullable<z.ZodString>;
|
|
167
|
+
addressName: z.ZodNullable<z.ZodString>;
|
|
168
|
+
tombstoneId: z.ZodNullable<z.ZodString>;
|
|
169
|
+
actorId: z.ZodNullable<z.ZodString>;
|
|
170
|
+
viaAdminPath: z.ZodBoolean;
|
|
171
|
+
reason: z.ZodNullable<z.ZodString>;
|
|
172
|
+
cause: z.ZodNullable<z.ZodString>;
|
|
173
|
+
createdAt: z.ZodUnion<[z.ZodString, z.ZodString]>;
|
|
174
|
+
}, z.core.$strip>>;
|
|
175
|
+
hasMore: z.ZodBoolean;
|
|
176
|
+
nextCursor: z.ZodNullable<z.ZodString>;
|
|
177
|
+
}, z.core.$strip>;
|
|
178
|
+
export type ProjectRehomeEventList = z.infer<typeof ProjectRehomeEventListResponseSchema>;
|
|
179
|
+
/**
|
|
180
|
+
* One row of the D19 feed (`GET /orgs/:slug/audit-log/global`). `action` is
|
|
181
|
+
* the platform's closed ENUM (`org.updated` for every re-home fact); the real
|
|
182
|
+
* event is `details.action` — see {@link RehomeAuditDetails} for the shape the
|
|
183
|
+
* re-home writer produces. `details` is typed loosely on purpose: other
|
|
184
|
+
* writers may mark rows org-visible with other shapes.
|
|
185
|
+
*/
|
|
186
|
+
export declare const OrgAuditEntrySchema: z.ZodObject<{
|
|
187
|
+
id: z.ZodString;
|
|
188
|
+
actorId: z.ZodNullable<z.ZodString>;
|
|
189
|
+
action: z.ZodString;
|
|
190
|
+
details: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
191
|
+
createdAt: z.ZodUnion<[z.ZodString, z.ZodString]>;
|
|
192
|
+
}, z.core.$strip>;
|
|
193
|
+
export type OrgAuditEntry = z.infer<typeof OrgAuditEntrySchema>;
|
|
194
|
+
export declare const OrgAuditFeedResponseSchema: z.ZodObject<{
|
|
195
|
+
data: z.ZodObject<{
|
|
196
|
+
entries: z.ZodArray<z.ZodObject<{
|
|
197
|
+
id: z.ZodString;
|
|
198
|
+
actorId: z.ZodNullable<z.ZodString>;
|
|
199
|
+
action: z.ZodString;
|
|
200
|
+
details: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
201
|
+
createdAt: z.ZodUnion<[z.ZodString, z.ZodString]>;
|
|
202
|
+
}, z.core.$strip>>;
|
|
203
|
+
}, z.core.$strip>;
|
|
204
|
+
count: z.ZodNumber;
|
|
205
|
+
hasMore: z.ZodBoolean;
|
|
206
|
+
nextCursor: z.ZodNullable<z.ZodString>;
|
|
207
|
+
}, z.core.$strip>;
|
|
208
|
+
export type OrgAuditFeed = z.infer<typeof OrgAuditFeedResponseSchema>;
|
|
209
|
+
/**
|
|
210
|
+
* The `details` blob the re-home writer puts on its audit rows (both the
|
|
211
|
+
* `rehome_out` row on the source org and the `rehome_in` row on the target).
|
|
212
|
+
* Read it with {@link readRehomeAuditDetails}, which returns `null` for rows
|
|
213
|
+
* written by anything else.
|
|
214
|
+
*/
|
|
215
|
+
export interface RehomeAuditDetails {
|
|
216
|
+
source: 'project_rehome';
|
|
217
|
+
action: 'project.rehome_out' | 'project.rehome_in' | (string & {});
|
|
218
|
+
project_id: string;
|
|
219
|
+
project_name: string;
|
|
220
|
+
from_org: OrgRef;
|
|
221
|
+
to_org: OrgRef;
|
|
222
|
+
actor: string | null;
|
|
223
|
+
reason: string | null;
|
|
224
|
+
via_admin_path: boolean;
|
|
225
|
+
to_personal_org: boolean;
|
|
226
|
+
visibility: 'org' | 'admin' | (string & {});
|
|
227
|
+
}
|
|
228
|
+
/**
|
|
229
|
+
* Narrow a feed entry's `details` to the re-home writer's shape, or `null`.
|
|
230
|
+
* A renderer branches on this: a non-null result is a project move it can
|
|
231
|
+
* describe in one line; null is some other org-visible fact to print raw.
|
|
232
|
+
*/
|
|
233
|
+
export declare function readRehomeAuditDetails(entry: Pick<OrgAuditEntry, 'details'>): RehomeAuditDetails | null;
|
|
234
|
+
//# sourceMappingURL=rehome.d.ts.map
|
|
@@ -0,0 +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,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,cAAc,EAAE,OAAO,CAAC;IACxB,eAAe,EAAE,OAAO,CAAC;IACzB,UAAU,EAAE,KAAK,GAAG,OAAO,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;CAC7C;AAgBD;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,IAAI,CAAC,aAAa,EAAE,SAAS,CAAC,GAAG,kBAAkB,GAAG,IAAI,CAiBvG"}
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Project re-home types (project-org-routing-and-rehome spec §4, D14/D19/D21).
|
|
3
|
+
*
|
|
4
|
+
* Three surfaces, three audiences, deliberately NOT one namespace:
|
|
5
|
+
*
|
|
6
|
+
* - `projects.rehome()` — the MEMBER path. Moves one project out of the
|
|
7
|
+
* caller's org context (the `org` option, or the client `orgSlug`) into
|
|
8
|
+
* another org the caller administers. This is the product capability.
|
|
9
|
+
* - `orgs.getVisibleAuditLog()` — the D19 FEED. Any member of an org can
|
|
10
|
+
* read the rows its writers marked org-visible; today that is a project
|
|
11
|
+
* leaving the org for someone's personal org.
|
|
12
|
+
* - `admin.*` — the platform-admin surface behind D20: session-only writes
|
|
13
|
+
* (a `ulr_` key gets `403 SESSION_REQUIRED`), plus the two key-readable
|
|
14
|
+
* ledgers. The Phase 4 migration script is the intended caller; an MCP tool
|
|
15
|
+
* deliberately does not exist for these.
|
|
16
|
+
*
|
|
17
|
+
* Wire casing is mixed BY CONTRACT and the schemas below pin it rather than
|
|
18
|
+
* normalise it: the re-home block (`from_org`, `to_org`, `audit_ids`) and the
|
|
19
|
+
* audit-row `details` are snake_case (spec §4.1 declares them so, and the
|
|
20
|
+
* details are written by the API as an opaque JSON blob the platform stores
|
|
21
|
+
* verbatim); the tombstone and ledger rows are camelCase business objects like
|
|
22
|
+
* every other read in this SDK. Normalising one side would make the SDK's
|
|
23
|
+
* types disagree with the curl a reader uses to check them.
|
|
24
|
+
*/
|
|
25
|
+
import { z } from 'zod';
|
|
26
|
+
import { ProjectResponseSchema, DateTimeStringSchema } from './response-schemas.js';
|
|
27
|
+
// ============================================
|
|
28
|
+
// RESPONSE SCHEMAS
|
|
29
|
+
// ============================================
|
|
30
|
+
/** `{ id, slug }` — both, because slugs retire on org deletion and ids are opaque to a reader (spec §4.1). */
|
|
31
|
+
export const OrgRefSchema = z.object({
|
|
32
|
+
id: z.string(),
|
|
33
|
+
slug: z.string(),
|
|
34
|
+
});
|
|
35
|
+
/**
|
|
36
|
+
* `POST /projects/:id/rehome` and its admin twin. The project read projection
|
|
37
|
+
* after the move (its `orgId` is the target) plus the re-home block.
|
|
38
|
+
*
|
|
39
|
+
* `audit_ids` is `[]` today: the platform ACL's `writeAuditLog` returns void,
|
|
40
|
+
* so there are no ids to hand back, and the API reports the field empty rather
|
|
41
|
+
* than omitting it because it is in the contract. The durable record is the
|
|
42
|
+
* ledger (`admin.listProjectRehomeEvents`), not this array.
|
|
43
|
+
*/
|
|
44
|
+
export const RehomeResponseSchema = ProjectResponseSchema.extend({
|
|
45
|
+
rehome: z.object({
|
|
46
|
+
from_org: OrgRefSchema,
|
|
47
|
+
to_org: OrgRefSchema,
|
|
48
|
+
audit_ids: z.array(z.string()),
|
|
49
|
+
}),
|
|
50
|
+
});
|
|
51
|
+
/**
|
|
52
|
+
* A reservation (tombstone) row — `GET /admin/projects/rehomes`. One per
|
|
53
|
+
* vacated `(sourceOrgId, name)` address, pointing at where the project lives
|
|
54
|
+
* now. A reversal ANNIHILATES (A→B→A leaves no row), a release deletes; this
|
|
55
|
+
* listing is therefore the current redirect table, not the history — the
|
|
56
|
+
* history is {@link ProjectRehomeEventSchema}.
|
|
57
|
+
*/
|
|
58
|
+
export const ProjectRehomeSchema = z.object({
|
|
59
|
+
id: z.string(),
|
|
60
|
+
sourceOrgId: z.string(),
|
|
61
|
+
/** The project's name AT THE TIME OF THE MOVE — a later rename does not move the tombstone. */
|
|
62
|
+
name: z.string(),
|
|
63
|
+
projectId: z.string(),
|
|
64
|
+
targetOrgId: z.string(),
|
|
65
|
+
/** Null for a system-actor move. */
|
|
66
|
+
actorId: z.string().nullable(),
|
|
67
|
+
reason: z.string().nullable(),
|
|
68
|
+
createdAt: DateTimeStringSchema,
|
|
69
|
+
});
|
|
70
|
+
/**
|
|
71
|
+
* Ledger event kinds (D21). Server-controlled and additive, so the schema
|
|
72
|
+
* accepts any string — the six known values are exported for callers that
|
|
73
|
+
* branch, and a seventh must not turn a successful read into a client outage
|
|
74
|
+
* (the `mergeProjects` conflict-kind lesson).
|
|
75
|
+
*/
|
|
76
|
+
export const PROJECT_REHOME_EVENT_KINDS = [
|
|
77
|
+
'moved',
|
|
78
|
+
'repointed',
|
|
79
|
+
'annihilated',
|
|
80
|
+
'degenerate_dropped',
|
|
81
|
+
'released',
|
|
82
|
+
'hard_deleted',
|
|
83
|
+
];
|
|
84
|
+
/** An append-only ledger row — `GET /admin/projects/rehome-events`. Nothing the API offers removes one. */
|
|
85
|
+
export const ProjectRehomeEventSchema = z.object({
|
|
86
|
+
id: z.string(),
|
|
87
|
+
/** Insertion order — the sort key and paging cursor. Never page this by time. */
|
|
88
|
+
seq: z.number().int().nonnegative(),
|
|
89
|
+
event: z.string().min(1),
|
|
90
|
+
projectId: z.string(),
|
|
91
|
+
projectName: z.string(),
|
|
92
|
+
fromOrgId: z.string().nullable(),
|
|
93
|
+
toOrgId: z.string().nullable(),
|
|
94
|
+
addressName: z.string().nullable(),
|
|
95
|
+
tombstoneId: z.string().nullable(),
|
|
96
|
+
actorId: z.string().nullable(),
|
|
97
|
+
viaAdminPath: z.boolean(),
|
|
98
|
+
reason: z.string().nullable(),
|
|
99
|
+
cause: z.string().nullable(),
|
|
100
|
+
createdAt: DateTimeStringSchema,
|
|
101
|
+
});
|
|
102
|
+
/** Reservation listing envelope. `total` is the MATCHING count, `returned` the page — they differ once paged. */
|
|
103
|
+
export const ProjectRehomeListResponseSchema = z.object({
|
|
104
|
+
data: z.array(ProjectRehomeSchema),
|
|
105
|
+
total: z.number().int().nonnegative(),
|
|
106
|
+
returned: z.number().int().nonnegative(),
|
|
107
|
+
});
|
|
108
|
+
/** Ledger envelope — keyset-paged by `seq`; `nextCursor` is null on the last page. */
|
|
109
|
+
export const ProjectRehomeEventListResponseSchema = ProjectRehomeListResponseSchema.extend({
|
|
110
|
+
data: z.array(ProjectRehomeEventSchema),
|
|
111
|
+
hasMore: z.boolean(),
|
|
112
|
+
nextCursor: z.string().nullable(),
|
|
113
|
+
});
|
|
114
|
+
/**
|
|
115
|
+
* One row of the D19 feed (`GET /orgs/:slug/audit-log/global`). `action` is
|
|
116
|
+
* the platform's closed ENUM (`org.updated` for every re-home fact); the real
|
|
117
|
+
* event is `details.action` — see {@link RehomeAuditDetails} for the shape the
|
|
118
|
+
* re-home writer produces. `details` is typed loosely on purpose: other
|
|
119
|
+
* writers may mark rows org-visible with other shapes.
|
|
120
|
+
*/
|
|
121
|
+
export const OrgAuditEntrySchema = z.object({
|
|
122
|
+
id: z.string(),
|
|
123
|
+
actorId: z.string().nullable(),
|
|
124
|
+
action: z.string(),
|
|
125
|
+
details: z.record(z.string(), z.unknown()),
|
|
126
|
+
createdAt: DateTimeStringSchema,
|
|
127
|
+
});
|
|
128
|
+
export const OrgAuditFeedResponseSchema = z.object({
|
|
129
|
+
data: z.object({ entries: z.array(OrgAuditEntrySchema) }),
|
|
130
|
+
count: z.number().int().nonnegative(),
|
|
131
|
+
hasMore: z.boolean(),
|
|
132
|
+
nextCursor: z.string().nullable(),
|
|
133
|
+
});
|
|
134
|
+
const RehomeAuditDetailsSchema = z.object({
|
|
135
|
+
source: z.literal('project_rehome'),
|
|
136
|
+
action: z.string(),
|
|
137
|
+
project_id: z.string(),
|
|
138
|
+
project_name: z.string(),
|
|
139
|
+
from_org: OrgRefSchema,
|
|
140
|
+
to_org: OrgRefSchema,
|
|
141
|
+
actor: z.string().nullable().optional(),
|
|
142
|
+
reason: z.string().nullable().optional(),
|
|
143
|
+
via_admin_path: z.boolean().optional(),
|
|
144
|
+
to_personal_org: z.boolean().optional(),
|
|
145
|
+
visibility: z.string().optional(),
|
|
146
|
+
});
|
|
147
|
+
/**
|
|
148
|
+
* Narrow a feed entry's `details` to the re-home writer's shape, or `null`.
|
|
149
|
+
* A renderer branches on this: a non-null result is a project move it can
|
|
150
|
+
* describe in one line; null is some other org-visible fact to print raw.
|
|
151
|
+
*/
|
|
152
|
+
export function readRehomeAuditDetails(entry) {
|
|
153
|
+
const parsed = RehomeAuditDetailsSchema.safeParse(entry.details);
|
|
154
|
+
if (!parsed.success)
|
|
155
|
+
return null;
|
|
156
|
+
const d = parsed.data;
|
|
157
|
+
return {
|
|
158
|
+
source: d.source,
|
|
159
|
+
action: d.action,
|
|
160
|
+
project_id: d.project_id,
|
|
161
|
+
project_name: d.project_name,
|
|
162
|
+
from_org: d.from_org,
|
|
163
|
+
to_org: d.to_org,
|
|
164
|
+
actor: d.actor ?? null,
|
|
165
|
+
reason: d.reason ?? null,
|
|
166
|
+
via_admin_path: d.via_admin_path ?? false,
|
|
167
|
+
to_personal_org: d.to_personal_org ?? false,
|
|
168
|
+
visibility: d.visibility ?? 'admin',
|
|
169
|
+
};
|
|
170
|
+
}
|
|
171
|
+
//# sourceMappingURL=rehome.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rehome.js","sourceRoot":"","sources":["../../src/types/rehome.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AA4CpF,+CAA+C;AAC/C,mBAAmB;AACnB,+CAA+C;AAE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AQ,EAAE,CAAC,QAAQ,EAAE;IACxC,cAAc,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IACtC,eAAe,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IACvC,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAClC,CAAC,CAAC;AAEH;;;;GAIG;AACH,MAAM,UAAU,sBAAsB,CAAC,KAAqC;IAC1E,MAAM,MAAM,GAAG,wBAAwB,CAAC,SAAS,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IACjE,IAAI,CAAC,MAAM,CAAC,OAAO;QAAE,OAAO,IAAI,CAAC;IACjC,MAAM,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC;IACtB,OAAO;QACL,MAAM,EAAE,CAAC,CAAC,MAAM;QAChB,MAAM,EAAE,CAAC,CAAC,MAAM;QAChB,UAAU,EAAE,CAAC,CAAC,UAAU;QACxB,YAAY,EAAE,CAAC,CAAC,YAAY;QAC5B,QAAQ,EAAE,CAAC,CAAC,QAAQ;QACpB,MAAM,EAAE,CAAC,CAAC,MAAM;QAChB,KAAK,EAAE,CAAC,CAAC,KAAK,IAAI,IAAI;QACtB,MAAM,EAAE,CAAC,CAAC,MAAM,IAAI,IAAI;QACxB,cAAc,EAAE,CAAC,CAAC,cAAc,IAAI,KAAK;QACzC,eAAe,EAAE,CAAC,CAAC,eAAe,IAAI,KAAK;QAC3C,UAAU,EAAE,CAAC,CAAC,UAAU,IAAI,OAAO;KACpC,CAAC;AACJ,CAAC"}
|
|
@@ -210,6 +210,19 @@ export declare const LoginResponseSchema: z.ZodObject<{
|
|
|
210
210
|
token: z.ZodOptional<z.ZodString>;
|
|
211
211
|
expiresAt: z.ZodUnion<[z.ZodString, z.ZodString]>;
|
|
212
212
|
}, z.core.$strip>;
|
|
213
|
+
/**
|
|
214
|
+
* What `POST /auth/login` answers — with 200 — for an account that has TOTP or
|
|
215
|
+
* a passkey enrolled: a challenge, and NO session. Snake_case on the wire
|
|
216
|
+
* (`password-auth-service.ts` builds it so). The SDK turns it into an
|
|
217
|
+
* `MfaRequiredError`; until 6.4.0 it hit `LoginResponseSchema` and surfaced as
|
|
218
|
+
* a ZodError on `sessionToken`.
|
|
219
|
+
*/
|
|
220
|
+
export declare const MfaChallengeResponseSchema: z.ZodObject<{
|
|
221
|
+
mfa_required: z.ZodLiteral<true>;
|
|
222
|
+
mfa_challenge_token: z.ZodString;
|
|
223
|
+
expires_at: z.ZodUnion<[z.ZodString, z.ZodString]>;
|
|
224
|
+
mfa_methods: z.ZodArray<z.ZodString>;
|
|
225
|
+
}, z.core.$strip>;
|
|
213
226
|
/**
|
|
214
227
|
* Register response schema — identical to {@link LoginResponseSchema}, because
|
|
215
228
|
* `POST /auth/register` performs an auto-login and returns the same payload
|
|
@@ -303,6 +316,7 @@ export declare const ProjectResponseSchema: z.ZodObject<{
|
|
|
303
316
|
name: z.ZodString;
|
|
304
317
|
domain: z.ZodOptional<z.ZodString>;
|
|
305
318
|
ownerId: z.ZodString;
|
|
319
|
+
orgId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
306
320
|
createdAt: z.ZodUnion<[z.ZodString, z.ZodString]>;
|
|
307
321
|
updatedAt: z.ZodUnion<[z.ZodString, z.ZodString]>;
|
|
308
322
|
}, z.core.$strip>;
|
|
@@ -320,6 +334,7 @@ export declare const ProjectSummaryResponseSchema: z.ZodObject<{
|
|
|
320
334
|
name: z.ZodString;
|
|
321
335
|
domain: z.ZodOptional<z.ZodString>;
|
|
322
336
|
ownerId: z.ZodString;
|
|
337
|
+
orgId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
323
338
|
createdAt: z.ZodUnion<[z.ZodString, z.ZodString]>;
|
|
324
339
|
updatedAt: z.ZodUnion<[z.ZodString, z.ZodString]>;
|
|
325
340
|
}, z.core.$strip>;
|
|
@@ -355,6 +370,7 @@ export declare const ProjectTrendsResponseSchema: z.ZodObject<{
|
|
|
355
370
|
name: z.ZodString;
|
|
356
371
|
domain: z.ZodOptional<z.ZodString>;
|
|
357
372
|
ownerId: z.ZodString;
|
|
373
|
+
orgId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
358
374
|
createdAt: z.ZodUnion<[z.ZodString, z.ZodString]>;
|
|
359
375
|
updatedAt: z.ZodUnion<[z.ZodString, z.ZodString]>;
|
|
360
376
|
}, z.core.$strip>;
|
|
@@ -2354,6 +2370,7 @@ export declare const ProjectListResponseSchema: z.ZodObject<{
|
|
|
2354
2370
|
name: z.ZodString;
|
|
2355
2371
|
domain: z.ZodOptional<z.ZodString>;
|
|
2356
2372
|
ownerId: z.ZodString;
|
|
2373
|
+
orgId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2357
2374
|
createdAt: z.ZodUnion<[z.ZodString, z.ZodString]>;
|
|
2358
2375
|
updatedAt: z.ZodUnion<[z.ZodString, z.ZodString]>;
|
|
2359
2376
|
}, z.core.$strip>>;
|
|
@@ -2502,6 +2519,7 @@ export declare const ProjectApiResponseSchema: z.ZodObject<{
|
|
|
2502
2519
|
name: z.ZodString;
|
|
2503
2520
|
domain: z.ZodOptional<z.ZodString>;
|
|
2504
2521
|
ownerId: z.ZodString;
|
|
2522
|
+
orgId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2505
2523
|
createdAt: z.ZodUnion<[z.ZodString, z.ZodString]>;
|
|
2506
2524
|
updatedAt: z.ZodUnion<[z.ZodString, z.ZodString]>;
|
|
2507
2525
|
}, z.core.$strip>;
|
|
@@ -2749,6 +2767,7 @@ export declare const ProjectSummaryApiResponseSchema: z.ZodObject<{
|
|
|
2749
2767
|
name: z.ZodString;
|
|
2750
2768
|
domain: z.ZodOptional<z.ZodString>;
|
|
2751
2769
|
ownerId: z.ZodString;
|
|
2770
|
+
orgId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2752
2771
|
createdAt: z.ZodUnion<[z.ZodString, z.ZodString]>;
|
|
2753
2772
|
updatedAt: z.ZodUnion<[z.ZodString, z.ZodString]>;
|
|
2754
2773
|
}, z.core.$strip>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"response-schemas.d.ts","sourceRoot":"","sources":["../../src/types/response-schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAiBxB,eAAO,MAAM,oBAAoB,wCAAmF,CAAC;AACrH,eAAO,MAAM,sBAAsB,uDAAkC,CAAC;AAEtE,eAAO,MAAM,sBAAsB;;;;;EAAqB,CAAC;AACzD,eAAO,MAAM,oBAAoB;;;;;;;;EAAmB,CAAC;AACrD,eAAO,MAAM,sBAAsB;;;;;;EAAqB,CAAC;AACzD,eAAO,MAAM,2BAA2B,aAAiC,CAAC;AAE1E;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,4BAA4B,wHAK/B,CAAC;AAEX;;;;;;GAMG;AACH,MAAM,MAAM,wBAAwB,GAChC,CAAC,OAAO,4BAA4B,CAAC,CAAC,MAAM,CAAC,GAC7C,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;AAElB;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,+BAA+B,aAAwC,CAAC;AACrF,eAAO,MAAM,uBAAuB;;;;;;;;;;;;EAAsB,CAAC;AAC3D,eAAO,MAAM,sBAAsB;;;;EAAqB,CAAC;AACzD,eAAO,MAAM,sBAAsB;;;;EAAqB,CAAC;AACzD,eAAO,MAAM,8BAA8B;;;;;;EAA6B,CAAC;AAEzE,eAAO,MAAM,yBAAyB,4BAAoD,CAAC;AAC3F,eAAO,MAAM,iCAAiC;;;;;;GAA+C,CAAC;AAM9F,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;iBAajC,CAAC;AAEH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAgBnC,CAAC;AAEH;;;;GAI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AAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAC1E,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AACxE,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAChF,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AACtE,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAC1E,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AACpE,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAC1E,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAC9E,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC"}
|
|
@@ -117,6 +117,19 @@ export const LoginResponseSchema = z.object({
|
|
|
117
117
|
token: z.string().optional(), // Legacy field
|
|
118
118
|
expiresAt: DateTimeStringSchema,
|
|
119
119
|
});
|
|
120
|
+
/**
|
|
121
|
+
* What `POST /auth/login` answers — with 200 — for an account that has TOTP or
|
|
122
|
+
* a passkey enrolled: a challenge, and NO session. Snake_case on the wire
|
|
123
|
+
* (`password-auth-service.ts` builds it so). The SDK turns it into an
|
|
124
|
+
* `MfaRequiredError`; until 6.4.0 it hit `LoginResponseSchema` and surfaced as
|
|
125
|
+
* a ZodError on `sessionToken`.
|
|
126
|
+
*/
|
|
127
|
+
export const MfaChallengeResponseSchema = z.object({
|
|
128
|
+
mfa_required: z.literal(true),
|
|
129
|
+
mfa_challenge_token: z.string().min(1),
|
|
130
|
+
expires_at: DateTimeStringSchema,
|
|
131
|
+
mfa_methods: z.array(z.string()),
|
|
132
|
+
});
|
|
120
133
|
/**
|
|
121
134
|
* Register response schema — identical to {@link LoginResponseSchema}, because
|
|
122
135
|
* `POST /auth/register` performs an auto-login and returns the same payload
|
|
@@ -198,6 +211,12 @@ export const ProjectResponseSchema = z.object({
|
|
|
198
211
|
name: z.string(),
|
|
199
212
|
domain: z.string().optional(),
|
|
200
213
|
ownerId: z.string().uuid(),
|
|
214
|
+
// The org the project lives in (6.4.0). The API has emitted this on every
|
|
215
|
+
// project read since org scoping landed; `z.object()` was stripping it, so a
|
|
216
|
+
// re-homed project's new org was invisible through the SDK. Nullable for
|
|
217
|
+
// legacy rows created before migration 061 seeded orgs; optional so a
|
|
218
|
+
// projection that omits it (diff refs) still parses.
|
|
219
|
+
orgId: z.string().nullable().optional(),
|
|
201
220
|
createdAt: DateTimeStringSchema,
|
|
202
221
|
updatedAt: DateTimeStringSchema,
|
|
203
222
|
});
|