@casual-simulation/aux-records 3.8.1 → 3.10.2

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 (239) hide show
  1. package/AIChatInterface.d.ts +7 -43
  2. package/AIChatInterface.js +8 -6
  3. package/AIChatInterface.js.map +1 -1
  4. package/AIController.js +44 -49
  5. package/AIController.js.map +1 -1
  6. package/AIOpenAIRealtimeInterface.d.ts +1 -1
  7. package/AnthropicAIChatInterface.js +4 -4
  8. package/AnthropicAIChatInterface.js.map +1 -1
  9. package/AuthController.d.ts +78 -10
  10. package/AuthController.js +230 -166
  11. package/AuthController.js.map +1 -1
  12. package/AuthStore.d.ts +317 -4
  13. package/BigIntPatch.d.ts +1 -0
  14. package/BigIntPatch.js +24 -0
  15. package/BigIntPatch.js.map +1 -0
  16. package/BlockadeLabsGenerateSkyboxInterface.js +4 -4
  17. package/BlockadeLabsGenerateSkyboxInterface.js.map +1 -1
  18. package/CachingConfigStore.d.ts +8 -1
  19. package/CachingConfigStore.js +50 -0
  20. package/CachingConfigStore.js.map +1 -1
  21. package/ComIdConfig.d.ts +132 -86
  22. package/ComIdConfig.js +5 -5
  23. package/ComIdConfig.js.map +1 -1
  24. package/ConfigurationStore.d.ts +1393 -3
  25. package/ConfigurationStore.js +49 -0
  26. package/ConfigurationStore.js.map +1 -1
  27. package/DataRecordsController.js +28 -28
  28. package/DataRecordsController.js.map +1 -1
  29. package/EventRecordsController.js +9 -9
  30. package/EventRecordsController.js.map +1 -1
  31. package/FileRecordsController.js +18 -17
  32. package/FileRecordsController.js.map +1 -1
  33. package/GoogleAIChatInterface.js +4 -4
  34. package/GoogleAIChatInterface.js.map +1 -1
  35. package/HttpTestUtils.d.ts +48 -0
  36. package/HttpTestUtils.js +256 -0
  37. package/HttpTestUtils.js.map +1 -0
  38. package/LivekitController.js +2 -2
  39. package/LivekitController.js.map +1 -1
  40. package/LoomController.js +3 -4
  41. package/LoomController.js.map +1 -1
  42. package/MemoryStore.d.ts +60 -7
  43. package/MemoryStore.js +427 -59
  44. package/MemoryStore.js.map +1 -1
  45. package/MetricsStore.d.ts +11 -0
  46. package/ModerationConfiguration.d.ts +11 -85
  47. package/ModerationConfiguration.js +17 -17
  48. package/ModerationConfiguration.js.map +1 -1
  49. package/ModerationController.js +9 -11
  50. package/ModerationController.js.map +1 -1
  51. package/OpenAIChatInterface.js +8 -13
  52. package/OpenAIChatInterface.js.map +1 -1
  53. package/OpenAIImageInterface.js +4 -5
  54. package/OpenAIImageInterface.js.map +1 -1
  55. package/PolicyController.js +66 -73
  56. package/PolicyController.js.map +1 -1
  57. package/PolicyStore.d.ts +59 -33
  58. package/PolicyStore.js +35 -1
  59. package/PolicyStore.js.map +1 -1
  60. package/PrivoClient.d.ts +3 -1
  61. package/PrivoClient.js +2 -4
  62. package/PrivoClient.js.map +1 -1
  63. package/PrivoConfiguration.d.ts +6 -72
  64. package/PrivoConfiguration.js +30 -31
  65. package/PrivoConfiguration.js.map +1 -1
  66. package/README.md +276 -2
  67. package/RateLimitController.js +2 -2
  68. package/RateLimitController.js.map +1 -1
  69. package/RecordsClient.d.ts +3 -1
  70. package/RecordsClient.js +6 -6
  71. package/RecordsClient.js.map +1 -1
  72. package/RecordsController.d.ts +145 -3
  73. package/RecordsController.js +399 -61
  74. package/RecordsController.js.map +1 -1
  75. package/RecordsServer.d.ts +1932 -1109
  76. package/RecordsStore.d.ts +99 -14
  77. package/RecordsStore.js +8 -10
  78. package/RecordsStore.js.map +1 -1
  79. package/ServerConfig.d.ts +698 -9867
  80. package/ServerConfig.js +457 -377
  81. package/ServerConfig.js.map +1 -1
  82. package/SloydInterface.js +1 -1
  83. package/SloydInterface.js.map +1 -1
  84. package/StabilityAIImageInterface.js +6 -9
  85. package/StabilityAIImageInterface.js.map +1 -1
  86. package/StripeInterface.d.ts +431 -287
  87. package/StripeInterface.js +21 -1
  88. package/StripeInterface.js.map +1 -1
  89. package/SubscriptionConfigBuilder.d.ts +10 -1
  90. package/SubscriptionConfigBuilder.js +72 -41
  91. package/SubscriptionConfigBuilder.js.map +1 -1
  92. package/SubscriptionConfiguration.d.ts +606 -6334
  93. package/SubscriptionConfiguration.js +460 -277
  94. package/SubscriptionConfiguration.js.map +1 -1
  95. package/SubscriptionController.d.ts +677 -4
  96. package/SubscriptionController.js +2986 -186
  97. package/SubscriptionController.js.map +1 -1
  98. package/SystemNotificationMessenger.d.ts +14 -70
  99. package/SystemNotificationMessenger.js +17 -20
  100. package/SystemNotificationMessenger.js.map +1 -1
  101. package/TestUtils.d.ts +18 -3
  102. package/TestUtils.js +84 -8
  103. package/TestUtils.js.map +1 -1
  104. package/TypeUtils.d.ts +991 -0
  105. package/TypeUtils.js +2 -0
  106. package/TypeUtils.js.map +1 -0
  107. package/Utils.d.ts +59 -0
  108. package/Utils.js +507 -3
  109. package/Utils.js.map +1 -1
  110. package/Validations.d.ts +24 -108
  111. package/Validations.js +62 -45
  112. package/Validations.js.map +1 -1
  113. package/ViewTemplateRenderer.d.ts +39 -0
  114. package/ViewTemplateRenderer.js +19 -0
  115. package/ViewTemplateRenderer.js.map +1 -0
  116. package/contracts/ContractRecordsController.d.ts +58 -0
  117. package/contracts/ContractRecordsController.js +144 -0
  118. package/contracts/ContractRecordsController.js.map +1 -0
  119. package/contracts/ContractRecordsStore.d.ts +285 -0
  120. package/contracts/ContractRecordsStore.js +19 -0
  121. package/contracts/ContractRecordsStore.js.map +1 -0
  122. package/contracts/MemoryContractRecordsStore.d.ts +27 -0
  123. package/contracts/MemoryContractRecordsStore.js +124 -0
  124. package/contracts/MemoryContractRecordsStore.js.map +1 -0
  125. package/contracts/index.d.ts +4 -0
  126. package/contracts/index.js +21 -0
  127. package/contracts/index.js.map +1 -0
  128. package/crud/CrudHelpers.d.ts +25 -26
  129. package/crud/CrudHelpers.js +1 -1
  130. package/crud/CrudHelpers.js.map +1 -1
  131. package/crud/CrudRecordsController.js +13 -16
  132. package/crud/CrudRecordsController.js.map +1 -1
  133. package/crud/CrudRecordsControllerTests.d.ts +2 -2
  134. package/crud/CrudRecordsControllerTests.js +605 -580
  135. package/crud/CrudRecordsControllerTests.js.map +1 -1
  136. package/crud/MemoryCrudRecordsStore.js +1 -2
  137. package/crud/MemoryCrudRecordsStore.js.map +1 -1
  138. package/crud/sub/MemorySubCrudRecordsStore.js +4 -6
  139. package/crud/sub/MemorySubCrudRecordsStore.js.map +1 -1
  140. package/crud/sub/SubCrudRecordsController.js +8 -8
  141. package/crud/sub/SubCrudRecordsController.js.map +1 -1
  142. package/database/DatabaseRecordsController.js +1 -2
  143. package/database/DatabaseRecordsController.js.map +1 -1
  144. package/database/SqliteDatabaseInterface.js +1 -2
  145. package/database/SqliteDatabaseInterface.js.map +1 -1
  146. package/dns/DNSDomainNameValidator.d.ts +11 -0
  147. package/dns/DNSDomainNameValidator.js +59 -0
  148. package/dns/DNSDomainNameValidator.js.map +1 -0
  149. package/dns/DomainNameValidator.d.ts +36 -0
  150. package/dns/DomainNameValidator.js +19 -0
  151. package/dns/DomainNameValidator.js.map +1 -0
  152. package/dns/index.d.ts +3 -0
  153. package/dns/index.js +20 -0
  154. package/dns/index.js.map +1 -0
  155. package/financial/FinancialController.d.ts +272 -0
  156. package/financial/FinancialController.js +762 -0
  157. package/financial/FinancialController.js.map +1 -0
  158. package/financial/FinancialInterface.d.ts +352 -0
  159. package/financial/FinancialInterface.js +642 -0
  160. package/financial/FinancialInterface.js.map +1 -0
  161. package/financial/FinancialStore.d.ts +186 -0
  162. package/financial/FinancialStore.js +19 -0
  163. package/financial/FinancialStore.js.map +1 -0
  164. package/financial/MemoryFinancialInterface.d.ts +23 -0
  165. package/financial/MemoryFinancialInterface.js +592 -0
  166. package/financial/MemoryFinancialInterface.js.map +1 -0
  167. package/financial/TigerBeetleFinancialInterface.d.ts +46 -0
  168. package/financial/TigerBeetleFinancialInterface.js +109 -0
  169. package/financial/TigerBeetleFinancialInterface.js.map +1 -0
  170. package/financial/TigerBeetleTestUtils.d.ts +40 -0
  171. package/financial/TigerBeetleTestUtils.js +185 -0
  172. package/financial/TigerBeetleTestUtils.js.map +1 -0
  173. package/financial/Types.d.ts +1 -0
  174. package/financial/Types.js +801 -0
  175. package/financial/Types.js.map +1 -0
  176. package/financial/index.d.ts +6 -0
  177. package/financial/index.js +24 -0
  178. package/financial/index.js.map +1 -0
  179. package/index.d.ts +4 -0
  180. package/index.js +3 -0
  181. package/index.js.map +1 -1
  182. package/notifications/NotificationRecordsController.js +14 -14
  183. package/notifications/NotificationRecordsController.js.map +1 -1
  184. package/notifications/WebPushInterface.d.ts +24 -155
  185. package/notifications/WebPushInterface.js +2 -2
  186. package/notifications/WebPushInterface.js.map +1 -1
  187. package/package.json +72 -70
  188. package/packages/version/MemoryPackageVersionRecordsStore.js +12 -15
  189. package/packages/version/MemoryPackageVersionRecordsStore.js.map +1 -1
  190. package/packages/version/PackageVersionRecordsController.d.ts +19 -0
  191. package/packages/version/PackageVersionRecordsController.js +102 -22
  192. package/packages/version/PackageVersionRecordsController.js.map +1 -1
  193. package/packages/version/PackageVersionRecordsStore.js +6 -8
  194. package/packages/version/PackageVersionRecordsStore.js.map +1 -1
  195. package/purchasable-items/MemoryPurchasableItemRecordsStore.d.ts +7 -0
  196. package/purchasable-items/MemoryPurchasableItemRecordsStore.js +33 -0
  197. package/purchasable-items/MemoryPurchasableItemRecordsStore.js.map +1 -0
  198. package/purchasable-items/PurchasableItemRecordsController.d.ts +16 -0
  199. package/purchasable-items/PurchasableItemRecordsController.js +72 -0
  200. package/purchasable-items/PurchasableItemRecordsController.js.map +1 -0
  201. package/purchasable-items/PurchasableItemRecordsStore.d.ts +66 -0
  202. package/purchasable-items/PurchasableItemRecordsStore.js +2 -0
  203. package/purchasable-items/PurchasableItemRecordsStore.js.map +1 -0
  204. package/purchasable-items/index.d.ts +4 -0
  205. package/purchasable-items/index.js +21 -0
  206. package/purchasable-items/index.js.map +1 -0
  207. package/queue/MemoryQueue.js +1 -1
  208. package/queue/MemoryQueue.js.map +1 -1
  209. package/search/MemorySearchInterface.js +1 -2
  210. package/search/MemorySearchInterface.js.map +1 -1
  211. package/search/SearchRecordsController.d.ts +66 -244
  212. package/search/SearchRecordsController.js +35 -36
  213. package/search/SearchRecordsController.js.map +1 -1
  214. package/search/SearchSyncProcessor.d.ts +7 -83
  215. package/search/TypesenseSearchInterface.js +8 -11
  216. package/search/TypesenseSearchInterface.js.map +1 -1
  217. package/tracing/TracingDecorators.js +5 -8
  218. package/tracing/TracingDecorators.js.map +1 -1
  219. package/webhooks/WebhookEnvironment.d.ts +36 -560
  220. package/webhooks/WebhookEnvironment.js +1 -1
  221. package/webhooks/WebhookEnvironment.js.map +1 -1
  222. package/webhooks/WebhookRecordsController.js +14 -16
  223. package/webhooks/WebhookRecordsController.js.map +1 -1
  224. package/websockets/MemoryLockStore.d.ts +18 -0
  225. package/websockets/MemoryLockStore.js +2 -0
  226. package/websockets/MemoryLockStore.js.map +1 -0
  227. package/websockets/MemoryTempInstRecordsStore.js +15 -27
  228. package/websockets/MemoryTempInstRecordsStore.js.map +1 -1
  229. package/websockets/MemoryWebsocketConnectionStore.js +6 -8
  230. package/websockets/MemoryWebsocketConnectionStore.js.map +1 -1
  231. package/websockets/MemoryWebsocketMessenger.js +1 -2
  232. package/websockets/MemoryWebsocketMessenger.js.map +1 -1
  233. package/websockets/SplitInstRecordsStore.js +2 -2
  234. package/websockets/SplitInstRecordsStore.js.map +1 -1
  235. package/websockets/WebsocketController.d.ts +5 -0
  236. package/websockets/WebsocketController.js +122 -83
  237. package/websockets/WebsocketController.js.map +1 -1
  238. package/RecordsServer.js +0 -6435
  239. package/RecordsServer.js.map +0 -1
