@company-semantics/contracts 0.135.0 → 0.137.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 +3 -3
- package/src/api/generated-spec-hash.ts +2 -2
- package/src/api/generated.ts +178 -5
- package/src/content/schemas.ts +0 -4
- package/src/index.ts +9 -0
- package/src/org/company-md.ts +0 -1
- package/src/org/departments.ts +0 -1
- package/src/org/teams.ts +0 -1
- package/src/requests.ts +28 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@company-semantics/contracts",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.137.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -113,14 +113,14 @@
|
|
|
113
113
|
"zod": "^4.2.1"
|
|
114
114
|
},
|
|
115
115
|
"devDependencies": {
|
|
116
|
-
"@types/node": "^25.
|
|
116
|
+
"@types/node": "^25.6.0",
|
|
117
117
|
"husky": "^9.1.7",
|
|
118
118
|
"lint-staged": "^16.4.0",
|
|
119
119
|
"markdownlint-cli2": "^0.22.0",
|
|
120
120
|
"openapi-typescript": "^7.13.0",
|
|
121
121
|
"tsx": "^4.21.0",
|
|
122
122
|
"typescript": "^5",
|
|
123
|
-
"vitest": "^4.1.
|
|
123
|
+
"vitest": "^4.1.4",
|
|
124
124
|
"yaml": "^2.8.3"
|
|
125
125
|
},
|
|
126
126
|
"pnpm": {
|
|
@@ -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 = 'e00b8f6ac17d' as const;
|
|
3
|
+
export const SPEC_HASH_FULL = 'e00b8f6ac17d37c793d851d3c26864d86ba8dbbf4451608615966a23d0b891ad' as const;
|
package/src/api/generated.ts
CHANGED
|
@@ -1313,6 +1313,23 @@ export interface paths {
|
|
|
1313
1313
|
patch?: never;
|
|
1314
1314
|
trace?: never;
|
|
1315
1315
|
};
|
|
1316
|
+
"/api/company-md/docs/{slug}/context-bank/{id}/order": {
|
|
1317
|
+
parameters: {
|
|
1318
|
+
query?: never;
|
|
1319
|
+
header?: never;
|
|
1320
|
+
path?: never;
|
|
1321
|
+
cookie?: never;
|
|
1322
|
+
};
|
|
1323
|
+
get?: never;
|
|
1324
|
+
put?: never;
|
|
1325
|
+
post?: never;
|
|
1326
|
+
delete?: never;
|
|
1327
|
+
options?: never;
|
|
1328
|
+
head?: never;
|
|
1329
|
+
/** Set order key for a single context bank item */
|
|
1330
|
+
patch: operations["reorderCompanyMdContextBankItem"];
|
|
1331
|
+
trace?: never;
|
|
1332
|
+
};
|
|
1316
1333
|
"/api/company-md/settings": {
|
|
1317
1334
|
parameters: {
|
|
1318
1335
|
query?: never;
|
|
@@ -1453,6 +1470,23 @@ export interface paths {
|
|
|
1453
1470
|
patch?: never;
|
|
1454
1471
|
trace?: never;
|
|
1455
1472
|
};
|
|
1473
|
+
"/api/teams/{teamId}/order": {
|
|
1474
|
+
parameters: {
|
|
1475
|
+
query?: never;
|
|
1476
|
+
header?: never;
|
|
1477
|
+
path?: never;
|
|
1478
|
+
cookie?: never;
|
|
1479
|
+
};
|
|
1480
|
+
get?: never;
|
|
1481
|
+
put?: never;
|
|
1482
|
+
post?: never;
|
|
1483
|
+
delete?: never;
|
|
1484
|
+
options?: never;
|
|
1485
|
+
head?: never;
|
|
1486
|
+
/** Set order key for a single team */
|
|
1487
|
+
patch: operations["reorderTeamItem"];
|
|
1488
|
+
trace?: never;
|
|
1489
|
+
};
|
|
1456
1490
|
"/api/teams/{teamId}/members": {
|
|
1457
1491
|
parameters: {
|
|
1458
1492
|
query?: never;
|
|
@@ -1541,6 +1575,23 @@ export interface paths {
|
|
|
1541
1575
|
patch: operations["updateDepartment"];
|
|
1542
1576
|
trace?: never;
|
|
1543
1577
|
};
|
|
1578
|
+
"/api/departments/{id}/order": {
|
|
1579
|
+
parameters: {
|
|
1580
|
+
query?: never;
|
|
1581
|
+
header?: never;
|
|
1582
|
+
path?: never;
|
|
1583
|
+
cookie?: never;
|
|
1584
|
+
};
|
|
1585
|
+
get?: never;
|
|
1586
|
+
put?: never;
|
|
1587
|
+
post?: never;
|
|
1588
|
+
delete?: never;
|
|
1589
|
+
options?: never;
|
|
1590
|
+
head?: never;
|
|
1591
|
+
/** Set order key for a single department */
|
|
1592
|
+
patch: operations["reorderDepartmentItem"];
|
|
1593
|
+
trace?: never;
|
|
1594
|
+
};
|
|
1544
1595
|
"/api/departments/{id}/members": {
|
|
1545
1596
|
parameters: {
|
|
1546
1597
|
query?: never;
|
|
@@ -2788,7 +2839,6 @@ export interface components {
|
|
|
2788
2839
|
title: string;
|
|
2789
2840
|
/** @enum {string} */
|
|
2790
2841
|
visibility: "public" | "private";
|
|
2791
|
-
position: number;
|
|
2792
2842
|
updatedAt: string;
|
|
2793
2843
|
}[];
|
|
2794
2844
|
};
|
|
@@ -2860,7 +2910,6 @@ export interface components {
|
|
|
2860
2910
|
slug: string;
|
|
2861
2911
|
description: string | null;
|
|
2862
2912
|
memberCount: number;
|
|
2863
|
-
position: number;
|
|
2864
2913
|
/** @enum {string} */
|
|
2865
2914
|
scope: "department" | "cross_department" | "org";
|
|
2866
2915
|
department: {
|
|
@@ -2881,7 +2930,6 @@ export interface components {
|
|
|
2881
2930
|
slug: string;
|
|
2882
2931
|
description: string | null;
|
|
2883
2932
|
memberCount: number;
|
|
2884
|
-
position: number;
|
|
2885
2933
|
/** @enum {string} */
|
|
2886
2934
|
scope: "department" | "cross_department" | "org";
|
|
2887
2935
|
department: {
|
|
@@ -2912,7 +2960,6 @@ export interface components {
|
|
|
2912
2960
|
slug: string;
|
|
2913
2961
|
description: string | null;
|
|
2914
2962
|
memberCount: number;
|
|
2915
|
-
position: number;
|
|
2916
2963
|
}[];
|
|
2917
2964
|
};
|
|
2918
2965
|
DepartmentResponse: {
|
|
@@ -2920,7 +2967,6 @@ export interface components {
|
|
|
2920
2967
|
name: string;
|
|
2921
2968
|
slug: string;
|
|
2922
2969
|
description: string | null;
|
|
2923
|
-
position: number;
|
|
2924
2970
|
/** @enum {string} */
|
|
2925
2971
|
syncMode: "manual_only" | "scim" | "hris";
|
|
2926
2972
|
memberCount: number;
|
|
@@ -5054,6 +5100,49 @@ export interface operations {
|
|
|
5054
5100
|
};
|
|
5055
5101
|
};
|
|
5056
5102
|
};
|
|
5103
|
+
reorderCompanyMdContextBankItem: {
|
|
5104
|
+
parameters: {
|
|
5105
|
+
query?: never;
|
|
5106
|
+
header?: never;
|
|
5107
|
+
path: {
|
|
5108
|
+
slug: string;
|
|
5109
|
+
id: string;
|
|
5110
|
+
};
|
|
5111
|
+
cookie?: never;
|
|
5112
|
+
};
|
|
5113
|
+
requestBody: {
|
|
5114
|
+
content: {
|
|
5115
|
+
"application/json": {
|
|
5116
|
+
orderKey: string;
|
|
5117
|
+
prevId: string | null;
|
|
5118
|
+
nextId: string | null;
|
|
5119
|
+
};
|
|
5120
|
+
};
|
|
5121
|
+
};
|
|
5122
|
+
responses: {
|
|
5123
|
+
/** @description Order key updated */
|
|
5124
|
+
204: {
|
|
5125
|
+
headers: {
|
|
5126
|
+
[name: string]: unknown;
|
|
5127
|
+
};
|
|
5128
|
+
content?: never;
|
|
5129
|
+
};
|
|
5130
|
+
/** @description Invalid order key */
|
|
5131
|
+
400: {
|
|
5132
|
+
headers: {
|
|
5133
|
+
[name: string]: unknown;
|
|
5134
|
+
};
|
|
5135
|
+
content?: never;
|
|
5136
|
+
};
|
|
5137
|
+
/** @description Order key collision */
|
|
5138
|
+
409: {
|
|
5139
|
+
headers: {
|
|
5140
|
+
[name: string]: unknown;
|
|
5141
|
+
};
|
|
5142
|
+
content?: never;
|
|
5143
|
+
};
|
|
5144
|
+
};
|
|
5145
|
+
};
|
|
5057
5146
|
getCompanyMdSettings: {
|
|
5058
5147
|
parameters: {
|
|
5059
5148
|
query?: never;
|
|
@@ -5332,6 +5421,48 @@ export interface operations {
|
|
|
5332
5421
|
};
|
|
5333
5422
|
};
|
|
5334
5423
|
};
|
|
5424
|
+
reorderTeamItem: {
|
|
5425
|
+
parameters: {
|
|
5426
|
+
query?: never;
|
|
5427
|
+
header?: never;
|
|
5428
|
+
path: {
|
|
5429
|
+
teamId: string;
|
|
5430
|
+
};
|
|
5431
|
+
cookie?: never;
|
|
5432
|
+
};
|
|
5433
|
+
requestBody: {
|
|
5434
|
+
content: {
|
|
5435
|
+
"application/json": {
|
|
5436
|
+
orderKey: string;
|
|
5437
|
+
prevId: string | null;
|
|
5438
|
+
nextId: string | null;
|
|
5439
|
+
};
|
|
5440
|
+
};
|
|
5441
|
+
};
|
|
5442
|
+
responses: {
|
|
5443
|
+
/** @description Order key updated */
|
|
5444
|
+
204: {
|
|
5445
|
+
headers: {
|
|
5446
|
+
[name: string]: unknown;
|
|
5447
|
+
};
|
|
5448
|
+
content?: never;
|
|
5449
|
+
};
|
|
5450
|
+
/** @description Invalid order key */
|
|
5451
|
+
400: {
|
|
5452
|
+
headers: {
|
|
5453
|
+
[name: string]: unknown;
|
|
5454
|
+
};
|
|
5455
|
+
content?: never;
|
|
5456
|
+
};
|
|
5457
|
+
/** @description Order key collision */
|
|
5458
|
+
409: {
|
|
5459
|
+
headers: {
|
|
5460
|
+
[name: string]: unknown;
|
|
5461
|
+
};
|
|
5462
|
+
content?: never;
|
|
5463
|
+
};
|
|
5464
|
+
};
|
|
5465
|
+
};
|
|
5335
5466
|
addTeamMember: {
|
|
5336
5467
|
parameters: {
|
|
5337
5468
|
query?: never;
|
|
@@ -5521,6 +5652,48 @@ export interface operations {
|
|
|
5521
5652
|
};
|
|
5522
5653
|
};
|
|
5523
5654
|
};
|
|
5655
|
+
reorderDepartmentItem: {
|
|
5656
|
+
parameters: {
|
|
5657
|
+
query?: never;
|
|
5658
|
+
header?: never;
|
|
5659
|
+
path: {
|
|
5660
|
+
id: string;
|
|
5661
|
+
};
|
|
5662
|
+
cookie?: never;
|
|
5663
|
+
};
|
|
5664
|
+
requestBody: {
|
|
5665
|
+
content: {
|
|
5666
|
+
"application/json": {
|
|
5667
|
+
orderKey: string;
|
|
5668
|
+
prevId: string | null;
|
|
5669
|
+
nextId: string | null;
|
|
5670
|
+
};
|
|
5671
|
+
};
|
|
5672
|
+
};
|
|
5673
|
+
responses: {
|
|
5674
|
+
/** @description Order key updated */
|
|
5675
|
+
204: {
|
|
5676
|
+
headers: {
|
|
5677
|
+
[name: string]: unknown;
|
|
5678
|
+
};
|
|
5679
|
+
content?: never;
|
|
5680
|
+
};
|
|
5681
|
+
/** @description Invalid order key */
|
|
5682
|
+
400: {
|
|
5683
|
+
headers: {
|
|
5684
|
+
[name: string]: unknown;
|
|
5685
|
+
};
|
|
5686
|
+
content?: never;
|
|
5687
|
+
};
|
|
5688
|
+
/** @description Order key collision */
|
|
5689
|
+
409: {
|
|
5690
|
+
headers: {
|
|
5691
|
+
[name: string]: unknown;
|
|
5692
|
+
};
|
|
5693
|
+
content?: never;
|
|
5694
|
+
};
|
|
5695
|
+
};
|
|
5696
|
+
};
|
|
5524
5697
|
listDepartmentMembers: {
|
|
5525
5698
|
parameters: {
|
|
5526
5699
|
query?: never;
|
package/src/content/schemas.ts
CHANGED
|
@@ -128,7 +128,6 @@ const CompanyMdContextBankItemSchema = z.object({
|
|
|
128
128
|
slug: z.string(),
|
|
129
129
|
title: z.string(),
|
|
130
130
|
visibility: z.enum(['public', 'private']),
|
|
131
|
-
position: z.number().int(),
|
|
132
131
|
updatedAt: z.string(),
|
|
133
132
|
});
|
|
134
133
|
|
|
@@ -166,7 +165,6 @@ const TeamSummarySchema = z.object({
|
|
|
166
165
|
slug: z.string(),
|
|
167
166
|
description: z.string().nullable(),
|
|
168
167
|
memberCount: z.number().int(),
|
|
169
|
-
position: z.number().int(),
|
|
170
168
|
scope: z.enum(['department', 'cross_department', 'org']),
|
|
171
169
|
department: z.object({ id: z.string(), name: z.string(), slug: z.string() }).nullable(),
|
|
172
170
|
homeDepartment: z.object({ id: z.string(), name: z.string(), slug: z.string() }).nullable(),
|
|
@@ -205,7 +203,6 @@ const DepartmentSummarySchema = z.object({
|
|
|
205
203
|
slug: z.string(),
|
|
206
204
|
description: z.string().nullable(),
|
|
207
205
|
memberCount: z.number().int(),
|
|
208
|
-
position: z.number().int(),
|
|
209
206
|
});
|
|
210
207
|
|
|
211
208
|
// ---------------------------------------------------------------------------
|
|
@@ -223,7 +220,6 @@ export const DepartmentResponseSchema = z.object({
|
|
|
223
220
|
name: z.string(),
|
|
224
221
|
slug: z.string(),
|
|
225
222
|
description: z.string().nullable(),
|
|
226
|
-
position: z.number().int(),
|
|
227
223
|
syncMode: z.enum(['manual_only', 'scim', 'hris']),
|
|
228
224
|
memberCount: z.number().int(),
|
|
229
225
|
members: z.array(DepartmentMemberSchema),
|
package/src/index.ts
CHANGED
|
@@ -603,3 +603,12 @@ export { wrapSecret, unwrapSecret } from './security/index'
|
|
|
603
603
|
// Analytics response metadata (shared vocabulary for OLTP/OLAP separation)
|
|
604
604
|
// @see ADR-CTRL-053 for design rationale
|
|
605
605
|
export type { AnalyticsBackend, AnalyticsResponseMeta } from './types/analytics'
|
|
606
|
+
|
|
607
|
+
// Client request scheduler types (shared tier vocabulary)
|
|
608
|
+
export type {
|
|
609
|
+
Tier,
|
|
610
|
+
MutationBehavior,
|
|
611
|
+
SchedulerResourceKey,
|
|
612
|
+
RequestDescriptor,
|
|
613
|
+
SchedulerEvent,
|
|
614
|
+
} from './requests'
|
package/src/org/company-md.ts
CHANGED
package/src/org/departments.ts
CHANGED
package/src/org/teams.ts
CHANGED
|
@@ -28,7 +28,6 @@ export interface Team {
|
|
|
28
28
|
readonly slug: string;
|
|
29
29
|
readonly description: string | null;
|
|
30
30
|
readonly memberCount: number;
|
|
31
|
-
readonly position: number;
|
|
32
31
|
readonly scope: import('./departments').TeamScope;
|
|
33
32
|
readonly department: { readonly id: string; readonly name: string; readonly slug: string } | null;
|
|
34
33
|
readonly homeDepartment: { readonly id: string; readonly name: string; readonly slug: string } | null;
|
package/src/requests.ts
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export type Tier = 'P0' | 'P1' | 'P2' | 'P3';
|
|
2
|
+
|
|
3
|
+
export type MutationBehavior = 'collapse' | 'queue' | 'parallel';
|
|
4
|
+
|
|
5
|
+
export type SchedulerResourceKey = {
|
|
6
|
+
type: string;
|
|
7
|
+
orgId?: string;
|
|
8
|
+
resourceId?: string;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export type RequestDescriptor = {
|
|
12
|
+
method: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
|
|
13
|
+
path: string;
|
|
14
|
+
params?: Record<string, unknown>;
|
|
15
|
+
tier: Tier;
|
|
16
|
+
resourceKey: SchedulerResourceKey;
|
|
17
|
+
signal?: AbortSignal;
|
|
18
|
+
mutationBehavior?: MutationBehavior;
|
|
19
|
+
headers?: Record<string, string>;
|
|
20
|
+
body?: unknown;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export type SchedulerEvent =
|
|
24
|
+
| { type: 'enqueued'; id: string; descriptor: RequestDescriptor; queuedAt: number }
|
|
25
|
+
| { type: 'started'; id: string; descriptor: RequestDescriptor; startedAt: number; waitedMs: number }
|
|
26
|
+
| { type: 'settled'; id: string; descriptor: RequestDescriptor; durationMs: number; ok: boolean; status?: number }
|
|
27
|
+
| { type: 'aborted'; id: string; descriptor: RequestDescriptor; reason: 'superseded' | 'invalidated' | 'unmounted' | 'external' }
|
|
28
|
+
| { type: 'deduped'; id: string; descriptor: RequestDescriptor; sharedWith: string };
|