@company-semantics/contracts 2.14.0 → 2.15.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/package.json
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// AUTO-GENERATED — do not edit. Run pnpm generate:spec-hash to regenerate.
|
|
2
|
-
export const SPEC_HASH = '
|
|
3
|
-
export const SPEC_HASH_FULL = '
|
|
2
|
+
export const SPEC_HASH = '7e7e7989604b' as const;
|
|
3
|
+
export const SPEC_HASH_FULL = '7e7e7989604b04f9af766c8ebcfe875445c12cec0fa4c4a071680454b635ea2c' as const;
|
package/src/api/generated.ts
CHANGED
|
@@ -2415,6 +2415,58 @@ export interface paths {
|
|
|
2415
2415
|
patch?: never;
|
|
2416
2416
|
trace?: never;
|
|
2417
2417
|
};
|
|
2418
|
+
"/api/me/meetings/recordings/{id}/sharing": {
|
|
2419
|
+
parameters: {
|
|
2420
|
+
query?: never;
|
|
2421
|
+
header?: never;
|
|
2422
|
+
path?: never;
|
|
2423
|
+
cookie?: never;
|
|
2424
|
+
};
|
|
2425
|
+
/** Get a recording sharing state: visibility, ACL grants, caller access */
|
|
2426
|
+
get: operations["getMeetingRecordingSharing"];
|
|
2427
|
+
put?: never;
|
|
2428
|
+
post?: never;
|
|
2429
|
+
delete?: never;
|
|
2430
|
+
options?: never;
|
|
2431
|
+
head?: never;
|
|
2432
|
+
patch?: never;
|
|
2433
|
+
trace?: never;
|
|
2434
|
+
};
|
|
2435
|
+
"/api/me/meetings/recordings/{id}/sharing/acl": {
|
|
2436
|
+
parameters: {
|
|
2437
|
+
query?: never;
|
|
2438
|
+
header?: never;
|
|
2439
|
+
path?: never;
|
|
2440
|
+
cookie?: never;
|
|
2441
|
+
};
|
|
2442
|
+
get?: never;
|
|
2443
|
+
put?: never;
|
|
2444
|
+
/** Grant a principal access to a recording */
|
|
2445
|
+
post: operations["addMeetingRecordingAclEntry"];
|
|
2446
|
+
delete?: never;
|
|
2447
|
+
options?: never;
|
|
2448
|
+
head?: never;
|
|
2449
|
+
patch?: never;
|
|
2450
|
+
trace?: never;
|
|
2451
|
+
};
|
|
2452
|
+
"/api/me/meetings/recordings/{id}/sharing/acl/{grantId}": {
|
|
2453
|
+
parameters: {
|
|
2454
|
+
query?: never;
|
|
2455
|
+
header?: never;
|
|
2456
|
+
path?: never;
|
|
2457
|
+
cookie?: never;
|
|
2458
|
+
};
|
|
2459
|
+
get?: never;
|
|
2460
|
+
/** Change an existing ACL grant access level */
|
|
2461
|
+
put: operations["updateMeetingRecordingAclEntry"];
|
|
2462
|
+
post?: never;
|
|
2463
|
+
/** Revoke an ACL grant on a recording */
|
|
2464
|
+
delete: operations["deleteMeetingRecordingAclEntry"];
|
|
2465
|
+
options?: never;
|
|
2466
|
+
head?: never;
|
|
2467
|
+
patch?: never;
|
|
2468
|
+
trace?: never;
|
|
2469
|
+
};
|
|
2418
2470
|
"/api/internal-admin/impersonate/start": {
|
|
2419
2471
|
parameters: {
|
|
2420
2472
|
query?: never;
|
|
@@ -4302,6 +4354,53 @@ export interface components {
|
|
|
4302
4354
|
*/
|
|
4303
4355
|
visibility: "meeting_only" | "shared" | "org" | "finalized_private";
|
|
4304
4356
|
};
|
|
4357
|
+
/** @description A meeting recording's visibility, ACL grants, and the caller's effective access. */
|
|
4358
|
+
MeetingRecordingSharingState: {
|
|
4359
|
+
/** @description ULID; unified trace key for the recording (INV-MTG-7). */
|
|
4360
|
+
recordingId: string;
|
|
4361
|
+
/**
|
|
4362
|
+
* @description Visibility band for the finalized meeting projection. Default `meeting_only`.
|
|
4363
|
+
* @enum {string}
|
|
4364
|
+
*/
|
|
4365
|
+
visibility: "meeting_only" | "shared" | "org" | "finalized_private";
|
|
4366
|
+
acl: {
|
|
4367
|
+
/** Format: uuid */
|
|
4368
|
+
id: string;
|
|
4369
|
+
/** @enum {string} */
|
|
4370
|
+
principalType: "user" | "unit" | "org";
|
|
4371
|
+
/** Format: uuid */
|
|
4372
|
+
principalId: string;
|
|
4373
|
+
/** @enum {string} */
|
|
4374
|
+
accessLevel: "viewer" | "commenter" | "editor";
|
|
4375
|
+
grantedByUserId: string | null;
|
|
4376
|
+
/** Format: date-time */
|
|
4377
|
+
grantedAt: string;
|
|
4378
|
+
}[];
|
|
4379
|
+
effectiveAccess: {
|
|
4380
|
+
/** @enum {string} */
|
|
4381
|
+
level: "owner" | "editor" | "commenter" | "viewer" | "none";
|
|
4382
|
+
source: string;
|
|
4383
|
+
};
|
|
4384
|
+
};
|
|
4385
|
+
/** @description The id of the newly created meeting ACL grant. */
|
|
4386
|
+
AddMeetingRecordingAclResponse: {
|
|
4387
|
+
/** Format: uuid */
|
|
4388
|
+
id: string;
|
|
4389
|
+
};
|
|
4390
|
+
/** @description Grant a principal access to a meeting recording. */
|
|
4391
|
+
AddMeetingRecordingAclRequest: {
|
|
4392
|
+
/** @enum {string} */
|
|
4393
|
+
principalType: "user" | "unit" | "org";
|
|
4394
|
+
/** Format: uuid */
|
|
4395
|
+
principalId: string;
|
|
4396
|
+
/** @enum {string} */
|
|
4397
|
+
accessLevel: "viewer" | "commenter" | "editor";
|
|
4398
|
+
};
|
|
4399
|
+
/** @description Change an existing meeting ACL grant access level. */
|
|
4400
|
+
UpdateMeetingRecordingAclRequest: {
|
|
4401
|
+
/** @enum {string} */
|
|
4402
|
+
accessLevel: "viewer" | "commenter" | "editor";
|
|
4403
|
+
};
|
|
4305
4404
|
ImpersonationSessionResponse: {
|
|
4306
4405
|
session: {
|
|
4307
4406
|
impersonationSessionId: string;
|
|
@@ -8223,6 +8322,128 @@ export interface operations {
|
|
|
8223
8322
|
};
|
|
8224
8323
|
};
|
|
8225
8324
|
};
|
|
8325
|
+
getMeetingRecordingSharing: {
|
|
8326
|
+
parameters: {
|
|
8327
|
+
query?: never;
|
|
8328
|
+
header?: never;
|
|
8329
|
+
path: {
|
|
8330
|
+
id: string;
|
|
8331
|
+
};
|
|
8332
|
+
cookie?: never;
|
|
8333
|
+
};
|
|
8334
|
+
requestBody?: never;
|
|
8335
|
+
responses: {
|
|
8336
|
+
/** @description Visibility, ACL grants, and the caller effective access */
|
|
8337
|
+
200: {
|
|
8338
|
+
headers: {
|
|
8339
|
+
[name: string]: unknown;
|
|
8340
|
+
};
|
|
8341
|
+
content: {
|
|
8342
|
+
"application/json": components["schemas"]["MeetingRecordingSharingState"];
|
|
8343
|
+
};
|
|
8344
|
+
};
|
|
8345
|
+
/** @description Recording not found or not owned by this user */
|
|
8346
|
+
404: {
|
|
8347
|
+
headers: {
|
|
8348
|
+
[name: string]: unknown;
|
|
8349
|
+
};
|
|
8350
|
+
content?: never;
|
|
8351
|
+
};
|
|
8352
|
+
};
|
|
8353
|
+
};
|
|
8354
|
+
addMeetingRecordingAclEntry: {
|
|
8355
|
+
parameters: {
|
|
8356
|
+
query?: never;
|
|
8357
|
+
header?: never;
|
|
8358
|
+
path: {
|
|
8359
|
+
id: string;
|
|
8360
|
+
};
|
|
8361
|
+
cookie?: never;
|
|
8362
|
+
};
|
|
8363
|
+
requestBody: {
|
|
8364
|
+
content: {
|
|
8365
|
+
"application/json": components["schemas"]["AddMeetingRecordingAclRequest"];
|
|
8366
|
+
};
|
|
8367
|
+
};
|
|
8368
|
+
responses: {
|
|
8369
|
+
/** @description ACL grant created */
|
|
8370
|
+
201: {
|
|
8371
|
+
headers: {
|
|
8372
|
+
[name: string]: unknown;
|
|
8373
|
+
};
|
|
8374
|
+
content: {
|
|
8375
|
+
"application/json": components["schemas"]["AddMeetingRecordingAclResponse"];
|
|
8376
|
+
};
|
|
8377
|
+
};
|
|
8378
|
+
/** @description Recording not found or not owned by this user */
|
|
8379
|
+
404: {
|
|
8380
|
+
headers: {
|
|
8381
|
+
[name: string]: unknown;
|
|
8382
|
+
};
|
|
8383
|
+
content?: never;
|
|
8384
|
+
};
|
|
8385
|
+
};
|
|
8386
|
+
};
|
|
8387
|
+
updateMeetingRecordingAclEntry: {
|
|
8388
|
+
parameters: {
|
|
8389
|
+
query?: never;
|
|
8390
|
+
header?: never;
|
|
8391
|
+
path: {
|
|
8392
|
+
id: string;
|
|
8393
|
+
grantId: string;
|
|
8394
|
+
};
|
|
8395
|
+
cookie?: never;
|
|
8396
|
+
};
|
|
8397
|
+
requestBody: {
|
|
8398
|
+
content: {
|
|
8399
|
+
"application/json": components["schemas"]["UpdateMeetingRecordingAclRequest"];
|
|
8400
|
+
};
|
|
8401
|
+
};
|
|
8402
|
+
responses: {
|
|
8403
|
+
/** @description ACL grant updated */
|
|
8404
|
+
204: {
|
|
8405
|
+
headers: {
|
|
8406
|
+
[name: string]: unknown;
|
|
8407
|
+
};
|
|
8408
|
+
content?: never;
|
|
8409
|
+
};
|
|
8410
|
+
/** @description Recording or grant not found / not owned by this user */
|
|
8411
|
+
404: {
|
|
8412
|
+
headers: {
|
|
8413
|
+
[name: string]: unknown;
|
|
8414
|
+
};
|
|
8415
|
+
content?: never;
|
|
8416
|
+
};
|
|
8417
|
+
};
|
|
8418
|
+
};
|
|
8419
|
+
deleteMeetingRecordingAclEntry: {
|
|
8420
|
+
parameters: {
|
|
8421
|
+
query?: never;
|
|
8422
|
+
header?: never;
|
|
8423
|
+
path: {
|
|
8424
|
+
id: string;
|
|
8425
|
+
grantId: string;
|
|
8426
|
+
};
|
|
8427
|
+
cookie?: never;
|
|
8428
|
+
};
|
|
8429
|
+
requestBody?: never;
|
|
8430
|
+
responses: {
|
|
8431
|
+
/** @description ACL grant revoked */
|
|
8432
|
+
204: {
|
|
8433
|
+
headers: {
|
|
8434
|
+
[name: string]: unknown;
|
|
8435
|
+
};
|
|
8436
|
+
content?: never;
|
|
8437
|
+
};
|
|
8438
|
+
/** @description Recording or grant not found / not owned by this user */
|
|
8439
|
+
404: {
|
|
8440
|
+
headers: {
|
|
8441
|
+
[name: string]: unknown;
|
|
8442
|
+
};
|
|
8443
|
+
content?: never;
|
|
8444
|
+
};
|
|
8445
|
+
};
|
|
8446
|
+
};
|
|
8226
8447
|
startImpersonation: {
|
|
8227
8448
|
parameters: {
|
|
8228
8449
|
query?: never;
|
|
@@ -57,6 +57,9 @@ export const openApiRoutes = {
|
|
|
57
57
|
'/api/me/meetings/recordings/{id}/export': ['POST'],
|
|
58
58
|
'/api/me/meetings/recordings/{id}/export/{jobId}': ['GET'],
|
|
59
59
|
'/api/me/meetings/recordings/{id}/restore': ['POST'],
|
|
60
|
+
'/api/me/meetings/recordings/{id}/sharing': ['GET'],
|
|
61
|
+
'/api/me/meetings/recordings/{id}/sharing/acl': ['POST'],
|
|
62
|
+
'/api/me/meetings/recordings/{id}/sharing/acl/{grantId}': ['DELETE', 'PUT'],
|
|
60
63
|
'/api/me/meetings/recordings/{id}/visibility': ['POST'],
|
|
61
64
|
'/api/me/work-items': ['GET'],
|
|
62
65
|
'/api/me/work-items/counts': ['GET'],
|
package/src/permissions/index.ts
CHANGED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Share API Vocabulary
|
|
3
|
+
*
|
|
4
|
+
* Zod schemas for the polymorphic share API introduced in AUTH-007 (PRD-00675).
|
|
5
|
+
* Backend routes live at `/api/{entityType}/{id}/...`; every request/response
|
|
6
|
+
* body validates against one of these schemas. OpenAPI YAML is auto-generated
|
|
7
|
+
* from these definitions.
|
|
8
|
+
*
|
|
9
|
+
* Authority: ADR-CTRL-085 (Rights Table), ADR-CTRL-086 (most-permissive
|
|
10
|
+
* aggregation), ADR-BE-181 (AUTH-006 compose model).
|
|
11
|
+
*/
|
|
12
|
+
import { z } from 'zod';
|
|
13
|
+
import { AccessLevelSchema } from './access-levels';
|
|
14
|
+
import { AccessSourceSchema } from './access-source';
|
|
15
|
+
|
|
16
|
+
export const PrincipalTypeSchema = z.enum(['user', 'unit', 'org']);
|
|
17
|
+
export type PrincipalType = z.infer<typeof PrincipalTypeSchema>;
|
|
18
|
+
|
|
19
|
+
export const PrincipalSchema = z.object({
|
|
20
|
+
type: PrincipalTypeSchema,
|
|
21
|
+
id: z.string().uuid(),
|
|
22
|
+
});
|
|
23
|
+
export type Principal = z.infer<typeof PrincipalSchema>;
|
|
24
|
+
|
|
25
|
+
export const GrantableAccessLevelSchema = z.enum(['editor', 'commenter', 'viewer']);
|
|
26
|
+
export type GrantableAccessLevel = z.infer<typeof GrantableAccessLevelSchema>;
|
|
27
|
+
|
|
28
|
+
export const EntityVisibilitySchema = z.enum(['private', 'unit', 'org']);
|
|
29
|
+
export type EntityVisibility = z.infer<typeof EntityVisibilitySchema>;
|
|
30
|
+
|
|
31
|
+
export const AclGrantRequestSchema = z.object({
|
|
32
|
+
access_level: GrantableAccessLevelSchema,
|
|
33
|
+
});
|
|
34
|
+
export type AclGrantRequest = z.infer<typeof AclGrantRequestSchema>;
|
|
35
|
+
|
|
36
|
+
export const AclGrantResponseSchema = z.object({
|
|
37
|
+
id: z.string().uuid(),
|
|
38
|
+
principal: PrincipalSchema,
|
|
39
|
+
access_level: GrantableAccessLevelSchema,
|
|
40
|
+
granted_by_user_id: z.string().uuid(),
|
|
41
|
+
granted_at: z.string().datetime(),
|
|
42
|
+
});
|
|
43
|
+
export type AclGrantResponse = z.infer<typeof AclGrantResponseSchema>;
|
|
44
|
+
|
|
45
|
+
export const AclListResponseSchema = z.object({
|
|
46
|
+
entity_type: z.string(),
|
|
47
|
+
entity_id: z.string().uuid(),
|
|
48
|
+
owner_user_id: z.string().uuid().nullable(),
|
|
49
|
+
visibility: EntityVisibilitySchema,
|
|
50
|
+
editors_can_share: z.boolean(),
|
|
51
|
+
grants: z.array(AclGrantResponseSchema),
|
|
52
|
+
});
|
|
53
|
+
export type AclListResponse = z.infer<typeof AclListResponseSchema>;
|
|
54
|
+
|
|
55
|
+
export const VisibilityPatchRequestSchema = z.object({
|
|
56
|
+
tier: EntityVisibilitySchema,
|
|
57
|
+
});
|
|
58
|
+
export type VisibilityPatchRequest = z.infer<typeof VisibilityPatchRequestSchema>;
|
|
59
|
+
|
|
60
|
+
export const OwnerTransferRequestSchema = z.object({
|
|
61
|
+
new_owner_user_id: z.string().uuid(),
|
|
62
|
+
});
|
|
63
|
+
export type OwnerTransferRequest = z.infer<typeof OwnerTransferRequestSchema>;
|
|
64
|
+
|
|
65
|
+
export const EffectiveAccessRequestSchema = z.object({
|
|
66
|
+
principal: PrincipalSchema,
|
|
67
|
+
});
|
|
68
|
+
export type EffectiveAccessRequest = z.infer<typeof EffectiveAccessRequestSchema>;
|
|
69
|
+
|
|
70
|
+
export const EffectiveAccessResponseSchema = z.object({
|
|
71
|
+
access_level: AccessLevelSchema.nullable(),
|
|
72
|
+
source_chain: z.array(AccessSourceSchema),
|
|
73
|
+
});
|
|
74
|
+
export type EffectiveAccessResponse = z.infer<typeof EffectiveAccessResponseSchema>;
|