@automate.ax/api-contract 0.130.8 → 0.131.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/dist/index.d.ts +1 -19
- package/dist/index.js +1 -1
- package/dist/org.d.ts +2 -14
- package/dist/org.js +5 -3
- package/dist/permissions.d.ts +3 -13
- package/dist/permissions.js +3 -13
- package/package.json +3 -3
- package/src/index.ts +1 -0
- package/src/org.ts +7 -3
- package/src/permissions.ts +4 -13
package/dist/index.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ export { integrationAccountOutputSchema, integrationAccountRevocationImpactOutpu
|
|
|
7
7
|
export { AUTOMATION_INVOCATION_DEFAULT_ENTRYPOINT, AUTOMATION_INVOCATION_RESERVED_ENTRYPOINT_PREFIX, AUTOMATION_IMAGE_GENERATION_ENTRYPOINT_PREFIX, AUTOMATION_LOG_MAX_ENTRIES, AUTOMATION_LOG_MAX_MESSAGE_LENGTH, AUTOMATION_OBSERVABILITY_MAX_ENCODED_BYTES, AUTOMATION_OBSERVABILITY_MAX_FIELDS, DEFAULT_GATEWAY_IMAGE_MODEL_ID, DEFAULT_GATEWAY_MODEL_ID, DEFAULT_ACTION_MAX_ATTEMPTS, MAX_ACTION_ATTEMPTS, actionReplaySafetySchema, automationInvocationInputSchema, automationInvocationOutputSchema, automationInvocationScheduleSchema, generationInputSchema, generationResultSchema, imageGenerationInputSchema, imageGenerationCompletionSchema, imageGenerationResultSchema, platformImageGenerationInputSchema, platformImageGenerationStartSchema, hashSignalCoordinatorConfiguration, runtimeContract, type GenerationInput, type GenerationResult, type ImageGenerationInput, type ImageGenerationCompletion, type ImageGenerationResult, type PlatformImageGenerationInput, type RuntimeGenerationInput, type RuntimeCoordinationOffer, type ActionReplaySafety, type RuntimeActionAttemptCompletion, type RuntimeActionAttemptStart, } from "./runtime.js";
|
|
8
8
|
export type { GatewayImageModelId, GatewayModelId } from "@ai-sdk/gateway";
|
|
9
9
|
export { createdOrganizationApiKeyOutputSchema, organizationApiKeyOutputSchema, } from "./api-key.js";
|
|
10
|
-
export { activeSubscriptionOutputSchema, createdInvitationOutputSchema, organizationDetailsOutputSchema, organizationInvitationOutputSchema, organizationMemberOutputSchema, organizationProjectOutputSchema, organizationRoleSchema, organizationSummaryOutputSchema, publicOrganizationOutputSchema, } from "./org.js";
|
|
10
|
+
export { activeSubscriptionOutputSchema, createdInvitationOutputSchema, organizationDetailsOutputSchema, organizationInvitationOutputSchema, organizationMemberOutputSchema, organizationProjectOutputSchema, organizationRoleSchema, organizationRoles, organizationSummaryOutputSchema, publicOrganizationOutputSchema, } from "./org.js";
|
|
11
11
|
export { projectOutputSchema } from "./project.js";
|
|
12
12
|
export { cursorPageInfoSchema, cursorPageOutputSchema, cursorPaginationInputSchema, reasonableNameSchema, } from "./schemas.js";
|
|
13
13
|
export { userOutputSchema } from "./auth.js";
|
|
@@ -821,7 +821,6 @@ export declare const publicContract: {
|
|
|
821
821
|
role: import("zod").ZodEnum<{
|
|
822
822
|
member: "member";
|
|
823
823
|
admin: "admin";
|
|
824
|
-
owner: "owner";
|
|
825
824
|
}>;
|
|
826
825
|
memberCount: import("zod").ZodNumber;
|
|
827
826
|
pendingInvitationCount: import("zod").ZodNumber;
|
|
@@ -858,7 +857,6 @@ export declare const publicContract: {
|
|
|
858
857
|
role: import("zod").ZodEnum<{
|
|
859
858
|
member: "member";
|
|
860
859
|
admin: "admin";
|
|
861
|
-
owner: "owner";
|
|
862
860
|
}>;
|
|
863
861
|
createdAt: import("zod").ZodDate;
|
|
864
862
|
email: import("zod").ZodEmail;
|
|
@@ -871,7 +869,6 @@ export declare const publicContract: {
|
|
|
871
869
|
role: import("zod").ZodNullable<import("zod").ZodEnum<{
|
|
872
870
|
member: "member";
|
|
873
871
|
admin: "admin";
|
|
874
|
-
owner: "owner";
|
|
875
872
|
}>>;
|
|
876
873
|
status: import("zod").ZodString;
|
|
877
874
|
createdAt: import("zod").ZodDate;
|
|
@@ -890,7 +887,6 @@ export declare const publicContract: {
|
|
|
890
887
|
role: import("zod").ZodDefault<import("zod").ZodEnum<{
|
|
891
888
|
member: "member";
|
|
892
889
|
admin: "admin";
|
|
893
|
-
owner: "owner";
|
|
894
890
|
}>>;
|
|
895
891
|
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
896
892
|
id: import("zod").ZodString;
|
|
@@ -898,7 +894,6 @@ export declare const publicContract: {
|
|
|
898
894
|
role: import("zod").ZodNullable<import("zod").ZodEnum<{
|
|
899
895
|
member: "member";
|
|
900
896
|
admin: "admin";
|
|
901
|
-
owner: "owner";
|
|
902
897
|
}>>;
|
|
903
898
|
status: import("zod").ZodString;
|
|
904
899
|
}, import("zod/v4/core").$strip>, Record<never, never>, Record<never, never>>;
|
|
@@ -919,7 +914,6 @@ export declare const publicContract: {
|
|
|
919
914
|
role: import("zod").ZodEnum<{
|
|
920
915
|
member: "member";
|
|
921
916
|
admin: "admin";
|
|
922
|
-
owner: "owner";
|
|
923
917
|
}>;
|
|
924
918
|
memberCount: import("zod").ZodNumber;
|
|
925
919
|
pendingInvitationCount: import("zod").ZodNumber;
|
|
@@ -1397,7 +1391,6 @@ export declare const firstPartyContract: {
|
|
|
1397
1391
|
role: import("zod").ZodEnum<{
|
|
1398
1392
|
member: "member";
|
|
1399
1393
|
admin: "admin";
|
|
1400
|
-
owner: "owner";
|
|
1401
1394
|
}>;
|
|
1402
1395
|
memberCount: import("zod").ZodNumber;
|
|
1403
1396
|
pendingInvitationCount: import("zod").ZodNumber;
|
|
@@ -1434,7 +1427,6 @@ export declare const firstPartyContract: {
|
|
|
1434
1427
|
role: import("zod").ZodEnum<{
|
|
1435
1428
|
member: "member";
|
|
1436
1429
|
admin: "admin";
|
|
1437
|
-
owner: "owner";
|
|
1438
1430
|
}>;
|
|
1439
1431
|
createdAt: import("zod").ZodDate;
|
|
1440
1432
|
email: import("zod").ZodEmail;
|
|
@@ -1447,7 +1439,6 @@ export declare const firstPartyContract: {
|
|
|
1447
1439
|
role: import("zod").ZodNullable<import("zod").ZodEnum<{
|
|
1448
1440
|
member: "member";
|
|
1449
1441
|
admin: "admin";
|
|
1450
|
-
owner: "owner";
|
|
1451
1442
|
}>>;
|
|
1452
1443
|
status: import("zod").ZodString;
|
|
1453
1444
|
createdAt: import("zod").ZodDate;
|
|
@@ -1466,7 +1457,6 @@ export declare const firstPartyContract: {
|
|
|
1466
1457
|
role: import("zod").ZodDefault<import("zod").ZodEnum<{
|
|
1467
1458
|
member: "member";
|
|
1468
1459
|
admin: "admin";
|
|
1469
|
-
owner: "owner";
|
|
1470
1460
|
}>>;
|
|
1471
1461
|
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
1472
1462
|
id: import("zod").ZodString;
|
|
@@ -1474,7 +1464,6 @@ export declare const firstPartyContract: {
|
|
|
1474
1464
|
role: import("zod").ZodNullable<import("zod").ZodEnum<{
|
|
1475
1465
|
member: "member";
|
|
1476
1466
|
admin: "admin";
|
|
1477
|
-
owner: "owner";
|
|
1478
1467
|
}>>;
|
|
1479
1468
|
status: import("zod").ZodString;
|
|
1480
1469
|
}, import("zod/v4/core").$strip>, Record<never, never>, Record<never, never>>;
|
|
@@ -1495,7 +1484,6 @@ export declare const firstPartyContract: {
|
|
|
1495
1484
|
role: import("zod").ZodEnum<{
|
|
1496
1485
|
member: "member";
|
|
1497
1486
|
admin: "admin";
|
|
1498
|
-
owner: "owner";
|
|
1499
1487
|
}>;
|
|
1500
1488
|
memberCount: import("zod").ZodNumber;
|
|
1501
1489
|
pendingInvitationCount: import("zod").ZodNumber;
|
|
@@ -7524,7 +7512,6 @@ export declare const contract: {
|
|
|
7524
7512
|
role: import("zod").ZodEnum<{
|
|
7525
7513
|
member: "member";
|
|
7526
7514
|
admin: "admin";
|
|
7527
|
-
owner: "owner";
|
|
7528
7515
|
}>;
|
|
7529
7516
|
memberCount: import("zod").ZodNumber;
|
|
7530
7517
|
pendingInvitationCount: import("zod").ZodNumber;
|
|
@@ -7561,7 +7548,6 @@ export declare const contract: {
|
|
|
7561
7548
|
role: import("zod").ZodEnum<{
|
|
7562
7549
|
member: "member";
|
|
7563
7550
|
admin: "admin";
|
|
7564
|
-
owner: "owner";
|
|
7565
7551
|
}>;
|
|
7566
7552
|
createdAt: import("zod").ZodDate;
|
|
7567
7553
|
email: import("zod").ZodEmail;
|
|
@@ -7574,7 +7560,6 @@ export declare const contract: {
|
|
|
7574
7560
|
role: import("zod").ZodNullable<import("zod").ZodEnum<{
|
|
7575
7561
|
member: "member";
|
|
7576
7562
|
admin: "admin";
|
|
7577
|
-
owner: "owner";
|
|
7578
7563
|
}>>;
|
|
7579
7564
|
status: import("zod").ZodString;
|
|
7580
7565
|
createdAt: import("zod").ZodDate;
|
|
@@ -7593,7 +7578,6 @@ export declare const contract: {
|
|
|
7593
7578
|
role: import("zod").ZodDefault<import("zod").ZodEnum<{
|
|
7594
7579
|
member: "member";
|
|
7595
7580
|
admin: "admin";
|
|
7596
|
-
owner: "owner";
|
|
7597
7581
|
}>>;
|
|
7598
7582
|
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
7599
7583
|
id: import("zod").ZodString;
|
|
@@ -7601,7 +7585,6 @@ export declare const contract: {
|
|
|
7601
7585
|
role: import("zod").ZodNullable<import("zod").ZodEnum<{
|
|
7602
7586
|
member: "member";
|
|
7603
7587
|
admin: "admin";
|
|
7604
|
-
owner: "owner";
|
|
7605
7588
|
}>>;
|
|
7606
7589
|
status: import("zod").ZodString;
|
|
7607
7590
|
}, import("zod/v4/core").$strip>, Record<never, never>, Record<never, never>>;
|
|
@@ -7622,7 +7605,6 @@ export declare const contract: {
|
|
|
7622
7605
|
role: import("zod").ZodEnum<{
|
|
7623
7606
|
member: "member";
|
|
7624
7607
|
admin: "admin";
|
|
7625
|
-
owner: "owner";
|
|
7626
7608
|
}>;
|
|
7627
7609
|
memberCount: import("zod").ZodNumber;
|
|
7628
7610
|
pendingInvitationCount: import("zod").ZodNumber;
|
package/dist/index.js
CHANGED
|
@@ -17,7 +17,7 @@ export { AUTOMATION_ERROR_CAUSE_DEPTH, automationErrorSchema, } from "./errors.j
|
|
|
17
17
|
export { integrationAccountOutputSchema, integrationAccountRevocationImpactOutputSchema, integrationAccountRevocationOutputSchema, integrationServiceOutputSchema, } from "./account.js";
|
|
18
18
|
export { AUTOMATION_INVOCATION_DEFAULT_ENTRYPOINT, AUTOMATION_INVOCATION_RESERVED_ENTRYPOINT_PREFIX, AUTOMATION_IMAGE_GENERATION_ENTRYPOINT_PREFIX, AUTOMATION_LOG_MAX_ENTRIES, AUTOMATION_LOG_MAX_MESSAGE_LENGTH, AUTOMATION_OBSERVABILITY_MAX_ENCODED_BYTES, AUTOMATION_OBSERVABILITY_MAX_FIELDS, DEFAULT_GATEWAY_IMAGE_MODEL_ID, DEFAULT_GATEWAY_MODEL_ID, DEFAULT_ACTION_MAX_ATTEMPTS, MAX_ACTION_ATTEMPTS, actionReplaySafetySchema, automationInvocationInputSchema, automationInvocationOutputSchema, automationInvocationScheduleSchema, generationInputSchema, generationResultSchema, imageGenerationInputSchema, imageGenerationCompletionSchema, imageGenerationResultSchema, platformImageGenerationInputSchema, platformImageGenerationStartSchema, hashSignalCoordinatorConfiguration, runtimeContract, } from "./runtime.js";
|
|
19
19
|
export { createdOrganizationApiKeyOutputSchema, organizationApiKeyOutputSchema, } from "./api-key.js";
|
|
20
|
-
export { activeSubscriptionOutputSchema, createdInvitationOutputSchema, organizationDetailsOutputSchema, organizationInvitationOutputSchema, organizationMemberOutputSchema, organizationProjectOutputSchema, organizationRoleSchema, organizationSummaryOutputSchema, publicOrganizationOutputSchema, } from "./org.js";
|
|
20
|
+
export { activeSubscriptionOutputSchema, createdInvitationOutputSchema, organizationDetailsOutputSchema, organizationInvitationOutputSchema, organizationMemberOutputSchema, organizationProjectOutputSchema, organizationRoleSchema, organizationRoles, organizationSummaryOutputSchema, publicOrganizationOutputSchema, } from "./org.js";
|
|
21
21
|
export { projectOutputSchema } from "./project.js";
|
|
22
22
|
export { cursorPageInfoSchema, cursorPageOutputSchema, cursorPaginationInputSchema, reasonableNameSchema, } from "./schemas.js";
|
|
23
23
|
export { userOutputSchema } from "./auth.js";
|
package/dist/org.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import * as z from "zod";
|
|
2
|
+
import { organizationRoles } from "./permissions.js";
|
|
2
3
|
export declare const organizationRoleSchema: z.ZodEnum<{
|
|
3
4
|
member: "member";
|
|
4
5
|
admin: "admin";
|
|
5
|
-
owner: "owner";
|
|
6
6
|
}>;
|
|
7
|
+
export { organizationRoles };
|
|
7
8
|
export declare const publicOrganizationOutputSchema: z.ZodObject<{
|
|
8
9
|
id: z.ZodString;
|
|
9
10
|
name: z.ZodString;
|
|
@@ -24,7 +25,6 @@ export declare const organizationSummaryOutputSchema: z.ZodObject<{
|
|
|
24
25
|
role: z.ZodEnum<{
|
|
25
26
|
member: "member";
|
|
26
27
|
admin: "admin";
|
|
27
|
-
owner: "owner";
|
|
28
28
|
}>;
|
|
29
29
|
memberCount: z.ZodNumber;
|
|
30
30
|
pendingInvitationCount: z.ZodNumber;
|
|
@@ -62,7 +62,6 @@ export declare const organizationMemberOutputSchema: z.ZodObject<{
|
|
|
62
62
|
role: z.ZodEnum<{
|
|
63
63
|
member: "member";
|
|
64
64
|
admin: "admin";
|
|
65
|
-
owner: "owner";
|
|
66
65
|
}>;
|
|
67
66
|
createdAt: z.ZodDate;
|
|
68
67
|
email: z.ZodEmail;
|
|
@@ -75,7 +74,6 @@ export declare const organizationInvitationOutputSchema: z.ZodObject<{
|
|
|
75
74
|
role: z.ZodNullable<z.ZodEnum<{
|
|
76
75
|
member: "member";
|
|
77
76
|
admin: "admin";
|
|
78
|
-
owner: "owner";
|
|
79
77
|
}>>;
|
|
80
78
|
status: z.ZodString;
|
|
81
79
|
createdAt: z.ZodDate;
|
|
@@ -95,7 +93,6 @@ export declare const organizationDetailsOutputSchema: z.ZodObject<{
|
|
|
95
93
|
role: z.ZodEnum<{
|
|
96
94
|
member: "member";
|
|
97
95
|
admin: "admin";
|
|
98
|
-
owner: "owner";
|
|
99
96
|
}>;
|
|
100
97
|
memberCount: z.ZodNumber;
|
|
101
98
|
pendingInvitationCount: z.ZodNumber;
|
|
@@ -132,7 +129,6 @@ export declare const organizationDetailsOutputSchema: z.ZodObject<{
|
|
|
132
129
|
role: z.ZodEnum<{
|
|
133
130
|
member: "member";
|
|
134
131
|
admin: "admin";
|
|
135
|
-
owner: "owner";
|
|
136
132
|
}>;
|
|
137
133
|
createdAt: z.ZodDate;
|
|
138
134
|
email: z.ZodEmail;
|
|
@@ -145,7 +141,6 @@ export declare const organizationDetailsOutputSchema: z.ZodObject<{
|
|
|
145
141
|
role: z.ZodNullable<z.ZodEnum<{
|
|
146
142
|
member: "member";
|
|
147
143
|
admin: "admin";
|
|
148
|
-
owner: "owner";
|
|
149
144
|
}>>;
|
|
150
145
|
status: z.ZodString;
|
|
151
146
|
createdAt: z.ZodDate;
|
|
@@ -163,7 +158,6 @@ export declare const createdInvitationOutputSchema: z.ZodObject<{
|
|
|
163
158
|
role: z.ZodNullable<z.ZodEnum<{
|
|
164
159
|
member: "member";
|
|
165
160
|
admin: "admin";
|
|
166
|
-
owner: "owner";
|
|
167
161
|
}>>;
|
|
168
162
|
status: z.ZodString;
|
|
169
163
|
}, z.core.$strip>;
|
|
@@ -210,7 +204,6 @@ export declare const orgContract: {
|
|
|
210
204
|
role: z.ZodEnum<{
|
|
211
205
|
member: "member";
|
|
212
206
|
admin: "admin";
|
|
213
|
-
owner: "owner";
|
|
214
207
|
}>;
|
|
215
208
|
memberCount: z.ZodNumber;
|
|
216
209
|
pendingInvitationCount: z.ZodNumber;
|
|
@@ -247,7 +240,6 @@ export declare const orgContract: {
|
|
|
247
240
|
role: z.ZodEnum<{
|
|
248
241
|
member: "member";
|
|
249
242
|
admin: "admin";
|
|
250
|
-
owner: "owner";
|
|
251
243
|
}>;
|
|
252
244
|
createdAt: z.ZodDate;
|
|
253
245
|
email: z.ZodEmail;
|
|
@@ -260,7 +252,6 @@ export declare const orgContract: {
|
|
|
260
252
|
role: z.ZodNullable<z.ZodEnum<{
|
|
261
253
|
member: "member";
|
|
262
254
|
admin: "admin";
|
|
263
|
-
owner: "owner";
|
|
264
255
|
}>>;
|
|
265
256
|
status: z.ZodString;
|
|
266
257
|
createdAt: z.ZodDate;
|
|
@@ -279,7 +270,6 @@ export declare const orgContract: {
|
|
|
279
270
|
role: z.ZodDefault<z.ZodEnum<{
|
|
280
271
|
member: "member";
|
|
281
272
|
admin: "admin";
|
|
282
|
-
owner: "owner";
|
|
283
273
|
}>>;
|
|
284
274
|
}, z.core.$strip>, z.ZodObject<{
|
|
285
275
|
id: z.ZodString;
|
|
@@ -287,7 +277,6 @@ export declare const orgContract: {
|
|
|
287
277
|
role: z.ZodNullable<z.ZodEnum<{
|
|
288
278
|
member: "member";
|
|
289
279
|
admin: "admin";
|
|
290
|
-
owner: "owner";
|
|
291
280
|
}>>;
|
|
292
281
|
status: z.ZodString;
|
|
293
282
|
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
@@ -308,7 +297,6 @@ export declare const orgContract: {
|
|
|
308
297
|
role: z.ZodEnum<{
|
|
309
298
|
member: "member";
|
|
310
299
|
admin: "admin";
|
|
311
|
-
owner: "owner";
|
|
312
300
|
}>;
|
|
313
301
|
memberCount: z.ZodNumber;
|
|
314
302
|
pendingInvitationCount: z.ZodNumber;
|
package/dist/org.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { oc } from "@orpc/contract";
|
|
2
2
|
import * as z from "zod";
|
|
3
3
|
import { cursorPageOutputSchema, cursorPaginationInputSchema, reasonableNameSchema, } from "./schemas.js";
|
|
4
|
-
|
|
4
|
+
import { organizationRoles } from "./permissions.js";
|
|
5
|
+
export const organizationRoleSchema = z.enum(organizationRoles);
|
|
6
|
+
export { organizationRoles };
|
|
5
7
|
export const publicOrganizationOutputSchema = z.object({
|
|
6
8
|
id: z.string(),
|
|
7
9
|
name: z.string(),
|
|
@@ -95,7 +97,7 @@ export const orgContract = {
|
|
|
95
97
|
path: "/organizations",
|
|
96
98
|
operationId: "createOrganization",
|
|
97
99
|
summary: "Create organization",
|
|
98
|
-
description: "Creates an organization
|
|
100
|
+
description: "Creates an organization administered by the authenticated user.",
|
|
99
101
|
successStatus: 201,
|
|
100
102
|
successDescription: "Organization created.",
|
|
101
103
|
tags: ["Organizations"],
|
|
@@ -151,7 +153,7 @@ export const orgContract = {
|
|
|
151
153
|
path: "/organizations/{organizationId}/membership",
|
|
152
154
|
operationId: "leaveOrganization",
|
|
153
155
|
summary: "Leave organization",
|
|
154
|
-
description: "Removes the current user from an organization.
|
|
156
|
+
description: "Removes the current user from an organization. Admins must ask another admin to remove them or delete the organization instead.",
|
|
155
157
|
tags: ["Organizations"],
|
|
156
158
|
successStatus: 204,
|
|
157
159
|
})
|
package/dist/permissions.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/** Organization roles exposed by management interfaces. */
|
|
2
|
+
export declare const organizationRoles: readonly ["member", "admin"];
|
|
1
3
|
/** Management permissions understood by organization roles and API keys. */
|
|
2
4
|
export declare const managementPermissionStatement: {
|
|
3
5
|
readonly ac: readonly ["create", "read", "update", "delete"];
|
|
@@ -17,18 +19,6 @@ export type ManagementPermission = {
|
|
|
17
19
|
};
|
|
18
20
|
/** Static organization roles are permission bundles, not authorization checks. */
|
|
19
21
|
export declare const managementRolePermissions: {
|
|
20
|
-
readonly admin: {
|
|
21
|
-
readonly ac: ["create", "read", "update", "delete"];
|
|
22
|
-
readonly account: ["create", "read", "delete"];
|
|
23
|
-
readonly apiKey: ["create", "read", "update", "delete"];
|
|
24
|
-
readonly authorization: ["create", "read", "update"];
|
|
25
|
-
readonly deployment: ["create", "read", "cancel"];
|
|
26
|
-
readonly invitation: ["create", "read", "cancel"];
|
|
27
|
-
readonly member: ["create", "read", "update", "delete", "leave"];
|
|
28
|
-
readonly organization: ["read", "update"];
|
|
29
|
-
readonly project: ["create", "read", "update", "delete"];
|
|
30
|
-
readonly team: ["create", "update", "delete"];
|
|
31
|
-
};
|
|
32
22
|
readonly member: {
|
|
33
23
|
readonly ac: ["read"];
|
|
34
24
|
readonly account: ["read"];
|
|
@@ -39,7 +29,7 @@ export declare const managementRolePermissions: {
|
|
|
39
29
|
readonly organization: ["read"];
|
|
40
30
|
readonly project: ["create", "read"];
|
|
41
31
|
};
|
|
42
|
-
readonly
|
|
32
|
+
readonly admin: {
|
|
43
33
|
readonly ac: ["create", "read", "update", "delete"];
|
|
44
34
|
readonly account: ["create", "read", "delete"];
|
|
45
35
|
readonly apiKey: ["create", "read", "update", "delete"];
|
package/dist/permissions.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/** Organization roles exposed by management interfaces. */
|
|
2
|
+
export const organizationRoles = ["member", "admin"];
|
|
1
3
|
/** Management permissions understood by organization roles and API keys. */
|
|
2
4
|
export const managementPermissionStatement = {
|
|
3
5
|
ac: ["create", "read", "update", "delete"],
|
|
@@ -14,18 +16,6 @@ export const managementPermissionStatement = {
|
|
|
14
16
|
};
|
|
15
17
|
/** Static organization roles are permission bundles, not authorization checks. */
|
|
16
18
|
export const managementRolePermissions = {
|
|
17
|
-
admin: {
|
|
18
|
-
ac: ["create", "read", "update", "delete"],
|
|
19
|
-
account: ["create", "read", "delete"],
|
|
20
|
-
apiKey: ["create", "read", "update", "delete"],
|
|
21
|
-
authorization: ["create", "read", "update"],
|
|
22
|
-
deployment: ["create", "read", "cancel"],
|
|
23
|
-
invitation: ["create", "read", "cancel"],
|
|
24
|
-
member: ["create", "read", "update", "delete", "leave"],
|
|
25
|
-
organization: ["read", "update"],
|
|
26
|
-
project: ["create", "read", "update", "delete"],
|
|
27
|
-
team: ["create", "update", "delete"],
|
|
28
|
-
},
|
|
29
19
|
member: {
|
|
30
20
|
ac: ["read"],
|
|
31
21
|
account: ["read"],
|
|
@@ -36,7 +26,7 @@ export const managementRolePermissions = {
|
|
|
36
26
|
organization: ["read"],
|
|
37
27
|
project: ["create", "read"],
|
|
38
28
|
},
|
|
39
|
-
|
|
29
|
+
admin: {
|
|
40
30
|
ac: ["create", "read", "update", "delete"],
|
|
41
31
|
account: ["create", "read", "delete"],
|
|
42
32
|
apiKey: ["create", "read", "update", "delete"],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@automate.ax/api-contract",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.131.1",
|
|
4
4
|
"description": "Public oRPC contract for the Automate.ax API.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@ai-sdk/gateway": "4.0.46",
|
|
34
|
-
"@automate.ax/codec": "0.
|
|
35
|
-
"@automate.ax/integration-contracts": "0.
|
|
34
|
+
"@automate.ax/codec": "0.131.1",
|
|
35
|
+
"@automate.ax/integration-contracts": "0.131.1",
|
|
36
36
|
"@orpc/contract": "1.15.0",
|
|
37
37
|
"fast-json-stable-stringify": "^2.1.0",
|
|
38
38
|
"zod": "^4.3.6"
|
package/src/index.ts
CHANGED
package/src/org.ts
CHANGED
|
@@ -5,8 +5,11 @@ import {
|
|
|
5
5
|
cursorPaginationInputSchema,
|
|
6
6
|
reasonableNameSchema,
|
|
7
7
|
} from "./schemas"
|
|
8
|
+
import { organizationRoles } from "./permissions"
|
|
8
9
|
|
|
9
|
-
export const organizationRoleSchema = z.enum(
|
|
10
|
+
export const organizationRoleSchema = z.enum(organizationRoles)
|
|
11
|
+
|
|
12
|
+
export { organizationRoles }
|
|
10
13
|
|
|
11
14
|
export const publicOrganizationOutputSchema = z.object({
|
|
12
15
|
id: z.string(),
|
|
@@ -112,7 +115,8 @@ export const orgContract = {
|
|
|
112
115
|
path: "/organizations",
|
|
113
116
|
operationId: "createOrganization",
|
|
114
117
|
summary: "Create organization",
|
|
115
|
-
description:
|
|
118
|
+
description:
|
|
119
|
+
"Creates an organization administered by the authenticated user.",
|
|
116
120
|
successStatus: 201,
|
|
117
121
|
successDescription: "Organization created.",
|
|
118
122
|
tags: ["Organizations"],
|
|
@@ -176,7 +180,7 @@ export const orgContract = {
|
|
|
176
180
|
operationId: "leaveOrganization",
|
|
177
181
|
summary: "Leave organization",
|
|
178
182
|
description:
|
|
179
|
-
"Removes the current user from an organization.
|
|
183
|
+
"Removes the current user from an organization. Admins must ask another admin to remove them or delete the organization instead.",
|
|
180
184
|
tags: ["Organizations"],
|
|
181
185
|
successStatus: 204,
|
|
182
186
|
})
|
package/src/permissions.ts
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
/** Organization roles exposed by management interfaces. */
|
|
2
|
+
export const organizationRoles = ["member", "admin"] as const
|
|
3
|
+
|
|
1
4
|
/** Management permissions understood by organization roles and API keys. */
|
|
2
5
|
export const managementPermissionStatement = {
|
|
3
6
|
ac: ["create", "read", "update", "delete"],
|
|
@@ -19,18 +22,6 @@ export type ManagementPermission = {
|
|
|
19
22
|
|
|
20
23
|
/** Static organization roles are permission bundles, not authorization checks. */
|
|
21
24
|
export const managementRolePermissions = {
|
|
22
|
-
admin: {
|
|
23
|
-
ac: ["create", "read", "update", "delete"],
|
|
24
|
-
account: ["create", "read", "delete"],
|
|
25
|
-
apiKey: ["create", "read", "update", "delete"],
|
|
26
|
-
authorization: ["create", "read", "update"],
|
|
27
|
-
deployment: ["create", "read", "cancel"],
|
|
28
|
-
invitation: ["create", "read", "cancel"],
|
|
29
|
-
member: ["create", "read", "update", "delete", "leave"],
|
|
30
|
-
organization: ["read", "update"],
|
|
31
|
-
project: ["create", "read", "update", "delete"],
|
|
32
|
-
team: ["create", "update", "delete"],
|
|
33
|
-
},
|
|
34
25
|
member: {
|
|
35
26
|
ac: ["read"],
|
|
36
27
|
account: ["read"],
|
|
@@ -41,7 +32,7 @@ export const managementRolePermissions = {
|
|
|
41
32
|
organization: ["read"],
|
|
42
33
|
project: ["create", "read"],
|
|
43
34
|
},
|
|
44
|
-
|
|
35
|
+
admin: {
|
|
45
36
|
ac: ["create", "read", "update", "delete"],
|
|
46
37
|
account: ["create", "read", "delete"],
|
|
47
38
|
apiKey: ["create", "read", "update", "delete"],
|