@oxy.so/contracts 5.8.0 → 6.0.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.
Files changed (219) hide show
  1. package/dist/cjs/accountAccess.js +6 -5
  2. package/dist/cjs/accountEmail.js +13 -5
  3. package/dist/cjs/accountGraph.js +10 -9
  4. package/dist/cjs/accountName.js +3 -2
  5. package/dist/cjs/agency.js +91 -34
  6. package/dist/cjs/agentKeys.js +21 -17
  7. package/dist/cjs/appAssertions.js +14 -13
  8. package/dist/cjs/applicationRoles.js +19 -12
  9. package/dist/cjs/civic.js +10 -9
  10. package/dist/cjs/client/check.js +61 -53
  11. package/dist/cjs/consoleOnboarding.js +9 -4
  12. package/dist/cjs/contentClaims.js +23 -14
  13. package/dist/cjs/deviceDirectory.js +11 -9
  14. package/dist/cjs/deviceSession.js +27 -25
  15. package/dist/cjs/email/messages.js +20 -18
  16. package/dist/cjs/emailAgentContext.js +11 -9
  17. package/dist/cjs/externalIdentity.js +15 -11
  18. package/dist/cjs/federationInstanceFetch.js +12 -7
  19. package/dist/cjs/identity.js +19 -17
  20. package/dist/cjs/identityLink.js +6 -4
  21. package/dist/cjs/identityProof.js +6 -4
  22. package/dist/cjs/inboxPush.js +5 -4
  23. package/dist/cjs/index.js +15 -6
  24. package/dist/cjs/inference/accountBilling.js +35 -33
  25. package/dist/cjs/inference/aliaModelRelease.js +9 -7
  26. package/dist/cjs/inference/attribution.js +14 -12
  27. package/dist/cjs/inference/catalogue.js +35 -29
  28. package/dist/cjs/inference/economics.js +24 -19
  29. package/dist/cjs/inference/embeddings.js +9 -7
  30. package/dist/cjs/inference/entitlement.js +17 -15
  31. package/dist/cjs/inference/errors.js +15 -8
  32. package/dist/cjs/inference/identifiers.js +33 -21
  33. package/dist/cjs/inference/inbox.js +37 -35
  34. package/dist/cjs/inference/modelDocumentation.js +16 -14
  35. package/dist/cjs/inference/money.js +5 -4
  36. package/dist/cjs/inference/priceVersion.js +10 -5
  37. package/dist/cjs/inference/providerConnection.js +21 -14
  38. package/dist/cjs/inference/realtime.js +88 -47
  39. package/dist/cjs/inference/request.js +27 -25
  40. package/dist/cjs/inference/routingPolicy.js +12 -10
  41. package/dist/cjs/inference/streamEvents.js +22 -16
  42. package/dist/cjs/inference/usage.js +32 -15
  43. package/dist/cjs/keyRecovery.js +8 -6
  44. package/dist/cjs/keyRotation.js +5 -4
  45. package/dist/cjs/linkedAccounts.js +22 -18
  46. package/dist/cjs/moderationReputation.js +29 -27
  47. package/dist/cjs/notifications.js +25 -9
  48. package/dist/cjs/numberChecks.js +45 -0
  49. package/dist/cjs/oauth.js +14 -12
  50. package/dist/cjs/organizations.js +23 -21
  51. package/dist/cjs/products/access.js +10 -8
  52. package/dist/cjs/products/billing.js +10 -8
  53. package/dist/cjs/products/checkout.js +22 -10
  54. package/dist/cjs/products/plans.js +15 -10
  55. package/dist/cjs/protocol.js +6 -5
  56. package/dist/cjs/recommendations.js +27 -19
  57. package/dist/cjs/reputation.js +15 -13
  58. package/dist/cjs/safety.js +43 -27
  59. package/dist/cjs/serviceToken.js +81 -2
  60. package/dist/cjs/sessionRevocation.js +8 -6
  61. package/dist/cjs/signIn.js +42 -24
  62. package/dist/cjs/stickers.js +19 -15
  63. package/dist/cjs/stringChecks.js +70 -0
  64. package/dist/cjs/transparency.js +14 -12
  65. package/dist/cjs/updates.js +24 -22
  66. package/dist/cjs/userInvalidation.js +7 -5
  67. package/dist/cjs/userResponse.js +8 -7
  68. package/dist/cjs/username.js +7 -6
  69. package/dist/esm/accountAccess.js +4 -3
  70. package/dist/esm/accountEmail.js +13 -5
  71. package/dist/esm/accountGraph.js +8 -7
  72. package/dist/esm/accountName.js +3 -2
  73. package/dist/esm/agency.js +90 -33
  74. package/dist/esm/agentKeys.js +21 -17
  75. package/dist/esm/appAssertions.js +11 -10
  76. package/dist/esm/applicationRoles.js +16 -9
  77. package/dist/esm/civic.js +8 -7
  78. package/dist/esm/client/check.js +61 -53
  79. package/dist/esm/consoleOnboarding.js +7 -2
  80. package/dist/esm/contentClaims.js +23 -14
  81. package/dist/esm/deviceDirectory.js +11 -9
  82. package/dist/esm/deviceSession.js +27 -25
  83. package/dist/esm/email/messages.js +18 -16
  84. package/dist/esm/emailAgentContext.js +11 -9
  85. package/dist/esm/externalIdentity.js +15 -11
  86. package/dist/esm/federationInstanceFetch.js +10 -5
  87. package/dist/esm/identity.js +17 -15
  88. package/dist/esm/identityLink.js +6 -4
  89. package/dist/esm/identityProof.js +6 -4
  90. package/dist/esm/inboxPush.js +3 -2
  91. package/dist/esm/index.js +4 -2
  92. package/dist/esm/inference/accountBilling.js +33 -31
  93. package/dist/esm/inference/aliaModelRelease.js +7 -5
  94. package/dist/esm/inference/attribution.js +14 -12
  95. package/dist/esm/inference/catalogue.js +33 -27
  96. package/dist/esm/inference/economics.js +22 -17
  97. package/dist/esm/inference/embeddings.js +9 -7
  98. package/dist/esm/inference/entitlement.js +15 -13
  99. package/dist/esm/inference/errors.js +13 -6
  100. package/dist/esm/inference/identifiers.js +31 -19
  101. package/dist/esm/inference/inbox.js +37 -35
  102. package/dist/esm/inference/modelDocumentation.js +14 -12
  103. package/dist/esm/inference/money.js +3 -2
  104. package/dist/esm/inference/priceVersion.js +8 -3
  105. package/dist/esm/inference/providerConnection.js +19 -12
  106. package/dist/esm/inference/realtime.js +85 -44
  107. package/dist/esm/inference/request.js +25 -23
  108. package/dist/esm/inference/routingPolicy.js +9 -7
  109. package/dist/esm/inference/streamEvents.js +20 -14
  110. package/dist/esm/inference/usage.js +30 -13
  111. package/dist/esm/keyRecovery.js +8 -6
  112. package/dist/esm/keyRotation.js +5 -4
  113. package/dist/esm/linkedAccounts.js +20 -16
  114. package/dist/esm/moderationReputation.js +27 -25
  115. package/dist/esm/notifications.js +23 -7
  116. package/dist/esm/numberChecks.js +41 -0
  117. package/dist/esm/oauth.js +14 -12
  118. package/dist/esm/organizations.js +23 -21
  119. package/dist/esm/products/access.js +10 -8
  120. package/dist/esm/products/billing.js +10 -8
  121. package/dist/esm/products/checkout.js +22 -10
  122. package/dist/esm/products/plans.js +15 -10
  123. package/dist/esm/protocol.js +4 -3
  124. package/dist/esm/recommendations.js +25 -17
  125. package/dist/esm/reputation.js +13 -11
  126. package/dist/esm/safety.js +43 -27
  127. package/dist/esm/serviceToken.js +80 -1
  128. package/dist/esm/sessionRevocation.js +6 -4
  129. package/dist/esm/signIn.js +42 -24
  130. package/dist/esm/stickers.js +17 -13
  131. package/dist/esm/stringChecks.js +63 -0
  132. package/dist/esm/transparency.js +14 -12
  133. package/dist/esm/updates.js +22 -20
  134. package/dist/esm/userInvalidation.js +4 -2
  135. package/dist/esm/userResponse.js +4 -3
  136. package/dist/esm/username.js +3 -2
  137. package/dist/types/accountAccess.d.ts +29 -70
  138. package/dist/types/accountEmail.d.ts +2 -14
  139. package/dist/types/accountGraph.d.ts +179 -171
  140. package/dist/types/accountName.d.ts +1 -1
  141. package/dist/types/accountSubject.d.ts +20 -93
  142. package/dist/types/agency.d.ts +528 -2924
  143. package/dist/types/agentKeys.d.ts +48 -421
  144. package/dist/types/appAssertions.d.ts +56 -210
  145. package/dist/types/applicationRoles.d.ts +30 -276
  146. package/dist/types/avatarCharacter.d.ts +1 -1
  147. package/dist/types/civic.d.ts +1 -13
  148. package/dist/types/client/agentKeys.d.ts +18 -18
  149. package/dist/types/client/appAssertions.d.ts +3 -3
  150. package/dist/types/client/check.d.ts +13 -13
  151. package/dist/types/client/deviceDirectory.d.ts +51 -51
  152. package/dist/types/client/deviceSession.d.ts +14 -14
  153. package/dist/types/client/organizations.d.ts +25 -25
  154. package/dist/types/client/products.d.ts +33 -33
  155. package/dist/types/client/recommendations.d.ts +2 -2
  156. package/dist/types/client/safety.d.ts +45 -45
  157. package/dist/types/client/sessionStatus.d.ts +4 -4
  158. package/dist/types/client/signIn.d.ts +1 -1
  159. package/dist/types/commonsSignIn.d.ts +4 -1
  160. package/dist/types/consoleOnboarding.d.ts +24 -44
  161. package/dist/types/contentClaims.d.ts +24 -180
  162. package/dist/types/deviceDirectory.d.ts +109 -1040
  163. package/dist/types/deviceSession.d.ts +36 -298
  164. package/dist/types/email/messages.d.ts +212 -1793
  165. package/dist/types/emailAgentContext.d.ts +10 -194
  166. package/dist/types/externalIdentity.d.ts +121 -615
  167. package/dist/types/federationInstanceFetch.d.ts +3 -32
  168. package/dist/types/identity.d.ts +15 -92
  169. package/dist/types/identityLink.d.ts +6 -84
  170. package/dist/types/identityProof.d.ts +5 -17
  171. package/dist/types/inboxPush.d.ts +1 -9
  172. package/dist/types/index.d.ts +5 -3
  173. package/dist/types/inference/accountBilling.d.ts +151 -488
  174. package/dist/types/inference/aliaModelRelease.d.ts +42 -439
  175. package/dist/types/inference/attribution.d.ts +75 -104
  176. package/dist/types/inference/catalogue.d.ts +417 -1599
  177. package/dist/types/inference/economics.d.ts +69 -276
  178. package/dist/types/inference/embeddings.d.ts +110 -406
  179. package/dist/types/inference/entitlement.d.ts +80 -335
  180. package/dist/types/inference/errors.d.ts +90 -102
  181. package/dist/types/inference/identifiers.d.ts +12 -4
  182. package/dist/types/inference/inbox.d.ts +105 -420
  183. package/dist/types/inference/modelDocumentation.d.ts +201 -1390
  184. package/dist/types/inference/money.d.ts +65 -32
  185. package/dist/types/inference/priceVersion.d.ts +53 -120
  186. package/dist/types/inference/providerConnection.d.ts +253 -710
  187. package/dist/types/inference/realtime.d.ts +954 -6825
  188. package/dist/types/inference/request.d.ts +300 -2572
  189. package/dist/types/inference/routingPolicy.d.ts +95 -503
  190. package/dist/types/inference/streamEvents.d.ts +253 -721
  191. package/dist/types/inference/usage.d.ts +317 -950
  192. package/dist/types/keyRecovery.d.ts +3 -51
  193. package/dist/types/keyRotation.d.ts +3 -38
  194. package/dist/types/linkedAccounts.d.ts +50 -236
  195. package/dist/types/moderationReputation.d.ts +81 -14
  196. package/dist/types/notifications.d.ts +19 -51
  197. package/dist/types/numberChecks.d.ts +9 -0
  198. package/dist/types/oauth.d.ts +101 -809
  199. package/dist/types/organizations.d.ts +268 -921
  200. package/dist/types/oxyRecordTypes.d.ts +11 -1
  201. package/dist/types/products/access.d.ts +125 -775
  202. package/dist/types/products/billing.d.ts +67 -503
  203. package/dist/types/products/checkout.d.ts +16 -69
  204. package/dist/types/products/plans.d.ts +33 -366
  205. package/dist/types/recommendations.d.ts +76 -389
  206. package/dist/types/reputation.d.ts +37 -5
  207. package/dist/types/safety.d.ts +408 -2048
  208. package/dist/types/serviceToken.d.ts +247 -7
  209. package/dist/types/sessionRevocation.d.ts +2 -17
  210. package/dist/types/sessionStatus.d.ts +27 -115
  211. package/dist/types/signIn.d.ts +53 -553
  212. package/dist/types/stickers.d.ts +67 -819
  213. package/dist/types/stringChecks.d.ts +16 -0
  214. package/dist/types/transparency.d.ts +14 -302
  215. package/dist/types/updates.d.ts +60 -316
  216. package/dist/types/userInvalidation.d.ts +4 -13
  217. package/dist/types/userResponse.d.ts +302 -2400
  218. package/dist/types/username.d.ts +3 -3
  219. package/package.json +2 -2