package/ServerConfig.js CHANGED
@@ -20,118 +20,119 @@ import { notificationsSchema } from './SystemNotificationMessenger';
20
20
  import { privoSchema } from './PrivoConfiguration';
21
21
  import { subscriptionConfigSchema } from './SubscriptionConfiguration';
22
22
  import { z } from 'zod';
23
+ import { WEB_CONFIG_SCHEMA } from '@casual-simulation/aux-common';
24
+ import { WEB_MANIFEST_SCHEMA } from '@casual-simulation/aux-common/common/WebManifest';
23
25
  /**
24
26
  * The schema for the S3 configuration.
25
27
  */
26
28
  const s3Schema = z.object({
27
29
  region: z
28
30
  .string()
29
- .describe('The region of the file records and websocket message buckets.')
30
- .nonempty(),
31
+ .nonempty()
32
+ .describe('The region of the file records and websocket message buckets.'),
31
33
  filesBucket: z
32
34
  .string()
33
- .describe('The name of the bucket that file records should be placed in.')
34
- .nonempty(),
35
+ .nonempty()
36
+ .describe('The name of the bucket that file records should be placed in.'),
35
37
  defaultFilesBucket: z
36
38
  .string()
37
- .describe('The name of the bucket that file records were originally placed in. This is used for backwards compatibility for file records that were uploaded before changing the filesBucket was supported. If not specified, then filesBucket is used.')
38
39
  .nonempty()
39
- .optional(),
40
+ .optional()
41
+ .describe('The name of the bucket that file records were originally placed in. This is used for backwards compatibility for file records that were uploaded before changing the filesBucket was supported. If not specified, then filesBucket is used.'),
40
42
  filesStorageClass: z
41
43
  .string()
42
- .describe('The S3 File Storage Class that should be used for file records.')
43
- .nonempty(),
44
+ .nonempty()
45
+ .describe('The S3 File Storage Class that should be used for file records.'),
44
46
  publicFilesUrl: z
45
47
  .string()
48
+ .nonempty()
49
+ .optional()
46
50
  .describe('The URL that public files should be accessed at. If specified, then public file records will point to this URL instead of the default S3 URL. If not specified, then the default S3 URL will be used. ' +
47
51
  'Useful for adding CDN support for public files. Private file records are unaffected by this setting. ' +
48
- 'File Record URLs will be formatted as: "{publicFilesUrl}/{recordName}/{filename}".')
49
- .nonempty()
50
- .optional(),
52
+ 'File Record URLs will be formatted as: "{publicFilesUrl}/{recordName}/{filename}".'),
51
53
  messagesBucket: z
52
54
  .string()
53
- .describe('The name of the bucket that large websocket messages should be placed in.')
54
55
  .nonempty()
55
- .optional(),
56
+ .optional()
57
+ .describe('The name of the bucket that large websocket messages should be placed in.'),
56
58
  options: z
57
59
  .object({
58
60
  endpoint: z
59
61
  .string()
60
- .describe('The endpoint of the S3 API.')
61
62
  .nonempty()
62
- .optional(),
63
+ .optional()
64
+ .describe('The endpoint of the S3 API.'),
63
65
  s3ForcePathStyle: z
64
66
  .boolean()
65
- .describe('Wether to force the S3 client to use the path style API. Defaults to false.')
66
- .optional(),
67
+ .optional()
68
+ .describe('Wether to force the S3 client to use the path style API. Defaults to false.'),
67
69
  })
68
70
  .describe('Options for the S3 client.'),
69
71
  host: z
70
72
  .string()
71
- .describe('The S3 host that should be used for file record storage. If omitted, then the default S3 host will be used.')
72
73
  .nonempty()
73
- .optional(),
74
+ .optional()
75
+ .describe('The S3 host that should be used for file record storage. If omitted, then the default S3 host will be used.'),
74
76
  });
