@capgo/cli 8.0.0-alpha.5 → 8.0.1

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 (222) hide show
  1. package/README.md +733 -84
  2. package/dist/index.js +1132 -317
  3. package/dist/keychain-export.swift +351 -0
  4. package/dist/package.json +120 -30
  5. package/dist/src/ai/analyze.d.ts +48 -0
  6. package/dist/src/ai/log-capture.d.ts +14 -0
  7. package/dist/src/ai/prompt.d.ts +1 -0
  8. package/dist/src/ai/render-markdown.d.ts +12 -0
  9. package/dist/src/ai/sse.d.ts +5 -0
  10. package/dist/src/ai/stream-markdown.d.ts +22 -0
  11. package/dist/src/ai/telemetry.d.ts +39 -0
  12. package/dist/src/analytics/error-category.d.ts +11 -0
  13. package/dist/src/analytics/org-resolver.d.ts +11 -0
  14. package/dist/src/analytics/supabase-perf.d.ts +48 -0
  15. package/dist/src/analytics/track.d.ts +70 -0
  16. package/dist/src/api/app.d.ts +17 -8
  17. package/dist/src/api/channels.d.ts +2442 -2729
  18. package/dist/src/api/crypto.d.ts +26 -0
  19. package/dist/src/api/update.d.ts +7 -1
  20. package/dist/src/api/versions.d.ts +9 -2
  21. package/dist/src/app/add.d.ts +6 -4
  22. package/dist/src/app/debug.d.ts +3 -7
  23. package/dist/src/app/delete.d.ts +1 -2
  24. package/dist/src/app/info.d.ts +5 -1
  25. package/dist/src/app/list.d.ts +23 -2
  26. package/dist/src/app/set.d.ts +0 -1
  27. package/dist/src/app/setting.d.ts +3 -9
  28. package/dist/src/app/updateProbe.d.ts +43 -0
  29. package/dist/src/build/credentials-command.d.ts +89 -0
  30. package/dist/src/build/credentials-manage.d.ts +7 -0
  31. package/dist/src/build/credentials.d.ts +78 -0
  32. package/dist/src/build/env-render.d.ts +8 -0
  33. package/dist/src/build/last-output-command.d.ts +6 -0
  34. package/dist/src/build/mobileprovision-parser.d.ts +35 -0
  35. package/dist/src/build/needed.d.ts +28 -0
  36. package/dist/src/build/onboarding/ai-fit.d.ts +110 -0
  37. package/dist/src/build/onboarding/analytics.d.ts +23 -0
  38. package/dist/src/build/onboarding/android/gcp-api.d.ts +128 -0
  39. package/dist/src/build/onboarding/android/gradle-parser.d.ts +19 -0
  40. package/dist/src/build/onboarding/android/keystore.d.ts +77 -0
  41. package/dist/src/build/onboarding/android/oauth-config.d.ts +24 -0
  42. package/dist/src/build/onboarding/android/oauth-google.d.ts +134 -0
  43. package/dist/src/build/onboarding/android/play-api.d.ts +91 -0
  44. package/dist/src/build/onboarding/android/progress.d.ts +22 -0
  45. package/dist/src/build/onboarding/android/service-account-validation.d.ts +58 -0
  46. package/dist/src/build/onboarding/android/types.d.ts +72 -0
  47. package/dist/src/build/onboarding/android/ui/app.d.ts +17 -0
  48. package/dist/src/build/onboarding/app-verification.d.ts +86 -0
  49. package/dist/src/build/onboarding/apple-api.d.ts +234 -0
  50. package/dist/src/build/onboarding/build-log.d.ts +10 -0
  51. package/dist/src/build/onboarding/bundle-id-detector.d.ts +117 -0
  52. package/dist/src/build/onboarding/ci-secrets.d.ts +87 -0
  53. package/dist/src/build/onboarding/command.d.ts +6 -0
  54. package/dist/src/build/onboarding/csr.d.ts +33 -0
  55. package/dist/src/build/onboarding/diff-utils.d.ts +24 -0
  56. package/dist/src/build/onboarding/env-export.d.ts +46 -0
  57. package/dist/src/build/onboarding/error-categories.d.ts +13 -0
  58. package/dist/src/build/onboarding/file-picker.d.ts +47 -0
  59. package/dist/src/build/onboarding/macos-signing.d.ts +190 -0
  60. package/dist/src/build/onboarding/min-terminal-size.d.ts +16 -0
  61. package/dist/src/build/onboarding/progress.d.ts +51 -0
  62. package/dist/src/build/onboarding/recovery.d.ts +7 -0
  63. package/dist/src/build/onboarding/telemetry.d.ts +28 -0
  64. package/dist/src/build/onboarding/types.d.ts +140 -0
  65. package/dist/src/build/onboarding/ui/app.d.ts +36 -0
  66. package/dist/src/build/onboarding/ui/completed-steps-log.d.ts +9 -0
  67. package/dist/src/build/onboarding/ui/components.d.ts +178 -0
  68. package/dist/src/build/onboarding/ui/frame-fit.d.ts +10 -0
  69. package/dist/src/build/onboarding/ui/min-size-gate.d.ts +20 -0
  70. package/dist/src/build/onboarding/ui/platform-picker.d.ts +19 -0
  71. package/dist/src/build/onboarding/ui/shell.d.ts +33 -0
  72. package/dist/src/build/onboarding/ui/steps/android-ci.d.ts +45 -0
  73. package/dist/src/build/onboarding/ui/steps/android-keystore.d.ts +75 -0
  74. package/dist/src/build/onboarding/ui/steps/android-sa-gcp.d.ts +85 -0
  75. package/dist/src/build/onboarding/ui/steps/android-shared.d.ts +67 -0
  76. package/dist/src/build/onboarding/ui/steps/ios-ci.d.ts +44 -0
  77. package/dist/src/build/onboarding/ui/steps/ios-credentials.d.ts +66 -0
  78. package/dist/src/build/onboarding/ui/steps/ios-import.d.ts +79 -0
  79. package/dist/src/build/onboarding/ui/steps/ios-shared.d.ts +93 -0
  80. package/dist/src/build/onboarding/workflow-generator.d.ts +48 -0
  81. package/dist/src/build/onboarding/workflow-ui-helpers.d.ts +18 -0
  82. package/dist/src/build/onboarding/workflow-writer.d.ts +36 -0
  83. package/dist/src/build/output-record.d.ts +30 -0
  84. package/dist/src/build/pbxproj-parser.d.ts +48 -0
  85. package/dist/src/build/platform-paths.d.ts +20 -0
  86. package/dist/src/build/qr.d.ts +5 -0
  87. package/dist/src/build/request.d.ts +102 -43
  88. package/dist/src/build/telemetry.d.ts +17 -0
  89. package/dist/src/bundle/builder-cta.d.ts +67 -0
  90. package/dist/src/bundle/check.d.ts +0 -1
  91. package/dist/src/bundle/cleanup.d.ts +3 -12
  92. package/dist/src/bundle/compatibility.d.ts +23 -12
  93. package/dist/src/bundle/decrypt.d.ts +4 -0
  94. package/dist/src/bundle/delete.d.ts +3 -8
  95. package/dist/src/bundle/encrypt.d.ts +4 -0
  96. package/dist/src/bundle/list.d.ts +5 -2
  97. package/dist/src/bundle/partial.d.ts +5 -3
  98. package/dist/src/bundle/releaseType.d.ts +15 -0
  99. package/dist/src/bundle/unlink.d.ts +6 -5
  100. package/dist/src/bundle/upload-command.d.ts +8 -0
  101. package/dist/src/bundle/upload.d.ts +21 -14
  102. package/dist/src/bundle/upload_interface.d.ts +2 -50
  103. package/dist/src/bundle/zip.d.ts +4 -19
  104. package/dist/src/capacitor-cli.d.ts +13 -0
  105. package/dist/src/channel/add.d.ts +8 -10
  106. package/dist/src/channel/currentBundle.d.ts +3 -9
  107. package/dist/src/channel/delete.d.ts +3 -9
  108. package/dist/src/channel/list.d.ts +31 -4
  109. package/dist/src/channel/set.d.ts +2 -17
  110. package/dist/src/checksum.d.ts +1 -2
  111. package/dist/src/config/index.d.ts +2 -13
  112. package/dist/src/docs.d.ts +0 -1
  113. package/dist/src/github-command.d.ts +9 -0
  114. package/dist/src/github.d.ts +40 -0
  115. package/dist/src/index.d.ts +0 -1
  116. package/dist/src/init/app-conflict.d.ts +2 -0
  117. package/dist/src/init/command.d.ts +57 -0
  118. package/dist/src/init/index.d.ts +1 -0
  119. package/dist/src/init/prompts.d.ts +41 -0
  120. package/dist/src/init/runtime.d.ts +111 -0
  121. package/dist/src/init/ui/app.d.ts +9 -0
  122. package/dist/src/init/ui/components.d.ts +31 -0
  123. package/dist/src/init/ui.d.ts +12 -0
  124. package/dist/src/init/updater.d.ts +13 -0
  125. package/dist/src/key.d.ts +16 -0
  126. package/dist/src/login.d.ts +0 -1
  127. package/dist/src/mcp/server.d.ts +5 -0
  128. package/dist/src/onboarding-support.d.ts +18 -0
  129. package/dist/src/organization/add.d.ts +26 -0
  130. package/dist/src/organization/delete.d.ts +3 -0
  131. package/dist/src/{organisation → organization}/index.d.ts +1 -1
  132. package/dist/src/{organisation → organization}/list.d.ts +14 -2
  133. package/dist/src/organization/members.d.ts +12 -0
  134. package/dist/src/organization/set.d.ts +21 -0
  135. package/dist/src/posthog.d.ts +13 -0
  136. package/dist/src/probe.d.ts +20 -0
  137. package/dist/src/promptPreferences.d.ts +13 -0
  138. package/dist/src/replicationProgress.d.ts +8 -0
  139. package/dist/src/run/device.d.ts +5 -0
  140. package/dist/src/runner-command.d.ts +5 -0
  141. package/dist/src/schemas/app.d.ts +26 -0
  142. package/dist/src/schemas/base.d.ts +7 -0
  143. package/dist/src/schemas/build.d.ts +196 -0
  144. package/dist/src/schemas/bundle.d.ts +157 -0
  145. package/dist/src/schemas/channel.d.ts +62 -0
  146. package/dist/src/schemas/common.d.ts +46 -0
  147. package/dist/src/schemas/config.d.ts +20 -0
  148. package/dist/src/schemas/index.d.ts +19 -0
  149. package/dist/src/schemas/organization.d.ts +41 -0
  150. package/dist/src/schemas/sdk.d.ts +335 -0
  151. package/dist/src/schemas/validate.d.ts +12 -0
  152. package/dist/src/sdk.d.ts +69 -337
  153. package/dist/src/sdk.js +542 -301
  154. package/dist/src/terminal-table.d.ts +7 -0
  155. package/dist/src/types/supabase.types.d.ts +2770 -296
  156. package/dist/src/updaterConfig.d.ts +8 -0
  157. package/dist/src/user/account.d.ts +0 -1
  158. package/dist/src/utils/latest-version.d.ts +0 -1
  159. package/dist/src/utils/safeWrites.d.ts +21 -0
  160. package/dist/src/utils/security_policy_errors.d.ts +47 -0
  161. package/dist/src/utils.d.ts +2869 -341
  162. package/dist/src/versionHelpers.d.ts +19 -0
  163. package/package.json +120 -30
  164. package/skills/native-builds/SKILL.md +255 -0
  165. package/skills/organization-management/SKILL.md +93 -0
  166. package/skills/release-management/SKILL.md +225 -0
  167. package/skills/usage/SKILL.md +92 -0
  168. package/dist/src/api/app.d.ts.map +0 -1
  169. package/dist/src/api/channels.d.ts.map +0 -1
  170. package/dist/src/api/cryptoV2.d.ts +0 -16
  171. package/dist/src/api/cryptoV2.d.ts.map +0 -1
  172. package/dist/src/api/update.d.ts.map +0 -1
  173. package/dist/src/api/versions.d.ts.map +0 -1
  174. package/dist/src/app/add.d.ts.map +0 -1
  175. package/dist/src/app/debug.d.ts.map +0 -1
  176. package/dist/src/app/delete.d.ts.map +0 -1
  177. package/dist/src/app/info.d.ts.map +0 -1
  178. package/dist/src/app/list.d.ts.map +0 -1
  179. package/dist/src/app/set.d.ts.map +0 -1
  180. package/dist/src/app/setting.d.ts.map +0 -1
  181. package/dist/src/build/request.d.ts.map +0 -1
  182. package/dist/src/bundle/check.d.ts.map +0 -1
  183. package/dist/src/bundle/cleanup.d.ts.map +0 -1
  184. package/dist/src/bundle/compatibility.d.ts.map +0 -1
  185. package/dist/src/bundle/decryptV2.d.ts +0 -13
  186. package/dist/src/bundle/decryptV2.d.ts.map +0 -1
  187. package/dist/src/bundle/delete.d.ts.map +0 -1
  188. package/dist/src/bundle/encryptV2.d.ts +0 -14
  189. package/dist/src/bundle/encryptV2.d.ts.map +0 -1
  190. package/dist/src/bundle/list.d.ts.map +0 -1
  191. package/dist/src/bundle/partial.d.ts.map +0 -1
  192. package/dist/src/bundle/unlink.d.ts.map +0 -1
  193. package/dist/src/bundle/upload.d.ts.map +0 -1
  194. package/dist/src/bundle/upload_interface.d.ts.map +0 -1
  195. package/dist/src/bundle/zip.d.ts.map +0 -1
  196. package/dist/src/channel/add.d.ts.map +0 -1
  197. package/dist/src/channel/currentBundle.d.ts.map +0 -1
  198. package/dist/src/channel/delete.d.ts.map +0 -1
  199. package/dist/src/channel/list.d.ts.map +0 -1
  200. package/dist/src/channel/set.d.ts.map +0 -1
  201. package/dist/src/checksum.d.ts.map +0 -1
  202. package/dist/src/config/index.d.ts.map +0 -1
  203. package/dist/src/docs.d.ts.map +0 -1
  204. package/dist/src/index.d.ts.map +0 -1
  205. package/dist/src/init.d.ts +0 -7
  206. package/dist/src/init.d.ts.map +0 -1
  207. package/dist/src/keyV2.d.ts +0 -19
  208. package/dist/src/keyV2.d.ts.map +0 -1
  209. package/dist/src/login.d.ts.map +0 -1
  210. package/dist/src/organisation/add.d.ts +0 -19
  211. package/dist/src/organisation/add.d.ts.map +0 -1
  212. package/dist/src/organisation/delete.d.ts +0 -8
  213. package/dist/src/organisation/delete.d.ts.map +0 -1
  214. package/dist/src/organisation/index.d.ts.map +0 -1
  215. package/dist/src/organisation/list.d.ts.map +0 -1
  216. package/dist/src/organisation/set.d.ts +0 -13
  217. package/dist/src/organisation/set.d.ts.map +0 -1
  218. package/dist/src/sdk.d.ts.map +0 -1
  219. package/dist/src/types/supabase.types.d.ts.map +0 -1
  220. package/dist/src/user/account.d.ts.map +0 -1
  221. package/dist/src/utils/latest-version.d.ts.map +0 -1
  222. package/dist/src/utils.d.ts.map +0 -1
@@ -1,7 +1,9 @@
1
1
  import type { InstallCommand, PackageManagerRunner, PackageManagerType } from '@capgo/find-package-manager';
2
+ import type { SemVer } from '@std/semver';
2
3
  import type { SupabaseClient } from '@supabase/supabase-js';
3
4
  import type { Buffer } from 'node:buffer';
4
5
  import type { CapacitorConfig, ExtConfigPairs } from './config';
6
+ import type { Compatibility, CompatibilityDetails, NativePackage } from './schemas/common';
5
7
  import type { Database } from './types/supabase.types';
6
8
  import { spinner as spinnerC } from '@clack/prompts';
7
9
  export declare const baseKey = ".capgo_key";
@@ -18,9 +20,14 @@ export declare const MAX_UPLOAD_LENGTH_BYTES: number;
18
20
  export declare const MAX_CHUNK_SIZE_BYTES: number;
19
21
  export declare const PACKNAME = "package.json";
20
22
  export type ArrayElement<ArrayType extends readonly unknown[]> = ArrayType extends readonly (infer ElementType)[] ? ElementType : never;
21
- export type Organization = ArrayElement<Database['public']['Functions']['get_orgs_v6']['Returns']>;
23
+ export type Organization = ArrayElement<Database['public']['Functions']['get_orgs_v7']['Returns']>;
22
24
  export declare const regexSemver: RegExp;
23
- export declare const formatError: (error: any) => string;
25
+ /**
26
+ * Format an error for display. If it's a security policy error,
27
+ * returns a human-readable message with actionable steps.
28
+ */
29
+ export declare function formatError(error: any): string;
30
+ export declare function check2FAAccessForOrg(supabase: SupabaseClient<Database>, orgId: string, silent?: boolean): Promise<void>;
24
31
  type TagKey = Lowercase<string>;
25
32
  /** Tag Type */
26
33
  type Tags = Record<TagKey, string | number | boolean>;
@@ -49,6 +56,14 @@ interface TrackOptions {
49
56
  * example: "user-123"
50
57
  */
51
58
  user_id?: string;
59
+ /**
60
+ * Organization ID for actor-scoped tracking.
61
+ */
62
+ org_id?: string;
63
+ /**
64
+ * Tracking payload contract version.
65
+ */
66
+ tracking_version?: number;
52
67
  /**
53
68
  * Event icon (emoji)
54
69
  * must be a single emoji
@@ -73,28 +88,47 @@ interface TrackOptions {
73
88
  */
74
89
  timestamp?: number | Date;
75
90
  }
76
- export interface OptionsBase {
77
- apikey: string;
78
- supaHost?: string;
79
- supaAnon?: string;
80
- }
91
+ export type { OptionsBase } from './schemas/base';
81
92
  export declare function wait(ms: number): Promise<unknown>;
93
+ interface PromptInteractivityOptions {
94
+ silent?: boolean;
95
+ stdinIsTTY?: boolean;
96
+ stdoutIsTTY?: boolean;
97
+ ci?: boolean;
98
+ }
99
+ export declare function canPromptInteractively({ silent, stdinIsTTY, stdoutIsTTY, ci, }?: PromptInteractivityOptions): boolean;
82
100
  export declare function projectIsMonorepo(dir: string): boolean;
83
101
  export declare function findRoot(dir: string): string;
84
102
  export declare function getPackageScripts(f?: string, file?: string | undefined): Record<string, string>;
85
103
  export declare function getBundleVersion(f?: string, file?: string | undefined): string;
86
104
  /**
87
- * Get the actual installed version of @capgo/capacitor-updater
88
- * @param packageName - The package name (only supports '@capgo/capacitor-updater')
105
+ * Get the actual installed version of a package from node_modules (not from package.json)
106
+ * Uses multiple resolution strategies to find the installed version:
107
+ * 1. require.resolve - Works with all package managers
108
+ * 2. Walk up node_modules - Handles hoisted dependencies in monorepos
109
+ * 3. Native config files (iOS/Android) - For @capgo/capacitor-updater only
110
+ * 4. Fallback to declared version in package.json
111
+ *
112
+ * @param packageName - The package name to check
89
113
  * @param rootDir - The root directory of the project
90
114
  * @param packageJsonPath - Optional custom package.json path provided by user (takes priority if provided)
91
115
  */
92
116
  export declare function getInstalledVersion(packageName: string, rootDir?: string, packageJsonPath?: string): Promise<string | null>;
93
117
  export declare function getAllPackagesDependencies(f?: string, file?: string | undefined): Promise<Map<string, string>>;
94
- export declare function getConfig(): Promise<ExtConfigPairs>;
118
+ export declare function getConfig(silent?: boolean): Promise<{
119
+ config: {
120
+ [x: string]: unknown;
121
+ appId: string;
122
+ appName: string;
123
+ webDir: string;
124
+ plugins?: Record<string, any> | undefined;
125
+ android?: Record<string, any> | undefined;
126
+ };
127
+ path: string;
128
+ }>;
95
129
  export declare function updateConfigbyKey(key: string, newConfig: any): Promise<ExtConfigPairs>;
96
130
  export declare function updateConfigUpdater(newConfig: any): Promise<ExtConfigPairs>;