@@ -1,3 +1,4 @@
1
+ import { utf16MaxLength, utf16MinLength } from './stringChecks.js';
1
2
  /**
2
3
  * Username policy — the ONE rule, for every kind of account.
3
4
  *
@@ -115,8 +116,8 @@ export { USERNAME_MIN_LENGTH, USERNAME_MAX_LENGTH, USERNAME_INVALID_MESSAGE, RES
115
116
  export const usernameSchema = z
116
117
  .string()
117
118
  .trim()
118
- .min(USERNAME_MIN_LENGTH, USERNAME_INVALID_MESSAGE)
119
- .max(USERNAME_MAX_LENGTH, USERNAME_INVALID_MESSAGE)
119
+ .check(utf16MinLength(USERNAME_MIN_LENGTH, USERNAME_INVALID_MESSAGE))
120
+ .check(utf16MaxLength(USERNAME_MAX_LENGTH, USERNAME_INVALID_MESSAGE))
120
121
  .regex(USERNAME_PATTERN, USERNAME_INVALID_MESSAGE)
121
122
  .refine((username) => !/^[0-9]+$/.test(username), NUMERIC_USERNAME_MESSAGE)
122
123
  .refine((username) => !RESERVED_USERNAMES.has(username.toLowerCase()), RESERVED_USERNAME_MESSAGE)
@@ -38,7 +38,11 @@ export declare const ACCOUNTS_MEMBERSHIP_READ_SCOPE: "accounts:membership:read";
38
38
  */