75
77
  const minioSchema = z.object({
76
78
  endpoint: z
77
79
  .string()
78
- .describe('The hostname or IP Address of the Minio server.')
79
- .min(1),
80
+ .min(1)
81
+ .describe('The hostname or IP Address of the Minio server.'),
80
82
  port: z
81
- .number()
82
- .describe('The port that the Minio server is running on. Defaults to 80 for non-SSL, and 443 for SSL.')
83
83
  .int()
84
84
  .positive()
85
- .optional(),
85
+ .optional()
86
+ .describe('The port that the Minio server is running on. Defaults to 80 for non-SSL, and 443 for SSL.'),
86
87
  useSSL: z
87
88
  .boolean()
88
- .describe('Whether to use SSL when connecting to the Minio server. Defaults to true.')
89
89
  .optional()
90
- .default(true),
90
+ .prefault(true)
91
+ .describe('Whether to use SSL when connecting to the Minio server. Defaults to true.'),
91
92
  accessKey: z
92
93
  .string()
93
- .describe('The access key that should be used to connect to the Minio server.')
94
- .min(1),
94
+ .min(1)
95
+ .describe('The access key that should be used to connect to the Minio server.'),
95
96
  secretKey: z
96
97
  .string()
97
- .describe('The secret key that should be used to connect to the Minio server.')
98
- .min(1),
98
+ .min(1)
99
+ .describe('The secret key that should be used to connect to the Minio server.'),
99
100
  region: z
100
101
  .string()
101
- .describe('The region of the file records and websocket message buckets.')
102
102
  .min(1)
103
103
  .optional()
104
- .default('us-east-1'),
104
+ .prefault('us-east-1')
105
+ .describe('The region of the file records and websocket message buckets.'),
105
106
  filesBucket: z
106
107
  .string()
107
- .describe('The name of the bucket that file records should be placed in.')
108
- .min(1),
108
+ .min(1)
109
+ .describe('The name of the bucket that file records should be placed in.'),
109
110
  defaultFilesBucket: z
110
111
  .string()
111
- .describe('The name of the bucket that file records were originally placed in. This is used for backwards compatibility for file records that were uploaded before changing the filesBucket was supported. If not specified, then filesBucket is used.')
112
112
  .min(1)
113
- .optional(),
113
+ .optional()
114
+ .describe('The name of the bucket that file records were originally placed in. This is used for backwards compatibility for file records that were uploaded before changing the filesBucket was supported. If not specified, then filesBucket is used.'),
114
115
  publicFilesUrl: z
115
116
  .string()
117
+ .nonempty()
118
+ .optional()
116
119
  .describe('The URL that public files should be accessed at. If specified, then public file records will point to this URL instead of the default S3 URL. If not specified, then the default URL will be used. ' +
117
120
  'Useful for adding CDN support for public files. Private file records are unaffected by this setting. ' +
118
- 'File Record URLs will be formatted as: "{publicFilesUrl}/{recordName}/{filename}".')
119
- .nonempty()
120
- .optional(),
121
+ 'File Record URLs will be formatted as: "{publicFilesUrl}/{recordName}/{filename}".'),
121
122
  messagesBucket: z
122
123
  .string()
123
- .describe('The name of the bucket that large websocket messages should be placed in.')
124
124
  .min(1)
125
- .optional(),
125
+ .optional()
126
+ .describe('The name of the bucket that large websocket messages should be placed in.'),
126
127
  });