97
- export declare function getLocalConfig(): Promise<CapgoConfig>;
131
+ export declare function getLocalConfig(silent?: boolean): Promise<CapgoConfig>;
98
132
  interface CapgoConfig {
99
133
  supaHost?: string;
100
134
  supaKey?: string;
@@ -103,7 +137,7 @@ interface CapgoConfig {
103
137
  hostFilesApi: string;
104
138
  hostApi: string;
105
139
  }
106
- export declare function getRemoteConfig(): Promise<CapgoConfig>;
140
+ export declare function getRemoteConfig(silent?: boolean, signal?: AbortSignal): Promise<CapgoConfig>;
107
141
  interface CapgoFilesConfig {
108
142
  partialUpload: boolean;
109
143
  partialUploadForced: boolean;
@@ -114,39 +148,48 @@ interface CapgoFilesConfig {
114
148
  alertUploadSize: number;
115
149
  }
116
150
  export declare function getRemoteFileConfig(): Promise<CapgoFilesConfig>;
117
- export declare function createSupabaseClient(apikey: string, supaHost?: string, supaKey?: string): Promise<SupabaseClient<Database, "public", "public", {
151
+ export declare function createSupabaseClient(apikey: string, supaHost?: string, supaKey?: string, silent?: boolean, instrument?: boolean): Promise<SupabaseClient<Database, "public", "public", {
118
152
  Tables: {
119
153
  apikeys: {
120
154
  Row: {
121
155
  created_at: string | null;
156
+ expires_at: string | null;
122
157
  id: number;
123
- key: string;
158
+ key: string | null;
159
+ key_hash: string | null;
124
160
  limited_to_apps: string[] | null;
125
161
  limited_to_orgs: string[] | null;
126
162
  mode: Database["public"]["Enums"]["key_mode"];
127
163
  name: string;
164
+ rbac_id: string;
128
165
  updated_at: string | null;
129
166
  user_id: string;
130
167
  };
131
168
  Insert: {
132
169
  created_at?: string | null;
170
+ expires_at?: string | null;
133
171
  id?: number;
134
- key: string;
172
+ key?: string | null;
173
+ key_hash?: string | null;
135
174
  limited_to_apps?: string[] | null;
136
175
  limited_to_orgs?: string[] | null;
137
176
  mode: Database["public"]["Enums"]["key_mode"];
138
177
  name: string;
178
+ rbac_id?: string;
139
179
  updated_at?: string | null;
140
180
  user_id: string;
141
181
  };
142
182
  Update: {
143
183
  created_at?: string | null;
184
+ expires_at?: string | null;
144
185
  id?: number;
145
- key?: string;
186
+ key?: string | null;
187
+ key_hash?: string | null;
146
188
  limited_to_apps?: string[] | null;
147
189
  limited_to_orgs?: string[] | null;
148
190
  mode?: Database["public"]["Enums"]["key_mode"];
149
191
  name?: string;
192
+ rbac_id?: string;
150
193
  updated_at?: string | null;
151
194
  user_id?: string;
152
195
  };
@@ -195,13 +238,17 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
195
238
  Row: {
196
239
  app_id: string;
197
240
  checksum: string | null;
241
+ cli_version: string | null;
198
242
  comment: string | null;
199
243
  created_at: string | null;
200
244
  deleted: boolean;
245
+ deleted_at: string | null;
201
246
  external_url: string | null;
202
247
  id: number;
248
+ key_id: string | null;
203
249
  link: string | null;
204
250
  manifest: Database["public"]["CompositeTypes"]["manifest_entry"][] | null;
251
+ manifest_count: number;
205
252
  min_update_version: string | null;
206
253
  name: string;
207
254
  native_packages: import("./types/supabase.types").Json[] | null;
@@ -215,13 +262,17 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
215
262
  Insert: {
216
263
  app_id: string;
217
264
  checksum?: string | null;
265
+ cli_version?: string | null;
218
266
  comment?: string | null;
219
267
  created_at?: string | null;
220
268
  deleted?: boolean;
269
+ deleted_at?: string | null;
221
270
  external_url?: string | null;
222
271
  id?: number;
272
+ key_id?: string | null;
223
273
  link?: string | null;
224
274
  manifest?: Database["public"]["CompositeTypes"]["manifest_entry"][] | null;
275
+ manifest_count?: number;
225
276
  min_update_version?: string | null;
226
277
  name: string;
227
278
  native_packages?: import("./types/supabase.types").Json[] | null;
@@ -235,13 +286,17 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
235
286
  Update: {
236
287
  app_id?: string;
237
288
  checksum?: string | null;
289
+ cli_version?: string | null;
238
290
  comment?: string | null;
239
291
  created_at?: string | null;
240
292
  deleted?: boolean;
293
+ deleted_at?: string | null;
241
294
  external_url?: string | null;
242
295
  id?: number;
296
+ key_id?: string | null;
243
297
  link?: string | null;
244
298
  manifest?: Database["public"]["CompositeTypes"]["manifest_entry"][] | null;
299
+ manifest_count?: number;
245
300
  min_update_version?: string | null;
246
301
  name?: string;
247
302
  native_packages?: import("./types/supabase.types").Json[] | null;
@@ -316,49 +371,82 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
316
371
  };
317
372
  apps: {
318
373
  Row: {
374
+ allow_device_custom_id: boolean;
375
+ allow_preview: boolean;
376
+ android_store_url: string | null;
319
377
  app_id: string;
378
+ build_timeout_seconds: number;
379
+ build_timeout_updated_at: string;
320
380
  channel_device_count: number;
321
381
  created_at: string | null;
322
382
  default_upload_channel: string;
383
+ existing_app: boolean;
384
+ expose_metadata: boolean;
323
385
  icon_url: string;
324
386
  id: string | null;
387
+ ios_store_url: string | null;
325
388
  last_version: string | null;
326
389
  manifest_bundle_count: number;
327
390
  name: string | null;
391
+ need_onboarding: boolean;
328
392
  owner_org: string;
329
393
  retention: number;
394
+ stats_refresh_requested_at: string | null;
395
+ stats_updated_at: string | null;
330
396
  transfer_history: import("./types/supabase.types").Json[] | null;
331
397
  updated_at: string | null;
332
398
  user_id: string | null;
333
399
  };
334
400
  Insert: {
401
+ allow_device_custom_id?: boolean;
402
+ allow_preview?: boolean;
403
+ android_store_url?: string | null;
335
404
  app_id: string;
405
+ build_timeout_seconds?: number;
406
+ build_timeout_updated_at?: string;
336
407
  channel_device_count?: number;
337
408
  created_at?: string | null;
338
409
  default_upload_channel?: string;
410
+ existing_app?: boolean;
411
+ expose_metadata?: boolean;
339
412
  icon_url: string;
340
413
  id?: string | null;
414
+ ios_store_url?: string | null;
341
415
  last_version?: string | null;
342
416
  manifest_bundle_count?: number;
343
417
  name?: string | null;
418
+ need_onboarding?: boolean;
344
419
  owner_org: string;
345
420
  retention?: number;
421
+ stats_refresh_requested_at?: string | null;
422
+ stats_updated_at?: string | null;
346
423
  transfer_history?: import("./types/supabase.types").Json[] | null;
347
424
  updated_at?: string | null;
348
425
  user_id?: string | null;
349
426
  };
350
427
  Update: {
428
+ allow_device_custom_id?: boolean;
429
+ allow_preview?: boolean;
430
+ android_store_url?: string | null;
351
431
  app_id?: string;
432
+ build_timeout_seconds?: number;
433
+ build_timeout_updated_at?: string;
352
434
  channel_device_count?: number;
353
435
  created_at?: string | null;
354
436
  default_upload_channel?: string;
437
+ existing_app?: boolean;
438
+ expose_metadata?: boolean;
355
439
  icon_url?: string;
356
440
  id?: string | null;
441
+ ios_store_url?: string | null;
357
442
  last_version?: string | null;
358
443
  manifest_bundle_count?: number;
359
444
  name?: string | null;
445
+ need_onboarding?: boolean;
360
446
  owner_org?: string;
361
447
  retention?: number;
448
+ stats_refresh_requested_at?: string | null;
449
+ stats_updated_at?: string | null;
362
450
  transfer_history?: import("./types/supabase.types").Json[] | null;
363
451
  updated_at?: string | null;
364
452
  user_id?: string | null;
@@ -377,6 +465,57 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
377
465
  referencedColumns: ["id"];
378
466
  }];
379
467
  };
468
+ audit_logs: {
469
+ Row: {
470
+ changed_fields: string[] | null;
471
+ created_at: string;
472
+ id: number;
473
+ new_record: import("./types/supabase.types").Json | null;
474
+ old_record: import("./types/supabase.types").Json | null;
475
+ operation: string;
476
+ org_id: string;
477
+ record_id: string;
478
+ table_name: string;
479
+ user_id: string | null;
480
+ };
481
+ Insert: {
482
+ changed_fields?: string[] | null;
483
+ created_at?: string;
484
+ id?: number;
485
+ new_record?: import("./types/supabase.types").Json | null;
486
+ old_record?: import("./types/supabase.types").Json | null;
487
+ operation: string;
488
+ org_id: string;
489
+ record_id: string;
490
+ table_name: string;
491
+ user_id?: string | null;
492
+ };
493
+ Update: {
494
+ changed_fields?: string[] | null;
495
+ created_at?: string;
496
+ id?: number;
497
+ new_record?: import("./types/supabase.types").Json | null;
498
+ old_record?: import("./types/supabase.types").Json | null;
499
+ operation?: string;
500
+ org_id?: string;
501
+ record_id?: string;
502
+ table_name?: string;
503
+ user_id?: string | null;
504
+ };
505
+ Relationships: [{
506
+ foreignKeyName: "audit_logs_org_id_fkey";
507
+ columns: ["org_id"];
508
+ isOneToOne: false;
509
+ referencedRelation: "orgs";
510
+ referencedColumns: ["id"];
511
+ }, {
512
+ foreignKeyName: "audit_logs_user_id_fkey";
513
+ columns: ["user_id"];
514
+ isOneToOne: false;
515
+ referencedRelation: "users";
516
+ referencedColumns: ["id"];
517
+ }];
518
+ };
380
519
  bandwidth_usage: {
381
520
  Row: {
382
521
  app_id: string;
@@ -401,6 +540,126 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
401
540
  };
402
541
  Relationships: [];
403
542
  };
543
+ build_logs: {
544
+ Row: {
545
+ app_id: string | null;
546
+ billable_seconds: number;
547
+ build_id: string;
548
+ build_time_unit: number;
549
+ created_at: string;
550
+ id: string;
551
+ org_id: string;
552
+ platform: string;
553
+ user_id: string | null;
554
+ };
555
+ Insert: {
556
+ app_id?: string | null;
557
+ billable_seconds: number;
558
+ build_id: string;
559
+ build_time_unit: number;
560
+ created_at?: string;
561
+ id?: string;
562
+ org_id: string;
563
+ platform: string;
564
+ user_id?: string | null;
565
+ };
566
+ Update: {
567
+ app_id?: string | null;
568
+ billable_seconds?: number;
569
+ build_id?: string;
570
+ build_time_unit?: number;
571
+ created_at?: string;
572
+ id?: string;
573
+ org_id?: string;
574
+ platform?: string;
575
+ user_id?: string | null;
576
+ };
577
+ Relationships: [{
578
+ foreignKeyName: "build_logs_app_id_fkey";
579
+ columns: ["app_id"];
580
+ isOneToOne: false;
581
+ referencedRelation: "apps";
582
+ referencedColumns: ["app_id"];
583
+ }, {
584
+ foreignKeyName: "build_logs_org_id_fkey";
585
+ columns: ["org_id"];
586
+ isOneToOne: false;
587
+ referencedRelation: "orgs";
588
+ referencedColumns: ["id"];
589
+ }];
590
+ };
591
+ build_requests: {
592
+ Row: {
593
+ app_id: string;
594
+ build_config: import("./types/supabase.types").Json | null;
595
+ build_mode: string;
596
+ builder_job_id: string | null;
597
+ created_at: string;
598
+ id: string;
599
+ last_error: string | null;
600
+ owner_org: string;
601
+ platform: string;
602
+ requested_by: string;
603
+ runner_wait_seconds: number;
604
+ status: string;
605
+ updated_at: string;
606
+ upload_expires_at: string;
607
+ upload_path: string;
608
+ upload_session_key: string;
609
+ upload_url: string;
610
+ };
611
+ Insert: {
612
+ app_id: string;
613
+ build_config?: import("./types/supabase.types").Json | null;
614
+ build_mode?: string;
615
+ builder_job_id?: string | null;
616
+ created_at?: string;
617
+ id?: string;
618
+ last_error?: string | null;
619
+ owner_org: string;
620
+ platform: string;
621
+ requested_by: string;
622
+ runner_wait_seconds?: number;
623
+ status?: string;
624
+ updated_at?: string;
625
+ upload_expires_at: string;
626
+ upload_path: string;
627
+ upload_session_key: string;
628
+ upload_url: string;
629
+ };
630
+ Update: {
631
+ app_id?: string;
632
+ build_config?: import("./types/supabase.types").Json | null;
633
+ build_mode?: string;
634
+ builder_job_id?: string | null;
635
+ created_at?: string;
636
+ id?: string;
637
+ last_error?: string | null;
638
+ owner_org?: string;
639
+ platform?: string;
640
+ requested_by?: string;
641
+ runner_wait_seconds?: number;
642
+ status?: string;
643
+ updated_at?: string;
644
+ upload_expires_at?: string;
645
+ upload_path?: string;
646
+ upload_session_key?: string;
647
+ upload_url?: string;
648
+ };
649
+ Relationships: [{
650
+ foreignKeyName: "build_requests_app_id_fkey";
651
+ columns: ["app_id"];
652
+ isOneToOne: false;
653
+ referencedRelation: "apps";
654
+ referencedColumns: ["app_id"];
655
+ }, {
656
+ foreignKeyName: "build_requests_owner_org_fkey";
657
+ columns: ["owner_org"];
658
+ isOneToOne: false;
659
+ referencedRelation: "orgs";
660
+ referencedColumns: ["id"];
661
+ }];
662
+ };
404
663
  capgo_credits_steps: {
405
664
  Row: {
406
665
  created_at: string;
@@ -491,60 +750,114 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
491
750
  referencedColumns: ["id"];
492
751
  }];
493
752
  };
753
+ channel_permission_overrides: {
754
+ Row: {
755
+ channel_id: number;
756
+ created_at: string;
757
+ id: string;
758
+ is_allowed: boolean;
759
+ permission_key: string;
760
+ principal_id: string;
761
+ principal_type: string;
762
+ };
763
+ Insert: {
764
+ channel_id: number;
765
+ created_at?: string;
766
+ id?: string;
767
+ is_allowed: boolean;
768
+ permission_key: string;
769
+ principal_id: string;
770
+ principal_type: string;
771
+ };
772
+ Update: {
773
+ channel_id?: number;
774
+ created_at?: string;
775
+ id?: string;
776
+ is_allowed?: boolean;
777
+ permission_key?: string;
778
+ principal_id?: string;
779
+ principal_type?: string;
780
+ };
781
+ Relationships: [{
782
+ foreignKeyName: "channel_permission_overrides_channel_id_fkey";
783
+ columns: ["channel_id"];
784
+ isOneToOne: false;
785
+ referencedRelation: "channels";
786
+ referencedColumns: ["id"];
787
+ }, {
788
+ foreignKeyName: "channel_permission_overrides_permission_key_fkey";
789
+ columns: ["permission_key"];
790
+ isOneToOne: false;
791
+ referencedRelation: "permissions";
792
+ referencedColumns: ["key"];
793
+ }];
794
+ };
494
795
  channels: {
495
796
  Row: {
496
797
  allow_dev: boolean;
798
+ allow_device: boolean;
497
799
  allow_device_self_set: boolean;
498
800
  allow_emulator: boolean;
801
+ allow_prod: boolean;
499
802
  android: boolean;
500
803
  app_id: string;
501
804
  created_at: string;
502
805
  created_by: string;
503
806
  disable_auto_update: Database["public"]["Enums"]["disable_update"];
504
807
  disable_auto_update_under_native: boolean;
808
+ electron: boolean;
505
809
  id: number;
506
810
  ios: boolean;
507
811
  name: string;
508
812
  owner_org: string;
509
813
  public: boolean;
814
+ rbac_id: string;
510
815
  updated_at: string;
511
- version: number;
816
+ version: number | null;
512
817
  };
513
818
  Insert: {
514
819
  allow_dev?: boolean;
820
+ allow_device?: boolean;
515
821
  allow_device_self_set?: boolean;
516
822
  allow_emulator?: boolean;
823
+ allow_prod?: boolean;
517
824
  android?: boolean;
518
825
  app_id: string;
519
826
  created_at?: string;
520
827
  created_by: string;
521
828
  disable_auto_update?: Database["public"]["Enums"]["disable_update"];
522
829
  disable_auto_update_under_native?: boolean;
830
+ electron?: boolean;
523
831
  id?: number;
524
832
  ios?: boolean;
525
833
  name: string;
526
834
  owner_org: string;
527
835
  public?: boolean;
836
+ rbac_id?: string;
528
837
  updated_at?: string;
529
- version: number;
838
+ version?: number | null;
530
839
  };
531
840
  Update: {
532
841
  allow_dev?: boolean;
842
+ allow_device?: boolean;
533
843
  allow_device_self_set?: boolean;
534
844
  allow_emulator?: boolean;
845
+ allow_prod?: boolean;
535
846
  android?: boolean;
536
847
  app_id?: string;
537
848
  created_at?: string;
538
849
  created_by?: string;
539
850
  disable_auto_update?: Database["public"]["Enums"]["disable_update"];
540
851
  disable_auto_update_under_native?: boolean;
852
+ electron?: boolean;
541
853
  id?: number;
542
854
  ios?: boolean;
543
855
  name?: string;
544
856
  owner_org?: string;
545
857
  public?: boolean;
858
+ rbac_id?: string;
546
859
  updated_at?: string;
547
- version?: number;
860
+ version?: number | null;
548
861
  };
549
862
  Relationships: [{
550
863
  foreignKeyName: "channels_app_id_fkey";
@@ -566,6 +879,69 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
566
879
  referencedColumns: ["id"];
567
880
  }];
568
881
  };
882
+ cron_tasks: {
883
+ Row: {
884
+ batch_size: number | null;
885
+ created_at: string;
886
+ description: string | null;
887
+ enabled: boolean;
888
+ hour_interval: number | null;
889
+ id: number;
890
+ minute_interval: number | null;
891
+ name: string;
892
+ payload: import("./types/supabase.types").Json | null;
893
+ run_at_hour: number | null;
894
+ run_at_minute: number | null;
895
+ run_at_second: number | null;
896
+ run_on_day: number | null;
897
+ run_on_dow: number | null;
898
+ second_interval: number | null;
899
+ target: string;
900
+ task_type: Database["public"]["Enums"]["cron_task_type"];
901
+ updated_at: string;
902
+ };
903
+ Insert: {
904
+ batch_size?: number | null;
905
+ created_at?: string;
906
+ description?: string | null;
907
+ enabled?: boolean;
908
+ hour_interval?: number | null;
909
+ id?: number;
910
+ minute_interval?: number | null;
911
+ name: string;
912
+ payload?: import("./types/supabase.types").Json | null;
913
+ run_at_hour?: number | null;
914
+ run_at_minute?: number | null;
915
+ run_at_second?: number | null;
916
+ run_on_day?: number | null;
917
+ run_on_dow?: number | null;
918
+ second_interval?: number | null;
919
+ target: string;
920
+ task_type?: Database["public"]["Enums"]["cron_task_type"];
921
+ updated_at?: string;
922
+ };
923
+ Update: {
924
+ batch_size?: number | null;
925
+ created_at?: string;
926
+ description?: string | null;
927
+ enabled?: boolean;
928
+ hour_interval?: number | null;
929
+ id?: number;
930
+ minute_interval?: number | null;
931
+ name?: string;
932
+ payload?: import("./types/supabase.types").Json | null;
933
+ run_at_hour?: number | null;
934
+ run_at_minute?: number | null;
935
+ run_at_second?: number | null;
936
+ run_on_day?: number | null;
937
+ run_on_dow?: number | null;
938
+ second_interval?: number | null;
939
+ target?: string;
940
+ task_type?: Database["public"]["Enums"]["cron_task_type"];
941
+ updated_at?: string;
942
+ };
943
+ Relationships: [];
944
+ };
569
945
  daily_bandwidth: {
570
946
  Row: {
571
947
  app_id: string;
@@ -587,6 +963,33 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
587
963
  };
588
964
  Relationships: [];
589
965
  };
966
+ daily_build_time: {
967
+ Row: {
968
+ app_id: string;
969
+ build_count: number;
970
+ build_time_unit: number;
971
+ date: string;
972
+ };
973
+ Insert: {
974
+ app_id: string;
975
+ build_count?: number;
976
+ build_time_unit?: number;
977
+ date: string;
978
+ };
979
+ Update: {
980
+ app_id?: string;
981
+ build_count?: number;
982
+ build_time_unit?: number;
983
+ date?: string;
984
+ };
985
+ Relationships: [{
986
+ foreignKeyName: "daily_build_time_app_id_fkey";
987
+ columns: ["app_id"];
988
+ isOneToOne: false;
989
+ referencedRelation: "apps";
990
+ referencedColumns: ["app_id"];
991
+ }];
992
+ };
590
993
  daily_mau: {
591
994
  Row: {
592
995
  app_id: string;
@@ -608,6 +1011,42 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
608
1011
  };
609
1012
  Relationships: [];
610
1013
  };
1014
+ daily_revenue_metrics: {
1015
+ Row: {
1016
+ churn_mrr: number;
1017
+ contraction_mrr: number;
1018
+ created_at: string;
1019
+ customer_id: string;
1020
+ date_id: string;
1021
+ expansion_mrr: number;
1022
+ new_business_mrr: number;
1023
+ opening_mrr: number;
1024
+ updated_at: string;
1025
+ };
1026
+ Insert: {
1027
+ churn_mrr?: number;
1028
+ contraction_mrr?: number;
1029
+ created_at?: string;
1030
+ customer_id: string;
1031
+ date_id: string;
1032
+ expansion_mrr?: number;
1033
+ new_business_mrr?: number;
1034
+ opening_mrr?: number;
1035
+ updated_at?: string;
1036
+ };
1037
+ Update: {
1038
+ churn_mrr?: number;
1039
+ contraction_mrr?: number;
1040
+ created_at?: string;
1041
+ customer_id?: string;
1042
+ date_id?: string;
1043
+ expansion_mrr?: number;
1044
+ new_business_mrr?: number;
1045
+ opening_mrr?: number;
1046
+ updated_at?: string;
1047
+ };
1048
+ Relationships: [];
1049
+ };
611
1050
  daily_storage: {
612
1051
  Row: {
613
1052
  app_id: string;
@@ -637,7 +1076,8 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
637
1076
  get: number | null;
638
1077
  install: number | null;
639
1078
  uninstall: number | null;
640
- version_id: number;
1079
+ version_id: number | null;
1080
+ version_name: string;
641
1081
  };
642
1082
  Insert: {
643
1083
  app_id: string;
@@ -646,7 +1086,8 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
646
1086
  get?: number | null;
647
1087
  install?: number | null;
648
1088
  uninstall?: number | null;
649
- version_id: number;
1089
+ version_id?: number | null;
1090
+ version_name: string;
650
1091
  };
651
1092
  Update: {
652
1093
  app_id?: string;
@@ -655,7 +1096,8 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
655
1096
  get?: number | null;
656
1097
  install?: number | null;
657
1098
  uninstall?: number | null;
658
- version_id?: number;
1099
+ version_id?: number | null;
1100
+ version_name?: string;
659
1101
  };
660
1102
  Relationships: [];
661
1103
  };
@@ -709,6 +1151,7 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
709
1151
  created_by: string;
710
1152
  deployed_at: string | null;
711
1153
  id: number;
1154
+ install_stats_email_sent_at: string | null;
712
1155
  owner_org: string;
713
1156
  updated_at: string | null;
714
1157
  version_id: number;
@@ -720,6 +1163,7 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
720
1163
  created_by: string;
721
1164
  deployed_at?: string | null;
722
1165
  id?: number;
1166
+ install_stats_email_sent_at?: string | null;
723
1167
  owner_org: string;
724
1168
  updated_at?: string | null;
725
1169
  version_id: number;
@@ -731,6 +1175,7 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
731
1175
  created_by?: string;
732
1176
  deployed_at?: string | null;
733
1177
  id?: number;
1178
+ install_stats_email_sent_at?: string | null;
734
1179
  owner_org?: string;
735
1180
  updated_at?: string | null;
736
1181
  version_id?: number;
@@ -794,6 +1239,7 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
794
1239
  id: number;
795
1240
  is_emulator: boolean | null;
796
1241
  is_prod: boolean | null;
1242
+ key_id: string | null;
797
1243
  os_version: string | null;
798
1244
  platform: Database["public"]["Enums"]["platform_os"];
799
1245
  plugin_version: string;
@@ -810,6 +1256,7 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
810
1256
  id?: never;
811
1257
  is_emulator?: boolean | null;
812
1258
  is_prod?: boolean | null;
1259
+ key_id?: string | null;
813
1260
  os_version?: string | null;
814
1261
  platform: Database["public"]["Enums"]["platform_os"];
815
1262
  plugin_version?: string;
@@ -826,6 +1273,7 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
826
1273
  id?: never;
827
1274
  is_emulator?: boolean | null;
828
1275
  is_prod?: boolean | null;
1276
+ key_id?: string | null;
829
1277
  os_version?: string | null;
830
1278
  platform?: Database["public"]["Enums"]["platform_os"];
831
1279
  plugin_version?: string;
@@ -840,131 +1288,326 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
840
1288
  Row: {
841
1289
  apps: number;
842
1290
  apps_active: number | null;
1291
+ build_avg_seconds_day_android: number;
1292
+ build_avg_seconds_day_ios: number;
1293
+ build_count_day_android: number;
1294
+ build_count_day_ios: number;
1295
+ build_total_seconds_day_android: number;
1296
+ build_total_seconds_day_ios: number;
1297
+ builds_android: number | null;
1298
+ builds_ios: number | null;
1299
+ builds_last_month: number | null;
1300
+ builds_last_month_android: number | null;
1301
+ builds_last_month_ios: number | null;
1302
+ builds_success_android: number | null;
1303
+ builds_success_ios: number | null;
1304
+ builds_success_total: number | null;
1305
+ builds_total: number | null;
843
1306
  bundle_storage_gb: number;
1307
+ canceled_orgs: number;
1308
+ churn_revenue: number;
844
1309
  created_at: string | null;
1310
+ credits_bought: number;
1311
+ credits_consumed: number;
845
1312
  date_id: string;
1313
+ demo_apps_created: number;
846
1314
  devices_last_month: number | null;
1315
+ devices_last_month_android: number | null;
1316
+ devices_last_month_ios: number | null;
1317
+ mrr: number;
847
1318
  need_upgrade: number | null;
1319
+ new_paying_orgs: number;
848
1320
  not_paying: number | null;
1321
+ nrr: number;
849
1322
  onboarded: number | null;
1323
+ org_conversion_rate: number;
850
1324
  paying: number | null;
851
1325
  paying_monthly: number | null;
852
1326
  paying_yearly: number | null;
1327
+ plan_enterprise: number | null;
1328
+ plan_enterprise_monthly: number;
1329
+ plan_enterprise_yearly: number;
853
1330
  plan_maker: number | null;
854
- plan_payg: number | null;
1331
+ plan_maker_monthly: number;
1332
+ plan_maker_yearly: number;
855
1333
  plan_solo: number | null;
1334
+ plan_solo_monthly: number;
1335
+ plan_solo_yearly: number;
856
1336
  plan_team: number | null;
1337
+ plan_team_monthly: number;
1338
+ plan_team_yearly: number;
1339
+ plugin_major_breakdown: import("./types/supabase.types").Json;
1340
+ plugin_version_breakdown: import("./types/supabase.types").Json;
857
1341
  registers_today: number;
1342
+ revenue_enterprise: number;
1343
+ revenue_maker: number;
1344
+ revenue_solo: number;
1345
+ revenue_team: number;
858
1346
  stars: number;
859
1347
  success_rate: number | null;
1348
+ total_revenue: number;
860
1349
  trial: number | null;
861
1350
  updates: number;
862
1351
  updates_external: number | null;
863
1352
  updates_last_month: number | null;
1353
+ upgraded_orgs: number;
864
1354
  users: number | null;
865
1355
  users_active: number | null;
866
1356
  };
867
1357
  Insert: {
868
1358
  apps: number;
869
1359
  apps_active?: number | null;
1360
+ build_avg_seconds_day_android?: number;
1361
+ build_avg_seconds_day_ios?: number;
1362
+ build_count_day_android?: number;
1363
+ build_count_day_ios?: number;
1364
+ build_total_seconds_day_android?: number;
1365
+ build_total_seconds_day_ios?: number;
1366
+ builds_android?: number | null;
1367
+ builds_ios?: number | null;
1368
+ builds_last_month?: number | null;
1369
+ builds_last_month_android?: number | null;
1370
+ builds_last_month_ios?: number | null;
1371
+ builds_success_android?: number | null;
1372
+ builds_success_ios?: number | null;
1373
+ builds_success_total?: number | null;
1374
+ builds_total?: number | null;
870
1375
  bundle_storage_gb?: number;
1376
+ canceled_orgs?: number;
1377
+ churn_revenue?: number;
871
1378
  created_at?: string | null;
1379
+ credits_bought?: number;
1380
+ credits_consumed?: number;
872
1381
  date_id: string;
1382
+ demo_apps_created?: number;
873
1383
  devices_last_month?: number | null;
1384
+ devices_last_month_android?: number | null;
1385
+ devices_last_month_ios?: number | null;
1386
+ mrr?: number;
874
1387
  need_upgrade?: number | null;
1388
+ new_paying_orgs?: number;
875
1389
  not_paying?: number | null;
1390
+ nrr?: number;
876
1391
  onboarded?: number | null;
1392
+ org_conversion_rate?: number;
877
1393
  paying?: number | null;
878
1394
  paying_monthly?: number | null;
879
1395
  paying_yearly?: number | null;
1396
+ plan_enterprise?: number | null;
1397
+ plan_enterprise_monthly?: number;
1398
+ plan_enterprise_yearly?: number;
880
1399
  plan_maker?: number | null;
881
- plan_payg?: number | null;
1400
+ plan_maker_monthly?: number;
1401
+ plan_maker_yearly?: number;
882
1402
  plan_solo?: number | null;
1403
+ plan_solo_monthly?: number;
1404
+ plan_solo_yearly?: number;
883
1405
  plan_team?: number | null;
1406
+ plan_team_monthly?: number;
1407
+ plan_team_yearly?: number;
1408
+ plugin_major_breakdown?: import("./types/supabase.types").Json;
1409
+ plugin_version_breakdown?: import("./types/supabase.types").Json;
884
1410
  registers_today?: number;
1411
+ revenue_enterprise?: number;
1412
+ revenue_maker?: number;
1413
+ revenue_solo?: number;
1414
+ revenue_team?: number;
885
1415
  stars: number;
886
1416
  success_rate?: number | null;
1417
+ total_revenue?: number;
887
1418
  trial?: number | null;
888
1419
  updates: number;
889
1420
  updates_external?: number | null;
890
1421
  updates_last_month?: number | null;
1422
+ upgraded_orgs?: number;
891
1423
  users?: number | null;
892
1424
  users_active?: number | null;
893
1425
  };
894
1426
  Update: {
895
1427
  apps?: number;
896
1428
  apps_active?: number | null;
1429
+ build_avg_seconds_day_android?: number;
1430
+ build_avg_seconds_day_ios?: number;
1431
+ build_count_day_android?: number;
1432
+ build_count_day_ios?: number;
1433
+ build_total_seconds_day_android?: number;
1434
+ build_total_seconds_day_ios?: number;
1435
+ builds_android?: number | null;
1436
+ builds_ios?: number | null;
1437
+ builds_last_month?: number | null;
1438
+ builds_last_month_android?: number | null;
1439
+ builds_last_month_ios?: number | null;
1440
+ builds_success_android?: number | null;
1441
+ builds_success_ios?: number | null;
1442
+ builds_success_total?: number | null;
1443
+ builds_total?: number | null;
897
1444
  bundle_storage_gb?: number;
1445
+ canceled_orgs?: number;
1446
+ churn_revenue?: number;
898
1447
  created_at?: string | null;
1448
+ credits_bought?: number;
1449
+ credits_consumed?: number;
899
1450
  date_id?: string;
1451
+ demo_apps_created?: number;
900
1452
  devices_last_month?: number | null;
1453
+ devices_last_month_android?: number | null;
1454
+ devices_last_month_ios?: number | null;
1455
+ mrr?: number;
901
1456
  need_upgrade?: number | null;
1457
+ new_paying_orgs?: number;
902
1458
  not_paying?: number | null;
1459
+ nrr?: number;
903
1460
  onboarded?: number | null;
1461
+ org_conversion_rate?: number;
904
1462
  paying?: number | null;
905
1463
  paying_monthly?: number | null;
906
1464
  paying_yearly?: number | null;
1465
+ plan_enterprise?: number | null;
1466
+ plan_enterprise_monthly?: number;
1467
+ plan_enterprise_yearly?: number;
907
1468
  plan_maker?: number | null;
908
- plan_payg?: number | null;
1469
+ plan_maker_monthly?: number;
1470
+ plan_maker_yearly?: number;
909
1471
  plan_solo?: number | null;
1472
+ plan_solo_monthly?: number;
1473
+ plan_solo_yearly?: number;
910
1474
  plan_team?: number | null;
1475
+ plan_team_monthly?: number;
1476
+ plan_team_yearly?: number;
1477
+ plugin_major_breakdown?: import("./types/supabase.types").Json;
1478
+ plugin_version_breakdown?: import("./types/supabase.types").Json;
911
1479
  registers_today?: number;
1480
+ revenue_enterprise?: number;
1481
+ revenue_maker?: number;
1482
+ revenue_solo?: number;
1483
+ revenue_team?: number;
912
1484
  stars?: number;
913
1485
  success_rate?: number | null;
1486
+ total_revenue?: number;
914
1487
  trial?: number | null;
915
1488
  updates?: number;
916
1489
  updates_external?: number | null;
917
1490
  updates_last_month?: number | null;
1491
+ upgraded_orgs?: number;
918
1492
  users?: number | null;
919
1493
  users_active?: number | null;
920
1494
  };
921
1495
  Relationships: [];
922
1496
  };
923
- manifest: {
1497
+ group_members: {
924
1498
  Row: {
925
- app_version_id: number;
926
- file_hash: string;
927
- file_name: string;
928
- file_size: number | null;
929
- id: number;
930
- s3_path: string;
1499
+ added_at: string;
1500
+ added_by: string | null;
1501
+ group_id: string;
1502
+ user_id: string;
931
1503
  };
932
1504
  Insert: {
933
- app_version_id: number;
934
- file_hash: string;
935
- file_name: string;
936
- file_size?: number | null;
937
- id?: number;
938
- s3_path: string;
1505
+ added_at?: string;
1506
+ added_by?: string | null;
1507
+ group_id: string;
1508
+ user_id: string;
939
1509
  };
940
1510
  Update: {
941
- app_version_id?: number;
942
- file_hash?: string;
943
- file_name?: string;
944
- file_size?: number | null;
945
- id?: number;
946
- s3_path?: string;
1511
+ added_at?: string;
1512
+ added_by?: string | null;
1513
+ group_id?: string;
1514
+ user_id?: string;
947
1515
  };
948
1516
  Relationships: [{
949
- foreignKeyName: "manifest_app_version_id_fkey";
950
- columns: ["app_version_id"];
1517
+ foreignKeyName: "group_members_group_id_fkey";
1518
+ columns: ["group_id"];
951
1519
  isOneToOne: false;
952
- referencedRelation: "app_versions";
1520
+ referencedRelation: "groups";
1521
+ referencedColumns: ["id"];
1522
+ }, {
1523
+ foreignKeyName: "group_members_user_id_fkey";
1524
+ columns: ["user_id"];
1525
+ isOneToOne: false;
1526
+ referencedRelation: "users";
953
1527
  referencedColumns: ["id"];
954
1528
  }];
955
1529
  };
956
- notifications: {
1530
+ groups: {
957
1531
  Row: {
958
- created_at: string | null;
959
- event: string;
960
- last_send_at: string;
961
- owner_org: string;
962
- total_send: number;
963
- uniq_id: string;
964
- updated_at: string | null;
965
- };
966
- Insert: {
967
- created_at?: string | null;
1532
+ created_at: string;
1533
+ created_by: string | null;
1534
+ description: string | null;
1535
+ id: string;
1536
+ is_system: boolean;
1537
+ name: string;
1538
+ org_id: string;
1539
+ };
1540
+ Insert: {
1541
+ created_at?: string;
1542
+ created_by?: string | null;
1543
+ description?: string | null;
1544
+ id?: string;
1545
+ is_system?: boolean;
1546
+ name: string;
1547
+ org_id: string;
1548
+ };
1549
+ Update: {
1550
+ created_at?: string;
1551
+ created_by?: string | null;
1552
+ description?: string | null;
1553
+ id?: string;
1554
+ is_system?: boolean;
1555
+ name?: string;
1556
+ org_id?: string;
1557
+ };
1558
+ Relationships: [{
1559
+ foreignKeyName: "groups_org_id_fkey";
1560
+ columns: ["org_id"];
1561
+ isOneToOne: false;
1562
+ referencedRelation: "orgs";
1563
+ referencedColumns: ["id"];
1564
+ }];
1565
+ };
1566
+ manifest: {
1567
+ Row: {
1568
+ app_version_id: number;
1569
+ file_hash: string;
1570
+ file_name: string;
1571
+ file_size: number | null;
1572
+ id: number;
1573
+ s3_path: string;
1574
+ };
1575
+ Insert: {
1576
+ app_version_id: number;
1577
+ file_hash: string;
1578
+ file_name: string;
1579
+ file_size?: number | null;
1580
+ id?: number;
1581
+ s3_path: string;
1582
+ };
1583
+ Update: {
1584
+ app_version_id?: number;
1585
+ file_hash?: string;
1586
+ file_name?: string;
1587
+ file_size?: number | null;
1588
+ id?: number;
1589
+ s3_path?: string;
1590
+ };
1591
+ Relationships: [{
1592
+ foreignKeyName: "manifest_app_version_id_fkey";
1593
+ columns: ["app_version_id"];
1594
+ isOneToOne: false;
1595
+ referencedRelation: "app_versions";
1596
+ referencedColumns: ["id"];
1597
+ }];
1598
+ };
1599
+ notifications: {
1600
+ Row: {
1601
+ created_at: string | null;
1602
+ event: string;
1603
+ last_send_at: string;
1604
+ owner_org: string;
1605
+ total_send: number;
1606
+ uniq_id: string;
1607
+ updated_at: string | null;
1608
+ };
1609
+ Insert: {
1610
+ created_at?: string | null;
968
1611
  event: string;
969
1612
  last_send_at?: string;
970
1613
  owner_org: string;
@@ -989,6 +1632,57 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
989
1632
  referencedColumns: ["id"];
990
1633
  }];
991
1634
  };
1635
+ org_metrics_cache: {
1636
+ Row: {
1637
+ bandwidth: number;
1638
+ build_time_unit: number;
1639
+ cached_at: string;
1640
+ end_date: string;
1641
+ fail: number;
1642
+ get: number;
1643
+ install: number;
1644
+ mau: number;
1645
+ org_id: string;
1646
+ start_date: string;
1647
+ storage: number;
1648
+ uninstall: number;
1649
+ };
1650
+ Insert: {
1651
+ bandwidth: number;
1652
+ build_time_unit: number;
1653
+ cached_at?: string;
1654
+ end_date: string;
1655
+ fail: number;
1656
+ get: number;
1657
+ install: number;
1658
+ mau: number;
1659
+ org_id: string;
1660
+ start_date: string;
1661
+ storage: number;
1662
+ uninstall: number;
1663
+ };
1664
+ Update: {
1665
+ bandwidth?: number;
1666
+ build_time_unit?: number;
1667
+ cached_at?: string;
1668
+ end_date?: string;
1669
+ fail?: number;
1670
+ get?: number;
1671
+ install?: number;
1672
+ mau?: number;
1673
+ org_id?: string;
1674
+ start_date?: string;
1675
+ storage?: number;
1676
+ uninstall?: number;
1677
+ };
1678
+ Relationships: [{
1679
+ foreignKeyName: "org_metrics_cache_org_id_fkey";
1680
+ columns: ["org_id"];
1681
+ isOneToOne: true;
1682
+ referencedRelation: "orgs";
1683
+ referencedColumns: ["id"];
1684
+ }];
1685
+ };
992
1686
  org_users: {
993
1687
  Row: {
994
1688
  app_id: string | null;
@@ -996,6 +1690,7 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
996
1690
  created_at: string | null;
997
1691
  id: number;
998
1692
  org_id: string;
1693
+ rbac_role_name: string | null;
999
1694
  updated_at: string | null;
1000
1695
  user_id: string;
1001
1696
  user_right: Database["public"]["Enums"]["user_min_right"] | null;
@@ -1006,6 +1701,7 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
1006
1701
  created_at?: string | null;
1007
1702
  id?: number;
1008
1703
  org_id: string;
1704
+ rbac_role_name?: string | null;
1009
1705
  updated_at?: string | null;
1010
1706
  user_id: string;
1011
1707
  user_right?: Database["public"]["Enums"]["user_min_right"] | null;
@@ -1016,6 +1712,7 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
1016
1712
  created_at?: string | null;
1017
1713
  id?: number;
1018
1714
  org_id?: string;
1715
+ rbac_role_name?: string | null;
1019
1716
  updated_at?: string | null;
1020
1717
  user_id?: string;
1021
1718
  user_right?: Database["public"]["Enums"]["user_min_right"] | null;
@@ -1051,34 +1748,73 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
1051
1748
  created_at: string | null;
1052
1749
  created_by: string;
1053
1750
  customer_id: string | null;
1751
+ email_preferences: import("./types/supabase.types").Json;
1752
+ enforce_encrypted_bundles: boolean;
1753
+ enforce_hashed_api_keys: boolean;
1754
+ enforcing_2fa: boolean;
1755
+ has_usage_credits: boolean;
1054
1756
  id: string;
1757
+ last_stats_updated_at: string | null;
1055
1758
  logo: string | null;
1056
1759
  management_email: string;
1760
+ max_apikey_expiration_days: number | null;
1057
1761
  name: string;
1762
+ password_policy_config: import("./types/supabase.types").Json | null;
1763
+ require_apikey_expiration: boolean;
1764
+ required_encryption_key: string | null;
1765
+ stats_refresh_requested_at: string | null;
1058
1766
  stats_updated_at: string | null;
1059
1767
  updated_at: string | null;
1768
+ use_new_rbac: boolean;
1769
+ website: string | null;
1060
1770
  };
1061
1771
  Insert: {
1062
1772
  created_at?: string | null;
1063
1773
  created_by: string;
1064
1774
  customer_id?: string | null;
1775
+ email_preferences?: import("./types/supabase.types").Json;
1776
+ enforce_encrypted_bundles?: boolean;
1777
+ enforce_hashed_api_keys?: boolean;
1778
+ enforcing_2fa?: boolean;
1779
+ has_usage_credits?: boolean;
1065
1780
  id?: string;
1781
+ last_stats_updated_at?: string | null;
1066
1782
  logo?: string | null;
1067
1783
  management_email: string;
1784
+ max_apikey_expiration_days?: number | null;
1068
1785
  name: string;
1786
+ password_policy_config?: import("./types/supabase.types").Json | null;
1787
+ require_apikey_expiration?: boolean;
1788
+ required_encryption_key?: string | null;
1789
+ stats_refresh_requested_at?: string | null;
1069
1790
  stats_updated_at?: string | null;
1070
1791
  updated_at?: string | null;
1792
+ use_new_rbac?: boolean;
1793
+ website?: string | null;
1071
1794
  };
1072
1795
  Update: {
1073
1796
  created_at?: string | null;
1074
1797
  created_by?: string;
1075
1798
  customer_id?: string | null;
1799
+ email_preferences?: import("./types/supabase.types").Json;
1800
+ enforce_encrypted_bundles?: boolean;
1801
+ enforce_hashed_api_keys?: boolean;
1802
+ enforcing_2fa?: boolean;
1803
+ has_usage_credits?: boolean;
1076
1804
  id?: string;
1805
+ last_stats_updated_at?: string | null;
1077
1806
  logo?: string | null;
1078
1807
  management_email?: string;
1808
+ max_apikey_expiration_days?: number | null;
1079
1809
  name?: string;
1810
+ password_policy_config?: import("./types/supabase.types").Json | null;
1811
+ require_apikey_expiration?: boolean;
1812
+ required_encryption_key?: string | null;
1813
+ stats_refresh_requested_at?: string | null;
1080
1814
  stats_updated_at?: string | null;
1081
1815
  updated_at?: string | null;
1816
+ use_new_rbac?: boolean;
1817
+ website?: string | null;
1082
1818
  };
1083
1819
  Relationships: [{
1084
1820
  foreignKeyName: "orgs_created_by_fkey";
@@ -1094,177 +1830,450 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
1094
1830
  referencedColumns: ["customer_id"];
1095
1831
  }];
1096
1832
  };
1833
+ permissions: {
1834
+ Row: {
1835
+ bundle_id: number | null;
1836
+ created_at: string;
1837
+ description: string | null;
1838
+ id: string;
1839
+ key: string;
1840
+ scope_type: string;
1841
+ };
1842
+ Insert: {
1843
+ bundle_id?: number | null;
1844
+ created_at?: string;
1845
+ description?: string | null;
1846
+ id?: string;
1847
+ key: string;
1848
+ scope_type: string;
1849
+ };
1850
+ Update: {
1851
+ bundle_id?: number | null;
1852
+ created_at?: string;
1853
+ description?: string | null;
1854
+ id?: string;
1855
+ key?: string;
1856
+ scope_type?: string;
1857
+ };
1858
+ Relationships: [{
1859
+ foreignKeyName: "permissions_bundle_id_fkey";
1860
+ columns: ["bundle_id"];
1861
+ isOneToOne: false;
1862
+ referencedRelation: "app_versions";
1863
+ referencedColumns: ["id"];
1864
+ }];
1865
+ };
1097
1866
  plans: {
1098
1867
  Row: {
1099
1868
  bandwidth: number;
1100
- bandwidth_unit: number | null;
1869
+ build_time_unit: number;
1101
1870
  created_at: string;
1871
+ credit_id: string;
1102
1872
  description: string;
1103
1873
  id: string;
1104
1874
  market_desc: string | null;
1105
1875
  mau: number;
1106
- mau_unit: number | null;
1107
1876
  name: string;
1108
1877
  price_m: number;
1109
- price_m_bandwidth_id: string | null;
1110
1878
  price_m_id: string;
1111
- price_m_mau_id: string | null;
1112
- price_m_storage_id: string | null;
1113
1879
  price_y: number;
1114
1880
  price_y_id: string;
1115
1881
  storage: number;
1116
- storage_unit: number | null;
1117
1882
  stripe_id: string;
1118
1883
  updated_at: string;
1119
1884
  };
1120
1885
  Insert: {
1121
1886
  bandwidth: number;
1122
- bandwidth_unit?: number | null;
1887
+ build_time_unit?: number;
1123
1888
  created_at?: string;
1889
+ credit_id: string;
1124
1890
  description?: string;
1125
1891
  id?: string;
1126
1892
  market_desc?: string | null;
1127
1893
  mau?: number;
1128
- mau_unit?: number | null;
1129
1894
  name?: string;
1130
1895
  price_m?: number;
1131
- price_m_bandwidth_id?: string | null;
1132
1896
  price_m_id: string;
1133
- price_m_mau_id?: string | null;
1134
- price_m_storage_id?: string | null;
1135
1897
  price_y?: number;
1136
1898
  price_y_id: string;
1137
1899
  storage: number;
1138
- storage_unit?: number | null;
1139
1900
  stripe_id?: string;
1140
1901
  updated_at?: string;
1141
1902
  };
1142
1903
  Update: {
1143
1904
  bandwidth?: number;
1144
- bandwidth_unit?: number | null;
1905
+ build_time_unit?: number;
1145
1906
  created_at?: string;
1907
+ credit_id?: string;
1146
1908
  description?: string;
1147
1909
  id?: string;
1148
1910
  market_desc?: string | null;
1149
1911
  mau?: number;
1150
- mau_unit?: number | null;
1151
1912
  name?: string;
1152
1913
  price_m?: number;
1153
- price_m_bandwidth_id?: string | null;
1154
1914
  price_m_id?: string;
1155
- price_m_mau_id?: string | null;
1156
- price_m_storage_id?: string | null;
1157
1915
  price_y?: number;
1158
1916
  price_y_id?: string;
1159
1917
  storage?: number;
1160
- storage_unit?: number | null;
1161
1918
  stripe_id?: string;
1162
1919
  updated_at?: string;
1163
1920
  };
1164
1921
  Relationships: [];
1165
1922
  };
1166
- stats: {
1923
+ processed_stripe_events: {
1167
1924
  Row: {
1168
- action: Database["public"]["Enums"]["stats_action"];
1169
- app_id: string;
1170
1925
  created_at: string;
1171
- device_id: string;
1172
- id: number;
1173
- version_name: string;
1926
+ customer_id: string;
1927
+ date_id: string;
1928
+ event_id: string;
1174
1929
  };
1175
1930
  Insert: {
1176
- action: Database["public"]["Enums"]["stats_action"];
1177
- app_id: string;
1178
- created_at: string;
1179
- device_id: string;
1180
- id?: never;
1181
- version_name?: string;
1931
+ created_at?: string;
1932
+ customer_id: string;
1933
+ date_id: string;
1934
+ event_id: string;
1182
1935
  };
1183
1936
  Update: {
1184
- action?: Database["public"]["Enums"]["stats_action"];
1185
- app_id?: string;
1186
1937
  created_at?: string;
1187
- device_id?: string;
1188
- id?: never;
1189
- version_name?: string;
1938
+ customer_id?: string;
1939
+ date_id?: string;
1940
+ event_id?: string;
1190
1941
  };
1191
1942
  Relationships: [];
1192
1943
  };
1193
- storage_usage: {
1944
+ role_bindings: {
1194
1945
  Row: {
1195
- app_id: string;
1196
- device_id: string;
1197
- file_size: number;
1198
- id: number;
1199
- timestamp: string;
1946
+ app_id: string | null;
1947
+ bundle_id: number | null;
1948
+ channel_id: string | null;
1949
+ expires_at: string | null;
1950
+ granted_at: string;
1951
+ granted_by: string;
1952
+ id: string;
1953
+ is_direct: boolean;
1954
+ org_id: string | null;
1955
+ principal_id: string;
1956
+ principal_type: string;
1957
+ reason: string | null;
1958
+ role_id: string;
1959
+ scope_type: string;
1200
1960
  };
1201
1961
  Insert: {
1202
- app_id: string;
1203
- device_id: string;
1204
- file_size: number;
1205
- id?: number;
1206
- timestamp?: string;
1962
+ app_id?: string | null;
1963
+ bundle_id?: number | null;
1964
+ channel_id?: string | null;
1965
+ expires_at?: string | null;
1966
+ granted_at?: string;
1967
+ granted_by: string;
1968
+ id?: string;
1969
+ is_direct?: boolean;
1970
+ org_id?: string | null;
1971
+ principal_id: string;
1972
+ principal_type: string;
1973
+ reason?: string | null;
1974
+ role_id: string;
1975
+ scope_type: string;
1207
1976
  };
1208
1977
  Update: {
1209
- app_id?: string;
1210
- device_id?: string;
1211
- file_size?: number;
1212
- id?: number;
1213
- timestamp?: string;
1978
+ app_id?: string | null;
1979
+ bundle_id?: number | null;
1980
+ channel_id?: string | null;
1981
+ expires_at?: string | null;
1982
+ granted_at?: string;
1983
+ granted_by?: string;
1984
+ id?: string;
1985
+ is_direct?: boolean;
1986
+ org_id?: string | null;
1987
+ principal_id?: string;
1988
+ principal_type?: string;
1989
+ reason?: string | null;
1990
+ role_id?: string;
1991
+ scope_type?: string;
1214
1992
  };
1215
- Relationships: [];
1993
+ Relationships: [{
1994
+ foreignKeyName: "role_bindings_app_id_fkey";
1995
+ columns: ["app_id"];
1996
+ isOneToOne: false;
1997
+ referencedRelation: "apps";
1998
+ referencedColumns: ["id"];
1999
+ }, {
2000
+ foreignKeyName: "role_bindings_bundle_id_fkey";
2001
+ columns: ["bundle_id"];
2002
+ isOneToOne: false;
2003
+ referencedRelation: "app_versions";
2004
+ referencedColumns: ["id"];
2005
+ }, {
2006
+ foreignKeyName: "role_bindings_channel_id_fkey";
2007
+ columns: ["channel_id"];
2008
+ isOneToOne: false;
2009
+ referencedRelation: "channels";
2010
+ referencedColumns: ["rbac_id"];
2011
+ }, {
2012
+ foreignKeyName: "role_bindings_org_id_fkey";
2013
+ columns: ["org_id"];
2014
+ isOneToOne: false;
2015
+ referencedRelation: "orgs";
2016
+ referencedColumns: ["id"];
2017
+ }, {
2018
+ foreignKeyName: "role_bindings_role_id_fkey";
2019
+ columns: ["role_id"];
2020
+ isOneToOne: false;
2021
+ referencedRelation: "roles";
2022
+ referencedColumns: ["id"];
2023
+ }];
1216
2024
  };
1217
- stripe_info: {
2025
+ role_hierarchy: {
1218
2026
  Row: {
1219
- bandwidth_exceeded: boolean | null;
1220
- canceled_at: string | null;
1221
- created_at: string;
1222
- customer_id: string;
1223
- id: number;
1224
- is_good_plan: boolean | null;
1225
- mau_exceeded: boolean | null;
1226
- plan_calculated_at: string | null;
1227
- plan_usage: number | null;
1228
- price_id: string | null;
1229
- product_id: string;
1230
- status: Database["public"]["Enums"]["stripe_status"] | null;
1231
- storage_exceeded: boolean | null;
1232
- subscription_anchor_end: string;
1233
- subscription_anchor_start: string;
1234
- subscription_id: string | null;
1235
- subscription_metered: import("./types/supabase.types").Json;
1236
- trial_at: string;
1237
- updated_at: string;
2027
+ child_role_id: string;
2028
+ parent_role_id: string;
1238
2029
  };
1239
2030
  Insert: {
1240
- bandwidth_exceeded?: boolean | null;
1241
- canceled_at?: string | null;
1242
- created_at?: string;
1243
- customer_id: string;
1244
- id?: number;
1245
- is_good_plan?: boolean | null;
1246
- mau_exceeded?: boolean | null;
1247
- plan_calculated_at?: string | null;
1248
- plan_usage?: number | null;
1249
- price_id?: string | null;
1250
- product_id: string;
1251
- status?: Database["public"]["Enums"]["stripe_status"] | null;
1252
- storage_exceeded?: boolean | null;
1253
- subscription_anchor_end?: string;
1254
- subscription_anchor_start?: string;
1255
- subscription_id?: string | null;
1256
- subscription_metered?: import("./types/supabase.types").Json;
1257
- trial_at?: string;
1258
- updated_at?: string;
2031
+ child_role_id: string;
2032
+ parent_role_id: string;
1259
2033
  };
1260
2034
  Update: {
1261
- bandwidth_exceeded?: boolean | null;
1262
- canceled_at?: string | null;
1263
- created_at?: string;
1264
- customer_id?: string;
1265
- id?: number;
1266
- is_good_plan?: boolean | null;
2035
+ child_role_id?: string;
2036
+ parent_role_id?: string;
2037
+ };
2038
+ Relationships: [{
2039
+ foreignKeyName: "role_hierarchy_child_role_id_fkey";
2040
+ columns: ["child_role_id"];
2041
+ isOneToOne: false;
2042
+ referencedRelation: "roles";
2043
+ referencedColumns: ["id"];
2044
+ }, {
2045
+ foreignKeyName: "role_hierarchy_parent_role_id_fkey";
2046
+ columns: ["parent_role_id"];
2047
+ isOneToOne: false;
2048
+ referencedRelation: "roles";
2049
+ referencedColumns: ["id"];
2050
+ }];
2051
+ };
2052
+ role_permissions: {
2053
+ Row: {
2054
+ permission_id: string;
2055
+ role_id: string;
2056
+ };
2057
+ Insert: {
2058
+ permission_id: string;
2059
+ role_id: string;
2060
+ };
2061
+ Update: {
2062
+ permission_id?: string;
2063
+ role_id?: string;
2064
+ };
2065
+ Relationships: [{
2066
+ foreignKeyName: "role_permissions_permission_id_fkey";
2067
+ columns: ["permission_id"];
2068
+ isOneToOne: false;
2069
+ referencedRelation: "permissions";
2070
+ referencedColumns: ["id"];
2071
+ }, {
2072
+ foreignKeyName: "role_permissions_role_id_fkey";
2073
+ columns: ["role_id"];
2074
+ isOneToOne: false;
2075
+ referencedRelation: "roles";
2076
+ referencedColumns: ["id"];
2077
+ }];
2078
+ };
2079
+ roles: {
2080
+ Row: {
2081
+ created_at: string;
2082
+ created_by: string | null;
2083
+ description: string | null;
2084
+ id: string;
2085
+ is_assignable: boolean;
2086
+ name: string;
2087
+ priority_rank: number;
2088
+ scope_type: string;
2089
+ };
2090
+ Insert: {
2091
+ created_at?: string;
2092
+ created_by?: string | null;
2093
+ description?: string | null;
2094
+ id?: string;
2095
+ is_assignable?: boolean;
2096
+ name: string;
2097
+ priority_rank?: number;
2098
+ scope_type: string;
2099
+ };
2100
+ Update: {
2101
+ created_at?: string;
2102
+ created_by?: string | null;
2103
+ description?: string | null;
2104
+ id?: string;
2105
+ is_assignable?: boolean;
2106
+ name?: string;
2107
+ priority_rank?: number;
2108
+ scope_type?: string;
2109
+ };
2110
+ Relationships: [];
2111
+ };
2112
+ sso_providers: {
2113
+ Row: {
2114
+ attribute_mapping: import("./types/supabase.types").Json | null;
2115
+ created_at: string;
2116
+ dns_verification_token: string;
2117
+ dns_verified_at: string | null;
2118
+ domain: string;
2119
+ enforce_sso: boolean;
2120
+ id: string;
2121
+ metadata_url: string | null;
2122
+ org_id: string;
2123
+ provider_id: string | null;
2124
+ status: string;
2125
+ updated_at: string;
2126
+ };
2127
+ Insert: {
2128
+ attribute_mapping?: import("./types/supabase.types").Json | null;
2129
+ created_at?: string;
2130
+ dns_verification_token: string;
2131
+ dns_verified_at?: string | null;
2132
+ domain: string;
2133
+ enforce_sso?: boolean;
2134
+ id?: string;
2135
+ metadata_url?: string | null;
2136
+ org_id: string;
2137
+ provider_id?: string | null;
2138
+ status?: string;
2139
+ updated_at?: string;
2140
+ };
2141
+ Update: {
2142
+ attribute_mapping?: import("./types/supabase.types").Json | null;
2143
+ created_at?: string;
2144
+ dns_verification_token?: string;
2145
+ dns_verified_at?: string | null;
2146
+ domain?: string;
2147
+ enforce_sso?: boolean;
2148
+ id?: string;
2149
+ metadata_url?: string | null;
2150
+ org_id?: string;
2151
+ provider_id?: string | null;
2152
+ status?: string;
2153
+ updated_at?: string;
2154
+ };
2155
+ Relationships: [{
2156
+ foreignKeyName: "sso_providers_org_id_fkey";
2157
+ columns: ["org_id"];
2158
+ isOneToOne: false;
2159
+ referencedRelation: "orgs";
2160
+ referencedColumns: ["id"];
2161
+ }];
2162
+ };
2163
+ stats: {
2164
+ Row: {
2165
+ action: Database["public"]["Enums"]["stats_action"];
2166
+ app_id: string;
2167
+ created_at: string;
2168
+ device_id: string;
2169
+ id: number;
2170
+ version_name: string;
2171
+ };
2172
+ Insert: {
2173
+ action: Database["public"]["Enums"]["stats_action"];
2174
+ app_id: string;
2175
+ created_at: string;
2176
+ device_id: string;
2177
+ id?: never;
2178
+ version_name?: string;
2179
+ };
2180
+ Update: {
2181
+ action?: Database["public"]["Enums"]["stats_action"];
2182
+ app_id?: string;
2183
+ created_at?: string;
2184
+ device_id?: string;
2185
+ id?: never;
2186
+ version_name?: string;
2187
+ };
2188
+ Relationships: [];
2189
+ };
2190
+ storage_usage: {
2191
+ Row: {
2192
+ app_id: string;
2193
+ device_id: string;
2194
+ file_size: number;
2195
+ id: number;
2196
+ timestamp: string;
2197
+ };
2198
+ Insert: {
2199
+ app_id: string;
2200
+ device_id: string;
2201
+ file_size: number;
2202
+ id?: number;
2203
+ timestamp?: string;
2204
+ };
2205
+ Update: {
2206
+ app_id?: string;
2207
+ device_id?: string;
2208
+ file_size?: number;
2209
+ id?: number;
2210
+ timestamp?: string;
2211
+ };
2212
+ Relationships: [];
2213
+ };
2214
+ stripe_info: {
2215
+ Row: {
2216
+ bandwidth_exceeded: boolean | null;
2217
+ build_time_exceeded: boolean | null;
2218
+ canceled_at: string | null;
2219
+ created_at: string;
2220
+ customer_country: string | null;
2221
+ customer_id: string;
2222
+ id: number;
2223
+ is_good_plan: boolean | null;
2224
+ last_stripe_event_at: string | null;
2225
+ mau_exceeded: boolean | null;
2226
+ paid_at: string | null;
2227
+ plan_calculated_at: string | null;
2228
+ plan_usage: number | null;
2229
+ price_id: string | null;
2230
+ product_id: string;
2231
+ status: Database["public"]["Enums"]["stripe_status"] | null;
2232
+ storage_exceeded: boolean | null;
2233
+ subscription_anchor_end: string;
2234
+ subscription_anchor_start: string;
2235
+ subscription_id: string | null;
2236
+ trial_at: string;
2237
+ updated_at: string;
2238
+ upgraded_at: string | null;
2239
+ };
2240
+ Insert: {
2241
+ bandwidth_exceeded?: boolean | null;
2242
+ build_time_exceeded?: boolean | null;
2243
+ canceled_at?: string | null;
2244
+ created_at?: string;
2245
+ customer_country?: string | null;
2246
+ customer_id: string;
2247
+ id?: number;
2248
+ is_good_plan?: boolean | null;
2249
+ last_stripe_event_at?: string | null;
2250
+ mau_exceeded?: boolean | null;
2251
+ paid_at?: string | null;
2252
+ plan_calculated_at?: string | null;
2253
+ plan_usage?: number | null;
2254
+ price_id?: string | null;
2255
+ product_id: string;
2256
+ status?: Database["public"]["Enums"]["stripe_status"] | null;
2257
+ storage_exceeded?: boolean | null;
2258
+ subscription_anchor_end?: string;
2259
+ subscription_anchor_start?: string;
2260
+ subscription_id?: string | null;
2261
+ trial_at?: string;
2262
+ updated_at?: string;
2263
+ upgraded_at?: string | null;
2264
+ };
2265
+ Update: {
2266
+ bandwidth_exceeded?: boolean | null;
2267
+ build_time_exceeded?: boolean | null;
2268
+ canceled_at?: string | null;
2269
+ created_at?: string;
2270
+ customer_country?: string | null;
2271
+ customer_id?: string;
2272
+ id?: number;
2273
+ is_good_plan?: boolean | null;
2274
+ last_stripe_event_at?: string | null;
1267
2275
  mau_exceeded?: boolean | null;
2276
+ paid_at?: string | null;
1268
2277
  plan_calculated_at?: string | null;
1269
2278
  plan_usage?: number | null;
1270
2279
  price_id?: string | null;
@@ -1274,9 +2283,9 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
1274
2283
  subscription_anchor_end?: string;
1275
2284
  subscription_anchor_start?: string;
1276
2285
  subscription_id?: string | null;
1277
- subscription_metered?: import("./types/supabase.types").Json;
1278
2286
  trial_at?: string;
1279
2287
  updated_at?: string;
2288
+ upgraded_at?: string | null;
1280
2289
  };
1281
2290
  Relationships: [{
1282
2291
  foreignKeyName: "stripe_info_product_id_fkey";
@@ -1297,6 +2306,7 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
1297
2306
  invite_magic_string: string;
1298
2307
  last_name: string;
1299
2308
  org_id: string;
2309
+ rbac_role_name: string | null;
1300
2310
  role: Database["public"]["Enums"]["user_min_right"];
1301
2311
  updated_at: string;
1302
2312
  };
@@ -1310,6 +2320,7 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
1310
2320
  invite_magic_string?: string;
1311
2321
  last_name: string;
1312
2322
  org_id: string;
2323
+ rbac_role_name?: string | null;
1313
2324
  role: Database["public"]["Enums"]["user_min_right"];
1314
2325
  updated_at?: string;
1315
2326
  };
@@ -1323,6 +2334,7 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
1323
2334
  invite_magic_string?: string;
1324
2335
  last_name?: string;
1325
2336
  org_id?: string;
2337
+ rbac_role_name?: string | null;
1326
2338
  role?: Database["public"]["Enums"]["user_min_right"];
1327
2339
  updated_at?: string;
1328
2340
  };
@@ -1556,12 +2568,71 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
1556
2568
  referencedColumns: ["id"];
1557
2569
  }];
1558
2570
  };
2571
+ user_password_compliance: {
2572
+ Row: {
2573
+ created_at: string;
2574
+ id: number;
2575
+ org_id: string;
2576
+ policy_hash: string;
2577
+ updated_at: string;
2578
+ user_id: string;
2579
+ validated_at: string;
2580
+ };
2581
+ Insert: {
2582
+ created_at?: string;
2583
+ id?: number;
2584
+ org_id: string;
2585
+ policy_hash: string;
2586
+ updated_at?: string;
2587
+ user_id: string;
2588
+ validated_at?: string;
2589
+ };
2590
+ Update: {
2591
+ created_at?: string;
2592
+ id?: number;
2593
+ org_id?: string;
2594
+ policy_hash?: string;
2595
+ updated_at?: string;
2596
+ user_id?: string;
2597
+ validated_at?: string;
2598
+ };
2599
+ Relationships: [{
2600
+ foreignKeyName: "user_password_compliance_org_id_fkey";
2601
+ columns: ["org_id"];
2602
+ isOneToOne: false;
2603
+ referencedRelation: "orgs";
2604
+ referencedColumns: ["id"];
2605
+ }];
2606
+ };
2607
+ user_security: {
2608
+ Row: {
2609
+ created_at: string;
2610
+ email_otp_verified_at: string | null;
2611
+ updated_at: string;
2612
+ user_id: string;
2613
+ };
2614
+ Insert: {
2615
+ created_at?: string;
2616
+ email_otp_verified_at?: string | null;
2617
+ updated_at?: string;
2618
+ user_id: string;
2619
+ };
2620
+ Update: {
2621
+ created_at?: string;
2622
+ email_otp_verified_at?: string | null;
2623
+ updated_at?: string;
2624
+ user_id?: string;
2625
+ };
2626
+ Relationships: [];
2627
+ };
1559
2628
  users: {
1560
2629
  Row: {
1561
2630
  ban_time: string | null;
1562
2631
  country: string | null;
1563
2632
  created_at: string | null;
2633
+ created_via_invite: boolean;
1564
2634
  email: string;
2635
+ email_preferences: import("./types/supabase.types").Json;
1565
2636
  enable_notifications: boolean;
1566
2637
  first_name: string | null;
1567
2638
  id: string;
@@ -1574,7 +2645,9 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
1574
2645
  ban_time?: string | null;
1575
2646
  country?: string | null;
1576
2647
  created_at?: string | null;
2648
+ created_via_invite?: boolean;
1577
2649
  email: string;
2650
+ email_preferences?: import("./types/supabase.types").Json;
1578
2651
  enable_notifications?: boolean;
1579
2652
  first_name?: string | null;
1580
2653
  id: string;
@@ -1587,7 +2660,9 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
1587
2660
  ban_time?: string | null;
1588
2661
  country?: string | null;
1589
2662
  created_at?: string | null;
2663
+ created_via_invite?: boolean;
1590
2664
  email?: string;
2665
+ email_preferences?: import("./types/supabase.types").Json;
1591
2666
  enable_notifications?: boolean;
1592
2667
  first_name?: string | null;
1593
2668
  id?: string;
@@ -1624,52 +2699,195 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
1624
2699
  action: Database["public"]["Enums"]["version_action"];
1625
2700
  app_id: string;
1626
2701
  timestamp: string;
1627
- version_id: number;
2702
+ version_id: number | null;
2703
+ version_name: string | null;
1628
2704
  };
1629
2705
  Insert: {
1630
2706
  action: Database["public"]["Enums"]["version_action"];
1631
2707
  app_id: string;
1632
2708
  timestamp?: string;
1633
- version_id: number;
2709
+ version_id?: number | null;
2710
+ version_name?: string | null;
1634
2711
  };
1635
2712
  Update: {
1636
2713
  action?: Database["public"]["Enums"]["version_action"];
1637
2714
  app_id?: string;
1638
2715
  timestamp?: string;
1639
- version_id?: number;
2716
+ version_id?: number | null;
2717
+ version_name?: string | null;
1640
2718
  };
1641
2719
  Relationships: [];
1642
2720
  };
1643
- };
1644
- Views: {
1645
- usage_credit_balances: {
2721
+ webhook_deliveries: {
1646
2722
  Row: {
1647
- available_credits: number | null;
1648
- next_expiration: string | null;
1649
- org_id: string | null;
1650
- total_credits: number | null;
2723
+ attempt_count: number;
2724
+ audit_log_id: number | null;
2725
+ completed_at: string | null;
2726
+ created_at: string;
2727
+ duration_ms: number | null;
2728
+ event_type: string;
2729
+ id: string;
2730
+ max_attempts: number;
2731
+ next_retry_at: string | null;
2732
+ org_id: string;
2733
+ request_payload: import("./types/supabase.types").Json;
2734
+ response_body: string | null;
2735
+ response_headers: import("./types/supabase.types").Json | null;
2736
+ response_status: number | null;
2737
+ status: string;
2738
+ webhook_id: string;
2739
+ };
2740
+ Insert: {
2741
+ attempt_count?: number;
2742
+ audit_log_id?: number | null;
2743
+ completed_at?: string | null;
2744
+ created_at?: string;
2745
+ duration_ms?: number | null;
2746
+ event_type: string;
2747
+ id?: string;
2748
+ max_attempts?: number;
2749
+ next_retry_at?: string | null;
2750
+ org_id: string;
2751
+ request_payload: import("./types/supabase.types").Json;
2752
+ response_body?: string | null;
2753
+ response_headers?: import("./types/supabase.types").Json | null;
2754
+ response_status?: number | null;
2755
+ status?: string;
2756
+ webhook_id: string;
2757
+ };
2758
+ Update: {
2759
+ attempt_count?: number;
2760
+ audit_log_id?: number | null;
2761
+ completed_at?: string | null;
2762
+ created_at?: string;
2763
+ duration_ms?: number | null;
2764
+ event_type?: string;
2765
+ id?: string;
2766
+ max_attempts?: number;
2767
+ next_retry_at?: string | null;
2768
+ org_id?: string;
2769
+ request_payload?: import("./types/supabase.types").Json;
2770
+ response_body?: string | null;
2771
+ response_headers?: import("./types/supabase.types").Json | null;
2772
+ response_status?: number | null;
2773
+ status?: string;
2774
+ webhook_id?: string;
1651
2775
  };
1652
2776
  Relationships: [{
1653
- foreignKeyName: "usage_credit_grants_org_id_fkey";
2777
+ foreignKeyName: "webhook_deliveries_org_id_fkey";
1654
2778
  columns: ["org_id"];
1655
2779
  isOneToOne: false;
1656
2780
  referencedRelation: "orgs";
1657
2781
  referencedColumns: ["id"];
2782
+ }, {
2783
+ foreignKeyName: "webhook_deliveries_webhook_id_fkey";
2784
+ columns: ["webhook_id"];
2785
+ isOneToOne: false;
2786
+ referencedRelation: "webhooks";
2787
+ referencedColumns: ["id"];
1658
2788
  }];
1659
2789
  };
1660
- };
1661
- Functions: {
1662
- accept_invitation_to_org: {
1663
- Args: {
2790
+ webhooks: {
2791
+ Row: {
2792
+ created_at: string;
2793
+ created_by: string;
2794
+ enabled: boolean;
2795
+ events: string[];
2796
+ id: string;
2797
+ name: string;
1664
2798
  org_id: string;
2799
+ secret: string;
2800
+ updated_at: string;
2801
+ url: string;
1665
2802
  };
1666
- Returns: string;
1667
- };
1668
- apply_usage_overage: {
1669
- Args: {
1670
- p_billing_cycle_end: string;
1671
- p_billing_cycle_start: string;
1672
- p_details?: import("./types/supabase.types").Json;
2803
+ Insert: {
2804
+ created_at?: string;
2805
+ created_by: string;
2806
+ enabled?: boolean;
2807
+ events: string[];
2808
+ id?: string;
2809
+ name: string;
2810
+ org_id: string;
2811
+ secret?: string;
2812
+ updated_at?: string;
2813
+ url: string;
2814
+ };
2815
+ Update: {
2816
+ created_at?: string;
2817
+ created_by?: string;
2818
+ enabled?: boolean;
2819
+ events?: string[];
2820
+ id?: string;
2821
+ name?: string;
2822
+ org_id?: string;
2823
+ secret?: string;
2824
+ updated_at?: string;
2825
+ url?: string;
2826
+ };
2827
+ Relationships: [{
2828
+ foreignKeyName: "webhooks_created_by_fkey";
2829
+ columns: ["created_by"];
2830
+ isOneToOne: false;
2831
+ referencedRelation: "users";
2832
+ referencedColumns: ["id"];
2833
+ }, {
2834
+ foreignKeyName: "webhooks_org_id_fkey";
2835
+ columns: ["org_id"];
2836
+ isOneToOne: false;
2837
+ referencedRelation: "orgs";
2838
+ referencedColumns: ["id"];
2839
+ }];
2840
+ };
2841
+ };
2842
+ Views: {
2843
+ usage_credit_balances: {
2844
+ Row: {
2845
+ available_credits: number | null;
2846
+ next_expiration: string | null;
2847
+ org_id: string | null;
2848
+ total_credits: number | null;
2849
+ };
2850
+ Relationships: [{
2851
+ foreignKeyName: "usage_credit_grants_org_id_fkey";
2852
+ columns: ["org_id"];
2853
+ isOneToOne: false;
2854
+ referencedRelation: "orgs";
2855
+ referencedColumns: ["id"];
2856
+ }];
2857
+ };
2858
+ usage_credit_ledger: {
2859
+ Row: {
2860
+ amount: number | null;
2861
+ balance_after: number | null;
2862
+ billing_cycle_end: string | null;
2863
+ billing_cycle_start: string | null;
2864
+ description: string | null;
2865
+ details: import("./types/supabase.types").Json | null;
2866
+ grant_allocations: import("./types/supabase.types").Json | null;
2867
+ id: number | null;
2868
+ metric: Database["public"]["Enums"]["credit_metric_type"] | null;
2869
+ occurred_at: string | null;
2870
+ org_id: string | null;
2871
+ overage_amount: number | null;
2872
+ overage_event_id: string | null;
2873
+ source_ref: import("./types/supabase.types").Json | null;
2874
+ transaction_type: Database["public"]["Enums"]["credit_transaction_type"] | null;
2875
+ };
2876
+ Relationships: [];
2877
+ };
2878
+ };
2879
+ Functions: {
2880
+ accept_invitation_to_org: {
2881
+ Args: {
2882
+ org_id: string;
2883
+ };
2884
+ Returns: string;
2885
+ };
2886
+ apply_usage_overage: {
2887
+ Args: {
2888
+ p_billing_cycle_end: string;
2889
+ p_billing_cycle_start: string;
2890
+ p_details?: import("./types/supabase.types").Json;
1673
2891
  p_metric: Database["public"]["Enums"]["credit_metric_type"];
1674
2892
  p_org_id: string;
1675
2893
  p_overage_amount: number;
@@ -1685,6 +2903,10 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
1685
2903
  overage_unpaid: number;
1686
2904
  }[];
1687
2905
  };
2906
+ audit_logs_allowed_orgs: {
2907
+ Args: never;
2908
+ Returns: string[];
2909
+ };
1688
2910
  calculate_credit_cost: {
1689
2911
  Args: {
1690
2912
  p_metric: Database["public"]["Enums"]["credit_metric_type"];
@@ -1696,6 +2918,49 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
1696
2918
  credits_required: number;
1697
2919
  }[];
1698
2920
  };
2921
+ calculate_org_metrics_cache_entry: {
2922
+ Args: {
2923
+ p_end_date: string;
2924
+ p_org_id: string;
2925
+ p_start_date: string;
2926
+ };
2927
+ Returns: {
2928
+ bandwidth: number;
2929
+ build_time_unit: number;
2930
+ cached_at: string;
2931
+ end_date: string;
2932
+ fail: number;
2933
+ get: number;
2934
+ install: number;
2935
+ mau: number;
2936
+ org_id: string;
2937
+ start_date: string;
2938
+ storage: number;
2939
+ uninstall: number;
2940
+ };
2941
+ SetofOptions: {
2942
+ from: "*";
2943
+ to: "org_metrics_cache";
2944
+ isOneToOne: true;
2945
+ isSetofReturn: false;
2946
+ };
2947
+ };
2948
+ check_apikey_hashed_key_enforcement: {
2949
+ Args: {
2950
+ apikey_row: Database["public"]["Tables"]["apikeys"]["Row"];
2951
+ };
2952
+ Returns: boolean;
2953
+ };
2954
+ check_domain_sso: {
2955
+ Args: {
2956
+ p_domain: string;
2957
+ };
2958
+ Returns: {
2959
+ has_sso: boolean;
2960
+ org_id: string;
2961
+ provider_id: string;
2962
+ }[];
2963
+ };
1699
2964
  check_min_rights: {
1700
2965
  Args: {
1701
2966
  app_id: string;
@@ -1714,20 +2979,119 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
1714
2979
  };
1715
2980
  Returns: boolean;
1716
2981
  };
2982
+ check_min_rights_legacy: {
2983
+ Args: {
2984
+ app_id: string;
2985
+ channel_id: number;
2986
+ min_right: Database["public"]["Enums"]["user_min_right"];
2987
+ org_id: string;
2988
+ user_id: string;
2989
+ };
2990
+ Returns: boolean;
2991
+ };
2992
+ check_min_rights_legacy_no_password_policy: {
2993
+ Args: {
2994
+ app_id: string;
2995
+ channel_id: number;
2996
+ min_right: Database["public"]["Enums"]["user_min_right"];
2997
+ org_id: string;
2998
+ user_id: string;
2999
+ };
3000
+ Returns: boolean;
3001
+ };
3002
+ check_org_encrypted_bundle_enforcement: {
3003
+ Args: {
3004
+ org_id: string;
3005
+ session_key: string;
3006
+ };
3007
+ Returns: boolean;
3008
+ };
3009
+ check_org_hashed_key_enforcement: {
3010
+ Args: {
3011
+ apikey_row: Database["public"]["Tables"]["apikeys"]["Row"];
3012
+ org_id: string;
3013
+ };
3014
+ Returns: boolean;
3015
+ };
3016
+ check_org_members_2fa_enabled: {
3017
+ Args: {
3018
+ org_id: string;
3019
+ };
3020
+ Returns: {
3021
+ "2fa_enabled": boolean;
3022
+ user_id: string;
3023
+ }[];
3024
+ };
3025
+ check_org_members_password_policy: {
3026
+ Args: {
3027
+ org_id: string;
3028
+ };
3029
+ Returns: {
3030
+ email: string;
3031
+ first_name: string;
3032
+ last_name: string;
3033
+ password_policy_compliant: boolean;
3034
+ user_id: string;
3035
+ }[];
3036
+ };
1717
3037
  check_revert_to_builtin_version: {
1718
3038
  Args: {
1719
3039
  appid: string;
1720
3040
  };
1721
- Returns: number;
3041
+ Returns: number | null;
3042
+ };
3043
+ cleanup_expired_apikeys: {
3044
+ Args: never;
3045
+ Returns: undefined;
3046
+ };
3047
+ cleanup_expired_demo_apps: {
3048
+ Args: never;
3049
+ Returns: undefined;
1722
3050
  };
1723
3051
  cleanup_frequent_job_details: {
1724
3052
  Args: never;
1725
3053
  Returns: undefined;
1726
3054
  };
3055
+ cleanup_job_run_details_7days: {
3056
+ Args: never;
3057
+ Returns: undefined;
3058
+ };
3059
+ cleanup_old_audit_logs: {
3060
+ Args: never;
3061
+ Returns: undefined;
3062
+ };
3063
+ cleanup_old_channel_devices: {
3064
+ Args: never;
3065
+ Returns: undefined;
3066
+ };
1727
3067
  cleanup_queue_messages: {
1728
3068
  Args: never;
1729
3069
  Returns: undefined;
1730
3070
  };
3071
+ cleanup_tmp_users: {
3072
+ Args: never;
3073
+ Returns: undefined;
3074
+ };
3075
+ cleanup_webhook_deliveries: {
3076
+ Args: never;
3077
+ Returns: undefined;
3078
+ };
3079
+ clear_onboarding_app_data: {
3080
+ Args: {
3081
+ p_app_uuid: string;
3082
+ };
3083
+ Returns: undefined;
3084
+ };
3085
+ cli_check_permission: {
3086
+ Args: {
3087
+ apikey: string;
3088
+ app_id?: string;
3089
+ channel_id?: number;
3090
+ org_id?: string;
3091
+ permission_key: string;
3092
+ };
3093
+ Returns: boolean;
3094
+ };
1731
3095
  convert_bytes_to_gb: {
1732
3096
  Args: {
1733
3097
  bytes_value: number;
@@ -1780,6 +3144,80 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
1780
3144
  plan_name: string;
1781
3145
  }[];
1782
3146
  };
3147
+ count_non_compliant_bundles: {
3148
+ Args: {
3149
+ org_id: string;
3150
+ required_key?: string;
3151
+ };
3152
+ Returns: {
3153
+ non_encrypted_count: number;
3154
+ total_non_compliant: number;
3155
+ wrong_key_count: number;
3156
+ }[];
3157
+ };
3158
+ create_hashed_apikey: {
3159
+ Args: {
3160
+ p_expires_at: string;
3161
+ p_limited_to_apps: string[];
3162
+ p_limited_to_orgs: string[];
3163
+ p_mode: Database["public"]["Enums"]["key_mode"];
3164
+ p_name: string;
3165
+ };
3166
+ Returns: {
3167
+ created_at: string | null;
3168
+ expires_at: string | null;
3169
+ id: number;
3170
+ key: string | null;
3171
+ key_hash: string | null;
3172
+ limited_to_apps: string[] | null;
3173
+ limited_to_orgs: string[] | null;
3174
+ mode: Database["public"]["Enums"]["key_mode"];
3175
+ name: string;
3176
+ rbac_id: string;
3177
+ updated_at: string | null;
3178
+ user_id: string;
3179
+ };
3180
+ SetofOptions: {
3181
+ from: "*";
3182
+ to: "apikeys";
3183
+ isOneToOne: true;
3184
+ isSetofReturn: false;
3185
+ };
3186
+ };
3187
+ create_hashed_apikey_for_user: {
3188
+ Args: {
3189
+ p_expires_at: string;
3190
+ p_limited_to_apps: string[];
3191
+ p_limited_to_orgs: string[];
3192
+ p_mode: Database["public"]["Enums"]["key_mode"];
3193
+ p_name: string;
3194
+ p_user_id: string;
3195
+ };
3196
+ Returns: {
3197
+ created_at: string | null;
3198
+ expires_at: string | null;
3199
+ id: number;
3200
+ key: string | null;
3201
+ key_hash: string | null;
3202
+ limited_to_apps: string[] | null;
3203
+ limited_to_orgs: string[] | null;
3204
+ mode: Database["public"]["Enums"]["key_mode"];
3205
+ name: string;
3206
+ rbac_id: string;
3207
+ updated_at: string | null;
3208
+ user_id: string;
3209
+ };
3210
+ SetofOptions: {
3211
+ from: "*";
3212
+ to: "apikeys";
3213
+ isOneToOne: true;
3214
+ isSetofReturn: false;
3215
+ };
3216
+ };
3217
+ current_request_role: {
3218
+ Args: never;
3219
+ Returns: string;
3220
+ };
1783
3221
  delete_accounts_marked_for_deletion: {
1784
3222
  Args: never;
1785
3223
  Returns: {
@@ -1787,16 +3225,40 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
1787
3225
  deleted_user_ids: string[];
1788
3226
  }[];
1789
3227
  };
3228
+ delete_group_with_bindings: {
3229
+ Args: {
3230
+ group_id: string;
3231
+ };
3232
+ Returns: undefined;
3233
+ };
1790
3234
  delete_http_response: {
1791
3235
  Args: {
1792
3236
  request_id: number;
1793
3237
  };
1794
3238
  Returns: undefined;
1795
3239
  };
3240
+ delete_non_compliant_bundles: {
3241
+ Args: {
3242
+ org_id: string;
3243
+ required_key?: string;
3244
+ };
3245
+ Returns: number;
3246
+ };
1796
3247
  delete_old_deleted_apps: {
1797
3248
  Args: never;
1798
3249
  Returns: undefined;
1799
3250
  };
3251
+ delete_old_deleted_versions: {
3252
+ Args: never;
3253
+ Returns: undefined;
3254
+ };
3255
+ delete_org_member_role: {
3256
+ Args: {
3257
+ p_org_id: string;
3258
+ p_user_id: string;
3259
+ };
3260
+ Returns: string;
3261
+ };
1800
3262
  delete_user: {
1801
3263
  Args: never;
1802
3264
  Returns: undefined;
@@ -1825,17 +3287,44 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
1825
3287
  Args: never;
1826
3288
  Returns: number;
1827
3289
  };
1828
- find_best_plan_v3: {
3290
+ find_apikey_by_value: {
1829
3291
  Args: {
1830
- bandwidth: number;
1831
- mau: number;
1832
- storage: number;
3292
+ key_value: string;
1833
3293
  };
1834
- Returns: string;
1835
- };
1836
- find_fit_plan_v3: {
1837
- Args: {
1838
- bandwidth: number;
3294
+ Returns: {
3295
+ created_at: string | null;
3296
+ expires_at: string | null;
3297
+ id: number;
3298
+ key: string | null;
3299
+ key_hash: string | null;
3300
+ limited_to_apps: string[] | null;
3301
+ limited_to_orgs: string[] | null;
3302
+ mode: Database["public"]["Enums"]["key_mode"];
3303
+ name: string;
3304
+ rbac_id: string;
3305
+ updated_at: string | null;
3306
+ user_id: string;
3307
+ }[];
3308
+ SetofOptions: {
3309
+ from: "*";
3310
+ to: "apikeys";
3311
+ isOneToOne: false;
3312
+ isSetofReturn: true;
3313
+ };
3314
+ };
3315
+ find_best_plan_v3: {
3316
+ Args: {
3317
+ bandwidth: number;
3318
+ build_time_unit?: number;
3319
+ mau: number;
3320
+ storage: number;
3321
+ };
3322
+ Returns: string;
3323
+ };
3324
+ find_fit_plan_v3: {
3325
+ Args: {
3326
+ bandwidth: number;
3327
+ build_time_unit?: number;
1839
3328
  mau: number;
1840
3329
  storage: number;
1841
3330
  };
@@ -1844,9 +3333,7 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
1844
3333
  }[];
1845
3334
  };
1846
3335
  get_account_removal_date: {
1847
- Args: {
1848
- user_id: string;
1849
- };
3336
+ Args: never;
1850
3337
  Returns: string;
1851
3338
  };
1852
3339
  get_apikey: {
@@ -1857,6 +3344,25 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
1857
3344
  Args: never;
1858
3345
  Returns: string;
1859
3346
  };
3347
+ get_app_access_rbac: {
3348
+ Args: {
3349
+ p_app_id: string;
3350
+ };
3351
+ Returns: {
3352
+ expires_at: string;
3353
+ granted_at: string;
3354
+ granted_by: string;
3355
+ id: string;
3356
+ is_direct: boolean;
3357
+ principal_id: string;
3358
+ principal_name: string;
3359
+ principal_type: string;
3360
+ reason: string;
3361
+ role_description: string;
3362
+ role_id: string;
3363
+ role_name: string;
3364
+ }[];
3365
+ };
1860
3366
  get_app_metrics: {
1861
3367
  Args: {
1862
3368
  org_id: string;
@@ -1864,6 +3370,25 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
1864
3370
  Returns: {
1865
3371
  app_id: string;
1866
3372
  bandwidth: number;
3373
+ build_time_unit: number;
3374
+ date: string;
3375
+ fail: number;
3376
+ get: number;
3377
+ install: number;
3378
+ mau: number;
3379
+ storage: number;
3380
+ uninstall: number;
3381
+ }[];
3382
+ } | {
3383
+ Args: {
3384
+ end_date: string;
3385
+ org_id: string;
3386
+ start_date: string;
3387
+ };
3388
+ Returns: {
3389
+ app_id: string;
3390
+ bandwidth: number;
3391
+ build_time_unit: number;
1867
3392
  date: string;
1868
3393
  fail: number;
1869
3394
  get: number;
@@ -1874,6 +3399,7 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
1874
3399
  }[];
1875
3400
  } | {
1876
3401
  Args: {
3402
+ p_app_id: string;
1877
3403
  p_end_date: string;
1878
3404
  p_org_id: string;
1879
3405
  p_start_date: string;
@@ -1881,6 +3407,7 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
1881
3407
  Returns: {
1882
3408
  app_id: string;
1883
3409
  bandwidth: number;
3410
+ build_time_unit: number;
1884
3411
  date: string;
1885
3412
  fail: number;
1886
3413
  get: number;
@@ -1904,6 +3431,7 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
1904
3431
  };
1905
3432
  Returns: {
1906
3433
  bandwidth: number;
3434
+ build_time_unit: number;
1907
3435
  mau: number;
1908
3436
  storage: number;
1909
3437
  }[];
@@ -1931,14 +3459,6 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
1931
3459
  subscription_anchor_start: string;
1932
3460
  }[];
1933
3461
  };
1934
- get_d1_sync_url: {
1935
- Args: never;
1936
- Returns: string;
1937
- };
1938
- get_d1_webhook_signature: {
1939
- Args: never;
1940
- Returns: string;
1941
- };
1942
3462
  get_db_url: {
1943
3463
  Args: never;
1944
3464
  Returns: string;
@@ -1996,6 +3516,13 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
1996
3516
  };
1997
3517
  Returns: string;
1998
3518
  };
3519
+ get_identity_org_allowed_apikey_only: {
3520
+ Args: {
3521
+ keymode: Database["public"]["Enums"]["key_mode"][];
3522
+ org_id: string;
3523
+ };
3524
+ Returns: string;
3525
+ };
1999
3526
  get_identity_org_appid: {
2000
3527
  Args: {
2001
3528
  app_id: string;
@@ -2011,29 +3538,12 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
2011
3538
  Returns: {
2012
3539
  org_logo: string;
2013
3540
  org_name: string;
2014
- role: Database["public"]["Enums"]["user_min_right"];
3541
+ role: string;
2015
3542
  }[];
2016
3543
  };
2017
- get_metered_usage: {
2018
- Args: {
2019
- orgid: string;
2020
- };
2021
- Returns: Database["public"]["CompositeTypes"]["stats_table"];
2022
- SetofOptions: {
2023
- from: "*";
2024
- to: "stats_table";
2025
- isOneToOne: true;
2026
- isSetofReturn: false;
2027
- };
2028
- } | {
3544
+ get_mfa_email_otp_enforced_at: {
2029
3545
  Args: never;
2030
- Returns: Database["public"]["CompositeTypes"]["stats_table"];
2031
- SetofOptions: {
2032
- from: "*";
2033
- to: "stats_table";
2034
- isOneToOne: true;
2035
- isSetofReturn: false;
2036
- };
3546
+ Returns: string;
2037
3547
  };
2038
3548
  get_next_cron_time: {
2039
3549
  Args: {
@@ -2056,10 +3566,37 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
2056
3566
  };
2057
3567
  Returns: string;
2058
3568
  };
3569
+ get_org_apikeys: {
3570
+ Args: {
3571
+ p_org_id: string;
3572
+ };
3573
+ Returns: {
3574
+ created_at: string;
3575
+ expires_at: string;
3576
+ id: number;
3577
+ limited_to_apps: string[];
3578
+ limited_to_orgs: string[];
3579
+ mode: Database["public"]["Enums"]["key_mode"];
3580
+ name: string;
3581
+ owner_email: string;
3582
+ rbac_id: string;
3583
+ user_id: string;
3584
+ }[];
3585
+ };
3586
+ get_org_build_time_unit: {
3587
+ Args: {
3588
+ p_end_date: string;
3589
+ p_org_id: string;
3590
+ p_start_date: string;
3591
+ };
3592
+ Returns: {
3593
+ total_build_time_unit: number;
3594
+ total_builds: number;
3595
+ }[];
3596
+ };
2059
3597
  get_org_members: {
2060
3598
  Args: {
2061
3599
  guild_id: string;
2062
- user_id: string;
2063
3600
  };
2064
3601
  Returns: {
2065
3602
  aid: number;
@@ -2072,6 +3609,7 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
2072
3609
  } | {
2073
3610
  Args: {
2074
3611
  guild_id: string;
3612
+ user_id: string;
2075
3613
  };
2076
3614
  Returns: {
2077
3615
  aid: number;
@@ -2082,6 +3620,23 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
2082
3620
  uid: string;
2083
3621
  }[];
2084
3622
  };
3623
+ get_org_members_rbac: {
3624
+ Args: {
3625
+ p_org_id: string;
3626
+ };
3627
+ Returns: {
3628
+ binding_id: string;
3629
+ email: string;
3630
+ granted_at: string;
3631
+ image_url: string;
3632
+ is_invite: boolean;
3633
+ is_tmp: boolean;
3634
+ org_user_id: number;
3635
+ role_id: string;
3636
+ role_name: string;
3637
+ user_id: string;
3638
+ }[];
3639
+ };
2085
3640
  get_org_owner_id: {
2086
3641
  Args: {
2087
3642
  apikey: string;
@@ -2096,6 +3651,39 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
2096
3651
  };
2097
3652
  Returns: string;
2098
3653
  };
3654
+ get_org_perm_for_apikey_v2: {
3655
+ Args: {
3656
+ apikey: string;
3657
+ app_id: string;
3658
+ };
3659
+ Returns: string;
3660
+ };
3661
+ get_org_user_access_rbac: {
3662
+ Args: {
3663
+ p_org_id: string;
3664
+ p_user_id: string;
3665
+ };
3666
+ Returns: {
3667
+ app_id: string;
3668
+ channel_id: string;
3669
+ expires_at: string;
3670
+ granted_at: string;
3671
+ granted_by: string;
3672
+ group_name: string;
3673
+ id: string;
3674
+ is_direct: boolean;
3675
+ org_id: string;
3676
+ principal_id: string;
3677
+ principal_name: string;
3678
+ principal_type: string;
3679
+ reason: string;
3680
+ role_description: string;
3681
+ role_id: string;
3682
+ role_name: string;
3683
+ scope_type: string;
3684
+ user_email: string;
3685
+ }[];
3686
+ };
2099
3687
  get_organization_cli_warnings: {
2100
3688
  Args: {
2101
3689
  cli_version: string;
@@ -2109,47 +3697,146 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
2109
3697
  app_count: number;
2110
3698
  can_use_more: boolean;
2111
3699
  created_by: string;
3700
+ gid: string;
3701
+ is_canceled: boolean;
3702
+ is_yearly: boolean;
3703
+ logo: string;
3704
+ management_email: string;
3705
+ name: string;
3706
+ paying: boolean;
3707
+ role: string;
3708
+ subscription_end: string;
3709
+ subscription_start: string;
3710
+ trial_left: number;
3711
+ use_new_rbac: boolean;
3712
+ }[];
3713
+ } | {
3714
+ Args: {
3715
+ userid: string;
3716
+ };
3717
+ Returns: {
3718
+ app_count: number;
3719
+ can_use_more: boolean;
3720
+ created_by: string;
3721
+ gid: string;
3722
+ is_canceled: boolean;
3723
+ is_yearly: boolean;
3724
+ logo: string;
3725
+ management_email: string;
3726
+ name: string;
3727
+ paying: boolean;
3728
+ role: string;
3729
+ subscription_end: string;
3730
+ subscription_start: string;
3731
+ trial_left: number;
3732
+ use_new_rbac: boolean;
3733
+ }[];
3734
+ };
3735
+ get_orgs_v7: {
3736
+ Args: never;
3737
+ Returns: {
3738
+ "2fa_has_access": boolean;
3739
+ app_count: number;
3740
+ can_use_more: boolean;
3741
+ created_at: string;
3742
+ created_by: string;
2112
3743
  credit_available: number;
2113
3744
  credit_next_expiration: string;
2114
3745
  credit_total: number;
3746
+ enforce_encrypted_bundles: boolean;
3747
+ enforce_hashed_api_keys: boolean;
3748
+ enforcing_2fa: boolean;
2115
3749
  gid: string;
2116
3750
  is_canceled: boolean;
2117
3751
  is_yearly: boolean;
2118
3752
  logo: string;
2119
3753
  management_email: string;
3754
+ max_apikey_expiration_days: number;
2120
3755
  name: string;
2121
3756
  next_stats_update_at: string;
3757
+ password_has_access: boolean;
3758
+ password_policy_config: import("./types/supabase.types").Json;
2122
3759
  paying: boolean;
3760
+ require_apikey_expiration: boolean;
3761
+ required_encryption_key: string;
2123
3762
  role: string;
3763
+ stats_refresh_requested_at: string;
2124
3764
  stats_updated_at: string;
2125
3765
  subscription_end: string;
2126
3766
  subscription_start: string;
2127
3767
  trial_left: number;
3768
+ use_new_rbac: boolean;
3769
+ website: string;
2128
3770
  }[];
2129
3771
  } | {
2130
3772
  Args: {
2131
3773
  userid: string;
2132
3774
  };
2133
3775
  Returns: {
3776
+ "2fa_has_access": boolean;
2134
3777
  app_count: number;
2135
3778
  can_use_more: boolean;
3779
+ created_at: string;
2136
3780
  created_by: string;
2137
3781
  credit_available: number;
2138
3782
  credit_next_expiration: string;
2139
3783
  credit_total: number;
3784
+ enforce_encrypted_bundles: boolean;
3785
+ enforce_hashed_api_keys: boolean;
3786
+ enforcing_2fa: boolean;
2140
3787
  gid: string;
2141
3788
  is_canceled: boolean;
2142
3789
  is_yearly: boolean;
2143
3790
  logo: string;
2144
3791
  management_email: string;
3792
+ max_apikey_expiration_days: number;
2145
3793
  name: string;
2146
3794
  next_stats_update_at: string;
3795
+ password_has_access: boolean;
3796
+ password_policy_config: import("./types/supabase.types").Json;
2147
3797
  paying: boolean;
3798
+ require_apikey_expiration: boolean;
3799
+ required_encryption_key: string;
2148
3800
  role: string;
3801
+ stats_refresh_requested_at: string;
2149
3802
  stats_updated_at: string;
2150
3803
  subscription_end: string;
2151
3804
  subscription_start: string;
2152
3805
  trial_left: number;
3806
+ use_new_rbac: boolean;
3807
+ website: string;
3808
+ }[];
3809
+ };
3810
+ get_password_policy_hash: {
3811
+ Args: {
3812
+ policy_config: import("./types/supabase.types").Json;
3813
+ };
3814
+ Returns: string;
3815
+ };
3816
+ get_plan_usage_and_fit: {
3817
+ Args: {
3818
+ orgid: string;
3819
+ };
3820
+ Returns: {
3821
+ bandwidth_percent: number;
3822
+ build_time_percent: number;
3823
+ is_good_plan: boolean;
3824
+ mau_percent: number;
3825
+ storage_percent: number;
3826
+ total_percent: number;
3827
+ }[];
3828
+ };
3829
+ get_plan_usage_and_fit_uncached: {
3830
+ Args: {
3831
+ orgid: string;
3832
+ };
3833
+ Returns: {
3834
+ bandwidth_percent: number;
3835
+ build_time_percent: number;
3836
+ is_good_plan: boolean;
3837
+ mau_percent: number;
3838
+ storage_percent: number;
3839
+ total_percent: number;
2153
3840
  }[];
2154
3841
  };
2155
3842
  get_plan_usage_percent_detailed: {
@@ -2158,6 +3845,7 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
2158
3845
  };
2159
3846
  Returns: {
2160
3847
  bandwidth_percent: number;
3848
+ build_time_percent: number;
2161
3849
  mau_percent: number;
2162
3850
  storage_percent: number;
2163
3851
  total_percent: number;
@@ -2170,16 +3858,19 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
2170
3858
  };
2171
3859
  Returns: {
2172
3860
  bandwidth_percent: number;
3861
+ build_time_percent: number;
2173
3862
  mau_percent: number;
2174
3863
  storage_percent: number;
2175
3864
  total_percent: number;
2176
3865
  }[];
2177
3866
  };
2178
- get_process_cron_stats_job_info: {
2179
- Args: never;
3867
+ get_sso_enforcement_by_domain: {
3868
+ Args: {
3869
+ p_domain: string;
3870
+ };
2180
3871
  Returns: {
2181
- last_run: string;
2182
- next_run: string;
3872
+ enforce_sso: boolean;
3873
+ org_id: string;
2183
3874
  }[];
2184
3875
  };
2185
3876
  get_total_app_storage_size_orgs: {
@@ -2190,11 +3881,24 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
2190
3881
  Returns: number;
2191
3882
  };
2192
3883
  get_total_metrics: {
3884
+ Args: never;
3885
+ Returns: {
3886
+ bandwidth: number;
3887
+ build_time_unit: number;
3888
+ fail: number;
3889
+ get: number;
3890
+ install: number;
3891
+ mau: number;
3892
+ storage: number;
3893
+ uninstall: number;
3894
+ }[];
3895
+ } | {
2193
3896
  Args: {
2194
3897
  org_id: string;
2195
3898
  };
2196
3899
  Returns: {
2197
3900
  bandwidth: number;
3901
+ build_time_unit: number;
2198
3902
  fail: number;
2199
3903
  get: number;
2200
3904
  install: number;
@@ -2210,6 +3914,7 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
2210
3914
  };
2211
3915
  Returns: {
2212
3916
  bandwidth: number;
3917
+ build_time_unit: number;
2213
3918
  fail: number;
2214
3919
  get: number;
2215
3920
  install: number;
@@ -2238,12 +3943,12 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
2238
3943
  get_user_id: {
2239
3944
  Args: {
2240
3945
  apikey: string;
2241
- app_id: string;
2242
3946
  };
2243
3947
  Returns: string;
2244
3948
  } | {
2245
3949
  Args: {
2246
3950
  apikey: string;
3951
+ app_id: string;
2247
3952
  };
2248
3953
  Returns: string;
2249
3954
  };
@@ -2259,18 +3964,28 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
2259
3964
  };
2260
3965
  Returns: string;
2261
3966
  };
3967
+ get_user_org_ids: {
3968
+ Args: never;
3969
+ Returns: {
3970
+ org_id: string;
3971
+ }[];
3972
+ };
2262
3973
  get_versions_with_no_metadata: {
2263
3974
  Args: never;
2264
3975
  Returns: {
2265
3976
  app_id: string;
2266
3977
  checksum: string | null;
3978
+ cli_version: string | null;
2267
3979
  comment: string | null;
2268
3980
  created_at: string | null;
2269
3981
  deleted: boolean;
3982
+ deleted_at: string | null;
2270
3983
  external_url: string | null;
2271
3984
  id: number;
3985
+ key_id: string | null;
2272
3986
  link: string | null;
2273
3987
  manifest: Database["public"]["CompositeTypes"]["manifest_entry"][] | null;
3988
+ manifest_count: number;
2274
3989
  min_update_version: string | null;
2275
3990
  name: string;
2276
3991
  native_packages: import("./types/supabase.types").Json[] | null;
@@ -2298,6 +4013,15 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
2298
4013
  open_app: number;
2299
4014
  }[];
2300
4015
  };
4016
+ has_2fa_enabled: {
4017
+ Args: never;
4018
+ Returns: boolean;
4019
+ } | {
4020
+ Args: {
4021
+ user_id: string;
4022
+ };
4023
+ Returns: boolean;
4024
+ };
2301
4025
  has_app_right: {
2302
4026
  Args: {
2303
4027
  appid: string;
@@ -2322,6 +4046,20 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
2322
4046
  };
2323
4047
  Returns: boolean;
2324
4048
  };
4049
+ has_seeded_demo_data: {
4050
+ Args: {
4051
+ p_app_id: string;
4052
+ };
4053
+ Returns: boolean;
4054
+ };
4055
+ internal_request_db_user_names: {
4056
+ Args: never;
4057
+ Returns: string[];
4058
+ };
4059
+ internal_request_role_names: {
4060
+ Args: never;
4061
+ Returns: string[];
4062
+ };
2325
4063
  invite_user_to_org: {
2326
4064
  Args: {
2327
4065
  email: string;
@@ -2330,20 +4068,19 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
2330
4068
  };
2331
4069
  Returns: string;
2332
4070
  };
2333
- is_account_disabled: {
4071
+ invite_user_to_org_rbac: {
2334
4072
  Args: {
2335
- user_id: string;
4073
+ email: string;
4074
+ org_id: string;
4075
+ role_name: string;
2336
4076
  };
2337
- Returns: boolean;
4077
+ Returns: string;
2338
4078
  };
2339
- is_admin: {
4079
+ is_account_disabled: {
2340
4080
  Args: {
2341
- userid: string;
4081
+ user_id: string;
2342
4082
  };
2343
4083
  Returns: boolean;
2344
- } | {
2345
- Args: never;
2346
- Returns: boolean;
2347
4084
  };
2348
4085
  is_allowed_action: {
2349
4086
  Args: {
@@ -2379,21 +4116,27 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
2379
4116
  };
2380
4117
  Returns: boolean;
2381
4118
  };
2382
- is_app_owner: {
4119
+ is_apikey_expired: {
2383
4120
  Args: {
2384
- apikey: string;
2385
- appid: string;
4121
+ key_expires_at: string;
4122
+ };
4123
+ Returns: boolean;
4124
+ };
4125
+ is_app_owner: {
4126
+ Args: {
4127
+ apikey: string;
4128
+ appid: string;
2386
4129
  };
2387
4130
  Returns: boolean;
2388
4131
  } | {
2389
4132
  Args: {
2390
4133
  appid: string;
2391
- userid: string;
2392
4134
  };
2393
4135
  Returns: boolean;
2394
4136
  } | {
2395
4137
  Args: {
2396
4138
  appid: string;
4139
+ userid: string;
2397
4140
  };
2398
4141
  Returns: boolean;
2399
4142
  };
@@ -2403,6 +4146,18 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
2403
4146
  };
2404
4147
  Returns: boolean;
2405
4148
  };
4149
+ is_build_time_exceeded_by_org: {
4150
+ Args: {
4151
+ org_id: string;
4152
+ };
4153
+ Returns: boolean;
4154
+ };
4155
+ is_bundle_encrypted: {
4156
+ Args: {
4157
+ session_key: string;
4158
+ };
4159
+ Returns: boolean;
4160
+ };
2406
4161
  is_canceled_org: {
2407
4162
  Args: {
2408
4163
  orgid: string;
@@ -2415,6 +4170,12 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
2415
4170
  };
2416
4171
  Returns: boolean;
2417
4172
  };
4173
+ is_internal_request_role: {
4174
+ Args: {
4175
+ caller_role: string;
4176
+ };
4177
+ Returns: boolean;
4178
+ };
2418
4179
  is_mau_exceeded_by_org: {
2419
4180
  Args: {
2420
4181
  org_id: string;
@@ -2458,13 +4219,6 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
2458
4219
  };
2459
4220
  Returns: boolean;
2460
4221
  };
2461
- is_owner_of_org: {
2462
- Args: {
2463
- org_id: string;
2464
- user_id: string;
2465
- };
2466
- Returns: boolean;
2467
- };
2468
4222
  is_paying_and_good_plan_org: {
2469
4223
  Args: {
2470
4224
  orgid: string;
@@ -2484,6 +4238,25 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
2484
4238
  };
2485
4239
  Returns: boolean;
2486
4240
  };
4241
+ is_platform_admin: {
4242
+ Args: never;
4243
+ Returns: boolean;
4244
+ } | {
4245
+ Args: {
4246
+ userid: string;
4247
+ };
4248
+ Returns: boolean;
4249
+ };
4250
+ is_rbac_enabled_globally: {
4251
+ Args: never;
4252
+ Returns: boolean;
4253
+ };
4254
+ is_recent_email_otp_verified: {
4255
+ Args: {
4256
+ user_id: string;
4257
+ };
4258
+ Returns: boolean;
4259
+ };
2487
4260
  is_storage_exceeded_by_org: {
2488
4261
  Args: {
2489
4262
  org_id: string;
@@ -2496,6 +4269,26 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
2496
4269
  };
2497
4270
  Returns: number;
2498
4271
  };
4272
+ is_user_app_admin: {
4273
+ Args: {
4274
+ p_app_id: string;
4275
+ p_user_id: string;
4276
+ };
4277
+ Returns: boolean;
4278
+ };
4279
+ is_user_org_admin: {
4280
+ Args: {
4281
+ p_org_id: string;
4282
+ p_user_id: string;
4283
+ };
4284
+ Returns: boolean;
4285
+ };
4286
+ mark_app_stats_refreshed: {
4287
+ Args: {
4288
+ p_app_id: string;
4289
+ };
4290
+ Returns: string;
4291
+ };
2499
4292
  mass_edit_queue_messages_cf_ids: {
2500
4293
  Args: {
2501
4294
  updates: Database["public"]["CompositeTypes"]["message_update"][];
@@ -2543,69 +4336,511 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
2543
4336
  Args: never;
2544
4337
  Returns: undefined;
2545
4338
  };
4339
+ process_billing_period_stats_email: {
4340
+ Args: never;
4341
+ Returns: undefined;
4342
+ };
2546
4343
  process_channel_device_counts_queue: {
2547
4344
  Args: {
2548
4345
  batch_size?: number;
2549
4346
  };
2550
4347
  Returns: number;
2551
4348
  };
2552
- process_cron_stats_jobs: {
4349
+ process_cron_stats_jobs: {
4350
+ Args: never;
4351
+ Returns: undefined;
4352
+ };
4353
+ process_cron_sync_sub_jobs: {
4354
+ Args: never;
4355
+ Returns: undefined;
4356
+ };
4357
+ process_daily_fail_ratio_email: {
4358
+ Args: never;
4359
+ Returns: undefined;
4360
+ };
4361
+ process_deploy_install_stats_email: {
4362
+ Args: never;
4363
+ Returns: undefined;
4364
+ };
4365
+ process_failed_uploads: {
4366
+ Args: never;
4367
+ Returns: undefined;
4368
+ };
4369
+ process_free_trial_expired: {
4370
+ Args: never;
4371
+ Returns: undefined;
4372
+ };
4373
+ process_function_queue: {
4374
+ Args: {
4375
+ batch_size?: number;
4376
+ queue_name: string;
4377
+ };
4378
+ Returns: undefined;
4379
+ } | {
4380
+ Args: {
4381
+ batch_size?: number;
4382
+ queue_names: string[];
4383
+ };
4384
+ Returns: undefined;
4385
+ };
4386
+ process_stats_email_monthly: {
4387
+ Args: never;
4388
+ Returns: undefined;
4389
+ };
4390
+ process_stats_email_weekly: {
4391
+ Args: never;
4392
+ Returns: undefined;
4393
+ };
4394
+ process_subscribed_orgs: {
4395
+ Args: never;
4396
+ Returns: undefined;
4397
+ };
4398
+ queue_cron_stat_app_for_app: {
4399
+ Args: {
4400
+ p_app_id: string;
4401
+ p_org_id?: string;
4402
+ };
4403
+ Returns: undefined;
4404
+ };
4405
+ queue_cron_stat_org_for_org: {
4406
+ Args: {
4407
+ customer_id: string;
4408
+ org_id: string;
4409
+ };
4410
+ Returns: undefined;
4411
+ };
4412
+ rbac_check_permission: {
4413
+ Args: {
4414
+ p_app_id?: string;
4415
+ p_channel_id?: number;
4416
+ p_org_id?: string;
4417
+ p_permission_key: string;
4418
+ };
4419
+ Returns: boolean;
4420
+ };
4421
+ rbac_check_permission_direct: {
4422
+ Args: {
4423
+ p_apikey?: string;
4424
+ p_app_id: string;
4425
+ p_channel_id: number;
4426
+ p_org_id: string;
4427
+ p_permission_key: string;
4428
+ p_user_id: string;
4429
+ };
4430
+ Returns: boolean;
4431
+ };
4432
+ rbac_check_permission_direct_no_password_policy: {
4433
+ Args: {
4434
+ p_apikey?: string;
4435
+ p_app_id: string;
4436
+ p_channel_id: number;
4437
+ p_org_id: string;
4438
+ p_permission_key: string;
4439
+ p_user_id: string;
4440
+ };
4441
+ Returns: boolean;
4442
+ };
4443
+ rbac_check_permission_no_password_policy: {
4444
+ Args: {
4445
+ p_app_id?: string;
4446
+ p_channel_id?: number;
4447
+ p_org_id?: string;
4448
+ p_permission_key: string;
4449
+ };
4450
+ Returns: boolean;
4451
+ };
4452
+ rbac_check_permission_request: {
4453
+ Args: {
4454
+ p_app_id?: string;
4455
+ p_channel_id?: number;
4456
+ p_org_id?: string;
4457
+ p_permission_key: string;
4458
+ };
4459
+ Returns: boolean;
4460
+ };
4461
+ rbac_enable_for_org: {
4462
+ Args: {
4463
+ p_granted_by?: string;
4464
+ p_org_id: string;
4465
+ };
4466
+ Returns: import("./types/supabase.types").Json;
4467
+ };
4468
+ rbac_has_permission: {
4469
+ Args: {
4470
+ p_app_id: string;
4471
+ p_channel_id: number;
4472
+ p_org_id: string;
4473
+ p_permission_key: string;
4474
+ p_principal_id: string;
4475
+ p_principal_type: string;
4476
+ };
4477
+ Returns: boolean;
4478
+ };
4479
+ rbac_is_enabled_for_org: {
4480
+ Args: {
4481
+ p_org_id: string;
4482
+ };
4483
+ Returns: boolean;
4484
+ };
4485
+ rbac_legacy_right_for_org_role: {
4486
+ Args: {
4487
+ p_role_name: string;
4488
+ };
4489
+ Returns: Database["public"]["Enums"]["user_min_right"];
4490
+ };
4491
+ rbac_legacy_right_for_permission: {
4492
+ Args: {
4493
+ p_permission_key: string;
4494
+ };
4495
+ Returns: Database["public"]["Enums"]["user_min_right"];
4496
+ };
4497
+ rbac_legacy_role_hint: {
4498
+ Args: {
4499
+ p_app_id: string;
4500
+ p_channel_id: number;
4501
+ p_user_right: Database["public"]["Enums"]["user_min_right"];
4502
+ };
4503
+ Returns: string;
4504
+ };
4505
+ rbac_migrate_org_users_to_bindings: {
4506
+ Args: {
4507
+ p_granted_by?: string;
4508
+ p_org_id: string;
4509
+ };
4510
+ Returns: import("./types/supabase.types").Json;
4511
+ };
4512
+ rbac_perm_app_build_native: {
4513
+ Args: never;
4514
+ Returns: string;
4515
+ };
4516
+ rbac_perm_app_create_channel: {
4517
+ Args: never;
4518
+ Returns: string;
4519
+ };
4520
+ rbac_perm_app_delete: {
4521
+ Args: never;
4522
+ Returns: string;
4523
+ };
4524
+ rbac_perm_app_manage_devices: {
4525
+ Args: never;
4526
+ Returns: string;
4527
+ };
4528
+ rbac_perm_app_read: {
4529
+ Args: never;
4530
+ Returns: string;
4531
+ };
4532
+ rbac_perm_app_read_audit: {
4533
+ Args: never;
4534
+ Returns: string;
4535
+ };
4536
+ rbac_perm_app_read_bundles: {
4537
+ Args: never;
4538
+ Returns: string;
4539
+ };
4540
+ rbac_perm_app_read_channels: {
4541
+ Args: never;
4542
+ Returns: string;
4543
+ };
4544
+ rbac_perm_app_read_devices: {
4545
+ Args: never;
4546
+ Returns: string;
4547
+ };
4548
+ rbac_perm_app_read_logs: {
4549
+ Args: never;
4550
+ Returns: string;
4551
+ };
4552
+ rbac_perm_app_transfer: {
4553
+ Args: never;
4554
+ Returns: string;
4555
+ };
4556
+ rbac_perm_app_update_settings: {
4557
+ Args: never;
4558
+ Returns: string;
4559
+ };
4560
+ rbac_perm_app_update_user_roles: {
4561
+ Args: never;
4562
+ Returns: string;
4563
+ };
4564
+ rbac_perm_app_upload_bundle: {
4565
+ Args: never;
4566
+ Returns: string;
4567
+ };
4568
+ rbac_perm_bundle_delete: {
4569
+ Args: never;
4570
+ Returns: string;
4571
+ };
4572
+ rbac_perm_bundle_read: {
4573
+ Args: never;
4574
+ Returns: string;
4575
+ };
4576
+ rbac_perm_bundle_update: {
4577
+ Args: never;
4578
+ Returns: string;
4579
+ };
4580
+ rbac_perm_channel_delete: {
4581
+ Args: never;
4582
+ Returns: string;
4583
+ };
4584
+ rbac_perm_channel_manage_forced_devices: {
4585
+ Args: never;
4586
+ Returns: string;
4587
+ };
4588
+ rbac_perm_channel_promote_bundle: {
4589
+ Args: never;
4590
+ Returns: string;
4591
+ };
4592
+ rbac_perm_channel_read: {
4593
+ Args: never;
4594
+ Returns: string;
4595
+ };
4596
+ rbac_perm_channel_read_audit: {
4597
+ Args: never;
4598
+ Returns: string;
4599
+ };
4600
+ rbac_perm_channel_read_forced_devices: {
4601
+ Args: never;
4602
+ Returns: string;
4603
+ };
4604
+ rbac_perm_channel_read_history: {
4605
+ Args: never;
4606
+ Returns: string;
4607
+ };
4608
+ rbac_perm_channel_rollback_bundle: {
4609
+ Args: never;
4610
+ Returns: string;
4611
+ };
4612
+ rbac_perm_channel_update_settings: {
4613
+ Args: never;
4614
+ Returns: string;
4615
+ };
4616
+ rbac_perm_org_create_app: {
4617
+ Args: never;
4618
+ Returns: string;
4619
+ };
4620
+ rbac_perm_org_delete: {
4621
+ Args: never;
4622
+ Returns: string;
4623
+ };
4624
+ rbac_perm_org_invite_user: {
4625
+ Args: never;
4626
+ Returns: string;
4627
+ };
4628
+ rbac_perm_org_read: {
4629
+ Args: never;
4630
+ Returns: string;
4631
+ };
4632
+ rbac_perm_org_read_audit: {
4633
+ Args: never;
4634
+ Returns: string;
4635
+ };
4636
+ rbac_perm_org_read_billing: {
4637
+ Args: never;
4638
+ Returns: string;
4639
+ };
4640
+ rbac_perm_org_read_billing_audit: {
4641
+ Args: never;
4642
+ Returns: string;
4643
+ };
4644
+ rbac_perm_org_read_invoices: {
4645
+ Args: never;
4646
+ Returns: string;
4647
+ };
4648
+ rbac_perm_org_read_members: {
4649
+ Args: never;
4650
+ Returns: string;
4651
+ };
4652
+ rbac_perm_org_update_billing: {
4653
+ Args: never;
4654
+ Returns: string;
4655
+ };
4656
+ rbac_perm_org_update_settings: {
4657
+ Args: never;
4658
+ Returns: string;
4659
+ };
4660
+ rbac_perm_org_update_user_roles: {
4661
+ Args: never;
4662
+ Returns: string;
4663
+ };
4664
+ rbac_perm_platform_db_break_glass: {
4665
+ Args: never;
4666
+ Returns: string;
4667
+ };
4668
+ rbac_perm_platform_delete_orphan_users: {
4669
+ Args: never;
4670
+ Returns: string;
4671
+ };
4672
+ rbac_perm_platform_impersonate_user: {
4673
+ Args: never;
4674
+ Returns: string;
4675
+ };
4676
+ rbac_perm_platform_manage_apps_any: {
4677
+ Args: never;
4678
+ Returns: string;
4679
+ };
4680
+ rbac_perm_platform_manage_channels_any: {
4681
+ Args: never;
4682
+ Returns: string;
4683
+ };
4684
+ rbac_perm_platform_manage_orgs_any: {
4685
+ Args: never;
4686
+ Returns: string;
4687
+ };
4688
+ rbac_perm_platform_read_all_audit: {
4689
+ Args: never;
4690
+ Returns: string;
4691
+ };
4692
+ rbac_perm_platform_run_maintenance_jobs: {
4693
+ Args: never;
4694
+ Returns: string;
4695
+ };
4696
+ rbac_permission_for_legacy: {
4697
+ Args: {
4698
+ p_min_right: Database["public"]["Enums"]["user_min_right"];
4699
+ p_scope: string;
4700
+ };
4701
+ Returns: string;
4702
+ };
4703
+ rbac_preview_migration: {
4704
+ Args: {
4705
+ p_org_id: string;
4706
+ };
4707
+ Returns: {
4708
+ app_id: string;
4709
+ channel_id: number;
4710
+ org_user_id: number;
4711
+ scope_type: string;
4712
+ skip_reason: string;
4713
+ suggested_role: string;
4714
+ user_id: string;
4715
+ user_right: string;
4716
+ will_migrate: boolean;
4717
+ }[];
4718
+ };
4719
+ rbac_principal_apikey: {
4720
+ Args: never;
4721
+ Returns: string;
4722
+ };
4723
+ rbac_principal_group: {
4724
+ Args: never;
4725
+ Returns: string;
4726
+ };
4727
+ rbac_principal_user: {
4728
+ Args: never;
4729
+ Returns: string;
4730
+ };
4731
+ rbac_right_admin: {
4732
+ Args: never;
4733
+ Returns: Database["public"]["Enums"]["user_min_right"];
4734
+ };
4735
+ rbac_right_invite_admin: {
4736
+ Args: never;
4737
+ Returns: Database["public"]["Enums"]["user_min_right"];
4738
+ };
4739
+ rbac_right_invite_super_admin: {
4740
+ Args: never;
4741
+ Returns: Database["public"]["Enums"]["user_min_right"];
4742
+ };
4743
+ rbac_right_invite_upload: {
4744
+ Args: never;
4745
+ Returns: Database["public"]["Enums"]["user_min_right"];
4746
+ };
4747
+ rbac_right_invite_write: {
4748
+ Args: never;
4749
+ Returns: Database["public"]["Enums"]["user_min_right"];
4750
+ };
4751
+ rbac_right_read: {
4752
+ Args: never;
4753
+ Returns: Database["public"]["Enums"]["user_min_right"];
4754
+ };
4755
+ rbac_right_super_admin: {
4756
+ Args: never;
4757
+ Returns: Database["public"]["Enums"]["user_min_right"];
4758
+ };
4759
+ rbac_right_upload: {
4760
+ Args: never;
4761
+ Returns: Database["public"]["Enums"]["user_min_right"];
4762
+ };
4763
+ rbac_right_write: {
4764
+ Args: never;
4765
+ Returns: Database["public"]["Enums"]["user_min_right"];
4766
+ };
4767
+ rbac_role_app_admin: {
4768
+ Args: never;
4769
+ Returns: string;
4770
+ };
4771
+ rbac_role_app_developer: {
4772
+ Args: never;
4773
+ Returns: string;
4774
+ };
4775
+ rbac_role_app_reader: {
4776
+ Args: never;
4777
+ Returns: string;
4778
+ };
4779
+ rbac_role_app_uploader: {
4780
+ Args: never;
4781
+ Returns: string;
4782
+ };
4783
+ rbac_role_bundle_admin: {
4784
+ Args: never;
4785
+ Returns: string;
4786
+ };
4787
+ rbac_role_bundle_reader: {
4788
+ Args: never;
4789
+ Returns: string;
4790
+ };
4791
+ rbac_role_channel_admin: {
4792
+ Args: never;
4793
+ Returns: string;
4794
+ };
4795
+ rbac_role_channel_reader: {
2553
4796
  Args: never;
2554
- Returns: undefined;
4797
+ Returns: string;
2555
4798
  };
2556
- process_cron_sync_sub_jobs: {
4799
+ rbac_role_org_admin: {
2557
4800
  Args: never;
2558
- Returns: undefined;
4801
+ Returns: string;
2559
4802
  };
2560
- process_d1_replication_batch: {
4803
+ rbac_role_org_billing_admin: {
2561
4804
  Args: never;
2562
- Returns: undefined;
4805
+ Returns: string;
2563
4806
  };
2564
- process_failed_uploads: {
4807
+ rbac_role_org_member: {
2565
4808
  Args: never;
2566
- Returns: undefined;
4809
+ Returns: string;
2567
4810
  };
2568
- process_free_trial_expired: {
4811
+ rbac_role_org_super_admin: {
2569
4812
  Args: never;
2570
- Returns: undefined;
4813
+ Returns: string;
2571
4814
  };
2572
- process_function_queue: {
2573
- Args: {
2574
- batch_size?: number;
2575
- queue_names: string[];
2576
- };
2577
- Returns: undefined;
2578
- } | {
2579
- Args: {
2580
- batch_size?: number;
2581
- queue_name: string;
2582
- };
2583
- Returns: undefined;
4815
+ rbac_role_platform_super_admin: {
4816
+ Args: never;
4817
+ Returns: string;
2584
4818
  };
2585
- process_manifest_bundle_counts_queue: {
4819
+ rbac_rollback_org: {
2586
4820
  Args: {
2587
- batch_size?: number;
4821
+ p_org_id: string;
2588
4822
  };
2589
- Returns: number;
4823
+ Returns: import("./types/supabase.types").Json;
2590
4824
  };
2591
- process_stats_email_monthly: {
4825
+ rbac_scope_app: {
2592
4826
  Args: never;
2593
- Returns: undefined;
4827
+ Returns: string;
2594
4828
  };
2595
- process_stats_email_weekly: {
4829
+ rbac_scope_bundle: {
2596
4830
  Args: never;
2597
- Returns: undefined;
4831
+ Returns: string;
2598
4832
  };
2599
- process_subscribed_orgs: {
4833
+ rbac_scope_channel: {
2600
4834
  Args: never;
2601
- Returns: undefined;
4835
+ Returns: string;
2602
4836
  };
2603
- queue_cron_stat_org_for_org: {
2604
- Args: {
2605
- customer_id: string;
2606
- org_id: string;
2607
- };
2608
- Returns: undefined;
4837
+ rbac_scope_org: {
4838
+ Args: never;
4839
+ Returns: string;
4840
+ };
4841
+ rbac_scope_platform: {
4842
+ Args: never;
4843
+ Returns: string;
2609
4844
  };
2610
4845
  read_bandwidth_usage: {
2611
4846
  Args: {
@@ -2656,13 +4891,150 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
2656
4891
  get: number;
2657
4892
  install: number;
2658
4893
  uninstall: number;
2659
- version_id: number;
4894
+ version_name: string;
2660
4895
  }[];
2661
4896
  };
4897
+ record_build_time: {
4898
+ Args: {
4899
+ p_app_id: string;
4900
+ p_build_id: string;
4901
+ p_build_time_unit: number;
4902
+ p_org_id: string;
4903
+ p_platform: string;
4904
+ p_user_id: string;
4905
+ };
4906
+ Returns: string;
4907
+ };
4908
+ record_email_otp_verified: {
4909
+ Args: {
4910
+ p_user_id: string;
4911
+ };
4912
+ Returns: string;
4913
+ };
4914
+ refresh_orgs_has_usage_credits: {
4915
+ Args: never;
4916
+ Returns: undefined;
4917
+ };
4918
+ regenerate_hashed_apikey: {
4919
+ Args: {
4920
+ p_apikey_id: number;
4921
+ };
4922
+ Returns: {
4923
+ created_at: string | null;
4924
+ expires_at: string | null;
4925
+ id: number;
4926
+ key: string | null;
4927
+ key_hash: string | null;
4928
+ limited_to_apps: string[] | null;
4929
+ limited_to_orgs: string[] | null;
4930
+ mode: Database["public"]["Enums"]["key_mode"];
4931
+ name: string;
4932
+ rbac_id: string;
4933
+ updated_at: string | null;
4934
+ user_id: string;
4935
+ };
4936
+ SetofOptions: {
4937
+ from: "*";
4938
+ to: "apikeys";
4939
+ isOneToOne: true;
4940
+ isSetofReturn: false;
4941
+ };
4942
+ };
4943
+ regenerate_hashed_apikey_for_user: {
4944
+ Args: {
4945
+ p_apikey_id: number;
4946
+ p_user_id: string;
4947
+ };
4948
+ Returns: {
4949
+ created_at: string | null;
4950
+ expires_at: string | null;
4951
+ id: number;
4952
+ key: string | null;
4953
+ key_hash: string | null;
4954
+ limited_to_apps: string[] | null;
4955
+ limited_to_orgs: string[] | null;
4956
+ mode: Database["public"]["Enums"]["key_mode"];
4957
+ name: string;
4958
+ rbac_id: string;
4959
+ updated_at: string | null;
4960
+ user_id: string;
4961
+ };
4962
+ SetofOptions: {
4963
+ from: "*";
4964
+ to: "apikeys";
4965
+ isOneToOne: true;
4966
+ isSetofReturn: false;
4967
+ };
4968
+ };
4969
+ reject_access_due_to_2fa: {
4970
+ Args: {
4971
+ org_id: string;
4972
+ user_id: string;
4973
+ };
4974
+ Returns: boolean;
4975
+ };
4976
+ reject_access_due_to_2fa_for_app: {
4977
+ Args: {
4978
+ app_id: string;
4979
+ };
4980
+ Returns: boolean;
4981
+ };
4982
+ reject_access_due_to_2fa_for_org: {
4983
+ Args: {
4984
+ org_id: string;
4985
+ };
4986
+ Returns: boolean;
4987
+ };
4988
+ reject_access_due_to_password_policy: {
4989
+ Args: {
4990
+ org_id: string;
4991
+ user_id: string;
4992
+ };
4993
+ Returns: boolean;
4994
+ };
2662
4995
  remove_old_jobs: {
2663
4996
  Args: never;
2664
4997
  Returns: undefined;
2665
4998
  };
4999
+ request_app_chart_refresh: {
5000
+ Args: {
5001
+ app_id: string;
5002
+ };
5003
+ Returns: {
5004
+ queued_app_ids: string[];
5005
+ queued_count: number;
5006
+ requested_at: string;
5007
+ skipped_count: number;
5008
+ }[];
5009
+ };
5010
+ request_has_app_read_access: {
5011
+ Args: {
5012
+ appid: string;
5013
+ orgid: string;
5014
+ };
5015
+ Returns: boolean;
5016
+ };
5017
+ request_has_org_read_access: {
5018
+ Args: {
5019
+ orgid: string;
5020
+ };
5021
+ Returns: boolean;
5022
+ };
5023
+ request_org_chart_refresh: {
5024
+ Args: {
5025
+ org_id: string;
5026
+ };
5027
+ Returns: {
5028
+ queued_app_ids: string[];
5029
+ queued_count: number;
5030
+ requested_at: string;
5031
+ skipped_count: number;
5032
+ }[];
5033
+ };
5034
+ request_read_key_modes: {
5035
+ Args: never;
5036
+ Returns: Database["public"]["Enums"]["key_mode"][];
5037
+ };
2666
5038
  rescind_invitation: {
2667
5039
  Args: {
2668
5040
  email: string;
@@ -2670,6 +5042,17 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
2670
5042
  };
2671
5043
  Returns: string;
2672
5044
  };
5045
+ restore_deleted_account: {
5046
+ Args: never;
5047
+ Returns: undefined;
5048
+ };
5049
+ resync_org_user_role_bindings: {
5050
+ Args: {
5051
+ p_org_id: string;
5052
+ p_user_id: string;
5053
+ };
5054
+ Returns: undefined;
5055
+ };
2673
5056
  seed_get_app_metrics_caches: {
2674
5057
  Args: {
2675
5058
  p_end_date: string;
@@ -2691,26 +5074,62 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
2691
5074
  isSetofReturn: false;
2692
5075
  };
2693
5076
  };
2694
- set_bandwidth_exceeded_by_org: {
5077
+ seed_org_metrics_cache: {
2695
5078
  Args: {
2696
- disabled: boolean;
5079
+ p_end_date: string;
5080
+ p_org_id: string;
5081
+ p_start_date: string;
5082
+ };
5083
+ Returns: {
5084
+ bandwidth: number;
5085
+ build_time_unit: number;
5086
+ cached_at: string;
5087
+ end_date: string;
5088
+ fail: number;
5089
+ get: number;
5090
+ install: number;
5091
+ mau: number;
2697
5092
  org_id: string;
5093
+ start_date: string;
5094
+ storage: number;
5095
+ uninstall: number;
5096
+ };
5097
+ SetofOptions: {
5098
+ from: "*";
5099
+ to: "org_metrics_cache";
5100
+ isOneToOne: true;
5101
+ isSetofReturn: false;
2698
5102
  };
2699
- Returns: undefined;
2700
5103
  };
2701
- set_mau_exceeded_by_org: {
5104
+ set_build_time_exceeded_by_org: {
2702
5105
  Args: {
2703
5106
  disabled: boolean;
2704
5107
  org_id: string;
2705
5108
  };
2706
5109
  Returns: undefined;
2707
5110
  };
2708
- set_storage_exceeded_by_org: {
5111
+ strip_html: {
2709
5112
  Args: {
2710
- disabled: boolean;
2711
- org_id: string;
5113
+ input: string;
2712
5114
  };
2713
- Returns: undefined;
5115
+ Returns: string;
5116
+ };
5117
+ top_up_usage_credits: {
5118
+ Args: {
5119
+ p_amount: number;
5120
+ p_expires_at?: string;
5121
+ p_notes?: string;
5122
+ p_org_id: string;
5123
+ p_source?: string;
5124
+ p_source_ref?: import("./types/supabase.types").Json;
5125
+ };
5126
+ Returns: {
5127
+ available_credits: number;
5128
+ grant_id: string;
5129
+ next_expiration: string;
5130
+ total_credits: number;
5131
+ transaction_id: number;
5132
+ }[];
2714
5133
  };
2715
5134
  total_bundle_storage_bytes: {
2716
5135
  Args: never;
@@ -2739,6 +5158,30 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
2739
5158
  Args: never;
2740
5159
  Returns: undefined;
2741
5160
  };
5161
+ update_org_invite_role_rbac: {
5162
+ Args: {
5163
+ p_new_role_name: string;
5164
+ p_org_id: string;
5165
+ p_user_id: string;
5166
+ };
5167
+ Returns: string;
5168
+ };
5169
+ update_org_member_role: {
5170
+ Args: {
5171
+ p_new_role_name: string;
5172
+ p_org_id: string;
5173
+ p_user_id: string;
5174
+ };
5175
+ Returns: string;
5176
+ };
5177
+ update_tmp_invite_role_rbac: {
5178
+ Args: {
5179
+ p_email: string;
5180
+ p_new_role_name: string;
5181
+ p_org_id: string;
5182
+ };
5183
+ Returns: string;
5184
+ };
2742
5185
  upsert_version_meta: {
2743
5186
  Args: {
2744
5187
  p_app_id: string;
@@ -2747,23 +5190,49 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
2747
5190
  };
2748
5191
  Returns: boolean;
2749
5192
  };
5193
+ user_has_app_update_user_roles: {
5194
+ Args: {
5195
+ p_app_id: string;
5196
+ p_user_id: string;
5197
+ };
5198
+ Returns: boolean;
5199
+ };
5200
+ user_has_role_in_app: {
5201
+ Args: {
5202
+ p_app_id: string;
5203
+ p_user_id: string;
5204
+ };
5205
+ Returns: boolean;
5206
+ };
5207
+ user_meets_password_policy: {
5208
+ Args: {
5209
+ org_id: string;
5210
+ user_id: string;
5211
+ };
5212
+ Returns: boolean;
5213
+ };
5214
+ verify_api_key_hash: {
5215
+ Args: {
5216
+ plain_key: string;
5217
+ stored_hash: string;
5218
+ };
5219
+ Returns: boolean;
5220
+ };
2750
5221
  verify_mfa: {
2751
5222
  Args: never;
2752
5223
  Returns: boolean;
2753
5224
  };
2754
5225
  };
2755
5226
  Enums: {
2756
- action_type: "mau" | "storage" | "bandwidth";
2757
- app_mode: "prod" | "dev" | "livereload";
2758
- credit_metric_type: "mau" | "bandwidth" | "storage";
5227
+ action_type: "mau" | "storage" | "bandwidth" | "build_time";
5228
+ credit_metric_type: "mau" | "bandwidth" | "storage" | "build_time";
2759
5229
  credit_transaction_type: "grant" | "purchase" | "manual_grant" | "deduction" | "expiry" | "refund";
5230
+ cron_task_type: "function" | "queue" | "function_queue";
2760
5231
  disable_update: "major" | "minor" | "patch" | "version_number" | "none";
2761
5232
  key_mode: "read" | "write" | "all" | "upload";
2762
- pay_as_you_go_type: "base" | "units";
2763
- platform_os: "ios" | "android";
2764
- stats_action: "delete" | "reset" | "set" | "get" | "set_fail" | "update_fail" | "download_fail" | "windows_path_fail" | "canonical_path_fail" | "directory_path_fail" | "unzip_fail" | "low_mem_fail" | "download_10" | "download_20" | "download_30" | "download_40" | "download_50" | "download_60" | "download_70" | "download_80" | "download_90" | "download_complete" | "decrypt_fail" | "app_moved_to_foreground" | "app_moved_to_background" | "uninstall" | "needPlanUpgrade" | "missingBundle" | "noNew" | "disablePlatformIos" | "disablePlatformAndroid" | "disableAutoUpdateToMajor" | "cannotUpdateViaPrivateChannel" | "disableAutoUpdateToMinor" | "disableAutoUpdateToPatch" | "channelMisconfigured" | "disableAutoUpdateMetadata" | "disableAutoUpdateUnderNative" | "disableDevBuild" | "disableEmulator" | "cannotGetBundle" | "checksum_fail" | "NoChannelOrOverride" | "setChannel" | "getChannel" | "rateLimited" | "disableAutoUpdate" | "ping" | "InvalidIp" | "blocked_by_server_url" | "download_manifest_start" | "download_manifest_complete" | "download_zip_start" | "download_zip_complete" | "download_manifest_file_fail" | "download_manifest_checksum_fail" | "download_manifest_brotli_fail" | "backend_refusal";
5233
+ platform_os: "ios" | "android" | "electron";
5234
+ stats_action: "delete" | "reset" | "set" | "get" | "set_fail" | "update_fail" | "download_fail" | "windows_path_fail" | "canonical_path_fail" | "directory_path_fail" | "unzip_fail" | "low_mem_fail" | "download_10" | "download_20" | "download_30" | "download_40" | "download_50" | "download_60" | "download_70" | "download_80" | "download_90" | "download_complete" | "decrypt_fail" | "app_moved_to_foreground" | "app_moved_to_background" | "uninstall" | "needPlanUpgrade" | "missingBundle" | "noNew" | "disablePlatformIos" | "disablePlatformAndroid" | "disableAutoUpdateToMajor" | "cannotUpdateViaPrivateChannel" | "disableAutoUpdateToMinor" | "disableAutoUpdateToPatch" | "channelMisconfigured" | "disableAutoUpdateMetadata" | "disableAutoUpdateUnderNative" | "disableDevBuild" | "disableEmulator" | "cannotGetBundle" | "checksum_fail" | "NoChannelOrOverride" | "setChannel" | "getChannel" | "rateLimited" | "disableAutoUpdate" | "keyMismatch" | "ping" | "InvalidIp" | "blocked_by_server_url" | "download_manifest_start" | "download_manifest_complete" | "download_zip_start" | "download_zip_complete" | "download_manifest_file_fail" | "download_manifest_checksum_fail" | "download_manifest_brotli_fail" | "backend_refusal" | "download_0" | "disableProdBuild" | "disableDevice" | "disablePlatformElectron" | "customIdBlocked";
2765
5235
  stripe_status: "created" | "succeeded" | "updated" | "failed" | "deleted" | "canceled";
2766
- usage_mode: "5min" | "day" | "month" | "cycle" | "last_saved";
2767
5236
  user_min_right: "invite_read" | "invite_upload" | "invite_write" | "invite_admin" | "invite_super_admin" | "read" | "upload" | "write" | "admin" | "super_admin";
2768
5237
  user_role: "read" | "upload" | "write" | "admin";
2769
5238
  version_action: "get" | "fail" | "install" | "uninstall";
@@ -2774,9 +5243,6 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
2774
5243
  s3_path: string | null;
2775
5244
  file_hash: string | null;
2776
5245
  };
2777
- match_plan: {
2778
- name: string | null;
2779
- };
2780
5246
  message_update: {
2781
5247
  msg_id: number | null;
2782
5248
  cf_id: string | null;
@@ -2804,14 +5270,12 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
2804
5270
  };
2805
5271
  };
2806
5272
  }, {
2807
- PostgrestVersion: "13.0.5";
5273
+ PostgrestVersion: "14.1";
2808
5274
  }>>;
2809
- export declare function checkKey(supabase: SupabaseClient<Database>, apikey: string, keymode: Database['public']['Enums']['key_mode'][]): Promise<void>;
2810
5275
  export declare function isPayingOrg(supabase: SupabaseClient<Database>, orgId: string): Promise<boolean>;
2811
5276
  export declare function isTrialOrg(supabase: SupabaseClient<Database>, orgId: string): Promise<number>;
2812
5277
  export declare function isAllowedActionOrg(supabase: SupabaseClient<Database>, orgId: string): Promise<boolean>;
2813
5278
  export declare function isAllowedActionAppIdApiKey(supabase: SupabaseClient<Database>, appId: string, apikey: string): Promise<boolean>;
2814
- export declare function isAllowedApp(supabase: SupabaseClient<Database>, apikey: string, appId: string): Promise<boolean>;
2815
5279
  export declare enum OrganizationPerm {
2816
5280
  none = 0,
2817
5281
  read = 1,
@@ -2831,53 +5295,76 @@ export declare function isAllowedAppOrg(supabase: SupabaseClient<Database>, apik
2831
5295
  export declare function checkRemoteCliMessages(supabase: SupabaseClient<Database>, orgId: string, cliVersion: string): Promise<void>;
2832
5296
  export declare function checkPlanValid(supabase: SupabaseClient<Database>, orgId: string, apikey: string, appId?: string, warning?: boolean): Promise<void>;
2833
5297
  export declare function checkPlanValidUpload(supabase: SupabaseClient<Database>, orgId: string, apikey: string, appId?: string, warning?: boolean): Promise<void>;
5298
+ export declare function findSavedKeySilent(): string | undefined;
2834
5299
  export declare function findSavedKey(quiet?: boolean): string;
2835
- export declare function getContentType(filename: string): string | null;
2836
- export declare function findProjectType(): Promise<"unknown" | "angular-ts" | "angular-js" | "nuxtjs-ts" | "nuxtjs-js" | "nextjs-ts" | "nextjs-js" | "sveltekit-ts" | "sveltekit-js" | "svelte-ts" | "svelte-js" | "vue-ts" | "vue-js" | "react-ts" | "react-js">;
5300
+ export declare function getContentType(filename: string): string;
5301
+ export declare function findProjectType(options?: {
5302
+ quiet?: boolean;
5303
+ }): Promise<"unknown" | "angular-ts" | "angular-js" | "nuxtjs-ts" | "nuxtjs-js" | "nextjs-ts" | "nextjs-js" | "sveltekit-ts" | "sveltekit-js" | "svelte-ts" | "svelte-js" | "vue-ts" | "vue-js" | "react-ts" | "react-js">;
2837
5304
  export declare function findMainFileForProjectType(projectType: string, isTypeScript: boolean): string | null;
2838
5305
  export declare function findBuildCommandForProjectType(projectType: string): Promise<"build" | "generate">;
2839
- export declare function findMainFile(): Promise<string>;
2840
- export declare function updateOrCreateVersion(supabase: SupabaseClient<Database>, update: Database['public']['Tables']['app_versions']['Insert']): Promise<import("@supabase/postgrest-js").PostgrestSingleResponse<null>>;
5306
+ export declare function findMainFile(silent?: boolean): Promise<string>;
5307
+ export declare function updateOrCreateVersion(supabase: SupabaseClient<Database>, update: Database['public']['Tables']['app_versions']['Insert']): Promise<import("@supabase/supabase-js").PostgrestSingleResponse<null>>;
2841
5308
  export declare function uploadUrl(supabase: SupabaseClient<Database>, appId: string, name: string): Promise<string>;
5309
+ export declare const BROTLI_MIN_UPDATER_VERSION_V5 = "5.10.0";
5310
+ export declare const BROTLI_MIN_UPDATER_VERSION_V6 = "6.25.0";
5311
+ export declare const BROTLI_MIN_UPDATER_VERSION_V7 = "7.0.30";
5312
+ export declare function isDeprecatedPluginVersion(parsedPluginVersion: SemVer, minFive?: string, minSix?: string, minSeven?: string): boolean;
2842
5313
  export declare function generateManifest(path: string): Promise<{
2843
5314
  file: string;
2844
5315
  hash: string;
2845
5316
  }[]>;
2846
5317
  export type manifestType = Awaited<ReturnType<typeof generateManifest>>;
2847
- export interface uploadUrlsType {
2848
- path: string;
2849
- hash: string;
2850
- uploadLink: string;
2851
- finalPath: string;
2852
- }
2853
5318
  export declare function zipFile(filePath: string): Promise<Buffer>;
2854
- export declare function zipFileUnix(filePath: string): Buffer<ArrayBufferLike>;
5319
+ export declare function zipFileUnix(filePath: string): Buffer<ArrayBuffer>;
2855
5320
  export declare function zipFileWindows(filePath: string): Promise<Buffer>;
2856
5321
  export declare function uploadTUS(apikey: string, data: Buffer, orgId: string, appId: string, name: string, spinner: ReturnType<typeof spinnerC>, localConfig: CapgoConfig, chunkSize: number): Promise<boolean>;
2857
5322
  export declare function deletedFailedVersion(supabase: SupabaseClient<Database>, appId: string, name: string): Promise<void>;
2858
- export declare function updateOrCreateChannel(supabase: SupabaseClient<Database>, update: Database['public']['Tables']['channels']['Insert']): Promise<import("@supabase/postgrest-js").PostgrestSingleResponse<{
5323
+ export declare function updateOrCreateChannel(supabase: SupabaseClient<Database>, update: Database['public']['Tables']['channels']['Insert']): Promise<import("@supabase/supabase-js").PostgrestSingleResponse<{
2859
5324
  allow_dev: boolean;
5325
+ allow_device: boolean;
2860
5326
  allow_device_self_set: boolean;
2861
5327
  allow_emulator: boolean;
5328
+ allow_prod: boolean;
2862
5329
  android: boolean;
2863
5330
  app_id: string;
2864
5331
  created_at: string;
2865
5332
  created_by: string;
2866
5333
  disable_auto_update: Database["public"]["Enums"]["disable_update"];
2867
5334
  disable_auto_update_under_native: boolean;
5335
+ electron: boolean;
2868
5336
  id: number;
2869
5337
  ios: boolean;
2870
5338
  name: string;
2871
5339
  owner_org: string;
2872
5340
  public: boolean;
5341
+ rbac_id: string;
2873
5342
  updated_at: string;
2874
- version: number;
5343
+ version: number | null;
2875
5344
  }>>;
2876
- export declare function sendEvent(capgkey: string, payload: TrackOptions, verbose?: boolean): Promise<void>;
2877
- export declare function getOrganization(supabase: SupabaseClient<Database>, roles: string[]): Promise<Organization>;
2878
- export declare function verifyUser(supabase: SupabaseClient<Database>, apikey: string, keymod?: Database['public']['Enums']['key_mode'][]): Promise<string>;
5345
+ export declare function sendEvent(capgkey: string, payload: TrackOptions & {
5346
+ notifyConsole?: boolean;
5347
+ }, verbose?: boolean, signal?: AbortSignal): Promise<void>;
5348
+ export declare function show2FADeniedError(organizationName?: string): never;
5349
+ export declare function filterOrgsByPermission(supabase: SupabaseClient<Database>, apikey: string, orgs: Organization[], permissionKey: string): Promise<Organization[]>;
5350
+ export declare function getOrganizationListWithPermission(supabase: SupabaseClient<Database>, apikey: string, permissionKey: string): Promise<{
5351
+ allOrganizations: Organization[];
5352
+ allowedOrganizations: Organization[];
5353
+ }>;
5354
+ export declare function getOrganizationWithPermission(supabase: SupabaseClient<Database>, apikey: string, permissionKey: string): Promise<Organization>;
5355
+ export declare function resolveUserIdFromApiKey(supabase: SupabaseClient<Database>, apikey: string, silent?: boolean): Promise<string>;
5356
+ interface CliPermissionScope {
5357
+ orgId?: string | null;
5358
+ appId?: string | null;
5359
+ channelId?: number | null;
5360
+ }
5361
+ export declare function hasCliPermission(supabase: SupabaseClient<Database>, apikey: string, permissionKey: string, scope?: CliPermissionScope): Promise<boolean>;
5362
+ export declare function assertCliPermission(supabase: SupabaseClient<Database>, apikey: string, permissionKey: string, scope?: CliPermissionScope, options?: {
5363
+ message?: string;
5364
+ silent?: boolean;
5365
+ }): Promise<void>;
5366
+ export declare function assertOrgPermission(supabase: SupabaseClient<Database>, apikey: string, permissionKey: string, orgId: string, message: string, silent: boolean): Promise<void>;
2879
5367
  export declare function getOrganizationId(supabase: SupabaseClient<Database>, appId: string): Promise<string>;
2880
- export declare function requireUpdateMetadata(supabase: SupabaseClient<Database>, channel: string, appId: string): Promise<boolean>;
2881
5368
  export declare function getHumanDate(createdA: string | null): string;
2882
5369
  export declare function getPMAndCommand(): {
2883
5370
  pm: PackageManagerType;
@@ -2885,49 +5372,90 @@ export declare function getPMAndCommand(): {
2885
5372
  installCommand: string;
2886
5373
  runner: PackageManagerRunner;
2887
5374
  };
5375
+ export declare function getNativeProjectResetAdvice(platformRunner: string, nativePlatform: 'ios' | 'android'): {
5376
+ summary: string;
5377
+ command: string;
5378
+ };
2888
5379
  export declare function getLocalDependencies(packageJsonPath: string | undefined, nodeModulesString: string | undefined): Promise<{
2889
5380
  name: string;
2890
5381
  version: string;
2891
5382
  native: boolean;
5383
+ ios_checksum?: string;
5384
+ android_checksum?: string;
2892
5385
  }[]>;
2893
5386
  export declare function getRemoteChecksums(supabase: SupabaseClient<Database>, appId: string, channel: string): Promise<string | null>;
2894
- export declare function convertNativePackages(nativePackages: {
2895
- name: string;
2896
- version: string;
2897
- }[]): Map<string, {
2898
- name: string;
2899
- version: string;
2900
- }>;
5387
+ export type { NativePackage } from './schemas/common';
5388
+ export declare function convertNativePackages(nativePackages: NativePackage[]): Map<string, NativePackage>;
2901
5389
  export declare function getRemoteDependencies(supabase: SupabaseClient<Database>, appId: string, channel: string): Promise<Map<string, {
2902
5390
  name: string;
2903
5391
  version: string;
5392
+ ios_checksum?: string | undefined;
5393
+ android_checksum?: string | undefined;
2904
5394
  }>>;
2905
5395
  export declare function checkChecksum(supabase: SupabaseClient<Database>, appId: string, channel: string, currentChecksum: string): Promise<void>;
2906
- interface Compatibility {
2907
- name: string;
2908
- localVersion: string | undefined;
2909
- remoteVersion: string | undefined;
2910
- }
5396
+ export type { Compatibility, CompatibilityDetails, IncompatibilityReason } from './schemas/common';
2911
5397
  export declare function getAppId(appId: string | undefined, config: CapacitorConfig | undefined): any;
5398
+ /**
5399
+ * Check if a package is compatible and return detailed reasons if not
5400
+ */
5401
+ export declare function getCompatibilityDetails(pkg: Compatibility): CompatibilityDetails;
5402
+ /**
5403
+ * Simple compatibility check (backward compatible)
5404
+ */
2912
5405
  export declare function isCompatible(pkg: Compatibility): boolean;
2913
5406
  export declare function checkCompatibilityCloud(supabase: SupabaseClient<Database>, appId: string, channel: string, packageJsonPath: string | undefined, nodeModules: string | undefined): Promise<{
2914
- finalCompatibility: Compatibility[];
5407
+ finalCompatibility: {
5408
+ name: string;
5409
+ localVersion?: string | undefined;
5410
+ remoteVersion?: string | undefined;
5411
+ localIosChecksum?: string | undefined;
5412
+ remoteIosChecksum?: string | undefined;
5413
+ localAndroidChecksum?: string | undefined;
5414
+ remoteAndroidChecksum?: string | undefined;
5415
+ }[];
2915
5416
  localDependencies: {
2916
5417
  name: string;
2917
5418
  version: string;
2918
5419
  native: boolean;
5420
+ ios_checksum?: string;
5421
+ android_checksum?: string;
2919
5422
  }[];
2920
5423
  }>;
2921
- export declare function checkCompatibilityNativePackages(supabase: SupabaseClient<Database>, appId: string, channel: string, nativePackages: {
2922
- name: string;
2923
- version: string;
2924
- }[]): Promise<{
2925
- finalCompatibility: Compatibility[];
5424
+ export declare function checkCompatibilityNativePackages(supabase: SupabaseClient<Database>, appId: string, channel: string, nativePackages: NativePackage[]): Promise<{
5425
+ finalCompatibility: {
5426
+ name: string;
5427
+ localVersion?: string | undefined;
5428
+ remoteVersion?: string | undefined;
5429
+ localIosChecksum?: string | undefined;
5430
+ remoteIosChecksum?: string | undefined;
5431
+ localAndroidChecksum?: string | undefined;
5432
+ remoteAndroidChecksum?: string | undefined;
5433
+ }[];
2926
5434
  localDependencies: {
2927
5435
  name: string;
2928
5436
  version: string;
5437
+ ios_checksum?: string | undefined;
5438
+ android_checksum?: string | undefined;
2929
5439
  }[];
2930
5440
  }>;
2931
- export declare function promptAndSyncCapacitor(isInit?: boolean, orgId?: string, apikey?: string): Promise<void>;
2932
- export {};
2933
- //# sourceMappingURL=utils.d.ts.map
5441
+ export interface IosUpdaterSyncValidationResult {
5442
+ shouldCheck: boolean;
5443
+ valid: boolean;
5444
+ details: string[];
5445
+ }
5446
+ /**
5447
+ * Validate whether the iOS native project is correctly synced for capacitor-updater.
5448
+ *
5449
+ * `shouldCheck` is `false` when no iOS project is present or no updater signals are detected
5450
+ * (no dependency declaration, installed package, or native references). `shouldCheck` is `true`
5451
+ * as soon as any signal indicates updater should be wired, then both dependency definitions
5452
+ * (`Podfile` or SPM `Package.swift`) and generated native outputs (`Podfile.lock`,
5453
+ * `capacitor.plugins.json`, or `ios/App/App/capacitor.config.json`) must include
5454
+ * updater markers for `valid` to be `true`.
5455
+ */
5456
+ export declare function validateIosUpdaterSync(rootDir?: string, packageJsonPath?: string): IosUpdaterSyncValidationResult;
5457
+ interface PromptAndSyncOptions {
5458
+ validateIosUpdater?: boolean;
5459
+ packageJsonPath?: string;
5460
+ }
5461
+ export declare function promptAndSyncCapacitor(isInit?: boolean, orgId?: string, apikey?: string, options?: PromptAndSyncOptions): Promise<void>;