@capgo/cli 4.13.7 → 4.13.9
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.
- package/.github/FUNDING.yml +1 -0
- package/.github/workflows/build.yml +46 -0
- package/.github/workflows/bump_version.yml +56 -0
- package/.github/workflows/test.yml +30 -0
- package/.prettierignore +6 -0
- package/.vscode/launch.json +23 -0
- package/.vscode/settings.json +46 -0
- package/.vscode/tasks.json +42 -0
- package/CHANGELOG.md +2739 -0
- package/build.mjs +23 -0
- package/bun.lockb +0 -0
- package/capacitor.config.ts +33 -0
- package/crypto_explained.png +0 -0
- package/dist/index.js +114692 -205
- package/eslint.config.js +10 -0
- package/package.json +33 -32
- package/renovate.json +23 -0
- package/src/api/app.ts +55 -0
- package/src/api/channels.ts +140 -0
- package/src/api/crypto.ts +116 -0
- package/src/api/devices_override.ts +41 -0
- package/src/api/update.ts +13 -0
- package/src/api/versions.ts +101 -0
- package/src/app/add.ts +158 -0
- package/src/app/debug.ts +222 -0
- package/src/app/delete.ts +106 -0
- package/src/app/info.ts +90 -0
- package/src/app/list.ts +67 -0
- package/src/app/set.ts +94 -0
- package/src/bundle/check.ts +42 -0
- package/src/bundle/cleanup.ts +127 -0
- package/src/bundle/compatibility.ts +70 -0
- package/src/bundle/decrypt.ts +54 -0
- package/src/bundle/delete.ts +53 -0
- package/src/bundle/encrypt.ts +60 -0
- package/src/bundle/list.ts +43 -0
- package/src/bundle/unlink.ts +86 -0
- package/src/bundle/upload.ts +532 -0
- package/src/bundle/zip.ts +139 -0
- package/src/channel/add.ts +74 -0
- package/src/channel/currentBundle.ts +72 -0
- package/src/channel/delete.ts +52 -0
- package/src/channel/list.ts +49 -0
- package/src/channel/set.ts +178 -0
- package/src/index.ts +307 -0
- package/src/init.ts +342 -0
- package/src/key.ts +131 -0
- package/src/login.ts +70 -0
- package/src/types/capacitor__cli.d.ts +6 -0
- package/src/types/supabase.types.ts +2193 -0
- package/src/user/account.ts +11 -0
- package/src/utils.ts +956 -0
- package/test/chunk_convert.ts +28 -0
- package/test/data.ts +18769 -0
- package/test/test_headers_rls.ts +24 -0
- package/test/test_semver.ts +13 -0
- package/tsconfig.json +39 -0
|
@@ -0,0 +1,2193 @@
|
|
|
1
|
+
export type Json =
|
|
2
|
+
| string
|
|
3
|
+
| number
|
|
4
|
+
| boolean
|
|
5
|
+
| null
|
|
6
|
+
| { [key: string]: Json | undefined }
|
|
7
|
+
| Json[]
|
|
8
|
+
|
|
9
|
+
export interface Database {
|
|
10
|
+
public: {
|
|
11
|
+
Tables: {
|
|
12
|
+
apikeys: {
|
|
13
|
+
Row: {
|
|
14
|
+
created_at: string | null
|
|
15
|
+
id: number
|
|
16
|
+
key: string
|
|
17
|
+
mode: Database['public']['Enums']['key_mode']
|
|
18
|
+
updated_at: string | null
|
|
19
|
+
user_id: string
|
|
20
|
+
}
|
|
21
|
+
Insert: {
|
|
22
|
+
created_at?: string | null
|
|
23
|
+
id?: number
|
|
24
|
+
key: string
|
|
25
|
+
mode: Database['public']['Enums']['key_mode']
|
|
26
|
+
updated_at?: string | null
|
|
27
|
+
user_id: string
|
|
28
|
+
}
|
|
29
|
+
Update: {
|
|
30
|
+
created_at?: string | null
|
|
31
|
+
id?: number
|
|
32
|
+
key?: string
|
|
33
|
+
mode?: Database['public']['Enums']['key_mode']
|
|
34
|
+
updated_at?: string | null
|
|
35
|
+
user_id?: string
|
|
36
|
+
}
|
|
37
|
+
Relationships: [
|
|
38
|
+
{
|
|
39
|
+
foreignKeyName: 'apikeys_user_id_fkey'
|
|
40
|
+
columns: ['user_id']
|
|
41
|
+
isOneToOne: false
|
|
42
|
+
referencedRelation: 'users'
|
|
43
|
+
referencedColumns: ['id']
|
|
44
|
+
},
|
|
45
|
+
]
|
|
46
|
+
}
|
|
47
|
+
app_versions: {
|
|
48
|
+
Row: {
|
|
49
|
+
app_id: string
|
|
50
|
+
bucket_id: string | null
|
|
51
|
+
checksum: string | null
|
|
52
|
+
created_at: string | null
|
|
53
|
+
deleted: boolean
|
|
54
|
+
external_url: string | null
|
|
55
|
+
id: number
|
|
56
|
+
minUpdateVersion: string | null
|
|
57
|
+
name: string
|
|
58
|
+
native_packages: Json[] | null
|
|
59
|
+
owner_org: string
|
|
60
|
+
r2_path: string | null
|
|
61
|
+
session_key: string | null
|
|
62
|
+
storage_provider: string
|
|
63
|
+
updated_at: string | null
|
|
64
|
+
user_id: string | null
|
|
65
|
+
}
|
|
66
|
+
Insert: {
|
|
67
|
+
app_id: string
|
|
68
|
+
bucket_id?: string | null
|
|
69
|
+
checksum?: string | null
|
|
70
|
+
created_at?: string | null
|
|
71
|
+
deleted?: boolean
|
|
72
|
+
external_url?: string | null
|
|
73
|
+
id?: number
|
|
74
|
+
minUpdateVersion?: string | null
|
|
75
|
+
name: string
|
|
76
|
+
native_packages?: Json[] | null
|
|
77
|
+
owner_org: string
|
|
78
|
+
r2_path?: string | null
|
|
79
|
+
session_key?: string | null
|
|
80
|
+
storage_provider?: string
|
|
81
|
+
updated_at?: string | null
|
|
82
|
+
user_id?: string | null
|
|
83
|
+
}
|
|
84
|
+
Update: {
|
|
85
|
+
app_id?: string
|
|
86
|
+
bucket_id?: string | null
|
|
87
|
+
checksum?: string | null
|
|
88
|
+
created_at?: string | null
|
|
89
|
+
deleted?: boolean
|
|
90
|
+
external_url?: string | null
|
|
91
|
+
id?: number
|
|
92
|
+
minUpdateVersion?: string | null
|
|
93
|
+
name?: string
|
|
94
|
+
native_packages?: Json[] | null
|
|
95
|
+
owner_org?: string
|
|
96
|
+
r2_path?: string | null
|
|
97
|
+
session_key?: string | null
|
|
98
|
+
storage_provider?: string
|
|
99
|
+
updated_at?: string | null
|
|
100
|
+
user_id?: string | null
|
|
101
|
+
}
|
|
102
|
+
Relationships: [
|
|
103
|
+
{
|
|
104
|
+
foreignKeyName: 'app_versions_app_id_fkey'
|
|
105
|
+
columns: ['app_id']
|
|
106
|
+
isOneToOne: false
|
|
107
|
+
referencedRelation: 'apps'
|
|
108
|
+
referencedColumns: ['app_id']
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
foreignKeyName: 'owner_org_id_fkey'
|
|
112
|
+
columns: ['owner_org']
|
|
113
|
+
isOneToOne: false
|
|
114
|
+
referencedRelation: 'orgs'
|
|
115
|
+
referencedColumns: ['id']
|
|
116
|
+
},
|
|
117
|
+
]
|
|
118
|
+
}
|
|
119
|
+
app_versions_meta: {
|
|
120
|
+
Row: {
|
|
121
|
+
app_id: string
|
|
122
|
+
checksum: string
|
|
123
|
+
created_at: string | null
|
|
124
|
+
devices: number | null
|
|
125
|
+
fails: number | null
|
|
126
|
+
id: number
|
|
127
|
+
installs: number | null
|
|
128
|
+
owner_org: string
|
|
129
|
+
size: number
|
|
130
|
+
uninstalls: number | null
|
|
131
|
+
updated_at: string | null
|
|
132
|
+
}
|
|
133
|
+
Insert: {
|
|
134
|
+
app_id: string
|
|
135
|
+
checksum: string
|
|
136
|
+
created_at?: string | null
|
|
137
|
+
devices?: number | null
|
|
138
|
+
fails?: number | null
|
|
139
|
+
id?: number
|
|
140
|
+
installs?: number | null
|
|
141
|
+
owner_org: string
|
|
142
|
+
size: number
|
|
143
|
+
uninstalls?: number | null
|
|
144
|
+
updated_at?: string | null
|
|
145
|
+
}
|
|
146
|
+
Update: {
|
|
147
|
+
app_id?: string
|
|
148
|
+
checksum?: string
|
|
149
|
+
created_at?: string | null
|
|
150
|
+
devices?: number | null
|
|
151
|
+
fails?: number | null
|
|
152
|
+
id?: number
|
|
153
|
+
installs?: number | null
|
|
154
|
+
owner_org?: string
|
|
155
|
+
size?: number
|
|
156
|
+
uninstalls?: number | null
|
|
157
|
+
updated_at?: string | null
|
|
158
|
+
}
|
|
159
|
+
Relationships: [
|
|
160
|
+
{
|
|
161
|
+
foreignKeyName: 'app_versions_meta_app_id_fkey'
|
|
162
|
+
columns: ['app_id']
|
|
163
|
+
isOneToOne: false
|
|
164
|
+
referencedRelation: 'apps'
|
|
165
|
+
referencedColumns: ['app_id']
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
foreignKeyName: 'app_versions_meta_id_fkey'
|
|
169
|
+
columns: ['id']
|
|
170
|
+
isOneToOne: true
|
|
171
|
+
referencedRelation: 'app_versions'
|
|
172
|
+
referencedColumns: ['id']
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
foreignKeyName: 'owner_org_id_fkey'
|
|
176
|
+
columns: ['owner_org']
|
|
177
|
+
isOneToOne: false
|
|
178
|
+
referencedRelation: 'orgs'
|
|
179
|
+
referencedColumns: ['id']
|
|
180
|
+
},
|
|
181
|
+
]
|
|
182
|
+
}
|
|
183
|
+
apps: {
|
|
184
|
+
Row: {
|
|
185
|
+
app_id: string
|
|
186
|
+
created_at: string | null
|
|
187
|
+
icon_url: string
|
|
188
|
+
id: string | null
|
|
189
|
+
last_version: string | null
|
|
190
|
+
name: string | null
|
|
191
|
+
owner_org: string
|
|
192
|
+
retention: number
|
|
193
|
+
updated_at: string | null
|
|
194
|
+
user_id: string | null
|
|
195
|
+
}
|
|
196
|
+
Insert: {
|
|
197
|
+
app_id: string
|
|
198
|
+
created_at?: string | null
|
|
199
|
+
icon_url: string
|
|
200
|
+
id?: string | null
|
|
201
|
+
last_version?: string | null
|
|
202
|
+
name?: string | null
|
|
203
|
+
owner_org: string
|
|
204
|
+
retention?: number
|
|
205
|
+
updated_at?: string | null
|
|
206
|
+
user_id?: string | null
|
|
207
|
+
}
|
|
208
|
+
Update: {
|
|
209
|
+
app_id?: string
|
|
210
|
+
created_at?: string | null
|
|
211
|
+
icon_url?: string
|
|
212
|
+
id?: string | null
|
|
213
|
+
last_version?: string | null
|
|
214
|
+
name?: string | null
|
|
215
|
+
owner_org?: string
|
|
216
|
+
retention?: number
|
|
217
|
+
updated_at?: string | null
|
|
218
|
+
user_id?: string | null
|
|
219
|
+
}
|
|
220
|
+
Relationships: [
|
|
221
|
+
{
|
|
222
|
+
foreignKeyName: 'apps_user_id_fkey'
|
|
223
|
+
columns: ['user_id']
|
|
224
|
+
isOneToOne: false
|
|
225
|
+
referencedRelation: 'users'
|
|
226
|
+
referencedColumns: ['id']
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
foreignKeyName: 'owner_org_id_fkey'
|
|
230
|
+
columns: ['owner_org']
|
|
231
|
+
isOneToOne: false
|
|
232
|
+
referencedRelation: 'orgs'
|
|
233
|
+
referencedColumns: ['id']
|
|
234
|
+
},
|
|
235
|
+
]
|
|
236
|
+
}
|
|
237
|
+
bandwidth_usage: {
|
|
238
|
+
Row: {
|
|
239
|
+
app_id: string
|
|
240
|
+
device_id: string
|
|
241
|
+
file_size: number
|
|
242
|
+
id: number
|
|
243
|
+
timestamp: string
|
|
244
|
+
}
|
|
245
|
+
Insert: {
|
|
246
|
+
app_id: string
|
|
247
|
+
device_id: string
|
|
248
|
+
file_size: number
|
|
249
|
+
id?: number
|
|
250
|
+
timestamp?: string
|
|
251
|
+
}
|
|
252
|
+
Update: {
|
|
253
|
+
app_id?: string
|
|
254
|
+
device_id?: string
|
|
255
|
+
file_size?: number
|
|
256
|
+
id?: number
|
|
257
|
+
timestamp?: string
|
|
258
|
+
}
|
|
259
|
+
Relationships: []
|
|
260
|
+
}
|
|
261
|
+
channel_devices: {
|
|
262
|
+
Row: {
|
|
263
|
+
app_id: string
|
|
264
|
+
channel_id: number
|
|
265
|
+
created_at: string | null
|
|
266
|
+
device_id: string
|
|
267
|
+
id: number
|
|
268
|
+
owner_org: string
|
|
269
|
+
updated_at: string
|
|
270
|
+
}
|
|
271
|
+
Insert: {
|
|
272
|
+
app_id: string
|
|
273
|
+
channel_id: number
|
|
274
|
+
created_at?: string | null
|
|
275
|
+
device_id: string
|
|
276
|
+
id?: number
|
|
277
|
+
owner_org: string
|
|
278
|
+
updated_at?: string
|
|
279
|
+
}
|
|
280
|
+
Update: {
|
|
281
|
+
app_id?: string
|
|
282
|
+
channel_id?: number
|
|
283
|
+
created_at?: string | null
|
|
284
|
+
device_id?: string
|
|
285
|
+
id?: number
|
|
286
|
+
owner_org?: string
|
|
287
|
+
updated_at?: string
|
|
288
|
+
}
|
|
289
|
+
Relationships: [
|
|
290
|
+
{
|
|
291
|
+
foreignKeyName: 'channel_devices_app_id_fkey'
|
|
292
|
+
columns: ['app_id']
|
|
293
|
+
isOneToOne: false
|
|
294
|
+
referencedRelation: 'apps'
|
|
295
|
+
referencedColumns: ['app_id']
|
|
296
|
+
},
|
|
297
|
+
{
|
|
298
|
+
foreignKeyName: 'channel_devices_channel_id_fkey'
|
|
299
|
+
columns: ['channel_id']
|
|
300
|
+
isOneToOne: false
|
|
301
|
+
referencedRelation: 'channels'
|
|
302
|
+
referencedColumns: ['id']
|
|
303
|
+
},
|
|
304
|
+
{
|
|
305
|
+
foreignKeyName: 'owner_org_id_fkey'
|
|
306
|
+
columns: ['owner_org']
|
|
307
|
+
isOneToOne: false
|
|
308
|
+
referencedRelation: 'orgs'
|
|
309
|
+
referencedColumns: ['id']
|
|
310
|
+
},
|
|
311
|
+
]
|
|
312
|
+
}
|
|
313
|
+
channels: {
|
|
314
|
+
Row: {
|
|
315
|
+
allow_dev: boolean
|
|
316
|
+
allow_device_self_set: boolean
|
|
317
|
+
allow_emulator: boolean
|
|
318
|
+
android: boolean
|
|
319
|
+
app_id: string
|
|
320
|
+
beta: boolean
|
|
321
|
+
created_at: string
|
|
322
|
+
created_by: string | null
|
|
323
|
+
disableAutoUpdate: Database['public']['Enums']['disable_update']
|
|
324
|
+
disableAutoUpdateUnderNative: boolean
|
|
325
|
+
enable_progressive_deploy: boolean
|
|
326
|
+
enableAbTesting: boolean
|
|
327
|
+
id: number
|
|
328
|
+
ios: boolean
|
|
329
|
+
name: string
|
|
330
|
+
owner_org: string
|
|
331
|
+
public: boolean
|
|
332
|
+
secondaryVersionPercentage: number
|
|
333
|
+
secondVersion: number | null
|
|
334
|
+
updated_at: string
|
|
335
|
+
version: number
|
|
336
|
+
}
|
|
337
|
+
Insert: {
|
|
338
|
+
allow_dev?: boolean
|
|
339
|
+
allow_device_self_set?: boolean
|
|
340
|
+
allow_emulator?: boolean
|
|
341
|
+
android?: boolean
|
|
342
|
+
app_id: string
|
|
343
|
+
beta?: boolean
|
|
344
|
+
created_at?: string
|
|
345
|
+
created_by?: string | null
|
|
346
|
+
disableAutoUpdate?: Database['public']['Enums']['disable_update']
|
|
347
|
+
disableAutoUpdateUnderNative?: boolean
|
|
348
|
+
enable_progressive_deploy?: boolean
|
|
349
|
+
enableAbTesting?: boolean
|
|
350
|
+
id?: number
|
|
351
|
+
ios?: boolean
|
|
352
|
+
name: string
|
|
353
|
+
owner_org: string
|
|
354
|
+
public?: boolean
|
|
355
|
+
secondaryVersionPercentage?: number
|
|
356
|
+
secondVersion?: number | null
|
|
357
|
+
updated_at?: string
|
|
358
|
+
version: number
|
|
359
|
+
}
|
|
360
|
+
Update: {
|
|
361
|
+
allow_dev?: boolean
|
|
362
|
+
allow_device_self_set?: boolean
|
|
363
|
+
allow_emulator?: boolean
|
|
364
|
+
android?: boolean
|
|
365
|
+
app_id?: string
|
|
366
|
+
beta?: boolean
|
|
367
|
+
created_at?: string
|
|
368
|
+
created_by?: string | null
|
|
369
|
+
disableAutoUpdate?: Database['public']['Enums']['disable_update']
|
|
370
|
+
disableAutoUpdateUnderNative?: boolean
|
|
371
|
+
enable_progressive_deploy?: boolean
|
|
372
|
+
enableAbTesting?: boolean
|
|
373
|
+
id?: number
|
|
374
|
+
ios?: boolean
|
|
375
|
+
name?: string
|
|
376
|
+
owner_org?: string
|
|
377
|
+
public?: boolean
|
|
378
|
+
secondaryVersionPercentage?: number
|
|
379
|
+
secondVersion?: number | null
|
|
380
|
+
updated_at?: string
|
|
381
|
+
version?: number
|
|
382
|
+
}
|
|
383
|
+
Relationships: [
|
|
384
|
+
{
|
|
385
|
+
foreignKeyName: 'channels_app_id_fkey'
|
|
386
|
+
columns: ['app_id']
|
|
387
|
+
isOneToOne: false
|
|
388
|
+
referencedRelation: 'apps'
|
|
389
|
+
referencedColumns: ['app_id']
|
|
390
|
+
},
|
|
391
|
+
{
|
|
392
|
+
foreignKeyName: 'channels_secondVersion_fkey'
|
|
393
|
+
columns: ['secondVersion']
|
|
394
|
+
isOneToOne: false
|
|
395
|
+
referencedRelation: 'app_versions'
|
|
396
|
+
referencedColumns: ['id']
|
|
397
|
+
},
|
|
398
|
+
{
|
|
399
|
+
foreignKeyName: 'channels_version_fkey'
|
|
400
|
+
columns: ['version']
|
|
401
|
+
isOneToOne: false
|
|
402
|
+
referencedRelation: 'app_versions'
|
|
403
|
+
referencedColumns: ['id']
|
|
404
|
+
},
|
|
405
|
+
{
|
|
406
|
+
foreignKeyName: 'owner_org_id_fkey'
|
|
407
|
+
columns: ['owner_org']
|
|
408
|
+
isOneToOne: false
|
|
409
|
+
referencedRelation: 'orgs'
|
|
410
|
+
referencedColumns: ['id']
|
|
411
|
+
},
|
|
412
|
+
]
|
|
413
|
+
}
|
|
414
|
+
clickhouse_app_usage_parm: {
|
|
415
|
+
Row: {
|
|
416
|
+
_app_list: string | null
|
|
417
|
+
_end_date: string | null
|
|
418
|
+
_start_date: string | null
|
|
419
|
+
app_id: string | null
|
|
420
|
+
bandwidth: number | null
|
|
421
|
+
date: string | null
|
|
422
|
+
fail: number | null
|
|
423
|
+
get: number | null
|
|
424
|
+
install: number | null
|
|
425
|
+
mau: number | null
|
|
426
|
+
storage_added: number | null
|
|
427
|
+
storage_deleted: number | null
|
|
428
|
+
uninstall: number | null
|
|
429
|
+
}
|
|
430
|
+
Insert: {
|
|
431
|
+
_app_list?: string | null
|
|
432
|
+
_end_date?: string | null
|
|
433
|
+
_start_date?: string | null
|
|
434
|
+
app_id?: string | null
|
|
435
|
+
bandwidth?: number | null
|
|
436
|
+
date?: string | null
|
|
437
|
+
fail?: number | null
|
|
438
|
+
get?: number | null
|
|
439
|
+
install?: number | null
|
|
440
|
+
mau?: number | null
|
|
441
|
+
storage_added?: number | null
|
|
442
|
+
storage_deleted?: number | null
|
|
443
|
+
uninstall?: number | null
|
|
444
|
+
}
|
|
445
|
+
Update: {
|
|
446
|
+
_app_list?: string | null
|
|
447
|
+
_end_date?: string | null
|
|
448
|
+
_start_date?: string | null
|
|
449
|
+
app_id?: string | null
|
|
450
|
+
bandwidth?: number | null
|
|
451
|
+
date?: string | null
|
|
452
|
+
fail?: number | null
|
|
453
|
+
get?: number | null
|
|
454
|
+
install?: number | null
|
|
455
|
+
mau?: number | null
|
|
456
|
+
storage_added?: number | null
|
|
457
|
+
storage_deleted?: number | null
|
|
458
|
+
uninstall?: number | null
|
|
459
|
+
}
|
|
460
|
+
Relationships: []
|
|
461
|
+
}
|
|
462
|
+
clickhouse_devices: {
|
|
463
|
+
Row: {
|
|
464
|
+
app_id: string | null
|
|
465
|
+
created_at: string | null
|
|
466
|
+
custom_id: string | null
|
|
467
|
+
device_id: string | null
|
|
468
|
+
is_emulator: boolean | null
|
|
469
|
+
is_prod: boolean | null
|
|
470
|
+
os_version: string | null
|
|
471
|
+
platform: string | null
|
|
472
|
+
plugin_version: string | null
|
|
473
|
+
updated_at: string | null
|
|
474
|
+
version: number | null
|
|
475
|
+
version_build: string | null
|
|
476
|
+
}
|
|
477
|
+
Insert: {
|
|
478
|
+
app_id?: string | null
|
|
479
|
+
created_at?: string | null
|
|
480
|
+
custom_id?: string | null
|
|
481
|
+
device_id?: string | null
|
|
482
|
+
is_emulator?: boolean | null
|
|
483
|
+
is_prod?: boolean | null
|
|
484
|
+
os_version?: string | null
|
|
485
|
+
platform?: string | null
|
|
486
|
+
plugin_version?: string | null
|
|
487
|
+
updated_at?: string | null
|
|
488
|
+
version?: number | null
|
|
489
|
+
version_build?: string | null
|
|
490
|
+
}
|
|
491
|
+
Update: {
|
|
492
|
+
app_id?: string | null
|
|
493
|
+
created_at?: string | null
|
|
494
|
+
custom_id?: string | null
|
|
495
|
+
device_id?: string | null
|
|
496
|
+
is_emulator?: boolean | null
|
|
497
|
+
is_prod?: boolean | null
|
|
498
|
+
os_version?: string | null
|
|
499
|
+
platform?: string | null
|
|
500
|
+
plugin_version?: string | null
|
|
501
|
+
updated_at?: string | null
|
|
502
|
+
version?: number | null
|
|
503
|
+
version_build?: string | null
|
|
504
|
+
}
|
|
505
|
+
Relationships: []
|
|
506
|
+
}
|
|
507
|
+
clickhouse_logs: {
|
|
508
|
+
Row: {
|
|
509
|
+
action: string | null
|
|
510
|
+
app_id: string | null
|
|
511
|
+
created_at: string | null
|
|
512
|
+
device_id: string | null
|
|
513
|
+
platform: string | null
|
|
514
|
+
version: number | null
|
|
515
|
+
version_build: string | null
|
|
516
|
+
}
|
|
517
|
+
Insert: {
|
|
518
|
+
action?: string | null
|
|
519
|
+
app_id?: string | null
|
|
520
|
+
created_at?: string | null
|
|
521
|
+
device_id?: string | null
|
|
522
|
+
platform?: string | null
|
|
523
|
+
version?: number | null
|
|
524
|
+
version_build?: string | null
|
|
525
|
+
}
|
|
526
|
+
Update: {
|
|
527
|
+
action?: string | null
|
|
528
|
+
app_id?: string | null
|
|
529
|
+
created_at?: string | null
|
|
530
|
+
device_id?: string | null
|
|
531
|
+
platform?: string | null
|
|
532
|
+
version?: number | null
|
|
533
|
+
version_build?: string | null
|
|
534
|
+
}
|
|
535
|
+
Relationships: []
|
|
536
|
+
}
|
|
537
|
+
daily_bandwidth: {
|
|
538
|
+
Row: {
|
|
539
|
+
app_id: string
|
|
540
|
+
bandwidth: number
|
|
541
|
+
date: string
|
|
542
|
+
id: number
|
|
543
|
+
}
|
|
544
|
+
Insert: {
|
|
545
|
+
app_id: string
|
|
546
|
+
bandwidth: number
|
|
547
|
+
date: string
|
|
548
|
+
id?: number
|
|
549
|
+
}
|
|
550
|
+
Update: {
|
|
551
|
+
app_id?: string
|
|
552
|
+
bandwidth?: number
|
|
553
|
+
date?: string
|
|
554
|
+
id?: number
|
|
555
|
+
}
|
|
556
|
+
Relationships: []
|
|
557
|
+
}
|
|
558
|
+
daily_mau: {
|
|
559
|
+
Row: {
|
|
560
|
+
app_id: string
|
|
561
|
+
date: string
|
|
562
|
+
id: number
|
|
563
|
+
mau: number
|
|
564
|
+
}
|
|
565
|
+
Insert: {
|
|
566
|
+
app_id: string
|
|
567
|
+
date: string
|
|
568
|
+
id?: number
|
|
569
|
+
mau: number
|
|
570
|
+
}
|
|
571
|
+
Update: {
|
|
572
|
+
app_id?: string
|
|
573
|
+
date?: string
|
|
574
|
+
id?: number
|
|
575
|
+
mau?: number
|
|
576
|
+
}
|
|
577
|
+
Relationships: []
|
|
578
|
+
}
|
|
579
|
+
daily_storage: {
|
|
580
|
+
Row: {
|
|
581
|
+
app_id: string
|
|
582
|
+
date: string
|
|
583
|
+
id: number
|
|
584
|
+
storage: number
|
|
585
|
+
}
|
|
586
|
+
Insert: {
|
|
587
|
+
app_id: string
|
|
588
|
+
date: string
|
|
589
|
+
id?: number
|
|
590
|
+
storage: number
|
|
591
|
+
}
|
|
592
|
+
Update: {
|
|
593
|
+
app_id?: string
|
|
594
|
+
date?: string
|
|
595
|
+
id?: number
|
|
596
|
+
storage?: number
|
|
597
|
+
}
|
|
598
|
+
Relationships: []
|
|
599
|
+
}
|
|
600
|
+
daily_version: {
|
|
601
|
+
Row: {
|
|
602
|
+
app_id: string
|
|
603
|
+
date: string
|
|
604
|
+
fail: number | null
|
|
605
|
+
get: number | null
|
|
606
|
+
install: number | null
|
|
607
|
+
uninstall: number | null
|
|
608
|
+
version_id: number
|
|
609
|
+
}
|
|
610
|
+
Insert: {
|
|
611
|
+
app_id: string
|
|
612
|
+
date: string
|
|
613
|
+
fail?: number | null
|
|
614
|
+
get?: number | null
|
|
615
|
+
install?: number | null
|
|
616
|
+
uninstall?: number | null
|
|
617
|
+
version_id: number
|
|
618
|
+
}
|
|
619
|
+
Update: {
|
|
620
|
+
app_id?: string
|
|
621
|
+
date?: string
|
|
622
|
+
fail?: number | null
|
|
623
|
+
get?: number | null
|
|
624
|
+
install?: number | null
|
|
625
|
+
uninstall?: number | null
|
|
626
|
+
version_id?: number
|
|
627
|
+
}
|
|
628
|
+
Relationships: []
|
|
629
|
+
}
|
|
630
|
+
deleted_account: {
|
|
631
|
+
Row: {
|
|
632
|
+
created_at: string | null
|
|
633
|
+
email: string
|
|
634
|
+
id: string
|
|
635
|
+
}
|
|
636
|
+
Insert: {
|
|
637
|
+
created_at?: string | null
|
|
638
|
+
email?: string
|
|
639
|
+
id?: string
|
|
640
|
+
}
|
|
641
|
+
Update: {
|
|
642
|
+
created_at?: string | null
|
|
643
|
+
email?: string
|
|
644
|
+
id?: string
|
|
645
|
+
}
|
|
646
|
+
Relationships: []
|
|
647
|
+
}
|
|
648
|
+
device_usage: {
|
|
649
|
+
Row: {
|
|
650
|
+
app_id: string
|
|
651
|
+
device_id: string
|
|
652
|
+
id: number
|
|
653
|
+
timestamp: string
|
|
654
|
+
}
|
|
655
|
+
Insert: {
|
|
656
|
+
app_id: string
|
|
657
|
+
device_id: string
|
|
658
|
+
id?: number
|
|
659
|
+
timestamp?: string
|
|
660
|
+
}
|
|
661
|
+
Update: {
|
|
662
|
+
app_id?: string
|
|
663
|
+
device_id?: string
|
|
664
|
+
id?: number
|
|
665
|
+
timestamp?: string
|
|
666
|
+
}
|
|
667
|
+
Relationships: []
|
|
668
|
+
}
|
|
669
|
+
devices: {
|
|
670
|
+
Row: {
|
|
671
|
+
app_id: string
|
|
672
|
+
created_at: string
|
|
673
|
+
custom_id: string
|
|
674
|
+
device_id: string
|
|
675
|
+
is_emulator: boolean | null
|
|
676
|
+
is_prod: boolean | null
|
|
677
|
+
os_version: string | null
|
|
678
|
+
platform: Database['public']['Enums']['platform_os'] | null
|
|
679
|
+
plugin_version: string
|
|
680
|
+
updated_at: string
|
|
681
|
+
version: number
|
|
682
|
+
version_build: string | null
|
|
683
|
+
}
|
|
684
|
+
Insert: {
|
|
685
|
+
app_id: string
|
|
686
|
+
created_at: string
|
|
687
|
+
custom_id?: string
|
|
688
|
+
device_id: string
|
|
689
|
+
is_emulator?: boolean | null
|
|
690
|
+
is_prod?: boolean | null
|
|
691
|
+
os_version?: string | null
|
|
692
|
+
platform?: Database['public']['Enums']['platform_os'] | null
|
|
693
|
+
plugin_version?: string
|
|
694
|
+
updated_at: string
|
|
695
|
+
version: number
|
|
696
|
+
version_build?: string | null
|
|
697
|
+
}
|
|
698
|
+
Update: {
|
|
699
|
+
app_id?: string
|
|
700
|
+
created_at?: string
|
|
701
|
+
custom_id?: string
|
|
702
|
+
device_id?: string
|
|
703
|
+
is_emulator?: boolean | null
|
|
704
|
+
is_prod?: boolean | null
|
|
705
|
+
os_version?: string | null
|
|
706
|
+
platform?: Database['public']['Enums']['platform_os'] | null
|
|
707
|
+
plugin_version?: string
|
|
708
|
+
updated_at?: string
|
|
709
|
+
version?: number
|
|
710
|
+
version_build?: string | null
|
|
711
|
+
}
|
|
712
|
+
Relationships: []
|
|
713
|
+
}
|
|
714
|
+
devices_override: {
|
|
715
|
+
Row: {
|
|
716
|
+
app_id: string
|
|
717
|
+
created_at: string | null
|
|
718
|
+
device_id: string
|
|
719
|
+
id: number
|
|
720
|
+
owner_org: string
|
|
721
|
+
updated_at: string | null
|
|
722
|
+
version: number
|
|
723
|
+
}
|
|
724
|
+
Insert: {
|
|
725
|
+
app_id: string
|
|
726
|
+
created_at?: string | null
|
|
727
|
+
device_id: string
|
|
728
|
+
id?: number
|
|
729
|
+
owner_org: string
|
|
730
|
+
updated_at?: string | null
|
|
731
|
+
version: number
|
|
732
|
+
}
|
|
733
|
+
Update: {
|
|
734
|
+
app_id?: string
|
|
735
|
+
created_at?: string | null
|
|
736
|
+
device_id?: string
|
|
737
|
+
id?: number
|
|
738
|
+
owner_org?: string
|
|
739
|
+
updated_at?: string | null
|
|
740
|
+
version?: number
|
|
741
|
+
}
|
|
742
|
+
Relationships: [
|
|
743
|
+
{
|
|
744
|
+
foreignKeyName: 'devices_override_app_id_fkey'
|
|
745
|
+
columns: ['app_id']
|
|
746
|
+
isOneToOne: false
|
|
747
|
+
referencedRelation: 'apps'
|
|
748
|
+
referencedColumns: ['app_id']
|
|
749
|
+
},
|
|
750
|
+
{
|
|
751
|
+
foreignKeyName: 'devices_override_version_fkey'
|
|
752
|
+
columns: ['version']
|
|
753
|
+
isOneToOne: false
|
|
754
|
+
referencedRelation: 'app_versions'
|
|
755
|
+
referencedColumns: ['id']
|
|
756
|
+
},
|
|
757
|
+
{
|
|
758
|
+
foreignKeyName: 'owner_org_id_fkey'
|
|
759
|
+
columns: ['owner_org']
|
|
760
|
+
isOneToOne: false
|
|
761
|
+
referencedRelation: 'orgs'
|
|
762
|
+
referencedColumns: ['id']
|
|
763
|
+
},
|
|
764
|
+
]
|
|
765
|
+
}
|
|
766
|
+
global_stats: {
|
|
767
|
+
Row: {
|
|
768
|
+
apps: number
|
|
769
|
+
apps_active: number | null
|
|
770
|
+
created_at: string | null
|
|
771
|
+
date_id: string
|
|
772
|
+
need_upgrade: number | null
|
|
773
|
+
not_paying: number | null
|
|
774
|
+
onboarded: number | null
|
|
775
|
+
paying: number | null
|
|
776
|
+
paying_monthly: number | null
|
|
777
|
+
paying_yearly: number | null
|
|
778
|
+
stars: number
|
|
779
|
+
trial: number | null
|
|
780
|
+
updates: number
|
|
781
|
+
users: number | null
|
|
782
|
+
users_active: number | null
|
|
783
|
+
}
|
|
784
|
+
Insert: {
|
|
785
|
+
apps: number
|
|
786
|
+
apps_active?: number | null
|
|
787
|
+
created_at?: string | null
|
|
788
|
+
date_id: string
|
|
789
|
+
need_upgrade?: number | null
|
|
790
|
+
not_paying?: number | null
|
|
791
|
+
onboarded?: number | null
|
|
792
|
+
paying?: number | null
|
|
793
|
+
paying_monthly?: number | null
|
|
794
|
+
paying_yearly?: number | null
|
|
795
|
+
stars: number
|
|
796
|
+
trial?: number | null
|
|
797
|
+
updates: number
|
|
798
|
+
users?: number | null
|
|
799
|
+
users_active?: number | null
|
|
800
|
+
}
|
|
801
|
+
Update: {
|
|
802
|
+
apps?: number
|
|
803
|
+
apps_active?: number | null
|
|
804
|
+
created_at?: string | null
|
|
805
|
+
date_id?: string
|
|
806
|
+
need_upgrade?: number | null
|
|
807
|
+
not_paying?: number | null
|
|
808
|
+
onboarded?: number | null
|
|
809
|
+
paying?: number | null
|
|
810
|
+
paying_monthly?: number | null
|
|
811
|
+
paying_yearly?: number | null
|
|
812
|
+
stars?: number
|
|
813
|
+
trial?: number | null
|
|
814
|
+
updates?: number
|
|
815
|
+
users?: number | null
|
|
816
|
+
users_active?: number | null
|
|
817
|
+
}
|
|
818
|
+
Relationships: []
|
|
819
|
+
}
|
|
820
|
+
job_queue: {
|
|
821
|
+
Row: {
|
|
822
|
+
created_at: string | null
|
|
823
|
+
extra_info: Json
|
|
824
|
+
function_name: string | null
|
|
825
|
+
function_type: string | null
|
|
826
|
+
job_id: number
|
|
827
|
+
job_type: string
|
|
828
|
+
payload: string
|
|
829
|
+
request_id: number | null
|
|
830
|
+
status: Database['public']['Enums']['queue_job_status']
|
|
831
|
+
}
|
|
832
|
+
Insert: {
|
|
833
|
+
created_at?: string | null
|
|
834
|
+
extra_info?: Json
|
|
835
|
+
function_name?: string | null
|
|
836
|
+
function_type?: string | null
|
|
837
|
+
job_id?: number
|
|
838
|
+
job_type: string
|
|
839
|
+
payload: string
|
|
840
|
+
request_id?: number | null
|
|
841
|
+
status?: Database['public']['Enums']['queue_job_status']
|
|
842
|
+
}
|
|
843
|
+
Update: {
|
|
844
|
+
created_at?: string | null
|
|
845
|
+
extra_info?: Json
|
|
846
|
+
function_name?: string | null
|
|
847
|
+
function_type?: string | null
|
|
848
|
+
job_id?: number
|
|
849
|
+
job_type?: string
|
|
850
|
+
payload?: string
|
|
851
|
+
request_id?: number | null
|
|
852
|
+
status?: Database['public']['Enums']['queue_job_status']
|
|
853
|
+
}
|
|
854
|
+
Relationships: []
|
|
855
|
+
}
|
|
856
|
+
notifications: {
|
|
857
|
+
Row: {
|
|
858
|
+
created_at: string | null
|
|
859
|
+
event: string
|
|
860
|
+
last_send_at: string
|
|
861
|
+
owner_org: string
|
|
862
|
+
total_send: number
|
|
863
|
+
uniq_id: string
|
|
864
|
+
updated_at: string | null
|
|
865
|
+
}
|
|
866
|
+
Insert: {
|
|
867
|
+
created_at?: string | null
|
|
868
|
+
event: string
|
|
869
|
+
last_send_at?: string
|
|
870
|
+
owner_org: string
|
|
871
|
+
total_send?: number
|
|
872
|
+
uniq_id: string
|
|
873
|
+
updated_at?: string | null
|
|
874
|
+
}
|
|
875
|
+
Update: {
|
|
876
|
+
created_at?: string | null
|
|
877
|
+
event?: string
|
|
878
|
+
last_send_at?: string
|
|
879
|
+
owner_org?: string
|
|
880
|
+
total_send?: number
|
|
881
|
+
uniq_id?: string
|
|
882
|
+
updated_at?: string | null
|
|
883
|
+
}
|
|
884
|
+
Relationships: [
|
|
885
|
+
{
|
|
886
|
+
foreignKeyName: 'owner_org_id_fkey'
|
|
887
|
+
columns: ['owner_org']
|
|
888
|
+
isOneToOne: false
|
|
889
|
+
referencedRelation: 'orgs'
|
|
890
|
+
referencedColumns: ['id']
|
|
891
|
+
},
|
|
892
|
+
]
|
|
893
|
+
}
|
|
894
|
+
org_users: {
|
|
895
|
+
Row: {
|
|
896
|
+
app_id: string | null
|
|
897
|
+
channel_id: number | null
|
|
898
|
+
created_at: string | null
|
|
899
|
+
id: number
|
|
900
|
+
org_id: string
|
|
901
|
+
updated_at: string | null
|
|
902
|
+
user_id: string
|
|
903
|
+
user_right: Database['public']['Enums']['user_min_right'] | null
|
|
904
|
+
}
|
|
905
|
+
Insert: {
|
|
906
|
+
app_id?: string | null
|
|
907
|
+
channel_id?: number | null
|
|
908
|
+
created_at?: string | null
|
|
909
|
+
id?: number
|
|
910
|
+
org_id: string
|
|
911
|
+
updated_at?: string | null
|
|
912
|
+
user_id: string
|
|
913
|
+
user_right?: Database['public']['Enums']['user_min_right'] | null
|
|
914
|
+
}
|
|
915
|
+
Update: {
|
|
916
|
+
app_id?: string | null
|
|
917
|
+
channel_id?: number | null
|
|
918
|
+
created_at?: string | null
|
|
919
|
+
id?: number
|
|
920
|
+
org_id?: string
|
|
921
|
+
updated_at?: string | null
|
|
922
|
+
user_id?: string
|
|
923
|
+
user_right?: Database['public']['Enums']['user_min_right'] | null
|
|
924
|
+
}
|
|
925
|
+
Relationships: [
|
|
926
|
+
{
|
|
927
|
+
foreignKeyName: 'org_users_app_id_fkey'
|
|
928
|
+
columns: ['app_id']
|
|
929
|
+
isOneToOne: false
|
|
930
|
+
referencedRelation: 'apps'
|
|
931
|
+
referencedColumns: ['app_id']
|
|
932
|
+
},
|
|
933
|
+
{
|
|
934
|
+
foreignKeyName: 'org_users_channel_id_fkey'
|
|
935
|
+
columns: ['channel_id']
|
|
936
|
+
isOneToOne: false
|
|
937
|
+
referencedRelation: 'channels'
|
|
938
|
+
referencedColumns: ['id']
|
|
939
|
+
},
|
|
940
|
+
{
|
|
941
|
+
foreignKeyName: 'org_users_org_id_fkey'
|
|
942
|
+
columns: ['org_id']
|
|
943
|
+
isOneToOne: false
|
|
944
|
+
referencedRelation: 'orgs'
|
|
945
|
+
referencedColumns: ['id']
|
|
946
|
+
},
|
|
947
|
+
{
|
|
948
|
+
foreignKeyName: 'org_users_user_id_fkey'
|
|
949
|
+
columns: ['user_id']
|
|
950
|
+
isOneToOne: false
|
|
951
|
+
referencedRelation: 'users'
|
|
952
|
+
referencedColumns: ['id']
|
|
953
|
+
},
|
|
954
|
+
]
|
|
955
|
+
}
|
|
956
|
+
orgs: {
|
|
957
|
+
Row: {
|
|
958
|
+
created_at: string | null
|
|
959
|
+
created_by: string
|
|
960
|
+
customer_id: string | null
|
|
961
|
+
id: string
|
|
962
|
+
logo: string | null
|
|
963
|
+
management_email: string
|
|
964
|
+
name: string
|
|
965
|
+
updated_at: string | null
|
|
966
|
+
}
|
|
967
|
+
Insert: {
|
|
968
|
+
created_at?: string | null
|
|
969
|
+
created_by: string
|
|
970
|
+
customer_id?: string | null
|
|
971
|
+
id?: string
|
|
972
|
+
logo?: string | null
|
|
973
|
+
management_email: string
|
|
974
|
+
name: string
|
|
975
|
+
updated_at?: string | null
|
|
976
|
+
}
|
|
977
|
+
Update: {
|
|
978
|
+
created_at?: string | null
|
|
979
|
+
created_by?: string
|
|
980
|
+
customer_id?: string | null
|
|
981
|
+
id?: string
|
|
982
|
+
logo?: string | null
|
|
983
|
+
management_email?: string
|
|
984
|
+
name?: string
|
|
985
|
+
updated_at?: string | null
|
|
986
|
+
}
|
|
987
|
+
Relationships: [
|
|
988
|
+
{
|
|
989
|
+
foreignKeyName: 'orgs_created_by_fkey'
|
|
990
|
+
columns: ['created_by']
|
|
991
|
+
isOneToOne: false
|
|
992
|
+
referencedRelation: 'users'
|
|
993
|
+
referencedColumns: ['id']
|
|
994
|
+
},
|
|
995
|
+
{
|
|
996
|
+
foreignKeyName: 'orgs_customer_id_fkey'
|
|
997
|
+
columns: ['customer_id']
|
|
998
|
+
isOneToOne: true
|
|
999
|
+
referencedRelation: 'stripe_info'
|
|
1000
|
+
referencedColumns: ['customer_id']
|
|
1001
|
+
},
|
|
1002
|
+
]
|
|
1003
|
+
}
|
|
1004
|
+
plans: {
|
|
1005
|
+
Row: {
|
|
1006
|
+
bandwidth: number
|
|
1007
|
+
bandwidth_unit: number | null
|
|
1008
|
+
created_at: string
|
|
1009
|
+
description: string
|
|
1010
|
+
id: string
|
|
1011
|
+
market_desc: string | null
|
|
1012
|
+
mau: number
|
|
1013
|
+
mau_unit: number | null
|
|
1014
|
+
name: string
|
|
1015
|
+
price_m: number
|
|
1016
|
+
price_m_bandwidth_id: string | null
|
|
1017
|
+
price_m_id: string
|
|
1018
|
+
price_m_mau_id: string | null
|
|
1019
|
+
price_m_storage_id: string | null
|
|
1020
|
+
price_y: number
|
|
1021
|
+
price_y_id: string
|
|
1022
|
+
storage: number
|
|
1023
|
+
storage_unit: number | null
|
|
1024
|
+
stripe_id: string
|
|
1025
|
+
updated_at: string
|
|
1026
|
+
}
|
|
1027
|
+
Insert: {
|
|
1028
|
+
bandwidth: number
|
|
1029
|
+
bandwidth_unit?: number | null
|
|
1030
|
+
created_at?: string
|
|
1031
|
+
description?: string
|
|
1032
|
+
id?: string
|
|
1033
|
+
market_desc?: string | null
|
|
1034
|
+
mau?: number
|
|
1035
|
+
mau_unit?: number | null
|
|
1036
|
+
name?: string
|
|
1037
|
+
price_m?: number
|
|
1038
|
+
price_m_bandwidth_id?: string | null
|
|
1039
|
+
price_m_id: string
|
|
1040
|
+
price_m_mau_id?: string | null
|
|
1041
|
+
price_m_storage_id?: string | null
|
|
1042
|
+
price_y?: number
|
|
1043
|
+
price_y_id: string
|
|
1044
|
+
storage: number
|
|
1045
|
+
storage_unit?: number | null
|
|
1046
|
+
stripe_id?: string
|
|
1047
|
+
updated_at?: string
|
|
1048
|
+
}
|
|
1049
|
+
Update: {
|
|
1050
|
+
bandwidth?: number
|
|
1051
|
+
bandwidth_unit?: number | null
|
|
1052
|
+
created_at?: string
|
|
1053
|
+
description?: string
|
|
1054
|
+
id?: string
|
|
1055
|
+
market_desc?: string | null
|
|
1056
|
+
mau?: number
|
|
1057
|
+
mau_unit?: number | null
|
|
1058
|
+
name?: string
|
|
1059
|
+
price_m?: number
|
|
1060
|
+
price_m_bandwidth_id?: string | null
|
|
1061
|
+
price_m_id?: string
|
|
1062
|
+
price_m_mau_id?: string | null
|
|
1063
|
+
price_m_storage_id?: string | null
|
|
1064
|
+
price_y?: number
|
|
1065
|
+
price_y_id?: string
|
|
1066
|
+
storage?: number
|
|
1067
|
+
storage_unit?: number | null
|
|
1068
|
+
stripe_id?: string
|
|
1069
|
+
updated_at?: string
|
|
1070
|
+
}
|
|
1071
|
+
Relationships: []
|
|
1072
|
+
}
|
|
1073
|
+
stats: {
|
|
1074
|
+
Row: {
|
|
1075
|
+
action: string
|
|
1076
|
+
app_id: string
|
|
1077
|
+
created_at: string
|
|
1078
|
+
device_id: string
|
|
1079
|
+
platform: Database['public']['Enums']['platform_os']
|
|
1080
|
+
version: number
|
|
1081
|
+
version_build: string
|
|
1082
|
+
}
|
|
1083
|
+
Insert: {
|
|
1084
|
+
action: string
|
|
1085
|
+
app_id: string
|
|
1086
|
+
created_at: string
|
|
1087
|
+
device_id: string
|
|
1088
|
+
platform: Database['public']['Enums']['platform_os']
|
|
1089
|
+
version: number
|
|
1090
|
+
version_build: string
|
|
1091
|
+
}
|
|
1092
|
+
Update: {
|
|
1093
|
+
action?: string
|
|
1094
|
+
app_id?: string
|
|
1095
|
+
created_at?: string
|
|
1096
|
+
device_id?: string
|
|
1097
|
+
platform?: Database['public']['Enums']['platform_os']
|
|
1098
|
+
version?: number
|
|
1099
|
+
version_build?: string
|
|
1100
|
+
}
|
|
1101
|
+
Relationships: []
|
|
1102
|
+
}
|
|
1103
|
+
storage_usage: {
|
|
1104
|
+
Row: {
|
|
1105
|
+
app_id: string
|
|
1106
|
+
device_id: string
|
|
1107
|
+
file_size: number
|
|
1108
|
+
id: number
|
|
1109
|
+
timestamp: string
|
|
1110
|
+
}
|
|
1111
|
+
Insert: {
|
|
1112
|
+
app_id: string
|
|
1113
|
+
device_id: string
|
|
1114
|
+
file_size: number
|
|
1115
|
+
id?: number
|
|
1116
|
+
timestamp?: string
|
|
1117
|
+
}
|
|
1118
|
+
Update: {
|
|
1119
|
+
app_id?: string
|
|
1120
|
+
device_id?: string
|
|
1121
|
+
file_size?: number
|
|
1122
|
+
id?: number
|
|
1123
|
+
timestamp?: string
|
|
1124
|
+
}
|
|
1125
|
+
Relationships: []
|
|
1126
|
+
}
|
|
1127
|
+
stripe_info: {
|
|
1128
|
+
Row: {
|
|
1129
|
+
created_at: string
|
|
1130
|
+
customer_id: string
|
|
1131
|
+
is_good_plan: boolean | null
|
|
1132
|
+
plan_usage: number | null
|
|
1133
|
+
price_id: string | null
|
|
1134
|
+
product_id: string
|
|
1135
|
+
status: Database['public']['Enums']['stripe_status'] | null
|
|
1136
|
+
subscription_anchor_end: string
|
|
1137
|
+
subscription_anchor_start: string
|
|
1138
|
+
subscription_id: string | null
|
|
1139
|
+
subscription_metered: Json
|
|
1140
|
+
trial_at: string
|
|
1141
|
+
updated_at: string
|
|
1142
|
+
}
|
|
1143
|
+
Insert: {
|
|
1144
|
+
created_at?: string
|
|
1145
|
+
customer_id: string
|
|
1146
|
+
is_good_plan?: boolean | null
|
|
1147
|
+
plan_usage?: number | null
|
|
1148
|
+
price_id?: string | null
|
|
1149
|
+
product_id: string
|
|
1150
|
+
status?: Database['public']['Enums']['stripe_status'] | null
|
|
1151
|
+
subscription_anchor_end?: string
|
|
1152
|
+
subscription_anchor_start?: string
|
|
1153
|
+
subscription_id?: string | null
|
|
1154
|
+
subscription_metered?: Json
|
|
1155
|
+
trial_at?: string
|
|
1156
|
+
updated_at?: string
|
|
1157
|
+
}
|
|
1158
|
+
Update: {
|
|
1159
|
+
created_at?: string
|
|
1160
|
+
customer_id?: string
|
|
1161
|
+
is_good_plan?: boolean | null
|
|
1162
|
+
plan_usage?: number | null
|
|
1163
|
+
price_id?: string | null
|
|
1164
|
+
product_id?: string
|
|
1165
|
+
status?: Database['public']['Enums']['stripe_status'] | null
|
|
1166
|
+
subscription_anchor_end?: string
|
|
1167
|
+
subscription_anchor_start?: string
|
|
1168
|
+
subscription_id?: string | null
|
|
1169
|
+
subscription_metered?: Json
|
|
1170
|
+
trial_at?: string
|
|
1171
|
+
updated_at?: string
|
|
1172
|
+
}
|
|
1173
|
+
Relationships: [
|
|
1174
|
+
{
|
|
1175
|
+
foreignKeyName: 'stripe_info_product_id_fkey'
|
|
1176
|
+
columns: ['product_id']
|
|
1177
|
+
isOneToOne: false
|
|
1178
|
+
referencedRelation: 'plans'
|
|
1179
|
+
referencedColumns: ['stripe_id']
|
|
1180
|
+
},
|
|
1181
|
+
]
|
|
1182
|
+
}
|
|
1183
|
+
users: {
|
|
1184
|
+
Row: {
|
|
1185
|
+
billing_email: string | null
|
|
1186
|
+
country: string | null
|
|
1187
|
+
created_at: string | null
|
|
1188
|
+
customer_id: string | null
|
|
1189
|
+
email: string
|
|
1190
|
+
enableNotifications: boolean
|
|
1191
|
+
first_name: string | null
|
|
1192
|
+
id: string
|
|
1193
|
+
image_url: string | null
|
|
1194
|
+
last_name: string | null
|
|
1195
|
+
legalAccepted: boolean
|
|
1196
|
+
optForNewsletters: boolean
|
|
1197
|
+
updated_at: string | null
|
|
1198
|
+
}
|
|
1199
|
+
Insert: {
|
|
1200
|
+
billing_email?: string | null
|
|
1201
|
+
country?: string | null
|
|
1202
|
+
created_at?: string | null
|
|
1203
|
+
customer_id?: string | null
|
|
1204
|
+
email: string
|
|
1205
|
+
enableNotifications?: boolean
|
|
1206
|
+
first_name?: string | null
|
|
1207
|
+
id: string
|
|
1208
|
+
image_url?: string | null
|
|
1209
|
+
last_name?: string | null
|
|
1210
|
+
legalAccepted?: boolean
|
|
1211
|
+
optForNewsletters?: boolean
|
|
1212
|
+
updated_at?: string | null
|
|
1213
|
+
}
|
|
1214
|
+
Update: {
|
|
1215
|
+
billing_email?: string | null
|
|
1216
|
+
country?: string | null
|
|
1217
|
+
created_at?: string | null
|
|
1218
|
+
customer_id?: string | null
|
|
1219
|
+
email?: string
|
|
1220
|
+
enableNotifications?: boolean
|
|
1221
|
+
first_name?: string | null
|
|
1222
|
+
id?: string
|
|
1223
|
+
image_url?: string | null
|
|
1224
|
+
last_name?: string | null
|
|
1225
|
+
legalAccepted?: boolean
|
|
1226
|
+
optForNewsletters?: boolean
|
|
1227
|
+
updated_at?: string | null
|
|
1228
|
+
}
|
|
1229
|
+
Relationships: [
|
|
1230
|
+
{
|
|
1231
|
+
foreignKeyName: 'users_customer_id_fkey'
|
|
1232
|
+
columns: ['customer_id']
|
|
1233
|
+
isOneToOne: true
|
|
1234
|
+
referencedRelation: 'stripe_info'
|
|
1235
|
+
referencedColumns: ['customer_id']
|
|
1236
|
+
},
|
|
1237
|
+
{
|
|
1238
|
+
foreignKeyName: 'users_id_fkey'
|
|
1239
|
+
columns: ['id']
|
|
1240
|
+
isOneToOne: true
|
|
1241
|
+
referencedRelation: 'users'
|
|
1242
|
+
referencedColumns: ['id']
|
|
1243
|
+
},
|
|
1244
|
+
]
|
|
1245
|
+
}
|
|
1246
|
+
version_meta: {
|
|
1247
|
+
Row: {
|
|
1248
|
+
app_id: string
|
|
1249
|
+
size: number
|
|
1250
|
+
timestamp: string
|
|
1251
|
+
version_id: number
|
|
1252
|
+
}
|
|
1253
|
+
Insert: {
|
|
1254
|
+
app_id: string
|
|
1255
|
+
size: number
|
|
1256
|
+
timestamp?: string
|
|
1257
|
+
version_id: number
|
|
1258
|
+
}
|
|
1259
|
+
Update: {
|
|
1260
|
+
app_id?: string
|
|
1261
|
+
size?: number
|
|
1262
|
+
timestamp?: string
|
|
1263
|
+
version_id?: number
|
|
1264
|
+
}
|
|
1265
|
+
Relationships: []
|
|
1266
|
+
}
|
|
1267
|
+
version_usage: {
|
|
1268
|
+
Row: {
|
|
1269
|
+
action: string
|
|
1270
|
+
app_id: string
|
|
1271
|
+
timestamp: string
|
|
1272
|
+
version_id: number
|
|
1273
|
+
}
|
|
1274
|
+
Insert: {
|
|
1275
|
+
action: string
|
|
1276
|
+
app_id: string
|
|
1277
|
+
timestamp?: string
|
|
1278
|
+
version_id: number
|
|
1279
|
+
}
|
|
1280
|
+
Update: {
|
|
1281
|
+
action?: string
|
|
1282
|
+
app_id?: string
|
|
1283
|
+
timestamp?: string
|
|
1284
|
+
version_id?: number
|
|
1285
|
+
}
|
|
1286
|
+
Relationships: []
|
|
1287
|
+
}
|
|
1288
|
+
workers: {
|
|
1289
|
+
Row: {
|
|
1290
|
+
id: number
|
|
1291
|
+
locked: boolean
|
|
1292
|
+
}
|
|
1293
|
+
Insert: {
|
|
1294
|
+
id?: number
|
|
1295
|
+
locked?: boolean
|
|
1296
|
+
}
|
|
1297
|
+
Update: {
|
|
1298
|
+
id?: number
|
|
1299
|
+
locked?: boolean
|
|
1300
|
+
}
|
|
1301
|
+
Relationships: []
|
|
1302
|
+
}
|
|
1303
|
+
}
|
|
1304
|
+
Views: {
|
|
1305
|
+
[_ in never]: never
|
|
1306
|
+
}
|
|
1307
|
+
Functions: {
|
|
1308
|
+
accept_invitation_to_org: {
|
|
1309
|
+
Args: {
|
|
1310
|
+
org_id: string
|
|
1311
|
+
}
|
|
1312
|
+
Returns: string
|
|
1313
|
+
}
|
|
1314
|
+
calculate_daily_app_usage: {
|
|
1315
|
+
Args: Record<PropertyKey, never>
|
|
1316
|
+
Returns: undefined
|
|
1317
|
+
}
|
|
1318
|
+
check_min_rights:
|
|
1319
|
+
| {
|
|
1320
|
+
Args: {
|
|
1321
|
+
min_right: Database['public']['Enums']['user_min_right']
|
|
1322
|
+
org_id: string
|
|
1323
|
+
app_id: string
|
|
1324
|
+
channel_id: number
|
|
1325
|
+
}
|
|
1326
|
+
Returns: boolean
|
|
1327
|
+
}
|
|
1328
|
+
| {
|
|
1329
|
+
Args: {
|
|
1330
|
+
min_right: Database['public']['Enums']['user_min_right']
|
|
1331
|
+
user_id: string
|
|
1332
|
+
org_id: string
|
|
1333
|
+
app_id: string
|
|
1334
|
+
channel_id: number
|
|
1335
|
+
}
|
|
1336
|
+
Returns: boolean
|
|
1337
|
+
}
|
|
1338
|
+
convert_bytes_to_gb: {
|
|
1339
|
+
Args: {
|
|
1340
|
+
byt: number
|
|
1341
|
+
}
|
|
1342
|
+
Returns: number
|
|
1343
|
+
}
|
|
1344
|
+
convert_bytes_to_mb: {
|
|
1345
|
+
Args: {
|
|
1346
|
+
byt: number
|
|
1347
|
+
}
|
|
1348
|
+
Returns: number
|
|
1349
|
+
}
|
|
1350
|
+
convert_gb_to_bytes: {
|
|
1351
|
+
Args: {
|
|
1352
|
+
gb: number
|
|
1353
|
+
}
|
|
1354
|
+
Returns: number
|
|
1355
|
+
}
|
|
1356
|
+
convert_mb_to_bytes: {
|
|
1357
|
+
Args: {
|
|
1358
|
+
gb: number
|
|
1359
|
+
}
|
|
1360
|
+
Returns: number
|
|
1361
|
+
}
|
|
1362
|
+
convert_number_to_percent: {
|
|
1363
|
+
Args: {
|
|
1364
|
+
val: number
|
|
1365
|
+
max_val: number
|
|
1366
|
+
}
|
|
1367
|
+
Returns: number
|
|
1368
|
+
}
|
|
1369
|
+
count_active_users: {
|
|
1370
|
+
Args: {
|
|
1371
|
+
app_ids: string[]
|
|
1372
|
+
}
|
|
1373
|
+
Returns: number
|
|
1374
|
+
}
|
|
1375
|
+
count_all_need_upgrade: {
|
|
1376
|
+
Args: Record<PropertyKey, never>
|
|
1377
|
+
Returns: number
|
|
1378
|
+
}
|
|
1379
|
+
count_all_onboarded: {
|
|
1380
|
+
Args: Record<PropertyKey, never>
|
|
1381
|
+
Returns: number
|
|
1382
|
+
}
|
|
1383
|
+
count_all_paying: {
|
|
1384
|
+
Args: Record<PropertyKey, never>
|
|
1385
|
+
Returns: number
|
|
1386
|
+
}
|
|
1387
|
+
count_all_plans_v2: {
|
|
1388
|
+
Args: Record<PropertyKey, never>
|
|
1389
|
+
Returns: {
|
|
1390
|
+
plan_name: string
|
|
1391
|
+
count: number
|
|
1392
|
+
}[]
|
|
1393
|
+
}
|
|
1394
|
+
delete_failed_jobs: {
|
|
1395
|
+
Args: Record<PropertyKey, never>
|
|
1396
|
+
Returns: undefined
|
|
1397
|
+
}
|
|
1398
|
+
delete_user: {
|
|
1399
|
+
Args: Record<PropertyKey, never>
|
|
1400
|
+
Returns: undefined
|
|
1401
|
+
}
|
|
1402
|
+
exist_app_v2: {
|
|
1403
|
+
Args: {
|
|
1404
|
+
appid: string
|
|
1405
|
+
}
|
|
1406
|
+
Returns: boolean
|
|
1407
|
+
}
|
|
1408
|
+
exist_app_versions: {
|
|
1409
|
+
Args: {
|
|
1410
|
+
appid: string
|
|
1411
|
+
name_version: string
|
|
1412
|
+
apikey: string
|
|
1413
|
+
}
|
|
1414
|
+
Returns: boolean
|
|
1415
|
+
}
|
|
1416
|
+
find_best_plan_v3: {
|
|
1417
|
+
Args: {
|
|
1418
|
+
mau: number
|
|
1419
|
+
bandwidth: number
|
|
1420
|
+
storage: number
|
|
1421
|
+
}
|
|
1422
|
+
Returns: string
|
|
1423
|
+
}
|
|
1424
|
+
find_fit_plan_v3: {
|
|
1425
|
+
Args: {
|
|
1426
|
+
mau: number
|
|
1427
|
+
bandwidth: number
|
|
1428
|
+
storage: number
|
|
1429
|
+
}
|
|
1430
|
+
Returns: {
|
|
1431
|
+
name: string
|
|
1432
|
+
}[]
|
|
1433
|
+
}
|
|
1434
|
+
get_apikey: {
|
|
1435
|
+
Args: Record<PropertyKey, never>
|
|
1436
|
+
Returns: string
|
|
1437
|
+
}
|
|
1438
|
+
get_app_metrics:
|
|
1439
|
+
| {
|
|
1440
|
+
Args: {
|
|
1441
|
+
org_id: string
|
|
1442
|
+
}
|
|
1443
|
+
Returns: {
|
|
1444
|
+
app_id: string
|
|
1445
|
+
date: string
|
|
1446
|
+
mau: number
|
|
1447
|
+
storage: number
|
|
1448
|
+
bandwidth: number
|
|
1449
|
+
get: number
|
|
1450
|
+
fail: number
|
|
1451
|
+
install: number
|
|
1452
|
+
uninstall: number
|
|
1453
|
+
}[]
|
|
1454
|
+
}
|
|
1455
|
+
| {
|
|
1456
|
+
Args: {
|
|
1457
|
+
org_id: string
|
|
1458
|
+
start_date: string
|
|
1459
|
+
end_date: string
|
|
1460
|
+
}
|
|
1461
|
+
Returns: {
|
|
1462
|
+
app_id: string
|
|
1463
|
+
date: string
|
|
1464
|
+
mau: number
|
|
1465
|
+
storage: number
|
|
1466
|
+
bandwidth: number
|
|
1467
|
+
get: number
|
|
1468
|
+
fail: number
|
|
1469
|
+
install: number
|
|
1470
|
+
uninstall: number
|
|
1471
|
+
}[]
|
|
1472
|
+
}
|
|
1473
|
+
get_app_versions: {
|
|
1474
|
+
Args: {
|
|
1475
|
+
appid: string
|
|
1476
|
+
name_version: string
|
|
1477
|
+
apikey: string
|
|
1478
|
+
}
|
|
1479
|
+
Returns: number
|
|
1480
|
+
}
|
|
1481
|
+
get_cloudflare_function_url: {
|
|
1482
|
+
Args: Record<PropertyKey, never>
|
|
1483
|
+
Returns: string
|
|
1484
|
+
}
|
|
1485
|
+
get_current_plan_max_org: {
|
|
1486
|
+
Args: {
|
|
1487
|
+
orgid: string
|
|
1488
|
+
}
|
|
1489
|
+
Returns: {
|
|
1490
|
+
mau: number
|
|
1491
|
+
bandwidth: number
|
|
1492
|
+
storage: number
|
|
1493
|
+
}[]
|
|
1494
|
+
}
|
|
1495
|
+
get_current_plan_name_org: {
|
|
1496
|
+
Args: {
|
|
1497
|
+
orgid: string
|
|
1498
|
+
}
|
|
1499
|
+
Returns: string
|
|
1500
|
+
}
|
|
1501
|
+
get_customer_counts: {
|
|
1502
|
+
Args: Record<PropertyKey, never>
|
|
1503
|
+
Returns: {
|
|
1504
|
+
yearly: number
|
|
1505
|
+
monthly: number
|
|
1506
|
+
total: number
|
|
1507
|
+
}[]
|
|
1508
|
+
}
|
|
1509
|
+
get_cycle_info_org: {
|
|
1510
|
+
Args: {
|
|
1511
|
+
orgid: string
|
|
1512
|
+
}
|
|
1513
|
+
Returns: {
|
|
1514
|
+
subscription_anchor_start: string
|
|
1515
|
+
subscription_anchor_end: string
|
|
1516
|
+
}[]
|
|
1517
|
+
}
|
|
1518
|
+
get_db_url: {
|
|
1519
|
+
Args: Record<PropertyKey, never>
|
|
1520
|
+
Returns: string
|
|
1521
|
+
}
|
|
1522
|
+
get_global_metrics:
|
|
1523
|
+
| {
|
|
1524
|
+
Args: {
|
|
1525
|
+
org_id: string
|
|
1526
|
+
}
|
|
1527
|
+
Returns: {
|
|
1528
|
+
date: string
|
|
1529
|
+
mau: number
|
|
1530
|
+
storage: number
|
|
1531
|
+
bandwidth: number
|
|
1532
|
+
get: number
|
|
1533
|
+
fail: number
|
|
1534
|
+
install: number
|
|
1535
|
+
uninstall: number
|
|
1536
|
+
}[]
|
|
1537
|
+
}
|
|
1538
|
+
| {
|
|
1539
|
+
Args: {
|
|
1540
|
+
org_id: string
|
|
1541
|
+
start_date: string
|
|
1542
|
+
end_date: string
|
|
1543
|
+
}
|
|
1544
|
+
Returns: {
|
|
1545
|
+
date: string
|
|
1546
|
+
mau: number
|
|
1547
|
+
storage: number
|
|
1548
|
+
bandwidth: number
|
|
1549
|
+
get: number
|
|
1550
|
+
fail: number
|
|
1551
|
+
install: number
|
|
1552
|
+
uninstall: number
|
|
1553
|
+
}[]
|
|
1554
|
+
}
|
|
1555
|
+
get_identity:
|
|
1556
|
+
| {
|
|
1557
|
+
Args: Record<PropertyKey, never>
|
|
1558
|
+
Returns: string
|
|
1559
|
+
}
|
|
1560
|
+
| {
|
|
1561
|
+
Args: {
|
|
1562
|
+
keymode: Database['public']['Enums']['key_mode'][]
|
|
1563
|
+
}
|
|
1564
|
+
Returns: string
|
|
1565
|
+
}
|
|
1566
|
+
get_identity_apikey_only: {
|
|
1567
|
+
Args: {
|
|
1568
|
+
keymode: Database['public']['Enums']['key_mode'][]
|
|
1569
|
+
}
|
|
1570
|
+
Returns: string
|
|
1571
|
+
}
|
|
1572
|
+
get_infos: {
|
|
1573
|
+
Args: {
|
|
1574
|
+
appid: string
|
|
1575
|
+
deviceid: string
|
|
1576
|
+
versionname: string
|
|
1577
|
+
}
|
|
1578
|
+
Returns: {
|
|
1579
|
+
current_version_id: number
|
|
1580
|
+
versiondata: Json
|
|
1581
|
+
channel: Json
|
|
1582
|
+
}[]
|
|
1583
|
+
}
|
|
1584
|
+
get_metered_usage:
|
|
1585
|
+
| {
|
|
1586
|
+
Args: Record<PropertyKey, never>
|
|
1587
|
+
Returns: number
|
|
1588
|
+
}
|
|
1589
|
+
| {
|
|
1590
|
+
Args: {
|
|
1591
|
+
orgid: string
|
|
1592
|
+
}
|
|
1593
|
+
Returns: Database['public']['CompositeTypes']['stats_table']
|
|
1594
|
+
}
|
|
1595
|
+
get_netlify_function_url: {
|
|
1596
|
+
Args: Record<PropertyKey, never>
|
|
1597
|
+
Returns: string
|
|
1598
|
+
}
|
|
1599
|
+
get_org_members: {
|
|
1600
|
+
Args: {
|
|
1601
|
+
guild_id: string
|
|
1602
|
+
}
|
|
1603
|
+
Returns: {
|
|
1604
|
+
aid: number
|
|
1605
|
+
uid: string
|
|
1606
|
+
email: string
|
|
1607
|
+
image_url: string
|
|
1608
|
+
role: Database['public']['Enums']['user_min_right']
|
|
1609
|
+
}[]
|
|
1610
|
+
}
|
|
1611
|
+
get_org_perm_for_apikey: {
|
|
1612
|
+
Args: {
|
|
1613
|
+
apikey: string
|
|
1614
|
+
app_id: string
|
|
1615
|
+
}
|
|
1616
|
+
Returns: string
|
|
1617
|
+
}
|
|
1618
|
+
get_orgs_v5:
|
|
1619
|
+
| {
|
|
1620
|
+
Args: Record<PropertyKey, never>
|
|
1621
|
+
Returns: {
|
|
1622
|
+
gid: string
|
|
1623
|
+
created_by: string
|
|
1624
|
+
logo: string
|
|
1625
|
+
name: string
|
|
1626
|
+
role: string
|
|
1627
|
+
paying: boolean
|
|
1628
|
+
trial_left: number
|
|
1629
|
+
can_use_more: boolean
|
|
1630
|
+
is_canceled: boolean
|
|
1631
|
+
app_count: number
|
|
1632
|
+
subscription_start: string
|
|
1633
|
+
subscription_end: string
|
|
1634
|
+
management_email: string
|
|
1635
|
+
}[]
|
|
1636
|
+
}
|
|
1637
|
+
| {
|
|
1638
|
+
Args: {
|
|
1639
|
+
userid: string
|
|
1640
|
+
}
|
|
1641
|
+
Returns: {
|
|
1642
|
+
gid: string
|
|
1643
|
+
created_by: string
|
|
1644
|
+
logo: string
|
|
1645
|
+
name: string
|
|
1646
|
+
role: string
|
|
1647
|
+
paying: boolean
|
|
1648
|
+
trial_left: number
|
|
1649
|
+
can_use_more: boolean
|
|
1650
|
+
is_canceled: boolean
|
|
1651
|
+
app_count: number
|
|
1652
|
+
subscription_start: string
|
|
1653
|
+
subscription_end: string
|
|
1654
|
+
management_email: string
|
|
1655
|
+
}[]
|
|
1656
|
+
}
|
|
1657
|
+
get_plan_usage_percent_detailed:
|
|
1658
|
+
| {
|
|
1659
|
+
Args: {
|
|
1660
|
+
orgid: string
|
|
1661
|
+
}
|
|
1662
|
+
Returns: {
|
|
1663
|
+
total_percent: number
|
|
1664
|
+
mau_percent: number
|
|
1665
|
+
bandwidth_percent: number
|
|
1666
|
+
storage_percent: number
|
|
1667
|
+
}[]
|
|
1668
|
+
}
|
|
1669
|
+
| {
|
|
1670
|
+
Args: {
|
|
1671
|
+
orgid: string
|
|
1672
|
+
cycle_start: string
|
|
1673
|
+
cycle_end: string
|
|
1674
|
+
}
|
|
1675
|
+
Returns: {
|
|
1676
|
+
total_percent: number
|
|
1677
|
+
mau_percent: number
|
|
1678
|
+
bandwidth_percent: number
|
|
1679
|
+
storage_percent: number
|
|
1680
|
+
}[]
|
|
1681
|
+
}
|
|
1682
|
+
get_total_app_storage_size_orgs: {
|
|
1683
|
+
Args: {
|
|
1684
|
+
org_id: string
|
|
1685
|
+
app_id: string
|
|
1686
|
+
}
|
|
1687
|
+
Returns: number
|
|
1688
|
+
}
|
|
1689
|
+
get_total_metrics:
|
|
1690
|
+
| {
|
|
1691
|
+
Args: {
|
|
1692
|
+
org_id: string
|
|
1693
|
+
}
|
|
1694
|
+
Returns: {
|
|
1695
|
+
mau: number
|
|
1696
|
+
storage: number
|
|
1697
|
+
bandwidth: number
|
|
1698
|
+
get: number
|
|
1699
|
+
fail: number
|
|
1700
|
+
install: number
|
|
1701
|
+
uninstall: number
|
|
1702
|
+
}[]
|
|
1703
|
+
}
|
|
1704
|
+
| {
|
|
1705
|
+
Args: {
|
|
1706
|
+
org_id: string
|
|
1707
|
+
start_date: string
|
|
1708
|
+
end_date: string
|
|
1709
|
+
}
|
|
1710
|
+
Returns: {
|
|
1711
|
+
mau: number
|
|
1712
|
+
storage: number
|
|
1713
|
+
bandwidth: number
|
|
1714
|
+
get: number
|
|
1715
|
+
fail: number
|
|
1716
|
+
install: number
|
|
1717
|
+
uninstall: number
|
|
1718
|
+
}[]
|
|
1719
|
+
}
|
|
1720
|
+
get_total_stats_v5_org: {
|
|
1721
|
+
Args: {
|
|
1722
|
+
orgid: string
|
|
1723
|
+
}
|
|
1724
|
+
Returns: {
|
|
1725
|
+
mau: number
|
|
1726
|
+
bandwidth: number
|
|
1727
|
+
storage: number
|
|
1728
|
+
}[]
|
|
1729
|
+
}
|
|
1730
|
+
get_total_storage_size:
|
|
1731
|
+
| {
|
|
1732
|
+
Args: {
|
|
1733
|
+
appid: string
|
|
1734
|
+
}
|
|
1735
|
+
Returns: number
|
|
1736
|
+
}
|
|
1737
|
+
| {
|
|
1738
|
+
Args: {
|
|
1739
|
+
userid: string
|
|
1740
|
+
appid: string
|
|
1741
|
+
}
|
|
1742
|
+
Returns: number
|
|
1743
|
+
}
|
|
1744
|
+
get_total_storage_size_org: {
|
|
1745
|
+
Args: {
|
|
1746
|
+
org_id: string
|
|
1747
|
+
}
|
|
1748
|
+
Returns: number
|
|
1749
|
+
}
|
|
1750
|
+
get_user_id:
|
|
1751
|
+
| {
|
|
1752
|
+
Args: {
|
|
1753
|
+
apikey: string
|
|
1754
|
+
}
|
|
1755
|
+
Returns: string
|
|
1756
|
+
}
|
|
1757
|
+
| {
|
|
1758
|
+
Args: {
|
|
1759
|
+
apikey: string
|
|
1760
|
+
app_id: string
|
|
1761
|
+
}
|
|
1762
|
+
Returns: string
|
|
1763
|
+
}
|
|
1764
|
+
get_user_main_org_id: {
|
|
1765
|
+
Args: {
|
|
1766
|
+
user_id: string
|
|
1767
|
+
}
|
|
1768
|
+
Returns: string
|
|
1769
|
+
}
|
|
1770
|
+
get_user_main_org_id_by_app_id: {
|
|
1771
|
+
Args: {
|
|
1772
|
+
app_id: string
|
|
1773
|
+
}
|
|
1774
|
+
Returns: string
|
|
1775
|
+
}
|
|
1776
|
+
get_weekly_stats: {
|
|
1777
|
+
Args: {
|
|
1778
|
+
app_id: string
|
|
1779
|
+
}
|
|
1780
|
+
Returns: {
|
|
1781
|
+
all_updates: number
|
|
1782
|
+
failed_updates: number
|
|
1783
|
+
open_app: number
|
|
1784
|
+
}[]
|
|
1785
|
+
}
|
|
1786
|
+
has_app_right: {
|
|
1787
|
+
Args: {
|
|
1788
|
+
appid: string
|
|
1789
|
+
right: Database['public']['Enums']['user_min_right']
|
|
1790
|
+
}
|
|
1791
|
+
Returns: boolean
|
|
1792
|
+
}
|
|
1793
|
+
has_app_right_userid: {
|
|
1794
|
+
Args: {
|
|
1795
|
+
appid: string
|
|
1796
|
+
right: Database['public']['Enums']['user_min_right']
|
|
1797
|
+
userid: string
|
|
1798
|
+
}
|
|
1799
|
+
Returns: boolean
|
|
1800
|
+
}
|
|
1801
|
+
invite_user_to_org: {
|
|
1802
|
+
Args: {
|
|
1803
|
+
email: string
|
|
1804
|
+
org_id: string
|
|
1805
|
+
invite_type: Database['public']['Enums']['user_min_right']
|
|
1806
|
+
}
|
|
1807
|
+
Returns: string
|
|
1808
|
+
}
|
|
1809
|
+
is_admin:
|
|
1810
|
+
| {
|
|
1811
|
+
Args: Record<PropertyKey, never>
|
|
1812
|
+
Returns: boolean
|
|
1813
|
+
}
|
|
1814
|
+
| {
|
|
1815
|
+
Args: {
|
|
1816
|
+
userid: string
|
|
1817
|
+
}
|
|
1818
|
+
Returns: boolean
|
|
1819
|
+
}
|
|
1820
|
+
is_allowed_action: {
|
|
1821
|
+
Args: {
|
|
1822
|
+
apikey: string
|
|
1823
|
+
appid: string
|
|
1824
|
+
}
|
|
1825
|
+
Returns: boolean
|
|
1826
|
+
}
|
|
1827
|
+
is_allowed_action_org: {
|
|
1828
|
+
Args: {
|
|
1829
|
+
orgid: string
|
|
1830
|
+
}
|
|
1831
|
+
Returns: boolean
|
|
1832
|
+
}
|
|
1833
|
+
is_allowed_capgkey:
|
|
1834
|
+
| {
|
|
1835
|
+
Args: {
|
|
1836
|
+
apikey: string
|
|
1837
|
+
keymode: Database['public']['Enums']['key_mode'][]
|
|
1838
|
+
}
|
|
1839
|
+
Returns: boolean
|
|
1840
|
+
}
|
|
1841
|
+
| {
|
|
1842
|
+
Args: {
|
|
1843
|
+
apikey: string
|
|
1844
|
+
keymode: Database['public']['Enums']['key_mode'][]
|
|
1845
|
+
app_id: string
|
|
1846
|
+
}
|
|
1847
|
+
Returns: boolean
|
|
1848
|
+
}
|
|
1849
|
+
| {
|
|
1850
|
+
Args: {
|
|
1851
|
+
apikey: string
|
|
1852
|
+
keymode: Database['public']['Enums']['key_mode'][]
|
|
1853
|
+
app_id: string
|
|
1854
|
+
channel_id: number
|
|
1855
|
+
right: Database['public']['Enums']['user_min_right']
|
|
1856
|
+
user_id: string
|
|
1857
|
+
}
|
|
1858
|
+
Returns: boolean
|
|
1859
|
+
}
|
|
1860
|
+
| {
|
|
1861
|
+
Args: {
|
|
1862
|
+
apikey: string
|
|
1863
|
+
keymode: Database['public']['Enums']['key_mode'][]
|
|
1864
|
+
app_id: string
|
|
1865
|
+
right: Database['public']['Enums']['user_min_right']
|
|
1866
|
+
user_id: string
|
|
1867
|
+
}
|
|
1868
|
+
Returns: boolean
|
|
1869
|
+
}
|
|
1870
|
+
is_app_owner:
|
|
1871
|
+
| {
|
|
1872
|
+
Args: {
|
|
1873
|
+
apikey: string
|
|
1874
|
+
appid: string
|
|
1875
|
+
}
|
|
1876
|
+
Returns: boolean
|
|
1877
|
+
}
|
|
1878
|
+
| {
|
|
1879
|
+
Args: {
|
|
1880
|
+
appid: string
|
|
1881
|
+
}
|
|
1882
|
+
Returns: boolean
|
|
1883
|
+
}
|
|
1884
|
+
| {
|
|
1885
|
+
Args: {
|
|
1886
|
+
userid: string
|
|
1887
|
+
appid: string
|
|
1888
|
+
}
|
|
1889
|
+
Returns: boolean
|
|
1890
|
+
}
|
|
1891
|
+
is_canceled_org: {
|
|
1892
|
+
Args: {
|
|
1893
|
+
orgid: string
|
|
1894
|
+
}
|
|
1895
|
+
Returns: boolean
|
|
1896
|
+
}
|
|
1897
|
+
is_good_plan_v5_org: {
|
|
1898
|
+
Args: {
|
|
1899
|
+
orgid: string
|
|
1900
|
+
}
|
|
1901
|
+
Returns: boolean
|
|
1902
|
+
}
|
|
1903
|
+
is_member_of_org: {
|
|
1904
|
+
Args: {
|
|
1905
|
+
user_id: string
|
|
1906
|
+
org_id: string
|
|
1907
|
+
}
|
|
1908
|
+
Returns: boolean
|
|
1909
|
+
}
|
|
1910
|
+
is_not_deleted: {
|
|
1911
|
+
Args: {
|
|
1912
|
+
email_check: string
|
|
1913
|
+
}
|
|
1914
|
+
Returns: boolean
|
|
1915
|
+
}
|
|
1916
|
+
is_onboarded_org: {
|
|
1917
|
+
Args: {
|
|
1918
|
+
orgid: string
|
|
1919
|
+
}
|
|
1920
|
+
Returns: boolean
|
|
1921
|
+
}
|
|
1922
|
+
is_onboarding_needed_org: {
|
|
1923
|
+
Args: {
|
|
1924
|
+
orgid: string
|
|
1925
|
+
}
|
|
1926
|
+
Returns: boolean
|
|
1927
|
+
}
|
|
1928
|
+
is_owner_of_org: {
|
|
1929
|
+
Args: {
|
|
1930
|
+
user_id: string
|
|
1931
|
+
org_id: string
|
|
1932
|
+
}
|
|
1933
|
+
Returns: boolean
|
|
1934
|
+
}
|
|
1935
|
+
is_paying_and_good_plan_org: {
|
|
1936
|
+
Args: {
|
|
1937
|
+
orgid: string
|
|
1938
|
+
}
|
|
1939
|
+
Returns: boolean
|
|
1940
|
+
}
|
|
1941
|
+
is_paying_org: {
|
|
1942
|
+
Args: {
|
|
1943
|
+
orgid: string
|
|
1944
|
+
}
|
|
1945
|
+
Returns: boolean
|
|
1946
|
+
}
|
|
1947
|
+
is_trial_org: {
|
|
1948
|
+
Args: {
|
|
1949
|
+
orgid: string
|
|
1950
|
+
}
|
|
1951
|
+
Returns: number
|
|
1952
|
+
}
|
|
1953
|
+
one_month_ahead: {
|
|
1954
|
+
Args: Record<PropertyKey, never>
|
|
1955
|
+
Returns: string
|
|
1956
|
+
}
|
|
1957
|
+
process_cron_stats_jobs: {
|
|
1958
|
+
Args: Record<PropertyKey, never>
|
|
1959
|
+
Returns: undefined
|
|
1960
|
+
}
|
|
1961
|
+
process_current_jobs_if_unlocked: {
|
|
1962
|
+
Args: Record<PropertyKey, never>
|
|
1963
|
+
Returns: number[]
|
|
1964
|
+
}
|
|
1965
|
+
process_free_trial_expired: {
|
|
1966
|
+
Args: Record<PropertyKey, never>
|
|
1967
|
+
Returns: undefined
|
|
1968
|
+
}
|
|
1969
|
+
process_requested_jobs: {
|
|
1970
|
+
Args: Record<PropertyKey, never>
|
|
1971
|
+
Returns: undefined
|
|
1972
|
+
}
|
|
1973
|
+
process_subscribed_orgs: {
|
|
1974
|
+
Args: Record<PropertyKey, never>
|
|
1975
|
+
Returns: undefined
|
|
1976
|
+
}
|
|
1977
|
+
read_bandwidth_usage: {
|
|
1978
|
+
Args: {
|
|
1979
|
+
p_app_id: string
|
|
1980
|
+
p_period_start: string
|
|
1981
|
+
p_period_end: string
|
|
1982
|
+
}
|
|
1983
|
+
Returns: {
|
|
1984
|
+
date: string
|
|
1985
|
+
bandwidth: number
|
|
1986
|
+
app_id: string
|
|
1987
|
+
}[]
|
|
1988
|
+
}
|
|
1989
|
+
read_device_usage: {
|
|
1990
|
+
Args: {
|
|
1991
|
+
p_app_id: string
|
|
1992
|
+
p_period_start: string
|
|
1993
|
+
p_period_end: string
|
|
1994
|
+
}
|
|
1995
|
+
Returns: {
|
|
1996
|
+
date: string
|
|
1997
|
+
mau: number
|
|
1998
|
+
app_id: string
|
|
1999
|
+
}[]
|
|
2000
|
+
}
|
|
2001
|
+
read_storage_usage: {
|
|
2002
|
+
Args: {
|
|
2003
|
+
p_app_id: string
|
|
2004
|
+
p_period_start: string
|
|
2005
|
+
p_period_end: string
|
|
2006
|
+
}
|
|
2007
|
+
Returns: {
|
|
2008
|
+
app_id: string
|
|
2009
|
+
date: string
|
|
2010
|
+
storage: number
|
|
2011
|
+
}[]
|
|
2012
|
+
}
|
|
2013
|
+
read_version_usage: {
|
|
2014
|
+
Args: {
|
|
2015
|
+
p_app_id: string
|
|
2016
|
+
p_period_start: string
|
|
2017
|
+
p_period_end: string
|
|
2018
|
+
}
|
|
2019
|
+
Returns: {
|
|
2020
|
+
app_id: string
|
|
2021
|
+
version_id: number
|
|
2022
|
+
date: string
|
|
2023
|
+
get: number
|
|
2024
|
+
fail: number
|
|
2025
|
+
install: number
|
|
2026
|
+
uninstall: number
|
|
2027
|
+
}[]
|
|
2028
|
+
}
|
|
2029
|
+
reset_and_seed_data: {
|
|
2030
|
+
Args: Record<PropertyKey, never>
|
|
2031
|
+
Returns: undefined
|
|
2032
|
+
}
|
|
2033
|
+
reset_and_seed_stats_data: {
|
|
2034
|
+
Args: Record<PropertyKey, never>
|
|
2035
|
+
Returns: undefined
|
|
2036
|
+
}
|
|
2037
|
+
retry_failed_jobs: {
|
|
2038
|
+
Args: Record<PropertyKey, never>
|
|
2039
|
+
Returns: undefined
|
|
2040
|
+
}
|
|
2041
|
+
update_app_usage:
|
|
2042
|
+
| {
|
|
2043
|
+
Args: Record<PropertyKey, never>
|
|
2044
|
+
Returns: undefined
|
|
2045
|
+
}
|
|
2046
|
+
| {
|
|
2047
|
+
Args: {
|
|
2048
|
+
minutes_interval: number
|
|
2049
|
+
}
|
|
2050
|
+
Returns: undefined
|
|
2051
|
+
}
|
|
2052
|
+
verify_mfa: {
|
|
2053
|
+
Args: Record<PropertyKey, never>
|
|
2054
|
+
Returns: boolean
|
|
2055
|
+
}
|
|
2056
|
+
}
|
|
2057
|
+
Enums: {
|
|
2058
|
+
app_mode: 'prod' | 'dev' | 'livereload'
|
|
2059
|
+
disable_update: 'major' | 'minor' | 'patch' | 'version_number' | 'none'
|
|
2060
|
+
key_mode: 'read' | 'write' | 'all' | 'upload'
|
|
2061
|
+
pay_as_you_go_type: 'base' | 'units'
|
|
2062
|
+
platform_os: 'ios' | 'android'
|
|
2063
|
+
queue_job_status: 'inserted' | 'requested' | 'failed'
|
|
2064
|
+
stripe_status:
|
|
2065
|
+
| 'created'
|
|
2066
|
+
| 'succeeded'
|
|
2067
|
+
| 'updated'
|
|
2068
|
+
| 'failed'
|
|
2069
|
+
| 'deleted'
|
|
2070
|
+
| 'canceled'
|
|
2071
|
+
usage_mode: '5min' | 'day' | 'month' | 'cycle' | 'last_saved'
|
|
2072
|
+
user_min_right:
|
|
2073
|
+
| 'invite_read'
|
|
2074
|
+
| 'invite_upload'
|
|
2075
|
+
| 'invite_write'
|
|
2076
|
+
| 'invite_admin'
|
|
2077
|
+
| 'invite_super_admin'
|
|
2078
|
+
| 'read'
|
|
2079
|
+
| 'upload'
|
|
2080
|
+
| 'write'
|
|
2081
|
+
| 'admin'
|
|
2082
|
+
| 'super_admin'
|
|
2083
|
+
user_role: 'read' | 'upload' | 'write' | 'admin'
|
|
2084
|
+
}
|
|
2085
|
+
CompositeTypes: {
|
|
2086
|
+
match_plan: {
|
|
2087
|
+
name: string | null
|
|
2088
|
+
}
|
|
2089
|
+
orgs_table: {
|
|
2090
|
+
id: string | null
|
|
2091
|
+
created_by: string | null
|
|
2092
|
+
created_at: string | null
|
|
2093
|
+
updated_at: string | null
|
|
2094
|
+
logo: string | null
|
|
2095
|
+
name: string | null
|
|
2096
|
+
}
|
|
2097
|
+
owned_orgs: {
|
|
2098
|
+
id: string | null
|
|
2099
|
+
created_by: string | null
|
|
2100
|
+
logo: string | null
|
|
2101
|
+
name: string | null
|
|
2102
|
+
role: string | null
|
|
2103
|
+
}
|
|
2104
|
+
stats_table: {
|
|
2105
|
+
mau: number | null
|
|
2106
|
+
bandwidth: number | null
|
|
2107
|
+
storage: number | null
|
|
2108
|
+
}
|
|
2109
|
+
}
|
|
2110
|
+
}
|
|
2111
|
+
}
|
|
2112
|
+
|
|
2113
|
+
type PublicSchema = Database[Extract<keyof Database, 'public'>]
|
|
2114
|
+
|
|
2115
|
+
export type Tables<
|
|
2116
|
+
PublicTableNameOrOptions extends
|
|
2117
|
+
| keyof (PublicSchema['Tables'] & PublicSchema['Views'])
|
|
2118
|
+
| { schema: keyof Database },
|
|
2119
|
+
TableName extends PublicTableNameOrOptions extends { schema: keyof Database }
|
|
2120
|
+
? keyof (Database[PublicTableNameOrOptions['schema']]['Tables'] &
|
|
2121
|
+
Database[PublicTableNameOrOptions['schema']]['Views'])
|
|
2122
|
+
: never = never,
|
|
2123
|
+
> = PublicTableNameOrOptions extends { schema: keyof Database }
|
|
2124
|
+
? (Database[PublicTableNameOrOptions['schema']]['Tables'] &
|
|
2125
|
+
Database[PublicTableNameOrOptions['schema']]['Views'])[TableName] extends {
|
|
2126
|
+
Row: infer R
|
|
2127
|
+
}
|
|
2128
|
+
? R
|
|
2129
|
+
: never
|
|
2130
|
+
: PublicTableNameOrOptions extends keyof (PublicSchema['Tables'] &
|
|
2131
|
+
PublicSchema['Views'])
|
|
2132
|
+
? (PublicSchema['Tables'] &
|
|
2133
|
+
PublicSchema['Views'])[PublicTableNameOrOptions] extends {
|
|
2134
|
+
Row: infer R
|
|
2135
|
+
}
|
|
2136
|
+
? R
|
|
2137
|
+
: never
|
|
2138
|
+
: never
|
|
2139
|
+
|
|
2140
|
+
export type TablesInsert<
|
|
2141
|
+
PublicTableNameOrOptions extends
|
|
2142
|
+
| keyof PublicSchema['Tables']
|
|
2143
|
+
| { schema: keyof Database },
|
|
2144
|
+
TableName extends PublicTableNameOrOptions extends { schema: keyof Database }
|
|
2145
|
+
? keyof Database[PublicTableNameOrOptions['schema']]['Tables']
|
|
2146
|
+
: never = never,
|
|
2147
|
+
> = PublicTableNameOrOptions extends { schema: keyof Database }
|
|
2148
|
+
? Database[PublicTableNameOrOptions['schema']]['Tables'][TableName] extends {
|
|
2149
|
+
Insert: infer I
|
|
2150
|
+
}
|
|
2151
|
+
? I
|
|
2152
|
+
: never
|
|
2153
|
+
: PublicTableNameOrOptions extends keyof PublicSchema['Tables']
|
|
2154
|
+
? PublicSchema['Tables'][PublicTableNameOrOptions] extends {
|
|
2155
|
+
Insert: infer I
|
|
2156
|
+
}
|
|
2157
|
+
? I
|
|
2158
|
+
: never
|
|
2159
|
+
: never
|
|
2160
|
+
|
|
2161
|
+
export type TablesUpdate<
|
|
2162
|
+
PublicTableNameOrOptions extends
|
|
2163
|
+
| keyof PublicSchema['Tables']
|
|
2164
|
+
| { schema: keyof Database },
|
|
2165
|
+
TableName extends PublicTableNameOrOptions extends { schema: keyof Database }
|
|
2166
|
+
? keyof Database[PublicTableNameOrOptions['schema']]['Tables']
|
|
2167
|
+
: never = never,
|
|
2168
|
+
> = PublicTableNameOrOptions extends { schema: keyof Database }
|
|
2169
|
+
? Database[PublicTableNameOrOptions['schema']]['Tables'][TableName] extends {
|
|
2170
|
+
Update: infer U
|
|
2171
|
+
}
|
|
2172
|
+
? U
|
|
2173
|
+
: never
|
|
2174
|
+
: PublicTableNameOrOptions extends keyof PublicSchema['Tables']
|
|
2175
|
+
? PublicSchema['Tables'][PublicTableNameOrOptions] extends {
|
|
2176
|
+
Update: infer U
|
|
2177
|
+
}
|
|
2178
|
+
? U
|
|
2179
|
+
: never
|
|
2180
|
+
: never
|
|
2181
|
+
|
|
2182
|
+
export type Enums<
|
|
2183
|
+
PublicEnumNameOrOptions extends
|
|
2184
|
+
| keyof PublicSchema['Enums']
|
|
2185
|
+
| { schema: keyof Database },
|
|
2186
|
+
EnumName extends PublicEnumNameOrOptions extends { schema: keyof Database }
|
|
2187
|
+
? keyof Database[PublicEnumNameOrOptions['schema']]['Enums']
|
|
2188
|
+
: never = never,
|
|
2189
|
+
> = PublicEnumNameOrOptions extends { schema: keyof Database }
|
|
2190
|
+
? Database[PublicEnumNameOrOptions['schema']]['Enums'][EnumName]
|
|
2191
|
+
: PublicEnumNameOrOptions extends keyof PublicSchema['Enums']
|
|
2192
|
+
? PublicSchema['Enums'][PublicEnumNameOrOptions]
|
|
2193
|
+
: never
|