@oxy.so/contracts 5.2.0 → 5.4.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/dist/cjs/accountGraph.js +8 -5
- package/dist/cjs/accountName.js +20 -0
- package/dist/cjs/accountSubject.js +4 -2
- package/dist/cjs/client/accountGraph.js +2 -0
- package/dist/cjs/client/accountName.js +56 -0
- package/dist/cjs/client/index.js +12 -4
- package/dist/cjs/client/organizations.js +5 -4
- package/dist/cjs/index.js +31 -15
- package/dist/cjs/organizations.js +3 -7
- package/dist/cjs/sessionRevocation.js +89 -0
- package/dist/esm/accountGraph.js +9 -6
- package/dist/esm/accountName.js +12 -0
- package/dist/esm/accountSubject.js +4 -2
- package/dist/esm/client/accountGraph.js +2 -0
- package/dist/esm/client/accountName.js +51 -0
- package/dist/esm/client/index.js +1 -0
- package/dist/esm/client/organizations.js +5 -4
- package/dist/esm/index.js +2 -0
- package/dist/esm/organizations.js +4 -8
- package/dist/esm/sessionRevocation.js +86 -0
- package/dist/types/accountAccess.d.ts +5 -5
- package/dist/types/accountGraph.d.ts +12 -12
- package/dist/types/accountName.d.ts +5 -0
- package/dist/types/accountSubject.d.ts +3 -2
- package/dist/types/agency.d.ts +28 -28
- package/dist/types/client/accountGraph.d.ts +12 -6
- package/dist/types/client/accountName.d.ts +48 -0
- package/dist/types/client/deviceDirectory.d.ts +3 -3
- package/dist/types/client/index.d.ts +1 -0
- package/dist/types/client/organizations.d.ts +8 -7
- package/dist/types/client/safety.d.ts +2 -2
- package/dist/types/deviceDirectory.d.ts +33 -33
- package/dist/types/externalIdentity.d.ts +14 -14
- package/dist/types/index.d.ts +4 -0
- package/dist/types/inference/economics.d.ts +2 -2
- package/dist/types/inference/providerConnection.d.ts +4 -4
- package/dist/types/notifications.d.ts +4 -4
- package/dist/types/organizations.d.ts +41 -40
- package/dist/types/safety.d.ts +22 -22
- package/dist/types/sessionRevocation.d.ts +100 -0
- package/dist/types/stickers.d.ts +9 -9
- package/dist/types/userResponse.d.ts +42 -42
- package/package.json +1 -1
package/dist/types/agency.d.ts
CHANGED
|
@@ -319,7 +319,7 @@ export declare const delegationGrantSchema: z.ZodObject<{
|
|
|
319
319
|
version: string;
|
|
320
320
|
digest: string;
|
|
321
321
|
} | null;
|
|
322
|
-
capabilityPackages: ("
|
|
322
|
+
capabilityPackages: ("finance" | "security" | "create" | "read" | "publish" | "communicate" | "administer" | "delegate")[];
|
|
323
323
|
capabilities: string[];
|
|
324
324
|
toolOverrides: {
|
|
325
325
|
decision: "allow" | "deny";
|
|
@@ -357,7 +357,7 @@ export declare const delegationGrantSchema: z.ZodObject<{
|
|
|
357
357
|
version: string;
|
|
358
358
|
digest: string;
|
|
359
359
|
} | null;
|
|
360
|
-
capabilityPackages: ("
|
|
360
|
+
capabilityPackages: ("finance" | "security" | "create" | "read" | "publish" | "communicate" | "administer" | "delegate")[];
|
|
361
361
|
capabilities: string[];
|
|
362
362
|
maximumAutonomy: "read_only" | "draft" | "execute_on_request" | "autonomous";
|
|
363
363
|
toolOverrides?: {
|
|
@@ -408,7 +408,7 @@ export declare const agentRequesterCeilingWriteSchema: z.ZodObject<{
|
|
|
408
408
|
}>, "many">>;
|
|
409
409
|
maximumAutonomy: z.ZodEnum<["read_only", "autonomous"]>;
|
|
410
410
|
}, "strict", z.ZodTypeAny, {
|
|
411
|
-
capabilityPackages: ("
|
|
411
|
+
capabilityPackages: ("finance" | "security" | "create" | "read" | "publish" | "communicate" | "administer" | "delegate")[];
|
|
412
412
|
capabilities: string[];
|
|
413
413
|
toolOverrides: {
|
|
414
414
|
decision: "allow" | "deny";
|
|
@@ -421,7 +421,7 @@ export declare const agentRequesterCeilingWriteSchema: z.ZodObject<{
|
|
|
421
421
|
}[];
|
|
422
422
|
maximumAutonomy: "read_only" | "autonomous";
|
|
423
423
|
}, {
|
|
424
|
-
capabilityPackages: ("
|
|
424
|
+
capabilityPackages: ("finance" | "security" | "create" | "read" | "publish" | "communicate" | "administer" | "delegate")[];
|
|
425
425
|
maximumAutonomy: "read_only" | "autonomous";
|
|
426
426
|
capabilities?: string[] | undefined;
|
|
427
427
|
toolOverrides?: {
|
|
@@ -493,7 +493,7 @@ export declare const agentRequesterCeilingSchema: z.ZodObject<{
|
|
|
493
493
|
version: string;
|
|
494
494
|
digest: string;
|
|
495
495
|
};
|
|
496
|
-
capabilityPackages: ("
|
|
496
|
+
capabilityPackages: ("finance" | "security" | "create" | "read" | "publish" | "communicate" | "administer" | "delegate")[];
|
|
497
497
|
capabilities: string[];
|
|
498
498
|
toolOverrides: {
|
|
499
499
|
decision: "allow" | "deny";
|
|
@@ -518,7 +518,7 @@ export declare const agentRequesterCeilingSchema: z.ZodObject<{
|
|
|
518
518
|
version: string;
|
|
519
519
|
digest: string;
|
|
520
520
|
};
|
|
521
|
-
capabilityPackages: ("
|
|
521
|
+
capabilityPackages: ("finance" | "security" | "create" | "read" | "publish" | "communicate" | "administer" | "delegate")[];
|
|
522
522
|
maximumAutonomy: "read_only" | "autonomous";
|
|
523
523
|
revokedAt: string | null;
|
|
524
524
|
agentAccountId: string;
|
|
@@ -2341,7 +2341,7 @@ export declare const catalogToolSchema: z.ZodEffects<z.ZodObject<{
|
|
|
2341
2341
|
version: string;
|
|
2342
2342
|
rollback: "none" | "manual" | "supported";
|
|
2343
2343
|
inputSchema: Record<string, unknown>;
|
|
2344
|
-
capabilityPackage: "
|
|
2344
|
+
capabilityPackage: "finance" | "security" | "create" | "read" | "publish" | "communicate" | "administer" | "delegate";
|
|
2345
2345
|
requiredCapabilities: string[];
|
|
2346
2346
|
resourceTypes: string[];
|
|
2347
2347
|
idempotency: "none" | "supported" | "required";
|
|
@@ -2363,7 +2363,7 @@ export declare const catalogToolSchema: z.ZodEffects<z.ZodObject<{
|
|
|
2363
2363
|
version: string;
|
|
2364
2364
|
rollback: "none" | "manual" | "supported";
|
|
2365
2365
|
inputSchema: Record<string, unknown>;
|
|
2366
|
-
capabilityPackage: "
|
|
2366
|
+
capabilityPackage: "finance" | "security" | "create" | "read" | "publish" | "communicate" | "administer" | "delegate";
|
|
2367
2367
|
requiredCapabilities: string[];
|
|
2368
2368
|
resourceTypes: string[];
|
|
2369
2369
|
idempotency: "none" | "supported" | "required";
|
|
@@ -2385,7 +2385,7 @@ export declare const catalogToolSchema: z.ZodEffects<z.ZodObject<{
|
|
|
2385
2385
|
version: string;
|
|
2386
2386
|
rollback: "none" | "manual" | "supported";
|
|
2387
2387
|
inputSchema: Record<string, unknown>;
|
|
2388
|
-
capabilityPackage: "
|
|
2388
|
+
capabilityPackage: "finance" | "security" | "create" | "read" | "publish" | "communicate" | "administer" | "delegate";
|
|
2389
2389
|
requiredCapabilities: string[];
|
|
2390
2390
|
resourceTypes: string[];
|
|
2391
2391
|
idempotency: "none" | "supported" | "required";
|
|
@@ -2407,7 +2407,7 @@ export declare const catalogToolSchema: z.ZodEffects<z.ZodObject<{
|
|
|
2407
2407
|
version: string;
|
|
2408
2408
|
rollback: "none" | "manual" | "supported";
|
|
2409
2409
|
inputSchema: Record<string, unknown>;
|
|
2410
|
-
capabilityPackage: "
|
|
2410
|
+
capabilityPackage: "finance" | "security" | "create" | "read" | "publish" | "communicate" | "administer" | "delegate";
|
|
2411
2411
|
requiredCapabilities: string[];
|
|
2412
2412
|
resourceTypes: string[];
|
|
2413
2413
|
idempotency: "none" | "supported" | "required";
|
|
@@ -2549,7 +2549,7 @@ export declare const appCapabilityCatalogSchema: z.ZodEffects<z.ZodObject<{
|
|
|
2549
2549
|
version: string;
|
|
2550
2550
|
rollback: "none" | "manual" | "supported";
|
|
2551
2551
|
inputSchema: Record<string, unknown>;
|
|
2552
|
-
capabilityPackage: "
|
|
2552
|
+
capabilityPackage: "finance" | "security" | "create" | "read" | "publish" | "communicate" | "administer" | "delegate";
|
|
2553
2553
|
requiredCapabilities: string[];
|
|
2554
2554
|
resourceTypes: string[];
|
|
2555
2555
|
idempotency: "none" | "supported" | "required";
|
|
@@ -2571,7 +2571,7 @@ export declare const appCapabilityCatalogSchema: z.ZodEffects<z.ZodObject<{
|
|
|
2571
2571
|
version: string;
|
|
2572
2572
|
rollback: "none" | "manual" | "supported";
|
|
2573
2573
|
inputSchema: Record<string, unknown>;
|
|
2574
|
-
capabilityPackage: "
|
|
2574
|
+
capabilityPackage: "finance" | "security" | "create" | "read" | "publish" | "communicate" | "administer" | "delegate";
|
|
2575
2575
|
requiredCapabilities: string[];
|
|
2576
2576
|
resourceTypes: string[];
|
|
2577
2577
|
idempotency: "none" | "supported" | "required";
|
|
@@ -2593,7 +2593,7 @@ export declare const appCapabilityCatalogSchema: z.ZodEffects<z.ZodObject<{
|
|
|
2593
2593
|
version: string;
|
|
2594
2594
|
rollback: "none" | "manual" | "supported";
|
|
2595
2595
|
inputSchema: Record<string, unknown>;
|
|
2596
|
-
capabilityPackage: "
|
|
2596
|
+
capabilityPackage: "finance" | "security" | "create" | "read" | "publish" | "communicate" | "administer" | "delegate";
|
|
2597
2597
|
requiredCapabilities: string[];
|
|
2598
2598
|
resourceTypes: string[];
|
|
2599
2599
|
idempotency: "none" | "supported" | "required";
|
|
@@ -2615,7 +2615,7 @@ export declare const appCapabilityCatalogSchema: z.ZodEffects<z.ZodObject<{
|
|
|
2615
2615
|
version: string;
|
|
2616
2616
|
rollback: "none" | "manual" | "supported";
|
|
2617
2617
|
inputSchema: Record<string, unknown>;
|
|
2618
|
-
capabilityPackage: "
|
|
2618
|
+
capabilityPackage: "finance" | "security" | "create" | "read" | "publish" | "communicate" | "administer" | "delegate";
|
|
2619
2619
|
requiredCapabilities: string[];
|
|
2620
2620
|
resourceTypes: string[];
|
|
2621
2621
|
idempotency: "none" | "supported" | "required";
|
|
@@ -2664,7 +2664,7 @@ export declare const appCapabilityCatalogSchema: z.ZodEffects<z.ZodObject<{
|
|
|
2664
2664
|
version: string;
|
|
2665
2665
|
rollback: "none" | "manual" | "supported";
|
|
2666
2666
|
inputSchema: Record<string, unknown>;
|
|
2667
|
-
capabilityPackage: "
|
|
2667
|
+
capabilityPackage: "finance" | "security" | "create" | "read" | "publish" | "communicate" | "administer" | "delegate";
|
|
2668
2668
|
requiredCapabilities: string[];
|
|
2669
2669
|
resourceTypes: string[];
|
|
2670
2670
|
idempotency: "none" | "supported" | "required";
|
|
@@ -2711,7 +2711,7 @@ export declare const appCapabilityCatalogSchema: z.ZodEffects<z.ZodObject<{
|
|
|
2711
2711
|
version: string;
|
|
2712
2712
|
rollback: "none" | "manual" | "supported";
|
|
2713
2713
|
inputSchema: Record<string, unknown>;
|
|
2714
|
-
capabilityPackage: "
|
|
2714
|
+
capabilityPackage: "finance" | "security" | "create" | "read" | "publish" | "communicate" | "administer" | "delegate";
|
|
2715
2715
|
requiredCapabilities: string[];
|
|
2716
2716
|
resourceTypes: string[];
|
|
2717
2717
|
idempotency: "none" | "supported" | "required";
|
|
@@ -2758,7 +2758,7 @@ export declare const appCapabilityCatalogSchema: z.ZodEffects<z.ZodObject<{
|
|
|
2758
2758
|
version: string;
|
|
2759
2759
|
rollback: "none" | "manual" | "supported";
|
|
2760
2760
|
inputSchema: Record<string, unknown>;
|
|
2761
|
-
capabilityPackage: "
|
|
2761
|
+
capabilityPackage: "finance" | "security" | "create" | "read" | "publish" | "communicate" | "administer" | "delegate";
|
|
2762
2762
|
requiredCapabilities: string[];
|
|
2763
2763
|
resourceTypes: string[];
|
|
2764
2764
|
idempotency: "none" | "supported" | "required";
|
|
@@ -2805,7 +2805,7 @@ export declare const appCapabilityCatalogSchema: z.ZodEffects<z.ZodObject<{
|
|
|
2805
2805
|
version: string;
|
|
2806
2806
|
rollback: "none" | "manual" | "supported";
|
|
2807
2807
|
inputSchema: Record<string, unknown>;
|
|
2808
|
-
capabilityPackage: "
|
|
2808
|
+
capabilityPackage: "finance" | "security" | "create" | "read" | "publish" | "communicate" | "administer" | "delegate";
|
|
2809
2809
|
requiredCapabilities: string[];
|
|
2810
2810
|
resourceTypes: string[];
|
|
2811
2811
|
idempotency: "none" | "supported" | "required";
|
|
@@ -2924,7 +2924,7 @@ export declare const catalogRegistrationSchema: z.ZodObject<{
|
|
|
2924
2924
|
version: string;
|
|
2925
2925
|
rollback: "none" | "manual" | "supported";
|
|
2926
2926
|
inputSchema: Record<string, unknown>;
|
|
2927
|
-
capabilityPackage: "
|
|
2927
|
+
capabilityPackage: "finance" | "security" | "create" | "read" | "publish" | "communicate" | "administer" | "delegate";
|
|
2928
2928
|
requiredCapabilities: string[];
|
|
2929
2929
|
resourceTypes: string[];
|
|
2930
2930
|
idempotency: "none" | "supported" | "required";
|
|
@@ -2946,7 +2946,7 @@ export declare const catalogRegistrationSchema: z.ZodObject<{
|
|
|
2946
2946
|
version: string;
|
|
2947
2947
|
rollback: "none" | "manual" | "supported";
|
|
2948
2948
|
inputSchema: Record<string, unknown>;
|
|
2949
|
-
capabilityPackage: "
|
|
2949
|
+
capabilityPackage: "finance" | "security" | "create" | "read" | "publish" | "communicate" | "administer" | "delegate";
|
|
2950
2950
|
requiredCapabilities: string[];
|
|
2951
2951
|
resourceTypes: string[];
|
|
2952
2952
|
idempotency: "none" | "supported" | "required";
|
|
@@ -2968,7 +2968,7 @@ export declare const catalogRegistrationSchema: z.ZodObject<{
|
|
|
2968
2968
|
version: string;
|
|
2969
2969
|
rollback: "none" | "manual" | "supported";
|
|
2970
2970
|
inputSchema: Record<string, unknown>;
|
|
2971
|
-
capabilityPackage: "
|
|
2971
|
+
capabilityPackage: "finance" | "security" | "create" | "read" | "publish" | "communicate" | "administer" | "delegate";
|
|
2972
2972
|
requiredCapabilities: string[];
|
|
2973
2973
|
resourceTypes: string[];
|
|
2974
2974
|
idempotency: "none" | "supported" | "required";
|
|
@@ -2990,7 +2990,7 @@ export declare const catalogRegistrationSchema: z.ZodObject<{
|
|
|
2990
2990
|
version: string;
|
|
2991
2991
|
rollback: "none" | "manual" | "supported";
|
|
2992
2992
|
inputSchema: Record<string, unknown>;
|
|
2993
|
-
capabilityPackage: "
|
|
2993
|
+
capabilityPackage: "finance" | "security" | "create" | "read" | "publish" | "communicate" | "administer" | "delegate";
|
|
2994
2994
|
requiredCapabilities: string[];
|
|
2995
2995
|
resourceTypes: string[];
|
|
2996
2996
|
idempotency: "none" | "supported" | "required";
|
|
@@ -3039,7 +3039,7 @@ export declare const catalogRegistrationSchema: z.ZodObject<{
|
|
|
3039
3039
|
version: string;
|
|
3040
3040
|
rollback: "none" | "manual" | "supported";
|
|
3041
3041
|
inputSchema: Record<string, unknown>;
|
|
3042
|
-
capabilityPackage: "
|
|
3042
|
+
capabilityPackage: "finance" | "security" | "create" | "read" | "publish" | "communicate" | "administer" | "delegate";
|
|
3043
3043
|
requiredCapabilities: string[];
|
|
3044
3044
|
resourceTypes: string[];
|
|
3045
3045
|
idempotency: "none" | "supported" | "required";
|
|
@@ -3086,7 +3086,7 @@ export declare const catalogRegistrationSchema: z.ZodObject<{
|
|
|
3086
3086
|
version: string;
|
|
3087
3087
|
rollback: "none" | "manual" | "supported";
|
|
3088
3088
|
inputSchema: Record<string, unknown>;
|
|
3089
|
-
capabilityPackage: "
|
|
3089
|
+
capabilityPackage: "finance" | "security" | "create" | "read" | "publish" | "communicate" | "administer" | "delegate";
|
|
3090
3090
|
requiredCapabilities: string[];
|
|
3091
3091
|
resourceTypes: string[];
|
|
3092
3092
|
idempotency: "none" | "supported" | "required";
|
|
@@ -3133,7 +3133,7 @@ export declare const catalogRegistrationSchema: z.ZodObject<{
|
|
|
3133
3133
|
version: string;
|
|
3134
3134
|
rollback: "none" | "manual" | "supported";
|
|
3135
3135
|
inputSchema: Record<string, unknown>;
|
|
3136
|
-
capabilityPackage: "
|
|
3136
|
+
capabilityPackage: "finance" | "security" | "create" | "read" | "publish" | "communicate" | "administer" | "delegate";
|
|
3137
3137
|
requiredCapabilities: string[];
|
|
3138
3138
|
resourceTypes: string[];
|
|
3139
3139
|
idempotency: "none" | "supported" | "required";
|
|
@@ -3180,7 +3180,7 @@ export declare const catalogRegistrationSchema: z.ZodObject<{
|
|
|
3180
3180
|
version: string;
|
|
3181
3181
|
rollback: "none" | "manual" | "supported";
|
|
3182
3182
|
inputSchema: Record<string, unknown>;
|
|
3183
|
-
capabilityPackage: "
|
|
3183
|
+
capabilityPackage: "finance" | "security" | "create" | "read" | "publish" | "communicate" | "administer" | "delegate";
|
|
3184
3184
|
requiredCapabilities: string[];
|
|
3185
3185
|
resourceTypes: string[];
|
|
3186
3186
|
idempotency: "none" | "supported" | "required";
|
|
@@ -3233,7 +3233,7 @@ export declare const catalogRegistrationSchema: z.ZodObject<{
|
|
|
3233
3233
|
version: string;
|
|
3234
3234
|
rollback: "none" | "manual" | "supported";
|
|
3235
3235
|
inputSchema: Record<string, unknown>;
|
|
3236
|
-
capabilityPackage: "
|
|
3236
|
+
capabilityPackage: "finance" | "security" | "create" | "read" | "publish" | "communicate" | "administer" | "delegate";
|
|
3237
3237
|
requiredCapabilities: string[];
|
|
3238
3238
|
resourceTypes: string[];
|
|
3239
3239
|
idempotency: "none" | "supported" | "required";
|
|
@@ -3285,7 +3285,7 @@ export declare const catalogRegistrationSchema: z.ZodObject<{
|
|
|
3285
3285
|
version: string;
|
|
3286
3286
|
rollback: "none" | "manual" | "supported";
|
|
3287
3287
|
inputSchema: Record<string, unknown>;
|
|
3288
|
-
capabilityPackage: "
|
|
3288
|
+
capabilityPackage: "finance" | "security" | "create" | "read" | "publish" | "communicate" | "administer" | "delegate";
|
|
3289
3289
|
requiredCapabilities: string[];
|
|
3290
3290
|
resourceTypes: string[];
|
|
3291
3291
|
idempotency: "none" | "supported" | "required";
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
* #1520): it owns resources, holds roles, plans and a balance, receives funds
|
|
20
20
|
* and pays for itself under the same rules as a person, and is its own actor.
|
|
21
21
|
*/
|
|
22
|
-
export type AccountKind = 'personal' | 'organization' | 'project' | 'bot' | 'channel';
|
|
22
|
+
export type AccountKind = 'personal' | 'organization' | 'project' | 'bot' | 'channel' | 'community';
|
|
23
23
|
/**
|
|
24
24
|
* The union is spelled out above and the array proves coverage BOTH ways
|
|
25
25
|
* (`satisfies` here, the `Gap` alias below) — the same shape this package's
|
|
@@ -32,14 +32,20 @@ export type AccountKind = 'personal' | 'organization' | 'project' | 'bot' | 'cha
|
|
|
32
32
|
* and an indexed-access type is materially more expensive to check there than a
|
|
33
33
|
* literal union.
|
|
34
34
|
*/
|
|
35
|
-
export declare const ACCOUNT_KINDS: readonly ["personal", "organization", "project", "bot", "channel"];
|
|
35
|
+
export declare const ACCOUNT_KINDS: readonly ["personal", "organization", "project", "bot", "channel", "community"];
|
|
36
36
|
/** `never` while `ACCOUNT_KINDS` covers the union. */
|
|
37
37
|
export type AccountKindGap = Exclude<AccountKind, (typeof ACCOUNT_KINDS)[number]>;
|
|
38
38
|
/**
|
|
39
|
-
* Kinds that may be CREATED as children of another account
|
|
40
|
-
*
|
|
39
|
+
* Kinds that may be CREATED as children of another account: `ACCOUNT_KINDS`
|
|
40
|
+
* minus `personal`, which is always a tree root, and minus `community`.
|
|
41
|
+
*
|
|
42
|
+
* A `community` is a forum its members post INTO and that re-broadcasts what
|
|
43
|
+
* they post (an ActivityPub `Group`: a Lemmy or Mbin community). Oxy records
|
|
44
|
+
* remote communities; it does not host one, because nothing here forwards a
|
|
45
|
+
* member's post to the community's followers yet. Creating one would make an
|
|
46
|
+
* account that promises that and cannot keep it.
|
|
41
47
|
*/
|
|
42
|
-
export type ChildAccountKind = Exclude<AccountKind, 'personal'>;
|
|
48
|
+
export type ChildAccountKind = Exclude<AccountKind, 'personal' | 'community'>;
|
|
43
49
|
export declare const CHILD_ACCOUNT_KINDS: readonly ["organization", "project", "bot", "channel"];
|
|
44
50
|
/** `never` while `CHILD_ACCOUNT_KINDS` covers the child union. */
|
|
45
51
|
export type ChildAccountKindGap = Exclude<ChildAccountKind, (typeof CHILD_ACCOUNT_KINDS)[number]>;
|
|
@@ -191,7 +197,7 @@ export declare const MAX_ACCOUNT_CATEGORIES = 4;
|
|
|
191
197
|
* !== 'personal'` test silently admits every kind invented after it was
|
|
192
198
|
* written, whereas this list forces whoever adds one to decide.
|
|
193
199
|
*/
|
|
194
|
-
export declare const ACCOUNT_CATEGORY_KINDS: readonly ["organization", "project", "bot", "channel"];
|
|
200
|
+
export declare const ACCOUNT_CATEGORY_KINDS: readonly ["organization", "project", "bot", "channel", "community"];
|
|
195
201
|
export type AccountCategoryKind = (typeof ACCOUNT_CATEGORY_KINDS)[number];
|
|
196
202
|
/**
|
|
197
203
|
* Whether an account of this kind may carry categories.
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The account-name policy, without Zod. Schema: `../accountName.ts`.
|
|
3
|
+
*
|
|
4
|
+
* Part of `@oxy.so/contracts/client`: never import `zod` here (see `./check.ts`).
|
|
5
|
+
*
|
|
6
|
+
* An account's name follows ONE of two policies, chosen by its `kind` and by
|
|
7
|
+
* nothing else — not by which route wrote it, nor by whether it is native or
|
|
8
|
+
* federated:
|
|
9
|
+
*
|
|
10
|
+
* - `person`: a human name. Letters of the allowlisted scripts, combining
|
|
11
|
+
* marks, spaces, the apostrophe and letter-flanked name separators; no
|
|
12
|
+
* digits. The character classes are generated data and live in
|
|
13
|
+
* `@oxy.so/core` (`isValidDisplayName`), which applies this table through
|
|
14
|
+
* `isValidAccountName`.
|
|
15
|
+
* - `title`: what an organization, project, bot, channel or community is called. Plain
|
|
16
|
+
* text — digits and punctuation are part of real titles ("Studio 54",
|
|
17
|
+
* "Blink-182") — without markup or control characters. Defined here, once.
|
|
18
|
+
*/
|
|
19
|
+
import type { AccountKind } from './accountGraph';
|
|
20
|
+
import { type Check } from './check';
|
|
21
|
+
export type AccountNamePolicy = 'person' | 'title';
|
|
22
|
+
/**
|
|
23
|
+
* The policy for each kind. A `Record` over the whole union, so adding a kind
|
|
24
|
+
* fails this file's typecheck until someone decides how it is named.
|
|
25
|
+
*/
|
|
26
|
+
export declare const ACCOUNT_NAME_POLICY_BY_KIND: {
|
|
27
|
+
readonly personal: "person";
|
|
28
|
+
readonly organization: "title";
|
|
29
|
+
readonly project: "title";
|
|
30
|
+
readonly bot: "title";
|
|
31
|
+
readonly channel: "title";
|
|
32
|
+
readonly community: "title";
|
|
33
|
+
};
|
|
34
|
+
/** A missing kind is `personal`, the `users.kind` column default. */
|
|
35
|
+
export declare function accountNamePolicyForKind(kind: AccountKind | null | undefined): AccountNamePolicy;
|
|
36
|
+
/** Longest title, in UTF-16 code units after trimming. */
|
|
37
|
+
export declare const ACCOUNT_TITLE_MAX_LENGTH = 300;
|
|
38
|
+
/**
|
|
39
|
+
* Source of the characters a title may not contain: `<`, `>`, the C0 controls
|
|
40
|
+
* and DEL. A class of literal code points — no property escapes — so it
|
|
41
|
+
* compiles on Hermes. The probe below rejects with it; the API compiles it with
|
|
42
|
+
* `g` to strip untrusted titles, so the gate and the strip cannot disagree.
|
|
43
|
+
*/
|
|
44
|
+
export declare const ACCOUNT_TITLE_DISALLOWED_SOURCE = "[<>\\u0000-\\u001F\\u007F]";
|
|
45
|
+
/** Whether `value` holds no character the title policy disallows. */
|
|
46
|
+
export declare function isPlainTextTitle(value: string): boolean;
|
|
47
|
+
/** The twin of `accountTitleSchema`. */
|
|
48
|
+
export declare const accountTitleCheck: Check<string>;
|
|
@@ -21,7 +21,7 @@ export declare const deviceDirectoryCheck: import("./check").Check<{
|
|
|
21
21
|
userId: string;
|
|
22
22
|
contexts: {
|
|
23
23
|
active: boolean;
|
|
24
|
-
kind: "
|
|
24
|
+
kind: "personal" | "organization" | "project" | "bot" | "channel" | "community";
|
|
25
25
|
accountId: string;
|
|
26
26
|
id: string;
|
|
27
27
|
lastUsedAt: number | null;
|
|
@@ -61,7 +61,7 @@ export declare const deviceActivateResponseCheck: import("./check").Check<{
|
|
|
61
61
|
userId: string;
|
|
62
62
|
contexts: {
|
|
63
63
|
active: boolean;
|
|
64
|
-
kind: "
|
|
64
|
+
kind: "personal" | "organization" | "project" | "bot" | "channel" | "community";
|
|
65
65
|
accountId: string;
|
|
66
66
|
id: string;
|
|
67
67
|
lastUsedAt: number | null;
|
|
@@ -114,7 +114,7 @@ export declare const deviceDirectorySyncCheck: import("./check").Check<{
|
|
|
114
114
|
userId: string;
|
|
115
115
|
contexts: {
|
|
116
116
|
active: boolean;
|
|
117
|
-
kind: "
|
|
117
|
+
kind: "personal" | "organization" | "project" | "bot" | "channel" | "community";
|
|
118
118
|
accountId: string;
|
|
119
119
|
id: string;
|
|
120
120
|
lastUsedAt: number | null;
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
*/
|
|
17
17
|
export { type Check, type CheckIssue, type CheckPath, type CheckResult, ContractCheckError, checkContract, formatCheckPath, parseContract, } from './check';
|
|
18
18
|
export { ACCOUNT_CATEGORY_IDS, ACCOUNT_CATEGORY_KINDS, ACCOUNT_KINDS, CHILD_ACCOUNT_KINDS, MAX_ACCOUNT_CATEGORIES, RETIRED_ACCOUNT_CATEGORY_IDS, SELECTABLE_ACCOUNT_CATEGORY_IDS, isAccountKind, isDelegatedActAsEligibleKind, isOperatorSwitchTargetKind, isSelectableAccountCategoryId, kindAcceptsAccountCategories, newlyAddedRetiredCategories, } from './accountGraph';
|
|
19
|
+
export { ACCOUNT_NAME_POLICY_BY_KIND, ACCOUNT_TITLE_DISALLOWED_SOURCE, ACCOUNT_TITLE_MAX_LENGTH, accountNamePolicyForKind, accountTitleCheck, isPlainTextTitle, } from './accountName';
|
|
19
20
|
export { EMAIL_CODE_LENGTH, EMAIL_CODE_MAX_ATTEMPTS, EMAIL_CODE_TTL_MS, EMAIL_TICKET_TTL_MS, EMAIL_VERIFICATION_ERROR_CODES, EMAIL_VERIFICATION_PURPOSES, emailAddressCheck, emailTicketCheck, emailVerificationConfirmResponseCheck, emailVerificationStartResponseCheck, } from './accountEmail';
|
|
20
21
|
export { ACCOUNT_AUTH_METHODS, AGENT_PROOF_ACTIONS, AGENT_PROOF_AUDIENCE, AGENT_PROOF_TTL_MS, agentChallengeRequestCheck, agentKeyListResponseCheck, agentKeyOperationChallengeCheck, agentKeyOperationCheck, agentKeyOperationResultCheck, agentProofClaimsCheck, agentVerifyRequestCheck, executeAgentKeyOperationCheck, } from './agentKeys';
|
|
21
22
|
export { isLoopbackOrigin } from '../capabilityBindings';
|
|
@@ -10,13 +10,14 @@ export declare const ORGANIZATION_STATUSES: readonly ["active", "inactive", "mer
|
|
|
10
10
|
export declare const ORGANIZATION_CLAIM_STATUSES: readonly ["unclaimed", "claimed"];
|
|
11
11
|
export declare const ORGANIZATION_ALIAS_KINDS: readonly ["name_variant", "former_name", "localized_name", "marketing_name", "misspelling"];
|
|
12
12
|
export declare const ORGANIZATION_CLAIM_DECISIONS: readonly ["pending", "approved", "rejected"];
|
|
13
|
+
/** An organization's name is a title; the cap is the title policy's. */
|
|
13
14
|
export declare const ORGANIZATION_NAME_MAX_LENGTH = 300;
|
|
14
15
|
export declare const ORGANIZATION_ERROR_CODES: readonly ["bad_request", "unauthorized", "forbidden", "not_found", "unknown_route", "conflict", "validation_failed", "rate_limited", "internal_error", "service_unavailable"];
|
|
15
|
-
/** The twin of `organizationNameSchema
|
|
16
|
+
/** The twin of `organizationNameSchema`: the title policy (`./accountName.ts`). */
|
|
16
17
|
export declare const organizationNameCheck: Check<string>;
|
|
17
18
|
export declare const createOrganizationCheck: Check<{
|
|
18
19
|
name: string;
|
|
19
|
-
organizationType: "
|
|
20
|
+
organizationType: "community" | "business" | "nonprofit" | "other" | "public_body";
|
|
20
21
|
legalName?: string | null | undefined;
|
|
21
22
|
websiteUrl?: string | null | undefined;
|
|
22
23
|
countryCode?: string | null | undefined;
|
|
@@ -28,7 +29,7 @@ export declare const createOrganizationCheck: Check<{
|
|
|
28
29
|
}>;
|
|
29
30
|
export declare const updateOrganizationCheck: Check<{
|
|
30
31
|
name?: string | undefined;
|
|
31
|
-
organizationType?: "
|
|
32
|
+
organizationType?: "community" | "business" | "nonprofit" | "other" | "public_body" | undefined;
|
|
32
33
|
legalName?: string | null | undefined;
|
|
33
34
|
websiteUrl?: string | null | undefined;
|
|
34
35
|
countryCode?: string | null | undefined;
|
|
@@ -41,7 +42,7 @@ export declare const updateOrganizationCheck: Check<{
|
|
|
41
42
|
export declare const organizationCheck: Check<{
|
|
42
43
|
status: "active" | "inactive" | "merged" | "suppressed";
|
|
43
44
|
name: string;
|
|
44
|
-
organizationType: "
|
|
45
|
+
organizationType: "community" | "business" | "nonprofit" | "other" | "public_body";
|
|
45
46
|
legalName: string | null;
|
|
46
47
|
websiteUrl: string | null;
|
|
47
48
|
countryCode: string | null;
|
|
@@ -63,7 +64,7 @@ export declare const organizationListCheck: Check<{
|
|
|
63
64
|
items: {
|
|
64
65
|
status: "active" | "inactive" | "merged" | "suppressed";
|
|
65
66
|
name: string;
|
|
66
|
-
organizationType: "
|
|
67
|
+
organizationType: "community" | "business" | "nonprofit" | "other" | "public_body";
|
|
67
68
|
legalName: string | null;
|
|
68
69
|
websiteUrl: string | null;
|
|
69
70
|
countryCode: string | null;
|
|
@@ -85,11 +86,10 @@ export declare const organizationListCheck: Check<{
|
|
|
85
86
|
}>;
|
|
86
87
|
export declare const organizationBatchCheck: Check<{
|
|
87
88
|
items: {
|
|
88
|
-
requestedAccountId: string;
|
|
89
89
|
organization: {
|
|
90
90
|
status: "active" | "inactive" | "merged" | "suppressed";
|
|
91
91
|
name: string;
|
|
92
|
-
organizationType: "
|
|
92
|
+
organizationType: "community" | "business" | "nonprofit" | "other" | "public_body";
|
|
93
93
|
legalName: string | null;
|
|
94
94
|
websiteUrl: string | null;
|
|
95
95
|
countryCode: string | null;
|
|
@@ -107,6 +107,7 @@ export declare const organizationBatchCheck: Check<{
|
|
|
107
107
|
createdAt: string;
|
|
108
108
|
updatedAt: string;
|
|
109
109
|
};
|
|
110
|
+
requestedAccountId: string;
|
|
110
111
|
}[];
|
|
111
112
|
missingIds: string[];
|
|
112
113
|
}>;
|
|
@@ -136,13 +136,13 @@ export declare const safetyOrganizationsInputCheck: Check<{
|
|
|
136
136
|
}>;
|
|
137
137
|
export declare const safetyOrganizationsResponseCheck: Check<{
|
|
138
138
|
items: {
|
|
139
|
-
requestedAccountId: string;
|
|
140
139
|
organization: {
|
|
141
140
|
name: string;
|
|
142
|
-
organizationType: "
|
|
141
|
+
organizationType: "community" | "business" | "nonprofit" | "other" | "public_body";
|
|
143
142
|
accountId: string;
|
|
144
143
|
username: string | null;
|
|
145
144
|
};
|
|
145
|
+
requestedAccountId: string;
|
|
146
146
|
}[];
|
|
147
147
|
missingIds: string[];
|
|
148
148
|
}>;
|