@tai42/api-client 19.2.1 → 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.
Files changed (45) hide show
  1. package/dist/client/auth-client.d.ts +51 -0
  2. package/dist/client/auth-client.d.ts.map +1 -1
  3. package/dist/client/auth-client.js +16 -0
  4. package/dist/client/auth-client.js.map +1 -1
  5. package/dist/client/conversations-client.d.ts +4 -4
  6. package/dist/client/index.d.ts +51 -12
  7. package/dist/client/index.d.ts.map +1 -1
  8. package/dist/client/interactions-client.d.ts +10 -0
  9. package/dist/client/interactions-client.d.ts.map +1 -1
  10. package/dist/client/interactions-client.js +11 -0
  11. package/dist/client/interactions-client.js.map +1 -1
  12. package/dist/client/notifications-client.d.ts +1 -8
  13. package/dist/client/notifications-client.d.ts.map +1 -1
  14. package/dist/generated/served-schemas.d.ts +1 -45
  15. package/dist/generated/served-schemas.d.ts.map +1 -1
  16. package/dist/generated/served-schemas.js +1 -27
  17. package/dist/generated/served-schemas.js.map +1 -1
  18. package/dist/index.d.ts +1 -1
  19. package/dist/index.d.ts.map +1 -1
  20. package/dist/index.js.map +1 -1
  21. package/dist/schemas/conversations.d.ts +7 -7
  22. package/dist/schemas/index.d.ts +1 -0
  23. package/dist/schemas/index.d.ts.map +1 -1
  24. package/dist/schemas/index.js +1 -0
  25. package/dist/schemas/index.js.map +1 -1
  26. package/dist/schemas/interactions.d.ts +137 -4
  27. package/dist/schemas/interactions.d.ts.map +1 -1
  28. package/dist/schemas/interactions.js +76 -0
  29. package/dist/schemas/interactions.js.map +1 -1
  30. package/dist/schemas/members.d.ts +154 -0
  31. package/dist/schemas/members.d.ts.map +1 -0
  32. package/dist/schemas/members.js +105 -0
  33. package/dist/schemas/members.js.map +1 -0
  34. package/dist/schemas/notifications.d.ts +2 -28
  35. package/dist/schemas/notifications.d.ts.map +1 -1
  36. package/dist/schemas/served.d.ts +1 -14
  37. package/dist/schemas/served.d.ts.map +1 -1
  38. package/package.json +1 -1
  39. package/src/client/auth-client.ts +35 -0
  40. package/src/client/interactions-client.ts +12 -0
  41. package/src/generated/served-schemas.ts +1 -45
  42. package/src/index.ts +15 -0
  43. package/src/schemas/index.ts +1 -0
  44. package/src/schemas/interactions.ts +90 -0
  45. package/src/schemas/members.ts +121 -0
@@ -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,MAAM,EAAE;IACjB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE;I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AC;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;;;;;;;;;;;;;;;;;;;;;;;;;;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"}
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"}
@@ -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,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;;;;;;;;;;;;iBAA2B,CAAC;AACjD,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,QAAQ,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tai42/api-client",
3
- "version": "19.2.1",
3
+ "version": "20.0.0",
4
4
  "description": "Typed client for the tai42-skeleton HTTP API.",
5
5
  "license": "Apache-2.0",
6
6
  "author": "tai42 <oss@tai42.ai>",
@@ -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) =>
@@ -19,6 +19,18 @@ export function interactionsClient(t: Transport) {
19
19
  method: 'POST',
20
20
  body: { answer },
21
21
  }),
22
+ // React to a still-open form while it is being filled: the in-app, authenticated
23
+ // sibling of the answer door (`POST /api/interactions/{id}/react`). It carries the
24
+ // event that fired (a field changed / a page advanced / the form submitted) and the
25
+ // partial `values` filled so far, and returns a form update to apply. It is STATELESS
26
+ // on the server — it records no answer and resolves no interaction — so it never
27
+ // substitutes for the answer door. A handler error/timeout surfaces as the shared
28
+ // `apiRequest` status handling (loud), never a stale value.
29
+ reactInteraction: (interactionId: string, event: s.ReactionEvent, values: unknown) =>
30
+ req(`/api/interactions/${encodeSegment(interactionId)}/react`, s.formUpdate, {
31
+ method: 'POST',
32
+ body: { event, values },
33
+ }),
22
34
  // Withdraw a pending ask WITHOUT answering it (a bodyless POST): the question is
23
35
  // resolved as cancelled and the flow that asked never resumes. Terminal like an