39
39
  export declare const ACCOUNT_ACCESS_SOURCES: readonly ["self", "direct", "inherited"];
40
40
  export type AccountAccessSource = (typeof ACCOUNT_ACCESS_SOURCES)[number];
41
- export declare const accountAccessSourceSchema: z.ZodEnum<["self", "direct", "inherited"]>;
41
+ export declare const accountAccessSourceSchema: z.ZodEnum<{
42
+ self: "self";
43
+ direct: "direct";
44
+ inherited: "inherited";
45
+ }>;
42
46
  /**
43
47
  * One person's EFFECTIVE access over one account.
44
48
  *
@@ -50,79 +54,34 @@ export declare const accountAccessSourceSchema: z.ZodEnum<["self", "direct", "in
50
54
  */
51
55
  export declare const accountAccessGrantSchema: z.ZodObject<{
52
56
  role: z.ZodString;
53
- permissions: z.ZodArray<z.ZodString, "many">;
54
- /** Only an active membership grants access, so this is the one value. */
57
+ permissions: z.ZodArray<z.ZodString>;
55
58
  status: z.ZodLiteral<"active">;
56
- source: z.ZodEnum<["self", "direct", "inherited"]>;
57
- }, "strip", z.ZodTypeAny, {
58
- status: "active";
59
- role: string;
60
- permissions: string[];
61
- source: "self" | "direct" | "inherited";
62
- }, {
63
- status: "active";
64
- role: string;
65
- permissions: string[];
66
- source: "self" | "direct" | "inherited";
67
- }>;
59
+ source: z.ZodEnum<{
60
+ self: "self";
61
+ direct: "direct";
62
+ inherited: "inherited";
63
+ }>;
64
+ }, z.core.$strip>;
68
65
  export type AccountAccessGrant = z.infer<typeof accountAccessGrantSchema>;
