@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
@@ -10,7 +10,7 @@ import type { RateLimitController } from './RateLimitController';
10
10
  import type { PolicyController } from './PolicyController';
11
11
  import type { AIController } from './AIController';
12
12
  import type { WebsocketController } from './websockets/WebsocketController';
13
- import type { GenericHttpRequest, GenericHttpResponse, GenericWebsocketRequest, KnownErrorCodes, DenialReason, Procedure, ProcedureOutput, ProcedureOutputStream, Procedures } from '@casual-simulation/aux-common';
13
+ import type { GenericHttpHeaders, GenericHttpRequest, GenericHttpResponse, GenericWebsocketRequest, KnownErrorCodes, DenialReason, Procedure, ProcedureOutput, ProcedureOutputStream, Procedures, SimpleError } from '@casual-simulation/aux-common';
14
14
  import type { ModerationController } from './ModerationController';
15
15
  import type { LoomController } from './LoomController';
16
16
  import type { WebhookRecordsController } from './webhooks/WebhookRecordsController';
@@ -19,6 +19,10 @@ import type { PackageRecordsController } from './packages/PackageRecordsControll
19
19
  import type { PackageVersionRecordsController } from './packages/version/PackageVersionRecordsController';
20
20
  import type { SearchRecordsController } from './search';
21
21
  import type { DatabaseRecordsController } from './database';
