@company-semantics/contracts 0.134.0 → 0.135.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 +1 -1
- package/src/api/generated.ts +194 -2
- package/src/content/schemas.ts +2 -0
- package/src/org/company-md.ts +1 -0
- package/src/org/teams.ts +1 -0
package/package.json
CHANGED
package/src/api/generated.ts
CHANGED
|
@@ -714,6 +714,23 @@ export interface paths {
|
|
|
714
714
|
patch?: never;
|
|
715
715
|
trace?: never;
|
|
716
716
|
};
|
|
717
|
+
"/api/scope/check": {
|
|
718
|
+
parameters: {
|
|
719
|
+
query?: never;
|
|
720
|
+
header?: never;
|
|
721
|
+
path?: never;
|
|
722
|
+
cookie?: never;
|
|
723
|
+
};
|
|
724
|
+
/** Check authorization scope for current user */
|
|
725
|
+
get: operations["checkScope"];
|
|
726
|
+
put?: never;
|
|
727
|
+
post?: never;
|
|
728
|
+
delete?: never;
|
|
729
|
+
options?: never;
|
|
730
|
+
head?: never;
|
|
731
|
+
patch?: never;
|
|
732
|
+
trace?: never;
|
|
733
|
+
};
|
|
717
734
|
"/api/scope/check-batch": {
|
|
718
735
|
parameters: {
|
|
719
736
|
query?: never;
|
|
@@ -1815,6 +1832,57 @@ export interface paths {
|
|
|
1815
1832
|
patch?: never;
|
|
1816
1833
|
trace?: never;
|
|
1817
1834
|
};
|
|
1835
|
+
"/api/internal-admin/impersonate/start": {
|
|
1836
|
+
parameters: {
|
|
1837
|
+
query?: never;
|
|
1838
|
+
header?: never;
|
|
1839
|
+
path?: never;
|
|
1840
|
+
cookie?: never;
|
|
1841
|
+
};
|
|
1842
|
+
get?: never;
|
|
1843
|
+
put?: never;
|
|
1844
|
+
/** Start an impersonation session */
|
|
1845
|
+
post: operations["startImpersonation"];
|
|
1846
|
+
delete?: never;
|
|
1847
|
+
options?: never;
|
|
1848
|
+
head?: never;
|
|
1849
|
+
patch?: never;
|
|
1850
|
+
trace?: never;
|
|
1851
|
+
};
|
|
1852
|
+
"/api/internal-admin/impersonate/end": {
|
|
1853
|
+
parameters: {
|
|
1854
|
+
query?: never;
|
|
1855
|
+
header?: never;
|
|
1856
|
+
path?: never;
|
|
1857
|
+
cookie?: never;
|
|
1858
|
+
};
|
|
1859
|
+
get?: never;
|
|
1860
|
+
put?: never;
|
|
1861
|
+
/** End the active impersonation session */
|
|
1862
|
+
post: operations["endImpersonation"];
|
|
1863
|
+
delete?: never;
|
|
1864
|
+
options?: never;
|
|
1865
|
+
head?: never;
|
|
1866
|
+
patch?: never;
|
|
1867
|
+
trace?: never;
|
|
1868
|
+
};
|
|
1869
|
+
"/api/internal-admin/impersonate/session": {
|
|
1870
|
+
parameters: {
|
|
1871
|
+
query?: never;
|
|
1872
|
+
header?: never;
|
|
1873
|
+
path?: never;
|
|
1874
|
+
cookie?: never;
|
|
1875
|
+
};
|
|
1876
|
+
/** Get active impersonation session state */
|
|
1877
|
+
get: operations["getImpersonationSession"];
|
|
1878
|
+
put?: never;
|
|
1879
|
+
post?: never;
|
|
1880
|
+
delete?: never;
|
|
1881
|
+
options?: never;
|
|
1882
|
+
head?: never;
|
|
1883
|
+
patch?: never;
|
|
1884
|
+
trace?: never;
|
|
1885
|
+
};
|
|
1818
1886
|
}
|
|
1819
1887
|
export type webhooks = Record<string, never>;
|
|
1820
1888
|
export interface components {
|
|
@@ -2168,7 +2236,6 @@ export interface components {
|
|
|
2168
2236
|
WorkspaceOverview: {
|
|
2169
2237
|
id: string;
|
|
2170
2238
|
name: string;
|
|
2171
|
-
/** @description URL-safe handle (e.g. acme_corp). Used in /@handle/ URLs and @mentions. */
|
|
2172
2239
|
slug: string;
|
|
2173
2240
|
/** @enum {string} */
|
|
2174
2241
|
type: "personal" | "shared";
|
|
@@ -2186,7 +2253,6 @@ export interface components {
|
|
|
2186
2253
|
name: string;
|
|
2187
2254
|
};
|
|
2188
2255
|
WorkspaceHandleRequest: {
|
|
2189
|
-
/** @description URL-safe handle (lowercase alphanumeric + underscores, 1-60 chars) */
|
|
2190
2256
|
handle: string;
|
|
2191
2257
|
};
|
|
2192
2258
|
WorkspaceMembersResponse: {
|
|
@@ -2407,6 +2473,9 @@ export interface components {
|
|
|
2407
2473
|
/** Format: uuid */
|
|
2408
2474
|
orgId: string;
|
|
2409
2475
|
};
|
|
2476
|
+
ScopeCheckResponse: {
|
|
2477
|
+
hasAccess: boolean;
|
|
2478
|
+
};
|
|
2410
2479
|
ScopeCheckBatchResponse: {
|
|
2411
2480
|
results: {
|
|
2412
2481
|
[key: string]: {
|
|
@@ -2719,6 +2788,7 @@ export interface components {
|
|
|
2719
2788
|
title: string;
|
|
2720
2789
|
/** @enum {string} */
|
|
2721
2790
|
visibility: "public" | "private";
|
|
2791
|
+
position: number;
|
|
2722
2792
|
updatedAt: string;
|
|
2723
2793
|
}[];
|
|
2724
2794
|
};
|
|
@@ -2790,6 +2860,7 @@ export interface components {
|
|
|
2790
2860
|
slug: string;
|
|
2791
2861
|
description: string | null;
|
|
2792
2862
|
memberCount: number;
|
|
2863
|
+
position: number;
|
|
2793
2864
|
/** @enum {string} */
|
|
2794
2865
|
scope: "department" | "cross_department" | "org";
|
|
2795
2866
|
department: {
|
|
@@ -2810,6 +2881,7 @@ export interface components {
|
|
|
2810
2881
|
slug: string;
|
|
2811
2882
|
description: string | null;
|
|
2812
2883
|
memberCount: number;
|
|
2884
|
+
position: number;
|
|
2813
2885
|
/** @enum {string} */
|
|
2814
2886
|
scope: "department" | "cross_department" | "org";
|
|
2815
2887
|
department: {
|
|
@@ -3000,6 +3072,44 @@ export interface components {
|
|
|
3000
3072
|
/** @constant */
|
|
3001
3073
|
ok: true;
|
|
3002
3074
|
};
|
|
3075
|
+
ImpersonationSessionResponse: {
|
|
3076
|
+
session: {
|
|
3077
|
+
impersonationSessionId: string;
|
|
3078
|
+
adminUserId: string;
|
|
3079
|
+
targetUserId: string;
|
|
3080
|
+
reason: string;
|
|
3081
|
+
reasonHash: string;
|
|
3082
|
+
/** Format: date-time */
|
|
3083
|
+
startedAt: string;
|
|
3084
|
+
/** Format: date-time */
|
|
3085
|
+
expiresAt: string;
|
|
3086
|
+
endedAt: string | null;
|
|
3087
|
+
ipAddress: string;
|
|
3088
|
+
userAgent: string;
|
|
3089
|
+
};
|
|
3090
|
+
};
|
|
3091
|
+
EndImpersonationResponse: {
|
|
3092
|
+
/** @constant */
|
|
3093
|
+
success: true;
|
|
3094
|
+
/** @constant */
|
|
3095
|
+
ok: true;
|
|
3096
|
+
};
|
|
3097
|
+
ImpersonationSessionNullableResponse: {
|
|
3098
|
+
session: {
|
|
3099
|
+
impersonationSessionId: string;
|
|
3100
|
+
adminUserId: string;
|
|
3101
|
+
targetUserId: string;
|
|
3102
|
+
reason: string;
|
|
3103
|
+
reasonHash: string;
|
|
3104
|
+
/** Format: date-time */
|
|
3105
|
+
startedAt: string;
|
|
3106
|
+
/** Format: date-time */
|
|
3107
|
+
expiresAt: string;
|
|
3108
|
+
endedAt: string | null;
|
|
3109
|
+
ipAddress: string;
|
|
3110
|
+
userAgent: string;
|
|
3111
|
+
} | null;
|
|
3112
|
+
};
|
|
3003
3113
|
};
|
|
3004
3114
|
responses: never;
|
|
3005
3115
|
parameters: never;
|
|
@@ -4092,6 +4202,28 @@ export interface operations {
|
|
|
4092
4202
|
};
|
|
4093
4203
|
};
|
|
4094
4204
|
};
|
|
4205
|
+
checkScope: {
|
|
4206
|
+
parameters: {
|
|
4207
|
+
query: {
|
|
4208
|
+
scope: string;
|
|
4209
|
+
};
|
|
4210
|
+
header?: never;
|
|
4211
|
+
path?: never;
|
|
4212
|
+
cookie?: never;
|
|
4213
|
+
};
|
|
4214
|
+
requestBody?: never;
|
|
4215
|
+
responses: {
|
|
4216
|
+
/** @description Authorization result for the requested scope */
|
|
4217
|
+
200: {
|
|
4218
|
+
headers: {
|
|
4219
|
+
[name: string]: unknown;
|
|
4220
|
+
};
|
|
4221
|
+
content: {
|
|
4222
|
+
"application/json": components["schemas"]["ScopeCheckResponse"];
|
|
4223
|
+
};
|
|
4224
|
+
};
|
|
4225
|
+
};
|
|
4226
|
+
};
|
|
4095
4227
|
checkScopeBatch: {
|
|
4096
4228
|
parameters: {
|
|
4097
4229
|
query?: never;
|
|
@@ -5787,4 +5919,64 @@ export interface operations {
|
|
|
5787
5919
|
};
|
|
5788
5920
|
};
|
|
5789
5921
|
};
|
|
5922
|
+
startImpersonation: {
|
|
5923
|
+
parameters: {
|
|
5924
|
+
query?: never;
|
|
5925
|
+
header?: never;
|
|
5926
|
+
path?: never;
|
|
5927
|
+
cookie?: never;
|
|
5928
|
+
};
|
|
5929
|
+
requestBody?: never;
|
|
5930
|
+
responses: {
|
|
5931
|
+
/** @description Created impersonation session */
|
|
5932
|
+
200: {
|
|
5933
|
+
headers: {
|
|
5934
|
+
[name: string]: unknown;
|
|
5935
|
+
};
|
|
5936
|
+
content: {
|
|
5937
|
+
"application/json": components["schemas"]["ImpersonationSessionResponse"];
|
|
5938
|
+
};
|
|
5939
|
+
};
|
|
5940
|
+
};
|
|
5941
|
+
};
|
|
5942
|
+
endImpersonation: {
|
|
5943
|
+
parameters: {
|
|
5944
|
+
query?: never;
|
|
5945
|
+
header?: never;
|
|
5946
|
+
path?: never;
|
|
5947
|
+
cookie?: never;
|
|
5948
|
+
};
|
|
5949
|
+
requestBody?: never;
|
|
5950
|
+
responses: {
|
|
5951
|
+
/** @description Impersonation session ended */
|
|
5952
|
+
200: {
|
|
5953
|
+
headers: {
|
|
5954
|
+
[name: string]: unknown;
|
|
5955
|
+
};
|
|
5956
|
+
content: {
|
|
5957
|
+
"application/json": components["schemas"]["EndImpersonationResponse"];
|
|
5958
|
+
};
|
|
5959
|
+
};
|
|
5960
|
+
};
|
|
5961
|
+
};
|
|
5962
|
+
getImpersonationSession: {
|
|
5963
|
+
parameters: {
|
|
5964
|
+
query?: never;
|
|
5965
|
+
header?: never;
|
|
5966
|
+
path?: never;
|
|
5967
|
+
cookie?: never;
|
|
5968
|
+
};
|
|
5969
|
+
requestBody?: never;
|
|
5970
|
+
responses: {
|
|
5971
|
+
/** @description Current impersonation session or null */
|
|
5972
|
+
200: {
|
|
5973
|
+
headers: {
|
|
5974
|
+
[name: string]: unknown;
|
|
5975
|
+
};
|
|
5976
|
+
content: {
|
|
5977
|
+
"application/json": components["schemas"]["ImpersonationSessionNullableResponse"];
|
|
5978
|
+
};
|
|
5979
|
+
};
|
|
5980
|
+
};
|
|
5981
|
+
};
|
|
5790
5982
|
}
|
package/src/content/schemas.ts
CHANGED
|
@@ -128,6 +128,7 @@ 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(),
|
|
131
132
|
updatedAt: z.string(),
|
|
132
133
|
});
|
|
133
134
|
|
|
@@ -165,6 +166,7 @@ const TeamSummarySchema = z.object({
|
|
|
165
166
|
slug: z.string(),
|
|
166
167
|
description: z.string().nullable(),
|
|
167
168
|
memberCount: z.number().int(),
|
|
169
|
+
position: z.number().int(),
|
|
168
170
|
scope: z.enum(['department', 'cross_department', 'org']),
|
|
169
171
|
department: z.object({ id: z.string(), name: z.string(), slug: z.string() }).nullable(),
|
|
170
172
|
homeDepartment: z.object({ id: z.string(), name: z.string(), slug: z.string() }).nullable(),
|
package/src/org/company-md.ts
CHANGED
package/src/org/teams.ts
CHANGED
|
@@ -28,6 +28,7 @@ export interface Team {
|
|
|
28
28
|
readonly slug: string;
|
|
29
29
|
readonly description: string | null;
|
|
30
30
|
readonly memberCount: number;
|
|
31
|
+
readonly position: number;
|
|
31
32
|
readonly scope: import('./departments').TeamScope;
|
|
32
33
|
readonly department: { readonly id: string; readonly name: string; readonly slug: string } | null;
|
|
33
34
|
readonly homeDepartment: { readonly id: string; readonly name: string; readonly slug: string } | null;
|