@spacefast/common 0.0.5 → 0.0.7

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 (183) hide show
  1. package/brand-assets/spacefast-favicon.svg +16 -0
  2. package/brand-assets/spacefast-sf-full-bleed.svg +13 -0
  3. package/brand-assets/spacefast-wordmark.svg +5 -0
  4. package/dist/agents/connect-targets.d.ts +138 -0
  5. package/dist/agents/connect-targets.js +243 -0
  6. package/dist/brand-assets-build.d.ts +26 -0
  7. package/dist/brand-assets-build.js +81 -0
  8. package/dist/brand-assets.d.ts +42 -0
  9. package/dist/brand-assets.js +30 -0
  10. package/dist/brand.d.ts +1 -0
  11. package/dist/brand.js +5 -0
  12. package/dist/config/domains.d.ts +12 -6
  13. package/dist/config/domains.js +30 -38
  14. package/dist/contracts/access.d.ts +967 -124
  15. package/dist/contracts/access.js +804 -148
  16. package/dist/contracts/activity.d.ts +1 -1
  17. package/dist/contracts/activity.js +28 -2
  18. package/dist/contracts/annotations.d.ts +2 -4
  19. package/dist/contracts/api-keys.d.ts +126 -4
  20. package/dist/contracts/api-keys.js +74 -6
  21. package/dist/contracts/archives.d.ts +8 -2
  22. package/dist/contracts/archives.js +11 -4
  23. package/dist/contracts/billing.d.ts +0 -9
  24. package/dist/contracts/builds.d.ts +65 -21
  25. package/dist/contracts/builds.js +29 -0
  26. package/dist/contracts/common.d.ts +2 -0
  27. package/dist/contracts/common.js +4 -0
  28. package/dist/contracts/continuation.d.ts +0 -3
  29. package/dist/contracts/countries.d.ts +2 -0
  30. package/dist/contracts/countries.js +261 -0
  31. package/dist/contracts/deployments.d.ts +34 -34
  32. package/dist/contracts/device-auth.d.ts +4 -11
  33. package/dist/contracts/device-auth.js +4 -0
  34. package/dist/contracts/docs.d.ts +119 -0
  35. package/dist/contracts/docs.js +51 -0
  36. package/dist/contracts/domains.d.ts +96 -54
  37. package/dist/contracts/domains.js +26 -4
  38. package/dist/contracts/enums.d.ts +15 -16
  39. package/dist/contracts/enums.js +26 -14
  40. package/dist/contracts/error-code-meta.d.ts +184 -0
  41. package/dist/contracts/error-code-meta.js +124 -10
  42. package/dist/contracts/error-codes.d.ts +1 -1
  43. package/dist/contracts/error-codes.js +42 -0
  44. package/dist/contracts/events.d.ts +1 -1
  45. package/dist/contracts/feature-lifecycle-core.d.ts +36 -0
  46. package/dist/contracts/feature-lifecycle-core.js +220 -0
  47. package/dist/contracts/feature-lifecycle.d.ts +7 -0
  48. package/dist/contracts/feature-lifecycle.js +31 -0
  49. package/dist/contracts/features.d.ts +76 -6
  50. package/dist/contracts/features.js +178 -13
  51. package/dist/contracts/generated-feature-launch-entries.d.ts +2 -0
  52. package/dist/contracts/generated-feature-launch-entries.js +518 -0
  53. package/dist/contracts/git.d.ts +2 -8
  54. package/dist/contracts/ids.d.ts +9 -0
  55. package/dist/contracts/ids.js +13 -0
  56. package/dist/contracts/mcp.d.ts +8 -10
  57. package/dist/contracts/me.js +1 -1
  58. package/dist/contracts/oauth-resources.d.ts +19 -8
  59. package/dist/contracts/oauth-resources.js +44 -13
  60. package/dist/contracts/operations.d.ts +161 -1
  61. package/dist/contracts/operations.js +49 -1
  62. package/dist/contracts/platform.d.ts +6 -102
  63. package/dist/contracts/platform.js +6 -50
  64. package/dist/contracts/publishes.d.ts +130 -0
  65. package/dist/contracts/publishes.js +145 -0
  66. package/dist/contracts/push-new.d.ts +4 -4
  67. package/dist/contracts/quotas.d.ts +2 -0
  68. package/dist/contracts/quotas.js +8 -0
  69. package/dist/contracts/repository-connections.d.ts +9 -8
  70. package/dist/contracts/repository-connections.js +13 -0
  71. package/dist/contracts/resources.d.ts +99 -13
  72. package/dist/contracts/resources.js +36 -4
  73. package/dist/contracts/routes.d.ts +0 -2
  74. package/dist/contracts/runtime-api.d.ts +363 -39
  75. package/dist/contracts/runtime-api.js +276 -6
  76. package/dist/contracts/sf-config-v1.d.ts +75 -0
  77. package/dist/contracts/sf-config-v1.js +6 -0
  78. package/dist/contracts/sites.d.ts +19 -2
  79. package/dist/contracts/sites.js +21 -0
  80. package/dist/contracts/space-config.d.ts +201 -2
  81. package/dist/contracts/space-config.js +135 -5
  82. package/dist/contracts/spaces.d.ts +376 -196
  83. package/dist/contracts/spaces.js +62 -10
  84. package/dist/contracts/superadmin-emails.d.ts +4 -2
  85. package/dist/contracts/superadmin-emails.js +8 -0
  86. package/dist/contracts/superadmin-queues.d.ts +26 -26
  87. package/dist/contracts/superadmin-spaces.d.ts +172 -42
  88. package/dist/contracts/superadmin-tenants.d.ts +6 -6
  89. package/dist/contracts/superadmin-tenants.js +6 -11
  90. package/dist/contracts/superadmin.d.ts +6 -93
  91. package/dist/contracts/superadmin.js +6 -14
  92. package/dist/contracts/tags.d.ts +10 -9
  93. package/dist/contracts/tags.js +2 -1
  94. package/dist/contracts/teams.d.ts +26 -30
  95. package/dist/contracts/teams.js +11 -17
  96. package/dist/contracts/theme-json.d.ts +30 -0
  97. package/dist/contracts/theme-json.js +48 -0
  98. package/dist/contracts/variables.d.ts +0 -2
  99. package/dist/contracts/variables.js +0 -5
  100. package/dist/contracts/webhooks.d.ts +2 -0
  101. package/dist/contracts/webhooks.js +1 -1
  102. package/dist/contracts/zero.d.ts +5 -10
  103. package/dist/docs/agent-prose.d.ts +43 -3
  104. package/dist/docs/agent-prose.js +146 -7
  105. package/dist/docs/agent-setup.d.ts +51 -0
  106. package/dist/docs/agent-setup.js +211 -14
  107. package/dist/docs/agent-solutions.d.ts +5 -5
  108. package/dist/docs/agent-solutions.js +2 -2
  109. package/dist/docs/catalog.d.ts +650 -0
  110. package/dist/docs/catalog.js +758 -0
  111. package/dist/docs/error-docs.d.ts +0 -2
  112. package/dist/docs/error-docs.js +189 -35
  113. package/dist/docs/index-build.d.ts +17 -0
  114. package/dist/docs/index-build.js +24 -0
  115. package/dist/docs/search.d.ts +54 -0
  116. package/dist/docs/search.js +96 -0
  117. package/dist/docs/skill-distribution.d.ts +5 -3
  118. package/dist/docs/skill-distribution.js +8 -8
  119. package/dist/slug-policy/blocklist.d.ts +4 -0
  120. package/dist/slug-policy/blocklist.js +122 -0
  121. package/dist/slug-policy/index.d.ts +17 -0
  122. package/dist/slug-policy/index.js +86 -0
  123. package/dist/utils/access-match.d.ts +39 -0
  124. package/dist/utils/access-match.js +296 -0
  125. package/dist/utils/auth-redirect.d.ts +3 -1
  126. package/dist/utils/auth-redirect.js +21 -1
  127. package/dist/utils/build-settings.d.ts +6 -0
  128. package/dist/utils/build-settings.js +429 -46
  129. package/dist/utils/claim-token.d.ts +8 -0
  130. package/dist/utils/claim-token.js +23 -2
  131. package/dist/utils/concurrency.d.ts +1 -0
  132. package/dist/utils/concurrency.js +22 -0
  133. package/dist/utils/content-type.d.ts +1 -0
  134. package/dist/utils/content-type.js +1 -1
  135. package/dist/utils/credential-policy.d.ts +54 -0
  136. package/dist/utils/{access-policy.js → credential-policy.js} +28 -2
  137. package/dist/utils/email.d.ts +1 -0
  138. package/dist/utils/email.js +3 -0
  139. package/dist/utils/gate-theme.d.ts +61 -0
  140. package/dist/utils/gate-theme.js +217 -0
  141. package/dist/utils/git-repository.d.ts +0 -1
  142. package/dist/utils/git-repository.js +0 -3
  143. package/dist/utils/id-hints.d.ts +8 -0
  144. package/dist/utils/id-hints.js +61 -0
  145. package/dist/utils/local-space-state.d.ts +91 -0
  146. package/dist/utils/local-space-state.js +251 -0
  147. package/dist/utils/oauth-signed-query.d.ts +8 -0
  148. package/dist/utils/oauth-signed-query.js +26 -0
  149. package/dist/utils/publish-detection.d.ts +0 -8
  150. package/dist/utils/publish-detection.js +0 -93
  151. package/dist/utils/publish-policy.d.ts +6 -5
  152. package/dist/utils/publish-policy.js +71 -7
  153. package/dist/utils/query-keys.d.ts +16 -4
  154. package/dist/utils/query-keys.js +31 -4
  155. package/dist/utils/runtime-paths.d.ts +0 -1
  156. package/dist/utils/runtime-paths.js +0 -1
  157. package/dist/utils/runtime-upload-batch.d.ts +18 -0
  158. package/dist/utils/runtime-upload-batch.js +90 -0
  159. package/dist/utils/runtime-upload.d.ts +2 -0
  160. package/dist/utils/runtime-upload.js +5 -0
  161. package/dist/utils/sf-config-v1.d.ts +2 -0
  162. package/dist/utils/sf-config-v1.js +542 -0
  163. package/dist/utils/space-config.d.ts +4 -0
  164. package/dist/utils/space-config.js +10 -1
  165. package/dist/utils/space-theme.d.ts +2 -0
  166. package/dist/utils/space-theme.js +9 -0
  167. package/dist/utils/static-runtime-policy.d.ts +0 -21
  168. package/dist/utils/static-runtime-policy.js +19 -103
  169. package/dist/utils/upload-session.d.ts +1 -1
  170. package/dist/utils/wpcom-auth-redirects.d.ts +32 -2
  171. package/dist/utils/wpcom-auth-redirects.js +26 -10
  172. package/dist/vocabulary.d.ts +130 -30
  173. package/dist/vocabulary.js +77 -36
  174. package/package.json +35 -1
  175. package/dist/contracts/account.d.ts +0 -28
  176. package/dist/contracts/account.js +0 -54
  177. package/dist/contracts/intercom.d.ts +0 -6
  178. package/dist/contracts/intercom.js +0 -5
  179. package/dist/contracts/telemetry.d.ts +0 -2
  180. package/dist/contracts/telemetry.js +0 -1
  181. package/dist/utils/access-policy.d.ts +0 -39
  182. package/dist/utils/error-display.d.ts +0 -7
  183. package/dist/utils/error-display.js +0 -42