127
128
  const typesenseSchema = z.object({
128
129
  nodes: z
129
130
  .array(z.object({
130
131
  host: z
131
132
  .string()
132
- .describe('The host of the Typesense node.')
133
- .min(1),
134
- port: z.number().int().min(1).optional(),
133
+ .min(1)
134
+ .describe('The host of the Typesense node.'),
135
+ port: z.int().min(1).optional(),
135
136
  protocol: z.enum(['http', 'https']).optional(),
136
137
  }))
137
138
  .min(1),
@@ -141,54 +142,54 @@ const typesenseSchema = z.object({
141
142
  const livekitSchema = z.object({
142
143
  apiKey: z
143
144
  .string()
144
- .describe('The API Key for Livekit.')
145
145
  .nonempty()
146
- .nullable(),
146
+ .nullable()
147
+ .describe('The API Key for Livekit.'),
147
148
  secretKey: z
148
149
  .string()
149
- .describe('The secret key for Livekit.')
150
150
  .nonempty()
151
- .nullable(),
151
+ .nullable()
152
+ .describe('The secret key for Livekit.'),
152
153
  endpoint: z
153
154
  .string()
154
- .describe('The URL that the Livekit server is publicly available at.')
155
155
  .nonempty()
156
- .nullable(),
156
+ .nullable()
157
+ .describe('The URL that the Livekit server is publicly available at.'),
157
158
  });
158
159
  const textItSchema = z.object({
159
160
  apiKey: z
160
161
  .string()
161
- .describe('The API Key for TextIt.')
162
162
  .nonempty()
163
- .nullable(),
163
+ .nullable()
164
+ .describe('The API Key for TextIt.'),
164
165
  flowId: z
165
166
  .string()
166
- .describe('The ID of the flow that should be triggered for sending login codes.')
167
167
  .nonempty()
168
- .nullable(),
168
+ .nullable()
169
+ .describe('The ID of the flow that should be triggered for sending login codes.'),
169
170
  });
170
171
  const sesContentSchema = z.discriminatedUnion('type', [
171
172
  z.object({
172
173
  type: z.literal('template'),
173
174
  templateArn: z
174
175
  .string()
175
- .describe('The ARN of the SES email template that should be used.')
176
- .nonempty(),
176
+ .nonempty()
177
+ .describe('The ARN of the SES email template that should be used.'),
177
178
  }),
178
179
  z.object({
179
180
  type: z.literal('plain'),
180
- subject: z.string().describe('The subject of the email.').nonempty(),
181
+ subject: z.string().nonempty().describe('The subject of the email.'),
181
182
  body: z
182
183
  .string()
183
- .describe('The body of the email. Use double curly-braces {{variable}} to insert variables.')
184
- .nonempty(),
184
+ .nonempty()
185
+ .describe('The body of the email. Use double curly-braces {{variable}} to insert variables.'),
185
186
  }),
186
187
  ]);
187
188
  const sesSchema = z.object({
188
189
  fromAddress: z
189
190
  .string()
190
- .describe('The email address that SES messages should be sent from.')
191
- .nonempty(),
191
+ .nonempty()
192
+ .describe('The email address that SES messages should be sent from.'),
192
193
  content: sesContentSchema.describe('The content that should be sent in login codes in emails.'),
193
194
  });
194
195
  const expireModeSchema = z.union([
@@ -201,269 +202,268 @@ const expireModeSchema = z.union([
201
202
  const redisServerSchema = z.object({
202
203
  url: z
203
204
  .string()
204
- .describe('The Redis connection URL that should be used. If omitted, then host, port, and password must be provided.')
205
205
  .nonempty()
206
- .optional(),
206
+ .optional()
207
+ .describe('The Redis connection URL that should be used. If omitted, then host, port, and password must be provided.'),
207
208
  host: z
208
209
  .string()
209
- .describe('The host that the redis client should connect to. Ignored if url is provided.')
210
210
  .nonempty()
211
- .optional(),
211
+ .optional()
212
+ .describe('The host that the redis client should connect to. Ignored if url is provided.'),
212
213
  port: z
213
214
  .number()
214
- .describe('The port that the redis client should connect to. Ignored if url is provided.')
215
- .optional(),
215
+ .optional()
216
+ .describe('The port that the redis client should connect to. Ignored if url is provided.'),
216
217
  password: z
217
218
  .string()
218
- .describe('The password that the redis client should use. Ignored if url is provided.')
219
219
  .nonempty()
220
- .optional(),
220
+ .optional()
221
+ .describe('The password that the redis client should use. Ignored if url is provided.'),
221
222
  tls: z
222
223
  .boolean()
223
- .describe('Whether to use TLS for connecting to the Redis server. Ignored if url is provided.')
224
- .optional(),
224
+ .optional()
225
+ .describe('Whether to use TLS for connecting to the Redis server. Ignored if url is provided.'),
225
226
  });
226
227
  const redisSchema = z.object({
227
228
  url: z
228
229
  .string()
229
- .describe('The Redis connection URL that should be used. If omitted, then host, port, and password must be provided.')
230
230
  .nonempty()
231
- .optional(),
231
+ .optional()
232
+ .describe('The Redis connection URL that should be used. If omitted, then host, port, and password must be provided.'),
232
233
  host: z
233
234
  .string()
234
- .describe('The host that the redis client should connect to. Ignored if url is provided.')
235
235
  .nonempty()
236
- .optional(),
236
+ .optional()
237
+ .describe('The host that the redis client should connect to. Ignored if url is provided.'),
237
238
  port: z
238
239
  .number()
239
- .describe('The port that the redis client should connect to. Ignored if url is provided.')
240
- .optional(),
240
+ .optional()
241
+ .describe('The port that the redis client should connect to. Ignored if url is provided.'),
241
242
  password: z
242
243
  .string()
243
- .describe('The password that the redis client should use. Ignored if url is provided.')
244
244
  .nonempty()
245
- .optional(),
245
+ .optional()
246
+ .describe('The password that the redis client should use. Ignored if url is provided.'),
246
247
  tls: z
247
248
  .boolean()
248
- .describe('Whether to use TLS for connecting to the Redis server. Ignored if url is provided.')
249
- .optional(),
249
+ .optional()
250
+ .describe('Whether to use TLS for connecting to the Redis server. Ignored if url is provided.'),
250
251
  servers: z
251
252
  .object({
252
253
  instData: redisServerSchema
253
- .describe('The Redis server that should be used for storage of temporary inst data. If omitted, then the default server will be used.')
254
- .optional(),
254
+ .optional()
255
+ .describe('The Redis server that should be used for storage of temporary inst data. If omitted, then the default server will be used.'),
255
256
  websocketConnections: redisServerSchema
256
- .describe('The Redis server that should be used for storage of websocket connections. If omitted, then the default server will be used.')
257
- .optional(),
257
+ .optional()
258
+ .describe('The Redis server that should be used for storage of websocket connections. If omitted, then the default server will be used.'),
258
259
  caches: redisServerSchema
259
- .describe('The Redis server that should be used for the caches. If omitted, then the default server will be used.')
260
- .optional(),
260
+ .optional()
261
+ .describe('The Redis server that should be used for the caches. If omitted, then the default server will be used.'),
261
262
  rateLimit: redisServerSchema
262
- .describe('The Redis server that should be used for rate limits. If omitted, then the default server will be used.')
263
- .optional(),
263
+ .optional()
264
+ .describe('The Redis server that should be used for rate limits. If omitted, then the default server will be used.'),
264
265
  pubSub: redisServerSchema
265
- .describe('The Redis server that should be used for pubsub. If omitted, then the default server will be used.')
266
- .optional(),
266
+ .optional()
267
+ .describe('The Redis server that should be used for pubsub. If omitted, then the default server will be used.'),
267
268
  bullmq: redisServerSchema
268
- .describe('The Redis server that should be used for BullMQ. If omitted, then the default server will be used.')
269
- .optional(),
269
+ .optional()
270
+ .describe('The Redis server that should be used for BullMQ. If omitted, then the default server will be used.'),
270
271
  })
271
- .describe('The Redis servers that should be used for specific categories of data. If omitted, then the default server will be used.')
272
- .default({}),
272
+ .prefault({})
273
+ .describe('The Redis servers that should be used for specific categories of data. If omitted, then the default server will be used.'),
273
274
  rateLimitPrefix: z
274
275
  .string()
275
- .describe('The namespace that rate limit counters are stored under. If omitted, then redis rate limiting is not possible.')
276
276
  .nonempty()
277
- .optional(),
277
+ .optional()
278
+ .describe('The namespace that rate limit counters are stored under. If omitted, then redis rate limiting is not possible.'),
278
279
  websocketRateLimitPrefix: z
279
280
  .string()
280
- .describe('The namespace that websocket rate limit counters are stored under. If omitted, then the rateLimitPrefix is used.')
281
281
  .nonempty()
282
- .optional(),
282
+ .optional()
283
+ .describe('The namespace that websocket rate limit counters are stored under. If omitted, then the rateLimitPrefix is used.'),
283
284
  websocketConnectionNamespace: z
284
285
  .string()
285
- .describe('The namespace that websocket connections are stored under. If omitted, then redis inst records are not possible.')
286
- .optional(),
286
+ .optional()
287
+ .describe('The namespace that websocket connections are stored under. If omitted, then redis inst records are not possible.'),
287
288
  instRecordsStoreNamespace: z
288
289
  .string()
289
- .describe('The namespace that inst records are stored under. If omitted, then redis inst records are not possible.')
290
- .optional(),
290
+ .optional()
291
+ .describe('The namespace that inst records are stored under. If omitted, then redis inst records are not possible.'),
291
292
  publicInstRecordsLifetimeSeconds: z
292
293
  .number()
293
- .describe('The lifetime of public inst records in seconds. If null, then public inst records never expire. Defaults to 1 day in seconds (86,400)')
294
294
  .positive()
295
295
  .nullable()
296
296
  .optional()
297
- .default(60 * 60 * 24),
297
+ .prefault(60 * 60 * 24)
298
+ .describe('The lifetime of public inst records in seconds. If null, then public inst records never expire. Defaults to 1 day in seconds (86,400)'),
298
299
  publicInstRecordsLifetimeExpireMode: expireModeSchema
299
- .describe('The Redis expire mode that should be used for public inst records. Defaults to NX. If null, then the expiration will update every time the inst data is updated. Only supported on Redis 7+. If set to something not null on Redis 6, then errors will occur.')
300
300
  .optional()
301
- .default('NX'),
301
+ .prefault('NX')
302
+ .describe('The Redis expire mode that should be used for public inst records. Defaults to NX. If null, then the expiration will update every time the inst data is updated. Only supported on Redis 7+. If set to something not null on Redis 6, then errors will occur.'),
302
303
  tempInstRecordsStoreNamespace: z
303
304
  .string()
304
- .describe('The namespace that temporary inst records are stored under (e.g. tempShared space). If omitted, then redis inst records are not possible.')
305
- .optional(),
305
+ .optional()
306
+ .describe('The namespace that temporary inst records are stored under (e.g. tempShared space). If omitted, then redis inst records are not possible.'),
306
307
  tempInstRecordsLifetimeSeconds: z
307
308
  .number()
308
- .describe('The lifetime of temporary inst records data in seconds (e.g. tempShared space). Intended to clean up temporary branches that have not been changed for some amount of time. If null, then temporary inst branches never expire. Defaults to 24 hours.')
309
309
  .positive()
310
310
  .nullable()
311
311
  .optional()
312
- .default(60 * 60 * 24),
312
+ .prefault(60 * 60 * 24)
313
+ .describe('The lifetime of temporary inst records data in seconds (e.g. tempShared space). Intended to clean up temporary branches that have not been changed for some amount of time. If null, then temporary inst branches never expire. Defaults to 24 hours.'),
313
314
  tempInstRecordsLifetimeExpireMode: expireModeSchema
314
- .describe('The Redis expire mode that should be used for temporary inst branches (e.g. tempShared space). Defaults to null. If null, then the expiration will not have a mode. Only supported on Redis 7+. If set to something not null on Redis 6, then errors will occur.')
315
315
  .optional()
316
- .default(null),
316
+ .prefault(null)
317
+ .describe('The Redis expire mode that should be used for temporary inst branches (e.g. tempShared space). Defaults to null. If null, then the expiration will not have a mode. Only supported on Redis 7+. If set to something not null on Redis 6, then errors will occur.'),
317
318
  // The number of seconds that authorizations for repo/add_updates permissions (inst.read and inst.updateData) are cached for.
318
319
  // Because repo/add_updates is a very common permission, we periodically cache permissions to avoid hitting the database too often.
319
320
  // 5 minutes by default
320
321
  connectionAuthorizationCacheSeconds: z
321
322
  .number()
322
- .describe(`The number of seconds that authorizations for repo/add_updates permissions (inst.read and inst.updateData) are cached for.
323
- Because repo/add_updates is a very common permission, we periodically cache permissions to avoid hitting the database too often. Defaults to 5 minutes.`)
324
323
  .positive()
325
- .default(300),
324
+ .prefault(300)
325
+ .describe(`The number of seconds that authorizations for repo/add_updates permissions (inst.read and inst.updateData) are cached for.
326
+ Because repo/add_updates is a very common permission, we periodically cache permissions to avoid hitting the database too often. Defaults to 5 minutes.`),
326
327
  cacheNamespace: z
327
328
  .string()
328
- .describe('The namespace for cached items. (policies & configuration) Defaults to "/cache". Set to null to disable caching of policies and configuration.')
329
329
  .nonempty()
330
330
  .nullable()
331
331
  .optional()
332
- .default('/cache'),
332
+ .prefault('/cache')
333
+ .describe('The namespace for cached items. (policies & configuration) Defaults to "/cache". Set to null to disable caching of policies and configuration.'),
333
334
  connectionExpireSeconds: z
334
335
  .number()
335
- .describe('The maximum lifetime of websocket connections in seconds. Intended to clean up any keys under websocketConnectionNamespace that have not been changed after an amount of time. It is recomended to set this longer than the maximum websocket connection length. Defaults to 3 hours. Set to null to disable.')
336
336
  .positive()
337
337
  .optional()
338
338
  .nullable()
339
- .default(60 * 60 * 3),
339
+ .prefault(60 * 60 * 3)
340
+ .describe('The maximum lifetime of websocket connections in seconds. Intended to clean up any keys under websocketConnectionNamespace that have not been changed after an amount of time. It is recomended to set this longer than the maximum websocket connection length. Defaults to 3 hours. Set to null to disable.'),
340
341
  connectionExpireMode: expireModeSchema
341
- .describe('The Redis expire mode that should be used for connections. Defaults to null. If null, then the expiration will not have a mode. Only supported on Redis 7+. If set to something not null on Redis 6, then errors will occur.')
342
342
  .optional()
343
- .default(null),
343
+ .prefault(null)
344
+ .describe('The Redis expire mode that should be used for connections. Defaults to null. If null, then the expiration will not have a mode. Only supported on Redis 7+. If set to something not null on Redis 6, then errors will occur.'),
344
345
  pubSubNamespace: z
345
346
  .string()
346
- .describe('The namespace that should be used for pubsub subscriptions. Defaults to "pubsub". If set to null, then pubsub is disabled.')
347
347
  .nullable()
348
348
  .optional()
349
- .default('pubsub'),
349
+ .prefault('pubsub')
350
+ .describe('The namespace that should be used for pubsub subscriptions. Defaults to "pubsub". If set to null, then pubsub is disabled.'),
350
351
  });
351
352
  const rateLimitSchema = z.object({
352
353
  maxHits: z
353
354
  .number()
354
- .describe('The maximum number of hits allowed from a single IP Address within the window.')
355
- .positive(),
355
+ .positive()
356
+ .describe('The maximum number of hits allowed from a single IP Address within the window.'),
356
357
  windowMs: z
357
358
  .number()
358
- .describe('The size of the window in miliseconds.')
359
- .positive(),
359
+ .positive()
360
+ .describe('The size of the window in miliseconds.'),
360
361
  });
361
362
  const stripeSchema = z.object({
362
363
  secretKey: z
363
364
  .string()
364
- .describe('The Stripe secret key that should be used.')
365
- .nonempty(),
365
+ .nonempty()
366
+ .describe('The Stripe secret key that should be used.'),
366
367
  publishableKey: z
367
368
  .string()
368
- .describe('The Stripe publishable key that should be used.')
369
- .nonempty(),
369
+ .nonempty()
370
+ .describe('The Stripe publishable key that should be used.'),
370
371
  testClock: z
371
372
  .string()
372
- .describe('The stripe test clock that should be used.')
373
373
  .nonempty()
374
- .optional(),
374
+ .optional()
375
+ .describe('The stripe test clock that should be used.'),
375
376
  });
376
377
  const mongodbSchema = z.object({
377
378
  url: z
378
379
  .string()
379
- .describe('The MongoDB URL that should be used to connect to MongoDB.')
380
- .nonempty(),
380
+ .nonempty()
381
+ .describe('The MongoDB URL that should be used to connect to MongoDB.'),
381
382
  useNewUrlParser: z
382
383
  .boolean()
383
- .describe('Whether to use the new URL parser. Defaults to false.')
384
384
  .optional()
385
- .default(false),
385
+ .prefault(false)
386
+ .describe('Whether to use the new URL parser. Defaults to false.'),
386
387
  database: z
387
388
  .string()
388
- .describe('The database that should be used.')
389
- .nonempty(),
389
+ .nonempty()
390
+ .describe('The database that should be used.'),
390
391
  fileUploadUrl: z
391
392
  .string()
392
- .describe('The URL that files records need to be uploaded to.')
393
393
  .nonempty()
394
- .optional(),
394
+ .optional()
395
+ .describe('The URL that files records need to be uploaded to.'),
395
396
  });
396
397
  const prismaSchema = z.object({
397
398
  options: z
398
- .object({})
399
- .describe('Generic options that should be passed to the Prisma client constructor.')
400
- .passthrough()
401
- .optional(),
399
+ .looseObject({})
400
+ .optional()
401
+ .describe('Generic options that should be passed to the Prisma client constructor.'),
402
402
  db: z
403
403
  .enum(['cockroachdb', 'sqlite'])
404
- .describe('The database type to use with Prisma. Defaults to "cockroachdb".')
405
- .default('cockroachdb'),
404
+ .prefault('cockroachdb')
405
+ .describe('The database type to use with Prisma. Defaults to "cockroachdb".'),
406
406
  policiesCacheSeconds: z
407
407
  .number()
408
- .describe('The number of seconds that policies are cached for. Defaults to 60 seconds. Set to null to disable caching of policies.')
409
408
  .positive()
410
409
  .nullable()
411
410
  .optional()
412
- .default(60),
411
+ .prefault(60)
412
+ .describe('The number of seconds that policies are cached for. Defaults to 60 seconds. Set to null to disable caching of policies.'),
413
413
  configurationCacheSeconds: z
414
414
  .number()
415
- .describe('The number of seconds that configuration items are cached for. Defaults to 60 seconds. Set to null to disable caching of configuration items.')
416
415
  .positive()
417
416
  .nullable()
418
417
  .optional()
419
- .default(60 * 60 * 24), // 24 hours in seconds,
418
+ .prefault(60 * 60 * 24) // 24 hours in seconds,
419
+ .describe('The number of seconds that configuration items are cached for. Defaults to 60 seconds. Set to null to disable caching of configuration items.'),
420
420
  });
421
421
  const openAiSchema = z.object({
422
422
  apiKey: z
423
423
  .string()
424
- .describe('The OpenAI API Key that should be used.')
425
- .nonempty(),
424
+ .nonempty()
425
+ .describe('The OpenAI API Key that should be used.'),
426
426
  });
427
427
  const googleAiSchema = z.object({
428
428
  apiKey: z
429
429
  .string()
430
- .describe('The Google AI API Key that should be used.')
431
- .nonempty(),
430
+ .nonempty()
431
+ .describe('The Google AI API Key that should be used.'),
432
432
  });
433
433
  const anthropicAiSchema = z.object({
434
434
  apiKey: z
435
435
  .string()
436
- .describe('The Anthropic AI API Key that should be used.')
437
- .min(1),
436
+ .min(1)
437
+ .describe('The Anthropic AI API Key that should be used.'),
438
438
  });
439
439
  const blockadeLabsSchema = z.object({
440
440
  apiKey: z
441
441
  .string()
442
- .describe('The Blockade Labs API Key that should be used.')
443
- .nonempty(),
442
+ .nonempty()
443
+ .describe('The Blockade Labs API Key that should be used.'),
444
444
  });
445
445
  const stabilityAiSchema = z.object({
446
446
  apiKey: z
447
447
  .string()
448
- .describe('The StabilityAI API Key that should be used.')
449
- .nonempty(),
448
+ .nonempty()
449
+ .describe('The StabilityAI API Key that should be used.'),
450
450
  });
451
451
  const humeAiSchema = z.object({
452
452
  apiKey: z
453
453
  .string()
454
- .describe('The Hume AI API Key that should be used.')
455
- .min(1),
454
+ .min(1)
455
+ .describe('The Hume AI API Key that should be used.'),
456
456
  secretKey: z
457
457
  .string()
458
- .describe('The Hume AI Secret Key that should be used.')
459
- .min(1),
458
+ .min(1)
459
+ .describe('The Hume AI Secret Key that should be used.'),
460
460
  });
461
461
  const sloydAiSchema = z.object({
462
- clientId: z.string().describe('The client ID for the Sloyd AI API.').min(1),
462
+ clientId: z.string().min(1).describe('The client ID for the Sloyd AI API.'),
463
463
  clientSecret: z
464
464
  .string()
465
- .describe('The client secret for the Sloyd AI API.')
466
- .min(1),
465
+ .min(1)
466
+ .describe('The client secret for the Sloyd AI API.'),
467
467
  });
468
468
  const aiSchema = z.object({
469
469
  chat: z
@@ -473,16 +473,16 @@ const aiSchema = z.object({
473
473
  .describe('The provider that should be used by default for Chat AI request models that dont have an associated provider. If you want to point to a custom provider, then use the name for the provider.'),
474
474
  defaultModel: z
475
475
  .string()
476
- .describe('The model that should be used for Chat AI requests when one is not specified.')
477
- .nonempty(),
476
+ .nonempty()
477
+ .describe('The model that should be used for Chat AI requests when one is not specified.'),
478
478
  allowedModels: z
479
479
  .array(z.union([
480
- z.string().nonempty(),
480
+ z.string(),
481
481
  z.object({
482
482
  provider: z
483
483
  .enum(['openai', 'google', 'anthropic'])
484
484
  .optional(),
485
- model: z.string().nonempty(),
485
+ model: z.string(),
486
486
  }),
487
487
  z.object({
488
488
  provider: z
@@ -490,112 +490,103 @@ const aiSchema = z.object({
490
490
  .describe('Defines that the provider points to a custom implementation of the OpenAI Completions API'),
491
491
  name: z
492
492
  .string()
493
- .describe('The name that should be used for this provider')
494
- .nonempty()
495
- .default('custom-openai-completions'),
493
+ .prefault('custom-openai-completions')
494
+ .describe('The name that should be used for this provider'),
496
495
  apiKey: z
497
496
  .string()
498
- .describe('The API key that should be used to communicate with the custom API.')
499
- .nonempty(),
497
+ .describe('The API key that should be used to communicate with the custom API.'),
500
498
  baseUrl: z
501
499
  .string()
502
- .describe('The endpoint that should be used to communicate with the custom API. (e.g. "https://api.openai.com/v1/" for OpenAIs API)')
503
- .nonempty(),
500
+ .describe('The endpoint that should be used to communicate with the custom API. (e.g. "https://api.openai.com/v1/" for OpenAIs API)'),
504
501
  models: z
505
- .array(z.string().nonempty())
502
+ .array(z.string())
506
503
  .describe('The list of models that should be mapped to this provider'),
507
504
  additionalProperties: z
508
- .object({})
509
- .passthrough()
510
- .describe('The additional properties that should be included in requests.')
511
- .optional(),
505
+ .looseObject({})
506
+ .optional()
507
+ .describe('The additional properties that should be included in requests.'),
512
508
  }),
513
509
  ]))
510
+ .min(1)
514
511
  .describe('The list of models that are allowed to be used for Chat AI requets.'),
515
512
  allowedSubscriptionTiers: z
516
- .union([z.literal(true), z.array(z.string().nonempty())])
513
+ .union([z.literal(true), z.array(z.string())])
517
514
  .describe('The subscription tiers that are allowed to use Chat AI. If true, then all tiers are allowed.'),
518
515
  tokenModifierRatio: z
519
516
  .record(z.string(), z.number().positive())
520
- .describe('Custom token modifier ratio per model. The key is the model name and the value is the cost multiplier.')
521
517
  .optional()
522
- .default({}),
518
+ .prefault({})
519
+ .describe('Custom token modifier ratio per model. The key is the model name and the value is the cost multiplier.'),
523
520
  })
524
- .describe('Options for Chat AI. If omitted, then chat AI is disabled.')
525
- .optional(),
521
+ .optional()
522
+ .describe('Options for Chat AI. If omitted, then chat AI is disabled.'),
526
523
  generateSkybox: z
527
524
  .object({
528
525
  provider: z
529
526
  .literal('blockadeLabs')
530
527
  .describe('The provider that should be used for Skybox Generation AI requests.'),
531
528
  allowedSubscriptionTiers: z
532
- .union([z.literal(true), z.array(z.string().nonempty())])
529
+ .union([z.literal(true), z.array(z.string())])
533
530
  .describe('The subscription tiers that are allowed to use Skybox AI. If true, then all tiers are allowed.'),
534
531
  })
535
- .describe('Options for Skybox Generation AI. If omitted, then Skybox AI is disabled.')
536
- .optional(),
532
+ .optional()
533
+ .describe('Options for Skybox Generation AI. If omitted, then Skybox AI is disabled.'),
537
534
  images: z
538
535
  .object({
539
536
  defaultModel: z
540
537
  .string()
541
- .describe('The model that should be used for Image AI requests when one is not specified.')
542
- .nonempty(),
538
+ .nonempty()
539
+ .describe('The model that should be used for Image AI requests when one is not specified.'),
543
540
  defaultWidth: z
544
- .number()
545
- .describe('The default width of generated images.')
546
541
  .int()
547
- .positive(),
542
+ .positive()
543
+ .describe('The default width of generated images.'),
548
544
  defaultHeight: z
549
- .number()
550
- .describe('The default height of generated images.')
551
545
  .int()
552
- .positive(),
546
+ .positive()
547
+ .describe('The default height of generated images.'),
553
548
  maxWidth: z
554
- .number()
555
- .describe('The maximum width of generated images. If omitted, then the max width is controlled by the model.')
556
549
  .int()
557
550
  .positive()
558
- .optional(),
551
+ .optional()
552
+ .describe('The maximum width of generated images. If omitted, then the max width is controlled by the model.'),
559
553
  maxHeight: z
560
- .number()
561
- .describe('The maximum height of generated images. If omitted, then the max height is controlled by the model.')
562
554
  .int()
563
555
  .positive()
564
- .optional(),
556
+ .optional()
557
+ .describe('The maximum height of generated images. If omitted, then the max height is controlled by the model.'),
565
558
  maxSteps: z
566
- .number()
567
- .describe('The maximum number of steps that can be used to generate an image. If omitted, then the max steps is controlled by the model.')
568
559
  .int()
569
560
  .positive()
570
- .optional(),
561
+ .optional()
562
+ .describe('The maximum number of steps that can be used to generate an image. If omitted, then the max steps is controlled by the model.'),
571
563
  maxImages: z
572
- .number()
573
- .describe('The maximum number of images that can be generated in a single request. If omitted, then the max images is controlled by the model.')
574
564
  .int()
575
565
  .positive()
576
- .optional(),
566
+ .optional()
567
+ .describe('The maximum number of images that can be generated in a single request. If omitted, then the max images is controlled by the model.'),
577
568
  allowedModels: z
578
569
  .object({
579
570
  openai: z
580
- .array(z.string().nonempty())
581
- .describe('The list of OpenAI DALL-E models that are allowed to be used. If omitted, then no OpenAI models are allowed.')
582
- .optional(),
571
+ .array(z.string())
572
+ .optional()
573
+ .describe('The list of OpenAI DALL-E models that are allowed to be used. If omitted, then no OpenAI models are allowed.'),
583
574
  stabilityai: z
584
- .array(z.string().nonempty())
585
- .describe('The list of StabilityAI models that are allowed to be used. If omitted, then no StabilityAI models are allowed.')
586
- .optional(),
575
+ .array(z.string())
576
+ .optional()
577
+ .describe('The list of StabilityAI models that are allowed to be used. If omitted, then no StabilityAI models are allowed.'),
587
578
  })
588
579
  .describe('The models that are allowed to be used from each provider.'),
589
580
  allowedSubscriptionTiers: z
590
- .union([z.literal(true), z.array(z.string().nonempty())])
581
+ .union([z.literal(true), z.array(z.string())])
591
582
  .describe('The subscription tiers that are allowed to use Image AI. If true, then all tiers are allowed.'),
592
583
  tokenModifierRatio: z
593
584
  .record(z.string(), z.number().positive())
594
- .describe('Custom token modifier ratio per model. The key is the model name and the value is the cost multiplier.')
595
- .optional(),
585
+ .optional()
586
+ .describe('Custom token modifier ratio per model. The key is the model name and the value is the cost multiplier.'),
596
587
  })
597
- .describe('Options for Image AI. If omitted, then Image AI is disabled.')
598
- .optional(),
588
+ .optional()
589
+ .describe('Options for Image AI. If omitted, then Image AI is disabled.'),
599
590
  });
600
591
  const apiGatewaySchema = z.object({
601
592
  endpoint: z
@@ -608,17 +599,15 @@ const webauthnSchema = z.object({
608
599
  .array(z.object({
609
600
  name: z
610
601
  .string()
611
- .describe('The human-readable name of the relying party.')
612
- .nonempty(),
602
+ .describe('The human-readable name of the relying party.'),
613
603
  id: z
614
604
  .string()
615
- .describe('The ID of the relying party. Should be the domain of the relying party. Note that this does not mean that it has to be unique. Instead, it just needs to match the domain that the passkeys can be used on.')
616
- .nonempty(),
605
+ .describe('The ID of the relying party. Should be the domain of the relying party. Note that this does not mean that it has to be unique. Instead, it just needs to match the domain that the passkeys can be used on.'),
617
606
  origin: z
618
607
  .string()
619
- .describe('The HTTP origin of the relying party.')
620
- .nonempty(),
608
+ .describe('The HTTP origin of the relying party.'),
621
609
  }))
610
+ .min(1)
622
611
  .describe('The relying parties that should be supported.'),
623
612
  });
624
613
  const telemetrySchema = z.object({
@@ -629,12 +618,12 @@ const telemetrySchema = z.object({
629
618
  .describe('The type of exporter that should be used for traces.'),
630
619
  url: z
631
620
  .string()
632
- .describe('The URL that traces should be sent to. Only required for otlp exporters.')
633
- .optional(),
621
+ .optional()
622
+ .describe('The URL that traces should be sent to. Only required for otlp exporters.'),
634
623
  headers: z
635
- .record(z.string())
636
- .describe('The headers that should be sent with the traces. Only required for otlp exporters.')
637
- .optional(),
624
+ .record(z.string(), z.string())
625
+ .optional()
626
+ .describe('The headers that should be sent with the traces. Only required for otlp exporters.'),
638
627
  })
639
628
  .describe('Options for configuring tracing.'),
640
629
  metrics: z
@@ -644,43 +633,56 @@ const telemetrySchema = z.object({
644
633
  .describe('The type of exporter that should be used for metrics.'),
645
634
  url: z
646
635
  .string()
647
- .describe('The URL that metrics should be sent to. Only required for otlp exporters.')
648
- .optional(),
636
+ .optional()
637
+ .describe('The URL that metrics should be sent to. Only required for otlp exporters.'),
649
638
  headers: z
650
- .record(z.string())
651
- .describe('The headers that should be sent with the metrics. Only required for otlp exporters.')
652
- .optional(),
639
+ .record(z.string(), z.string())
640
+ .optional()
641
+ .describe('The headers that should be sent with the metrics. Only required for otlp exporters.'),
653
642
  })
654
643
  .describe('Options for configuring metrics.'),
655
644
  instrumentation: z
656
645
  .object({
657
646
  auto: z
658
- .record(z.object({}).passthrough())
659
- .describe('Options for auto-instrumentation. If omitted, then auto-instrumentation will be enabled with default settings. If set to null, then auto-instrumentation will be disabled.')
647
+ .record(z.string(), z.looseObject({}))
660
648
  .optional()
661
- .nullable(),
649
+ .nullable()
650
+ .describe('Options for auto-instrumentation. If omitted, then auto-instrumentation will be enabled with default settings. If set to null, then auto-instrumentation will be disabled.'),
662
651
  prisma: z
663
- .object({})
664
- .describe('Options for Prisma instrumentation. If omitted, then Prisma instrumentation will be enabled with default settings. If set to null, then prisma instrumentation will be disabled.')
665
- .passthrough()
652
+ .looseObject({})
666
653
  .optional()
667
- .nullable(),
654
+ .nullable()
655
+ .describe('Options for Prisma instrumentation. If omitted, then Prisma instrumentation will be enabled with default settings. If set to null, then prisma instrumentation will be disabled.'),
668
656
  redis: z
669
- .object({})
670
- .describe('Options for Redis instrumentation. If omitted, then Redis instrumentation will be enabled with default settings. If set to null, then redis instrumentation will be disabled.')
671
- .passthrough()
657
+ .looseObject({})
672
658
  .optional()
673
- .nullable(),
659
+ .nullable()
660
+ .describe('Options for Redis instrumentation. If omitted, then Redis instrumentation will be enabled with default settings. If set to null, then redis instrumentation will be disabled.'),
674
661
  })
675
- .describe('Options for instrumentation')
676
662
  .optional()
677
- .default({}),
663
+ .prefault({})
664
+ .describe('Options for instrumentation'),
678
665
  resource: z
679
- .record(z.string())
680
- .describe('The resource that should be used. See https://opentelemetry.io/docs/specs/semconv/resource/ for more information.')
666
+ .record(z.string(), z.string())
681
667
  .optional()
682
- .default({}),
668
+ .prefault({})
669
+ .describe('The resource that should be used. See https://opentelemetry.io/docs/specs/semconv/resource/ for more information.'),
683
670
  });
671
+ const tigerBeetleSchema = z
672
+ .object({
673
+ clusterId: z.coerce
674
+ .bigint()
675
+ .min(0n, 'The cluster ID must be a non-negative integer.')
676
+ .describe('The cluster ID.'),
677
+ replicaAddresses: z
678
+ .array(z
679
+ .string()
680
+ .min(1)
681
+ .describe('An address (or port if local) to a replica of a cluster.'))
682
+ .min(1, 'At least one replica address is required.')
683
+ .describe("The addresses of the provided cluster's replicas."),
684
+ })
685
+ .describe('The financial interface that should be used. If omitted, then financial features provided by said interface will be disabled.');
684
686
  const rekognitionSchema = z.object({
685
687
  moderation: z.object({
686
688
  files: z.object({
@@ -688,50 +690,49 @@ const rekognitionSchema = z.object({
688
690
  .object({
689
691
  accountId: z
690
692
  .string()
691
- .describe('The AWS Account ID that should be used to run the job.')
692
- .min(1),
693
+ .min(1)
694
+ .describe('The AWS Account ID that should be used to run the job.'),
693
695
  sourceBucket: z
694
696
  .string()
695
- .describe('The bucket that should be scanned when a job is started.')
696
- .min(1),
697
+ .min(1)
698
+ .describe('The bucket that should be scanned when a job is started.'),
697
699
  reportBucket: z
698
700
  .string()
699
- .describe('The bucket that job reports should be placed in.')
700
- .min(1),
701
+ .min(1)
702
+ .describe('The bucket that job reports should be placed in.'),
701
703
  priority: z
702
- .number()
703
- .describe('The priority of jobs that are created. Higher numbers are higher priority. Defaults to 10.')
704
704
  .int()
705
705
  .optional()
706
- .default(10),
706
+ .prefault(10)
707
+ .describe('The priority of jobs that are created. Higher numbers are higher priority. Defaults to 10.'),
707
708
  roleArn: z
708
709
  .string()
709
- .describe('The ARN of the role that should be used to run the job.')
710
- .min(1),
710
+ .min(1)
711
+ .describe('The ARN of the role that should be used to run the job.'),
711
712
  lambdaFunctionArn: z
712
713
  .string()
713
- .describe('The ARN of the lambda function that should be invoked to process the files.')
714
- .min(1),
714
+ .min(1)
715
+ .describe('The ARN of the lambda function that should be invoked to process the files.'),
715
716
  tags: z
716
717
  .array(z.object({
717
718
  key: z.string().min(1),
718
719
  value: z.string().min(1),
719
720
  }))
720
- .describe('The tags that should be placed on the job.')
721
- .optional(),
721
+ .optional()
722
+ .describe('The tags that should be placed on the job.'),
722
723
  })
723
- .describe('The options specific to starting batch jobs.')
724
- .optional(),
724
+ .optional()
725
+ .describe('The options specific to starting batch jobs.'),
725
726
  scan: z
726
727
  .object({
727
728
  projectVersionArn: z
728
729
  .string()
729
- .describe('The ARN of the custom moderation model that should be used. If omitted, then the default model is used.')
730
730
  .min(1)
731
- .optional(),
731
+ .optional()
732
+ .describe('The ARN of the custom moderation model that should be used. If omitted, then the default model is used.'),
732
733
  })
733
- .describe('The options specific to scanning files.')
734
- .optional(),
734
+ .optional()
735
+ .describe('The options specific to scanning files.'),
735
736
  }),
736
737
  }),
737
738
  });
@@ -741,18 +742,18 @@ const webhooksSchema = z.object({
741
742
  type: z.literal('deno'),
742
743
  scriptPath: z
743
744
  .string()
744
- .describe('The path to the Deno script that should be run.')
745
- .min(1),
745
+ .min(1)
746
+ .describe('The path to the Deno script that should be run.'),
746
747
  denoPath: z
747
748
  .string()
748
- .describe('The path to the Deno executable that should be used.')
749
749
  .min(1)
750
750
  .optional()
751
- .nullable(),
751
+ .nullable()
752
+ .describe('The path to the Deno executable that should be used.'),
752
753
  debugLogs: z
753
754
  .boolean()
754
- .describe('Whether to enable debug logs for the Deno environment. This will log all Deno output to the console.')
755
- .default(false),
755
+ .prefault(false)
756
+ .describe('Whether to enable debug logs for the Deno environment. This will log all Deno output to the console.'),
756
757
  }),
757
758
  z.object({
758
759
  type: z.literal('node'),
@@ -761,10 +762,10 @@ const webhooksSchema = z.object({
761
762
  type: z.literal('lambda'),
762
763
  functionName: z
763
764
  .string()
764
- .describe('The name or ARN of the lambda function that should be called to process a webhook. If omitted, then the lambda function name will be taken from the WEBHOOK_LAMBDA_FUNCTION_NAME envrionment variable.')
765
765
  .min(1)
766
766
  .optional()
767
- .nullable(),
767
+ .nullable()
768
+ .describe('The name or ARN of the lambda function that should be called to process a webhook. If omitted, then the lambda function name will be taken from the WEBHOOK_LAMBDA_FUNCTION_NAME envrionment variable.'),
768
769
  }),
769
770
  ]),
770
771
  });
@@ -772,23 +773,23 @@ const snsSchema = z.object({
772
773
  type: z.literal('sns'),
773
774
  topicArn: z
774
775
  .string()
775
- .describe('The ARN of the SNS topic that should be used.')
776
- .min(1),
776
+ .min(1)
777
+ .describe('The ARN of the SNS topic that should be used.'),
777
778
  });
778
779
  const bullmqSchema = z.object({
779
780
  type: z.literal('bullmq'),
780
781
  process: z
781
782
  .boolean()
782
- .describe('Whether to process jobs from BullMQ on this node. Defaults to true.')
783
- .default(true),
783
+ .prefault(true)
784
+ .describe('Whether to process jobs from BullMQ on this node. Defaults to true.'),
784
785
  queue: z
785
786
  .boolean()
786
- .describe('Whether to allow this node to enqueue jobs in BullMQ. Defaults to true.')
787
- .default(true),
787
+ .prefault(true)
788
+ .describe('Whether to allow this node to enqueue jobs in BullMQ. Defaults to true.'),
788
789
  queueName: z
789
790
  .string()
790
- .describe('The name of the BullMQ queue that should be used.')
791
- .min(1),
791
+ .min(1)
792
+ .describe('The name of the BullMQ queue that should be used.'),
792
793
  });
793
794
  const backgroundJobSchema = z.discriminatedUnion('type', [
794
795
  snsSchema,
@@ -808,13 +809,13 @@ const sqliteDatabaseProviderSchema = z.object({
808
809
  type: z.literal('sqlite'),
809
810
  folderPath: z
810
811
  .string()
811
- .describe('The folder where the SQLite database files are stored.')
812
- .min(1),
812
+ .min(1)
813
+ .describe('The folder where the SQLite database files are stored.'),
813
814
  encryptionKey: z
814
815
  .string()
815
- .describe('The encryption key that should be used for the SQLite databases. If omitted, then the databases will not be encrypted.')
816
816
  .min(10)
817
- .optional(),
817
+ .optional()
818
+ .describe('The encryption key that should be used for the SQLite databases. If omitted, then the databases will not be encrypted.'),
818
819
  });
819
820
  const databasesProviderSchema = z.discriminatedUnion('type', [
820
821
  tursoDatabaseProviderSchema,
@@ -822,112 +823,115 @@ const databasesProviderSchema = z.discriminatedUnion('type', [
822
823
  ]);
823
824
  export const serverConfigSchema = z.object({
824
825
  s3: s3Schema
825
- .describe('S3 Configuration Options. If omitted, then S3 cannot be used for file storage.')
826
- .optional(),
826
+ .optional()
827
+ .describe('S3 Configuration Options. If omitted, then S3 cannot be used for file storage.'),
827
828
  rekognition: rekognitionSchema
828
- .describe('AWS Rekognition configuration options. If omitted, then AWS Rekognition cannot be used for moderation/classification.')
829
- .optional(),
829
+ .optional()
830
+ .describe('AWS Rekognition configuration options. If omitted, then AWS Rekognition cannot be used for moderation/classification.'),
830
831
  minio: minioSchema
831
- .describe('Minio Configuration Options. If omitted, then Minio cannot be used for file storage.')
832
- .optional(),
832
+ .optional()
833
+ .describe('Minio Configuration Options. If omitted, then Minio cannot be used for file storage.'),
833
834
  typesense: typesenseSchema
834
- .describe('Typesense configuration options. If omitted, then Typesense cannot be used for search.')
835
- .optional(),
835
+ .optional()
836
+ .describe('Typesense configuration options. If omitted, then Typesense cannot be used for search.'),
836
837
  apiGateway: apiGatewaySchema
837
- .describe('AWS API Gateway configuration options. If omitted, then inst records cannot be used on AWS Lambda.')
838
- .optional(),
838
+ .optional()
839
+ .describe('AWS API Gateway configuration options. If omitted, then inst records cannot be used on AWS Lambda.'),
839
840
  mongodb: mongodbSchema
840
- .describe('MongoDB configuration options. If omitted, then MongoDB cannot be used.')
841
- .optional(),
841
+ .optional()
842
+ .describe('MongoDB configuration options. If omitted, then MongoDB cannot be used.'),
842
843
  prisma: prismaSchema
843
- .describe('Prisma configuration options. If omitted, then Prisma (CockroachDB) cannot be used.')
844
- .optional(),
844
+ .optional()
845
+ .describe('Prisma configuration options. If omitted, then Prisma (CockroachDB) cannot be used.'),
845
846
  livekit: livekitSchema
846
- .describe('Livekit configuration options. If omitted, then Livekit features will be disabled.')
847
- .optional(),
847
+ .optional()
848
+ .describe('Livekit configuration options. If omitted, then Livekit features will be disabled.'),
848
849
  textIt: textItSchema
849
- .describe('TextIt configuration options. If omitted, then SMS login will be disabled.')
850
- .optional(),
850
+ .optional()
851
+ .describe('TextIt configuration options. If omitted, then SMS login will be disabled.'),
851
852
  ses: sesSchema
852
- .describe('AWS SES configuration options. If omitted, then sending login codes via SES is not possible.')
853
- .optional(),
853
+ .optional()
854
+ .describe('AWS SES configuration options. If omitted, then sending login codes via SES is not possible.'),
854
855
  redis: redisSchema
855
- .describe('Redis configuration options. If omitted, then using Redis is not possible.')
856
- .optional(),
856
+ .optional()
857
+ .describe('Redis configuration options. If omitted, then using Redis is not possible.'),
857
858
  rateLimit: rateLimitSchema
858
- .describe('Rate limit options. If omitted, then rate limiting will be disabled.')
859
- .optional(),
859
+ .optional()
860
+ .describe('Rate limit options. If omitted, then rate limiting will be disabled.'),
860
861
  websocketRateLimit: rateLimitSchema
861
- .describe('Rate limit options for websockets. If omitted, then the rateLimit options will be used for websockets.')
862
- .optional(),
862
+ .optional()
863
+ .describe('Rate limit options for websockets. If omitted, then the rateLimit options will be used for websockets.'),
863
864
  openai: openAiSchema
864
- .describe('OpenAI options. If omitted, then it will not be possible to use GPT or DALL-E.')
865
- .optional(),
865
+ .optional()
866
+ .describe('OpenAI options. If omitted, then it will not be possible to use GPT or DALL-E.'),
866
867
  blockadeLabs: blockadeLabsSchema
867
- .describe('Blockade Labs options. If omitted, then it will not be possible to generate skyboxes.')
868
- .optional(),
868
+ .optional()
869
+ .describe('Blockade Labs options. If omitted, then it will not be possible to generate skyboxes.'),
869
870
  stabilityai: stabilityAiSchema
870
- .describe('Stability AI options. If omitted, then it will not be possible to use Stable Diffusion.')
871
- .optional(),
871
+ .optional()
872
+ .describe('Stability AI options. If omitted, then it will not be possible to use Stable Diffusion.'),
872
873
  googleai: googleAiSchema
873
- .describe('Google AI options. If omitted, then it will not be possible to use Google AI (i.e. Gemini)')
874
- .optional(),
874
+ .optional()
875
+ .describe('Google AI options. If omitted, then it will not be possible to use Google AI (i.e. Gemini)'),
875
876
  anthropicai: anthropicAiSchema
876
- .describe('Anthropic AI options. If omitted, then it will not be possible to use Anthropic AI (i.e. Claude).')
877
- .optional(),
877
+ .optional()
878
+ .describe('Anthropic AI options. If omitted, then it will not be possible to use Anthropic AI (i.e. Claude).'),
878
879
  humeai: humeAiSchema
879
- .describe('Hume AI options. If omitted, then it will not be possible to use Hume AI.')
880
- .optional(),
880
+ .optional()
881
+ .describe('Hume AI options. If omitted, then it will not be possible to use Hume AI.'),
881
882
  sloydai: sloydAiSchema
882
- .describe('Sloyd AI options. If omitted, then it will not be possible to use Sloyd AI.')
883
- .optional(),
883
+ .optional()
884
+ .describe('Sloyd AI options. If omitted, then it will not be possible to use Sloyd AI.'),
884
885
  ai: aiSchema
885
- .describe('AI configuration options. If omitted, then all AI features will be disabled.')
886
- .optional(),
886
+ .optional()
887
+ .describe('AI configuration options. If omitted, then all AI features will be disabled.'),
887
888
  ws: wsSchema
888
- .describe('WebSocket Server configuration options. If omitted, then inst records cannot be used in standalone deployments.')
889
- .optional(),
889
+ .optional()
890
+ .describe('WebSocket Server configuration options. If omitted, then inst records cannot be used in standalone deployments.'),
890
891
  privo: privoSchema
891
- .describe('Privo configuration options. If omitted, then Privo features will be disabled.')
892
- .optional(),
892
+ .optional()
893
+ .describe('Privo configuration options. If omitted, then Privo features will be disabled.'),
893
894
  webauthn: webauthnSchema
894
- .describe('WebAuthn configuration options. If omitted, then WebAuthn features will be disabled.')
895
- .optional(),
895
+ .optional()
896
+ .describe('WebAuthn configuration options. If omitted, then WebAuthn features will be disabled.'),
896
897
  telemetry: telemetrySchema
897
- .describe('Options for configuring telemetry. If omitted, then telemetry will not be enabled.')
898
- .optional(),
898
+ .optional()
899
+ .describe('Options for configuring telemetry. If omitted, then telemetry will not be enabled.'),
900
+ tigerBeetle: tigerBeetleSchema
901
+ .optional()
902
+ .describe('Financial Interface configuration options for tigerbeetle. If omitted, then tigerbeetle will be disabled.'),
899
903
  subscriptions: subscriptionConfigSchema
900
- .describe('The default subscription configuration. If omitted, then subscription features will be disabled.')
901
- .optional(),
904
+ .optional()
905
+ .describe('The default subscription configuration. If omitted, then subscription features will be disabled.'),
902
906
  stripe: stripeSchema
903
- .describe('Stripe options. If omitted, then Stripe features will be disabled.')
904
- .optional(),
907
+ .optional()
908
+ .describe('Stripe options. If omitted, then Stripe features will be disabled.'),
905
909
  notifications: notificationsSchema
906
- .describe('System notification configuration options. Used to send messages for various events like user inst reports and com ID requests. If omitted, then server notifications will be disabled.')
907
- .optional(),
910
+ .optional()
911
+ .describe('System notification configuration options. Used to send messages for various events like user inst reports and com ID requests. If omitted, then server notifications will be disabled.'),
908
912
  moderation: moderationSchema
909
- .describe('Moderation configuration options. If omitted, then moderation features will be disabled unless overridden in the database.')
910
- .optional(),
913
+ .optional()
914
+ .describe('Moderation configuration options. If omitted, then moderation features will be disabled unless overridden in the database.'),
911
915
  webhooks: webhooksSchema
912
- .describe('Webhook configuration options. If omitted, then webhook features will be disabled.')
913
- .optional(),
916
+ .optional()
917
+ .describe('Webhook configuration options. If omitted, then webhook features will be disabled.'),
914
918
  webPush: z
915
919
  .object({
916
920
  vapidSubject: z
917
921
  .string()
918
- .describe('The subject that should be used for sending web push notifications. You can generate VAPID keys using https://www.npmjs.com/package/web-push')
919
- .min(1),
922
+ .min(1)
923
+ .describe('The subject that should be used for sending web push notifications. You can generate VAPID keys using https://www.npmjs.com/package/web-push'),
920
924
  vapidPublicKey: z
921
925
  .string()
922
- .describe('The public key that should be used for sending web push notifications. You can generate VAPID keys using https://www.npmjs.com/package/web-push')
923
- .min(1),
926
+ .min(1)
927
+ .describe('The public key that should be used for sending web push notifications. You can generate VAPID keys using https://www.npmjs.com/package/web-push'),
924
928
  vapidPrivateKey: z
925
929
  .string()
926
- .describe('The private key that should be used for sending web push notifications. You can generate VAPID keys using https://www.npmjs.com/package/web-push')
927
- .min(1),
930
+ .min(1)
931
+ .describe('The private key that should be used for sending web push notifications. You can generate VAPID keys using https://www.npmjs.com/package/web-push'),
928
932
  })
929
- .describe('Web Push configuration options. If omitted, then web push notifications will be disabled.')
930
- .optional(),
933
+ .optional()
934
+ .describe('Web Push configuration options. If omitted, then web push notifications will be disabled.'),
931
935
  meta: z
932
936
  .object({
933
937
  apiOrigin: z
@@ -935,30 +939,106 @@ export const serverConfigSchema = z.object({
935
939
  .describe('The HTTP origin that the API is available at.'),
936
940
  websocketOrigin: z
937
941
  .string()
938
- .describe('The HTTP origin that the Websocket API is available at.')
939
942
  .optional()
940
- .nullable(),
943
+ .nullable()
944
+ .describe('The HTTP origin that the Websocket API is available at.'),
941
945
  websocketProtocol: z
942
946
  .enum(['websocket', 'apiary-aws'])
943
- .describe('The protocol that should be used to connect to the websocket origin.')
944
947
  .optional()
945
- .nullable(),
948
+ .nullable()
949
+ .describe('The protocol that should be used to connect to the websocket origin.'),
946
950
  })
947
- .describe('The metadata about the server deployment. If omitted, then the server will not be able to provide information about itself. This would result in records features not being supported in webhook handlers.')
948
- .optional(),
951
+ .optional()
952
+ .describe('The metadata about the server deployment. If omitted, then the server will not be able to provide information about itself. This would result in records features not being supported in webhook handlers.'),
949
953
  jobs: z
950
954
  .object({
951
955
  search: backgroundJobSchema
952
- .describe('Configuration options for search background jobs. If omitted, then search background jobs will not be supported.')
953
- .optional(),
956
+ .optional()
957
+ .describe('Configuration options for search background jobs. If omitted, then search background jobs will not be supported.'),
954
958
  })
955
- .describe('Configuration options for background jobs. If omitted, then background jobs will not be supported.')
956
- .optional(),
959
+ .optional()
960
+ .describe('Configuration options for background jobs. If omitted, then background jobs will not be supported.'),
957
961
  databases: z
958
962
  .object({
959
963
  provider: databasesProviderSchema.describe('The options for the database provider that should be used.'),
960
964
  })
961
- .describe('Configuration options for database records. If omitted, then database records will be disabled.')
962
- .optional(),
965
+ .optional()
966
+ .describe('Configuration options for database records. If omitted, then database records will be disabled.'),
967
+ server: z
968
+ .object({
969
+ enabled: z
970
+ .boolean()
971
+ .prefault(true)
972
+ .describe('Whether serving CasualOS should be enabled.'),
973
+ tls: z
974
+ .object({
975
+ key: z
976
+ .string()
977
+ .describe('The TLS private key(s) in PEM format.'),
978
+ cert: z
979
+ .string()
980
+ .describe('The TLS certificate chains in PEM format.'),
981
+ })
982
+ .optional()
983
+ .describe('The TLS configuration for the CasualOS app. If not provided, then TLS will not be used.'),
984
+ proxy: z
985
+ .object({
986
+ trust: z
987
+ .string()
988
+ .optional()
989
+ .describe('The IP Address range of proxies that should be trusted.'),
990
+ })
991
+ .optional()
992
+ .describe('The proxy configuration for the CasualOS app.'),
993
+ debug: z
994
+ .boolean()
995
+ .prefault(false)
996
+ .describe('Whether to enable debug logging for the CasualOS app.'),
997
+ frontendPort: z
998
+ .number()
999
+ .prefault(3000)
1000
+ .describe('The port that the CasualOS app frontend should listen on.'),
1001
+ backendPort: z
1002
+ .number()
1003
+ .prefault(3002)
1004
+ .describe('The port that the CasualOS app backend API should listen on.'),
1005
+ webConfig: WEB_CONFIG_SCHEMA.prefault({
1006
+ causalRepoConnectionProtocol: 'websocket',
1007
+ collaborativeRepoLocalPersistence: true,
1008
+ staticRepoLocalPersistence: true,
1009
+ sharedPartitionsVersion: 'v2',
1010
+ vmOrigin: null,
1011
+ authOrigin: null,
1012
+ recordsOrigin: null,
1013
+ disableCollaboration: null,
1014
+ ab1BootstrapURL: null,
1015
+ arcGisApiKey: null,
1016
+ jitsiAppName: 'vpaas-magic-cookie-332b53bd630448a18fcb3be9740f2caf',
1017
+ what3WordsApiKey: null,
1018
+ playerMode: 'player',
1019
+ requirePrivoLogin: false,
1020
+ allowedBiosOptions: null,
1021
+ defaultBiosOption: null,
1022
+ automaticBiosOption: null,
1023
+ }).describe('The web configuration for the CasualOS frontend.'),
1024
+ playerWebManifest: WEB_MANIFEST_SCHEMA.optional()
1025
+ .nullable()
1026
+ .describe('The PWA web manifest that should be served by CasualOS. If omitted or null, then none will be used.'),
1027
+ drives: z
1028
+ .object({
1029
+ dirs: z
1030
+ .array(z.string())
1031
+ .describe('The list of extra directories that should be served by the CasualOS app on the /drives path.'),
1032
+ path: z
1033
+ .string()
1034
+ .prefault('/drives')
1035
+ .describe('The base path that drives should be served from.'),
1036
+ })
1037
+ .optional(),
1038
+ })
1039
+ .prefault({
1040
+ enabled: false,
1041
+ })
1042
+ .describe('The configuration for the CasualOS server. Defaults to disabled.'),
963
1043
  });
964
1044
  //# sourceMappingURL=ServerConfig.js.map