@tai42/api-client 19.3.0 → 20.0.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/auth-client.d.ts +51 -0
- package/dist/client/auth-client.d.ts.map +1 -1
- package/dist/client/auth-client.js +16 -0
- package/dist/client/auth-client.js.map +1 -1
- package/dist/client/conversations-client.d.ts +4 -4
- package/dist/client/index.d.ts +42 -12
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/notifications-client.d.ts +1 -8
- package/dist/client/notifications-client.d.ts.map +1 -1
- package/dist/generated/served-schemas.d.ts +1 -45
- package/dist/generated/served-schemas.d.ts.map +1 -1
- package/dist/generated/served-schemas.js +1 -27
- package/dist/generated/served-schemas.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/schemas/conversations.d.ts +7 -7
- package/dist/schemas/index.d.ts +1 -0
- package/dist/schemas/index.d.ts.map +1 -1
- package/dist/schemas/index.js +1 -0
- package/dist/schemas/index.js.map +1 -1
- package/dist/schemas/interactions.d.ts +4 -4
- package/dist/schemas/members.d.ts +154 -0
- package/dist/schemas/members.d.ts.map +1 -0
- package/dist/schemas/members.js +105 -0
- package/dist/schemas/members.js.map +1 -0
- package/dist/schemas/notifications.d.ts +2 -28
- package/dist/schemas/notifications.d.ts.map +1 -1
- package/dist/schemas/served.d.ts +1 -14
- package/dist/schemas/served.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/client/auth-client.ts +35 -0
- package/src/generated/served-schemas.ts +1 -45
- package/src/index.ts +8 -0
- package/src/schemas/index.ts +1 -0
- package/src/schemas/members.ts +121 -0
|
@@ -31,11 +31,11 @@ export type ConversationMode = z.infer<typeof conversationMode>;
|
|
|
31
31
|
* a later turn, named by `successor_id`; both are terminal and never send.
|
|
32
32
|
*/
|
|
33
33
|
export declare const conversationDeliveryStatus: z.ZodEnum<{
|
|
34
|
-
failed: "failed";
|
|
35
34
|
accepted: "accepted";
|
|
36
35
|
pending_delivery: "pending_delivery";
|
|
37
36
|
provisional: "provisional";
|
|
38
37
|
delivered: "delivered";
|
|
38
|
+
failed: "failed";
|
|
39
39
|
shed: "shed";
|
|
40
40
|
silent: "silent";
|
|
41
41
|
merged: "merged";
|
|
@@ -222,11 +222,11 @@ export declare const conversationThread: z.ZodObject<{
|
|
|
222
222
|
last_activity_at: z.ZodNumber;
|
|
223
223
|
message_count: z.ZodNumber;
|
|
224
224
|
last_delivery_status: z.ZodEnum<{
|
|
225
|
-
failed: "failed";
|
|
226
225
|
accepted: "accepted";
|
|
227
226
|
pending_delivery: "pending_delivery";
|
|
228
227
|
provisional: "provisional";
|
|
229
228
|
delivered: "delivered";
|
|
229
|
+
failed: "failed";
|
|
230
230
|
shed: "shed";
|
|
231
231
|
silent: "silent";
|
|
232
232
|
merged: "merged";
|
|
@@ -246,11 +246,11 @@ export declare const conversationThreadsPage: z.ZodObject<{
|
|
|
246
246
|
last_activity_at: z.ZodNumber;
|
|
247
247
|
message_count: z.ZodNumber;
|
|
248
248
|
last_delivery_status: z.ZodEnum<{
|
|
249
|
-
failed: "failed";
|
|
250
249
|
accepted: "accepted";
|
|
251
250
|
pending_delivery: "pending_delivery";
|
|
252
251
|
provisional: "provisional";
|
|
253
252
|
delivered: "delivered";
|
|
253
|
+
failed: "failed";
|
|
254
254
|
shed: "shed";
|
|
255
255
|
silent: "silent";
|
|
256
256
|
merged: "merged";
|
|
@@ -294,11 +294,11 @@ export declare const conversationMessage: z.ZodObject<{
|
|
|
294
294
|
operator: "operator";
|
|
295
295
|
}>;
|
|
296
296
|
delivery_status: z.ZodEnum<{
|
|
297
|
-
failed: "failed";
|
|
298
297
|
accepted: "accepted";
|
|
299
298
|
pending_delivery: "pending_delivery";
|
|
300
299
|
provisional: "provisional";
|
|
301
300
|
delivered: "delivered";
|
|
301
|
+
failed: "failed";
|
|
302
302
|
shed: "shed";
|
|
303
303
|
silent: "silent";
|
|
304
304
|
merged: "merged";
|
|
@@ -362,11 +362,11 @@ export declare const conversationTranscriptPage: z.ZodObject<{
|
|
|
362
362
|
operator: "operator";
|
|
363
363
|
}>;
|
|
364
364
|
delivery_status: z.ZodEnum<{
|
|
365
|
-
failed: "failed";
|
|
366
365
|
accepted: "accepted";
|
|
367
366
|
pending_delivery: "pending_delivery";
|
|
368
367
|
provisional: "provisional";
|
|
369
368
|
delivered: "delivered";
|
|
369
|
+
failed: "failed";
|
|
370
370
|
shed: "shed";
|
|
371
371
|
silent: "silent";
|
|
372
372
|
merged: "merged";
|
|
@@ -423,11 +423,11 @@ export declare const conversationMessageSearchPage: z.ZodObject<{
|
|
|
423
423
|
operator: "operator";
|
|
424
424
|
}>;
|
|
425
425
|
delivery_status: z.ZodEnum<{
|
|
426
|
-
failed: "failed";
|
|
427
426
|
accepted: "accepted";
|
|
428
427
|
pending_delivery: "pending_delivery";
|
|
429
428
|
provisional: "provisional";
|
|
430
429
|
delivered: "delivered";
|
|
430
|
+
failed: "failed";
|
|
431
431
|
shed: "shed";
|
|
432
432
|
silent: "silent";
|
|
433
433
|
merged: "merged";
|
|
@@ -638,11 +638,11 @@ export declare const conversationFailedMessages: z.ZodObject<{
|
|
|
638
638
|
operator: "operator";
|
|
639
639
|
}>;
|
|
640
640
|
delivery_status: z.ZodEnum<{
|
|
641
|
-
failed: "failed";
|
|
642
641
|
accepted: "accepted";
|
|
643
642
|
pending_delivery: "pending_delivery";
|
|
644
643
|
provisional: "provisional";
|
|
645
644
|
delivered: "delivered";
|
|
645
|
+
failed: "failed";
|
|
646
646
|
shed: "shed";
|
|
647
647
|
silent: "silent";
|
|
648
648
|
merged: "merged";
|
package/dist/schemas/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/schemas/index.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAA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Ac,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC;AACxB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,mBAAmB,CAAC;AAClC,cAAc,SAAS,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AACjD,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,kBAAkB,CAAC;AACjC,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC"}
|
|
@@ -10,8 +10,8 @@ export declare const answerFormat: z.ZodEnum<{
|
|
|
10
10
|
export type AnswerFormat = z.infer<typeof answerFormat>;
|
|
11
11
|
/** The kind of a question's display-only media item: a remote/inline image, or a link. */
|
|
12
12
|
export declare const mediaKind: z.ZodEnum<{
|
|
13
|
-
image: "image";
|
|
14
13
|
link: "link";
|
|
14
|
+
image: "image";
|
|
15
15
|
}>;
|
|
16
16
|
export type MediaKind = z.infer<typeof mediaKind>;
|
|
17
17
|
/**
|
|
@@ -29,8 +29,8 @@ export type MediaKind = z.infer<typeof mediaKind>;
|
|
|
29
29
|
*/
|
|
30
30
|
export declare const interactionMediaItem: z.ZodObject<{
|
|
31
31
|
kind: z.ZodEnum<{
|
|
32
|
-
image: "image";
|
|
33
32
|
link: "link";
|
|
33
|
+
image: "image";
|
|
34
34
|
}>;
|
|
35
35
|
url: z.ZodString;
|
|
36
36
|
caption: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -43,9 +43,9 @@ export type InteractionMediaItem = z.infer<typeof interactionMediaItem>;
|
|
|
43
43
|
*/
|
|
44
44
|
export declare const attachmentMediaKind: z.ZodEnum<{
|
|
45
45
|
image: "image";
|
|
46
|
+
audio: "audio";
|
|
46
47
|
document: "document";
|
|
47
48
|
video: "video";
|
|
48
|
-
audio: "audio";
|
|
49
49
|
}>;
|
|
50
50
|
export type AttachmentMediaKind = z.infer<typeof attachmentMediaKind>;
|
|
51
51
|
/**
|
|
@@ -66,9 +66,9 @@ export type AttachmentMediaKind = z.infer<typeof attachmentMediaKind>;
|
|
|
66
66
|
export declare const attachmentMediaItem: z.ZodObject<{
|
|
67
67
|
kind: z.ZodEnum<{
|
|
68
68
|
image: "image";
|
|
69
|
+
audio: "audio";
|
|
69
70
|
document: "document";
|
|
70
71
|
video: "video";
|
|
71
|
-
audio: "audio";
|
|
72
72
|
}>;
|
|
73
73
|
url: z.ZodString;
|
|
74
74
|
caption: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
/** Member, invite, directory and member-action schemas for the generic Members view. */
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
/**
|
|
4
|
+
* Where a declared member action renders: a page-level button, a member-row menu
|
|
5
|
+
* item, or an invite-row menu item. A provider classifies each of its own actions
|
|
6
|
+
* into one of these three places; Studio only joins by `scope`, never reads the
|
|
7
|
+
* provider's meaning behind it.
|
|
8
|
+
*/
|
|
9
|
+
export declare const memberActionScope: z.ZodEnum<{
|
|
10
|
+
page: "page";
|
|
11
|
+
member_row: "member_row";
|
|
12
|
+
invite_row: "invite_row";
|
|
13
|
+
}>;
|
|
14
|
+
export type MemberActionScope = z.infer<typeof memberActionScope>;
|
|
15
|
+
/**
|
|
16
|
+
* One platform principal a member holds (`GET /api/auth/members` →
|
|
17
|
+
* `members[].principals[]`). `user_id` is the platform principal id; `disabled` is
|
|
18
|
+
* taken from that principal's own record (the store the principals listing reads),
|
|
19
|
+
* never from a provider.
|
|
20
|
+
*/
|
|
21
|
+
export declare const memberPrincipalState: z.ZodObject<{
|
|
22
|
+
user_id: z.ZodString;
|
|
23
|
+
disabled: z.ZodBoolean;
|
|
24
|
+
}, z.core.$strip>;
|
|
25
|
+
export type MemberPrincipalState = z.infer<typeof memberPrincipalState>;
|
|
26
|
+
/**
|
|
27
|
+
* One person an accounts provider owns, as the directory door returns them
|
|
28
|
+
* (`GET /api/auth/members` → `members[]`). `id` is the provider's stable handle for
|
|
29
|
+
* the person (a list key, not shown). `email` is the sign-in identity; `role` names
|
|
30
|
+
* the platform role the person holds (the NAME only — the role definition is read
|
|
31
|
+
* from the role listing). `principals` carries each principal's platform-joined
|
|
32
|
+
* state; `disabled` is derived True only when EVERY principal is disabled, so a
|
|
33
|
+
* person with any enabled principal still reads active while the per-principal truth
|
|
34
|
+
* stays visible. `handle` routes an invoke back to the producing provider and pins
|
|
35
|
+
* this row; `action_keys` are the opaque catalog keys of the actions applicable to
|
|
36
|
+
* it — Studio joins and echoes both, never parses them. `created_at` is an ISO-8601
|
|
37
|
+
* instant.
|
|
38
|
+
*/
|
|
39
|
+
export declare const memberRow: z.ZodObject<{
|
|
40
|
+
id: z.ZodString;
|
|
41
|
+
email: z.ZodString;
|
|
42
|
+
role: z.ZodString;
|
|
43
|
+
created_at: z.ZodString;
|
|
44
|
+
principals: z.ZodArray<z.ZodObject<{
|
|
45
|
+
user_id: z.ZodString;
|
|
46
|
+
disabled: z.ZodBoolean;
|
|
47
|
+
}, z.core.$strip>>;
|
|
48
|
+
disabled: z.ZodBoolean;
|
|
49
|
+
handle: z.ZodString;
|
|
50
|
+
action_keys: z.ZodArray<z.ZodString>;
|
|
51
|
+
}, z.core.$strip>;
|
|
52
|
+
export type MemberRow = z.infer<typeof memberRow>;
|
|
53
|
+
/**
|
|
54
|
+
* One outstanding invitation an accounts provider holds, as the directory door
|
|
55
|
+
* returns them (`GET /api/auth/members` → `invites[]`). `id` is the provider's
|
|
56
|
+
* stable handle for the invited person; `email` is the invited address; `role` names
|
|
57
|
+
* the platform role they will hold (name only, as on {@link memberRow}). An
|
|
58
|
+
* invitation holds no principal, so it carries no principal state. `handle` and
|
|
59
|
+
* `action_keys` are the opaque routing tokens (see {@link memberRow}). `created_at`
|
|
60
|
+
* and `expires_at` are ISO-8601 instants.
|
|
61
|
+
*/
|
|
62
|
+
export declare const inviteRow: z.ZodObject<{
|
|
63
|
+
id: z.ZodString;
|
|
64
|
+
email: z.ZodString;
|
|
65
|
+
role: z.ZodString;
|
|
66
|
+
created_at: z.ZodString;
|
|
67
|
+
expires_at: z.ZodString;
|
|
68
|
+
handle: z.ZodString;
|
|
69
|
+
action_keys: z.ZodArray<z.ZodString>;
|
|
70
|
+
}, z.core.$strip>;
|
|
71
|
+
export type InviteRow = z.infer<typeof inviteRow>;
|
|
72
|
+
/**
|
|
73
|
+
* The deployment-wide membership (`GET /api/auth/members`): every accounts
|
|
74
|
+
* provider's people and outstanding invitations, aggregated and platform-joined by
|
|
75
|
+
* the backend into one view so a generic Members screen renders without naming any
|
|
76
|
+
* provider.
|
|
77
|
+
*/
|
|
78
|
+
export declare const memberDirectory: z.ZodObject<{
|
|
79
|
+
members: z.ZodArray<z.ZodObject<{
|
|
80
|
+
id: z.ZodString;
|
|
81
|
+
email: z.ZodString;
|
|
82
|
+
role: z.ZodString;
|
|
83
|
+
created_at: z.ZodString;
|
|
84
|
+
principals: z.ZodArray<z.ZodObject<{
|
|
85
|
+
user_id: z.ZodString;
|
|
86
|
+
disabled: z.ZodBoolean;
|
|
87
|
+
}, z.core.$strip>>;
|
|
88
|
+
disabled: z.ZodBoolean;
|
|
89
|
+
handle: z.ZodString;
|
|
90
|
+
action_keys: z.ZodArray<z.ZodString>;
|
|
91
|
+
}, z.core.$strip>>;
|
|
92
|
+
invites: z.ZodArray<z.ZodObject<{
|
|
93
|
+
id: z.ZodString;
|
|
94
|
+
email: z.ZodString;
|
|
95
|
+
role: z.ZodString;
|
|
96
|
+
created_at: z.ZodString;
|
|
97
|
+
expires_at: z.ZodString;
|
|
98
|
+
handle: z.ZodString;
|
|
99
|
+
action_keys: z.ZodArray<z.ZodString>;
|
|
100
|
+
}, z.core.$strip>>;
|
|
101
|
+
}, z.core.$strip>;
|
|
102
|
+
export type MemberDirectory = z.infer<typeof memberDirectory>;
|
|
103
|
+
/**
|
|
104
|
+
* One declared member action, serialized for the catalog (`GET
|
|
105
|
+
* /api/auth/member-actions` → `actions[]`). `key` is the opaque catalog key a caller
|
|
106
|
+
* joins and echoes, never parses. `label` is the resolved wording. `scope` places
|
|
107
|
+
* the action; `destructive` asks for a confirm before invoking. `input_schema` and
|
|
108
|
+
* `result_schema` are the declared models' JSON Schema — a caller renders an input
|
|
109
|
+
* form and a read-only result view from them generically, with no provider field
|
|
110
|
+
* name known to Studio.
|
|
111
|
+
*/
|
|
112
|
+
export declare const memberActionDescriptor: z.ZodObject<{
|
|
113
|
+
key: z.ZodString;
|
|
114
|
+
label: z.ZodString;
|
|
115
|
+
scope: z.ZodEnum<{
|
|
116
|
+
page: "page";
|
|
117
|
+
member_row: "member_row";
|
|
118
|
+
invite_row: "invite_row";
|
|
119
|
+
}>;
|
|
120
|
+
destructive: z.ZodBoolean;
|
|
121
|
+
input_schema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
122
|
+
result_schema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
123
|
+
}, z.core.$strip>;
|
|
124
|
+
export type MemberActionDescriptor = z.infer<typeof memberActionDescriptor>;
|
|
125
|
+
/**
|
|
126
|
+
* Every declared member action across the registered accounts providers (`GET
|
|
127
|
+
* /api/auth/member-actions`). ADMIN-ONLY (`secret`) — a non-admin projection never
|
|
128
|
+
* reaches the route, exactly as the members listing.
|
|
129
|
+
*/
|
|
130
|
+
export declare const memberActionCatalog: z.ZodObject<{
|
|
131
|
+
actions: z.ZodArray<z.ZodObject<{
|
|
132
|
+
key: z.ZodString;
|
|
133
|
+
label: z.ZodString;
|
|
134
|
+
scope: z.ZodEnum<{
|
|
135
|
+
page: "page";
|
|
136
|
+
member_row: "member_row";
|
|
137
|
+
invite_row: "invite_row";
|
|
138
|
+
}>;
|
|
139
|
+
destructive: z.ZodBoolean;
|
|
140
|
+
input_schema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
141
|
+
result_schema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
142
|
+
}, z.core.$strip>>;
|
|
143
|
+
}, z.core.$strip>;
|
|
144
|
+
export type MemberActionCatalog = z.infer<typeof memberActionCatalog>;
|
|
145
|
+
/**
|
|
146
|
+
* The invoke-door result (`POST /api/auth/member-actions/invoke`): the provider's
|
|
147
|
+
* result-model dump, carried opaquely. `result` is rendered through the action's
|
|
148
|
+
* `result_schema`; Studio reads no field of it by name.
|
|
149
|
+
*/
|
|
150
|
+
export declare const invokeMemberActionResult: z.ZodObject<{
|
|
151
|
+
result: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
152
|
+
}, z.core.$strip>;
|
|
153
|
+
export type InvokeMemberActionResult = z.infer<typeof invokeMemberActionResult>;
|
|
154
|
+
//# sourceMappingURL=members.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"members.d.ts","sourceRoot":"","sources":["../../src/schemas/members.ts"],"names":[],"mappings":"AAAA,wFAAwF;AACxF,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB;;;;EAA+C,CAAC;AAC9E,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAElE;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB;;;iBAG/B,CAAC;AACH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAExE;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,SAAS;;;;;;;;;;;;iBASpB,CAAC;AACH,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,SAAS,CAAC,CAAC;AAElD;;;;;;;;GAQG;AACH,eAAO,MAAM,SAAS;;;;;;;;iBAQpB,CAAC;AACH,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,SAAS,CAAC,CAAC;AAElD;;;;;GAKG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;iBAG1B,CAAC;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAE9D;;;;;;;;GAQG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;;iBAOjC,CAAC;AACH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAE5E;;;;GAIG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;iBAE9B,CAAC;AACH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEtE;;;;GAIG;AACH,eAAO,MAAM,wBAAwB;;iBAEnC,CAAC;AACH,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC"}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
/** Member, invite, directory and member-action schemas for the generic Members view. */
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { jsonSchema } from './shared';
|
|
4
|
+
/**
|
|
5
|
+
* Where a declared member action renders: a page-level button, a member-row menu
|
|
6
|
+
* item, or an invite-row menu item. A provider classifies each of its own actions
|
|
7
|
+
* into one of these three places; Studio only joins by `scope`, never reads the
|
|
8
|
+
* provider's meaning behind it.
|
|
9
|
+
*/
|
|
10
|
+
export const memberActionScope = z.enum(['page', 'member_row', 'invite_row']);
|
|
11
|
+
/**
|
|
12
|
+
* One platform principal a member holds (`GET /api/auth/members` →
|
|
13
|
+
* `members[].principals[]`). `user_id` is the platform principal id; `disabled` is
|
|
14
|
+
* taken from that principal's own record (the store the principals listing reads),
|
|
15
|
+
* never from a provider.
|
|
16
|
+
*/
|
|
17
|
+
export const memberPrincipalState = z.object({
|
|
18
|
+
user_id: z.string(),
|
|
19
|
+
disabled: z.boolean(),
|
|
20
|
+
});
|
|
21
|
+
/**
|
|
22
|
+
* One person an accounts provider owns, as the directory door returns them
|
|
23
|
+
* (`GET /api/auth/members` → `members[]`). `id` is the provider's stable handle for
|
|
24
|
+
* the person (a list key, not shown). `email` is the sign-in identity; `role` names
|
|
25
|
+
* the platform role the person holds (the NAME only — the role definition is read
|
|
26
|
+
* from the role listing). `principals` carries each principal's platform-joined
|
|
27
|
+
* state; `disabled` is derived True only when EVERY principal is disabled, so a
|
|
28
|
+
* person with any enabled principal still reads active while the per-principal truth
|
|
29
|
+
* stays visible. `handle` routes an invoke back to the producing provider and pins
|
|
30
|
+
* this row; `action_keys` are the opaque catalog keys of the actions applicable to
|
|
31
|
+
* it — Studio joins and echoes both, never parses them. `created_at` is an ISO-8601
|
|
32
|
+
* instant.
|
|
33
|
+
*/
|
|
34
|
+
export const memberRow = z.object({
|
|
35
|
+
id: z.string(),
|
|
36
|
+
email: z.string(),
|
|
37
|
+
role: z.string(),
|
|
38
|
+
created_at: z.string(),
|
|
39
|
+
principals: z.array(memberPrincipalState),
|
|
40
|
+
disabled: z.boolean(),
|
|
41
|
+
handle: z.string(),
|
|
42
|
+
action_keys: z.array(z.string()),
|
|
43
|
+
});
|
|
44
|
+
/**
|
|
45
|
+
* One outstanding invitation an accounts provider holds, as the directory door
|
|
46
|
+
* returns them (`GET /api/auth/members` → `invites[]`). `id` is the provider's
|
|
47
|
+
* stable handle for the invited person; `email` is the invited address; `role` names
|
|
48
|
+
* the platform role they will hold (name only, as on {@link memberRow}). An
|
|
49
|
+
* invitation holds no principal, so it carries no principal state. `handle` and
|
|
50
|
+
* `action_keys` are the opaque routing tokens (see {@link memberRow}). `created_at`
|
|
51
|
+
* and `expires_at` are ISO-8601 instants.
|
|
52
|
+
*/
|
|
53
|
+
export const inviteRow = z.object({
|
|
54
|
+
id: z.string(),
|
|
55
|
+
email: z.string(),
|
|
56
|
+
role: z.string(),
|
|
57
|
+
created_at: z.string(),
|
|
58
|
+
expires_at: z.string(),
|
|
59
|
+
handle: z.string(),
|
|
60
|
+
action_keys: z.array(z.string()),
|
|
61
|
+
});
|
|
62
|
+
/**
|
|
63
|
+
* The deployment-wide membership (`GET /api/auth/members`): every accounts
|
|
64
|
+
* provider's people and outstanding invitations, aggregated and platform-joined by
|
|
65
|
+
* the backend into one view so a generic Members screen renders without naming any
|
|
66
|
+
* provider.
|
|
67
|
+
*/
|
|
68
|
+
export const memberDirectory = z.object({
|
|
69
|
+
members: z.array(memberRow),
|
|
70
|
+
invites: z.array(inviteRow),
|
|
71
|
+
});
|
|
72
|
+
/**
|
|
73
|
+
* One declared member action, serialized for the catalog (`GET
|
|
74
|
+
* /api/auth/member-actions` → `actions[]`). `key` is the opaque catalog key a caller
|
|
75
|
+
* joins and echoes, never parses. `label` is the resolved wording. `scope` places
|
|
76
|
+
* the action; `destructive` asks for a confirm before invoking. `input_schema` and
|
|
77
|
+
* `result_schema` are the declared models' JSON Schema — a caller renders an input
|
|
78
|
+
* form and a read-only result view from them generically, with no provider field
|
|
79
|
+
* name known to Studio.
|
|
80
|
+
*/
|
|
81
|
+
export const memberActionDescriptor = z.object({
|
|
82
|
+
key: z.string(),
|
|
83
|
+
label: z.string(),
|
|
84
|
+
scope: memberActionScope,
|
|
85
|
+
destructive: z.boolean(),
|
|
86
|
+
input_schema: jsonSchema,
|
|
87
|
+
result_schema: jsonSchema,
|
|
88
|
+
});
|
|
89
|
+
/**
|
|
90
|
+
* Every declared member action across the registered accounts providers (`GET
|
|
91
|
+
* /api/auth/member-actions`). ADMIN-ONLY (`secret`) — a non-admin projection never
|
|
92
|
+
* reaches the route, exactly as the members listing.
|
|
93
|
+
*/
|
|
94
|
+
export const memberActionCatalog = z.object({
|
|
95
|
+
actions: z.array(memberActionDescriptor),
|
|
96
|
+
});
|
|
97
|
+
/**
|
|
98
|
+
* The invoke-door result (`POST /api/auth/member-actions/invoke`): the provider's
|
|
99
|
+
* result-model dump, carried opaquely. `result` is rendered through the action's
|
|
100
|
+
* `result_schema`; Studio reads no field of it by name.
|
|
101
|
+
*/
|
|
102
|
+
export const invokeMemberActionResult = z.object({
|
|
103
|
+
result: jsonSchema,
|
|
104
|
+
});
|
|
105
|
+
//# sourceMappingURL=members.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"members.js","sourceRoot":"","sources":["../../src/schemas/members.ts"],"names":[],"mappings":"AAAA,wFAAwF;AACxF,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAEtC;;;;;GAKG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,YAAY,EAAE,YAAY,CAAC,CAAC,CAAC;AAG9E;;;;;GAKG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3C,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;IACnB,QAAQ,EAAE,CAAC,CAAC,OAAO,EAAE;CACtB,CAAC,CAAC;AAGH;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,CAAC,MAAM,CAAC;IAChC,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;IACd,KAAK,EAAE,CAAC,CAAC,MAA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;CAC1B,CAAC,CAAC;AAGH;;;;GAIG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC1C,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,sBAAsB,CAAC;CACzC,CAAC,CAAC;AAGH;;;;GAIG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC/C,MAAM,EAAE,UAAU;CACnB,CAAC,CAAC"}
|
|
@@ -7,22 +7,9 @@ export declare const notification: z.ZodObject<{
|
|
|
7
7
|
audience: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
8
8
|
media: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodUnknown>>>;
|
|
9
9
|
template: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
10
|
-
body_parameters: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
11
|
-
buttons: z.ZodDefault<z.ZodArray<z.ZodUnknown>>;
|
|
12
|
-
header_media: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
|
|
13
|
-
caption: z.ZodDefault<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
|
|
14
|
-
filename: z.ZodDefault<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
|
|
15
|
-
kind: z.ZodEnum<{
|
|
16
|
-
image: "image";
|
|
17
|
-
link: "link";
|
|
18
|
-
document: "document";
|
|
19
|
-
video: "video";
|
|
20
|
-
audio: "audio";
|
|
21
|
-
}>;
|
|
22
|
-
url: z.ZodString;
|
|
23
|
-
}, z.core.$strip>, z.ZodNull]>>;
|
|
24
10
|
language: z.ZodString;
|
|
25
11
|
name: z.ZodString;
|
|
12
|
+
parameters: z.ZodDefault<z.ZodUnion<readonly [z.ZodRecord<z.ZodString, z.ZodUnknown>, z.ZodNull]>>;
|
|
26
13
|
}, z.core.$strip>>>;
|
|
27
14
|
options: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
28
15
|
created_at: z.ZodString;
|
|
@@ -36,22 +23,9 @@ export declare const notifications: z.ZodObject<{
|
|
|
36
23
|
audience: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
37
24
|
media: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodUnknown>>>;
|
|
38
25
|
template: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
39
|
-
body_parameters: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
40
|
-
buttons: z.ZodDefault<z.ZodArray<z.ZodUnknown>>;
|
|
41
|
-
header_media: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
|
|
42
|
-
caption: z.ZodDefault<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
|
|
43
|
-
filename: z.ZodDefault<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
|
|
44
|
-
kind: z.ZodEnum<{
|
|
45
|
-
image: "image";
|
|
46
|
-
link: "link";
|
|
47
|
-
document: "document";
|
|
48
|
-
video: "video";
|
|
49
|
-
audio: "audio";
|
|
50
|
-
}>;
|
|
51
|
-
url: z.ZodString;
|
|
52
|
-
}, z.core.$strip>, z.ZodNull]>>;
|
|
53
26
|
language: z.ZodString;
|
|
54
27
|
name: z.ZodString;
|
|
28
|
+
parameters: z.ZodDefault<z.ZodUnion<readonly [z.ZodRecord<z.ZodString, z.ZodUnknown>, z.ZodNull]>>;
|
|
55
29
|
}, z.core.$strip>>>;
|
|
56
30
|
options: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
57
31
|
created_at: z.ZodString;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notifications.d.ts","sourceRoot":"","sources":["../../src/schemas/notifications.ts"],"names":[],"mappings":"AAAA,iDAAiD;AACjD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAYxB,eAAO,MAAM,YAAY
|
|
1
|
+
{"version":3,"file":"notifications.d.ts","sourceRoot":"","sources":["../../src/schemas/notifications.ts"],"names":[],"mappings":"AAAA,iDAAiD;AACjD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAYxB,eAAO,MAAM,YAAY;;;;;;;;;;;;;iBAuBvB,CAAC;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AAExD,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;iBAExB,CAAC;AACH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC"}
|
package/dist/schemas/served.d.ts
CHANGED
|
@@ -353,22 +353,9 @@ export declare const targetConversationConfig: z.ZodObject<{
|
|
|
353
353
|
}, z.core.$strip>;
|
|
354
354
|
export type TargetConversationConfig = z.input<typeof targetConversationConfig>;
|
|
355
355
|
export declare const channelTemplate: z.ZodObject<{
|
|
356
|
-
body_parameters: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
357
|
-
buttons: z.ZodDefault<z.ZodArray<z.ZodUnknown>>;
|
|
358
|
-
header_media: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
|
|
359
|
-
caption: z.ZodDefault<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
|
|
360
|
-
filename: z.ZodDefault<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
|
|
361
|
-
kind: z.ZodEnum<{
|
|
362
|
-
image: "image";
|
|
363
|
-
link: "link";
|
|
364
|
-
document: "document";
|
|
365
|
-
video: "video";
|
|
366
|
-
audio: "audio";
|
|
367
|
-
}>;
|
|
368
|
-
url: z.ZodString;
|
|
369
|
-
}, z.core.$strip>, z.ZodNull]>>;
|
|
370
356
|
language: z.ZodString;
|
|
371
357
|
name: z.ZodString;
|
|
358
|
+
parameters: z.ZodDefault<z.ZodUnion<readonly [z.ZodRecord<z.ZodString, z.ZodUnknown>, z.ZodNull]>>;
|
|
372
359
|
}, z.core.$strip>;
|
|
373
360
|
export type ChannelTemplate = z.infer<typeof channelTemplate>;
|
|
374
361
|
export declare const hookSubject: z.ZodObject<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"served.d.ts","sourceRoot":"","sources":["../../src/schemas/served.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,YAAY,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,EAAE,qBAAqB,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAMzE,eAAO,MAAM,cAAc;;;;;;;;kBAA2B,CAAC;AACvD,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAC5D,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;kBAAwB,CAAC;AACjD,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC;AACtD,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAAwB,CAAC;AACjD,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC;AACtD,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAAyB,CAAC;AACnD,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AACxD,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAAuB,CAAC;AAC/C,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAC;AACpD,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAA8B,CAAC;AA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AA2B,CAAC;AACjD,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,QAAQ,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -72,6 +72,21 @@ export interface PinRoutePublicBody {
|
|
|
72
72
|
readonly pattern?: string;
|
|
73
73
|
}
|
|
74
74
|
|
|
75
|
+
/**
|
|
76
|
+
* Body for invoking a declared member action (POST
|
|
77
|
+
* `/api/auth/member-actions/invoke`). `action_key` is the opaque catalog key;
|
|
78
|
+
* `target_handle` is the row handle the action acts on, `null` for a page-scoped
|
|
79
|
+
* action; `input` is the per-action input the backend validates against the action's
|
|
80
|
+
* declared input model. All three are opaque to Studio — the keys are joined and
|
|
81
|
+
* echoed, the input is built from the action's `input_schema`, and no provider field
|
|
82
|
+
* is named here.
|
|
83
|
+
*/
|
|
84
|
+
export interface InvokeMemberActionBody {
|
|
85
|
+
readonly action_key: string;
|
|
86
|
+
readonly target_handle: string | null;
|
|
87
|
+
readonly input: Record<string, unknown>;
|
|
88
|
+
}
|
|
89
|
+
|
|
75
90
|
export function authClient(t: Transport) {
|
|
76
91
|
const { req } = t;
|
|
77
92
|
return {
|
|
@@ -144,6 +159,26 @@ export function authClient(t: Transport) {
|
|
|
144
159
|
createClaimLink: (body: ClaimLinkBody) =>
|
|
145
160
|
req('/api/auth/claim-links', s.claimLinkCreated, { method: 'POST', body }),
|
|
146
161
|
|
|
162
|
+
// The deployment-wide membership: every accounts provider's people and
|
|
163
|
+
// outstanding invitations, aggregated and platform-joined server-side into one
|
|
164
|
+
// directory (each row carrying its principal state + opaque routing tokens).
|
|
165
|
+
// ADMIN-ONLY (`secret`) — a non-admin projection never reaches the route.
|
|
166
|
+
listMembers: (signal?: AbortSignal) => req('/api/auth/members', s.memberDirectory, { signal }),
|
|
167
|
+
|
|
168
|
+
// The catalog of member-admin actions every accounts provider declares, each
|
|
169
|
+
// with its opaque key, rendered label, placement, and input/result JSON Schema.
|
|
170
|
+
// ADMIN-ONLY (`secret`) — the same fence the members listing carries.
|
|
171
|
+
listMemberActions: (signal?: AbortSignal) =>
|
|
172
|
+
req('/api/auth/member-actions', s.memberActionCatalog, { signal }),
|
|
173
|
+
// Invoke one declared action by its opaque key, echoing the target row's handle
|
|
174
|
+
// and the per-action input. The result is carried opaquely for a read-only,
|
|
175
|
+
// schema-driven render. ADMIN-ONLY (`fenced`).
|
|
176
|
+
invokeMemberAction: (body: InvokeMemberActionBody) =>
|
|
177
|
+
req('/api/auth/member-actions/invoke', s.invokeMemberActionResult, {
|
|
178
|
+
method: 'POST',
|
|
179
|
+
body,
|
|
180
|
+
}),
|
|
181
|
+
|
|
147
182
|
// The deployment's principals (identities). ADMIN-ONLY (`secret`) — a
|
|
148
183
|
// non-admin projection never reaches the route.
|
|
149
184
|
listPrincipals: (signal?: AbortSignal) =>
|