@@ -1,11 +1,17 @@
1
1
  import { z } from "zod";
2
2
  export declare const grantSchema: z.ZodString;
3
3
  export type Grant = z.infer<typeof grantSchema>;
4
- export declare const GRANT_NAMESPACES: readonly ["email:", "team:", "sub-team:", "user:", "svc:", "ext:", "email-domain:", "space:", "link:", "sso:", "pw:"];
5
- export type GrantNamespace = (typeof GRANT_NAMESPACES)[number];
4
+ export declare const GRANT_NAMESPACES: readonly ["email:", "team:", "sub-team:", "user:", "space:", "link:", "invite:", "svc:", "sso:", "ext:", "pw:"];
6
5
  export declare function isWellFormedGrant(grant: string): boolean;
7
6
  export declare const requiredGrantSchema: z.ZodString;
8
- export type RequiredGrant = z.infer<typeof requiredGrantSchema>;
7
+ export declare const SPACE_LEVELS: readonly ["viewer", "commenter", "editor", "admin"];
8
+ export declare const spaceLevelSchema: z.ZodEnum<{
9
+ viewer: "viewer";
10
+ commenter: "commenter";
11
+ editor: "editor";
12
+ admin: "admin";
13
+ }>;
14
+ export type SpaceLevel = z.infer<typeof spaceLevelSchema>;
9
15
  export declare const accessKeySchema: z.ZodObject<{
10
16
  kid: z.ZodString;
11
17
  alg: z.ZodLiteral<"EdDSA">;
@@ -13,7 +19,139 @@ export declare const accessKeySchema: z.ZodObject<{
13
19
  grantNamespaces: z.ZodArray<z.ZodString>;
14
20
  }, z.core.$strip>;
15
21
  export type AccessKey = z.infer<typeof accessKeySchema>;
16
- export declare const passwordAuthSchema: z.ZodObject<{
22
+ export declare const ACCESS_CONNECTION_TYPES: readonly ["oidc", "external"];
23
+ export declare const accessConnectionTypeSchema: z.ZodEnum<{
24
+ external: "external";
25
+ oidc: "oidc";
26
+ }>;
27
+ export declare const OIDC_CONNECTION_DEFAULT_TTL_SECONDS: number;
28
+ export declare const EXTERNAL_CONNECTION_DEFAULT_TTL_SECONDS: number;
29
+ export declare const EXTERNAL_TOKEN_MAX_TTL_SECONDS: number;
30
+ export declare function ssoGrant(connectionId: string): string;
31
+ export declare function externalGrantNamespace(connectionId: string): string;
32
+ export declare function externalGrant(connectionId: string, tag: string): string;
33
+ export declare function connectionAcquireRef(connectionId: string): string;
34
+ export declare function parseConnectionAcquireRef(url: string): string | null;
35
+ export declare function referencedConnectionIds(input: {
36
+ requiredGrants?: string[] | undefined;
37
+ acquire?: Array<{
38
+ type: string;
39
+ url?: string;
40
+ }> | undefined;
41
+ }): string[];
42
+ export declare const externalConnectionPublicKeySchema: z.ZodObject<{
43
+ kid: z.ZodString;
44
+ publicKey: z.ZodString;
45
+ }, z.core.$strip>;
46
+ export type ExternalConnectionPublicKey = z.infer<typeof externalConnectionPublicKeySchema>;
47
+ export declare const accessConnectionSchema: z.ZodObject<{
48
+ id: z.ZodString;
49
+ teamId: z.ZodString;
50
+ type: z.ZodEnum<{
51
+ external: "external";
52
+ oidc: "oidc";
53
+ }>;
54
+ name: z.ZodString;
55
+ issuer: z.ZodDefault<z.ZodNullable<z.ZodString>>;
56
+ clientId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
57
+ clientSecretSet: z.ZodDefault<z.ZodBoolean>;
58
+ authorizeUrl: z.ZodDefault<z.ZodNullable<z.ZodString>>;
59
+ publicKeys: z.ZodDefault<z.ZodArray<z.ZodObject<{
60
+ kid: z.ZodString;
61
+ publicKey: z.ZodString;
62
+ }, z.core.$strip>>>;
63
+ sessionTtlSeconds: z.ZodNumber;
64
+ guestEmailDomains: z.ZodDefault<z.ZodNullable<z.ZodArray<z.ZodString>>>;
65
+ createdAt: z.ZodString;
66
+ revokedAt: z.ZodDefault<z.ZodNullable<z.ZodString>>;
67
+ active: z.ZodBoolean;
68
+ }, z.core.$strip>;
69
+ export type AccessConnection = z.infer<typeof accessConnectionSchema>;
70
+ export declare const oidcConnectionCreateSchema: z.ZodObject<{
71
+ type: z.ZodLiteral<"oidc">;
72
+ name: z.ZodString;
73
+ issuer: z.ZodString;
74
+ clientId: z.ZodString;
75
+ clientSecret: z.ZodString;
76
+ sessionTtlSeconds: z.ZodOptional<z.ZodNumber>;
77
+ guestEmailDomains: z.ZodOptional<z.ZodArray<z.ZodString>>;
78
+ }, z.core.$strip>;
79
+ export declare const externalConnectionCreateSchema: z.ZodObject<{
80
+ type: z.ZodLiteral<"external">;
81
+ name: z.ZodString;
82
+ authorizeUrl: z.ZodString;
83
+ publicKeys: z.ZodArray<z.ZodObject<{
84
+ kid: z.ZodString;
85
+ publicKey: z.ZodString;
86
+ }, z.core.$strip>>;
87
+ sessionTtlSeconds: z.ZodOptional<z.ZodNumber>;
88
+ guestEmailDomains: z.ZodOptional<z.ZodArray<z.ZodString>>;
89
+ }, z.core.$strip>;
90
+ export declare const accessConnectionCreateSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
91
+ type: z.ZodLiteral<"oidc">;
92
+ name: z.ZodString;
93
+ issuer: z.ZodString;
94
+ clientId: z.ZodString;
95
+ clientSecret: z.ZodString;
96
+ sessionTtlSeconds: z.ZodOptional<z.ZodNumber>;
97
+ guestEmailDomains: z.ZodOptional<z.ZodArray<z.ZodString>>;
98
+ }, z.core.$strip>, z.ZodObject<{
99
+ type: z.ZodLiteral<"external">;
100
+ name: z.ZodString;
101
+ authorizeUrl: z.ZodString;
102
+ publicKeys: z.ZodArray<z.ZodObject<{
103
+ kid: z.ZodString;
104
+ publicKey: z.ZodString;
105
+ }, z.core.$strip>>;
106
+ sessionTtlSeconds: z.ZodOptional<z.ZodNumber>;
107
+ guestEmailDomains: z.ZodOptional<z.ZodArray<z.ZodString>>;
108
+ }, z.core.$strip>], "type">;
109
+ export type AccessConnectionCreate = z.infer<typeof accessConnectionCreateSchema>;
110
+ export declare const accessConnectionUpdateSchema: z.ZodObject<{
111
+ name: z.ZodOptional<z.ZodString>;
112
+ issuer: z.ZodOptional<z.ZodString>;
113
+ clientId: z.ZodOptional<z.ZodString>;
114
+ clientSecret: z.ZodOptional<z.ZodString>;
115
+ authorizeUrl: z.ZodOptional<z.ZodString>;
116
+ publicKeys: z.ZodOptional<z.ZodArray<z.ZodObject<{
117
+ kid: z.ZodString;
118
+ publicKey: z.ZodString;
119
+ }, z.core.$strip>>>;
120
+ sessionTtlSeconds: z.ZodOptional<z.ZodNumber>;
121
+ guestEmailDomains: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
122
+ }, z.core.$strip>;
123
+ export type AccessConnectionUpdate = z.infer<typeof accessConnectionUpdateSchema>;
124
+ export declare const accessConnectionRevokeResultSchema: z.ZodObject<{
125
+ connection: z.ZodObject<{
126
+ id: z.ZodString;
127
+ teamId: z.ZodString;
128
+ type: z.ZodEnum<{
129
+ external: "external";
130
+ oidc: "oidc";
131
+ }>;
132
+ name: z.ZodString;
133
+ issuer: z.ZodDefault<z.ZodNullable<z.ZodString>>;
134
+ clientId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
135
+ clientSecretSet: z.ZodDefault<z.ZodBoolean>;
136
+ authorizeUrl: z.ZodDefault<z.ZodNullable<z.ZodString>>;
137
+ publicKeys: z.ZodDefault<z.ZodArray<z.ZodObject<{
138
+ kid: z.ZodString;
139
+ publicKey: z.ZodString;
140
+ }, z.core.$strip>>>;
141
+ sessionTtlSeconds: z.ZodNumber;
142
+ guestEmailDomains: z.ZodDefault<z.ZodNullable<z.ZodArray<z.ZodString>>>;
143
+ createdAt: z.ZodString;
144
+ revokedAt: z.ZodDefault<z.ZodNullable<z.ZodString>>;
145
+ active: z.ZodBoolean;
146
+ }, z.core.$strip>;
147
+ disabledRules: z.ZodDefault<z.ZodArray<z.ZodObject<{
148
+ spaceId: z.ZodString;
149
+ ruleId: z.ZodString;
150
+ }, z.core.$strip>>>;
151
+ }, z.core.$strip>;
152
+ export type AccessConnectionRevokeResult = z.infer<typeof accessConnectionRevokeResultSchema>;
153
+ export declare const passwordAcquireSchema: z.ZodObject<{
154
+ type: z.ZodLiteral<"password">;
17
155
  ref: z.ZodString;
18
156
  transport: z.ZodEnum<{
19
157
  basic: "basic";
@@ -21,8 +159,26 @@ export declare const passwordAuthSchema: z.ZodObject<{
21
159
  }>;
22
160
  username: z.ZodOptional<z.ZodString>;
23
161
  }, z.core.$strip>;
24
- export type PasswordAuth = z.infer<typeof passwordAuthSchema>;
25
- export declare const tokenAuthSchema: z.ZodObject<{
162
+ export declare const loginAcquireSchema: z.ZodObject<{
163
+ type: z.ZodLiteral<"login">;
164
+ url: z.ZodString;
165
+ label: z.ZodOptional<z.ZodString>;
166
+ }, z.core.$strip>;
167
+ export declare const acquireSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
168
+ type: z.ZodLiteral<"password">;
169
+ ref: z.ZodString;
170
+ transport: z.ZodEnum<{
171
+ basic: "basic";
172
+ form: "form";
173
+ }>;
174
+ username: z.ZodOptional<z.ZodString>;
175
+ }, z.core.$strip>, z.ZodObject<{
176
+ type: z.ZodLiteral<"login">;
177
+ url: z.ZodString;
178
+ label: z.ZodOptional<z.ZodString>;
179
+ }, z.core.$strip>], "type">;
180
+ export type Acquire = z.infer<typeof acquireSchema>;
181
+ export declare const ruleAuthSchema: z.ZodObject<{
26
182
  requiredGrants: z.ZodArray<z.ZodString>;
27
183
  issuers: z.ZodOptional<z.ZodArray<z.ZodObject<{
28
184
  kid: z.ZodString;
@@ -30,34 +186,25 @@ export declare const tokenAuthSchema: z.ZodObject<{
30
186
  publicKey: z.ZodString;
31
187
  grantNamespaces: z.ZodArray<z.ZodString>;
32
188
  }, z.core.$strip>>>;
33
- loginUrl: z.ZodOptional<z.ZodString>;
34
- cookieName: z.ZodOptional<z.ZodString>;
35
- }, z.core.$strip>;
36
- export type TokenAuth = z.infer<typeof tokenAuthSchema>;
37
- export declare const ruleAuthSchema: z.ZodObject<{
38
- password: z.ZodOptional<z.ZodObject<{
189
+ acquire: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
190
+ type: z.ZodLiteral<"password">;
39
191
  ref: z.ZodString;
40
192
  transport: z.ZodEnum<{
41
193
  basic: "basic";
42
194
  form: "form";
43
195
  }>;
44
196
  username: z.ZodOptional<z.ZodString>;
45
- }, z.core.$strip>>;
46
- token: z.ZodOptional<z.ZodObject<{
47
- requiredGrants: z.ZodArray<z.ZodString>;
48
- issuers: z.ZodOptional<z.ZodArray<z.ZodObject<{
49
- kid: z.ZodString;
50
- alg: z.ZodLiteral<"EdDSA">;
51
- publicKey: z.ZodString;
52
- grantNamespaces: z.ZodArray<z.ZodString>;
53
- }, z.core.$strip>>>;
54
- loginUrl: z.ZodOptional<z.ZodString>;
55
- cookieName: z.ZodOptional<z.ZodString>;
56
- }, z.core.$strip>>;
197
+ }, z.core.$strip>, z.ZodObject<{
198
+ type: z.ZodLiteral<"login">;
199
+ url: z.ZodString;
200
+ label: z.ZodOptional<z.ZodString>;
201
+ }, z.core.$strip>], "type">>>;
57
202
  }, z.core.$strip>;