22
+ import type { PurchasableItemRecordsController } from './purchasable-items/PurchasableItemRecordsController';
23
+ import type { PurchasableItem } from './purchasable-items/PurchasableItemRecordsStore';
24
+ import type { ContractRecordsController } from './contracts/ContractRecordsController';
25
+ import type { ViewParams, ViewTemplateRenderer } from './ViewTemplateRenderer';
22
26
  export declare const NOT_LOGGED_IN_RESULT: {
23
27
  success: false;
24
28
  errorCode: "not_logged_in";
@@ -64,6 +68,11 @@ export declare const LOOM_NOT_SUPPORTED_RESULT: {
64
68
  errorCode: "not_supported";
65
69
  errorMessage: string;
66
70
  };
71
+ export declare const STORE_NOT_SUPPORTED_RESULT: {
72
+ success: false;
73
+ errorCode: "not_supported";
74
+ errorMessage: string;
75
+ };
67
76
  export declare const INSTS_NOT_SUPPORTED_RESULT: {
68
77
  success: false;
69
78
  errorCode: "not_supported";
@@ -74,27 +83,34 @@ export declare const MODERATION_NOT_SUPPORTED_RESULT: {
74
83
  errorCode: "not_supported";
75
84
  errorMessage: string;
76
85
  };
86
+ export declare const XP_API_NOT_SUPPORTED_RESULT: {
87
+ success: false;
88
+ errorCode: "not_supported";
89
+ errorMessage: string;
90
+ };
77
91
  /**
78
92
  * Defines a basic interface for an HTTP route.
79
93
  */
80
- export interface Route<T, TQuery = any> {
94
+ export interface Route<TSchema extends z.ZodType | void, TQuery extends z.ZodType | void = void> {
81
95
  /**
82
96
  * The path that the route must match.
97
+ *
98
+ * If true, then the route will match all paths as a default route.
83
99
  */
84
- path: string;
100
+ path: string | true;
85
101
  /**
86
102
  * The schema that should be used for the route.
87
103
  * If the method can contain a request body, then the schema applies to the body.
88
104
  * Otherwise, it will apply to the query parameters.
89
105
  */
90
- schema?: z.ZodType<T, z.ZodTypeDef, any>;
106
+ schema?: TSchema;
91
107
  /**
92
108
  * The schema that should be used for the query parameters.
93
109
  * If omitted, then the query parameters will not be validated using this schema.
94
110
  *
95
111
  * Additionally, this only works if a schema is provided.
96
112
  */
97
- querySchema?: z.ZodType<TQuery, z.ZodTypeDef, any>;
113
+ querySchema?: TQuery;
98
114
  /**
99
115
  * The method for the route.
100
116
  */
@@ -104,13 +120,18 @@ export interface Route<T, TQuery = any> {
104
120
  * If omitted, then the route will not be named.
105
121
  */
106
122
  name?: string;
123
+ /**
124
+ * The scope for the route.
125
+ * Used to filter requests based on their context.
126
+ */
127
+ scope?: 'player' | 'auth';
107
128
  /**
108
129
  * The handler that should be called when the route is matched.
109
130
  * @param request The request.
110
131
  * @param data The data that was parsed from the request.
111
132
  * @param query The query parameters that were parsed from the request.
112
133
  */
113
- handler: (request: GenericHttpRequest, data?: T, query?: TQuery) => Promise<GenericHttpResponse>;
134
+ handler: (request: GenericHttpRequest, data?: z.output<TSchema>, query?: z.output<TQuery>) => Promise<GenericHttpResponse>;
114
135
  /**
115
136
  * The set of origins that are allowed for the route.
116
137
  * If true, then all origins are allowed.
@@ -225,6 +246,20 @@ export interface RecordsServerOptions {
225
246
  * If null, then database records are not supported.
226
247
  */
227
248
  databaseRecordsController?: DatabaseRecordsController | null;
249
+ /**
250
+ * The controller that should be used for handling contracts..
251
+ * If null, then contracts are not supported.
252
+ */
253
+ contractRecordsController?: ContractRecordsController | null;
254
+ /**
255
+ * The controller that should be used for handling purchasable items.
256
+ * If null, then purchasable items are not supported.
257
+ */
258
+ purchasableItemsController?: PurchasableItemRecordsController | null;
259
+ /**
260
+ * The interface that should be used for rendering view templates.
261
+ */
262
+ viewTemplateRenderer?: ViewTemplateRenderer | null;
228
263
  }
229
264
  /**
230
265
  * Defines a class that represents a generic HTTP server suitable for Records HTTP Requests.
@@ -248,6 +283,8 @@ export declare class RecordsServer {
248
283
  private _packageVersionController;
249
284
  private _searchRecordsController;
250
285
  private _databaseRecordsController;
286
+ private _contractRecordsController;
287
+ private _viewTemplateRenderer;
251
288
  /**
252
289
  * The set of origins that are allowed for API requests.
253
290
  */
@@ -259,6 +296,7 @@ export declare class RecordsServer {
259
296
  private _rateLimit;
260
297
  private _websocketRateLimit;
261
298
  private _policyController;
299
+ private _purchasableItems;
262
300
  /**
263
301
  * The map of paths to routes that they match.
264
302
  */
@@ -280,9 +318,14 @@ export declare class RecordsServer {
280
318
  * The set of procedures that the server has.
281
319
  */
282
320
  get procedures(): {
283
- getUserInfo: Procedure<{
284
- userId?: string;
285
- }, import("./AuthController").GetUserInfoFailure | {
321
+ playerIndex: Procedure<void, import("@casual-simulation/aux-common").GenericResult<ViewParams, SimpleError>, void>;
322
+ playerVmIframe: Procedure<void, import("@casual-simulation/aux-common").GenericResult<ViewParams, SimpleError>, void>;
323
+ playerVmIframeDom: Procedure<void, import("@casual-simulation/aux-common").GenericResult<ViewParams, SimpleError>, void>;
324
+ authIndex: Procedure<void, import("@casual-simulation/aux-common").GenericResult<ViewParams, SimpleError>, void>;
325
+ authIframe: Procedure<void, import("@casual-simulation/aux-common").GenericResult<ViewParams, SimpleError>, void>;
326
+ getUserInfo: Procedure<z.ZodObject<{
327
+ userId: z.ZodString;
328
+ }, z.core.$strip>, import("./AuthController").ValidateSessionKeyFailure | import("./AuthController").GetUserInfoFailure | {
286
329
  success: false;
287
330
  errorCode: "not_logged_in";
288
331
  errorMessage: "The user is not logged in. A session key must be provided for this operation.";
@@ -298,163 +341,195 @@ export declare class RecordsServer {
298
341
  readonly privacyFeatures: import("@casual-simulation/aux-common").PrivacyFeatures;
299
342
  readonly displayName: string;
300
343
  readonly role: import("@casual-simulation/aux-common").UserRole;
301
- }, any>;
302
- isEmailValid: Procedure<{
303
- email?: string;
304
- }, import("./AuthController").IsValidEmailAddressResult, any>;
305
- isDisplayNameValid: Procedure<{
306
- displayName?: string;
307
- name?: string;
308
- }, import("./AuthController").IsValidDisplayNameResult, any>;
309
- createAccount: Procedure<{}, import("./AuthController").CreateAccountResult | import("./AuthController").ValidateSessionKeyFailure | {
344
+ readonly contractFeatures: {
345
+ allowed: boolean;
346
+ currencyLimits: {
347
+ [x: string]: {
348
+ maxCost: number;
349
+ minCost: number;
350
+ fee?: {
351
+ type: "percent";
352
+ percent: number;
353
+ } | {
354
+ type: "fixed";
355
+ amount: number;
356
+ };
357
+ };
358
+ };
359
+ maxItems?: number;
360
+ };
361
+ readonly stripeAccountId: string;
362
+ readonly stripeAccountStatus: import("./StripeInterface").StripeAccountStatus;
363
+ readonly stripeAccountRequirementsStatus: import("./StripeInterface").StripeRequirementsStatus;
364
+ }, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
365
+ isEmailValid: Procedure<z.ZodObject<{
366
+ email: z.ZodString;
367
+ }, z.core.$strip>, import("./AuthController").IsValidEmailAddressResult, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
368
+ isDisplayNameValid: Procedure<z.ZodObject<{
369
+ displayName: z.ZodString;
370
+ name: z.ZodOptional<z.ZodString>;
371
+ }, z.core.$strip>, import("./AuthController").IsValidDisplayNameResult, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
372
+ createAccount: Procedure<z.ZodObject<{}, z.core.$strip>, import("./AuthController").CreateAccountResult | import("./AuthController").ValidateSessionKeyFailure | {
310
373
  success: false;
311
374
  errorCode: "not_logged_in";
312
375
  errorMessage: "The user is not logged in. A session key must be provided for this operation.";
313
- }, any>;
314
- listSessions: Procedure<{
315
- expireTimeMs?: number;
316
- userId?: string;
317
- }, import("./AuthController").ListSessionsResult | {
376
+ }, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
377
+ listSessions: Procedure<z.ZodPrefault<z.ZodObject<{
378
+ expireTimeMs: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
379
+ userId: z.ZodOptional<z.ZodString>;
380
+ }, z.core.$strip>>, import("./AuthController").ListSessionsResult | {
318
381
  success: false;
319
382
  errorCode: "not_logged_in";
320
383
  errorMessage: "The user is not logged in. A session key must be provided for this operation.";
321
- }, any>;
384
+ }, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
322
385
  replaceSession: Procedure<void, import("./AuthController").ReplaceSessionResult | {
323
386
  success: false;
324
387
  errorCode: "not_logged_in";
325
388
  errorMessage: "The user is not logged in. A session key must be provided for this operation.";
326
389
  }, void>;
327
- revokeAllSessions: Procedure<{
328
- userId?: string;
329
- }, import("./AuthController").RevokeAllSessionsResult | {
390
+ revokeAllSessions: Procedure<z.ZodObject<{
391
+ userId: z.ZodString;
392
+ }, z.core.$strip>, import("./AuthController").RevokeAllSessionsResult | {
330
393
  success: false;
331
394
  errorCode: "not_logged_in";
332
395
  errorMessage: "The user is not logged in. A session key must be provided for this operation.";
333
- }, any>;
334
- revokeSession: Procedure<{
335
- userId?: string;
336
- sessionId?: string;
337
- sessionKey?: string;
338
- }, import("./AuthController").RevokeSessionResult | {
396
+ }, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
397
+ revokeSession: Procedure<z.ZodObject<{
398
+ userId: z.ZodOptional<z.ZodString>;
399
+ sessionId: z.ZodOptional<z.ZodString>;
400
+ sessionKey: z.ZodOptional<z.ZodString>;
401
+ }, z.core.$strip>, import("./AuthController").RevokeSessionResult | {
339
402
  success: false;
340
403
  errorCode: "not_logged_in";
341
404
  errorMessage: "The user is not logged in. A session key must be provided for this operation.";
342
- }, any>;
343
- completeLogin: Procedure<{
344
- userId?: string;
345
- requestId?: string;
346
- code?: string;
347
- }, import("./AuthController").CompleteLoginResult, any>;
348
- requestLogin: Procedure<{
349
- address?: string;
350
- addressType?: "email" | "phone";
351
- }, import("./AuthController").LoginRequestResult, any>;
352
- requestPrivoLogin: Procedure<{}, import("./AuthController").OpenIDLoginRequestResult, any>;
353
- processOAuthCode: Procedure<{
354
- code?: string;
355
- state?: string;
356
- }, import("./AuthController").ProcessOpenIDAuthorizationCodeResult, any>;
357
- completeOAuthLogin: Procedure<{
358
- requestId?: string;
359
- }, import("./AuthController").CompleteOpenIDLoginResult, any>;
360
- requestPrivoSignUp: Procedure<{
361
- email?: string;
362
- parentEmail?: string;
363
- name?: string;
364
- dateOfBirth?: Date;
365
- displayName?: string;
366
- }, import("./AuthController").PrivoSignUpRequestResult, any>;
367
- requestPrivacyFeaturesChange: Procedure<{
368
- userId?: string;
369
- }, import("./AuthController").RequestPrivacyFeaturesChangeResult, any>;
405
+ }, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
406
+ completeLogin: Procedure<z.ZodObject<{
407
+ userId: z.ZodString;
408
+ requestId: z.ZodString;
409
+ code: z.ZodString;
410
+ }, z.core.$strip>, import("./AuthController").CompleteLoginResult, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
411
+ requestLogin: Procedure<z.ZodObject<{
412
+ address: z.ZodString;
413
+ addressType: z.ZodEnum<{
414
+ email: "email";
415
+ phone: "phone";
416
+ }>;
417
+ loginStudioId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
418
+ comId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
419
+ customDomain: z.ZodOptional<z.ZodNullable<z.ZodString>>;
420
+ }, z.core.$strip>, import("./AuthController").LoginRequestResult, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
421
+ requestPrivoLogin: Procedure<z.ZodObject<{}, z.core.$strip>, import("./AuthController").OpenIDLoginRequestResult, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
422
+ processOAuthCode: Procedure<z.ZodObject<{
423
+ code: z.ZodString;
424
+ state: z.ZodString;
425
+ }, z.core.$strip>, import("./AuthController").ProcessOpenIDAuthorizationCodeResult, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
426
+ completeOAuthLogin: Procedure<z.ZodObject<{
427
+ requestId: z.ZodString;
428
+ }, z.core.$strip>, import("./AuthController").CompleteOpenIDLoginResult, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
429
+ requestPrivoSignUp: Procedure<z.ZodObject<{
430
+ email: z.ZodOptional<z.ZodEmail>;
431
+ parentEmail: z.ZodOptional<z.ZodEmail>;
432
+ name: z.ZodString;
433
+ dateOfBirth: z.ZodCoercedDate<unknown>;
434
+ displayName: z.ZodString;
435
+ }, z.core.$strip>, import("./AuthController").PrivoSignUpRequestResult, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
436
+ requestPrivacyFeaturesChange: Procedure<z.ZodObject<{
437
+ userId: z.ZodString;
438
+ }, z.core.$strip>, import("./AuthController").RequestPrivacyFeaturesChangeResult, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
370
439
  getWebAuthnRegistrationOptions: Procedure<void, import("./AuthController").RequestWebAuthnRegistrationResult | import("./AuthController").ValidateSessionKeyFailure, void>;
371
- registerWebAuthn: Procedure<{
372
- response?: {
373
- id?: string;
374
- rawId?: string;
375
- response?: {
376
- clientDataJSON?: string;
377
- attestationObject?: string;
378
- authenticatorData?: string;
379
- transports?: string[];
380
- publicKeyAlgorithm?: number;
381
- publicKey?: string;
382
- };
383
- authenticatorAttachment?: "cross-platform" | "platform";
384
- clientExtensionResults?: {
385
- appid?: boolean;
386
- credProps?: {
387
- rk?: boolean;
388
- };
389
- hmacCreateSecret?: boolean;
390
- };
391
- type?: "public-key";
392
- };
393
- }, import("./AuthController").CompleteWebAuthnRegistrationResult | import("./AuthController").ValidateSessionKeyFailure, any>;
440
+ registerWebAuthn: Procedure<z.ZodObject<{
441
+ response: z.ZodObject<{
442
+ id: z.ZodString;
443
+ rawId: z.ZodString;
444
+ response: z.ZodObject<{
445
+ clientDataJSON: z.ZodString;
446
+ attestationObject: z.ZodString;
447
+ authenticatorData: z.ZodOptional<z.ZodString>;
448
+ transports: z.ZodOptional<z.ZodArray<z.ZodString>>;
449
+ publicKeyAlgorithm: z.ZodOptional<z.ZodNumber>;
450
+ publicKey: z.ZodOptional<z.ZodString>;
451
+ }, z.core.$strip>;
452
+ authenticatorAttachment: z.ZodOptional<z.ZodEnum<{
453
+ "cross-platform": "cross-platform";
454
+ platform: "platform";
455
+ }>>;
456
+ clientExtensionResults: z.ZodObject<{
457
+ appid: z.ZodOptional<z.ZodBoolean>;
458
+ credProps: z.ZodOptional<z.ZodObject<{
459
+ rk: z.ZodOptional<z.ZodBoolean>;
460
+ }, z.core.$strip>>;
461
+ hmacCreateSecret: z.ZodOptional<z.ZodBoolean>;
462
+ }, z.core.$strip>;
463
+ type: z.ZodLiteral<"public-key">;
464
+ }, z.core.$strip>;
465
+ }, z.core.$strip>, import("./AuthController").CompleteWebAuthnRegistrationResult | import("./AuthController").ValidateSessionKeyFailure, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
394
466
  getWebAuthnLoginOptions: Procedure<void, import("./AuthController").RequestWebAuthnLoginResult, void>;
395
- completeWebAuthnLogin: Procedure<{
396
- requestId?: string;
397
- response?: {
398
- id?: string;
399
- rawId?: string;
400
- response?: {
401
- clientDataJSON?: string;
402
- authenticatorData?: string;
403
- signature?: string;
404
- userHandle?: string;
405
- };
406
- authenticatorAttachment?: "cross-platform" | "platform";
407
- clientExtensionResults?: {
408
- appid?: boolean;
409
- credProps?: {
410
- rk?: boolean;
411
- };
412
- hmacCreateSecret?: boolean;
413
- };
414
- type?: "public-key";
415
- };
416
- }, import("./AuthController").CompleteWebAuthnLoginResult, any>;
467
+ completeWebAuthnLogin: Procedure<z.ZodObject<{
468
+ requestId: z.ZodString;
469
+ response: z.ZodObject<{
470
+ id: z.ZodString;
471
+ rawId: z.ZodString;
472
+ response: z.ZodObject<{
473
+ clientDataJSON: z.ZodString;
474
+ authenticatorData: z.ZodString;
475
+ signature: z.ZodString;
476
+ userHandle: z.ZodOptional<z.ZodString>;
477
+ }, z.core.$strip>;
478
+ authenticatorAttachment: z.ZodOptional<z.ZodEnum<{
479
+ "cross-platform": "cross-platform";
480
+ platform: "platform";
481
+ }>>;
482
+ clientExtensionResults: z.ZodObject<{
483
+ appid: z.ZodOptional<z.ZodBoolean>;
484
+ credProps: z.ZodOptional<z.ZodObject<{
485
+ rk: z.ZodOptional<z.ZodBoolean>;
486
+ }, z.core.$strip>>;
487
+ hmacCreateSecret: z.ZodOptional<z.ZodBoolean>;
488
+ }, z.core.$strip>;
489
+ type: z.ZodLiteral<"public-key">;
490
+ }, z.core.$strip>;
491
+ }, z.core.$strip>, import("./AuthController").CompleteWebAuthnLoginResult, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
417
492
  listUserAuthenticators: Procedure<void, import("./AuthController").ListUserAuthenticatorsResult | import("./AuthController").ValidateSessionKeyFailure, void>;
418
- deleteUserAuthenticator: Procedure<{
419
- authenticatorId?: string;
420
- }, import("./AuthController").DeleteUserAuthenticatorResult | import("./AuthController").ValidateSessionKeyFailure, any>;
421
- createMeetToken: Procedure<{
422
- roomName?: string;
423
- userName?: string;
424
- }, import("./LivekitEvents").IssueMeetTokenResult, any>;
425
- createRecord: Procedure<{
426
- recordName?: string;
427
- ownerId?: string;
428
- studioId?: string;
429
- }, import("./AuthController").ValidateSessionKeyFailure | import("./RecordsController").CreateRecordResult, any>;
430
- addEventCount: Procedure<{
431
- recordKey?: string;
432
- eventName?: string;
433
- count?: number;
434
- instances?: string[];
435
- }, import("./AuthController").ValidateSessionKeyFailure | import("./EventRecordsController").AddCountResult, any>;
436
- getEventCount: Procedure<{
437
- recordName?: string;
438
- eventName?: string;
439
- instances?: string[];
440
- }, import("./AuthController").ValidateSessionKeyFailure | import("./EventRecordsController").GetCountResult, any>;
441
- listEvents: Procedure<{
442
- recordName?: string;
443
- eventName?: string;
444
- instances?: string[];
445
- }, import("./AuthController").ValidateSessionKeyFailure | import("./EventRecordsController").ListEventsResult, any>;
446
- updateEvent: Procedure<{
447
- recordKey?: string;
448
- eventName?: string;
449
- count?: number;
450
- markers?: [string, ...string[]];
451
- instances?: string[];
452
- }, import("./AuthController").ValidateSessionKeyFailure | import("./EventRecordsController").UpdateEventRecordResult, any>;
453
- deleteManualData: Procedure<{
454
- recordKey?: string;
455
- address?: string;
456
- instances?: string[];
457
- }, import("./AuthController").ValidateSessionKeyFailure | import("./DataRecordsController").EraseDataSuccess | import("./DataRecordsController").EraseDataFailure | {
493
+ deleteUserAuthenticator: Procedure<z.ZodObject<{
494
+ authenticatorId: z.ZodString;
495
+ }, z.core.$strip>, import("./AuthController").DeleteUserAuthenticatorResult | import("./AuthController").ValidateSessionKeyFailure, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
496
+ createMeetToken: Procedure<z.ZodObject<{
497
+ roomName: z.ZodString;
498
+ userName: z.ZodString;
499
+ }, z.core.$strip>, import("./LivekitEvents").IssueMeetTokenResult, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
500
+ createRecord: Procedure<z.ZodObject<{
501
+ recordName: z.ZodString;
502
+ ownerId: z.ZodOptional<z.ZodString>;
503
+ studioId: z.ZodOptional<z.ZodString>;
504
+ }, z.core.$strip>, import("./AuthController").ValidateSessionKeyFailure | import("./RecordsController").CreateRecordResult, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
505
+ addEventCount: Procedure<z.ZodObject<{
506
+ recordKey: z.ZodString;
507
+ eventName: z.ZodString;
508
+ count: z.ZodNumber;
509
+ instances: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodArray<z.ZodString>>>;
510
+ }, z.core.$strip>, import("./AuthController").ValidateSessionKeyFailure | import("./EventRecordsController").AddCountResult, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
511
+ getEventCount: Procedure<z.ZodObject<{
512
+ recordName: z.ZodString;
513
+ eventName: z.ZodString;
514
+ instances: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodArray<z.ZodString>>>;
515
+ }, z.core.$strip>, import("./AuthController").ValidateSessionKeyFailure | import("./EventRecordsController").GetCountResult, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
516
+ listEvents: Procedure<z.ZodObject<{
517
+ recordName: z.ZodString;
518
+ eventName: z.ZodOptional<z.ZodString>;
519
+ instances: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodArray<z.ZodString>>>;
520
+ }, z.core.$strip>, import("./AuthController").ValidateSessionKeyFailure | import("./EventRecordsController").ListEventsResult, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
521
+ updateEvent: Procedure<z.ZodObject<{
522
+ recordKey: z.ZodString;
523
+ eventName: z.ZodString;
524
+ count: z.ZodOptional<z.ZodNumber>;
525
+ markers: z.ZodOptional<z.ZodArray<z.ZodString>>;
526
+ instances: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodArray<z.ZodString>>>;
527
+ }, z.core.$strip>, import("./AuthController").ValidateSessionKeyFailure | import("./EventRecordsController").UpdateEventRecordResult, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
528
+ deleteManualData: Procedure<z.ZodObject<{
529
+ recordKey: z.ZodString;
530
+ address: z.ZodString;
531
+ instances: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodArray<z.ZodString>>>;
532
+ }, z.core.$strip>, import("./AuthController").ValidateSessionKeyFailure | import("./DataRecordsController").EraseDataSuccess | import("./DataRecordsController").EraseDataFailure | {
458
533
  readonly success: false;
459
534
  readonly errorCode: "unacceptable_request";
460
535
  readonly errorMessage: "recordKey is required and must be a string.";
@@ -462,12 +537,12 @@ export declare class RecordsServer {
462
537
  readonly success: false;
463
538
  readonly errorCode: "unacceptable_request";
464
539
  readonly errorMessage: "address is required and must be a string.";
465
- }, any>;
466
- getManualData: Procedure<{
467
- recordName?: string;
468
- address?: string;
469
- instances?: string[];
470
- }, import("./AuthController").ValidateSessionKeyFailure | import("./DataRecordsController").GetDataSuccess | import("./DataRecordsController").GetDataFailure | {
540
+ }, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
541
+ getManualData: Procedure<z.ZodObject<{
542
+ recordName: z.ZodString;
543
+ address: z.ZodString;
544
+ instances: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodArray<z.ZodString>>>;
545
+ }, z.core.$strip>, import("./AuthController").ValidateSessionKeyFailure | import("./DataRecordsController").GetDataSuccess | import("./DataRecordsController").GetDataFailure | {
471
546
  readonly success: false;
472
547
  readonly errorCode: "unacceptable_request";
473
548
  readonly errorMessage: "recordName is required and must be a string.";
@@ -475,16 +550,16 @@ export declare class RecordsServer {
475
550
  readonly success: false;
476
551
  readonly errorCode: "unacceptable_request";
477
552
  readonly errorMessage: "address is required and must be a string.";
478
- }, any>;
479
- recordManualData: Procedure<{
480
- recordKey?: string;
481
- address?: string;
482
- data?: any;
483
- updatePolicy?: true | string[];
484
- deletePolicy?: true | string[];
485
- markers?: [string, ...string[]];
486
- instances?: string[];
487
- }, import("./AuthController").ValidateSessionKeyFailure | import("./DataRecordsController").RecordDataSuccess | import("./DataRecordsController").RecordDataFailure | {
553
+ }, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
554
+ recordManualData: Procedure<z.ZodObject<{
555
+ recordKey: z.ZodString;
556
+ address: z.ZodString;
557
+ data: z.ZodAny;
558
+ updatePolicy: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<true>, z.ZodArray<z.ZodString>]>>;
559
+ deletePolicy: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<true>, z.ZodArray<z.ZodString>]>>;
560
+ markers: z.ZodOptional<z.ZodArray<z.ZodString>>;
561
+ instances: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodArray<z.ZodString>>>;
562
+ }, z.core.$strip>, import("./AuthController").ValidateSessionKeyFailure | import("./DataRecordsController").RecordDataSuccess | import("./DataRecordsController").RecordDataFailure | {
488
563
  readonly success: false;
489
564
  readonly errorCode: "unacceptable_request";
490
565
  readonly errorMessage: "recordKey is required and must be a string.";
@@ -496,22 +571,22 @@ export declare class RecordsServer {
496
571
  readonly success: false;
497
572
  readonly errorCode: "unacceptable_request";
498
573
  readonly errorMessage: "data is required.";
499
- }, any>;
500
- getFile: Procedure<{
501
- recordName?: string;
502
- fileName?: string;
503
- fileUrl?: string;
504
- instances?: string[];
505
- }, import("./AuthController").ValidateSessionKeyFailure | import("./FileRecordsStore").GetFileNameFromUrlFailure | import("./FileRecordsController").ReadFileSuccess | import("./FileRecordsController").ReadFileFailure | {
574
+ }, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
575
+ getFile: Procedure<z.ZodObject<{
576
+ recordName: z.ZodOptional<z.ZodString>;
577
+ fileName: z.ZodOptional<z.ZodString>;
578
+ fileUrl: z.ZodOptional<z.ZodString>;
579
+ instances: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodArray<z.ZodString>>>;
580
+ }, z.core.$strip>, import("./AuthController").ValidateSessionKeyFailure | import("./FileRecordsStore").GetFileNameFromUrlFailure | import("./FileRecordsController").ReadFileSuccess | import("./FileRecordsController").ReadFileFailure | {
506
581
  readonly success: false;
507
582
  readonly errorCode: "unacceptable_request";
508
583
  readonly errorMessage: string;
509
- }, any>;
510
- listFiles: Procedure<{
511
- recordName?: string;
512
- fileName?: string;
513
- instances?: string[];
514
- }, import("./AuthController").ValidateSessionKeyFailure | import("./FileRecordsController").ListFilesSuccess | import("./FileRecordsController").ListFilesFailure | {
584
+ }, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
585
+ listFiles: Procedure<z.ZodObject<{
586
+ recordName: z.ZodString;
587
+ fileName: z.ZodOptional<z.ZodString>;
588
+ instances: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodArray<z.ZodString>>>;
589
+ }, z.core.$strip>, import("./AuthController").ValidateSessionKeyFailure | import("./FileRecordsController").ListFilesSuccess | import("./FileRecordsController").ListFilesFailure | {
515
590
  readonly success: false;
516
591
  readonly errorCode: "unacceptable_request";
517
592
  readonly errorMessage: "recordName must be a string.";
@@ -519,12 +594,12 @@ export declare class RecordsServer {
519
594
  readonly success: false;
520
595
  readonly errorCode: "unacceptable_request";
521
596
  readonly errorMessage: "fileName must be a string.";
522
- }, any>;
523
- eraseFile: Procedure<{
524
- recordKey?: string;
525
- fileUrl?: string;
526
- instances?: string[];
527
- }, import("./AuthController").ValidateSessionKeyFailure | import("./FileRecordsStore").GetFileNameFromUrlSuccess | import("./FileRecordsStore").GetFileNameFromUrlFailure | import("./FileRecordsController").EraseFileFailure | {
597
+ }, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
598
+ eraseFile: Procedure<z.ZodObject<{
599
+ recordKey: z.ZodString;
600
+ fileUrl: z.ZodString;
601
+ instances: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodArray<z.ZodString>>>;
602
+ }, z.core.$strip>, import("./AuthController").ValidateSessionKeyFailure | import("./FileRecordsStore").GetFileNameFromUrlSuccess | import("./FileRecordsStore").GetFileNameFromUrlFailure | import("./FileRecordsController").EraseFileFailure | {
528
603
  readonly success: false;
529
604
  readonly errorCode: "unacceptable_request";
530
605
  readonly errorMessage: "recordKey is required and must be a string.";
@@ -532,16 +607,16 @@ export declare class RecordsServer {
532
607
  readonly success: false;
533
608
  readonly errorCode: "unacceptable_request";
534
609
  readonly errorMessage: "fileUrl is required and must be a string.";
535
- }, any>;
536
- recordFile: Procedure<{
537
- recordKey?: string;
538
- fileSha256Hex?: string;
539
- fileByteLength?: number;
540
- fileMimeType?: string;
541
- fileDescription?: string;
542
- markers?: [string, ...string[]];
543
- instances?: string[];
544
- }, import("./AuthController").ValidateSessionKeyFailure | import("./FileRecordsController").RecordFileSuccess | import("./FileRecordsController").RecordFileFailure | {
610
+ }, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
611
+ recordFile: Procedure<z.ZodObject<{
612
+ recordKey: z.ZodString;
613
+ fileSha256Hex: z.ZodString;
614
+ fileByteLength: z.ZodInt;
615
+ fileMimeType: z.ZodString;
616
+ fileDescription: z.ZodOptional<z.ZodString>;
617
+ markers: z.ZodOptional<z.ZodArray<z.ZodString>>;
618
+ instances: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodArray<z.ZodString>>>;
619
+ }, z.core.$strip>, import("./AuthController").ValidateSessionKeyFailure | import("./FileRecordsController").RecordFileSuccess | import("./FileRecordsController").RecordFileFailure | {
545
620
  readonly success: false;
546
621
  readonly errorCode: "unacceptable_request";
547
622
  readonly errorMessage: "recordKey is required and must be a string.";
@@ -561,17 +636,17 @@ export declare class RecordsServer {
561
636
  readonly success: false;
562
637
  readonly errorCode: "unacceptable_request";
563
638
  readonly errorMessage: "fileDescription must be a string.";
564
- }, any>;
565
- updateFile: Procedure<{
566
- recordKey?: string;
567
- fileUrl?: string;
568
- markers?: [string, ...string[]];
569
- instances?: string[];
570
- }, import("./AuthController").ValidateSessionKeyFailure | import("./FileRecordsStore").GetFileNameFromUrlFailure | import("./FileRecordsController").UpdateFileRecordSuccess | import("./FileRecordsController").UpdateFileRecordFailure, any>;
571
- scanFileForModeration: Procedure<{
572
- recordName?: string;
573
- fileName?: string;
574
- }, import("./AuthController").ValidateSessionKeyFailure | import("./ModerationController").ScanFileSuccess | import("./ModerationController").ScanFileFailure | {
639
+ }, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
640
+ updateFile: Procedure<z.ZodObject<{
641
+ recordKey: z.ZodString;
642
+ fileUrl: z.ZodString;
643
+ markers: z.ZodArray<z.ZodString>;
644
+ instances: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodArray<z.ZodString>>>;
645
+ }, z.core.$strip>, import("./AuthController").ValidateSessionKeyFailure | import("./FileRecordsStore").GetFileNameFromUrlFailure | import("./FileRecordsController").UpdateFileRecordSuccess | import("./FileRecordsController").UpdateFileRecordFailure, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
646
+ scanFileForModeration: Procedure<z.ZodObject<{
647
+ recordName: z.ZodString;
648
+ fileName: z.ZodString;
649
+ }, z.core.$strip>, import("./AuthController").ValidateSessionKeyFailure | import("./ModerationController").ScanFileSuccess | import("./ModerationController").ScanFileFailure | {
575
650
  success: false;
576
651
  errorCode: "not_logged_in";
577
652
  errorMessage: "The user is not logged in. A session key must be provided for this operation.";
@@ -579,8 +654,8 @@ export declare class RecordsServer {
579
654
  readonly success: false;
580
655
  readonly errorCode: "not_authorized";
581
656
  readonly errorMessage: "You are not authorized to perform this action.";
582
- }, any>;
583
- scheduleModerationScans: Procedure<{}, import("./AuthController").ValidateSessionKeyFailure | import("./ModerationController").ScheduleModerationScansSuccess | import("./ModerationController").ScheduleModerationScansFailure | {
657
+ }, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
658
+ scheduleModerationScans: Procedure<z.ZodObject<{}, z.core.$strip>, import("./AuthController").ValidateSessionKeyFailure | import("./ModerationController").ScheduleModerationScansSuccess | import("./ModerationController").ScheduleModerationScansFailure | {
584
659
  success: false;
585
660
  errorCode: "not_logged_in";
586
661
  errorMessage: "The user is not logged in. A session key must be provided for this operation.";
@@ -588,12 +663,12 @@ export declare class RecordsServer {
588
663
  readonly success: false;
589
664
  readonly errorCode: "not_authorized";
590
665
  readonly errorMessage: "You are not authorized to perform this action.";
591
- }, any>;
592
- eraseData: Procedure<{
593
- recordKey?: string;
594
- address?: string;
595
- instances?: string[];
596
- }, import("./AuthController").ValidateSessionKeyFailure | import("./DataRecordsController").EraseDataSuccess | import("./DataRecordsController").EraseDataFailure | {
666
+ }, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
667
+ eraseData: Procedure<z.ZodObject<{
668
+ recordKey: z.ZodString;
669
+ address: z.ZodString;
670
+ instances: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodArray<z.ZodString>>>;
671
+ }, z.core.$strip>, import("./AuthController").ValidateSessionKeyFailure | import("./DataRecordsController").EraseDataSuccess | import("./DataRecordsController").EraseDataFailure | {
597
672
  readonly success: false;
598
673
  readonly errorCode: "unacceptable_request";
599
674
  readonly errorMessage: "recordKey is required and must be a string.";
@@ -601,12 +676,12 @@ export declare class RecordsServer {
601
676
  readonly success: false;
602
677
  readonly errorCode: "unacceptable_request";
603
678
  readonly errorMessage: "address is required and must be a string.";
604
- }, any>;
605
- getData: Procedure<{
606
- recordName?: string;
607
- address?: string;
608
- instances?: string[];
609
- }, import("./AuthController").ValidateSessionKeyFailure | import("./DataRecordsController").GetDataSuccess | import("./DataRecordsController").GetDataFailure | {
679
+ }, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
680
+ getData: Procedure<z.ZodObject<{
681
+ recordName: z.ZodString;
682
+ address: z.ZodString;
683
+ instances: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodArray<z.ZodString>>>;
684
+ }, z.core.$strip>, import("./AuthController").ValidateSessionKeyFailure | import("./DataRecordsController").GetDataSuccess | import("./DataRecordsController").GetDataFailure | {
610
685
  readonly success: false;
611
686
  readonly errorCode: "unacceptable_request";
612
687
  readonly errorMessage: "recordName is required and must be a string.";
@@ -614,14 +689,17 @@ export declare class RecordsServer {
614
689
  readonly success: false;
615
690
  readonly errorCode: "unacceptable_request";
616
691
  readonly errorMessage: "address is required and must be a string.";
617
- }, any>;
618
- listData: Procedure<{
619
- recordName?: string;
620
- address?: string;
621
- marker?: string;
622
- sort?: "ascending" | "descending";
623
- instances?: string[];
624
- }, import("./AuthController").ValidateSessionKeyFailure | import("./DataRecordsController").ListDataSuccess | import("./DataRecordsController").ListDataFailure | {
692
+ }, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
693
+ listData: Procedure<z.ZodObject<{
694
+ recordName: z.ZodString;
695
+ address: z.ZodOptional<z.ZodNullable<z.ZodString>>;
696
+ marker: z.ZodOptional<z.ZodString>;
697
+ sort: z.ZodOptional<z.ZodEnum<{
698
+ ascending: "ascending";
699
+ descending: "descending";
700
+ }>>;
701
+ instances: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodArray<z.ZodString>>>;
702
+ }, z.core.$strip>, import("./AuthController").ValidateSessionKeyFailure | import("./DataRecordsController").ListDataSuccess | import("./DataRecordsController").ListDataFailure | {
625
703
  readonly success: false;
626
704
  readonly errorCode: "unacceptable_request";
627
705
  readonly errorMessage: "recordName is required and must be a string.";
@@ -629,16 +707,16 @@ export declare class RecordsServer {
629
707
  readonly success: false;
630
708
  readonly errorCode: "unacceptable_request";
631
709
  readonly errorMessage: "address must be null or a string.";
632
- }, any>;
633
- recordData: Procedure<{
634
- recordKey?: string;
635
- address?: string;
636
- data?: any;
637
- updatePolicy?: true | string[];
638
- deletePolicy?: true | string[];
639
- markers?: [string, ...string[]];
640
- instances?: string[];
641
- }, import("./AuthController").ValidateSessionKeyFailure | import("./DataRecordsController").RecordDataSuccess | import("./DataRecordsController").RecordDataFailure | {
710
+ }, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
711
+ recordData: Procedure<z.ZodObject<{
712
+ recordKey: z.ZodString;
713
+ address: z.ZodString;
714
+ data: z.ZodAny;
715
+ updatePolicy: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<true>, z.ZodArray<z.ZodString>]>>;
716
+ deletePolicy: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<true>, z.ZodArray<z.ZodString>]>>;
717
+ markers: z.ZodOptional<z.ZodArray<z.ZodString>>;
718
+ instances: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodArray<z.ZodString>>>;
719
+ }, z.core.$strip>, import("./AuthController").ValidateSessionKeyFailure | import("./DataRecordsController").RecordDataSuccess | import("./DataRecordsController").RecordDataFailure | {
642
720
  readonly success: false;
643
721
  readonly errorCode: "unacceptable_request";
644
722
  readonly errorMessage: "recordKey is required and must be a string.";
@@ -650,302 +728,365 @@ export declare class RecordsServer {
650
728
  readonly success: false;
651
729
  readonly errorCode: "unacceptable_request";
652
730
  readonly errorMessage: "data is required.";
653
- }, any>;
654
- recordWebhook: Procedure<{
655
- recordName?: string;
656
- item?: {
657
- address?: string;
658
- targetResourceKind?: "data" | "file";
659
- targetRecordName?: string;
660
- targetAddress?: string;
661
- markers?: [string, ...string[]];
662
- } | {
663
- address?: string;
664
- targetResourceKind?: "inst";
665
- targetRecordName?: string;
666
- targetAddress?: string;
667
- markers?: [string, ...string[]];
668
- };
669
- instances?: string[];
670
- }, import("./crud").CrudRecordItemResult, any>;
671
- getWebhook: Procedure<{
672
- recordName?: string;
673
- address?: string;
674
- instances?: string[];
675
- }, import("./crud").CrudGetItemResult<any>, any>;
676
- listWebhooks: Procedure<{
677
- recordName?: string;
678
- address?: string;
679
- marker?: string;
680
- sort?: "ascending" | "descending";
681
- instances?: string[];
682
- }, import("./AuthController").ValidateSessionKeyFailure | import("./crud").CrudListItemsFailure | import("./crud").CrudListItemsSuccess<any> | {
731
+ }, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
732
+ recordWebhook: Procedure<z.ZodObject<{
733
+ recordName: z.ZodString;
734
+ item: z.ZodNonOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
735
+ address: z.ZodString;
736
+ targetResourceKind: z.ZodEnum<{
737
+ data: "data";
738
+ file: "file";
739
+ }>;
740
+ targetRecordName: z.ZodString;
741
+ targetAddress: z.ZodString;
742
+ markers: z.ZodPrefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
743
+ }, z.core.$strip>, z.ZodObject<{
744
+ address: z.ZodString;
745
+ targetResourceKind: z.ZodLiteral<"inst">;
746
+ targetRecordName: z.ZodNullable<z.ZodOptional<z.ZodString>>;
747
+ targetAddress: z.ZodString;
748
+ markers: z.ZodPrefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
749
+ }, z.core.$strip>], "targetResourceKind">>;
750
+ instances: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodArray<z.ZodString>>>;
751
+ }, z.core.$strip>, import("./crud").CrudRecordItemResult, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
752
+ getWebhook: Procedure<z.ZodObject<{
753
+ recordName: z.ZodString;
754
+ address: z.ZodString;
755
+ instances: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodArray<z.ZodString>>>;
756
+ }, z.core.$strip>, import("./crud").CrudGetItemResult<any>, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
757
+ listWebhooks: Procedure<z.ZodObject<{
758
+ recordName: z.ZodString;
759
+ address: z.ZodOptional<z.ZodNullable<z.ZodString>>;
760
+ marker: z.ZodOptional<z.ZodString>;
761
+ sort: z.ZodOptional<z.ZodEnum<{
762
+ ascending: "ascending";
763
+ descending: "descending";
764
+ }>>;
765
+ instances: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodArray<z.ZodString>>>;
766
+ }, z.core.$strip>, import("./AuthController").ValidateSessionKeyFailure | import("./crud").CrudListItemsFailure | import("./crud").CrudListItemsSuccess<any> | {
683
767
  success: false;
684
768
  errorCode: "not_supported";
685
769
  errorMessage: string;
686
- }, any>;
687
- runWebhook: Procedure<any, import("./AuthController").ValidateSessionKeyFailure | import("./webhooks/WebhookRecordsController").HandleWebhookFailure | {
770
+ }, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
771
+ runWebhook: Procedure<z.ZodAny, import("./AuthController").ValidateSessionKeyFailure | import("./webhooks/WebhookRecordsController").HandleWebhookFailure | {
688
772
  success: true;
689
773
  response: GenericHttpResponse;
690
- }, z.objectOutputType<{
774
+ }, z.ZodObject<{
775
+ recordName: z.ZodString;
776
+ address: z.ZodString;
777
+ instances: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodArray<z.ZodString>>>;
778
+ }, z.core.$catchall<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>>>;
779
+ eraseWebhook: Procedure<z.ZodObject<{
691
780
  recordName: z.ZodString;
692
781
  address: z.ZodString;
693
- instances: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], unknown>>;
694
- }, z.ZodString, "strip">>;
695
- eraseWebhook: Procedure<{
696
- recordName?: string;
697
- address?: string;
698
- instances?: string[];
699
- }, import("./crud").CrudEraseItemResult, any>;
700
- listWebhookRuns: Procedure<{
701
- recordName?: string;
702
- address?: string;
703
- requestTimeMs?: number;
704
- instances?: string[];
705
- }, import("./AuthController").ValidateSessionKeyFailure | import("./crud").CrudListItemsFailure | import("./crud").CrudListItemsSuccess<import("./webhooks").WebhookRunInfo> | {
782
+ instances: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodArray<z.ZodString>>>;
783
+ }, z.core.$strip>, import("./crud").CrudEraseItemResult, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
784
+ listWebhookRuns: Procedure<z.ZodObject<{
785
+ recordName: z.ZodString;
786
+ address: z.ZodString;
787
+ requestTimeMs: z.ZodOptional<z.ZodInt>;
788
+ instances: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodArray<z.ZodString>>>;
789
+ }, z.core.$strip>, import("./AuthController").ValidateSessionKeyFailure | import("./crud").CrudListItemsFailure | import("./crud").CrudListItemsSuccess<import("./webhooks").WebhookRunInfo> | {
706
790
  success: false;
707
791
  errorCode: "not_supported";
708
792
  errorMessage: string;
709
- }, any>;
710
- getWebhookRun: Procedure<{
711
- runId?: string;
712
- instances?: string[];
713
- }, import("./AuthController").ValidateSessionKeyFailure | import("./webhooks/WebhookRecordsController").GetWebhookRunSuccess | import("./webhooks/WebhookRecordsController").GetWebhookRunFailure | {
793
+ }, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
794
+ getWebhookRun: Procedure<z.ZodObject<{
795
+ runId: z.ZodString;
796
+ instances: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodArray<z.ZodString>>>;
797
+ }, z.core.$strip>, import("./AuthController").ValidateSessionKeyFailure | import("./webhooks/WebhookRecordsController").GetWebhookRunSuccess | import("./webhooks/WebhookRecordsController").GetWebhookRunFailure | {
714
798
  success: false;
715
799
  errorCode: "not_supported";
716
800
  errorMessage: string;
717
- }, any>;
718
- recordNotification: Procedure<{
719
- recordName?: string;
720
- item?: {
721
- address?: string;
722
- description?: string;
723
- markers?: [string, ...string[]];
724
- };
725
- instances?: string[];
726
- }, import("./crud").CrudRecordItemResult, any>;
727
- getNotification: Procedure<{
728
- recordName?: string;
729
- address?: string;
730
- instances?: string[];
731
- }, import("./crud").CrudGetItemResult<any>, any>;
732
- listNotifications: Procedure<{
733
- recordName?: string;
734
- address?: string;
735
- marker?: string;
736
- sort?: "ascending" | "descending";
737
- instances?: string[];
738
- }, import("./AuthController").ValidateSessionKeyFailure | import("./crud").CrudListItemsFailure | import("./crud").CrudListItemsSuccess<any> | {
801
+ }, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
802
+ recordNotification: Procedure<z.ZodObject<{
803
+ recordName: z.ZodString;
804
+ item: z.ZodNonOptional<z.ZodObject<{
805
+ address: z.ZodString;
806
+ description: z.ZodString;
807
+ markers: z.ZodPrefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
808
+ }, z.core.$strip>>;
809
+ instances: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodArray<z.ZodString>>>;
810
+ }, z.core.$strip>, import("./crud").CrudRecordItemResult, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
811
+ getNotification: Procedure<z.ZodObject<{
812
+ recordName: z.ZodString;
813
+ address: z.ZodString;
814
+ instances: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodArray<z.ZodString>>>;
815
+ }, z.core.$strip>, import("./crud").CrudGetItemResult<any>, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
816
+ listNotifications: Procedure<z.ZodObject<{
817
+ recordName: z.ZodString;
818
+ address: z.ZodOptional<z.ZodNullable<z.ZodString>>;
819
+ marker: z.ZodOptional<z.ZodString>;
820
+ sort: z.ZodOptional<z.ZodEnum<{
821
+ ascending: "ascending";
822
+ descending: "descending";
823
+ }>>;
824
+ instances: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodArray<z.ZodString>>>;
825
+ }, z.core.$strip>, import("./AuthController").ValidateSessionKeyFailure | import("./crud").CrudListItemsFailure | import("./crud").CrudListItemsSuccess<any> | {
739
826
  success: false;
740
827
  errorCode: "not_supported";
741
828
  errorMessage: string;
742
- }, any>;
743
- listNotificationSubscriptions: Procedure<{
744
- recordName?: string;
745
- address?: string;
746
- instances?: string[];
747
- }, import("./notifications").ListSubscriptionsResult, any>;
748
- listUserNotificationSubscriptions: Procedure<{
749
- instances?: string[];
750
- }, import("./notifications").ListSubscriptionsResult, any>;
751
- eraseNotification: Procedure<{
752
- recordName?: string;
753
- address?: string;
754
- instances?: string[];
755
- }, import("./crud").CrudEraseItemResult, any>;
756
- registerPushSubscription: Procedure<{
757
- pushSubscription?: {
758
- endpoint?: string;
759
- expirationTime?: number;
760
- keys?: Record<string, string>;
761
- };
762
- instances?: string[];
763
- }, import("./notifications").RegisterPushSubscriptionResult, any>;
764
- subscribeToNotification: Procedure<{
765
- recordName?: string;
766
- address?: string;
767
- instances?: string[];
768
- pushSubscription?: {
769
- endpoint?: string;
770
- expirationTime?: number;
771
- keys?: Record<string, string>;
772
- };
773
- }, import("./notifications").SubscribeToNotificationResult, any>;
774
- unsubscribeFromNotification: Procedure<{
775
- subscriptionId?: string;
776
- instances?: string[];
777
- }, import("./notifications").UnsubscribeToNotificationResult, any>;
778
- sendNotification: Procedure<{
779
- recordName?: string;
780
- address?: string;
781
- instances?: string[];
782
- payload?: {
783
- title?: string;
784
- body?: string;
785
- icon?: string;
786
- badge?: string;
787
- silent?: boolean;
788
- tag?: string;
789
- timestamp?: number;
790
- action?: {
791
- type?: "open_url";
792
- url?: string;
793
- } | {
794
- type?: "webhook";
795
- method?: "GET" | "POST";
796
- url?: string;
797
- headers?: Record<string, string>;
798
- };
799
- actions?: {
800
- title?: string;
801
- icon?: string;
802
- action?: {
803
- type?: "open_url";
804
- url?: string;
805
- } | {
806
- type?: "webhook";
807
- method?: "GET" | "POST";
808
- url?: string;
809
- headers?: Record<string, string>;
810
- };
811
- }[];
812
- };
813
- topic?: string;
814
- }, import("./notifications").SendNotificationResult, any>;
829
+ }, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
830
+ listNotificationSubscriptions: Procedure<z.ZodObject<{
831
+ recordName: z.ZodString;
832
+ address: z.ZodString;
833
+ instances: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodArray<z.ZodString>>>;
834
+ }, z.core.$strip>, import("./notifications").ListSubscriptionsResult, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
835
+ listUserNotificationSubscriptions: Procedure<z.ZodObject<{
836
+ instances: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodArray<z.ZodString>>>;
837
+ }, z.core.$strip>, import("./notifications").ListSubscriptionsResult, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
838
+ eraseNotification: Procedure<z.ZodObject<{
839
+ recordName: z.ZodString;
840
+ address: z.ZodString;
841
+ instances: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodArray<z.ZodString>>>;
842
+ }, z.core.$strip>, import("./crud").CrudEraseItemResult, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
843
+ registerPushSubscription: Procedure<z.ZodObject<{
844
+ pushSubscription: z.ZodObject<{
845
+ endpoint: z.ZodString;
846
+ expirationTime: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
847
+ keys: z.ZodRecord<z.ZodString, z.ZodString>;
848
+ }, z.core.$strip>;
849
+ instances: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodArray<z.ZodString>>>;
850
+ }, z.core.$strip>, import("./notifications").RegisterPushSubscriptionResult, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
851
+ subscribeToNotification: Procedure<z.ZodObject<{
852
+ recordName: z.ZodString;
853
+ address: z.ZodString;
854
+ instances: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodArray<z.ZodString>>>;
855
+ pushSubscription: z.ZodObject<{
856
+ endpoint: z.ZodString;
857
+ expirationTime: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
858
+ keys: z.ZodRecord<z.ZodString, z.ZodString>;
859
+ }, z.core.$strip>;
860
+ }, z.core.$strip>, import("./notifications").SubscribeToNotificationResult, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
861
+ unsubscribeFromNotification: Procedure<z.ZodObject<{
862
+ subscriptionId: z.ZodString;
863
+ instances: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodArray<z.ZodString>>>;
864
+ }, z.core.$strip>, import("./notifications").UnsubscribeToNotificationResult, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
865
+ sendNotification: Procedure<z.ZodObject<{
866
+ recordName: z.ZodString;
867
+ address: z.ZodString;
868
+ instances: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodArray<z.ZodString>>>;
869
+ payload: z.ZodObject<{
870
+ title: z.ZodString;
871
+ body: z.ZodString;
872
+ icon: z.ZodNullable<z.ZodOptional<z.ZodString>>;
873
+ badge: z.ZodNullable<z.ZodOptional<z.ZodString>>;
874
+ silent: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
875
+ tag: z.ZodNullable<z.ZodOptional<z.ZodString>>;
876
+ timestamp: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
877
+ action: z.ZodNullable<z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
878
+ type: z.ZodLiteral<"open_url">;
879
+ url: z.ZodString;
880
+ }, z.core.$strip>, z.ZodObject<{
881
+ type: z.ZodLiteral<"webhook">;
882
+ method: z.ZodEnum<{
883
+ GET: "GET";
884
+ POST: "POST";
885
+ }>;
886
+ url: z.ZodString;
887
+ headers: z.ZodNullable<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>>;
888
+ }, z.core.$strip>], "type">>>;
889
+ actions: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodObject<{
890
+ title: z.ZodString;
891
+ icon: z.ZodNullable<z.ZodOptional<z.ZodString>>;
892
+ action: z.ZodDiscriminatedUnion<[z.ZodObject<{
893
+ type: z.ZodLiteral<"open_url">;
894
+ url: z.ZodString;
895
+ }, z.core.$strip>, z.ZodObject<{
896
+ type: z.ZodLiteral<"webhook">;
897
+ method: z.ZodEnum<{
898
+ GET: "GET";
899
+ POST: "POST";
900
+ }>;
901
+ url: z.ZodString;
902
+ headers: z.ZodNullable<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>>;
903
+ }, z.core.$strip>], "type">;
904
+ }, z.core.$strip>>>>;
905
+ }, z.core.$strip>;
906
+ topic: z.ZodOptional<z.ZodString>;
907
+ }, z.core.$strip>, import("./notifications").SendNotificationResult, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
815
908
  getNotificationsApplicationServerKey: Procedure<void, import("./notifications").GetApplicationServerKeyResult, void>;
816
- getPackage: Procedure<{
817
- recordName?: string;
818
- address?: string;
819
- instances?: string[];
820
- }, import("./crud").CrudGetItemResult<any>, any>;
821
- recordPackage: Procedure<{
822
- recordName?: string;
823
- item?: {
824
- address?: string;
825
- markers?: [string, ...string[]];
826
- };
827
- instances?: string[];
828
- }, import("./crud").CrudRecordItemResult, any>;
829
- erasePackage: Procedure<{
830
- recordName?: string;
831
- address?: string;
832
- instances?: string[];
833
- }, import("./crud").CrudEraseItemResult, any>;
834
- listPackages: Procedure<{
835
- recordName?: string;
836
- address?: string;
837
- marker?: string;
838
- sort?: "ascending" | "descending";
839
- instances?: string[];
840
- }, import("./AuthController").ValidateSessionKeyFailure | import("./crud").CrudListItemsFailure | import("./crud").CrudListItemsSuccess<any> | {
909
+ getPackage: Procedure<z.ZodObject<{
910
+ recordName: z.ZodString;
911
+ address: z.ZodString;
912
+ instances: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodArray<z.ZodString>>>;
913
+ }, z.core.$strip>, import("./crud").CrudGetItemResult<any>, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
914
+ recordPackage: Procedure<z.ZodObject<{
915
+ recordName: z.ZodString;
916
+ item: z.ZodNonOptional<z.ZodObject<{
917
+ address: z.ZodString;
918
+ markers: z.ZodArray<z.ZodString>;
919
+ }, z.core.$strip>>;
920
+ instances: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodArray<z.ZodString>>>;
921
+ }, z.core.$strip>, import("./crud").CrudRecordItemResult, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
922
+ erasePackage: Procedure<z.ZodObject<{
923
+ recordName: z.ZodString;
924
+ address: z.ZodString;
925
+ instances: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodArray<z.ZodString>>>;
926
+ }, z.core.$strip>, import("./crud").CrudEraseItemResult, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
927
+ listPackages: Procedure<z.ZodObject<{
928
+ recordName: z.ZodString;
929
+ address: z.ZodOptional<z.ZodNullable<z.ZodString>>;
930
+ marker: z.ZodOptional<z.ZodString>;
931
+ sort: z.ZodOptional<z.ZodEnum<{
932
+ ascending: "ascending";
933
+ descending: "descending";
934
+ }>>;
935
+ instances: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodArray<z.ZodString>>>;
936
+ }, z.core.$strip>, import("./AuthController").ValidateSessionKeyFailure | import("./crud").CrudListItemsFailure | import("./crud").CrudListItemsSuccess<any> | {
841
937
  success: false;
842
938
  errorCode: "not_supported";
843
939
  errorMessage: string;
844
- }, any>;
845
- getPackageVersion: Procedure<{
846
- recordName?: string;
847
- address?: string;
848
- major?: number;
849
- minor?: number;
850
- patch?: number;
851
- tag?: string;
852
- sha256?: string;
853
- instances?: string[];
854
- key?: string;
855
- }, import("./packages/version/PackageVersionRecordsController").GetPackageVersionResult, any>;
856
- recordPackageVersion: Procedure<{
857
- recordName?: string;
858
- item?: {
859
- address?: string;
860
- key?: {
861
- major?: number;
862
- minor?: number;
863
- patch?: number;
864
- tag?: string;
865
- };
866
- auxFileRequest?: {
867
- fileSha256Hex?: string;
868
- fileByteLength?: number;
869
- fileMimeType?: string;
870
- fileDescription?: string;
871
- };
872
- entitlements?: {
873
- feature?: "search" | "inst" | "data" | "event" | "file" | "webhook" | "notification" | "package" | "database" | "permissions" | "ai";
874
- scope?: "shared" | "personal" | "owned" | "studio" | "designated";
875
- designatedRecords?: string[];
876
- }[];
877
- description?: string;
878
- markers?: [string, ...string[]];
879
- };
880
- instances?: string[];
881
- }, import("./packages/version/PackageVersionRecordsController").RecordPackageVersionResult, any>;
882
- listPackageVersions: Procedure<{
883
- recordName?: string;
884
- address?: string;
885
- instances?: string[];
886
- }, import("./AuthController").ValidateSessionKeyFailure | import("./crud").CrudListItemsFailure | import("./crud").CrudListItemsSuccess<import("./packages/version/PackageVersionRecordsStore").PackageRecordVersion> | {
940
+ }, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
941
+ getPackageVersion: Procedure<z.ZodObject<{
942
+ recordName: z.ZodString;
943
+ address: z.ZodString;
944
+ major: z.ZodNullable<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
945
+ minor: z.ZodNullable<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
946
+ patch: z.ZodNullable<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
947
+ tag: z.ZodNullable<z.ZodOptional<z.ZodString>>;
948
+ sha256: z.ZodOptional<z.ZodString>;
949
+ instances: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodArray<z.ZodString>>>;
950
+ key: z.ZodOptional<z.ZodString>;
951
+ }, z.core.$strip>, import("./packages/version/PackageVersionRecordsController").GetPackageVersionResult, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
952
+ recordPackageVersion: Procedure<z.ZodObject<{
953
+ recordName: z.ZodString;
954
+ item: z.ZodObject<{
955
+ address: z.ZodString;
956
+ key: z.ZodObject<{
957
+ major: z.ZodInt;
958
+ minor: z.ZodInt;
959
+ patch: z.ZodInt;
960
+ tag: z.ZodPrefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
961
+ }, z.core.$strip>;
962
+ auxFileRequest: z.ZodObject<{
963
+ fileSha256Hex: z.ZodString;
964
+ fileByteLength: z.ZodInt;
965
+ fileMimeType: z.ZodString;
966
+ fileDescription: z.ZodOptional<z.ZodString>;
967
+ }, z.core.$strip>;
968
+ entitlements: z.ZodArray<z.ZodObject<{
969
+ feature: z.ZodEnum<{
970
+ search: "search";
971
+ inst: "inst";
972
+ file: "file";
973
+ event: "event";
974
+ data: "data";
975
+ webhook: "webhook";
976
+ notification: "notification";
977
+ package: "package";
978
+ database: "database";
979
+ permissions: "permissions";
980
+ ai: "ai";
981
+ }>;
982
+ scope: z.ZodEnum<{
983
+ shared: "shared";
984
+ personal: "personal";
985
+ owned: "owned";
986
+ studio: "studio";
987
+ designated: "designated";
988
+ }>;
989
+ designatedRecords: z.ZodOptional<z.ZodArray<z.ZodString>>;
990
+ }, z.core.$strip>>;
991
+ description: z.ZodString;
992
+ markers: z.ZodOptional<z.ZodArray<z.ZodString>>;
993
+ }, z.core.$strip>;
994
+ instances: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodArray<z.ZodString>>>;
995
+ }, z.core.$strip>, import("./packages/version/PackageVersionRecordsController").RecordPackageVersionResult, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
996
+ listPackageVersions: Procedure<z.ZodObject<{
997
+ recordName: z.ZodString;
998
+ address: z.ZodString;
999
+ instances: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodArray<z.ZodString>>>;
1000
+ }, z.core.$strip>, import("./AuthController").ValidateSessionKeyFailure | import("./crud").CrudListItemsFailure | import("./crud").CrudListItemsSuccess<import("./packages/version/PackageVersionRecordsStore").PackageRecordVersion> | {
887
1001
  success: false;
888
1002
  errorCode: "not_supported";
889
1003
  errorMessage: string;
890
- }, any>;
891
- erasePackageVersion: Procedure<{
892
- recordName?: string;
893
- address?: string;
894
- key?: {
895
- major?: number;
896
- minor?: number;
897
- patch?: number;
898
- tag?: string;
899
- };
900
- instances?: string[];
901
- }, import("./crud").CrudEraseItemResult, any>;
902
- reviewPackageVersion: Procedure<{
903
- packageVersionId?: string;
904
- review?: {
905
- id?: string;
906
- approved?: boolean;
907
- approvalType?: "normal" | "super";
908
- reviewStatus?: "pending" | "approved" | "rejected";
909
- reviewComments?: string;
910
- };
911
- }, import("./packages/version/PackageVersionRecordsController").ReviewPackageVersionResult, any>;
912
- installPackage: Procedure<{
913
- recordName?: string;
914
- inst?: string;
915
- branch?: string;
916
- instances?: string[];
917
- package?: {
918
- recordName?: string;
919
- address?: string;
920
- key?: string | {
921
- major?: number;
922
- minor?: number;
923
- patch?: number;
924
- tag?: string;
925
- sha256?: string;
926
- };
927
- };
928
- }, import("./AuthController").ValidateSessionKeyFailure | import("./websockets/WebsocketController").LoadPackageResult | {
1004
+ }, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
1005
+ erasePackageVersion: Procedure<z.ZodObject<{
1006
+ recordName: z.ZodString;
1007
+ address: z.ZodString;
1008
+ key: z.ZodObject<{
1009
+ major: z.ZodInt;
1010
+ minor: z.ZodInt;
1011
+ patch: z.ZodInt;
1012
+ tag: z.ZodPrefault<z.ZodString>;
1013
+ }, z.core.$strip>;
1014
+ instances: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodArray<z.ZodString>>>;
1015
+ }, z.core.$strip>, import("./crud").CrudEraseItemResult, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
1016
+ reviewPackageVersion: Procedure<z.ZodObject<{
1017
+ packageVersionId: z.ZodString;
1018
+ review: z.ZodObject<{
1019
+ id: z.ZodOptional<z.ZodString>;
1020
+ approved: z.ZodBoolean;
1021
+ approvalType: z.ZodNullable<z.ZodEnum<{
1022
+ normal: "normal";
1023
+ super: "super";
1024
+ }>>;
1025
+ reviewStatus: z.ZodEnum<{
1026
+ pending: "pending";
1027
+ rejected: "rejected";
1028
+ approved: "approved";
1029
+ }>;
1030
+ reviewComments: z.ZodString;
1031
+ }, z.core.$strip>;
1032
+ }, z.core.$strip>, import("./packages/version/PackageVersionRecordsController").ReviewPackageVersionResult, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
1033
+ installPackage: Procedure<z.ZodObject<{
1034
+ recordName: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1035
+ inst: z.ZodString;
1036
+ branch: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1037
+ instances: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodArray<z.ZodString>>>;
1038
+ downgrade: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
1039
+ package: z.ZodObject<{
1040
+ recordName: z.ZodString;
1041
+ address: z.ZodString;
1042
+ key: z.ZodNullable<z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
1043
+ major: z.ZodNullable<z.ZodOptional<z.ZodInt>>;
1044
+ minor: z.ZodNullable<z.ZodOptional<z.ZodInt>>;
1045
+ patch: z.ZodNullable<z.ZodOptional<z.ZodInt>>;
1046
+ tag: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1047
+ sha256: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1048
+ }, z.core.$strip>]>>>;
1049
+ }, z.core.$strip>;
1050
+ }, z.core.$strip>, import("./AuthController").ValidateSessionKeyFailure | import("./websockets/WebsocketController").LoadPackageResult | {
929
1051
  success: false;
930
1052
  errorCode: "not_supported";
931
1053
  errorMessage: string;
932
- }, any>;
933
- listInstalledPackages: Procedure<{
934
- recordName?: string;
935
- inst?: string;
936
- instances?: string[];
937
- }, import("./AuthController").ValidateSessionKeyFailure | import("./websockets/WebsocketController").ListInstalledPackagesResult | {
1054
+ }, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
1055
+ listInstalledPackages: Procedure<z.ZodObject<{
1056
+ recordName: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1057
+ inst: z.ZodString;
1058
+ instances: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodArray<z.ZodString>>>;
1059
+ }, z.core.$strip>, import("./AuthController").ValidateSessionKeyFailure | import("./websockets/WebsocketController").ListInstalledPackagesResult | {
938
1060
  success: false;
939
1061
  errorCode: "not_supported";
940
1062
  errorMessage: string;
941
- }, any>;
942
- recordSearchCollection: Procedure<{
943
- recordName?: string;
944
- item?: {
945
- address?: string;
946
- markers?: [string, ...string[]];
947
- schema?: z.objectOutputType<{}, z.ZodObject<{
948
- type: z.ZodEnum<["string", "string[]", "int32", "int32[]", "int64", "int64[]", "float", "float[]", "bool", "bool[]", "geopoint", "geopoint[]", "geopolygon", "object", "object[]", "string*", "image", "auto"]>;
1063
+ }, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
1064
+ recordSearchCollection: Procedure<z.ZodObject<{
1065
+ recordName: z.ZodString;
1066
+ item: z.ZodNonOptional<z.ZodObject<{
1067
+ address: z.ZodString;
1068
+ markers: z.ZodArray<z.ZodString>;
1069
+ schema: z.ZodObject<{}, z.core.$catchall<z.ZodObject<{
1070
+ type: z.ZodEnum<{
1071
+ string: "string";
1072
+ object: "object";
1073
+ image: "image";
1074
+ float: "float";
1075
+ auto: "auto";
1076
+ int32: "int32";
1077
+ int64: "int64";
1078
+ "string[]": "string[]";
1079
+ "int32[]": "int32[]";
1080
+ "int64[]": "int64[]";
1081
+ "float[]": "float[]";
1082
+ bool: "bool";
1083
+ "bool[]": "bool[]";
1084
+ geopoint: "geopoint";
1085
+ "geopoint[]": "geopoint[]";
1086
+ geopolygon: "geopolygon";
1087
+ "object[]": "object[]";
1088
+ "string*": "string*";
1089
+ }>;
949
1090
  optional: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
950
1091
  index: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
951
1092
  store: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
@@ -954,401 +1095,641 @@ export declare class RecordsServer {
954
1095
  locale: z.ZodNullable<z.ZodOptional<z.ZodString>>;
955
1096
  stem: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
956
1097
  drop: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
957
- }, "strip", z.ZodTypeAny, {
958
- type?: "string" | "object" | "float" | "auto" | "image" | "string[]" | "int32" | "int32[]" | "int64" | "int64[]" | "float[]" | "bool" | "bool[]" | "geopoint" | "geopoint[]" | "geopolygon" | "object[]" | "string*";
959
- optional?: boolean;
960
- index?: boolean;
961
- store?: boolean;
962
- sort?: boolean;
963
- infix?: boolean;
964
- locale?: string;
965
- stem?: boolean;
966
- drop?: boolean;
967
- }, {
968
- type?: "string" | "object" | "float" | "auto" | "image" | "string[]" | "int32" | "int32[]" | "int64" | "int64[]" | "float[]" | "bool" | "bool[]" | "geopoint" | "geopoint[]" | "geopolygon" | "object[]" | "string*";
969
- optional?: boolean;
970
- index?: boolean;
971
- store?: boolean;
972
- sort?: boolean;
973
- infix?: boolean;
974
- locale?: string;
975
- stem?: boolean;
976
- drop?: boolean;
977
- }>, "strip">;
978
- };
979
- instances?: string[];
980
- }, import("./crud").CrudRecordItemResult, any>;
981
- getSearchCollection: Procedure<{
982
- recordName?: string;
983
- address?: string;
984
- instances?: string[];
985
- }, import("./crud").CrudGetItemResult<any>, any>;
986
- eraseSearchCollection: Procedure<{
987
- recordName?: string;
988
- address?: string;
989
- instances?: string[];
990
- }, import("./crud").CrudEraseItemResult, any>;
991
- listSearchCollections: Procedure<{
992
- recordName?: string;
993
- address?: string;
994
- marker?: string;
995
- sort?: "ascending" | "descending";
996
- instances?: string[];
997
- }, import("./AuthController").ValidateSessionKeyFailure | import("./crud").CrudListItemsFailure | import("./crud").CrudListItemsSuccess<any> | {
1098
+ }, z.core.$strip>>>;
1099
+ }, z.core.$strip>>;
1100
+ instances: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodArray<z.ZodString>>>;
1101
+ }, z.core.$strip>, import("./crud").CrudRecordItemResult, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
1102
+ getSearchCollection: Procedure<z.ZodObject<{
1103
+ recordName: z.ZodString;
1104
+ address: z.ZodString;
1105
+ instances: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodArray<z.ZodString>>>;
1106
+ }, z.core.$strip>, import("./crud").CrudGetItemResult<any>, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
1107
+ eraseSearchCollection: Procedure<z.ZodObject<{
1108
+ recordName: z.ZodString;
1109
+ address: z.ZodString;
1110
+ instances: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodArray<z.ZodString>>>;
1111
+ }, z.core.$strip>, import("./crud").CrudEraseItemResult, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
1112
+ listSearchCollections: Procedure<z.ZodObject<{
1113
+ recordName: z.ZodString;
1114
+ address: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1115
+ marker: z.ZodOptional<z.ZodString>;
1116
+ sort: z.ZodOptional<z.ZodEnum<{
1117
+ ascending: "ascending";
1118
+ descending: "descending";
1119
+ }>>;
1120
+ instances: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodArray<z.ZodString>>>;
1121
+ }, z.core.$strip>, import("./AuthController").ValidateSessionKeyFailure | import("./crud").CrudListItemsFailure | import("./crud").CrudListItemsSuccess<any> | {
998
1122
  success: false;
999
1123
  errorCode: "not_supported";
1000
1124
  errorMessage: string;
1001
- }, any>;
1002
- recordSearchDocument: Procedure<{
1003
- recordName?: string;
1004
- address?: string;
1005
- document?: z.objectOutputType<{
1125
+ }, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
1126
+ recordSearchDocument: Procedure<z.ZodObject<{
1127
+ recordName: z.ZodString;
1128
+ address: z.ZodString;
1129
+ document: z.ZodObject<{
1006
1130
  recordName: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1007
1131
  address: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1008
- resourceKind: z.ZodNullable<z.ZodOptional<z.ZodEnum<["data", "file", "event", "marker", "role", "inst", "loom", "ai.sloyd", "ai.hume", "ai.openai.realtime", "webhook", "notification", "package", "package.version", "search", "database"]>>>;
1009
- }, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodString, "many">, z.ZodArray<z.ZodNumber, "many">, z.ZodArray<z.ZodBoolean, "many">, z.ZodEffects<z.ZodObject<{}, "strip", z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>, z.objectOutputType<{}, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>, "strip">, z.objectInputType<{}, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>, "strip">>, z.objectOutputType<{}, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>, "strip">, z.objectInputType<{}, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>, "strip">>]>, "strip">;
1010
- instances?: string[];
1011
- }, import("./AuthController").ValidateSessionKeyFailure | {
1132
+ resourceKind: z.ZodNullable<z.ZodOptional<z.ZodEnum<{
1133
+ search: "search";
1134
+ inst: "inst";
1135
+ file: "file";
1136
+ event: "event";
1137
+ role: "role";
1138
+ data: "data";
1139
+ marker: "marker";
1140
+ loom: "loom";
1141
+ "ai.sloyd": "ai.sloyd";
1142
+ "ai.hume": "ai.hume";
1143
+ "ai.openai.realtime": "ai.openai.realtime";
1144
+ webhook: "webhook";
1145
+ notification: "notification";
1146
+ package: "package";
1147
+ "package.version": "package.version";
1148
+ database: "database";
1149
+ purchasableItem: "purchasableItem";
1150
+ contract: "contract";
1151
+ invoice: "invoice";
1152
+ }>>>;
1153
+ }, z.core.$catchall<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodString>, z.ZodArray<z.ZodNumber>, z.ZodArray<z.ZodBoolean>, z.ZodObject<{}, z.core.$catchall<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>]>>>;
1154
+ instances: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodArray<z.ZodString>>>;
1155
+ }, z.core.$strip>, import("./AuthController").ValidateSessionKeyFailure | {
1012
1156
  success: false;
1013
1157
  errorCode: "not_logged_in";
1014
1158
  errorMessage: "The user is not logged in. A session key must be provided for this operation.";
1015
- } | import("@casual-simulation/aux-common").GenericResult<import("./search").SearchDocumentInfo, import("@casual-simulation/aux-common").SimpleError>, any>;
1016
- eraseSearchDocument: Procedure<{
1017
- recordName?: string;
1018
- address?: string;
1019
- documentId?: string;
1020
- instances?: string[];
1021
- }, import("./AuthController").ValidateSessionKeyFailure | {
1159
+ } | import("@casual-simulation/aux-common").GenericResult<import("./search").SearchDocumentInfo, SimpleError>, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
1160
+ eraseSearchDocument: Procedure<z.ZodObject<{
1161
+ recordName: z.ZodString;
1162
+ address: z.ZodString;
1163
+ documentId: z.ZodString;
1164
+ instances: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodArray<z.ZodString>>>;
1165
+ }, z.core.$strip>, import("./AuthController").ValidateSessionKeyFailure | {
1022
1166
  success: false;
1023
1167
  errorCode: "not_logged_in";
1024
1168
  errorMessage: "The user is not logged in. A session key must be provided for this operation.";
1025
- } | import("@casual-simulation/aux-common").GenericResult<import("./search").SearchDocumentInfo, import("@casual-simulation/aux-common").SimpleError>, any>;
1026
- syncSearchRecord: Procedure<{
1027
- recordName?: string;
1028
- address?: string;
1029
- targetRecordName?: string;
1030
- targetResourceKind?: "data";
1031
- targetMarker?: string;
1032
- targetMapping?: [string, string, ...unknown[]][];
1033
- instances?: string[];
1034
- }, import("./AuthController").ValidateSessionKeyFailure | {
1169
+ } | import("@casual-simulation/aux-common").GenericResult<import("./search").SearchDocumentInfo, SimpleError>, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
1170
+ syncSearchRecord: Procedure<z.ZodObject<{
1171
+ recordName: z.ZodString;
1172
+ address: z.ZodString;
1173
+ targetRecordName: z.ZodString;
1174
+ targetResourceKind: z.ZodEnum<{
1175
+ data: "data";
1176
+ }>;
1177
+ targetMarker: z.ZodString;
1178
+ targetMapping: z.ZodArray<z.ZodTuple<[z.ZodString, z.ZodString], null>>;
1179
+ instances: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodArray<z.ZodString>>>;
1180
+ }, z.core.$strip>, import("./AuthController").ValidateSessionKeyFailure | {
1035
1181
  success: false;
1036
1182
  errorCode: "not_logged_in";
1037
1183
  errorMessage: "The user is not logged in. A session key must be provided for this operation.";
1038
1184
  } | import("@casual-simulation/aux-common").GenericResult<{
1039
1185
  syncId: string;
1040
- }, import("@casual-simulation/aux-common").SimpleError>, any>;
1041
- unsyncSearchRecord: Procedure<{
1042
- syncId?: string;
1043
- instances?: string[];
1044
- }, import("./AuthController").ValidateSessionKeyFailure | {
1186
+ }, SimpleError>, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
1187
+ unsyncSearchRecord: Procedure<z.ZodObject<{
1188
+ syncId: z.ZodString;
1189
+ instances: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodArray<z.ZodString>>>;
1190
+ }, z.core.$strip>, import("./AuthController").ValidateSessionKeyFailure | {
1045
1191
  success: false;
1046
1192
  errorCode: "not_logged_in";
1047
1193
  errorMessage: "The user is not logged in. A session key must be provided for this operation.";
1048
- } | import("@casual-simulation/aux-common").GenericResult<void, import("@casual-simulation/aux-common").SimpleError>, any>;
1049
- search: Procedure<{
1050
- recordName?: string;
1051
- address?: string;
1052
- query?: z.objectOutputType<{
1194
+ } | import("@casual-simulation/aux-common").GenericResult<void, SimpleError>, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
1195
+ search: Procedure<z.ZodObject<{
1196
+ recordName: z.ZodString;
1197
+ address: z.ZodString;
1198
+ query: z.ZodObject<{
1053
1199
  q: z.ZodString;
1054
1200
  queryBy: z.ZodString;
1055
1201
  filterBy: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1056
- }, z.ZodUnion<[z.ZodString, z.ZodBoolean, z.ZodNumber]>, "strip">;
1057
- instances?: string[];
1058
- }, import("./AuthController").ValidateSessionKeyFailure | import("@casual-simulation/aux-common").GenericResult<{
1202
+ }, z.core.$catchall<z.ZodUnion<readonly [z.ZodString, z.ZodBoolean, z.ZodNumber]>>>;
1203
+ instances: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodArray<z.ZodString>>>;
1204
+ }, z.core.$strip>, import("./AuthController").ValidateSessionKeyFailure | import("@casual-simulation/aux-common").GenericResult<{
1059
1205
  found: number;
1060
1206
  outOf: number;
1061
1207
  page: number;
1062
1208
  searchTimeMs: number;
1063
1209
  hits: import("./search").SearchHit[];
1064
- }, import("@casual-simulation/aux-common").SimpleError>, any>;
1065
- recordDatabase: Procedure<{
1066
- recordName?: string;
1067
- item?: {
1068
- address?: string;
1069
- markers?: [string, ...string[]];
1070
- };
1071
- instances?: string[];
1072
- }, import("./crud").CrudRecordItemResult, any>;
1073
- getDatabase: Procedure<{
1074
- recordName?: string;
1075
- address?: string;
1076
- instances?: string[];
1077
- }, import("./crud").CrudGetItemResult<any>, any>;
1078
- eraseDatabase: Procedure<{
1079
- recordName?: string;
1080
- address?: string;
1081
- instances?: string[];
1082
- }, import("./crud").CrudEraseItemResult, any>;
1083
- listDatabases: Procedure<{
1084
- recordName?: string;
1085
- address?: string;
1086
- marker?: string;
1087
- sort?: "ascending" | "descending";
1088
- instances?: string[];
1089
- }, import("./AuthController").ValidateSessionKeyFailure | import("./crud").CrudListItemsFailure | import("./crud").CrudListItemsSuccess<any> | {
1210
+ }, SimpleError>, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
1211
+ recordDatabase: Procedure<z.ZodObject<{
1212
+ recordName: z.ZodString;
1213
+ item: z.ZodNonOptional<z.ZodObject<{
1214
+ address: z.ZodString;
1215
+ markers: z.ZodArray<z.ZodString>;
1216
+ }, z.core.$strip>>;
1217
+ instances: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodArray<z.ZodString>>>;
1218
+ }, z.core.$strip>, import("./crud").CrudRecordItemResult, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
1219
+ getDatabase: Procedure<z.ZodObject<{
1220
+ recordName: z.ZodString;
1221
+ address: z.ZodString;
1222
+ instances: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodArray<z.ZodString>>>;
1223
+ }, z.core.$strip>, import("./crud").CrudGetItemResult<any>, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
1224
+ eraseDatabase: Procedure<z.ZodObject<{
1225
+ recordName: z.ZodString;
1226
+ address: z.ZodString;
1227
+ instances: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodArray<z.ZodString>>>;
1228
+ }, z.core.$strip>, import("./crud").CrudEraseItemResult, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
1229
+ listDatabases: Procedure<z.ZodObject<{
1230
+ recordName: z.ZodString;
1231
+ address: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1232
+ marker: z.ZodOptional<z.ZodString>;
1233
+ sort: z.ZodOptional<z.ZodEnum<{
1234
+ ascending: "ascending";
1235
+ descending: "descending";
1236
+ }>>;
1237
+ instances: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodArray<z.ZodString>>>;
1238
+ }, z.core.$strip>, import("./AuthController").ValidateSessionKeyFailure | import("./crud").CrudListItemsFailure | import("./crud").CrudListItemsSuccess<any> | {
1090
1239
  success: false;
1091
1240
  errorCode: "not_supported";
1092
1241
  errorMessage: string;
1093
- }, any>;
1094
- queryDatabase: Procedure<{
1095
- recordName?: string;
1096
- address?: string;
1097
- statements?: {
1098
- query?: string;
1099
- params?: any[];
1100
- }[];
1101
- readonly?: boolean;
1102
- automaticTransaction?: boolean;
1103
- instances?: string[];
1104
- }, import("./AuthController").ValidateSessionKeyFailure | import("@casual-simulation/aux-common").GenericResult<import("./database").QueryResult[], import("@casual-simulation/aux-common").SimpleError>, any>;
1105
- listRecords: Procedure<{
1106
- studioId?: string;
1107
- userId?: string;
1108
- }, import("./AuthController").ValidateSessionKeyFailure | import("./RecordsController").ListRecordsSuccess | import("./RecordsController").ListRecordsFailure | {
1242
+ }, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
1243
+ queryDatabase: Procedure<z.ZodObject<{
1244
+ recordName: z.ZodString;
1245
+ address: z.ZodString;
1246
+ statements: z.ZodArray<z.ZodObject<{
1247
+ query: z.ZodString;
1248
+ params: z.ZodPrefault<z.ZodOptional<z.ZodArray<z.ZodAny>>>;
1249
+ }, z.core.$strip>>;
1250
+ readonly: z.ZodPrefault<z.ZodBoolean>;
1251
+ automaticTransaction: z.ZodPrefault<z.ZodOptional<z.ZodBoolean>>;
1252
+ instances: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodArray<z.ZodString>>>;
1253
+ }, z.core.$strip>, import("./AuthController").ValidateSessionKeyFailure | import("@casual-simulation/aux-common").GenericResult<import("./database").QueryResult[], SimpleError>, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
1254
+ listRecords: Procedure<z.ZodObject<{
1255
+ studioId: z.ZodOptional<z.ZodString>;
1256
+ userId: z.ZodOptional<z.ZodString>;
1257
+ }, z.core.$strip>, import("./AuthController").ValidateSessionKeyFailure | import("./RecordsController").ListRecordsSuccess | import("./RecordsController").ListRecordsFailure | {
1109
1258
  readonly success: false;
1110
1259
  readonly errorCode: "not_authorized";
1111
1260
  readonly errorMessage: "You are not authorized to perform this action.";
1112
- }, any>;
1113
- createRecordKey: Procedure<{
1114
- recordName?: string;
1115
- policy?: string;
1116
- }, import("./AuthController").ValidateSessionKeyFailure | import("./RecordsController").CreatePublicRecordKeyResult | {
1261
+ }, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
1262
+ createRecordKey: Procedure<z.ZodObject<{
1263
+ recordName: z.ZodString;
1264
+ policy: z.ZodString;
1265
+ }, z.core.$strip>, import("./AuthController").ValidateSessionKeyFailure | import("./RecordsController").CreatePublicRecordKeyResult | {
1117
1266
  success: false;
1118
1267
  errorCode: "not_logged_in";
1119
1268
  errorMessage: "The user is not logged in. A session key must be provided for this operation.";
1120
- }, any>;
1121
- grantPermission: Procedure<{
1122
- recordName?: string;
1123
- permission?: {
1124
- marker?: string;
1125
- subjectType?: "inst" | "user" | "role";
1126
- subjectId?: string;
1127
- resourceId?: string;
1128
- expireTimeMs?: number;
1129
- resourceKind?: "data";
1130
- action?: "create" | "read" | "update" | "delete" | "list";
1131
- } | {
1132
- marker?: string;
1133
- subjectType?: "inst" | "user" | "role";
1134
- subjectId?: string;
1135
- resourceId?: string;
1136
- expireTimeMs?: number;
1137
- resourceKind?: "file";
1138
- action?: "create" | "read" | "update" | "delete" | "list";
1139
- options?: {
1140
- maxFileSizeInBytes?: number;
1141
- allowedMimeTypes?: true | string[];
1142
- };
1143
- } | {
1144
- marker?: string;
1145
- subjectType?: "inst" | "user" | "role";
1146
- subjectId?: string;
1147
- expireTimeMs?: number;
1148
- resourceKind?: "event";
1149
- resourceId?: string;
1150
- action?: "update" | "increment" | "count" | "list";
1151
- } | {
1152
- marker?: string;
1153
- subjectType?: "inst" | "user" | "role";
1154
- subjectId?: string;
1155
- resourceId?: string;
1156
- expireTimeMs?: number;
1157
- resourceKind?: "marker";
1158
- action?: "read" | "assign" | "unassign" | "grantPermission" | "revokePermission";
1159
- } | {
1160
- marker?: string;
1161
- subjectType?: "inst" | "user" | "role";
1162
- subjectId?: string;
1163
- resourceId?: string;
1164
- expireTimeMs?: number;
1165
- resourceKind?: "role";
1166
- action?: "read" | "update" | "list" | "grant" | "revoke";
1167
- options?: {
1168
- maxDurationMs?: number;
1169
- };
1170
- } | {
1171
- marker?: string;
1172
- subjectType?: "inst" | "user" | "role";
1173
- subjectId?: string;
1174
- resourceId?: string;
1175
- expireTimeMs?: number;
1176
- resourceKind?: "inst";
1177
- action?: "create" | "read" | "update" | "delete" | "list" | "sendAction" | "updateData";
1178
- } | {
1179
- marker?: string;
1180
- subjectType?: "inst" | "user" | "role";
1181
- subjectId?: string;
1182
- resourceId?: string;
1183
- expireTimeMs?: number;
1184
- resourceKind?: "loom";
1185
- action?: "create";
1186
- } | {
1187
- marker?: string;
1188
- subjectType?: "inst" | "user" | "role";
1189
- subjectId?: string;
1190
- resourceId?: string;
1191
- expireTimeMs?: number;
1192
- resourceKind?: "ai.sloyd";
1193
- action?: "create";
1194
- } | {
1195
- marker?: string;
1196
- subjectType?: "inst" | "user" | "role";
1197
- subjectId?: string;
1198
- resourceId?: string;
1199
- expireTimeMs?: number;
1200
- resourceKind?: "ai.hume";
1201
- action?: "create";
1202
- } | {
1203
- marker?: string;
1204
- subjectType?: "inst" | "user" | "role";
1205
- subjectId?: string;
1206
- resourceId?: string;
1207
- expireTimeMs?: number;
1208
- resourceKind?: "ai.openai.realtime";
1209
- action?: "create";
1210
- } | {
1211
- marker?: string;
1212
- subjectType?: "inst" | "user" | "role";
1213
- subjectId?: string;
1214
- resourceId?: string;
1215
- expireTimeMs?: number;
1216
- resourceKind?: "webhook";
1217
- action?: "create" | "read" | "update" | "delete" | "list" | "run";
1218
- } | {
1219
- marker?: string;
1220
- subjectType?: "inst" | "user" | "role";
1221
- subjectId?: string;
1222
- resourceId?: string;
1223
- expireTimeMs?: number;
1224
- resourceKind?: "notification";
1225
- action?: "create" | "read" | "update" | "delete" | "list" | "send" | "subscribe" | "unsubscribe" | "listSubscriptions";
1226
- } | {
1227
- marker?: string;
1228
- subjectType?: "inst" | "user" | "role";
1229
- subjectId?: string;
1230
- resourceId?: string;
1231
- expireTimeMs?: number;
1232
- resourceKind?: "package";
1233
- action?: "create" | "read" | "update" | "delete" | "list" | "run";
1234
- } | {
1235
- marker?: string;
1236
- subjectType?: "inst" | "user" | "role";
1237
- subjectId?: string;
1238
- resourceId?: string;
1239
- expireTimeMs?: number;
1240
- resourceKind?: "package.version";
1241
- action?: "create" | "read" | "update" | "delete" | "list" | "run";
1242
- } | {
1243
- marker?: string;
1244
- subjectType?: "inst" | "user" | "role";
1245
- subjectId?: string;
1246
- resourceId?: string;
1247
- expireTimeMs?: number;
1248
- resourceKind?: "search";
1249
- action?: "create" | "read" | "update" | "delete" | "list";
1250
- } | {
1251
- marker?: string;
1252
- subjectType?: "inst" | "user" | "role";
1253
- subjectId?: string;
1254
- resourceId?: string;
1255
- expireTimeMs?: number;
1256
- resourceKind?: "database";
1257
- action?: "create" | "read" | "update" | "delete" | "list";
1258
- };
1259
- instances?: string[];
1260
- }, import("./AuthController").ValidateSessionKeyFailure | import("./PolicyController").GrantMarkerPermissionSuccess | import("./PolicyController").GrantMarkerPermissionFailure | {
1269
+ }, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
1270
+ grantPermission: Procedure<z.ZodObject<{
1271
+ recordName: z.ZodString;
1272
+ permission: z.ZodDiscriminatedUnion<[z.ZodObject<{
1273
+ subjectType: z.ZodEnum<{
1274
+ inst: "inst";
1275
+ user: "user";
1276
+ role: "role";
1277
+ }>;
1278
+ subjectId: z.ZodString;
1279
+ resourceId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1280
+ expireTimeMs: z.ZodNullable<z.ZodNumber>;
1281
+ marker: z.ZodOptional<z.ZodString>;
1282
+ resourceKind: z.ZodLiteral<"data">;
1283
+ action: z.ZodNullable<z.ZodEnum<{
1284
+ read: "read";
1285
+ create: "create";
1286
+ update: "update";
1287
+ delete: "delete";
1288
+ list: "list";
1289
+ }>>;
1290
+ }, z.core.$strip>, z.ZodObject<{
1291
+ subjectType: z.ZodEnum<{
1292
+ inst: "inst";
1293
+ user: "user";
1294
+ role: "role";
1295
+ }>;
1296
+ subjectId: z.ZodString;
1297
+ resourceId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1298
+ expireTimeMs: z.ZodNullable<z.ZodNumber>;
1299
+ marker: z.ZodOptional<z.ZodString>;
1300
+ resourceKind: z.ZodLiteral<"file">;
1301
+ action: z.ZodNullable<z.ZodEnum<{
1302
+ read: "read";
1303
+ create: "create";
1304
+ update: "update";
1305
+ delete: "delete";
1306
+ list: "list";
1307
+ }>>;
1308
+ options: z.ZodObject<{
1309
+ maxFileSizeInBytes: z.ZodOptional<z.ZodNumber>;
1310
+ allowedMimeTypes: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<true>, z.ZodArray<z.ZodString>]>>;
1311
+ }, z.core.$strip>;
1312
+ }, z.core.$strip>, z.ZodObject<{
1313
+ subjectType: z.ZodEnum<{
1314
+ inst: "inst";
1315
+ user: "user";
1316
+ role: "role";
1317
+ }>;
1318
+ subjectId: z.ZodString;
1319
+ expireTimeMs: z.ZodNullable<z.ZodNumber>;
1320
+ marker: z.ZodOptional<z.ZodString>;
1321
+ resourceKind: z.ZodLiteral<"event">;
1322
+ resourceId: z.ZodNullable<z.ZodString>;
1323
+ action: z.ZodNullable<z.ZodEnum<{
1324
+ update: "update";
1325
+ increment: "increment";
1326
+ count: "count";
1327
+ list: "list";
1328
+ }>>;
1329
+ }, z.core.$strip>, z.ZodObject<{
1330
+ subjectType: z.ZodEnum<{
1331
+ inst: "inst";
1332
+ user: "user";
1333
+ role: "role";
1334
+ }>;
1335
+ subjectId: z.ZodString;
1336
+ resourceId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1337
+ expireTimeMs: z.ZodNullable<z.ZodNumber>;
1338
+ marker: z.ZodOptional<z.ZodString>;
1339
+ resourceKind: z.ZodLiteral<"marker">;
1340
+ action: z.ZodNullable<z.ZodEnum<{
1341
+ read: "read";
1342
+ assign: "assign";
1343
+ unassign: "unassign";
1344
+ grantPermission: "grantPermission";
1345
+ revokePermission: "revokePermission";
1346
+ }>>;
1347
+ }, z.core.$strip>, z.ZodObject<{
1348
+ subjectType: z.ZodEnum<{
1349
+ inst: "inst";
1350
+ user: "user";
1351
+ role: "role";
1352
+ }>;
1353
+ subjectId: z.ZodString;
1354
+ resourceId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1355
+ expireTimeMs: z.ZodNullable<z.ZodNumber>;
1356
+ marker: z.ZodOptional<z.ZodString>;
1357
+ resourceKind: z.ZodLiteral<"role">;
1358
+ action: z.ZodNullable<z.ZodEnum<{
1359
+ read: "read";
1360
+ update: "update";
1361
+ list: "list";
1362
+ grant: "grant";
1363
+ revoke: "revoke";
1364
+ }>>;
1365
+ options: z.ZodObject<{
1366
+ maxDurationMs: z.ZodOptional<z.ZodNumber>;
1367
+ }, z.core.$strip>;
1368
+ }, z.core.$strip>, z.ZodObject<{
1369
+ subjectType: z.ZodEnum<{
1370
+ inst: "inst";
1371
+ user: "user";
1372
+ role: "role";
1373
+ }>;
1374
+ subjectId: z.ZodString;
1375
+ resourceId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1376
+ expireTimeMs: z.ZodNullable<z.ZodNumber>;
1377
+ marker: z.ZodOptional<z.ZodString>;
1378
+ resourceKind: z.ZodLiteral<"inst">;
1379
+ action: z.ZodNullable<z.ZodEnum<{
1380
+ read: "read";
1381
+ create: "create";
1382
+ update: "update";
1383
+ delete: "delete";
1384
+ list: "list";
1385
+ sendAction: "sendAction";
1386
+ updateData: "updateData";
1387
+ }>>;
1388
+ }, z.core.$strip>, z.ZodObject<{
1389
+ subjectType: z.ZodEnum<{
1390
+ inst: "inst";
1391
+ user: "user";
1392
+ role: "role";
1393
+ }>;
1394
+ subjectId: z.ZodString;
1395
+ resourceId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1396
+ expireTimeMs: z.ZodNullable<z.ZodNumber>;
1397
+ marker: z.ZodOptional<z.ZodString>;
1398
+ resourceKind: z.ZodLiteral<"loom">;
1399
+ action: z.ZodNullable<z.ZodEnum<{
1400
+ create: "create";
1401
+ }>>;
1402
+ }, z.core.$strip>, z.ZodObject<{
1403
+ subjectType: z.ZodEnum<{
1404
+ inst: "inst";
1405
+ user: "user";
1406
+ role: "role";
1407
+ }>;
1408
+ subjectId: z.ZodString;
1409
+ resourceId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1410
+ expireTimeMs: z.ZodNullable<z.ZodNumber>;
1411
+ marker: z.ZodOptional<z.ZodString>;
1412
+ resourceKind: z.ZodLiteral<"ai.sloyd">;
1413
+ action: z.ZodNullable<z.ZodEnum<{
1414
+ create: "create";
1415
+ }>>;
1416
+ }, z.core.$strip>, z.ZodObject<{
1417
+ subjectType: z.ZodEnum<{
1418
+ inst: "inst";
1419
+ user: "user";
1420
+ role: "role";
1421
+ }>;
1422
+ subjectId: z.ZodString;
1423
+ resourceId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1424
+ expireTimeMs: z.ZodNullable<z.ZodNumber>;
1425
+ marker: z.ZodOptional<z.ZodString>;
1426
+ resourceKind: z.ZodLiteral<"ai.hume">;
1427
+ action: z.ZodNullable<z.ZodEnum<{
1428
+ create: "create";
1429
+ }>>;
1430
+ }, z.core.$strip>, z.ZodObject<{
1431
+ subjectType: z.ZodEnum<{
1432
+ inst: "inst";
1433
+ user: "user";
1434
+ role: "role";
1435
+ }>;
1436
+ subjectId: z.ZodString;
1437
+ resourceId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1438
+ expireTimeMs: z.ZodNullable<z.ZodNumber>;
1439
+ marker: z.ZodOptional<z.ZodString>;
1440
+ resourceKind: z.ZodLiteral<"ai.openai.realtime">;
1441
+ action: z.ZodNullable<z.ZodEnum<{
1442
+ create: "create";
1443
+ }>>;
1444
+ }, z.core.$strip>, z.ZodObject<{
1445
+ subjectType: z.ZodEnum<{
1446
+ inst: "inst";
1447
+ user: "user";
1448
+ role: "role";
1449
+ }>;
1450
+ subjectId: z.ZodString;
1451
+ resourceId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1452
+ expireTimeMs: z.ZodNullable<z.ZodNumber>;
1453
+ marker: z.ZodOptional<z.ZodString>;
1454
+ resourceKind: z.ZodLiteral<"webhook">;
1455
+ action: z.ZodNullable<z.ZodEnum<{
1456
+ run: "run";
1457
+ read: "read";
1458
+ create: "create";
1459
+ update: "update";
1460
+ delete: "delete";
1461
+ list: "list";
1462
+ }>>;
1463
+ }, z.core.$strip>, z.ZodObject<{
1464
+ subjectType: z.ZodEnum<{
1465
+ inst: "inst";
1466
+ user: "user";
1467
+ role: "role";
1468
+ }>;
1469
+ subjectId: z.ZodString;
1470
+ resourceId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1471
+ expireTimeMs: z.ZodNullable<z.ZodNumber>;
1472
+ marker: z.ZodOptional<z.ZodString>;
1473
+ resourceKind: z.ZodLiteral<"notification">;
1474
+ action: z.ZodNullable<z.ZodEnum<{
1475
+ read: "read";
1476
+ create: "create";
1477
+ update: "update";
1478
+ delete: "delete";
1479
+ list: "list";
1480
+ send: "send";
1481
+ subscribe: "subscribe";
1482
+ unsubscribe: "unsubscribe";
1483
+ listSubscriptions: "listSubscriptions";
1484
+ }>>;
1485
+ }, z.core.$strip>, z.ZodObject<{
1486
+ subjectType: z.ZodEnum<{
1487
+ inst: "inst";
1488
+ user: "user";
1489
+ role: "role";
1490
+ }>;
1491
+ subjectId: z.ZodString;
1492
+ resourceId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1493
+ expireTimeMs: z.ZodNullable<z.ZodNumber>;
1494
+ marker: z.ZodOptional<z.ZodString>;
1495
+ resourceKind: z.ZodLiteral<"package">;
1496
+ action: z.ZodNullable<z.ZodEnum<{
1497
+ run: "run";
1498
+ read: "read";
1499
+ create: "create";
1500
+ update: "update";
1501
+ delete: "delete";
1502
+ list: "list";
1503
+ }>>;
1504
+ }, z.core.$strip>, z.ZodObject<{
1505
+ subjectType: z.ZodEnum<{
1506
+ inst: "inst";
1507
+ user: "user";
1508
+ role: "role";
1509
+ }>;
1510
+ subjectId: z.ZodString;
1511
+ resourceId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1512
+ expireTimeMs: z.ZodNullable<z.ZodNumber>;
1513
+ marker: z.ZodOptional<z.ZodString>;
1514
+ resourceKind: z.ZodLiteral<"package.version">;
1515
+ action: z.ZodNullable<z.ZodEnum<{
1516
+ run: "run";
1517
+ read: "read";
1518
+ create: "create";
1519
+ update: "update";
1520
+ delete: "delete";
1521
+ list: "list";
1522
+ }>>;
1523
+ }, z.core.$strip>, z.ZodObject<{
1524
+ subjectType: z.ZodEnum<{
1525
+ inst: "inst";
1526
+ user: "user";
1527
+ role: "role";
1528
+ }>;
1529
+ subjectId: z.ZodString;
1530
+ resourceId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1531
+ expireTimeMs: z.ZodNullable<z.ZodNumber>;
1532
+ marker: z.ZodOptional<z.ZodString>;
1533
+ resourceKind: z.ZodLiteral<"search">;
1534
+ action: z.ZodNullable<z.ZodEnum<{
1535
+ read: "read";
1536
+ create: "create";
1537
+ update: "update";
1538
+ delete: "delete";
1539
+ list: "list";
1540
+ }>>;
1541
+ }, z.core.$strip>, z.ZodObject<{
1542
+ subjectType: z.ZodEnum<{
1543
+ inst: "inst";
1544
+ user: "user";
1545
+ role: "role";
1546
+ }>;
1547
+ subjectId: z.ZodString;
1548
+ resourceId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1549
+ expireTimeMs: z.ZodNullable<z.ZodNumber>;
1550
+ marker: z.ZodOptional<z.ZodString>;
1551
+ resourceKind: z.ZodLiteral<"database">;
1552
+ action: z.ZodNullable<z.ZodEnum<{
1553
+ read: "read";
1554
+ create: "create";
1555
+ update: "update";
1556
+ delete: "delete";
1557
+ list: "list";
1558
+ }>>;
1559
+ }, z.core.$strip>, z.ZodObject<{
1560
+ subjectType: z.ZodEnum<{
1561
+ inst: "inst";
1562
+ user: "user";
1563
+ role: "role";
1564
+ }>;
1565
+ subjectId: z.ZodString;
1566
+ resourceId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1567
+ expireTimeMs: z.ZodNullable<z.ZodNumber>;
1568
+ marker: z.ZodOptional<z.ZodString>;
1569
+ resourceKind: z.ZodLiteral<"purchasableItem">;
1570
+ action: z.ZodNullable<z.ZodEnum<{
1571
+ read: "read";
1572
+ create: "create";
1573
+ update: "update";
1574
+ delete: "delete";
1575
+ list: "list";
1576
+ purchase: "purchase";
1577
+ }>>;
1578
+ }, z.core.$strip>, z.ZodObject<{
1579
+ subjectType: z.ZodEnum<{
1580
+ inst: "inst";
1581
+ user: "user";
1582
+ role: "role";
1583
+ }>;
1584
+ subjectId: z.ZodString;
1585
+ resourceId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1586
+ expireTimeMs: z.ZodNullable<z.ZodNumber>;
1587
+ marker: z.ZodOptional<z.ZodString>;
1588
+ resourceKind: z.ZodLiteral<"contract">;
1589
+ action: z.ZodNullable<z.ZodEnum<{
1590
+ read: "read";
1591
+ create: "create";
1592
+ update: "update";
1593
+ delete: "delete";
1594
+ list: "list";
1595
+ purchase: "purchase";
1596
+ cancel: "cancel";
1597
+ }>>;
1598
+ }, z.core.$strip>, z.ZodObject<{
1599
+ subjectType: z.ZodEnum<{
1600
+ inst: "inst";
1601
+ user: "user";
1602
+ role: "role";
1603
+ }>;
1604
+ subjectId: z.ZodString;
1605
+ resourceId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1606
+ expireTimeMs: z.ZodNullable<z.ZodNumber>;
1607
+ marker: z.ZodOptional<z.ZodString>;
1608
+ resourceKind: z.ZodLiteral<"invoice">;
1609
+ action: z.ZodNullable<z.ZodEnum<{
1610
+ read: "read";
1611
+ create: "create";
1612
+ update: "update";
1613
+ delete: "delete";
1614
+ list: "list";
1615
+ approve: "approve";
1616
+ cancel: "cancel";
1617
+ }>>;
1618
+ }, z.core.$strip>], "resourceKind">;
1619
+ instances: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodArray<z.ZodString>>>;
1620
+ }, z.core.$strip>, import("./AuthController").ValidateSessionKeyFailure | import("./PolicyController").GrantMarkerPermissionSuccess | import("./PolicyController").GrantMarkerPermissionFailure | {
1261
1621
  readonly success: false;
1262
1622
  readonly errorCode: "unacceptable_request";
1263
1623
  readonly errorMessage: "The given permission must have either a marker or a resourceId.";
1264
- }, any>;
1265
- revokePermission: Procedure<{
1266
- permissionId?: string;
1267
- instances?: string[];
1268
- }, import("./AuthController").ValidateSessionKeyFailure | import("./PolicyController").RevokePermissionResult, any>;
1269
- listPermissions: Procedure<{
1270
- recordName?: string;
1271
- marker?: string;
1272
- resourceKind?: "search" | "data" | "role" | "event" | "inst" | "file" | "marker" | "loom" | "ai.sloyd" | "ai.hume" | "ai.openai.realtime" | "webhook" | "notification" | "package" | "package.version" | "database";
1273
- resourceId?: string;
1274
- }, import("./AuthController").ValidateSessionKeyFailure | import("./PolicyController").ListPermissionsFailure | import("./PolicyController").ListPermissionsForMarkerSuccess | import("./PolicyController").ListPermissionsForResourceSuccess, any>;
1275
- listUserRoles: Procedure<{
1276
- recordName?: string;
1277
- userId?: string;
1278
- instances?: string[];
1279
- }, import("./AuthController").ValidateSessionKeyFailure | import("./PolicyController").ListAssignedUserRolesResult, any>;
1280
- listInstRoles: Procedure<{
1281
- recordName?: string;
1282
- inst?: string;
1283
- instances?: string[];
1284
- }, import("./AuthController").ValidateSessionKeyFailure | import("./PolicyController").ListAssignedInstRolesResult, any>;
1285
- listRoleAssignments: Procedure<{
1286
- recordName?: string;
1287
- startingRole?: string;
1288
- role?: string;
1289
- instances?: string[];
1290
- }, import("./AuthController").ValidateSessionKeyFailure | import("./PolicyController").ListRoleAssignmentsResult, any>;
1291
- grantRole: Procedure<{
1292
- recordName?: string;
1293
- userId?: string;
1294
- inst?: string;
1295
- role?: string;
1296
- expireTimeMs?: number;
1297
- instances?: string[];
1298
- }, import("./AuthController").ValidateSessionKeyFailure | import("./PolicyController").GrantRoleResult, any>;
1299
- revokeRole: Procedure<{
1300
- recordName?: string;
1301
- userId?: string;
1302
- inst?: string;
1303
- role?: string;
1304
- instances?: string[];
1305
- }, import("./AuthController").ValidateSessionKeyFailure | import("./PolicyController").RevokeRoleResult, any>;
1306
- grantEntitlement: Procedure<{
1307
- packageId?: string;
1308
- userId?: string;
1309
- recordName?: string;
1310
- feature?: "search" | "data" | "event" | "inst" | "file" | "webhook" | "notification" | "package" | "database" | "permissions" | "ai";
1311
- scope?: "designated";
1312
- expireTimeMs?: number;
1313
- }, import("./PolicyController").GrantEntitlementResult, any>;
1314
- revokeEntitlement: Procedure<{
1315
- grantId?: string;
1316
- }, import("./PolicyController").RevokeEntitlementResult, any>;
1317
- listGrantedEntitlements: Procedure<{
1318
- packageId?: string;
1319
- }, import("./PolicyController").ListGrantedEntitlementsResult, any>;
1320
- aiChat: Procedure<{
1321
- model?: string;
1322
- messages?: [{
1323
- role?: "function" | "system" | "user" | "assistant";
1324
- content?: string | ({
1325
- text?: string;
1326
- } | {
1327
- base64?: string;
1328
- mimeType?: string;
1329
- } | {
1330
- url?: string;
1331
- })[];
1332
- author?: string;
1333
- }, ...{
1334
- role?: "function" | "system" | "user" | "assistant";
1335
- content?: string | ({
1336
- text?: string;
1337
- } | {
1338
- base64?: string;
1339
- mimeType?: string;
1340
- } | {
1341
- url?: string;
1342
- })[];
1343
- author?: string;
1344
- }[]];
1345
- instances?: string[];
1346
- temperature?: number;
1347
- topP?: number;
1348
- presencePenalty?: number;
1349
- frequencyPenalty?: number;
1350
- stopWords?: string[];
1351
- }, import("./AuthController").ValidateSessionKeyFailure | import("./AIController").AIChatResponse | {
1624
+ }, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
1625
+ revokePermission: Procedure<z.ZodObject<{
1626
+ permissionId: z.ZodString;
1627
+ instances: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodArray<z.ZodString>>>;
1628
+ }, z.core.$strip>, import("./AuthController").ValidateSessionKeyFailure | import("./PolicyController").RevokePermissionResult, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
1629
+ listPermissions: Procedure<z.ZodObject<{
1630
+ recordName: z.ZodString;
1631
+ marker: z.ZodOptional<z.ZodString>;
1632
+ resourceKind: z.ZodOptional<z.ZodEnum<{
1633
+ search: "search";
1634
+ inst: "inst";
1635
+ file: "file";
1636
+ event: "event";
1637
+ role: "role";
1638
+ data: "data";
1639
+ marker: "marker";
1640
+ loom: "loom";
1641
+ "ai.sloyd": "ai.sloyd";
1642
+ "ai.hume": "ai.hume";
1643
+ "ai.openai.realtime": "ai.openai.realtime";
1644
+ webhook: "webhook";
1645
+ notification: "notification";
1646
+ package: "package";
1647
+ "package.version": "package.version";
1648
+ database: "database";
1649
+ purchasableItem: "purchasableItem";
1650
+ contract: "contract";
1651
+ invoice: "invoice";
1652
+ }>>;
1653
+ resourceId: z.ZodOptional<z.ZodString>;
1654
+ }, z.core.$strip>, import("./AuthController").ValidateSessionKeyFailure | import("./PolicyController").ListPermissionsFailure | import("./PolicyController").ListPermissionsForMarkerSuccess | import("./PolicyController").ListPermissionsForResourceSuccess, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
1655
+ listUserRoles: Procedure<z.ZodObject<{
1656
+ recordName: z.ZodString;
1657
+ userId: z.ZodString;
1658
+ instances: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodArray<z.ZodString>>>;
1659
+ }, z.core.$strip>, import("./AuthController").ValidateSessionKeyFailure | import("./PolicyController").ListAssignedUserRolesResult, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
1660
+ listInstRoles: Procedure<z.ZodObject<{
1661
+ recordName: z.ZodString;
1662
+ inst: z.ZodString;
1663
+ instances: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodArray<z.ZodString>>>;
1664
+ }, z.core.$strip>, import("./AuthController").ValidateSessionKeyFailure | import("./PolicyController").ListAssignedInstRolesResult, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
1665
+ listRoleAssignments: Procedure<z.ZodObject<{
1666
+ recordName: z.ZodString;
1667
+ startingRole: z.ZodOptional<z.ZodString>;
1668
+ role: z.ZodOptional<z.ZodString>;
1669
+ instances: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodArray<z.ZodString>>>;
1670
+ }, z.core.$strip>, import("./AuthController").ValidateSessionKeyFailure | import("./PolicyController").ListRoleAssignmentsResult, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
1671
+ grantRole: Procedure<z.ZodObject<{
1672
+ recordName: z.ZodString;
1673
+ userId: z.ZodOptional<z.ZodString>;
1674
+ inst: z.ZodOptional<z.ZodString>;
1675
+ role: z.ZodString;
1676
+ expireTimeMs: z.ZodOptional<z.ZodNumber>;
1677
+ instances: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodArray<z.ZodString>>>;
1678
+ }, z.core.$strip>, import("./AuthController").ValidateSessionKeyFailure | import("./PolicyController").GrantRoleResult, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
1679
+ revokeRole: Procedure<z.ZodObject<{
1680
+ recordName: z.ZodString;
1681
+ userId: z.ZodOptional<z.ZodString>;
1682
+ inst: z.ZodOptional<z.ZodString>;
1683
+ role: z.ZodString;
1684
+ instances: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodArray<z.ZodString>>>;
1685
+ }, z.core.$strip>, import("./AuthController").ValidateSessionKeyFailure | import("./PolicyController").RevokeRoleResult, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
1686
+ grantEntitlement: Procedure<z.ZodObject<{
1687
+ packageId: z.ZodString;
1688
+ userId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1689
+ recordName: z.ZodString;
1690
+ feature: z.ZodEnum<{
1691
+ search: "search";
1692
+ inst: "inst";
1693
+ file: "file";
1694
+ event: "event";
1695
+ data: "data";
1696
+ webhook: "webhook";
1697
+ notification: "notification";
1698
+ package: "package";
1699
+ database: "database";
1700
+ permissions: "permissions";
1701
+ ai: "ai";
1702
+ }>;
1703
+ scope: z.ZodLiteral<"designated">;
1704
+ expireTimeMs: z.ZodNumber;
1705
+ }, z.core.$strip>, import("./PolicyController").GrantEntitlementResult, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
1706
+ revokeEntitlement: Procedure<z.ZodObject<{
1707
+ grantId: z.ZodString;
1708
+ }, z.core.$strip>, import("./PolicyController").RevokeEntitlementResult, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
1709
+ listGrantedEntitlements: Procedure<z.ZodObject<{
1710
+ packageId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1711
+ }, z.core.$strip>, import("./PolicyController").ListGrantedEntitlementsResult, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
1712
+ aiChat: Procedure<z.ZodObject<{
1713
+ model: z.ZodOptional<z.ZodString>;
1714
+ messages: z.ZodArray<z.ZodObject<{
1715
+ role: z.ZodUnion<readonly [z.ZodLiteral<"system">, z.ZodLiteral<"user">, z.ZodLiteral<"assistant">, z.ZodLiteral<"function">]>;
1716
+ content: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
1717
+ text: z.ZodString;
1718
+ }, z.core.$strip>, z.ZodObject<{
1719
+ base64: z.ZodString;
1720
+ mimeType: z.ZodString;
1721
+ }, z.core.$strip>, z.ZodObject<{
1722
+ url: z.ZodURL;
1723
+ }, z.core.$strip>]>>]>;
1724
+ author: z.ZodOptional<z.ZodString>;
1725
+ }, z.core.$strip>>;
1726
+ instances: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodArray<z.ZodString>>>;
1727
+ temperature: z.ZodOptional<z.ZodNumber>;
1728
+ topP: z.ZodOptional<z.ZodNumber>;
1729
+ presencePenalty: z.ZodOptional<z.ZodNumber>;
1730
+ frequencyPenalty: z.ZodOptional<z.ZodNumber>;
1731
+ stopWords: z.ZodOptional<z.ZodArray<z.ZodString>>;
1732
+ }, z.core.$strip>, import("./AuthController").ValidateSessionKeyFailure | import("./AIController").AIChatResponse | {
1352
1733
  success: false;
1353
1734
  errorCode: "not_logged_in";
1354
1735
  errorMessage: "The user is not logged in. A session key must be provided for this operation.";
@@ -1356,39 +1737,28 @@ export declare class RecordsServer {
1356
1737
  success: false;
1357
1738
  errorCode: "not_supported";
1358
1739
  errorMessage: string;
1359
- }, any>;
1360
- aiChatStream: Procedure<{
1361
- model?: string;
1362
- messages?: [{
1363
- role?: "function" | "system" | "user" | "assistant";
1364
- content?: string | ({
1365
- text?: string;
1366
- } | {
1367
- base64?: string;
1368
- mimeType?: string;
1369
- } | {
1370
- url?: string;
1371
- })[];
1372
- author?: string;
1373
- }, ...{
1374
- role?: "function" | "system" | "user" | "assistant";
1375
- content?: string | ({
1376
- text?: string;
1377
- } | {
1378
- base64?: string;
1379
- mimeType?: string;
1380
- } | {
1381
- url?: string;
1382
- })[];
1383
- author?: string;
1384
- }[]];
1385
- instances?: string[];
1386
- temperature?: number;
1387
- topP?: number;
1388
- presencePenalty?: number;
1389
- frequencyPenalty?: number;
1390
- stopWords?: string[];
1391
- }, import("./AuthController").ValidateSessionKeyFailure | AsyncGenerator<Pick<import("./AIChatInterface").AIChatInterfaceStreamResponse, "choices">, import("./AIController").AIChatStreamResponse, any> | {
1740
+ }, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
1741
+ aiChatStream: Procedure<z.ZodObject<{
1742
+ model: z.ZodOptional<z.ZodString>;
1743
+ messages: z.ZodArray<z.ZodObject<{
1744
+ role: z.ZodUnion<readonly [z.ZodLiteral<"system">, z.ZodLiteral<"user">, z.ZodLiteral<"assistant">, z.ZodLiteral<"function">]>;
1745
+ content: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
1746
+ text: z.ZodString;
1747
+ }, z.core.$strip>, z.ZodObject<{
1748
+ base64: z.ZodString;
1749
+ mimeType: z.ZodString;
1750
+ }, z.core.$strip>, z.ZodObject<{
1751
+ url: z.ZodURL;
1752
+ }, z.core.$strip>]>>]>;
1753
+ author: z.ZodOptional<z.ZodString>;
1754
+ }, z.core.$strip>>;
1755
+ instances: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodArray<z.ZodString>>>;
1756
+ temperature: z.ZodOptional<z.ZodNumber>;
1757
+ topP: z.ZodOptional<z.ZodNumber>;
1758
+ presencePenalty: z.ZodOptional<z.ZodNumber>;
1759
+ frequencyPenalty: z.ZodOptional<z.ZodNumber>;
1760
+ stopWords: z.ZodOptional<z.ZodArray<z.ZodString>>;
1761
+ }, z.core.$strip>, import("./AuthController").ValidateSessionKeyFailure | AsyncGenerator<Pick<import("./AIChatInterface").AIChatInterfaceStreamResponse, "choices">, import("./AIController").AIChatStreamResponse, any> | {
1392
1762
  success: false;
1393
1763
  errorCode: "not_logged_in";
1394
1764
  errorMessage: "The user is not logged in. A session key must be provided for this operation.";
@@ -1396,8 +1766,8 @@ export declare class RecordsServer {
1396
1766
  success: false;
1397
1767
  errorCode: "not_supported";
1398
1768
  errorMessage: string;
1399
- }, any>;
1400
- aiListChatModels: Procedure<{}, import("./AuthController").ValidateSessionKeyFailure | {
1769
+ }, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
1770
+ aiListChatModels: Procedure<z.ZodObject<{}, z.core.$strip>, import("./AuthController").ValidateSessionKeyFailure | {
1401
1771
  success: false;
1402
1772
  errorCode: "not_logged_in";
1403
1773
  errorMessage: "The user is not logged in. A session key must be provided for this operation.";
@@ -1405,17 +1775,17 @@ export declare class RecordsServer {
1405
1775
  success: false;
1406
1776
  errorCode: "not_supported";
1407
1777
  errorMessage: string;
1408
- } | import("@casual-simulation/aux-common").GenericResult<import("./AIController").ListedChatModel[], import("@casual-simulation/aux-common").SimpleError>, any>;
1409
- createAiSkybox: Procedure<{
1410
- prompt?: string;
1411
- negativePrompt?: string;
1412
- blockadeLabs?: {
1413
- skyboxStyleId?: number;
1414
- remixImagineId?: number;
1415
- seed?: number;
1416
- };
1417
- instances?: string[];
1418
- }, import("./AuthController").ValidateSessionKeyFailure | import("./AIController").AIGenerateSkyboxResponse | {
1778
+ } | import("@casual-simulation/aux-common").GenericResult<import("./AIController").ListedChatModel[], SimpleError>, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
1779
+ createAiSkybox: Procedure<z.ZodObject<{
1780
+ prompt: z.ZodString;
1781
+ negativePrompt: z.ZodOptional<z.ZodString>;
1782
+ blockadeLabs: z.ZodOptional<z.ZodObject<{
1783
+ skyboxStyleId: z.ZodOptional<z.ZodNumber>;
1784
+ remixImagineId: z.ZodOptional<z.ZodNumber>;
1785
+ seed: z.ZodOptional<z.ZodNumber>;
1786
+ }, z.core.$strip>>;
1787
+ instances: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodArray<z.ZodString>>>;
1788
+ }, z.core.$strip>, import("./AuthController").ValidateSessionKeyFailure | import("./AIController").AIGenerateSkyboxResponse | {
1419
1789
  success: false;
1420
1790
  errorCode: "not_logged_in";
1421
1791
  errorMessage: "The user is not logged in. A session key must be provided for this operation.";
@@ -1423,11 +1793,11 @@ export declare class RecordsServer {
1423
1793
  success: false;
1424
1794
  errorCode: "not_supported";
1425
1795
  errorMessage: string;
1426
- }, any>;
1427
- getAiSkybox: Procedure<{
1428
- skyboxId?: string;
1429
- instances?: string[];
1430
- }, import("./AuthController").ValidateSessionKeyFailure | import("./AIController").AIGetSkyboxResponse | {
1796
+ }, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
1797
+ getAiSkybox: Procedure<z.ZodObject<{
1798
+ skyboxId: z.ZodString;
1799
+ instances: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodArray<z.ZodString>>>;
1800
+ }, z.core.$strip>, import("./AuthController").ValidateSessionKeyFailure | import("./AIController").AIGetSkyboxResponse | {
1431
1801
  success: false;
1432
1802
  errorCode: "not_logged_in";
1433
1803
  errorMessage: "The user is not logged in. A session key must be provided for this operation.";
@@ -1435,22 +1805,22 @@ export declare class RecordsServer {
1435
1805
  success: false;
1436
1806
  errorCode: "not_supported";
1437
1807
  errorMessage: string;
1438
- }, any>;
1439
- createAiImage: Procedure<{
1440
- prompt?: string;
1441
- model?: string;
1442
- negativePrompt?: string;
1443
- width?: number;
1444
- height?: number;
1445
- seed?: number;
1446
- numberOfImages?: number;
1447
- steps?: number;
1448
- sampler?: string;
1449
- cfgScale?: number;
1450
- clipGuidancePreset?: string;
1451
- stylePreset?: string;
1452
- instances?: string[];
1453
- }, import("./AuthController").ValidateSessionKeyFailure | import("./AIController").AIGenerateImageResponse | {
1808
+ }, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
1809
+ createAiImage: Procedure<z.ZodObject<{
1810
+ prompt: z.ZodString;
1811
+ model: z.ZodOptional<z.ZodString>;
1812
+ negativePrompt: z.ZodOptional<z.ZodString>;
1813
+ width: z.ZodOptional<z.ZodInt>;
1814
+ height: z.ZodOptional<z.ZodInt>;
1815
+ seed: z.ZodOptional<z.ZodInt>;
1816
+ numberOfImages: z.ZodOptional<z.ZodInt>;
1817
+ steps: z.ZodOptional<z.ZodInt>;
1818
+ sampler: z.ZodOptional<z.ZodString>;
1819
+ cfgScale: z.ZodOptional<z.ZodInt>;
1820
+ clipGuidancePreset: z.ZodOptional<z.ZodString>;
1821
+ stylePreset: z.ZodOptional<z.ZodString>;
1822
+ instances: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodArray<z.ZodString>>>;
1823
+ }, z.core.$strip>, import("./AuthController").ValidateSessionKeyFailure | import("./AIController").AIGenerateImageResponse | {
1454
1824
  success: false;
1455
1825
  errorCode: "not_logged_in";
1456
1826
  errorMessage: "The user is not logged in. A session key must be provided for this operation.";
@@ -1458,22 +1828,25 @@ export declare class RecordsServer {
1458
1828
  success: false;
1459
1829
  errorCode: "not_supported";
1460
1830
  errorMessage: string;
1461
- }, any>;
1462
- getHumeAccessToken: Procedure<{
1463
- recordName?: string;
1464
- }, import("./AuthController").ValidateSessionKeyFailure | import("./AIController").AIHumeGetAccessTokenResult, any>;
1465
- createSloydModel: Procedure<{
1466
- recordName?: string;
1467
- outputMimeType?: "model/gltf+json" | "model/gltf-binary";
1468
- prompt?: string;
1469
- levelOfDetail?: number;
1470
- baseModelId?: string;
1471
- thumbnail?: {
1472
- type?: "image/png";
1473
- width?: number;
1474
- height?: number;
1475
- };
1476
- }, import("./AuthController").ValidateSessionKeyFailure | import("./AIController").AISloydGenerateModelResponse | {
1831
+ }, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
1832
+ getHumeAccessToken: Procedure<z.ZodObject<{
1833
+ recordName: z.ZodOptional<z.ZodString>;
1834
+ }, z.core.$strip>, import("./AuthController").ValidateSessionKeyFailure | import("./AIController").AIHumeGetAccessTokenResult, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
1835
+ createSloydModel: Procedure<z.ZodObject<{
1836
+ recordName: z.ZodOptional<z.ZodString>;
1837
+ outputMimeType: z.ZodPrefault<z.ZodEnum<{
1838
+ "model/gltf+json": "model/gltf+json";
1839
+ "model/gltf-binary": "model/gltf-binary";
1840
+ }>>;
1841
+ prompt: z.ZodString;
1842
+ levelOfDetail: z.ZodOptional<z.ZodNumber>;
1843
+ baseModelId: z.ZodOptional<z.ZodString>;
1844
+ thumbnail: z.ZodOptional<z.ZodObject<{
1845
+ type: z.ZodLiteral<"image/png">;
1846
+ width: z.ZodInt;
1847
+ height: z.ZodInt;
1848
+ }, z.core.$strip>>;
1849
+ }, z.core.$strip>, import("./AuthController").ValidateSessionKeyFailure | import("./AIController").AISloydGenerateModelResponse | {
1477
1850
  success: false;
1478
1851
  errorCode: "not_logged_in";
1479
1852
  errorMessage: "The user is not logged in. A session key must be provided for this operation.";
@@ -1481,10 +1854,10 @@ export declare class RecordsServer {
1481
1854
  success: false;
1482
1855
  errorCode: "not_supported";
1483
1856
  errorMessage: string;
1484
- }, any>;
1485
- getLoomAccessToken: Procedure<{
1486
- recordName?: string;
1487
- }, import("./AuthController").ValidateSessionKeyFailure | import("./LoomController").LoomGetTokenResult | {
1857
+ }, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
1858
+ getLoomAccessToken: Procedure<z.ZodObject<{
1859
+ recordName: z.ZodString;
1860
+ }, z.core.$strip>, import("./AuthController").ValidateSessionKeyFailure | import("./LoomController").LoomGetTokenResult | {
1488
1861
  success: false;
1489
1862
  errorCode: "not_logged_in";
1490
1863
  errorMessage: "The user is not logged in. A session key must be provided for this operation.";
@@ -1492,125 +1865,293 @@ export declare class RecordsServer {
1492
1865
  success: false;
1493
1866
  errorCode: "not_supported";
1494
1867
  errorMessage: string;
1495
- }, any>;
1496
- createOpenAIRealtimeSession: Procedure<{
1497
- recordName?: string;
1498
- request?: {
1499
- model?: string;
1500
- instructions?: string;
1501
- modalities?: ("text" | "audio")[];
1502
- maxResponseOutputTokens?: number;
1503
- inputAudioFormat?: "pcm16" | "g711_ulaw" | "g711_alaw";
1504
- inputAudioNoiseReduction?: {
1505
- type?: "near_field" | "far_field";
1506
- };
1507
- inputAudioTranscription?: {
1508
- language?: string;
1509
- model?: string;
1510
- prompt?: string;
1511
- };
1512
- outputAudioFormat?: "pcm16" | "g711_ulaw" | "g711_alaw";
1513
- temperature?: number;
1514
- toolChoice?: string;
1515
- tools?: {
1516
- description?: string;
1517
- name?: string;
1518
- parameters?: any;
1519
- type?: "function";
1520
- }[];
1521
- turnDetection?: {
1522
- createResponse?: boolean;
1523
- eagerness?: "low" | "medium" | "high";
1524
- interruptResponse?: boolean;
1525
- prefixPaddingMs?: number;
1526
- silenceDurationMs?: number;
1527
- threshold?: number;
1528
- type?: "server_vad" | "semantic_vad";
1529
- };
1530
- voice?: string;
1531
- };
1532
- }, import("./AIController").AICreateOpenAIRealtimeSessionTokenResult, any>;
1533
- getStudio: Procedure<{
1534
- studioId?: string;
1535
- }, import("./AuthController").ValidateSessionKeyFailure | import("./RecordsController").GetStudioResult, any>;
1536
- createStudio: Procedure<{
1537
- displayName?: string;
1538
- ownerStudioComId?: string;
1539
- }, import("./AuthController").ValidateSessionKeyFailure | import("./RecordsController").CreateStudioSuccess | import("./RecordsController").CreateStudioInComIdFailure, any>;
1540
- updateStudio: Procedure<{
1541
- id?: string;
1542
- displayName?: string;
1543
- logoUrl?: string;
1544
- logoBackgroundColor?: string;
1545
- comIdConfig?: {
1546
- allowedStudioCreators?: "anyone" | "only-members";
1547
- };
1548
- playerConfig?: {
1549
- ab1BootstrapURL?: string;
1550
- arcGisApiKey?: string;
1551
- jitsiAppName?: string;
1552
- what3WordsApiKey?: string;
1553
- allowedBiosOptions?: ("studio" | "enter join code" | "join inst" | "static inst" | "local inst" | "local" | "public inst" | "private inst" | "free inst" | "free" | "studio inst" | "sign in" | "sign up" | "sign out" | "delete inst")[];
1554
- defaultBiosOption?: "studio" | "enter join code" | "join inst" | "static inst" | "local inst" | "local" | "public inst" | "private inst" | "free inst" | "free" | "studio inst" | "sign in" | "sign up" | "sign out" | "delete inst";
1555
- automaticBiosOption?: "studio" | "enter join code" | "join inst" | "static inst" | "local inst" | "local" | "public inst" | "private inst" | "free inst" | "free" | "studio inst" | "sign in" | "sign up" | "sign out" | "delete inst";
1556
- logoBackgroundColor?: string;
1557
- };
1558
- loomConfig?: {
1559
- appId?: string;
1560
- privateKey?: string;
1561
- };
1562
- humeConfig?: {
1563
- apiKey?: string;
1564
- secretKey?: string;
1565
- };
1566
- }, import("./AuthController").ValidateSessionKeyFailure | import("./RecordsController").UpdateStudioResult, any>;
1567
- requestStudioComId: Procedure<{
1568
- studioId?: string;
1569
- comId?: string;
1570
- }, import("./AuthController").ValidateSessionKeyFailure | import("./RecordsController").ComIdRequestResult | {
1868
+ }, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
1869
+ createOpenAIRealtimeSession: Procedure<z.ZodObject<{
1870
+ recordName: z.ZodString;
1871
+ request: z.ZodObject<{
1872
+ model: z.ZodString;
1873
+ instructions: z.ZodOptional<z.ZodString>;
1874
+ modalities: z.ZodOptional<z.ZodArray<z.ZodEnum<{
1875
+ audio: "audio";
1876
+ text: "text";
1877
+ }>>>;
1878
+ maxResponseOutputTokens: z.ZodOptional<z.ZodInt>;
1879
+ inputAudioFormat: z.ZodOptional<z.ZodEnum<{
1880
+ pcm16: "pcm16";
1881
+ g711_ulaw: "g711_ulaw";
1882
+ g711_alaw: "g711_alaw";
1883
+ }>>;
1884
+ inputAudioNoiseReduction: z.ZodNullable<z.ZodOptional<z.ZodObject<{
1885
+ type: z.ZodOptional<z.ZodEnum<{
1886
+ near_field: "near_field";
1887
+ far_field: "far_field";
1888
+ }>>;
1889
+ }, z.core.$strip>>>;
1890
+ inputAudioTranscription: z.ZodNullable<z.ZodOptional<z.ZodObject<{
1891
+ language: z.ZodOptional<z.ZodString>;
1892
+ model: z.ZodOptional<z.ZodString>;
1893
+ prompt: z.ZodOptional<z.ZodString>;
1894
+ }, z.core.$strip>>>;
1895
+ outputAudioFormat: z.ZodOptional<z.ZodEnum<{
1896
+ pcm16: "pcm16";
1897
+ g711_ulaw: "g711_ulaw";
1898
+ g711_alaw: "g711_alaw";
1899
+ }>>;
1900
+ temperature: z.ZodOptional<z.ZodNumber>;
1901
+ toolChoice: z.ZodOptional<z.ZodString>;
1902
+ tools: z.ZodOptional<z.ZodArray<z.ZodObject<{
1903
+ description: z.ZodOptional<z.ZodString>;
1904
+ name: z.ZodString;
1905
+ parameters: z.ZodOptional<z.ZodAny>;
1906
+ type: z.ZodOptional<z.ZodEnum<{
1907
+ function: "function";
1908
+ }>>;
1909
+ }, z.core.$strip>>>;
1910
+ turnDetection: z.ZodNullable<z.ZodOptional<z.ZodObject<{
1911
+ createResponse: z.ZodOptional<z.ZodBoolean>;
1912
+ eagerness: z.ZodOptional<z.ZodEnum<{
1913
+ high: "high";
1914
+ low: "low";
1915
+ medium: "medium";
1916
+ }>>;
1917
+ interruptResponse: z.ZodOptional<z.ZodBoolean>;
1918
+ prefixPaddingMs: z.ZodOptional<z.ZodNumber>;
1919
+ silenceDurationMs: z.ZodOptional<z.ZodNumber>;
1920
+ threshold: z.ZodOptional<z.ZodNumber>;
1921
+ type: z.ZodOptional<z.ZodEnum<{
1922
+ server_vad: "server_vad";
1923
+ semantic_vad: "semantic_vad";
1924
+ }>>;
1925
+ }, z.core.$strip>>>;
1926
+ voice: z.ZodOptional<z.ZodString>;
1927
+ }, z.core.$strip>;
1928
+ }, z.core.$strip>, import("./AIController").AICreateOpenAIRealtimeSessionTokenResult, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
1929
+ getStudio: Procedure<z.ZodObject<{
1930
+ studioId: z.ZodString;
1931
+ }, z.core.$strip>, import("./AuthController").ValidateSessionKeyFailure | import("./RecordsController").GetStudioResult, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
1932
+ createStudio: Procedure<z.ZodObject<{
1933
+ displayName: z.ZodString;
1934
+ ownerStudioComId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1935
+ }, z.core.$strip>, import("./AuthController").ValidateSessionKeyFailure | import("./RecordsController").CreateStudioSuccess | import("./RecordsController").CreateStudioInComIdFailure, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
1936
+ updateStudio: Procedure<z.ZodObject<{
1937
+ id: z.ZodString;
1938
+ displayName: z.ZodOptional<z.ZodString>;
1939
+ logoUrl: z.ZodOptional<z.ZodNullable<z.ZodURL>>;
1940
+ logoBackgroundColor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1941
+ comIdConfig: z.ZodOptional<z.ZodObject<{
1942
+ allowedStudioCreators: z.ZodUnion<readonly [z.ZodLiteral<"anyone">, z.ZodLiteral<"only-members">]>;
1943
+ }, z.core.$strip>>;
1944
+ playerConfig: z.ZodOptional<z.ZodObject<{
1945
+ disableVM: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodBoolean>>>;
1946
+ ab1BootstrapURL: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
1947
+ arcGisApiKey: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
1948
+ jitsiAppName: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
1949
+ what3WordsApiKey: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
1950
+ allowedBiosOptions: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<{
1951
+ local: "local";
1952
+ studio: "studio";
1953
+ locked: "locked";
1954
+ "enter join code": "enter join code";
1955
+ "join inst": "join inst";
1956
+ temp: "temp";
1957
+ "static inst": "static inst";
1958
+ "local inst": "local inst";
1959
+ "public inst": "public inst";
1960
+ "free inst": "free inst";
1961
+ free: "free";
1962
+ "private inst": "private inst";
1963
+ "studio inst": "studio inst";
1964
+ "sign in": "sign in";
1965
+ "sign up": "sign up";
1966
+ "sign out": "sign out";
1967
+ "delete inst": "delete inst";
1968
+ }>>>>>;
1969
+ defaultBiosOption: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodEnum<{
1970
+ local: "local";
1971
+ studio: "studio";
1972
+ locked: "locked";
1973
+ "enter join code": "enter join code";
1974
+ "join inst": "join inst";
1975
+ temp: "temp";
1976
+ "static inst": "static inst";
1977
+ "local inst": "local inst";
1978
+ "public inst": "public inst";
1979
+ "free inst": "free inst";
1980
+ free: "free";
1981
+ "private inst": "private inst";
1982
+ "studio inst": "studio inst";
1983
+ "sign in": "sign in";
1984
+ "sign up": "sign up";
1985
+ "sign out": "sign out";
1986
+ "delete inst": "delete inst";
1987
+ }>>>>;
1988
+ automaticBiosOption: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodEnum<{
1989
+ local: "local";
1990
+ studio: "studio";
1991
+ locked: "locked";
1992
+ "enter join code": "enter join code";
1993
+ "join inst": "join inst";
1994
+ temp: "temp";
1995
+ "static inst": "static inst";
1996
+ "local inst": "local inst";
1997
+ "public inst": "public inst";
1998
+ "free inst": "free inst";
1999
+ free: "free";
2000
+ "private inst": "private inst";
2001
+ "studio inst": "studio inst";
2002
+ "sign in": "sign in";
2003
+ "sign up": "sign up";
2004
+ "sign out": "sign out";
2005
+ "delete inst": "delete inst";
2006
+ }>>>>;
2007
+ automaticBiosOptionInst: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
2008
+ logoBackgroundColor: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
2009
+ }, z.core.$strip>>;
2010
+ loomConfig: z.ZodOptional<z.ZodObject<{
2011
+ appId: z.ZodString;
2012
+ privateKey: z.ZodString;
2013
+ }, z.core.$strip>>;
2014
+ humeConfig: z.ZodOptional<z.ZodObject<{
2015
+ apiKey: z.ZodString;
2016
+ secretKey: z.ZodString;
2017
+ }, z.core.$strip>>;
2018
+ playerWebManifest: z.ZodOptional<z.ZodOptional<z.ZodObject<{
2019
+ name: z.ZodString;
2020
+ short_name: z.ZodString;
2021
+ description: z.ZodOptional<z.ZodString>;
2022
+ start_url: z.ZodPrefault<z.ZodString>;
2023
+ display: z.ZodPrefault<z.ZodEnum<{
2024
+ fullscreen: "fullscreen";
2025
+ standalone: "standalone";
2026
+ "minimal-ui": "minimal-ui";
2027
+ browser: "browser";
2028
+ }>>;
2029
+ background_color: z.ZodPrefault<z.ZodString>;
2030
+ theme_color: z.ZodPrefault<z.ZodString>;
2031
+ icons: z.ZodPrefault<z.ZodArray<z.ZodObject<{
2032
+ src: z.ZodString;
2033
+ type: z.ZodString;
2034
+ sizes: z.ZodUnion<readonly [z.ZodLiteral<"any">, z.ZodString]>;
2035
+ purpose: z.ZodOptional<z.ZodString>;
2036
+ }, z.core.$strip>>>;
2037
+ }, z.core.$loose>>>;
2038
+ }, z.core.$strip>, import("./AuthController").ValidateSessionKeyFailure | import("./RecordsController").UpdateStudioResult, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
2039
+ addCustomDomain: Procedure<z.ZodObject<{
2040
+ studioId: z.ZodString;
2041
+ domain: z.ZodString;
2042
+ }, z.core.$strip>, import("./AuthController").ValidateSessionKeyFailure | {
2043
+ success: false;
2044
+ errorCode: "not_logged_in";
2045
+ errorMessage: "The user is not logged in. A session key must be provided for this operation.";
2046
+ } | import("@casual-simulation/aux-common").GenericResult<import("./dns").DomainNameVerificationDNSRecord, SimpleError>, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
2047
+ deleteCustomDomain: Procedure<z.ZodObject<{
2048
+ customDomainId: z.ZodString;
2049
+ }, z.core.$strip>, import("./AuthController").ValidateSessionKeyFailure | {
2050
+ success: false;
2051
+ errorCode: "not_logged_in";
2052
+ errorMessage: "The user is not logged in. A session key must be provided for this operation.";
2053
+ } | import("@casual-simulation/aux-common").GenericResult<void, SimpleError>, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
2054
+ listCustomDomains: Procedure<z.ZodObject<{
2055
+ studioId: z.ZodString;
2056
+ }, z.core.$strip>, import("./AuthController").ValidateSessionKeyFailure | {
2057
+ success: false;
2058
+ errorCode: "not_logged_in";
2059
+ errorMessage: "The user is not logged in. A session key must be provided for this operation.";
2060
+ } | import("@casual-simulation/aux-common").GenericResult<{
2061
+ domains: import("./RecordsStore").ListedCustomDomain[];
2062
+ }, SimpleError>, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
2063
+ verifyCustomDomain: Procedure<z.ZodObject<{
2064
+ customDomainId: z.ZodString;
2065
+ }, z.core.$strip>, import("./AuthController").ValidateSessionKeyFailure | {
1571
2066
  success: false;
1572
2067
  errorCode: "not_logged_in";
1573
2068
  errorMessage: "The user is not logged in. A session key must be provided for this operation.";
1574
- }, any>;
1575
- listStudios: Procedure<{
1576
- comId?: string;
1577
- userId?: string;
1578
- }, import("./AuthController").ValidateSessionKeyFailure | import("./RecordsController").ListStudiosSuccess | import("./RecordsController").ListStudiosFailure | {
2069
+ } | import("@casual-simulation/aux-common").GenericResult<void, SimpleError>, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
2070
+ requestStudioComId: Procedure<z.ZodObject<{
2071
+ studioId: z.ZodString;
2072
+ comId: z.ZodString;
2073
+ }, z.core.$strip>, import("./AuthController").ValidateSessionKeyFailure | import("./RecordsController").ComIdRequestResult | {
2074
+ success: false;
2075
+ errorCode: "not_logged_in";
2076
+ errorMessage: "The user is not logged in. A session key must be provided for this operation.";
2077
+ }, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
2078
+ listStudios: Procedure<z.ZodObject<{
2079
+ comId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2080
+ userId: z.ZodOptional<z.ZodString>;
2081
+ }, z.core.$strip>, import("./AuthController").ValidateSessionKeyFailure | import("./RecordsController").ListStudiosSuccess | import("./RecordsController").ListStudiosFailure | {
1579
2082
  readonly success: false;
1580
2083
  readonly errorCode: "not_authorized";
1581
2084
  readonly errorMessage: "You are not authorized to perform this action.";
1582
- }, any>;
1583
- listStudioMembers: Procedure<{
1584
- studioId?: string;
1585
- }, import("./AuthController").ValidateSessionKeyFailure | import("./RecordsController").ListStudioMembersResult, any>;
1586
- addStudioMember: Procedure<{
1587
- studioId?: string;
1588
- addedUserId?: string;
1589
- addedEmail?: string;
1590
- addedPhoneNumber?: string;
1591
- addedDisplayName?: string;
1592
- role?: "admin" | "member";
1593
- }, import("./AuthController").ValidateSessionKeyFailure | import("./RecordsController").AddStudioMemberResult, any>;
1594
- removeStudioMember: Procedure<{
1595
- studioId?: string;
1596
- removedUserId?: string;
1597
- }, import("./AuthController").ValidateSessionKeyFailure | import("./RecordsController").RemoveStudioMemberResult, any>;
1598
- getPlayerConfig: Procedure<{
1599
- comId?: string;
1600
- }, import("./RecordsController").GetPlayerConfigResult, any>;
1601
- getSubscriptions: Procedure<{
1602
- studioId?: string;
1603
- userId?: string;
1604
- }, import("./SubscriptionController").GetSubscriptionStatusSuccess | import("./SubscriptionController").GetSubscriptionStatusFailure | {
2085
+ }, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
2086
+ listStudioMembers: Procedure<z.ZodObject<{
2087
+ studioId: z.ZodString;
2088
+ }, z.core.$strip>, import("./AuthController").ValidateSessionKeyFailure | import("./RecordsController").ListStudioMembersResult, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
2089
+ addStudioMember: Procedure<z.ZodObject<{
2090
+ studioId: z.ZodString;
2091
+ addedUserId: z.ZodOptional<z.ZodString>;
2092
+ addedEmail: z.ZodOptional<z.ZodString>;
2093
+ addedPhoneNumber: z.ZodOptional<z.ZodString>;
2094
+ addedDisplayName: z.ZodOptional<z.ZodString>;
2095
+ role: z.ZodUnion<readonly [z.ZodLiteral<"admin">, z.ZodLiteral<"member">]>;
2096
+ }, z.core.$strip>, import("./AuthController").ValidateSessionKeyFailure | import("./RecordsController").AddStudioMemberResult, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
2097
+ removeStudioMember: Procedure<z.ZodObject<{
2098
+ studioId: z.ZodString;
2099
+ removedUserId: z.ZodOptional<z.ZodString>;
2100
+ }, z.core.$strip>, import("./AuthController").ValidateSessionKeyFailure | import("./RecordsController").RemoveStudioMemberResult, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
2101
+ getManageStudioStoreLink: Procedure<z.ZodObject<{
2102
+ studioId: z.ZodString;
2103
+ }, z.core.$strip>, import("./AuthController").ValidateSessionKeyFailure | {
1605
2104
  success: false;
1606
2105
  errorCode: "not_logged_in";
1607
2106
  errorMessage: "The user is not logged in. A session key must be provided for this operation.";
1608
2107
  } | {
2108
+ success: false;
2109
+ errorCode: "not_supported";
2110
+ errorMessage: string;
2111
+ } | import("@casual-simulation/aux-common").GenericResult<{
2112
+ url: string;
2113
+ }, SimpleError>, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
2114
+ getWebConfig: Procedure<z.ZodObject<{}, z.core.$strip>, import("@casual-simulation/aux-common").GenericResult<import("@casual-simulation/aux-common").CasualOSConfig, SimpleError>, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
2115
+ getPlayerWebManifest: Procedure<z.ZodObject<{}, z.core.$strip>, import("@casual-simulation/aux-common").GenericResult<{
2116
+ [x: string]: unknown;
2117
+ name: string;
2118
+ short_name: string;
2119
+ start_url: string;
2120
+ display: "fullscreen" | "browser" | "standalone" | "minimal-ui";
2121
+ background_color: string;
2122
+ theme_color: string;
2123
+ icons: {
2124
+ src: string;
2125
+ type: string;
2126
+ sizes?: string;
2127
+ purpose?: string;
2128
+ }[];
2129
+ description?: string;
2130
+ }, SimpleError>, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
2131
+ getPlayerConfig: Procedure<z.ZodObject<{
2132
+ comId: z.ZodString;
2133
+ }, z.core.$strip>, import("./RecordsController").GetPlayerConfigResult, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
2134
+ getBalances: Procedure<z.ZodObject<{
2135
+ studioId: z.ZodOptional<z.ZodString>;
2136
+ contractId: z.ZodOptional<z.ZodString>;
2137
+ userId: z.ZodOptional<z.ZodString>;
2138
+ }, z.core.$strip>, import("./AuthController").ValidateSessionKeyFailure | NoSessionKeyResult | {
2139
+ success: false;
2140
+ errorCode: "not_supported";
2141
+ errorMessage: string;
2142
+ } | import("@casual-simulation/aux-common").GenericResult<{
2143
+ usd: import("@casual-simulation/aux-common").JSONAccountBalance;
2144
+ credits: import("@casual-simulation/aux-common").JSONAccountBalance;
2145
+ }, SimpleError>, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
2146
+ getSubscriptions: Procedure<z.ZodObject<{
2147
+ studioId: z.ZodOptional<z.ZodString>;
2148
+ userId: z.ZodOptional<z.ZodString>;
2149
+ }, z.core.$strip>, import("./SubscriptionController").GetSubscriptionStatusSuccess | import("./SubscriptionController").GetSubscriptionStatusFailure | {
1609
2150
  readonly success: true;
1610
2151
  readonly publishableKey: string;
1611
2152
  readonly subscriptions: {
1612
2153
  active: boolean;
1613
- statusCode: "incomplete" | "active" | "trialing" | "canceled" | "ended" | "past_due" | "unpaid" | "incomplete_expired" | "paused";
2154
+ statusCode: "unpaid" | "active" | "canceled" | "ended" | "past_due" | "incomplete" | "incomplete_expired" | "trialing" | "paused";
1614
2155
  productName: string;
1615
2156
  startDate: number;
1616
2157
  endedDate: number;
@@ -1618,7 +2159,7 @@ export declare class RecordsServer {
1618
2159
  canceledDate: number;
1619
2160
  currentPeriodStart: number;
1620
2161
  currentPeriodEnd: number;
1621
- renewalInterval: "year" | "month" | "day" | "week";
2162
+ renewalInterval: "month" | "year" | "week" | "day";
1622
2163
  intervalLength: number;
1623
2164
  intervalCost: number;
1624
2165
  currency: string;
@@ -1638,39 +2179,54 @@ export declare class RecordsServer {
1638
2179
  }[];
1639
2180
  defaultSubscription: boolean;
1640
2181
  }[];
1641
- }, any>;
1642
- getManageSubscriptionLink: Procedure<{
1643
- userId?: string;
1644
- studioId?: string;
1645
- subscriptionId?: string;
1646
- expectedPrice?: {
1647
- currency?: string;
1648
- cost?: number;
1649
- interval?: "year" | "month" | "day" | "week";
1650
- intervalLength?: number;
2182
+ readonly accountBalances: {
2183
+ usd: import("@casual-simulation/aux-common").JSONAccountBalance;
2184
+ credits: import("@casual-simulation/aux-common").JSONAccountBalance;
1651
2185
  };
1652
- }, import("./SubscriptionController").CreateManageSubscriptionResult | {
2186
+ }, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
2187
+ getManageSubscriptionLink: Procedure<z.ZodObject<{
2188
+ userId: z.ZodOptional<z.ZodString>;
2189
+ studioId: z.ZodOptional<z.ZodString>;
2190
+ subscriptionId: z.ZodOptional<z.ZodString>;
2191
+ expectedPrice: z.ZodOptional<z.ZodObject<{
2192
+ currency: z.ZodString;
2193
+ cost: z.ZodNumber;
2194
+ interval: z.ZodEnum<{
2195
+ month: "month";
2196
+ year: "year";
2197
+ week: "week";
2198
+ day: "day";
2199
+ }>;
2200
+ intervalLength: z.ZodNumber;
2201
+ }, z.core.$strip>>;
2202
+ }, z.core.$strip>, import("./SubscriptionController").CreateManageSubscriptionResult | {
1653
2203
  success: false;
1654
2204
  errorCode: "not_logged_in";
1655
2205
  errorMessage: "The user is not logged in. A session key must be provided for this operation.";
1656
- }, any>;
1657
- updateSubscription: Procedure<{
1658
- userId?: string;
1659
- studioId?: string;
1660
- subscriptionId?: string;
1661
- subscriptionStatus?: "incomplete" | "active" | "trialing" | "canceled" | "ended" | "past_due" | "unpaid" | "incomplete_expired" | "paused";
1662
- subscriptionPeriodStartMs?: number;
1663
- subscriptionPeriodEndMs?: number;
1664
- }, import("./AuthController").ValidateSessionKeyFailure | NoSessionKeyResult | import("./SubscriptionController").UpdateSubscriptionResult | {
2206
+ }, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
2207
+ updateSubscription: Procedure<z.ZodObject<{
2208
+ userId: z.ZodOptional<z.ZodString>;
2209
+ studioId: z.ZodOptional<z.ZodString>;
2210
+ subscriptionId: z.ZodNullable<z.ZodString>;
2211
+ subscriptionStatus: z.ZodNullable<z.ZodEnum<{
2212
+ unpaid: "unpaid";
2213
+ active: "active";
2214
+ canceled: "canceled";
2215
+ ended: "ended";
2216
+ past_due: "past_due";
2217
+ incomplete: "incomplete";
2218
+ incomplete_expired: "incomplete_expired";
2219
+ trialing: "trialing";
2220
+ paused: "paused";
2221
+ }>>;
2222
+ subscriptionPeriodStartMs: z.ZodNullable<z.ZodInt>;
2223
+ subscriptionPeriodEndMs: z.ZodNullable<z.ZodInt>;
2224
+ }, z.core.$strip>, import("./AuthController").ValidateSessionKeyFailure | NoSessionKeyResult | import("./SubscriptionController").UpdateSubscriptionResult | {
1665
2225
  success: false;
1666
2226
  errorCode: "not_supported";
1667
2227
  errorMessage: string;
1668
- }, any>;
1669
- listInsts: Procedure<{
1670
- recordName?: string;
1671
- inst?: string;
1672
- marker?: string;
1673
- }, import("./AuthController").ValidateSessionKeyFailure | NoSessionKeyResult | import("./websockets/WebsocketController").ListInstsResult | {
2228
+ }, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
2229
+ getManageXpAccountLink: Procedure<z.ZodObject<{}, z.core.$strip>, import("./AuthController").ValidateSessionKeyFailure | NoSessionKeyResult | {
1674
2230
  success: false;
1675
2231
  errorCode: "not_logged_in";
1676
2232
  errorMessage: "The user is not logged in. A session key must be provided for this operation.";
@@ -1678,12 +2234,12 @@ export declare class RecordsServer {
1678
2234
  success: false;
1679
2235
  errorCode: "not_supported";
1680
2236
  errorMessage: string;
1681
- }, any>;
1682
- deleteInst: Procedure<{
1683
- recordKey?: string;
1684
- recordName?: string;
1685
- inst?: string;
1686
- }, import("./AuthController").ValidateSessionKeyFailure | NoSessionKeyResult | import("./websockets/WebsocketController").EraseInstResult | {
2237
+ } | import("@casual-simulation/aux-common").GenericResult<{
2238
+ url: string;
2239
+ }, SimpleError>, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
2240
+ getStripeLoginLink: Procedure<z.ZodObject<{
2241
+ studioId: z.ZodOptional<z.ZodString>;
2242
+ }, z.core.$strip>, import("./AuthController").ValidateSessionKeyFailure | NoSessionKeyResult | {
1687
2243
  success: false;
1688
2244
  errorCode: "not_logged_in";
1689
2245
  errorMessage: "The user is not logged in. A session key must be provided for this operation.";
@@ -1691,41 +2247,296 @@ export declare class RecordsServer {
1691
2247
  success: false;
1692
2248
  errorCode: "not_supported";
1693
2249
  errorMessage: string;
1694
- }, any>;
1695
- reportInst: Procedure<{
1696
- recordName?: string;
1697
- inst?: string;
1698
- automaticReport?: boolean;
1699
- reportReason?: "other" | "poor-performance" | "spam" | "harassment" | "copyright-infringement" | "obscene" | "illegal";
1700
- reportReasonText?: string;
1701
- reportedUrl?: string;
1702
- reportedPermalink?: string;
1703
- }, import("./AuthController").ValidateSessionKeyFailure | import("./ModerationController").ReportInstResult | {
2250
+ } | import("@casual-simulation/aux-common").GenericResult<{
2251
+ url: string;
2252
+ }, SimpleError>, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
2253
+ recordContract: Procedure<z.ZodObject<{
2254
+ recordName: z.ZodString;
2255
+ item: z.ZodNonOptional<z.ZodObject<{
2256
+ address: z.ZodString;
2257
+ holdingUser: z.ZodString;
2258
+ rate: z.ZodInt;
2259
+ initialValue: z.ZodInt;
2260
+ description: z.ZodNullable<z.ZodOptional<z.ZodString>>;
2261
+ markers: z.ZodPrefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
2262
+ }, z.core.$strip>>;
2263
+ instances: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodArray<z.ZodString>>>;
2264
+ }, z.core.$strip>, import("./crud").CrudRecordItemResult, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
2265
+ getContract: Procedure<z.ZodObject<{
2266
+ recordName: z.ZodString;
2267
+ address: z.ZodString;
2268
+ instances: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodArray<z.ZodString>>>;
2269
+ }, z.core.$strip>, import("./crud").CrudGetItemResult<any>, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
2270
+ listContracts: Procedure<z.ZodObject<{
2271
+ recordName: z.ZodString;
2272
+ address: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2273
+ marker: z.ZodOptional<z.ZodString>;
2274
+ sort: z.ZodOptional<z.ZodEnum<{
2275
+ ascending: "ascending";
2276
+ descending: "descending";
2277
+ }>>;
2278
+ instances: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodArray<z.ZodString>>>;
2279
+ }, z.core.$strip>, import("./AuthController").ValidateSessionKeyFailure | import("./crud").CrudListItemsFailure | import("./crud").CrudListItemsSuccess<any> | {
1704
2280
  success: false;
1705
2281
  errorCode: "not_supported";
1706
2282
  errorMessage: string;
1707
- }, any>;
1708
- getInstData: Procedure<{
1709
- recordName?: string;
1710
- inst?: string;
1711
- branch?: string;
1712
- }, import("./AuthController").ValidateSessionKeyFailure | {
2283
+ }, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
2284
+ eraseContract: Procedure<z.ZodObject<{
2285
+ recordName: z.ZodString;
2286
+ address: z.ZodString;
2287
+ instances: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodArray<z.ZodString>>>;
2288
+ }, z.core.$strip>, import("./crud").CrudEraseItemResult, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
2289
+ cancelContract: Procedure<z.ZodObject<{
2290
+ recordName: z.ZodString;
2291
+ address: z.ZodString;
2292
+ instances: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodArray<z.ZodString>>>;
2293
+ }, z.core.$strip>, import("./AuthController").ValidateSessionKeyFailure | NoSessionKeyResult | {
1713
2294
  success: false;
1714
- errorCode: import("@casual-simulation/aux-common").ServerError | "inst_not_found" | import("./PolicyController").ConstructAuthorizationContextFailure["errorCode"] | import("./PolicyController").AuthorizeSubjectFailure["errorCode"] | import("./websockets/WebsocketController").GetOrCreateInstFailure["errorCode"];
2295
+ errorCode: "not_logged_in";
2296
+ errorMessage: "The user is not logged in. A session key must be provided for this operation.";
2297
+ } | {
2298
+ success: false;
2299
+ errorCode: "not_supported";
1715
2300
  errorMessage: string;
1716
- reason?: DenialReason;
2301
+ } | import("@casual-simulation/aux-common").GenericResult<{
2302
+ refundedAmount: number;
2303
+ refundCurrency: string;
2304
+ }, SimpleError>, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
2305
+ listInsts: Procedure<z.ZodObject<{
2306
+ recordName: z.ZodOptional<z.ZodString>;
2307
+ inst: z.ZodOptional<z.ZodString>;
2308
+ marker: z.ZodOptional<z.ZodString>;
2309
+ }, z.core.$strip>, import("./AuthController").ValidateSessionKeyFailure | NoSessionKeyResult | import("./websockets/WebsocketController").ListInstsResult | {
2310
+ success: false;
2311
+ errorCode: "not_logged_in";
2312
+ errorMessage: "The user is not logged in. A session key must be provided for this operation.";
2313
+ } | {
2314
+ success: false;
2315
+ errorCode: "not_supported";
2316
+ errorMessage: string;
2317
+ }, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
2318
+ invoiceContract: Procedure<z.ZodObject<{
2319
+ contractId: z.ZodString;
2320
+ amount: z.ZodInt;
2321
+ note: z.ZodOptional<z.ZodString>;
2322
+ payoutDestination: z.ZodEnum<{
2323
+ account: "account";
2324
+ stripe: "stripe";
2325
+ }>;
2326
+ }, z.core.$strip>, import("./AuthController").ValidateSessionKeyFailure | NoSessionKeyResult | {
2327
+ success: false;
2328
+ errorCode: "not_logged_in";
2329
+ errorMessage: "The user is not logged in. A session key must be provided for this operation.";
1717
2330
  } | {
2331
+ success: false;
2332
+ errorCode: "not_supported";
2333
+ errorMessage: string;
2334
+ } | import("@casual-simulation/aux-common").GenericResult<{
2335
+ invoiceId: string;
2336
+ }, SimpleError>, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
2337
+ payContractInvoice: Procedure<z.ZodObject<{
2338
+ invoiceId: z.ZodString;
2339
+ }, z.core.$strip>, import("./AuthController").ValidateSessionKeyFailure | NoSessionKeyResult | {
2340
+ success: false;
2341
+ errorCode: "not_logged_in";
2342
+ errorMessage: "The user is not logged in. A session key must be provided for this operation.";
2343
+ } | {
2344
+ success: false;
2345
+ errorCode: "not_supported";
2346
+ errorMessage: string;
2347
+ } | import("@casual-simulation/aux-common").GenericResult<void, SimpleError>, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
2348
+ payoutAccount: Procedure<z.ZodObject<{
2349
+ userId: z.ZodOptional<z.ZodString>;
2350
+ studioId: z.ZodOptional<z.ZodString>;
2351
+ amount: z.ZodOptional<z.ZodInt>;
2352
+ destination: z.ZodEnum<{
2353
+ stripe: "stripe";
2354
+ cash: "cash";
2355
+ }>;
2356
+ }, z.core.$strip>, import("./AuthController").ValidateSessionKeyFailure | NoSessionKeyResult | {
2357
+ success: false;
2358
+ errorCode: "not_logged_in";
2359
+ errorMessage: "The user is not logged in. A session key must be provided for this operation.";
2360
+ } | {
2361
+ success: false;
2362
+ errorCode: "not_supported";
2363
+ errorMessage: string;
2364
+ } | import("@casual-simulation/aux-common").GenericResult<{
2365
+ payoutId: string;
2366
+ }, SimpleError>, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
2367
+ listContractInvoices: Procedure<z.ZodObject<{
2368
+ contractId: z.ZodString;
2369
+ }, z.core.$strip>, import("./AuthController").ValidateSessionKeyFailure | NoSessionKeyResult | {
2370
+ success: false;
2371
+ errorCode: "not_logged_in";
2372
+ errorMessage: "The user is not logged in. A session key must be provided for this operation.";
2373
+ } | {
2374
+ success: false;
2375
+ errorCode: "not_supported";
2376
+ errorMessage: string;
2377
+ } | import("@casual-simulation/aux-common").GenericResult<import("./contracts").ContractInvoice[], SimpleError>, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
2378
+ cancelInvoice: Procedure<z.ZodObject<{
2379
+ invoiceId: z.ZodString;
2380
+ }, z.core.$strip>, import("./AuthController").ValidateSessionKeyFailure | NoSessionKeyResult | {
2381
+ success: false;
2382
+ errorCode: "not_logged_in";
2383
+ errorMessage: "The user is not logged in. A session key must be provided for this operation.";
2384
+ } | {
2385
+ success: false;
2386
+ errorCode: "not_supported";
2387
+ errorMessage: string;
2388
+ } | import("@casual-simulation/aux-common").GenericResult<void, SimpleError>, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
2389
+ deleteInst: Procedure<z.ZodObject<{
2390
+ recordKey: z.ZodOptional<z.ZodString>;
2391
+ recordName: z.ZodOptional<z.ZodString>;
2392
+ inst: z.ZodOptional<z.ZodString>;
2393
+ }, z.core.$strip>, import("./AuthController").ValidateSessionKeyFailure | NoSessionKeyResult | import("./websockets/WebsocketController").EraseInstResult | {
2394
+ success: false;
2395
+ errorCode: "not_logged_in";
2396
+ errorMessage: "The user is not logged in. A session key must be provided for this operation.";
2397
+ } | {
2398
+ success: false;
2399
+ errorCode: "not_supported";
2400
+ errorMessage: string;
2401
+ }, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
2402
+ reportInst: Procedure<z.ZodObject<{
2403
+ recordName: z.ZodNullable<z.ZodString>;
2404
+ inst: z.ZodString;
2405
+ automaticReport: z.ZodBoolean;
2406
+ reportReason: z.ZodUnion<readonly [z.ZodLiteral<"poor-performance">, z.ZodLiteral<"spam">, z.ZodLiteral<"harassment">, z.ZodLiteral<"copyright-infringement">, z.ZodLiteral<"obscene">, z.ZodLiteral<"illegal">, z.ZodLiteral<"other">]>;
2407
+ reportReasonText: z.ZodString;
2408
+ reportedUrl: z.ZodURL;
2409
+ reportedPermalink: z.ZodURL;
2410
+ }, z.core.$strip>, import("./AuthController").ValidateSessionKeyFailure | import("./ModerationController").ReportInstResult | {
2411
+ success: false;
2412
+ errorCode: "not_supported";
2413
+ errorMessage: string;
2414
+ }, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
2415
+ getInstData: Procedure<z.ZodObject<{
2416
+ recordName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2417
+ inst: z.ZodString;
2418
+ branch: z.ZodPrefault<z.ZodString>;
2419
+ }, z.core.$strip>, import("./AuthController").ValidateSessionKeyFailure | {
1718
2420
  success: true;
1719
2421
  data: import("@casual-simulation/aux-common").StoredAux;
1720
- }, any>;
1721
- listProcedures: Procedure<{}, {
2422
+ } | {
2423
+ success: false;
2424
+ errorCode: import("@casual-simulation/aux-common").ServerError | "inst_not_found" | import("./PolicyController").ConstructAuthorizationContextFailure["errorCode"] | import("./PolicyController").AuthorizeSubjectFailure["errorCode"] | import("./websockets/WebsocketController").GetOrCreateInstFailure["errorCode"];
2425
+ errorMessage: string;
2426
+ reason?: DenialReason;
2427
+ }, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
2428
+ listProcedures: Procedure<z.ZodObject<{}, z.core.$strip>, {
1722
2429
  version: string;
1723
2430
  versionHash: string;
1724
2431
  procedures: import("@casual-simulation/aux-common").ProcedureMetadata[];
1725
2432
  success: true;
1726
- }, any>;
2433
+ }, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
2434
+ getPurchasableItem: Procedure<z.ZodObject<{
2435
+ recordName: z.ZodString;
2436
+ address: z.ZodString;
2437
+ instances: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodArray<z.ZodString>>>;
2438
+ }, z.core.$strip>, import("./crud").CrudGetItemResult<PurchasableItem>, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
2439
+ listPurchasableItems: Procedure<z.ZodObject<{
2440
+ recordName: z.ZodString;
2441
+ address: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2442
+ marker: z.ZodOptional<z.ZodString>;
2443
+ sort: z.ZodOptional<z.ZodEnum<{
2444
+ ascending: "ascending";
2445
+ descending: "descending";
2446
+ }>>;
2447
+ instances: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodArray<z.ZodString>>>;
2448
+ }, z.core.$strip>, import("./AuthController").ValidateSessionKeyFailure | {
2449
+ success: false;
2450
+ errorCode: "not_supported";
2451
+ errorMessage: string;
2452
+ } | import("./crud").CrudListItemsResult<PurchasableItem>, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
2453
+ recordPurchasableItem: Procedure<z.ZodObject<{
2454
+ recordName: z.ZodString;
2455
+ item: z.ZodObject<{
2456
+ address: z.ZodString;
2457
+ name: z.ZodString;
2458
+ description: z.ZodString;
2459
+ imageUrls: z.ZodArray<z.ZodString>;
2460
+ currency: z.ZodString;
2461
+ cost: z.ZodInt;
2462
+ taxCode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2463
+ roleName: z.ZodString;
2464
+ roleGrantTimeMs: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
2465
+ redirectUrl: z.ZodOptional<z.ZodNullable<z.ZodURL>>;
2466
+ markers: z.ZodArray<z.ZodString>;
2467
+ }, z.core.$strip>;
2468
+ instances: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodArray<z.ZodString>>>;
2469
+ }, z.core.$strip>, import("./crud").CrudRecordItemResult, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
2470
+ erasePurchasableItem: Procedure<z.ZodObject<{
2471
+ recordName: z.ZodString;
2472
+ address: z.ZodString;
2473
+ instances: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodArray<z.ZodString>>>;
2474
+ }, z.core.$strip>, import("./crud").CrudEraseItemResult, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
2475
+ purchaseItem: Procedure<z.ZodObject<{
2476
+ recordName: z.ZodString;
2477
+ item: z.ZodObject<{
2478
+ address: z.ZodString;
2479
+ expectedCost: z.ZodInt;
2480
+ currency: z.ZodString;
2481
+ }, z.core.$strip>;
2482
+ instances: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodArray<z.ZodString>>>;
2483
+ returnUrl: z.ZodURL;
2484
+ successUrl: z.ZodURL;
2485
+ }, z.core.$strip>, import("./AuthController").ValidateSessionKeyFailure | import("./SubscriptionController").CreatePurchaseItemLinkResult, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
2486
+ purchaseContract: Procedure<z.ZodObject<{
2487
+ recordName: z.ZodString;
2488
+ contract: z.ZodObject<{
2489
+ address: z.ZodString;
2490
+ expectedCost: z.ZodInt;
2491
+ currency: z.ZodPrefault<z.ZodString>;
2492
+ }, z.core.$strip>;
2493
+ instances: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodArray<z.ZodString>>>;
2494
+ returnUrl: z.ZodURL;
2495
+ successUrl: z.ZodURL;
2496
+ }, z.core.$strip>, import("./AuthController").ValidateSessionKeyFailure | import("@casual-simulation/aux-common").GenericResult<{
2497
+ url?: string;
2498
+ sessionId: string;
2499
+ }, SimpleError>, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
2500
+ getContractPricing: Procedure<z.ZodObject<{
2501
+ recordName: z.ZodString;
2502
+ address: z.ZodString;
2503
+ instances: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodArray<z.ZodString>>>;
2504
+ }, z.core.$strip>, import("./AuthController").ValidateSessionKeyFailure | import("@casual-simulation/aux-common").GenericResult<import("./SubscriptionController").ContractPricing, SimpleError>, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
2505
+ fulfillCheckoutSession: Procedure<z.ZodObject<{
2506
+ sessionId: z.ZodString;
2507
+ activation: z.ZodEnum<{
2508
+ now: "now";
2509
+ later: "later";
2510
+ }>;
2511
+ }, z.core.$strip>, import("./AuthController").ValidateSessionKeyFailure | import("./SubscriptionController").FulfillCheckoutSessionResult, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
2512
+ claimActivationKey: Procedure<z.ZodObject<{
2513
+ activationKey: z.ZodString;
2514
+ target: z.ZodEnum<{
2515
+ guest: "guest";
2516
+ self: "self";
2517
+ }>;
2518
+ }, z.core.$strip>, import("./AuthController").ValidateSessionKeyFailure | import("./SubscriptionController").ClaimActivationKeyResult, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
2519
+ getConfigurationValue: Procedure<z.ZodObject<{
2520
+ key: z.ZodEnum<{
2521
+ subscriptions: "subscriptions";
2522
+ privo: "privo";
2523
+ moderation: "moderation";
2524
+ web: "web";
2525
+ playerWebManifest: "playerWebManifest";
2526
+ ab1Bootstrap: "ab1Bootstrap";
2527
+ }>;
2528
+ }, z.core.$strip>, import("./AuthController").ValidateSessionKeyFailure | {
2529
+ success: false;
2530
+ errorCode: "not_logged_in";
2531
+ errorMessage: "The user is not logged in. A session key must be provided for this operation.";
2532
+ } | import("@casual-simulation/aux-common").GenericResult<import("./ConfigurationStore").ConfigurationOutput<"subscriptions" | "privo" | "moderation" | "web" | "playerWebManifest" | "ab1Bootstrap">, SimpleError>, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
2533
+ setConfigurationValue: Procedure<z.ZodDiscriminatedUnion<[z.core.$ZodTypeDiscriminable, ...z.core.$ZodTypeDiscriminable[]], "key">, import("./AuthController").ValidateSessionKeyFailure | {
2534
+ success: false;
2535
+ errorCode: "not_logged_in";
2536
+ errorMessage: "The user is not logged in. A session key must be provided for this operation.";
2537
+ } | import("@casual-simulation/aux-common").GenericResult<void, SimpleError>, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
1727
2538
  };
1728
- constructor({ allowedAccountOrigins, allowedApiOrigins, authController, livekitController, recordsController, eventsController, dataController, manualDataController, filesController, subscriptionController, websocketController, websocketRateLimitController, rateLimitController, policyController, aiController, moderationController, loomController, webhooksController, notificationsController, packagesController, packageVersionController, searchRecordsController, databaseRecordsController, }: RecordsServerOptions);
2539
+ constructor({ allowedAccountOrigins, allowedApiOrigins, authController, livekitController, recordsController, eventsController, dataController, manualDataController, filesController, subscriptionController, websocketController, websocketRateLimitController, rateLimitController, policyController, aiController, moderationController, loomController, webhooksController, notificationsController, packagesController, packageVersionController, searchRecordsController, databaseRecordsController, contractRecordsController, purchasableItemsController, viewTemplateRenderer, }: RecordsServerOptions);
1729
2540
  private _createProcedures;
1730
2541
  private _setupRoutes;
1731
2542
  /**
@@ -1733,7 +2544,7 @@ export declare class RecordsServer {
1733
2544
  * @param name The name of the procedure.
1734
2545
  * @param procedure The procedure that should be added.
1735
2546
  */
1736
- addProcedure<TInput, TOutput extends ProcedureOutput, TQuery>(name: string, procedure: Procedure<TInput, TOutput, TQuery>): void;
2547
+ addProcedure<TInput extends z.ZodType | void, TOutput extends ProcedureOutput, TQuery extends z.ZodType | void>(name: string, procedure: Procedure<TInput, TOutput, TQuery>): void;
1737
2548
  /**
1738
2549
  * Adds the given procedures to the server.
1739
2550
  * @param procedures The procedures that should be added.
@@ -1743,16 +2554,22 @@ export declare class RecordsServer {
1743
2554
  * Adds the given procedural route to the server.
1744
2555
  * @param route The route that should be added.
1745
2556
  */
1746
- private _addProcedureRoute;
2557
+ private _addProcedureApiRoute;
2558
+ /**
2559
+ * Adds the given procedural route to the server.
2560
+ * @param route The route that should be added.
2561
+ */
2562
+ private _addProcedureViewRoute;
1747
2563
  /**
1748
2564
  * Adds the given route to the server.
1749
2565
  */
1750
- addRoute<T>(route: Route<T>): void;
2566
+ addRoute<TSchema extends z.ZodType | void, TQuery extends z.ZodType | void>(route: Route<TSchema, TQuery>): void;
2567
+ private _getRouteKey;
1751
2568
  /**
1752
2569
  * Forcefully adds the given route to the server, overwriting any routes that already exist.
1753
2570
  * @param route The route that should be added.
1754
2571
  */
1755
- overrideRoute<T>(route: Route<T>): void;
2572
+ overrideRoute<TSchema extends z.ZodType | void, TQuery extends z.ZodType | void>(route: Route<TSchema, TQuery>): void;
1756
2573
  /**
1757
2574
  * Handles the given request and returns the specified response.
1758
2575
  * @param request The request that should be handled.
@@ -1789,6 +2606,12 @@ export declare class RecordsServer {
1789
2606
  private _putUserInfo;
1790
2607
  private _validateSessionKey;
1791
2608
  }
2609
+ /**
2610
+ * Returns the given result and body as a GenericHttpResponse.
2611
+ * @param result The result.
2612
+ * @param body The body. If undefined, the result will be stringified and used as the body.
2613
+ * @returns
2614
+ */
1792
2615
  export declare function returnResult<T extends {
1793
2616
  success: false;
1794
2617
  errorCode: KnownErrorCodes;
@@ -1796,7 +2619,7 @@ export declare function returnResult<T extends {
1796
2619
  reason?: DenialReason;
1797
2620
  } | {
1798
2621
  success: true;
1799
- }>(result: T): GenericHttpResponse;
2622
+ }>(result: T, body?: string, headers?: GenericHttpHeaders): GenericHttpResponse;
1800
2623
  export declare function returnProcedureOutputStream(result: ProcedureOutputStream): GenericHttpResponse;
1801
2624
  export declare function returnProcedureOutput(result: ProcedureOutput): GenericHttpResponse;
1802
2625
  /**