69
- export declare const accountAccessVerdictSchema: z.ZodEffects<z.ZodObject<{
66
+ export declare const accountAccessVerdictSchema: z.ZodObject<{
70
67
  accountId: z.ZodString;
71
- /** `null` when no such account exists. */
72
- kind: z.ZodNullable<z.ZodEnum<["personal", "organization", "project", "bot", "channel", "community"]>>;
73
- /** `null` means: this person may not act for this account. */
68
+ kind: z.ZodNullable<z.ZodEnum<{
69
+ personal: "personal";
70
+ organization: "organization";
71
+ project: "project";
72
+ bot: "bot";
73
+ channel: "channel";
74
+ community: "community";
75
+ }>>;
74
76
  access: z.ZodNullable<z.ZodObject<{
75
77
  role: z.ZodString;
76
- permissions: z.ZodArray<z.ZodString, "many">;
77
- /** Only an active membership grants access, so this is the one value. */
78
+ permissions: z.ZodArray<z.ZodString>;
78
79
  status: z.ZodLiteral<"active">;
79
- source: z.ZodEnum<["self", "direct", "inherited"]>;
80
- }, "strip", z.ZodTypeAny, {
81
- status: "active";
82
- role: string;
83
- permissions: string[];
84
- source: "self" | "direct" | "inherited";
85
- }, {
86
- status: "active";
87
- role: string;
88
- permissions: string[];
89
- source: "self" | "direct" | "inherited";
90
- }>>;
91
- }, "strip", z.ZodTypeAny, {
92
- kind: "personal" | "organization" | "project" | "bot" | "channel" | "community" | null;
93
- accountId: string;
94
- access: {
95
- status: "active";
96
- role: string;
97
- permissions: string[];
98
- source: "self" | "direct" | "inherited";
99
- } | null;
100
- }, {
101
- kind: "personal" | "organization" | "project" | "bot" | "channel" | "community" | null;
102
- accountId: string;
103
- access: {
104
- status: "active";
105
- role: string;
106
- permissions: string[];
107
- source: "self" | "direct" | "inherited";
108
- } | null;
109
- }>, {
110
- kind: "personal" | "organization" | "project" | "bot" | "channel" | "community" | null;
111
- accountId: string;
112
- access: {
113
- status: "active";
114
- role: string;
115
- permissions: string[];
116
- source: "self" | "direct" | "inherited";
117
- } | null;
118
- }, {
119
- kind: "personal" | "organization" | "project" | "bot" | "channel" | "community" | null;
120
- accountId: string;
121
- access: {
122
- status: "active";
123
- role: string;
124
- permissions: string[];
125
- source: "self" | "direct" | "inherited";
126
- } | null;
127
- }>;
80
+ source: z.ZodEnum<{
81
+ self: "self";
82
+ direct: "direct";
83
+ inherited: "inherited";
84
+ }>;
85
+ }, z.core.$strip>>;
86
+ }, z.core.$strip>;
128
87
  export type AccountAccessVerdict = z.infer<typeof accountAccessVerdictSchema>;
@@ -23,13 +23,7 @@ export declare const emailTicketSchema: z.ZodString;
23
23
  export declare const emailVerificationStartRequestSchema: z.ZodObject<{
24
24
  purpose: z.ZodLiteral<"signup">;
25
25
  email: z.ZodString;
26
- }, "strict", z.ZodTypeAny, {
27
- email: string;
28
- purpose: "signup";
29
- }, {
30
- email: string;
31
- purpose: "signup";
32
- }>;
26
+ }, z.core.$strict>;
33
27
  export type EmailVerificationStartRequest = z.infer<typeof emailVerificationStartRequestSchema>;
34
28
  export interface EmailVerificationStartResponse {
35
29
  /** Names this verification in `confirm`. Returned whether or not a code was sent. */
@@ -42,13 +36,7 @@ export declare const emailVerificationStartResponseSchema: z.ZodType<EmailVerifi
42
36
  export declare const emailVerificationConfirmRequestSchema: z.ZodObject<{
43
37
  verificationId: z.ZodString;
44
38
  code: z.ZodString;
45
- }, "strict", z.ZodTypeAny, {
46
- code: string;
47
- verificationId: string;
48
- }, {
49
- code: string;
50
- verificationId: string;
51
- }>;
39
+ }, z.core.$strict>;
52
40
  export type EmailVerificationConfirmRequest = z.infer<typeof emailVerificationConfirmRequestSchema>;