24
36
  // answer, so the loud failure mappings mirror it — a 409 (already answered, so no
@@ -12,12 +12,6 @@ import { templatedText } from '../templated-text';
12
12
  export const hookSubject = z.object({ "key_expr": templatedText, "kind": z.string(), "target_kind": z.enum(["agent","tool"]), "target_name": z.string().min(1) }).strict();
13
13
  export type HookSubject = z.infer<typeof hookSubject>;
14
14
 
15
- export const mediaKind = z.enum(["image","link","document","video","audio"]);
16
- export type MediaKind = z.infer<typeof mediaKind>;
17
-
18
- export const mediaItem = z.object({ "caption": z.union([z.string(), z.null()]).default(null), "filename": z.union([z.string(), z.null()]).default(null), "kind": mediaKind, "url": z.string() });
19
- export type MediaItem = z.infer<typeof mediaItem>;
20
-
21
15
  export const overlapPolicy = z.object({ "deliver": z.enum(["one","all"]).default("one"), "running": z.enum(["continue","cancel"]).default("continue"), "settle_seconds": z.number().int().gte(0).lte(30).default(0) });
22
16
  export type OverlapPolicy = z.infer<typeof overlapPolicy>;
23
17
 
@@ -27,9 +21,6 @@ export type PresetSeedToolMeta = z.infer<typeof presetSeedToolMeta>;
27
21
  export const presetSpec = z.object({ "base_tool": z.string(), "description": z.string().default(""), "fixed_kwargs": z.record(z.string(), z.unknown()).default({}), "name": z.string() });
28
22
  export type PresetSpec = z.infer<typeof presetSpec>;
29
23
 
30
- export const quickReplyButtonParam = z.object({ "kind": z.literal("quick_reply").default("quick_reply"), "payload": z.string() });
31
- export type QuickReplyButtonParam = z.infer<typeof quickReplyButtonParam>;
32
-
33
24
  export const stateInjection = z.object({ "into": z.string().min(1), "jq": z.union([templatedText, z.null()]).default(null), "template_jq": z.union([z.string(), z.null()]).default(null) }).strict();
34
25
  export type StateInjection = z.infer<typeof stateInjection>;
35
26
 
@@ -54,48 +45,13 @@ export type StateTemplateReconcile = z.infer<typeof stateTemplateReconcile>;
54
45
  export const subAgentSpec: z.ZodType = z.lazy(() => z.object({ "description": z.string().default(""), "inline_skills": z.array(z.record(z.string(), z.unknown())).default([]), "name": z.string(), "presets": z.array(presetSpec).default([]), "response_format": z.union([z.unknown(), templatedText, z.record(z.string(), z.unknown()), z.null()]).default(null), "skills": z.array(z.string()).default([]), "strategy": z.union([z.string(), z.null()]).default(null), "subagents": z.array(subAgentSpec).default([]), "system_prompt": z.union([templatedText, z.null()]).default(null), "tool_names": z.array(z.string()).default([]), "tools": z.array(z.unknown()).default([]) }));
55
46
  export type SubAgentSpec = z.infer<typeof subAgentSpec>;
56
47
 
57
- export const urlButtonParam = z.object({ "kind": z.literal("url").default("url"), "url_parameter": z.string() });
58
- export type UrlButtonParam = z.infer<typeof urlButtonParam>;
59
-
60
48
  export const accessPolicy = z.object({ "condition": z.union([templatedText, z.null()]).default(null), "policy_data": z.record(z.string(), z.unknown()).default({}), "scopes": z.array(z.string()).default([]) });
61
49
  export type AccessPolicy = z.infer<typeof accessPolicy>;
62
50
 
63
51
  export const callbackSchema = z.object({ "carried_kwargs": z.record(z.string(), z.unknown()).default({}), "condition": z.union([templatedText, z.null()]).default(null), "expr": z.union([templatedText, z.null()]).default(null), "tool": z.string().default("") });
64
52
  export type CallbackSchema = z.infer<typeof callbackSchema>;
65
53
 