58
203
  export type RuleAuth = z.infer<typeof ruleAuthSchema>;
59
204
  export declare const ruleMatchSchema: z.ZodObject<{
60
205
  host: z.ZodOptional<z.ZodString>;
206
+ hostPattern: z.ZodOptional<z.ZodString>;
207
+ hostTemplate: z.ZodOptional<z.ZodString>;
61
208
  pathPattern: z.ZodOptional<z.ZodString>;
62
209
  channel: z.ZodOptional<z.ZodString>;
63
210
  ipCidrs: z.ZodOptional<z.ZodArray<z.ZodString>>;
@@ -68,10 +215,21 @@ export declare const ruleMatchSchema: z.ZodObject<{
68
215
  value: z.ZodString;
69
216
  }, z.core.$strip>>;
70
217
  }, z.core.$strip>;
71
- export type RuleMatch = z.infer<typeof ruleMatchSchema>;
218
+ export declare const MANAGED_BY_VALUES: readonly ["sharing", "firewall", "file_share", "cast_reviewer", "team_default"];
219
+ export declare const managedBySchema: z.ZodEnum<{
220
+ sharing: "sharing";
221
+ firewall: "firewall";
222
+ file_share: "file_share";
223
+ cast_reviewer: "cast_reviewer";
224
+ team_default: "team_default";
225
+ }>;
226
+ export type ManagedBy = z.infer<typeof managedBySchema>;
72
227
  export declare const runtimeRuleSchema: z.ZodObject<{
228
+ id: z.ZodOptional<z.ZodString>;
73
229
  match: z.ZodDefault<z.ZodObject<{
74
230
  host: z.ZodOptional<z.ZodString>;
231
+ hostPattern: z.ZodOptional<z.ZodString>;
232
+ hostTemplate: z.ZodOptional<z.ZodString>;
75
233
  pathPattern: z.ZodOptional<z.ZodString>;
76
234
  channel: z.ZodOptional<z.ZodString>;
77
235
  ipCidrs: z.ZodOptional<z.ZodArray<z.ZodString>>;
@@ -88,34 +246,43 @@ export declare const runtimeRuleSchema: z.ZodObject<{
88
246
  challenge: "challenge";
89
247
  }>;
90
248
  auth: z.ZodOptional<z.ZodObject<{
91
- password: z.ZodOptional<z.ZodObject<{
249
+ requiredGrants: z.ZodArray<z.ZodString>;
250
+ issuers: z.ZodOptional<z.ZodArray<z.ZodObject<{
251
+ kid: z.ZodString;
252
+ alg: z.ZodLiteral<"EdDSA">;
253
+ publicKey: z.ZodString;
254
+ grantNamespaces: z.ZodArray<z.ZodString>;
255
+ }, z.core.$strip>>>;
256
+ acquire: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
257
+ type: z.ZodLiteral<"password">;
92
258
  ref: z.ZodString;
93
259
  transport: z.ZodEnum<{
94
260
  basic: "basic";
95
261
  form: "form";
96
262
  }>;
97
263
  username: z.ZodOptional<z.ZodString>;
98
- }, z.core.$strip>>;
99
- token: z.ZodOptional<z.ZodObject<{
100
- requiredGrants: z.ZodArray<z.ZodString>;
101
- issuers: z.ZodOptional<z.ZodArray<z.ZodObject<{
102
- kid: z.ZodString;
103
- alg: z.ZodLiteral<"EdDSA">;
104
- publicKey: z.ZodString;
105
- grantNamespaces: z.ZodArray<z.ZodString>;
106
- }, z.core.$strip>>>;
107
- loginUrl: z.ZodOptional<z.ZodString>;
108
- cookieName: z.ZodOptional<z.ZodString>;
109
- }, z.core.$strip>>;
264
+ }, z.core.$strip>, z.ZodObject<{
265
+ type: z.ZodLiteral<"login">;
266
+ url: z.ZodString;
267
+ label: z.ZodOptional<z.ZodString>;
268
+ }, z.core.$strip>], "type">>>;
110
269
  }, z.core.$strip>>;
270
+ managedBy: z.ZodOptional<z.ZodEnum<{
271
+ sharing: "sharing";
272
+ firewall: "firewall";
273
+ file_share: "file_share";
274
+ cast_reviewer: "cast_reviewer";
275
+ team_default: "team_default";
276
+ }>>;
277
+ expiresAt: z.ZodOptional<z.ZodNumber>;
111
278
  reasonCode: z.ZodOptional<z.ZodString>;
112
279
  message: z.ZodOptional<z.ZodString>;
113
280
  }, z.core.$strip>;
114
281
  export type RuntimeRule = z.infer<typeof runtimeRuleSchema>;
115
- export declare const ACCESS_TOKEN_COOKIE_NAME = "stattic_access";
116
- export declare const ACCESS_TOKEN_KID = "stattic-runtime-v1";
282
+ export declare const ACCESS_TOKEN_KID = "spacefast-runtime-v1";
117
283
  export declare const ACCESS_TOKEN_ALG = "EdDSA";