53
41
  export interface EmailVerificationConfirmResponse {
54
42
  ticket: string;
@@ -9,8 +9,21 @@
9
9
  import { z } from 'zod';
10
10
  export { ACCOUNT_KINDS, CHILD_ACCOUNT_KINDS, isDelegatedActAsEligibleKind, isOperatorSwitchTargetKind, isMemberOperatedKind, isAccountKind, ACCOUNT_CATEGORY_IDS, RETIRED_ACCOUNT_CATEGORY_IDS, isSelectableAccountCategoryId, SELECTABLE_ACCOUNT_CATEGORY_IDS, newlyAddedRetiredCategories, MAX_ACCOUNT_CATEGORIES, ACCOUNT_CATEGORY_KINDS, kindAcceptsAccountCategories, } from './client/accountGraph';
11
11
  export type { AccountKind, AccountKindGap, ChildAccountKind, ChildAccountKindGap, AccountCategoryId, AccountCategoryKind, } from './client/accountGraph';
12
- export declare const accountKindSchema: z.ZodEnum<["personal", "organization", "project", "bot", "channel", "community"]>;
13
- export declare const childAccountKindSchema: z.ZodEnum<["organization", "project", "bot", "channel", "community"]>;
12
+ export declare const accountKindSchema: z.ZodEnum<{
13
+ personal: "personal";
14
+ organization: "organization";
15
+ project: "project";
16
+ bot: "bot";
17
+ channel: "channel";
18
+ community: "community";
19
+ }>;
20
+ export declare const childAccountKindSchema: z.ZodEnum<{
21
+ organization: "organization";
22
+ project: "project";
23
+ bot: "bot";
24
+ channel: "channel";
25
+ community: "community";
26
+ }>;
14
27
  /**
15
28
  * Accepts EVERY id, withdrawn ones included — see rule 3.
16
29
  *
@@ -19,7 +32,54 @@ export declare const childAccountKindSchema: z.ZodEnum<["organization", "project
19
32
  * picked one could no longer save its bio either. That is the same failure the
20
33
  * nullable `bio` / `avatar` fix addressed, wearing a different hat.
21
34
  */
22
- export declare const accountCategoryIdSchema: z.ZodEnum<["news", "politics", "business", "startup", "finance", "crypto", "marketplace", "retail", "real_estate", "agency", "landlord", "cooperative", "architecture", "technology", "software", "ai", "security", "automation", "science", "education", "books", "health", "fitness", "sports", "gaming", "music", "film", "podcast", "art", "photography", "comedy", "food", "travel", "fashion", "home_garden", "diy", "automotive", "animals", "family", "nonprofit", "government", "community", "activism", "environment", "religion", "other"]>;
35
+ export declare const accountCategoryIdSchema: z.ZodEnum<{
36
+ community: "community";
37
+ news: "news";
38
+ politics: "politics";
39
+ business: "business";
40
+ startup: "startup";
41
+ finance: "finance";
42
+ crypto: "crypto";
43
+ marketplace: "marketplace";
44
+ retail: "retail";
45
+ real_estate: "real_estate";
46
+ agency: "agency";
47
+ landlord: "landlord";
48
+ cooperative: "cooperative";
49
+ architecture: "architecture";
50
+ technology: "technology";
51
+ software: "software";
52
+ ai: "ai";
53
+ security: "security";
54
+ automation: "automation";
55
+ science: "science";
56
+ education: "education";
57
+ books: "books";
58
+ health: "health";
59
+ fitness: "fitness";
60
+ sports: "sports";
61
+ gaming: "gaming";
62
+ music: "music";
63
+ film: "film";
64
+ podcast: "podcast";
65
+ art: "art";
66
+ photography: "photography";
67
+ comedy: "comedy";
68
+ food: "food";
69
+ travel: "travel";
70
+ fashion: "fashion";
71
+ home_garden: "home_garden";
72
+ diy: "diy";
73
+ automotive: "automotive";
74
+ animals: "animals";
75
+ family: "family";
76
+ nonprofit: "nonprofit";
77
+ government: "government";
78
+ activism: "activism";
79
+ environment: "environment";
80
+ religion: "religion";
81
+ other: "other";
82
+ }>;
23
83
  /**
24
84
  * An account's categories on the wire. ORDER IS MEANINGFUL — index 0 is the
25
85
  * primary (rule 2).
@@ -30,7 +90,54 @@ export declare const accountCategoryIdSchema: z.ZodEnum<["news", "politics", "bu
30
90
  * property the list exists to carry. A duplicate only ever comes from a client
31
91
  * bug, and a 400 naming the index is how that bug gets found.
32
92
  */
33
- export declare const accountCategoriesSchema: z.ZodEffects<z.ZodArray<z.ZodEnum<["news", "politics", "business", "startup", "finance", "crypto", "marketplace", "retail", "real_estate", "agency", "landlord", "cooperative", "architecture", "technology", "software", "ai", "security", "automation", "science", "education", "books", "health", "fitness", "sports", "gaming", "music", "film", "podcast", "art", "photography", "comedy", "food", "travel", "fashion", "home_garden", "diy", "automotive", "animals", "family", "nonprofit", "government", "community", "activism", "environment", "religion", "other"]>, "many">, ("community" | "news" | "politics" | "business" | "startup" | "finance" | "crypto" | "marketplace" | "retail" | "real_estate" | "agency" | "landlord" | "cooperative" | "architecture" | "technology" | "software" | "ai" | "security" | "automation" | "science" | "education" | "books" | "health" | "fitness" | "sports" | "gaming" | "music" | "film" | "podcast" | "art" | "photography" | "comedy" | "food" | "travel" | "fashion" | "home_garden" | "diy" | "automotive" | "animals" | "family" | "nonprofit" | "government" | "activism" | "environment" | "religion" | "other")[], ("community" | "news" | "politics" | "business" | "startup" | "finance" | "crypto" | "marketplace" | "retail" | "real_estate" | "agency" | "landlord" | "cooperative" | "architecture" | "technology" | "software" | "ai" | "security" | "automation" | "science" | "education" | "books" | "health" | "fitness" | "sports" | "gaming" | "music" | "film" | "podcast" | "art" | "photography" | "comedy" | "food" | "travel" | "fashion" | "home_garden" | "diy" | "automotive" | "animals" | "family" | "nonprofit" | "government" | "activism" | "environment" | "religion" | "other")[]>;
93
+ export declare const accountCategoriesSchema: z.ZodArray<z.ZodEnum<{
94
+ community: "community";
95
+ news: "news";
96
+ politics: "politics";
97
+ business: "business";
98
+ startup: "startup";
99
+ finance: "finance";
100
+ crypto: "crypto";
101
+ marketplace: "marketplace";
102
+ retail: "retail";
103
+ real_estate: "real_estate";
104
+ agency: "agency";
105
+ landlord: "landlord";
106
+ cooperative: "cooperative";
107
+ architecture: "architecture";
108
+ technology: "technology";
109
+ software: "software";
110
+ ai: "ai";
111
+ security: "security";
112
+ automation: "automation";
113
+ science: "science";
114
+ education: "education";
115
+ books: "books";
116
+ health: "health";
117
+ fitness: "fitness";
118
+ sports: "sports";
119
+ gaming: "gaming";
120
+ music: "music";
121
+ film: "film";
122
+ podcast: "podcast";
123
+ art: "art";
124
+ photography: "photography";
125
+ comedy: "comedy";
126
+ food: "food";
127
+ travel: "travel";
128
+ fashion: "fashion";
129
+ home_garden: "home_garden";
130
+ diy: "diy";
131
+ automotive: "automotive";
132
+ animals: "animals";
133
+ family: "family";
134
+ nonprofit: "nonprofit";
135
+ government: "government";
136
+ activism: "activism";
137
+ environment: "environment";
138
+ religion: "religion";
139
+ other: "other";
140
+ }>>;
34
141
  /**
35
142
  * An account's name on the create/update wire.
36
143
  *
@@ -49,15 +156,7 @@ export declare const accountNameSchema: z.ZodOptional<z.ZodObject<{
49
156
  first: z.ZodOptional<z.ZodString>;
50
157
  last: z.ZodOptional<z.ZodString>;
51
158
  displayName: z.ZodOptional<z.ZodString>;
52
- }, "strip", z.ZodTypeAny, {
53
- first?: string | undefined;
54
- last?: string | undefined;
55
- displayName?: string | undefined;
56
- }, {
57
- first?: string | undefined;
58
- last?: string | undefined;
59
- displayName?: string | undefined;
60
- }>>;
159
+ }, z.core.$strip>>;
61
160
  /**
62
161
  * POST /accounts — create a non-personal account under the caller's tree.
63
162
  *
@@ -69,172 +168,81 @@ export declare const accountNameSchema: z.ZodOptional<z.ZodObject<{
69
168
  * accept categories would break that reasoning silently, so
70
169
  * `__tests__/accountGraph.test.ts` asserts every child kind is a category kind.
71
170
  */
72
- export declare const createAccountRequestSchema: z.ZodEffects<z.ZodObject<{
171
+ export declare const createAccountRequestSchema: z.ZodObject<{
73
172
  parentAccountId: z.ZodOptional<z.ZodString>;
74
- kind: z.ZodEnum<["organization", "project", "bot", "channel", "community"]>;
75
- /**
76
- * The SAME policy a person's handle is held to. `users.username` is one unique
77
- * index, so a managed account may not reserve a name a person could not ask
78
- * for — and this route's predecessor (`.min(1).max(100)` here, `^[\w.-]+$`
79
- * with no ceiling in the service) is how a one-character or dotted or
80
- * 100-character handle became reachable for bots alone.
81
- *
82
- * A `bot` is held to that AND to the label its handle must end in. That half
83
- * cannot live on this field — it depends on `kind`, a sibling — so it is in the
84
- * `superRefine` below, which reports its issue against this path.
85
- */
86
- username: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, string, string>;
173
+ kind: z.ZodEnum<{
174
+ organization: "organization";
175
+ project: "project";
176
+ bot: "bot";
177
+ channel: "channel";
178
+ community: "community";
179
+ }>;
180
+ username: z.ZodString;
87
181
  name: z.ZodOptional<z.ZodObject<{
88
182
  first: z.ZodOptional<z.ZodString>;
89
183
  last: z.ZodOptional<z.ZodString>;
90
184
  displayName: z.ZodOptional<z.ZodString>;
91
- }, "strip", z.ZodTypeAny, {
92
- first?: string | undefined;
93
- last?: string | undefined;
94
- displayName?: string | undefined;
95
- }, {
96
- first?: string | undefined;
97
- last?: string | undefined;
98
- displayName?: string | undefined;
99
- }>>;
185
+ }, z.core.$strip>>;
100
186
  bio: z.ZodOptional<z.ZodString>;
101
187
  avatar: z.ZodOptional<z.ZodString>;
102
188
  description: z.ZodOptional<z.ZodString>;
103
- /**
104
- * A named color preset KEY (`"blue"`, `"mint"`, …), never a hex value.
105
- *
106
- * Here at CREATION for the reason `isPrivateAccount` is, in miniature: for a
107
- * managed account the color is a visual identity, and an account that is
108
- * discoverable without one and acquires it on a second request is a face that
109
- * changes by itself. One statement, one row, born looking like what its owner
110
- * chose.
111
- *
112
- * The VALUE is checked in the API rather than here. The vocabulary is
113
- * `USER_COLOR_PRESETS`, which is declared next to the `users_color_check` CHECK
114
- * that is rendered from it — pinning the list a second time in this package
115
- * would be a second source of truth for what the database accepts, and the two
116
- * would drift apart silently. What this shape does is keep an over-long or
117
- * non-string value from reaching the service at all.
118
- */
119
189
  color: z.ZodOptional<z.ZodString>;
120
- /** Ordered, PRIMARY FIRST — see rule 2 above {@link ACCOUNT_CATEGORY_IDS}. */
121
- accountCategories: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodEnum<["news", "politics", "business", "startup", "finance", "crypto", "marketplace", "retail", "real_estate", "agency", "landlord", "cooperative", "architecture", "technology", "software", "ai", "security", "automation", "science", "education", "books", "health", "fitness", "sports", "gaming", "music", "film", "podcast", "art", "photography", "comedy", "food", "travel", "fashion", "home_garden", "diy", "automotive", "animals", "family", "nonprofit", "government", "community", "activism", "environment", "religion", "other"]>, "many">, ("community" | "news" | "politics" | "business" | "startup" | "finance" | "crypto" | "marketplace" | "retail" | "real_estate" | "agency" | "landlord" | "cooperative" | "architecture" | "technology" | "software" | "ai" | "security" | "automation" | "science" | "education" | "books" | "health" | "fitness" | "sports" | "gaming" | "music" | "film" | "podcast" | "art" | "photography" | "comedy" | "food" | "travel" | "fashion" | "home_garden" | "diy" | "automotive" | "animals" | "family" | "nonprofit" | "government" | "activism" | "environment" | "religion" | "other")[], ("community" | "news" | "politics" | "business" | "startup" | "finance" | "crypto" | "marketplace" | "retail" | "real_estate" | "agency" | "landlord" | "cooperative" | "architecture" | "technology" | "software" | "ai" | "security" | "automation" | "science" | "education" | "books" | "health" | "fitness" | "sports" | "gaming" | "music" | "film" | "podcast" | "art" | "photography" | "comedy" | "food" | "travel" | "fashion" | "home_garden" | "diy" | "automotive" | "animals" | "family" | "nonprofit" | "government" | "activism" | "environment" | "religion" | "other")[]>>;
122
- organizationType: z.ZodOptional<z.ZodEnum<["business", "nonprofit", "public_body", "community", "other"]>>;
123
- /**
124
- * Create the account already opted OUT of discovery.
125
- *
126
- * ## Why this belongs at CREATION and not only on the privacy route
127
- *
128
- * Every account is born discoverable: the column defaults to `false` and
129
- * nothing on the create path wrote it, so a new account appears in people
130
- * search the instant it exists. For a human signing themselves up that is the
131
- * right default and it is NOT changed here. For an account a program creates
132
- * on someone's behalf — an agent, an unlaunched project, an organization for
133
- * something not yet announced — it publishes the thing before its owner ever
134
- * decided to.
135
- *
136
- * The alternative is a second call right after create, which is a window in
137
- * which the account IS public, and a window whose closing depends on a second
138
- * request succeeding. A field here has neither: one statement, one row, born
139
- * in the state the caller asked for.
140
- *
141
- * ## It reuses the existing flag deliberately
142
- *
143
- * This is `privacy_is_private_account`, the same one `PUT /users/:id/privacy`
144
- * toggles — not a new "published" column. A second visibility flag would be a
145
- * second source of truth for one question, and the two would disagree.
146
- *
147
- * Inherited semantics, stated because reusing a flag means inheriting ALL of
148
- * it: the account is kept out of people search, out of the follow-graph lists
149
- * (`followers` / `following` / `mutuals`), out of `/similar` and out of the
150
- * recommendation candidate pools, and its non-public, non-unlisted media
151
- * becomes follower-gated. It does NOT hide the profile from someone who knows
152
- * the handle, and it carries NO follow-approval flow — following is immediate
153
- * and unilateral whatever this says, so nothing here creates a request queue
154
- * nobody attends.
155
- *
156
- * ## Not conditioned on `kind`, on purpose
157
- *
158
- * The same reasoning as `accountCategories` above: this object does not
159
- * refine on kind, and an unlaunched organization has exactly the problem an
160
- * unpublished agent does. The discovery predicate never reads `kind`, so the
161
- * remedy must not either.
162
- */
190
+ accountCategories: z.ZodOptional<z.ZodArray<z.ZodEnum<{
191
+ community: "community";
192
+ news: "news";
193
+ politics: "politics";
194
+ business: "business";
195
+ startup: "startup";
196
+ finance: "finance";
197
+ crypto: "crypto";
198
+ marketplace: "marketplace";
199
+ retail: "retail";
200
+ real_estate: "real_estate";
201
+ agency: "agency";
202
+ landlord: "landlord";
203
+ cooperative: "cooperative";
204
+ architecture: "architecture";
205
+ technology: "technology";
206
+ software: "software";
207
+ ai: "ai";
208
+ security: "security";
209
+ automation: "automation";
210
+ science: "science";
211
+ education: "education";
212
+ books: "books";
213
+ health: "health";
214
+ fitness: "fitness";
215
+ sports: "sports";
216
+ gaming: "gaming";
217
+ music: "music";
218
+ film: "film";
219
+ podcast: "podcast";
220
+ art: "art";
221
+ photography: "photography";
222
+ comedy: "comedy";
223
+ food: "food";
224
+ travel: "travel";
225
+ fashion: "fashion";
226
+ home_garden: "home_garden";
227
+ diy: "diy";
228
+ automotive: "automotive";
229
+ animals: "animals";
230
+ family: "family";
231
+ nonprofit: "nonprofit";
232
+ government: "government";
233
+ activism: "activism";
234
+ environment: "environment";
235
+ religion: "religion";
236
+ other: "other";
237
+ }>>>;
238
+ organizationType: z.ZodOptional<z.ZodEnum<{
239
+ community: "community";
240
+ business: "business";
241
+ nonprofit: "nonprofit";
242
+ other: "other";
243
+ public_body: "public_body";
244
+ }>>;
163
245
  isPrivateAccount: z.ZodOptional<z.ZodBoolean>;
164
- /**
165
- * The 3D avatar character of a `bot` — and ONLY of a bot (the refinement
166
- * below). Optional on the wire: a bot created without one is given a look
167
- * seeded from its handle (`avatarCharacterFor`), so every bot account has a
168
- * character from birth and the owner customizes it afterwards.
169
- */
170
- character: z.ZodOptional<z.ZodType<import("./avatarCharacter").AvatarCharacter, z.ZodTypeDef, unknown>>;
171
- }, "strip", z.ZodTypeAny, {
172
- kind: "organization" | "project" | "bot" | "channel" | "community";
173
- username: string;
174
- color?: string | undefined;
175
- name?: {
176
- first?: string | undefined;
177
- last?: string | undefined;
178
- displayName?: string | undefined;
179
- } | undefined;
180
- organizationType?: "community" | "business" | "nonprofit" | "other" | "public_body" | undefined;
181
- avatar?: string | undefined;
182
- parentAccountId?: string | undefined;
183
- bio?: string | undefined;
184
- description?: string | undefined;
185
- accountCategories?: ("community" | "news" | "politics" | "business" | "startup" | "finance" | "crypto" | "marketplace" | "retail" | "real_estate" | "agency" | "landlord" | "cooperative" | "architecture" | "technology" | "software" | "ai" | "security" | "automation" | "science" | "education" | "books" | "health" | "fitness" | "sports" | "gaming" | "music" | "film" | "podcast" | "art" | "photography" | "comedy" | "food" | "travel" | "fashion" | "home_garden" | "diy" | "automotive" | "animals" | "family" | "nonprofit" | "government" | "activism" | "environment" | "religion" | "other")[] | undefined;
186
- isPrivateAccount?: boolean | undefined;
187
- character?: import("./avatarCharacter").AvatarCharacter | undefined;
188
- }, {
189
- kind: "organization" | "project" | "bot" | "channel" | "community";
190
- username: string;
191
- color?: string | undefined;
192
- name?: {
193
- first?: string | undefined;
194
- last?: string | undefined;
195
- displayName?: string | undefined;
196
- } | undefined;
197
- organizationType?: "community" | "business" | "nonprofit" | "other" | "public_body" | undefined;
198
- avatar?: string | undefined;
199
- parentAccountId?: string | undefined;
200
- bio?: string | undefined;
201
- description?: string | undefined;
202
- accountCategories?: ("community" | "news" | "politics" | "business" | "startup" | "finance" | "crypto" | "marketplace" | "retail" | "real_estate" | "agency" | "landlord" | "cooperative" | "architecture" | "technology" | "software" | "ai" | "security" | "automation" | "science" | "education" | "books" | "health" | "fitness" | "sports" | "gaming" | "music" | "film" | "podcast" | "art" | "photography" | "comedy" | "food" | "travel" | "fashion" | "home_garden" | "diy" | "automotive" | "animals" | "family" | "nonprofit" | "government" | "activism" | "environment" | "religion" | "other")[] | undefined;
203
- isPrivateAccount?: boolean | undefined;
204
- character?: unknown;
205
- }>, {
206
- kind: "organization" | "project" | "bot" | "channel" | "community";
207
- username: string;
208
- color?: string | undefined;
209
- name?: {
210
- first?: string | undefined;
211
- last?: string | undefined;
212
- displayName?: string | undefined;
213
- } | undefined;
214
- organizationType?: "community" | "business" | "nonprofit" | "other" | "public_body" | undefined;
215
- avatar?: string | undefined;
216
- parentAccountId?: string | undefined;
217
- bio?: string | undefined;
218
- description?: string | undefined;
219
- accountCategories?: ("community" | "news" | "politics" | "business" | "startup" | "finance" | "crypto" | "marketplace" | "retail" | "real_estate" | "agency" | "landlord" | "cooperative" | "architecture" | "technology" | "software" | "ai" | "security" | "automation" | "science" | "education" | "books" | "health" | "fitness" | "sports" | "gaming" | "music" | "film" | "podcast" | "art" | "photography" | "comedy" | "food" | "travel" | "fashion" | "home_garden" | "diy" | "automotive" | "animals" | "family" | "nonprofit" | "government" | "activism" | "environment" | "religion" | "other")[] | undefined;
220
- isPrivateAccount?: boolean | undefined;
221
- character?: import("./avatarCharacter").AvatarCharacter | undefined;
222
- }, {
223
- kind: "organization" | "project" | "bot" | "channel" | "community";
224
- username: string;
225
- color?: string | undefined;
226
- name?: {
227
- first?: string | undefined;
228
- last?: string | undefined;
229
- displayName?: string | undefined;
230
- } | undefined;
231
- organizationType?: "community" | "business" | "nonprofit" | "other" | "public_body" | undefined;
232
- avatar?: string | undefined;
233
- parentAccountId?: string | undefined;
234
- bio?: string | undefined;
235
- description?: string | undefined;
236
- accountCategories?: ("community" | "news" | "politics" | "business" | "startup" | "finance" | "crypto" | "marketplace" | "retail" | "real_estate" | "agency" | "landlord" | "cooperative" | "architecture" | "technology" | "software" | "ai" | "security" | "automation" | "science" | "education" | "books" | "health" | "fitness" | "sports" | "gaming" | "music" | "film" | "podcast" | "art" | "photography" | "comedy" | "food" | "travel" | "fashion" | "home_garden" | "diy" | "automotive" | "animals" | "family" | "nonprofit" | "government" | "activism" | "environment" | "religion" | "other")[] | undefined;
237
- isPrivateAccount?: boolean | undefined;
238
- character?: unknown;
239
- }>;
246
+ character: z.ZodOptional<z.ZodType<import("./avatarCharacter").AvatarCharacter, unknown, z.core.$ZodTypeInternals<import("./avatarCharacter").AvatarCharacter, unknown>>>;
247
+ }, z.core.$strip>;
240
248
  export type CreateAccountRequest = z.infer<typeof createAccountRequestSchema>;
@@ -2,4 +2,4 @@ import { z } from 'zod';
2
2
  export { ACCOUNT_NAME_POLICY_BY_KIND, ACCOUNT_TITLE_DISALLOWED_SOURCE, ACCOUNT_TITLE_MAX_LENGTH, accountNamePolicyForKind, isPlainTextTitle, } from './client/accountName';
3
3
  export type { AccountNamePolicy } from './client/accountName';
4
4
  /** A non-personal account's title — see `./client/accountName.ts` for the policy. */
5
- export declare const accountTitleSchema: z.ZodEffects<z.ZodString, string, string>;
5
+ export declare const accountTitleSchema: z.ZodString;