66
- export const channelTemplate = z.object({ "body_parameters": z.array(z.string()).default([]), "buttons": z.array(z.unknown().superRefine((x, ctx) => {
67
- const schemas = [quickReplyButtonParam, urlButtonParam];
68
- const { errors, failed } = schemas.reduce<{
69
- errors: z.core.$ZodIssue[];
70
- failed: number;
71
- }>(
72
- ({ errors, failed }, schema) =>
73
- ((result) =>
74
- result.error
75
- ? {
76
- errors: [...errors, ...result.error.issues],
77
- failed: failed + 1,
78
- }
79
- : { errors, failed })(
80
- schema.safeParse(x),
81
- ),
82
- { errors: [], failed: 0 },
83
- );
84
- const passed = schemas.length - failed;
85
- if (passed !== 1) {
86
- ctx.addIssue(errors.length ? {
87
- path: [],
88
- code: "invalid_union",
89
- errors: [errors],
90
- message: "Invalid input: Should pass single schema. Passed " + passed,
91
- } : {
92
- path: [],
93
- code: "custom",
94
- errors: [errors],
95
- message: "Invalid input: Should pass single schema. Passed " + passed,
96
- });
97
- }
98
- })).default([]), "header_media": z.union([mediaItem, z.null()]).default(null), "language": z.string(), "name": z.string() });
54
+ export const channelTemplate = z.object({ "language": z.string(), "name": z.string(), "parameters": z.union([z.record(z.string(), z.unknown()), z.null()]).default(null) });
99
55
  export type ChannelTemplate = z.infer<typeof channelTemplate>;
100
56
 
101
57
  export const conversationRoute = z.object({ "callback_secret": z.union([z.string(), z.null()]).default(null), "callback_url": z.union([z.string(), z.null()]).default(null), "cancel_expr": z.union([templatedText, z.null()]).default(null), "channel": z.union([z.string(), z.null()]).default(null), "door": z.enum(["api","channel"]), "error_reply_text": z.union([z.string().min(1).max(2000), z.null()]).default(null), "execution_key": z.string().min(1), "execution_key_fingerprint": z.string().min(1), "extras_expr": z.union([templatedText, z.null()]).default(null), "initial_mode": z.enum(["agent","manual"]).default("agent"), "locale": z.union([z.string(), z.null()]).default(null), "our_identity": z.union([z.string(), z.null()]).default(null), "overlap": overlapPolicy.default({"deliver":"one","running":"continue","settle_seconds":0}), "reply_expr": z.union([templatedText, z.null()]).default(null), "resume_expr": z.union([templatedText, z.null()]).default(null), "route_name": z.string(), "start_expr": z.union([templatedText, z.null()]).default(null), "target_kind": z.enum(["agent","tool"]), "target_name": z.string().min(1), "turns_per_hour_override": z.union([z.number().int().gt(0), z.null()]).default(null) });
package/src/index.ts CHANGED
@@ -114,6 +114,8 @@ export type {
114
114
  ConversationThreadsPage,
115
115
  ConversationTranscriptPage,
116
116
  DashboardMetrics,
117
+ DisplayBlock,
118
+ DisplayBlockKind,
117
119
  Extension,
118
120
  FleetOutcome,
119
121
  FleetReloadResult,
@@ -126,7 +128,10 @@ export type {
126
128
  FormData,
127
129
  FormOption,
128
130
  FormPage,
131
+ FormPageKind,
129
132
  FormPages,
133
+ FormReactions,
134
+ FormUpdate,
130
135
  GrantLevel,
131
136
  HookList,
132
137
  HookParams,
@@ -137,6 +142,8 @@ export type {
137
142
  InteractionCancelled,
138
143
  InteractionMediaItem,
139
144
  InteractionsPage,
145
+ InviteRow,
146
+ InvokeMemberActionResult,
140
147
  KindStatus,
141
148
  LoginFormField,
142
149
  LoginMethod,
@@ -175,6 +182,12 @@ export type {
175
182
  McpEnvRefs,
176
183
  McpReloadResult,
177
184
  MediaKind,
185
+ MemberActionCatalog,
186
+ MemberActionDescriptor,
187
+ MemberActionScope,
188
+ MemberDirectory,
189
+ MemberPrincipalState,
190
+ MemberRow,
178
191
  MeProjection,
179
192
  Notification,
180
193
  Notifications,
@@ -197,6 +210,8 @@ export type {
197
210
  PrincipalRef,
198
211
  ProviderCatalogResponse,
199
212
  ProviderView,
213
+ ReactionEvent,
214
+ ReactionEventKind,
200
215
  RecordSearchPage,
201
216
  ReloadConfigResult,
202
217
  RoleAuditEvent,
@@ -15,6 +15,7 @@ export * from './interactions';
15
15
  export * from './login';
16
16
  export * from './manifest-mcp';
17
17
  export * from './marketplace';
18
+ export * from './members';
18
19
  export * from './notifications';
19
20
  export * from './observability';
20
21
  export * from './policy';