118
- export declare const CAST_TOKEN_KID = "spacefast-cast-v1";
284
+ export declare const RUNTIME_JWKS_WELL_KNOWN_FILENAME = "spacefast-runtime-jwks.json";
285
+ export declare const LOCAL_PW_TOKEN_KID = "spacefast-local-pw-v1";
119
286
  export declare const accessTokenPayloadSchema: z.ZodObject<{
120
287
  sub: z.ZodString;
121
288
  grants: z.ZodDefault<z.ZodArray<z.ZodString>>;
@@ -124,13 +291,13 @@ export declare const accessTokenPayloadSchema: z.ZodObject<{
124
291
  iat: z.ZodOptional<z.ZodNumber>;
125
292
  iss: z.ZodOptional<z.ZodString>;
126
293
  aud: z.ZodOptional<z.ZodString>;
294
+ sv: z.ZodOptional<z.ZodNumber>;
295
+ jti: z.ZodOptional<z.ZodString>;
127
296
  }, z.core.$strip>;
128
297
  export type AccessTokenPayload = z.infer<typeof accessTokenPayloadSchema>;
129
298
  export declare const authorizeRequestSchema: z.ZodObject<{
130
- setCookie: z.ZodDefault<z.ZodBoolean>;
131
299
  aud: z.ZodOptional<z.ZodString>;
132
300
  }, z.core.$strip>;
133
- export type AuthorizeRequest = z.infer<typeof authorizeRequestSchema>;
134
301
  export declare const authorizeResponseSchema: z.ZodObject<{
135
302
  token: z.ZodString;
136
303
  payload: z.ZodObject<{
@@ -141,57 +308,460 @@ export declare const authorizeResponseSchema: z.ZodObject<{
141
308
  iat: z.ZodOptional<z.ZodNumber>;
142
309
  iss: z.ZodOptional<z.ZodString>;
143
310
  aud: z.ZodOptional<z.ZodString>;
311
+ sv: z.ZodOptional<z.ZodNumber>;
312
+ jti: z.ZodOptional<z.ZodString>;
144
313
  }, z.core.$strip>;
145
314
  expiresAt: z.ZodNumber;
146
- cookieName: z.ZodDefault<z.ZodNullable<z.ZodString>>;
147
315
  }, z.core.$strip>;
148
- export type AuthorizeResponse = z.infer<typeof authorizeResponseSchema>;
149
- export declare function spaceViewerGrant(spaceId: string): string;
150
- export declare function spaceLevelGrant(spaceId: string, level: string): string;
316
+ export declare const accessEventSchema: z.ZodObject<{
317
+ sub: z.ZodDefault<z.ZodNullable<z.ZodString>>;
318
+ grantsHash: z.ZodDefault<z.ZodNullable<z.ZodString>>;
319
+ ruleId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
320
+ effect: z.ZodEnum<{
321
+ allow: "allow";
322
+ deny: "deny";
323
+ challenge: "challenge";
324
+ }>;
325
+ reasonCode: z.ZodDefault<z.ZodNullable<z.ZodString>>;
326
+ host: z.ZodString;
327
+ path: z.ZodString;
328
+ ts: z.ZodNumber;
329
+ }, z.core.$strip>;
330
+ export type AccessEvent = z.infer<typeof accessEventSchema>;
331
+ export declare function spaceLevelGrant(spaceId: string, level: SpaceLevel): string;
151
332
  export declare function shareLinkGrant(linkId: string): string;
152
- export declare const inviteCreateRequestSchema: z.ZodObject<{
153
- email: z.ZodString;
154
- expiresInDays: z.ZodOptional<z.ZodNumber>;
155
- message: z.ZodOptional<z.ZodString>;
333
+ export declare function inviteGrant(inviteId: string): string;
334
+ export declare function serviceTokenGrant(tokenId: string): string;
335
+ export declare const SHARE_LINK_TOKEN_MAX_TTL_SECONDS: number;
336
+ export declare const shareLinkSchema: z.ZodObject<{
337
+ id: z.ZodString;
338
+ spaceId: z.ZodString;
339
+ label: z.ZodDefault<z.ZodNullable<z.ZodString>>;
340
+ path: z.ZodString;
341
+ createdBy: z.ZodDefault<z.ZodNullable<z.ZodString>>;
342
+ expiresAt: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
343
+ createdAt: z.ZodString;
344
+ lastUsedAt: z.ZodDefault<z.ZodNullable<z.ZodString>>;
345
+ useCount: z.ZodDefault<z.ZodNumber>;
346
+ active: z.ZodBoolean;
347
+ }, z.core.$strip>;
348
+ export type ShareLink = z.infer<typeof shareLinkSchema>;
349
+ export declare const shareLinkCreateSchema: z.ZodObject<{
350
+ path: z.ZodDefault<z.ZodString>;
351
+ expiresAt: z.ZodOptional<z.ZodNumber>;
352
+ label: z.ZodOptional<z.ZodString>;
156
353
  }, z.core.$strip>;
157
- export type InviteCreateRequest = z.infer<typeof inviteCreateRequestSchema>;
354
+ export type ShareLinkCreate = z.infer<typeof shareLinkCreateSchema>;
355
+ export declare const shareLinkWithUrlSchema: z.ZodObject<{
356
+ id: z.ZodString;
357
+ spaceId: z.ZodString;
358
+ label: z.ZodDefault<z.ZodNullable<z.ZodString>>;
359
+ path: z.ZodString;
360
+ createdBy: z.ZodDefault<z.ZodNullable<z.ZodString>>;
361
+ expiresAt: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
362
+ createdAt: z.ZodString;
363
+ lastUsedAt: z.ZodDefault<z.ZodNullable<z.ZodString>>;
364
+ useCount: z.ZodDefault<z.ZodNumber>;
365
+ active: z.ZodBoolean;
366
+ url: z.ZodString;
367
+ }, z.core.$strip>;
368
+ export type ShareLinkWithUrl = z.infer<typeof shareLinkWithUrlSchema>;
369
+ export declare const GENERAL_ACCESS_MODES: readonly ["public", "password", "link", "people"];
370
+ export declare const generalAccessModeSchema: z.ZodEnum<{
371
+ link: "link";
372
+ password: "password";
373
+ public: "public";
374
+ people: "people";
375
+ }>;
376
+ export type GeneralAccessMode = z.infer<typeof generalAccessModeSchema>;
377
+ export declare const sharingConnectionAudienceSchema: z.ZodObject<{
378
+ connectionId: z.ZodString;
379
+ tag: z.ZodOptional<z.ZodString>;
380
+ emailDomain: z.ZodOptional<z.ZodString>;
381
+ }, z.core.$strip>;
382
+ export type SharingConnectionAudience = z.infer<typeof sharingConnectionAudienceSchema>;
383
+ export declare const generalAccessWriteSchema: z.ZodObject<{
384
+ mode: z.ZodEnum<{
385
+ link: "link";
386
+ password: "password";
387
+ public: "public";
388
+ people: "people";
389
+ }>;
390
+ password: z.ZodOptional<z.ZodString>;
391
+ audiences: z.ZodOptional<z.ZodArray<z.ZodObject<{
392
+ connectionId: z.ZodString;
393
+ tag: z.ZodOptional<z.ZodString>;
394
+ emailDomain: z.ZodOptional<z.ZodString>;
395
+ }, z.core.$strip>>>;
396
+ }, z.core.$strip>;
397
+ export declare const sharingAudienceSchema: z.ZodObject<{
398
+ connectionId: z.ZodString;
399
+ type: z.ZodEnum<{
400
+ external: "external";
401
+ oidc: "oidc";
402
+ }>;
403
+ name: z.ZodDefault<z.ZodNullable<z.ZodString>>;
404
+ tag: z.ZodDefault<z.ZodNullable<z.ZodString>>;
405
+ emailDomain: z.ZodDefault<z.ZodNullable<z.ZodString>>;
406
+ grant: z.ZodString;
407
+ }, z.core.$strip>;
408
+ export type SharingAudience = z.infer<typeof sharingAudienceSchema>;
409
+ export declare const sharingPersonSchema: z.ZodObject<{
410
+ kind: z.ZodEnum<{
411
+ team_member: "team_member";
412
+ invitee: "invitee";
413
+ }>;
414
+ userId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
415
+ email: z.ZodDefault<z.ZodNullable<z.ZodString>>;
416
+ name: z.ZodDefault<z.ZodNullable<z.ZodString>>;
417
+ teamRole: z.ZodDefault<z.ZodNullable<z.ZodString>>;
418
+ level: z.ZodDefault<z.ZodNullable<z.ZodEnum<{
419
+ viewer: "viewer";
420
+ commenter: "commenter";
421
+ editor: "editor";
422
+ admin: "admin";
423
+ }>>>;
424
+ inviteId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
425
+ status: z.ZodDefault<z.ZodNullable<z.ZodEnum<{
426
+ expired: "expired";
427
+ pending: "pending";
428
+ accepted: "accepted";
429
+ }>>>;
430
+ lastViewedAt: z.ZodDefault<z.ZodNullable<z.ZodString>>;
431
+ }, z.core.$strip>;
432
+ export type SharingPerson = z.infer<typeof sharingPersonSchema>;
433
+ export declare const INVITE_ACCEPT_LINK_TTL_SECONDS: number;
434
+ export declare const INVITE_TOKEN_TTL_SECONDS: number;
435
+ export declare const ACCESS_MESSAGE_MAX_LENGTH = 280;
436
+ export declare const INVITE_STATUSES: readonly ["pending", "accepted", "expired", "revoked"];
437
+ export declare const inviteStatusSchema: z.ZodEnum<{
438
+ expired: "expired";
439
+ pending: "pending";
440
+ accepted: "accepted";
441
+ revoked: "revoked";
442
+ }>;
443
+ export type InviteStatus = z.infer<typeof inviteStatusSchema>;
158
444
  export declare const spaceInviteSchema: z.ZodObject<{
159
445
  id: z.ZodString;
160
446
  spaceId: z.ZodString;
161
- email: z.ZodString;
447
+ email: z.ZodDefault<z.ZodNullable<z.ZodString>>;
448
+ invitedBy: z.ZodDefault<z.ZodNullable<z.ZodString>>;
449
+ message: z.ZodDefault<z.ZodNullable<z.ZodString>>;
162
450
  status: z.ZodEnum<{
163
451
  expired: "expired";
164
452
  pending: "pending";
165
453
  accepted: "accepted";
166
454
  revoked: "revoked";
167
455
  }>;
168
- grant: z.ZodString;
169
- invitedBy: z.ZodDefault<z.ZodNullable<z.ZodString>>;
170
- expiresAt: z.ZodDefault<z.ZodNullable<z.ZodString>>;
456
+ expiresAt: z.ZodNumber;
171
457
  acceptedAt: z.ZodDefault<z.ZodNullable<z.ZodString>>;
172
- revokedAt: z.ZodDefault<z.ZodNullable<z.ZodString>>;
173
458
  createdAt: z.ZodString;
459
+ lastViewedAt: z.ZodDefault<z.ZodNullable<z.ZodString>>;
174
460
  }, z.core.$strip>;
175
461
  export type SpaceInvite = z.infer<typeof spaceInviteSchema>;
176
- export declare const shareLinkCreateRequestSchema: z.ZodObject<{
177
- pathPrefix: z.ZodDefault<z.ZodString>;
178
- expiresAt: z.ZodOptional<z.ZodString>;
179
- label: z.ZodOptional<z.ZodString>;
462
+ export declare const spaceInviteCreateSchema: z.ZodObject<{
463
+ email: z.ZodString;
464
+ message: z.ZodOptional<z.ZodString>;
180
465
  }, z.core.$strip>;
181
- export type ShareLinkCreateRequest = z.infer<typeof shareLinkCreateRequestSchema>;
182
- export declare const shareLinkSchema: z.ZodObject<{
466
+ export declare const ACCESS_REQUEST_STATUSES: readonly ["pending", "approved", "denied"];
467
+ export declare const accessRequestStatusSchema: z.ZodEnum<{
468
+ pending: "pending";
469
+ approved: "approved";
470
+ denied: "denied";
471
+ }>;
472
+ export declare const accessRequestSchema: z.ZodObject<{
183
473
  id: z.ZodString;
184
474
  spaceId: z.ZodString;
185
- pathPrefix: z.ZodString;
186
- label: z.ZodDefault<z.ZodNullable<z.ZodString>>;
187
- grant: z.ZodString;
188
- url: z.ZodDefault<z.ZodNullable<z.ZodString>>;
189
- createdBy: z.ZodDefault<z.ZodNullable<z.ZodString>>;
190
- expiresAt: z.ZodDefault<z.ZodNullable<z.ZodString>>;
191
- revokedAt: z.ZodDefault<z.ZodNullable<z.ZodString>>;
475
+ email: z.ZodString;
476
+ userId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
477
+ host: z.ZodString;
478
+ path: z.ZodString;
479
+ message: z.ZodDefault<z.ZodNullable<z.ZodString>>;
480
+ status: z.ZodEnum<{
481
+ pending: "pending";
482
+ approved: "approved";
483
+ denied: "denied";
484
+ }>;
485
+ resolvedBy: z.ZodDefault<z.ZodNullable<z.ZodString>>;
486
+ resolvedAt: z.ZodDefault<z.ZodNullable<z.ZodString>>;
192
487
  createdAt: z.ZodString;
193
488
  }, z.core.$strip>;
194
- export type ShareLink = z.infer<typeof shareLinkSchema>;
489
+ export type AccessRequest = z.infer<typeof accessRequestSchema>;
490
+ export declare const accessRequestCreateSchema: z.ZodObject<{
491
+ space: z.ZodString;
492
+ host: z.ZodString;
493
+ path: z.ZodDefault<z.ZodString>;
494
+ nonce: z.ZodOptional<z.ZodString>;
495
+ message: z.ZodOptional<z.ZodString>;
496
+ }, z.core.$strip>;
497
+ export declare const accessRequestApproveSchema: z.ZodObject<{
498
+ as: z.ZodDefault<z.ZodEnum<{
499
+ team: "team";
500
+ invite: "invite";
501
+ }>>;
502
+ }, z.core.$strip>;
503
+ export declare const FILE_SHARE_AUDIENCES: readonly ["public", "people"];
504
+ export declare const fileShareAudienceSchema: z.ZodEnum<{
505
+ public: "public";
506
+ people: "people";
507
+ }>;
508
+ export type FileShareAudience = z.infer<typeof fileShareAudienceSchema>;
509
+ export declare const fileShareSchema: z.ZodObject<{
510
+ path: z.ZodString;
511
+ audience: z.ZodEnum<{
512
+ public: "public";
513
+ people: "people";
514
+ }>;
515
+ grants: z.ZodDefault<z.ZodArray<z.ZodString>>;
516
+ patterns: z.ZodDefault<z.ZodArray<z.ZodString>>;
517
+ }, z.core.$strip>;
518
+ export type FileShare = z.infer<typeof fileShareSchema>;
519
+ export declare const fileShareWriteSchema: z.ZodObject<{
520
+ path: z.ZodString;
521
+ audience: z.ZodEnum<{
522
+ public: "public";
523
+ people: "people";
524
+ }>;
525
+ grants: z.ZodOptional<z.ZodArray<z.ZodString>>;
526
+ }, z.core.$strip>;
527
+ export declare const sharingRequestSchema: z.ZodObject<{
528
+ id: z.ZodString;
529
+ email: z.ZodString;
530
+ message: z.ZodDefault<z.ZodNullable<z.ZodString>>;
531
+ createdAt: z.ZodString;
532
+ host: z.ZodDefault<z.ZodNullable<z.ZodString>>;
533
+ path: z.ZodDefault<z.ZodNullable<z.ZodString>>;
534
+ }, z.core.$strip>;
535
+ export type SharingRequest = z.infer<typeof sharingRequestSchema>;
536
+ export declare const SERVICE_TOKEN_DEFAULT_TTL_SECONDS: number;
537
+ export declare const SERVICE_TOKEN_AUDIENCES: readonly ["viewers"];
538
+ export declare const serviceTokenAudienceSchema: z.ZodEnum<{
539
+ viewers: "viewers";
540
+ }>;
541
+ export declare const serviceTokenActsAsSchema: z.ZodObject<{
542
+ audiences: z.ZodDefault<z.ZodArray<z.ZodEnum<{
543
+ viewers: "viewers";
544
+ }>>>;
545
+ }, z.core.$strip>;
546
+ export type ServiceTokenActsAs = z.infer<typeof serviceTokenActsAsSchema>;
547
+ export declare const serviceTokenSchema: z.ZodObject<{
548
+ id: z.ZodString;
549
+ teamId: z.ZodString;
550
+ spaceId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
551
+ name: z.ZodString;
552
+ actsAs: z.ZodObject<{
553
+ audiences: z.ZodDefault<z.ZodArray<z.ZodEnum<{
554
+ viewers: "viewers";
555
+ }>>>;
556
+ }, z.core.$strip>;
557
+ expiresAt: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
558
+ lastUsedAt: z.ZodDefault<z.ZodNullable<z.ZodString>>;
559
+ createdAt: z.ZodString;
560
+ active: z.ZodBoolean;
561
+ }, z.core.$strip>;
562
+ export type ServiceToken = z.infer<typeof serviceTokenSchema>;
563
+ export declare const serviceTokenCreateSchema: z.ZodObject<{
564
+ name: z.ZodString;
565
+ spaceId: z.ZodOptional<z.ZodString>;
566
+ expiresAt: z.ZodOptional<z.ZodNumber>;
567
+ actsAs: z.ZodOptional<z.ZodObject<{
568
+ audiences: z.ZodDefault<z.ZodArray<z.ZodEnum<{
569
+ viewers: "viewers";
570
+ }>>>;
571
+ }, z.core.$strip>>;
572
+ }, z.core.$strip>;
573
+ export type ServiceTokenCreate = z.infer<typeof serviceTokenCreateSchema>;
574
+ export declare const serviceTokenWithSecretSchema: z.ZodObject<{
575
+ id: z.ZodString;
576
+ teamId: z.ZodString;
577
+ spaceId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
578
+ name: z.ZodString;
579
+ actsAs: z.ZodObject<{
580
+ audiences: z.ZodDefault<z.ZodArray<z.ZodEnum<{
581
+ viewers: "viewers";
582
+ }>>>;
583
+ }, z.core.$strip>;
584
+ expiresAt: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
585
+ lastUsedAt: z.ZodDefault<z.ZodNullable<z.ZodString>>;
586
+ createdAt: z.ZodString;
587
+ active: z.ZodBoolean;
588
+ token: z.ZodString;
589
+ }, z.core.$strip>;
590
+ export type ServiceTokenWithSecret = z.infer<typeof serviceTokenWithSecretSchema>;
591
+ export declare const FIREWALL_EFFECTS: readonly ["deny", "challenge"];
592
+ export declare const firewallEffectSchema: z.ZodEnum<{
593
+ deny: "deny";
594
+ challenge: "challenge";
595
+ }>;
596
+ export type FirewallEffect = z.infer<typeof firewallEffectSchema>;
597
+ export declare const firewallCountriesSchema: z.ZodObject<{
598
+ mode: z.ZodEnum<{
599
+ allow: "allow";
600
+ block: "block";
601
+ }>;
602
+ list: z.ZodArray<z.ZodString>;
603
+ effect: z.ZodDefault<z.ZodEnum<{
604
+ deny: "deny";
605
+ challenge: "challenge";
606
+ }>>;
607
+ }, z.core.$strip>;
608
+ export type FirewallCountries = z.infer<typeof firewallCountriesSchema>;
609
+ export declare const firewallIpEntrySchema: z.ZodObject<{
610
+ cidr: z.ZodString;
611
+ effect: z.ZodDefault<z.ZodEnum<{
612
+ deny: "deny";
613
+ challenge: "challenge";
614
+ }>>;
615
+ }, z.core.$strip>;
616
+ export type FirewallIpEntry = z.infer<typeof firewallIpEntrySchema>;
617
+ export declare const firewallBotEntrySchema: z.ZodObject<{
618
+ agent: z.ZodString;
619
+ effect: z.ZodDefault<z.ZodEnum<{
620
+ deny: "deny";
621
+ challenge: "challenge";
622
+ }>>;
623
+ }, z.core.$strip>;
624
+ export type FirewallBotEntry = z.infer<typeof firewallBotEntrySchema>;
625
+ export declare const firewallWriteSchema: z.ZodObject<{
626
+ countries: z.ZodDefault<z.ZodNullable<z.ZodObject<{
627
+ mode: z.ZodEnum<{
628
+ allow: "allow";
629
+ block: "block";
630
+ }>;
631
+ list: z.ZodArray<z.ZodString>;
632
+ effect: z.ZodDefault<z.ZodEnum<{
633
+ deny: "deny";
634
+ challenge: "challenge";
635
+ }>>;
636
+ }, z.core.$strip>>>;
637
+ ipCidrs: z.ZodDefault<z.ZodArray<z.ZodObject<{
638
+ cidr: z.ZodString;
639
+ effect: z.ZodDefault<z.ZodEnum<{
640
+ deny: "deny";
641
+ challenge: "challenge";
642
+ }>>;
643
+ }, z.core.$strip>>>;
644
+ bots: z.ZodDefault<z.ZodArray<z.ZodObject<{
645
+ agent: z.ZodString;
646
+ effect: z.ZodDefault<z.ZodEnum<{
647
+ deny: "deny";
648
+ challenge: "challenge";
649
+ }>>;
650
+ }, z.core.$strip>>>;
651
+ }, z.core.$strip>;
652
+ export type FirewallWrite = z.infer<typeof firewallWriteSchema>;
653
+ export declare const spaceFirewallSchema: z.ZodObject<{
654
+ countries: z.ZodDefault<z.ZodNullable<z.ZodObject<{
655
+ mode: z.ZodEnum<{
656
+ allow: "allow";
657
+ block: "block";
658
+ }>;
659
+ list: z.ZodArray<z.ZodString>;
660
+ effect: z.ZodDefault<z.ZodEnum<{
661
+ deny: "deny";
662
+ challenge: "challenge";
663
+ }>>;
664
+ }, z.core.$strip>>>;
665
+ ipCidrs: z.ZodDefault<z.ZodArray<z.ZodObject<{
666
+ cidr: z.ZodString;
667
+ effect: z.ZodDefault<z.ZodEnum<{
668
+ deny: "deny";
669
+ challenge: "challenge";
670
+ }>>;
671
+ }, z.core.$strip>>>;
672
+ bots: z.ZodDefault<z.ZodArray<z.ZodObject<{
673
+ agent: z.ZodString;
674
+ effect: z.ZodDefault<z.ZodEnum<{
675
+ deny: "deny";
676
+ challenge: "challenge";
677
+ }>>;
678
+ }, z.core.$strip>>>;
679
+ custom: z.ZodDefault<z.ZodBoolean>;
680
+ }, z.core.$strip>;
681
+ export type SpaceFirewall = z.infer<typeof spaceFirewallSchema>;
682
+ export declare const TEAM_PREVIEW_LOCK_LIVE_RULE_ID = "team-preview-lock:live";
683
+ export declare const TEAM_PREVIEW_LOCK_RULE_ID = "team-preview-lock";
684
+ export declare function teamPreviewLockRules(teamId: string): RuntimeRule[];
685
+ export declare function isTeamPreviewLockRule(rule: Pick<RuntimeRule, "id">): boolean;
686
+ export declare function teamPreviewLockActive(rules: ReadonlyArray<Pick<RuntimeRule, "id">>): boolean;
687
+ export declare function withTeamPreviewLock(rules: RuntimeRule[], teamId: string, enabled: boolean): RuntimeRule[];
688
+ export declare const spaceSharingSchema: z.ZodObject<{
689
+ generalAccess: z.ZodObject<{
690
+ mode: z.ZodEnum<{
691
+ link: "link";
692
+ password: "password";
693
+ public: "public";
694
+ people: "people";
695
+ }>;
696
+ hasPassword: z.ZodBoolean;
697
+ }, z.core.$strip>;
698
+ people: z.ZodDefault<z.ZodArray<z.ZodObject<{
699
+ kind: z.ZodEnum<{
700
+ team_member: "team_member";
701
+ invitee: "invitee";
702
+ }>;
703
+ userId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
704
+ email: z.ZodDefault<z.ZodNullable<z.ZodString>>;
705
+ name: z.ZodDefault<z.ZodNullable<z.ZodString>>;
706
+ teamRole: z.ZodDefault<z.ZodNullable<z.ZodString>>;
707
+ level: z.ZodDefault<z.ZodNullable<z.ZodEnum<{
708
+ viewer: "viewer";
709
+ commenter: "commenter";
710
+ editor: "editor";
711
+ admin: "admin";
712
+ }>>>;
713
+ inviteId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
714
+ status: z.ZodDefault<z.ZodNullable<z.ZodEnum<{
715
+ expired: "expired";
716
+ pending: "pending";
717
+ accepted: "accepted";
718
+ }>>>;
719
+ lastViewedAt: z.ZodDefault<z.ZodNullable<z.ZodString>>;
720
+ }, z.core.$strip>>>;
721
+ audiences: z.ZodDefault<z.ZodArray<z.ZodObject<{
722
+ connectionId: z.ZodString;
723
+ type: z.ZodEnum<{
724
+ external: "external";
725
+ oidc: "oidc";
726
+ }>;
727
+ name: z.ZodDefault<z.ZodNullable<z.ZodString>>;
728
+ tag: z.ZodDefault<z.ZodNullable<z.ZodString>>;
729
+ emailDomain: z.ZodDefault<z.ZodNullable<z.ZodString>>;
730
+ grant: z.ZodString;
731
+ }, z.core.$strip>>>;
732
+ links: z.ZodDefault<z.ZodArray<z.ZodObject<{
733
+ id: z.ZodString;
734
+ spaceId: z.ZodString;
735
+ label: z.ZodDefault<z.ZodNullable<z.ZodString>>;
736
+ path: z.ZodString;
737
+ createdBy: z.ZodDefault<z.ZodNullable<z.ZodString>>;
738
+ expiresAt: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
739
+ createdAt: z.ZodString;
740
+ lastUsedAt: z.ZodDefault<z.ZodNullable<z.ZodString>>;
741
+ useCount: z.ZodDefault<z.ZodNumber>;
742
+ active: z.ZodBoolean;
743
+ }, z.core.$strip>>>;
744
+ fileShares: z.ZodDefault<z.ZodArray<z.ZodObject<{
745
+ path: z.ZodString;
746
+ audience: z.ZodEnum<{
747
+ public: "public";
748
+ people: "people";
749
+ }>;
750
+ grants: z.ZodDefault<z.ZodArray<z.ZodString>>;
751
+ patterns: z.ZodDefault<z.ZodArray<z.ZodString>>;
752
+ }, z.core.$strip>>>;
753
+ requests: z.ZodDefault<z.ZodArray<z.ZodObject<{
754
+ id: z.ZodString;
755
+ email: z.ZodString;
756
+ message: z.ZodDefault<z.ZodNullable<z.ZodString>>;
757
+ createdAt: z.ZodString;
758
+ host: z.ZodDefault<z.ZodNullable<z.ZodString>>;
759
+ path: z.ZodDefault<z.ZodNullable<z.ZodString>>;
760
+ }, z.core.$strip>>>;
761
+ customRulesActive: z.ZodBoolean;
762
+ accessExceedsPlan: z.ZodDefault<z.ZodBoolean>;
763
+ }, z.core.$strip>;
764
+ export type SpaceSharing = z.infer<typeof spaceSharingSchema>;
195
765
  export declare const channelSchema: z.ZodObject<{
196
766
  name: z.ZodString;
197
767
  versionId: z.ZodString;
@@ -206,11 +776,13 @@ export declare const servingConfigSchema: z.ZodObject<{
206
776
  fallback: z.ZodOptional<z.ZodString>;
207
777
  listing: z.ZodOptional<z.ZodBoolean>;
208
778
  }, z.core.$strip>;
209
- export type ServingConfig = z.infer<typeof servingConfigSchema>;
210
779
  export declare const policyDocSchema: z.ZodObject<{
211
780
  rules: z.ZodDefault<z.ZodArray<z.ZodObject<{
781
+ id: z.ZodOptional<z.ZodString>;
212
782
  match: z.ZodDefault<z.ZodObject<{
213
783
  host: z.ZodOptional<z.ZodString>;
784
+ hostPattern: z.ZodOptional<z.ZodString>;
785
+ hostTemplate: z.ZodOptional<z.ZodString>;
214
786
  pathPattern: z.ZodOptional<z.ZodString>;
215
787
  channel: z.ZodOptional<z.ZodString>;
216
788
  ipCidrs: z.ZodOptional<z.ZodArray<z.ZodString>>;
@@ -227,35 +799,54 @@ export declare const policyDocSchema: z.ZodObject<{
227
799
  challenge: "challenge";
228
800
  }>;
229
801
  auth: z.ZodOptional<z.ZodObject<{
230
- password: z.ZodOptional<z.ZodObject<{
802
+ requiredGrants: z.ZodArray<z.ZodString>;
803
+ issuers: z.ZodOptional<z.ZodArray<z.ZodObject<{
804
+ kid: z.ZodString;
805
+ alg: z.ZodLiteral<"EdDSA">;
806
+ publicKey: z.ZodString;
807
+ grantNamespaces: z.ZodArray<z.ZodString>;
808
+ }, z.core.$strip>>>;
809
+ acquire: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
810
+ type: z.ZodLiteral<"password">;
231
811
  ref: z.ZodString;
232
812
  transport: z.ZodEnum<{
233
813
  basic: "basic";
234
814
  form: "form";
235
815
  }>;
236
816
  username: z.ZodOptional<z.ZodString>;
237
- }, z.core.$strip>>;
238
- token: z.ZodOptional<z.ZodObject<{
239
- requiredGrants: z.ZodArray<z.ZodString>;
240
- issuers: z.ZodOptional<z.ZodArray<z.ZodObject<{
241
- kid: z.ZodString;
242
- alg: z.ZodLiteral<"EdDSA">;
243
- publicKey: z.ZodString;
244
- grantNamespaces: z.ZodArray<z.ZodString>;
245
- }, z.core.$strip>>>;
246
- loginUrl: z.ZodOptional<z.ZodString>;
247
- cookieName: z.ZodOptional<z.ZodString>;
248
- }, z.core.$strip>>;
817
+ }, z.core.$strip>, z.ZodObject<{
818
+ type: z.ZodLiteral<"login">;
819
+ url: z.ZodString;
820
+ label: z.ZodOptional<z.ZodString>;
821
+ }, z.core.$strip>], "type">>>;
249
822
  }, z.core.$strip>>;
823
+ managedBy: z.ZodOptional<z.ZodEnum<{
824
+ sharing: "sharing";
825
+ firewall: "firewall";
826
+ file_share: "file_share";
827
+ cast_reviewer: "cast_reviewer";
828
+ team_default: "team_default";
829
+ }>>;
830
+ expiresAt: z.ZodOptional<z.ZodNumber>;
250
831
  reasonCode: z.ZodOptional<z.ZodString>;
251
832
  message: z.ZodOptional<z.ZodString>;
252
833
  }, z.core.$strip>>>;
834
+ issuers: z.ZodOptional<z.ZodArray<z.ZodObject<{
835
+ kid: z.ZodString;
836
+ alg: z.ZodLiteral<"EdDSA">;
837
+ publicKey: z.ZodString;
838
+ grantNamespaces: z.ZodArray<z.ZodString>;
839
+ }, z.core.$strip>>>;
840
+ sessionVersion: z.ZodOptional<z.ZodNumber>;
253
841
  }, z.core.$strip>;
254
842
  export type PolicyDoc = z.infer<typeof policyDocSchema>;
255
843
  export declare const spacePolicySchema: z.ZodObject<{
256
844
  rules: z.ZodDefault<z.ZodArray<z.ZodObject<{
845
+ id: z.ZodOptional<z.ZodString>;
257
846
  match: z.ZodDefault<z.ZodObject<{
258
847
  host: z.ZodOptional<z.ZodString>;
848
+ hostPattern: z.ZodOptional<z.ZodString>;
849
+ hostTemplate: z.ZodOptional<z.ZodString>;
259
850
  pathPattern: z.ZodOptional<z.ZodString>;
260
851
  channel: z.ZodOptional<z.ZodString>;
261
852
  ipCidrs: z.ZodOptional<z.ZodArray<z.ZodString>>;
@@ -272,41 +863,195 @@ export declare const spacePolicySchema: z.ZodObject<{
272
863
  challenge: "challenge";
273
864
  }>;
274
865
  auth: z.ZodOptional<z.ZodObject<{
275
- password: z.ZodOptional<z.ZodObject<{
866
+ requiredGrants: z.ZodArray<z.ZodString>;
867
+ issuers: z.ZodOptional<z.ZodArray<z.ZodObject<{
868
+ kid: z.ZodString;
869
+ alg: z.ZodLiteral<"EdDSA">;
870
+ publicKey: z.ZodString;
871
+ grantNamespaces: z.ZodArray<z.ZodString>;
872
+ }, z.core.$strip>>>;
873
+ acquire: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
874
+ type: z.ZodLiteral<"password">;
276
875
  ref: z.ZodString;
277
876
  transport: z.ZodEnum<{
278
877
  basic: "basic";
279
878
  form: "form";
280
879
  }>;
281
880
  username: z.ZodOptional<z.ZodString>;
881
+ }, z.core.$strip>, z.ZodObject<{
882
+ type: z.ZodLiteral<"login">;
883
+ url: z.ZodString;
884
+ label: z.ZodOptional<z.ZodString>;
885
+ }, z.core.$strip>], "type">>>;
886
+ }, z.core.$strip>>;
887
+ managedBy: z.ZodOptional<z.ZodEnum<{
888
+ sharing: "sharing";
889
+ firewall: "firewall";
890
+ file_share: "file_share";
891
+ cast_reviewer: "cast_reviewer";
892
+ team_default: "team_default";
893
+ }>>;
894
+ expiresAt: z.ZodOptional<z.ZodNumber>;
895
+ reasonCode: z.ZodOptional<z.ZodString>;
896
+ message: z.ZodOptional<z.ZodString>;
897
+ }, z.core.$strip>>>;
898
+ version: z.ZodDefault<z.ZodNumber>;
899
+ }, z.core.$strip>;
900
+ export type SpacePolicy = z.infer<typeof spacePolicySchema>;
901
+ export declare const spaceAccessRulesWriteSchema: z.ZodObject<{
902
+ rules: z.ZodDefault<z.ZodArray<z.ZodObject<{
903
+ id: z.ZodOptional<z.ZodString>;
904
+ match: z.ZodDefault<z.ZodObject<{
905
+ host: z.ZodOptional<z.ZodString>;
906
+ hostPattern: z.ZodOptional<z.ZodString>;
907
+ hostTemplate: z.ZodOptional<z.ZodString>;
908
+ pathPattern: z.ZodOptional<z.ZodString>;
909
+ channel: z.ZodOptional<z.ZodString>;
910
+ ipCidrs: z.ZodOptional<z.ZodArray<z.ZodString>>;
911
+ agent: z.ZodOptional<z.ZodString>;
912
+ country: z.ZodOptional<z.ZodString>;
913
+ header: z.ZodOptional<z.ZodObject<{
914
+ name: z.ZodString;
915
+ value: z.ZodString;
282
916
  }, z.core.$strip>>;
283
- token: z.ZodOptional<z.ZodObject<{
284
- requiredGrants: z.ZodArray<z.ZodString>;
285
- issuers: z.ZodOptional<z.ZodArray<z.ZodObject<{
286
- kid: z.ZodString;
287
- alg: z.ZodLiteral<"EdDSA">;
288
- publicKey: z.ZodString;
289
- grantNamespaces: z.ZodArray<z.ZodString>;
290
- }, z.core.$strip>>>;
291
- loginUrl: z.ZodOptional<z.ZodString>;
292
- cookieName: z.ZodOptional<z.ZodString>;
917
+ }, z.core.$strip>>;
918
+ effect: z.ZodEnum<{
919
+ allow: "allow";
920
+ deny: "deny";
921
+ challenge: "challenge";
922
+ }>;
923
+ auth: z.ZodOptional<z.ZodObject<{
924
+ requiredGrants: z.ZodArray<z.ZodString>;
925
+ issuers: z.ZodOptional<z.ZodArray<z.ZodObject<{
926
+ kid: z.ZodString;
927
+ alg: z.ZodLiteral<"EdDSA">;
928
+ publicKey: z.ZodString;
929
+ grantNamespaces: z.ZodArray<z.ZodString>;
930
+ }, z.core.$strip>>>;
931
+ acquire: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
932
+ type: z.ZodLiteral<"password">;
933
+ ref: z.ZodString;
934
+ transport: z.ZodEnum<{
935
+ basic: "basic";
936
+ form: "form";
937
+ }>;
938
+ username: z.ZodOptional<z.ZodString>;
939
+ }, z.core.$strip>, z.ZodObject<{
940
+ type: z.ZodLiteral<"login">;
941
+ url: z.ZodString;
942
+ label: z.ZodOptional<z.ZodString>;
943
+ }, z.core.$strip>], "type">>>;
944
+ }, z.core.$strip>>;
945
+ managedBy: z.ZodOptional<z.ZodEnum<{
946
+ sharing: "sharing";
947
+ firewall: "firewall";
948
+ file_share: "file_share";
949
+ cast_reviewer: "cast_reviewer";
950
+ team_default: "team_default";
951
+ }>>;
952
+ expiresAt: z.ZodOptional<z.ZodNumber>;
953
+ reasonCode: z.ZodOptional<z.ZodString>;
954
+ message: z.ZodOptional<z.ZodString>;
955
+ }, z.core.$strip>>>;
956
+ expectedVersion: z.ZodOptional<z.ZodNumber>;
957
+ }, z.core.$strip>;
958
+ export type SpaceAccessRulesWrite = z.infer<typeof spaceAccessRulesWriteSchema>;
959
+ export declare const spaceAccessRulesReadSchema: z.ZodObject<{
960
+ rules: z.ZodDefault<z.ZodArray<z.ZodObject<{
961
+ id: z.ZodOptional<z.ZodString>;
962
+ match: z.ZodDefault<z.ZodObject<{
963
+ host: z.ZodOptional<z.ZodString>;
964
+ hostPattern: z.ZodOptional<z.ZodString>;
965
+ hostTemplate: z.ZodOptional<z.ZodString>;
966
+ pathPattern: z.ZodOptional<z.ZodString>;
967
+ channel: z.ZodOptional<z.ZodString>;
968
+ ipCidrs: z.ZodOptional<z.ZodArray<z.ZodString>>;
969
+ agent: z.ZodOptional<z.ZodString>;
970
+ country: z.ZodOptional<z.ZodString>;
971
+ header: z.ZodOptional<z.ZodObject<{
972
+ name: z.ZodString;
973
+ value: z.ZodString;
293
974
  }, z.core.$strip>>;
294
975
  }, z.core.$strip>>;
976
+ effect: z.ZodEnum<{
977
+ allow: "allow";
978
+ deny: "deny";
979
+ challenge: "challenge";
980
+ }>;
981
+ auth: z.ZodOptional<z.ZodObject<{
982
+ requiredGrants: z.ZodArray<z.ZodString>;
983
+ issuers: z.ZodOptional<z.ZodArray<z.ZodObject<{
984
+ kid: z.ZodString;
985
+ alg: z.ZodLiteral<"EdDSA">;
986
+ publicKey: z.ZodString;
987
+ grantNamespaces: z.ZodArray<z.ZodString>;
988
+ }, z.core.$strip>>>;
989
+ acquire: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
990
+ type: z.ZodLiteral<"password">;
991
+ ref: z.ZodString;
992
+ transport: z.ZodEnum<{
993
+ basic: "basic";
994
+ form: "form";
995
+ }>;
996
+ username: z.ZodOptional<z.ZodString>;
997
+ }, z.core.$strip>, z.ZodObject<{
998
+ type: z.ZodLiteral<"login">;
999
+ url: z.ZodString;
1000
+ label: z.ZodOptional<z.ZodString>;
1001
+ }, z.core.$strip>], "type">>>;
1002
+ }, z.core.$strip>>;
1003
+ managedBy: z.ZodOptional<z.ZodEnum<{
1004
+ sharing: "sharing";
1005
+ firewall: "firewall";
1006
+ file_share: "file_share";
1007
+ cast_reviewer: "cast_reviewer";
1008
+ team_default: "team_default";
1009
+ }>>;
1010
+ expiresAt: z.ZodOptional<z.ZodNumber>;
295
1011
  reasonCode: z.ZodOptional<z.ZodString>;
296
1012
  message: z.ZodOptional<z.ZodString>;
297
1013
  }, z.core.$strip>>>;
298
1014
  version: z.ZodDefault<z.ZodNumber>;
1015
+ accessExceedsPlan: z.ZodDefault<z.ZodBoolean>;
299
1016
  }, z.core.$strip>;
300
- export type SpacePolicy = z.infer<typeof spacePolicySchema>;
1017
+ export type SpaceAccessRulesRead = z.infer<typeof spaceAccessRulesReadSchema>;
1018
+ export declare const quickShareSchema: z.ZodObject<{
1019
+ kind: z.ZodLiteral<"quick_share">;
1020
+ url: z.ZodString;
1021
+ expiresAt: z.ZodString;
1022
+ outcome: z.ZodEnum<{
1023
+ created: "created";
1024
+ reused: "reused";
1025
+ }>;
1026
+ }, z.core.$strip>;
1027
+ export type QuickShare = z.infer<typeof quickShareSchema>;
1028
+ export declare const quickShareDeleteSchema: z.ZodObject<{
1029
+ outcome: z.ZodEnum<{
1030
+ deleted: "deleted";
1031
+ unchanged: "unchanged";
1032
+ }>;
1033
+ }, z.core.$strip>;
1034
+ export type QuickShareDelete = z.infer<typeof quickShareDeleteSchema>;
1035
+ export declare const enhancementsSchema: z.ZodObject<{
1036
+ enabled: z.ZodBoolean;
1037
+ active: z.ZodArray<z.ZodString>;
1038
+ }, z.core.$strip>;
1039
+ export type Enhancements = z.infer<typeof enhancementsSchema>;
1040
+ export declare const enhancementsWriteSchema: z.ZodObject<{
1041
+ enabled: z.ZodBoolean;
1042
+ }, z.core.$strip>;
1043
+ export type EnhancementsWrite = z.infer<typeof enhancementsWriteSchema>;
301
1044
  export declare const ruleSourceSchema: z.ZodEnum<{
302
1045
  cloud: "cloud";
303
1046
  file: "file";
304
1047
  platform: "platform";
305
1048
  }>;
306
- export type RuleSource = z.infer<typeof ruleSourceSchema>;
307
1049
  export declare const effectiveRuleSchema: z.ZodObject<{
1050
+ id: z.ZodOptional<z.ZodString>;
308
1051
  match: z.ZodDefault<z.ZodObject<{
309
1052
  host: z.ZodOptional<z.ZodString>;
1053
+ hostPattern: z.ZodOptional<z.ZodString>;
1054
+ hostTemplate: z.ZodOptional<z.ZodString>;
310
1055
  pathPattern: z.ZodOptional<z.ZodString>;
311
1056
  channel: z.ZodOptional<z.ZodString>;
312
1057
  ipCidrs: z.ZodOptional<z.ZodArray<z.ZodString>>;
@@ -323,26 +1068,35 @@ export declare const effectiveRuleSchema: z.ZodObject<{
323
1068
  challenge: "challenge";
324
1069
  }>;
325
1070
  auth: z.ZodOptional<z.ZodObject<{
326
- password: z.ZodOptional<z.ZodObject<{
1071
+ requiredGrants: z.ZodArray<z.ZodString>;
1072
+ issuers: z.ZodOptional<z.ZodArray<z.ZodObject<{
1073
+ kid: z.ZodString;
1074
+ alg: z.ZodLiteral<"EdDSA">;
1075
+ publicKey: z.ZodString;
1076
+ grantNamespaces: z.ZodArray<z.ZodString>;
1077
+ }, z.core.$strip>>>;
1078
+ acquire: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
1079
+ type: z.ZodLiteral<"password">;
327
1080
  ref: z.ZodString;
328
1081
  transport: z.ZodEnum<{
329
1082
  basic: "basic";
330
1083
  form: "form";
331
1084
  }>;
332
1085
  username: z.ZodOptional<z.ZodString>;
333
- }, z.core.$strip>>;
334
- token: z.ZodOptional<z.ZodObject<{
335
- requiredGrants: z.ZodArray<z.ZodString>;
336
- issuers: z.ZodOptional<z.ZodArray<z.ZodObject<{
337
- kid: z.ZodString;
338
- alg: z.ZodLiteral<"EdDSA">;
339
- publicKey: z.ZodString;
340
- grantNamespaces: z.ZodArray<z.ZodString>;
341
- }, z.core.$strip>>>;
342
- loginUrl: z.ZodOptional<z.ZodString>;
343
- cookieName: z.ZodOptional<z.ZodString>;
344
- }, z.core.$strip>>;
1086
+ }, z.core.$strip>, z.ZodObject<{
1087
+ type: z.ZodLiteral<"login">;
1088
+ url: z.ZodString;
1089
+ label: z.ZodOptional<z.ZodString>;
1090
+ }, z.core.$strip>], "type">>>;
345
1091
  }, z.core.$strip>>;
1092
+ managedBy: z.ZodOptional<z.ZodEnum<{
1093
+ sharing: "sharing";
1094
+ firewall: "firewall";
1095
+ file_share: "file_share";
1096
+ cast_reviewer: "cast_reviewer";
1097
+ team_default: "team_default";
1098
+ }>>;
1099
+ expiresAt: z.ZodOptional<z.ZodNumber>;
346
1100
  reasonCode: z.ZodOptional<z.ZodString>;
347
1101
  message: z.ZodOptional<z.ZodString>;
348
1102
  source: z.ZodEnum<{
@@ -355,8 +1109,11 @@ export declare const effectiveRuleSchema: z.ZodObject<{
355
1109
  export type EffectiveRule = z.infer<typeof effectiveRuleSchema>;
356
1110
  export declare const effectivePolicySchema: z.ZodObject<{
357
1111
  rules: z.ZodDefault<z.ZodArray<z.ZodObject<{
1112
+ id: z.ZodOptional<z.ZodString>;
358
1113
  match: z.ZodDefault<z.ZodObject<{
359
1114
  host: z.ZodOptional<z.ZodString>;
1115
+ hostPattern: z.ZodOptional<z.ZodString>;
1116
+ hostTemplate: z.ZodOptional<z.ZodString>;
360
1117
  pathPattern: z.ZodOptional<z.ZodString>;
361
1118
  channel: z.ZodOptional<z.ZodString>;
362
1119
  ipCidrs: z.ZodOptional<z.ZodArray<z.ZodString>>;
@@ -373,26 +1130,35 @@ export declare const effectivePolicySchema: z.ZodObject<{
373
1130
  challenge: "challenge";
374
1131
  }>;
375
1132
  auth: z.ZodOptional<z.ZodObject<{
376
- password: z.ZodOptional<z.ZodObject<{
1133
+ requiredGrants: z.ZodArray<z.ZodString>;
1134
+ issuers: z.ZodOptional<z.ZodArray<z.ZodObject<{
1135
+ kid: z.ZodString;
1136
+ alg: z.ZodLiteral<"EdDSA">;
1137
+ publicKey: z.ZodString;
1138
+ grantNamespaces: z.ZodArray<z.ZodString>;
1139
+ }, z.core.$strip>>>;
1140
+ acquire: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
1141
+ type: z.ZodLiteral<"password">;
377
1142
  ref: z.ZodString;
378
1143
  transport: z.ZodEnum<{
379
1144
  basic: "basic";
380
1145
  form: "form";
381
1146
  }>;
382
1147
  username: z.ZodOptional<z.ZodString>;
383
- }, z.core.$strip>>;
384
- token: z.ZodOptional<z.ZodObject<{
385
- requiredGrants: z.ZodArray<z.ZodString>;
386
- issuers: z.ZodOptional<z.ZodArray<z.ZodObject<{
387
- kid: z.ZodString;
388
- alg: z.ZodLiteral<"EdDSA">;
389
- publicKey: z.ZodString;
390
- grantNamespaces: z.ZodArray<z.ZodString>;
391
- }, z.core.$strip>>>;
392
- loginUrl: z.ZodOptional<z.ZodString>;
393
- cookieName: z.ZodOptional<z.ZodString>;
394
- }, z.core.$strip>>;
1148
+ }, z.core.$strip>, z.ZodObject<{
1149
+ type: z.ZodLiteral<"login">;
1150
+ url: z.ZodString;
1151
+ label: z.ZodOptional<z.ZodString>;
1152
+ }, z.core.$strip>], "type">>>;
395
1153
  }, z.core.$strip>>;
1154
+ managedBy: z.ZodOptional<z.ZodEnum<{
1155
+ sharing: "sharing";
1156
+ firewall: "firewall";
1157
+ file_share: "file_share";
1158
+ cast_reviewer: "cast_reviewer";
1159
+ team_default: "team_default";
1160
+ }>>;
1161
+ expiresAt: z.ZodOptional<z.ZodNumber>;
396
1162
  reasonCode: z.ZodOptional<z.ZodString>;
397
1163
  message: z.ZodOptional<z.ZodString>;
398
1164
  source: z.ZodEnum<{
@@ -402,8 +1168,85 @@ export declare const effectivePolicySchema: z.ZodObject<{
402
1168
  }>;
403
1169
  order: z.ZodNumber;
404
1170
  }, z.core.$strip>>>;
1171
+ issuers: z.ZodDefault<z.ZodArray<z.ZodObject<{
1172
+ kid: z.ZodString;
1173
+ alg: z.ZodLiteral<"EdDSA">;
1174
+ publicKey: z.ZodString;
1175
+ grantNamespaces: z.ZodArray<z.ZodString>;
1176
+ }, z.core.$strip>>>;
405
1177
  cloudVersion: z.ZodDefault<z.ZodNumber>;
406
1178
  fileVersion: z.ZodDefault<z.ZodNullable<z.ZodString>>;
407
1179
  secrets: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
1180
+ sessionVersion: z.ZodDefault<z.ZodNumber>;
408
1181
  }, z.core.$strip>;
409
1182
  export type EffectivePolicy = z.infer<typeof effectivePolicySchema>;
1183
+ export declare const accessSimulateResultSchema: z.ZodObject<{
1184
+ verdict: z.ZodEnum<{
1185
+ allow: "allow";
1186
+ deny: "deny";
1187
+ challenge: "challenge";
1188
+ }>;
1189
+ matchedRule: z.ZodDefault<z.ZodNullable<z.ZodObject<{
1190
+ id: z.ZodOptional<z.ZodString>;
1191
+ match: z.ZodDefault<z.ZodObject<{
1192
+ host: z.ZodOptional<z.ZodString>;
1193
+ hostPattern: z.ZodOptional<z.ZodString>;
1194
+ hostTemplate: z.ZodOptional<z.ZodString>;
1195
+ pathPattern: z.ZodOptional<z.ZodString>;
1196
+ channel: z.ZodOptional<z.ZodString>;
1197
+ ipCidrs: z.ZodOptional<z.ZodArray<z.ZodString>>;
1198
+ agent: z.ZodOptional<z.ZodString>;
1199
+ country: z.ZodOptional<z.ZodString>;
1200
+ header: z.ZodOptional<z.ZodObject<{
1201
+ name: z.ZodString;
1202
+ value: z.ZodString;
1203
+ }, z.core.$strip>>;
1204
+ }, z.core.$strip>>;
1205
+ effect: z.ZodEnum<{
1206
+ allow: "allow";
1207
+ deny: "deny";
1208
+ challenge: "challenge";
1209
+ }>;
1210
+ auth: z.ZodOptional<z.ZodObject<{
1211
+ requiredGrants: z.ZodArray<z.ZodString>;
1212
+ issuers: z.ZodOptional<z.ZodArray<z.ZodObject<{
1213
+ kid: z.ZodString;
1214
+ alg: z.ZodLiteral<"EdDSA">;
1215
+ publicKey: z.ZodString;
1216
+ grantNamespaces: z.ZodArray<z.ZodString>;
1217
+ }, z.core.$strip>>>;
1218
+ acquire: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
1219
+ type: z.ZodLiteral<"password">;
1220
+ ref: z.ZodString;
1221
+ transport: z.ZodEnum<{
1222
+ basic: "basic";
1223
+ form: "form";
1224
+ }>;
1225
+ username: z.ZodOptional<z.ZodString>;
1226
+ }, z.core.$strip>, z.ZodObject<{
1227
+ type: z.ZodLiteral<"login">;
1228
+ url: z.ZodString;
1229
+ label: z.ZodOptional<z.ZodString>;
1230
+ }, z.core.$strip>], "type">>>;
1231
+ }, z.core.$strip>>;
1232
+ managedBy: z.ZodOptional<z.ZodEnum<{
1233
+ sharing: "sharing";
1234
+ firewall: "firewall";
1235
+ file_share: "file_share";
1236
+ cast_reviewer: "cast_reviewer";
1237
+ team_default: "team_default";
1238
+ }>>;
1239
+ expiresAt: z.ZodOptional<z.ZodNumber>;
1240
+ reasonCode: z.ZodOptional<z.ZodString>;
1241
+ message: z.ZodOptional<z.ZodString>;
1242
+ source: z.ZodEnum<{
1243
+ cloud: "cloud";
1244
+ file: "file";
1245
+ platform: "platform";
1246
+ }>;
1247
+ order: z.ZodNumber;
1248
+ }, z.core.$strip>>>;
1249
+ why: z.ZodDefault<z.ZodArray<z.ZodString>>;
1250
+ whoWouldPass: z.ZodDefault<z.ZodArray<z.ZodString>>;
1251
+ }, z.core.$strip>;
1252
+ export type AccessSimulateResult = z.infer<typeof accessSimulateResultSchema>;