create-disposabl-app 0.4.2 → 0.6.0

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 (151) hide show
  1. package/README.md +18 -0
  2. package/dist/disposabl.js +541 -0
  3. package/dist/index.js +154 -61
  4. package/dist/templates/default/.github/scripts/android-build.sh +18 -0
  5. package/dist/templates/default/.github/scripts/disposabl.mjs +95 -0
  6. package/dist/templates/default/.github/scripts/expo-channel.sh +10 -0
  7. package/dist/templates/default/.github/scripts/expo-env.sh +17 -0
  8. package/dist/templates/default/.github/scripts/expo-fingerprint.sh +19 -0
  9. package/dist/templates/default/.github/scripts/expo-update.sh +11 -0
  10. package/dist/templates/default/.github/scripts/package-release.sh +23 -0
  11. package/dist/templates/default/.github/scripts/platforms.sh +37 -0
  12. package/dist/templates/default/.github/scripts/release-publish.sh +28 -0
  13. package/dist/templates/default/.github/scripts/release-source.sh +14 -0
  14. package/dist/templates/default/.github/scripts/verify-artifacts.sh +13 -0
  15. package/dist/templates/default/.github/scripts/web-deploy.sh +10 -0
  16. package/dist/templates/default/.github/workflows/pipeline.yml +299 -0
  17. package/dist/templates/default/apps/docs/README.md +37 -0
  18. package/dist/templates/default/apps/docs/content/guides/writing.mdx +15 -0
  19. package/dist/templates/default/apps/docs/content/index.mdx +10 -0
  20. package/dist/templates/default/apps/docs/package.json +29 -1
  21. package/dist/templates/default/apps/docs/press.config.ts +20 -0
  22. package/dist/templates/default/apps/docs/src/app.css +4 -0
  23. package/dist/templates/default/apps/docs/tsconfig.json +14 -0
  24. package/dist/templates/default/apps/docs/vite.config.ts +8 -0
  25. package/dist/templates/default/apps/mobile/.env.example +2 -0
  26. package/dist/templates/default/apps/mobile/AGENTS.md +2 -2
  27. package/dist/templates/default/apps/mobile/README.md +64 -4
  28. package/dist/templates/default/apps/mobile/app.json +5 -4
  29. package/dist/templates/default/apps/mobile/assets/images/android-icon-foreground.png +0 -0
  30. package/dist/templates/default/apps/mobile/assets/images/android-icon-monochrome.png +0 -0
  31. package/dist/templates/default/apps/mobile/assets/images/icon.png +0 -0
  32. package/dist/templates/default/apps/mobile/assets/images/splash-icon.png +0 -0
  33. package/dist/templates/default/apps/mobile/eas.json +5 -0
  34. package/dist/templates/default/apps/mobile/package.json +18 -4
  35. package/dist/templates/default/apps/mobile/src/app/(auth)/_layout.tsx +1 -0
  36. package/dist/templates/default/apps/mobile/src/app/(auth)/login.tsx +1 -0
  37. package/dist/templates/default/apps/mobile/src/app/(auth)/signup.tsx +1 -0
  38. package/dist/templates/default/apps/mobile/src/app/(authenticated)/_layout.tsx +1 -0
  39. package/dist/templates/default/apps/mobile/src/app/(authenticated)/account.tsx +1 -0
  40. package/dist/templates/default/apps/mobile/src/app/_layout.tsx +1 -5
  41. package/dist/templates/default/apps/mobile/src/app/index.tsx +1 -17
  42. package/dist/templates/default/apps/mobile/tsconfig.json +8 -1
  43. package/dist/templates/default/apps/web/package.json +3 -2
  44. package/dist/templates/default/apps/web/src/routeTree.gen.ts +0 -44
  45. package/dist/templates/default/apps/web/src/router/__root.tsx +1 -1
  46. package/dist/templates/default/apps/web/src/router/_authenticated/dashboard.api-keys.tsx +1 -1
  47. package/dist/templates/default/apps/web/src/router/_authenticated/dashboard.tsx +2 -1
  48. package/dist/templates/default/apps/web/src/router/index.tsx +11 -3
  49. package/dist/templates/default/apps/web/tests/auth-branches.test.tsx +44 -0
  50. package/dist/templates/default/apps/web/vite.config.ts +15 -0
  51. package/dist/templates/default/bun.lock +583 -23
  52. package/dist/templates/default/bunfig.toml +0 -2
  53. package/dist/templates/default/disposabl.json +2 -13
  54. package/dist/templates/default/package.json +3 -3
  55. package/dist/templates/default/packages/backend/AGENTS.md +15 -13
  56. package/dist/templates/default/packages/backend/README.md +6 -28
  57. package/dist/templates/default/packages/backend/convex/_generated/ai/ai-files.state.json +1 -1
  58. package/dist/templates/default/packages/backend/convex/_generated/api.d.ts +32 -6
  59. package/dist/templates/default/packages/backend/convex/_generated/server.d.ts +8 -0
  60. package/dist/templates/default/packages/backend/convex/apps/actions/create.ts +19 -0
  61. package/dist/templates/default/packages/backend/convex/apps/internal.ts +197 -0
  62. package/dist/templates/default/packages/backend/convex/auth.ts +1 -1
  63. package/dist/templates/default/packages/backend/convex/convex.config.ts +8 -0
  64. package/dist/templates/default/packages/backend/convex/github/actions/http.ts +40 -0
  65. package/dist/templates/default/packages/backend/convex/github/actions/internal.ts +189 -0
  66. package/dist/templates/default/packages/backend/convex/github/actions/oidc.ts +75 -0
  67. package/dist/templates/default/packages/backend/convex/github/actions/provision.ts +80 -0
  68. package/dist/templates/default/packages/backend/convex/github/actions/tokens.ts +66 -0
  69. package/dist/templates/default/packages/backend/convex/github/internal.ts +34 -0
  70. package/dist/templates/default/packages/backend/convex/http.ts +3 -0
  71. package/dist/templates/default/packages/backend/convex/previews/internal.ts +270 -0
  72. package/dist/templates/default/packages/backend/convex/previews/token/actions/create.ts +69 -0
  73. package/dist/templates/default/packages/backend/convex/previews/token/actions/management.ts +133 -0
  74. package/dist/templates/default/packages/backend/convex/previews/token/internal.ts +1 -0
  75. package/dist/templates/default/packages/backend/convex/releases/internal.ts +28 -0
  76. package/dist/templates/default/packages/backend/convex/schema.ts +34 -4
  77. package/dist/templates/default/packages/backend/convex/users/index.ts +21 -0
  78. package/dist/templates/default/packages/backend/convex/users/internal.ts +44 -0
  79. package/dist/templates/default/packages/backend/convex/validator.ts +87 -0
  80. package/dist/templates/default/packages/backend/generate.ts +6 -1
  81. package/dist/templates/default/packages/backend/generated/openapi.json +961 -43
  82. package/dist/templates/default/packages/backend/generated/pages.json +0 -8
  83. package/dist/templates/default/packages/backend/generated/platforms.ts +14 -2
  84. package/dist/templates/default/packages/backend/package.json +1 -1
  85. package/dist/templates/default/packages/cli/README.md +15 -9
  86. package/dist/templates/default/packages/cli/auth.ts +11 -3
  87. package/dist/templates/default/packages/cli/commands.ts +236 -0
  88. package/dist/templates/default/packages/cli/index.ts +2 -142
  89. package/dist/templates/default/packages/cli/preview.ts +157 -0
  90. package/dist/templates/default/packages/disposabl-kit/client/components/ui/log-out.tsx +16 -0
  91. package/dist/templates/default/packages/disposabl-kit/client/lib/prerender.ts +6 -3
  92. package/dist/templates/default/packages/disposabl-kit/client/routes/_auth-pages/login.tsx +1 -1
  93. package/dist/templates/default/packages/disposabl-kit/client/routes/_auth-pages/signUp.tsx +1 -1
  94. package/dist/templates/default/packages/disposabl-kit/client/routes/_authenticated/route.tsx +25 -16
  95. package/dist/templates/default/packages/disposabl-kit/client/routes/consent.tsx +3 -2
  96. package/dist/templates/default/packages/disposabl-kit/client/routes/route.tsx +57 -2
  97. package/dist/templates/default/packages/disposabl-kit/client/vite.config.ts +20 -9
  98. package/dist/templates/default/packages/disposabl-kit/eslint.config.js +1 -1
  99. package/dist/templates/default/packages/disposabl-kit/features.ts +4 -0
  100. package/dist/templates/default/packages/disposabl-kit/mobile/components/auth-form.tsx +125 -0
  101. package/dist/templates/default/packages/disposabl-kit/mobile/components/auth-ui.tsx +107 -0
  102. package/dist/templates/default/packages/disposabl-kit/mobile/expo-plugin.cjs +26 -0
  103. package/dist/templates/default/packages/disposabl-kit/mobile/index.ts +10 -0
  104. package/dist/templates/default/packages/disposabl-kit/mobile/layout.tsx +101 -0
  105. package/dist/templates/default/packages/disposabl-kit/mobile/lib/auth-errors.ts +40 -0
  106. package/dist/templates/default/packages/disposabl-kit/mobile/lib/auth-storage.ts +9 -0
  107. package/dist/templates/default/packages/disposabl-kit/mobile/lib/convex.ts +1 -0
  108. package/dist/templates/default/packages/disposabl-kit/mobile/lib/logo.png +0 -0
  109. package/dist/templates/default/packages/disposabl-kit/mobile/screens/account.tsx +67 -0
  110. package/dist/templates/default/packages/disposabl-kit/mobile/screens/home.tsx +65 -0
  111. package/dist/templates/default/packages/disposabl-kit/mobile/screens/login.tsx +5 -0
  112. package/dist/templates/default/packages/disposabl-kit/mobile/screens/signup.tsx +5 -0
  113. package/dist/templates/default/packages/disposabl-kit/package.json +24 -1
  114. package/dist/templates/default/packages/disposabl-kit/platforms.ts +1 -27
  115. package/dist/templates/default/packages/disposabl-kit/server/http.ts +6 -0
  116. package/dist/templates/default/packages/disposabl-kit/server/lib/docs.test.ts +111 -0
  117. package/dist/templates/default/packages/disposabl-kit/server/lib/docs.ts +62 -0
  118. package/dist/templates/default/packages/disposabl-kit/tsconfig.json +1 -1
  119. package/dist/templates/default/packages/sdk/README.md +8 -4
  120. package/dist/templates/default/packages/sdk/src/config.ts +14 -7
  121. package/dist/templates/default/packages/sdk/src/generated/index.ts +48 -13
  122. package/dist/templates/default/packages/sdk/src/generated/sdk.gen.ts +139 -27
  123. package/dist/templates/default/packages/sdk/src/generated/types.gen.ts +440 -37
  124. package/dist/templates/default/turbo.json +7 -0
  125. package/package.json +6 -3
  126. package/dist/templates/default/.github/README.md +0 -99
  127. package/dist/templates/default/.github/actionlint.yaml +0 -6
  128. package/dist/templates/default/.github/workflows/pipeline.yml.example +0 -546
  129. package/dist/templates/default/apps/blog/package.json +0 -1
  130. package/dist/templates/default/apps/changelog/package.json +0 -1
  131. package/dist/templates/default/apps/desktop/.oxfmtrc.json +0 -5
  132. package/dist/templates/default/apps/desktop/.oxlintrc.json +0 -6
  133. package/dist/templates/default/apps/desktop/README.md +0 -88
  134. package/dist/templates/default/apps/desktop/build-ci.mjs +0 -56
  135. package/dist/templates/default/apps/desktop/forge.config.mts +0 -109
  136. package/dist/templates/default/apps/desktop/index.html +0 -12
  137. package/dist/templates/default/apps/desktop/package.json +0 -55
  138. package/dist/templates/default/apps/desktop/src/declarations.d.ts +0 -2
  139. package/dist/templates/default/apps/desktop/src/index.css +0 -8
  140. package/dist/templates/default/apps/desktop/src/main.ts +0 -58
  141. package/dist/templates/default/apps/desktop/src/preload.ts +0 -3
  142. package/dist/templates/default/apps/desktop/src/renderer.ts +0 -19
  143. package/dist/templates/default/apps/desktop/tsconfig.json +0 -14
  144. package/dist/templates/default/apps/desktop/vite.main.config.mts +0 -4
  145. package/dist/templates/default/apps/desktop/vite.preload.config.mts +0 -4
  146. package/dist/templates/default/apps/desktop/vite.renderer.config.mts +0 -4
  147. package/dist/templates/default/apps/web/src/router/_authenticated/todos/$id.tsx +0 -27
  148. package/dist/templates/default/apps/web/src/router/_authenticated/todos/index.tsx +0 -33
  149. package/dist/templates/default/packages/backend/convex/todos/index.ts +0 -26
  150. package/dist/templates/default/packages/backend/convex/todos/internal.ts +0 -43
  151. package/dist/templates/default/packages/backend/convex/users.ts +0 -20
@@ -2,7 +2,7 @@
2
2
  "openapi": "3.1.0",
3
3
  "info": {
4
4
  "title": "Application API",
5
- "version": "0.1.0"
5
+ "version": "1.0.0"
6
6
  },
7
7
  "security": [
8
8
  {
@@ -18,10 +18,10 @@
18
18
  }
19
19
  },
20
20
  "paths": {
21
- "/api/todos/create": {
21
+ "/api/apps/create": {
22
22
  "post": {
23
- "operationId": "todosCreate",
24
- "x-convex-function": "todos/internal:create",
23
+ "operationId": "appsCreate",
24
+ "x-convex-function": "apps/internal:create",
25
25
  "requestBody": {
26
26
  "required": true,
27
27
  "content": {
@@ -29,11 +29,28 @@
29
29
  "schema": {
30
30
  "type": "object",
31
31
  "properties": {
32
- "title": {
32
+ "name": {
33
33
  "type": "string"
34
+ },
35
+ "platforms": {
36
+ "type": "array",
37
+ "items": {
38
+ "enum": [
39
+ "web",
40
+ "android",
41
+ "ios",
42
+ "macos",
43
+ "windows",
44
+ "linux",
45
+ "api",
46
+ "mcp",
47
+ "typescript-sdk",
48
+ "cli"
49
+ ]
50
+ }
34
51
  }
35
52
  },
36
- "required": ["title"],
53
+ "required": ["name", "platforms"],
37
54
  "additionalProperties": false
38
55
  }
39
56
  }
@@ -45,8 +62,43 @@
45
62
  "content": {
46
63
  "application/json": {
47
64
  "schema": {
48
- "type": "string",
49
- "description": "ID of a document in \"todos\""
65
+ "type": "object",
66
+ "properties": {
67
+ "appId": {
68
+ "type": "string"
69
+ },
70
+ "name": {
71
+ "type": "string"
72
+ },
73
+ "platforms": {
74
+ "type": "array",
75
+ "items": {
76
+ "enum": [
77
+ "web",
78
+ "android",
79
+ "ios",
80
+ "macos",
81
+ "windows",
82
+ "linux",
83
+ "api",
84
+ "mcp",
85
+ "typescript-sdk",
86
+ "cli"
87
+ ]
88
+ }
89
+ },
90
+ "githubOwner": {
91
+ "type": "string"
92
+ },
93
+ "githubRepo": {
94
+ "type": "string"
95
+ },
96
+ "createdAt": {
97
+ "type": "number"
98
+ }
99
+ },
100
+ "required": ["appId", "name", "platforms", "createdAt"],
101
+ "additionalProperties": false
50
102
  }
51
103
  }
52
104
  }
@@ -66,20 +118,313 @@
66
118
  }
67
119
  }
68
120
  },
69
- "/api/todos/get": {
121
+ "/api/apps/delete": {
122
+ "post": {
123
+ "operationId": "appsDelete",
124
+ "x-convex-function": "apps/internal:delete",
125
+ "requestBody": {
126
+ "required": true,
127
+ "content": {
128
+ "application/json": {
129
+ "schema": {
130
+ "type": "object",
131
+ "properties": {
132
+ "appId": {
133
+ "type": "string"
134
+ }
135
+ },
136
+ "required": ["appId"],
137
+ "additionalProperties": false
138
+ }
139
+ }
140
+ }
141
+ },
142
+ "responses": {
143
+ "200": {
144
+ "description": "Success",
145
+ "content": {
146
+ "application/json": {
147
+ "schema": {
148
+ "type": "null"
149
+ }
150
+ }
151
+ }
152
+ },
153
+ "400": {
154
+ "description": "Invalid arguments"
155
+ },
156
+ "401": {
157
+ "description": "Authentication required"
158
+ },
159
+ "403": {
160
+ "description": "Insufficient scope"
161
+ },
162
+ "500": {
163
+ "description": "Internal error"
164
+ }
165
+ }
166
+ }
167
+ },
168
+ "/api/apps/get": {
70
169
  "get": {
71
- "operationId": "todosGet",
72
- "x-convex-function": "todos/internal:get",
170
+ "operationId": "appsGet",
171
+ "x-convex-function": "apps/internal:get",
73
172
  "parameters": [
74
173
  {
75
- "name": "id",
174
+ "name": "appId",
76
175
  "in": "query",
77
176
  "required": true,
78
177
  "content": {
79
178
  "application/json": {
80
179
  "schema": {
81
- "type": "string",
82
- "description": "ID of a document in \"todos\""
180
+ "type": "string"
181
+ }
182
+ }
183
+ }
184
+ }
185
+ ],
186
+ "responses": {
187
+ "200": {
188
+ "description": "Success",
189
+ "content": {
190
+ "application/json": {
191
+ "schema": {
192
+ "type": "object",
193
+ "properties": {
194
+ "appId": {
195
+ "type": "string"
196
+ },
197
+ "name": {
198
+ "type": "string"
199
+ },
200
+ "platforms": {
201
+ "type": "array",
202
+ "items": {
203
+ "enum": [
204
+ "web",
205
+ "android",
206
+ "ios",
207
+ "macos",
208
+ "windows",
209
+ "linux",
210
+ "api",
211
+ "mcp",
212
+ "typescript-sdk",
213
+ "cli"
214
+ ]
215
+ }
216
+ },
217
+ "githubOwner": {
218
+ "type": "string"
219
+ },
220
+ "githubRepo": {
221
+ "type": "string"
222
+ },
223
+ "createdAt": {
224
+ "type": "number"
225
+ }
226
+ },
227
+ "required": ["appId", "name", "platforms", "createdAt"],
228
+ "additionalProperties": false
229
+ }
230
+ }
231
+ }
232
+ },
233
+ "400": {
234
+ "description": "Invalid arguments"
235
+ },
236
+ "401": {
237
+ "description": "Authentication required"
238
+ },
239
+ "403": {
240
+ "description": "Insufficient scope"
241
+ },
242
+ "500": {
243
+ "description": "Internal error"
244
+ }
245
+ }
246
+ }
247
+ },
248
+ "/api/apps/list": {
249
+ "get": {
250
+ "operationId": "appsList",
251
+ "x-convex-function": "apps/internal:list",
252
+ "parameters": [
253
+ {
254
+ "name": "paginationOpts",
255
+ "in": "query",
256
+ "required": true,
257
+ "content": {
258
+ "application/json": {
259
+ "schema": {
260
+ "type": "object",
261
+ "properties": {
262
+ "numItems": {
263
+ "type": "number"
264
+ },
265
+ "cursor": {
266
+ "anyOf": [
267
+ {
268
+ "type": "string"
269
+ },
270
+ {
271
+ "type": "null"
272
+ }
273
+ ]
274
+ },
275
+ "endCursor": {
276
+ "anyOf": [
277
+ {
278
+ "type": "string"
279
+ },
280
+ {
281
+ "type": "null"
282
+ }
283
+ ]
284
+ },
285
+ "id": {
286
+ "type": "number"
287
+ },
288
+ "maximumRowsRead": {
289
+ "type": "number"
290
+ },
291
+ "maximumBytesRead": {
292
+ "type": "number"
293
+ }
294
+ },
295
+ "required": ["numItems", "cursor"],
296
+ "additionalProperties": false
297
+ }
298
+ }
299
+ }
300
+ }
301
+ ],
302
+ "responses": {
303
+ "200": {
304
+ "description": "Success",
305
+ "content": {
306
+ "application/json": {
307
+ "schema": {
308
+ "type": "object",
309
+ "properties": {
310
+ "page": {
311
+ "type": "array",
312
+ "items": {
313
+ "type": "object",
314
+ "properties": {
315
+ "appId": {
316
+ "type": "string"
317
+ },
318
+ "name": {
319
+ "type": "string"
320
+ },
321
+ "platforms": {
322
+ "type": "array",
323
+ "items": {
324
+ "enum": [
325
+ "web",
326
+ "android",
327
+ "ios",
328
+ "macos",
329
+ "windows",
330
+ "linux",
331
+ "api",
332
+ "mcp",
333
+ "typescript-sdk",
334
+ "cli"
335
+ ]
336
+ }
337
+ },
338
+ "githubOwner": {
339
+ "type": "string"
340
+ },
341
+ "githubRepo": {
342
+ "type": "string"
343
+ },
344
+ "createdAt": {
345
+ "type": "number"
346
+ }
347
+ },
348
+ "required": ["appId", "name", "platforms", "createdAt"],
349
+ "additionalProperties": false
350
+ }
351
+ },
352
+ "continueCursor": {
353
+ "type": "string"
354
+ },
355
+ "isDone": {
356
+ "type": "boolean"
357
+ },
358
+ "splitCursor": {
359
+ "anyOf": [
360
+ {
361
+ "type": "string"
362
+ },
363
+ {
364
+ "type": "null"
365
+ }
366
+ ]
367
+ },
368
+ "pageStatus": {
369
+ "anyOf": [
370
+ {
371
+ "const": "SplitRecommended"
372
+ },
373
+ {
374
+ "const": "SplitRequired"
375
+ },
376
+ {
377
+ "type": "null"
378
+ }
379
+ ]
380
+ }
381
+ },
382
+ "required": ["page", "continueCursor", "isDone"],
383
+ "additionalProperties": false
384
+ }
385
+ }
386
+ }
387
+ },
388
+ "400": {
389
+ "description": "Invalid arguments"
390
+ },
391
+ "401": {
392
+ "description": "Authentication required"
393
+ },
394
+ "403": {
395
+ "description": "Insufficient scope"
396
+ },
397
+ "500": {
398
+ "description": "Internal error"
399
+ }
400
+ }
401
+ }
402
+ },
403
+ "/api/previews/get": {
404
+ "get": {
405
+ "operationId": "previewsGet",
406
+ "x-convex-function": "previews/internal:get",
407
+ "parameters": [
408
+ {
409
+ "name": "appId",
410
+ "in": "query",
411
+ "required": true,
412
+ "content": {
413
+ "application/json": {
414
+ "schema": {
415
+ "type": "string"
416
+ }
417
+ }
418
+ }
419
+ },
420
+ {
421
+ "name": "reference",
422
+ "in": "query",
423
+ "required": true,
424
+ "content": {
425
+ "application/json": {
426
+ "schema": {
427
+ "type": "string"
83
428
  }
84
429
  }
85
430
  }
@@ -95,21 +440,124 @@
95
440
  {
96
441
  "type": "object",
97
442
  "properties": {
98
- "userId": {
443
+ "appId": {
99
444
  "type": "string"
100
445
  },
101
- "title": {
446
+ "reference": {
102
447
  "type": "string"
103
448
  },
104
- "_id": {
105
- "type": "string",
106
- "description": "ID of a document in \"todos\""
449
+ "stage": {
450
+ "enum": ["generating", "building"]
451
+ },
452
+ "deployment": {
453
+ "type": "object",
454
+ "properties": {
455
+ "name": {
456
+ "type": "string"
457
+ },
458
+ "reference": {
459
+ "type": "string"
460
+ },
461
+ "convexUrl": {
462
+ "type": "string"
463
+ },
464
+ "convexSiteUrl": {
465
+ "type": "string"
466
+ }
467
+ },
468
+ "required": [
469
+ "name",
470
+ "reference",
471
+ "convexUrl",
472
+ "convexSiteUrl"
473
+ ],
474
+ "additionalProperties": false
475
+ },
476
+ "platforms": {
477
+ "type": "object",
478
+ "additionalProperties": {
479
+ "type": "object",
480
+ "properties": {
481
+ "enabled": {
482
+ "type": "boolean"
483
+ },
484
+ "url": {
485
+ "type": "string"
486
+ },
487
+ "latest": {
488
+ "type": "object",
489
+ "properties": {
490
+ "status": {
491
+ "enum": [
492
+ "building",
493
+ "ready",
494
+ "failed",
495
+ "blocked"
496
+ ]
497
+ },
498
+ "reason": {
499
+ "type": "string"
500
+ },
501
+ "version": {
502
+ "type": "string"
503
+ },
504
+ "githubReleaseUrl": {
505
+ "type": "string"
506
+ },
507
+ "artifactUrl": {
508
+ "type": "string"
509
+ },
510
+ "updateUrl": {
511
+ "type": "string"
512
+ },
513
+ "run": {
514
+ "type": "object",
515
+ "properties": {
516
+ "id": {
517
+ "type": "number"
518
+ },
519
+ "attempt": {
520
+ "type": "number"
521
+ },
522
+ "number": {
523
+ "type": "number"
524
+ },
525
+ "commitSha": {
526
+ "type": "string"
527
+ },
528
+ "url": {
529
+ "type": "string"
530
+ }
531
+ },
532
+ "required": [
533
+ "id",
534
+ "attempt",
535
+ "number",
536
+ "commitSha",
537
+ "url"
538
+ ],
539
+ "additionalProperties": false
540
+ }
541
+ },
542
+ "required": ["status", "run"],
543
+ "additionalProperties": false
544
+ }
545
+ },
546
+ "required": ["enabled"],
547
+ "additionalProperties": false
548
+ }
107
549
  },
108
- "_creationTime": {
550
+ "updatedAt": {
109
551
  "type": "number"
110
552
  }
111
553
  },
112
- "required": ["userId", "title", "_id", "_creationTime"],
554
+ "required": [
555
+ "appId",
556
+ "reference",
557
+ "stage",
558
+ "platforms",
559
+ "updatedAt"
560
+ ],
113
561
  "additionalProperties": false
114
562
  },
115
563
  {
@@ -135,38 +583,508 @@
135
583
  }
136
584
  }
137
585
  },
138
- "/api/todos/list": {
586
+ "/api/previews/list": {
139
587
  "get": {
140
- "operationId": "todosList",
141
- "x-convex-function": "todos/internal:list",
142
- "parameters": [],
588
+ "operationId": "previewsList",
589
+ "x-convex-function": "previews/internal:list",
590
+ "parameters": [
591
+ {
592
+ "name": "appId",
593
+ "in": "query",
594
+ "required": true,
595
+ "content": {
596
+ "application/json": {
597
+ "schema": {
598
+ "type": "string"
599
+ }
600
+ }
601
+ }
602
+ },
603
+ {
604
+ "name": "paginationOpts",
605
+ "in": "query",
606
+ "required": true,
607
+ "content": {
608
+ "application/json": {
609
+ "schema": {
610
+ "type": "object",
611
+ "properties": {
612
+ "numItems": {
613
+ "type": "number"
614
+ },
615
+ "cursor": {
616
+ "anyOf": [
617
+ {
618
+ "type": "string"
619
+ },
620
+ {
621
+ "type": "null"
622
+ }
623
+ ]
624
+ },
625
+ "endCursor": {
626
+ "anyOf": [
627
+ {
628
+ "type": "string"
629
+ },
630
+ {
631
+ "type": "null"
632
+ }
633
+ ]
634
+ },
635
+ "id": {
636
+ "type": "number"
637
+ },
638
+ "maximumRowsRead": {
639
+ "type": "number"
640
+ },
641
+ "maximumBytesRead": {
642
+ "type": "number"
643
+ }
644
+ },
645
+ "required": ["numItems", "cursor"],
646
+ "additionalProperties": false
647
+ }
648
+ }
649
+ }
650
+ }
651
+ ],
143
652
  "responses": {
144
653
  "200": {
145
654
  "description": "Success",
146
655
  "content": {
147
656
  "application/json": {
148
657
  "schema": {
149
- "type": "array",
150
- "items": {
151
- "type": "object",
152
- "properties": {
153
- "userId": {
154
- "type": "string"
155
- },
156
- "title": {
157
- "type": "string"
158
- },
159
- "_id": {
160
- "type": "string",
161
- "description": "ID of a document in \"todos\""
162
- },
163
- "_creationTime": {
164
- "type": "number"
658
+ "type": "object",
659
+ "properties": {
660
+ "page": {
661
+ "type": "array",
662
+ "items": {
663
+ "type": "object",
664
+ "properties": {
665
+ "appId": {
666
+ "type": "string"
667
+ },
668
+ "reference": {
669
+ "type": "string"
670
+ },
671
+ "stage": {
672
+ "enum": ["generating", "building"]
673
+ },
674
+ "deployment": {
675
+ "type": "object",
676
+ "properties": {
677
+ "name": {
678
+ "type": "string"
679
+ },
680
+ "reference": {
681
+ "type": "string"
682
+ },
683
+ "convexUrl": {
684
+ "type": "string"
685
+ },
686
+ "convexSiteUrl": {
687
+ "type": "string"
688
+ }
689
+ },
690
+ "required": [
691
+ "name",
692
+ "reference",
693
+ "convexUrl",
694
+ "convexSiteUrl"
695
+ ],
696
+ "additionalProperties": false
697
+ },
698
+ "platforms": {
699
+ "type": "object",
700
+ "additionalProperties": {
701
+ "type": "object",
702
+ "properties": {
703
+ "enabled": {
704
+ "type": "boolean"
705
+ },
706
+ "url": {
707
+ "type": "string"
708
+ },
709
+ "latest": {
710
+ "type": "object",
711
+ "properties": {
712
+ "status": {
713
+ "enum": [
714
+ "building",
715
+ "ready",
716
+ "failed",
717
+ "blocked"
718
+ ]
719
+ },
720
+ "reason": {
721
+ "type": "string"
722
+ },
723
+ "version": {
724
+ "type": "string"
725
+ },
726
+ "githubReleaseUrl": {
727
+ "type": "string"
728
+ },
729
+ "artifactUrl": {
730
+ "type": "string"
731
+ },
732
+ "updateUrl": {
733
+ "type": "string"
734
+ },
735
+ "run": {
736
+ "type": "object",
737
+ "properties": {
738
+ "id": {
739
+ "type": "number"
740
+ },
741
+ "attempt": {
742
+ "type": "number"
743
+ },
744
+ "number": {
745
+ "type": "number"
746
+ },
747
+ "commitSha": {
748
+ "type": "string"
749
+ },
750
+ "url": {
751
+ "type": "string"
752
+ }
753
+ },
754
+ "required": [
755
+ "id",
756
+ "attempt",
757
+ "number",
758
+ "commitSha",
759
+ "url"
760
+ ],
761
+ "additionalProperties": false
762
+ }
763
+ },
764
+ "required": ["status", "run"],
765
+ "additionalProperties": false
766
+ }
767
+ },
768
+ "required": ["enabled"],
769
+ "additionalProperties": false
770
+ }
771
+ },
772
+ "updatedAt": {
773
+ "type": "number"
774
+ }
775
+ },
776
+ "required": [
777
+ "appId",
778
+ "reference",
779
+ "stage",
780
+ "platforms",
781
+ "updatedAt"
782
+ ],
783
+ "additionalProperties": false
165
784
  }
166
785
  },
167
- "required": ["userId", "title", "_id", "_creationTime"],
168
- "additionalProperties": false
786
+ "continueCursor": {
787
+ "type": "string"
788
+ },
789
+ "isDone": {
790
+ "type": "boolean"
791
+ },
792
+ "splitCursor": {
793
+ "anyOf": [
794
+ {
795
+ "type": "string"
796
+ },
797
+ {
798
+ "type": "null"
799
+ }
800
+ ]
801
+ },
802
+ "pageStatus": {
803
+ "anyOf": [
804
+ {
805
+ "const": "SplitRecommended"
806
+ },
807
+ {
808
+ "const": "SplitRequired"
809
+ },
810
+ {
811
+ "type": "null"
812
+ }
813
+ ]
814
+ }
815
+ },
816
+ "required": ["page", "continueCursor", "isDone"],
817
+ "additionalProperties": false
818
+ }
819
+ }
820
+ }
821
+ },
822
+ "400": {
823
+ "description": "Invalid arguments"
824
+ },
825
+ "401": {
826
+ "description": "Authentication required"
827
+ },
828
+ "403": {
829
+ "description": "Insufficient scope"
830
+ },
831
+ "500": {
832
+ "description": "Internal error"
833
+ }
834
+ }
835
+ }
836
+ },
837
+ "/api/previews/token/create": {
838
+ "post": {
839
+ "operationId": "previewsTokenCreate",
840
+ "x-convex-function": "previews/token/internal:create",
841
+ "requestBody": {
842
+ "required": true,
843
+ "content": {
844
+ "application/json": {
845
+ "schema": {
846
+ "type": "object",
847
+ "properties": {
848
+ "appId": {
849
+ "type": "string"
850
+ },
851
+ "reference": {
852
+ "type": "string"
169
853
  }
854
+ },
855
+ "required": ["appId", "reference"],
856
+ "additionalProperties": false
857
+ }
858
+ }
859
+ }
860
+ },
861
+ "responses": {
862
+ "200": {
863
+ "description": "Success",
864
+ "content": {
865
+ "application/json": {
866
+ "schema": {
867
+ "type": "object",
868
+ "properties": {
869
+ "appId": {
870
+ "type": "string"
871
+ },
872
+ "name": {
873
+ "type": "string"
874
+ },
875
+ "reference": {
876
+ "type": "string"
877
+ },
878
+ "convexUrl": {
879
+ "type": "string"
880
+ },
881
+ "convexSiteUrl": {
882
+ "type": "string"
883
+ },
884
+ "deployKey": {
885
+ "type": "string"
886
+ }
887
+ },
888
+ "required": [
889
+ "appId",
890
+ "name",
891
+ "reference",
892
+ "convexUrl",
893
+ "convexSiteUrl",
894
+ "deployKey"
895
+ ],
896
+ "additionalProperties": false
897
+ }
898
+ }
899
+ }
900
+ },
901
+ "400": {
902
+ "description": "Invalid arguments"
903
+ },
904
+ "401": {
905
+ "description": "Authentication required"
906
+ },
907
+ "403": {
908
+ "description": "Insufficient scope"
909
+ },
910
+ "500": {
911
+ "description": "Internal error"
912
+ }
913
+ }
914
+ }
915
+ },
916
+ "/api/releases/get": {
917
+ "get": {
918
+ "operationId": "releasesGet",
919
+ "x-convex-function": "releases/internal:get",
920
+ "parameters": [
921
+ {
922
+ "name": "appId",
923
+ "in": "query",
924
+ "required": true,
925
+ "content": {
926
+ "application/json": {
927
+ "schema": {
928
+ "type": "string"
929
+ }
930
+ }
931
+ }
932
+ }
933
+ ],
934
+ "responses": {
935
+ "200": {
936
+ "description": "Success",
937
+ "content": {
938
+ "application/json": {
939
+ "schema": {
940
+ "anyOf": [
941
+ {
942
+ "type": "object",
943
+ "properties": {
944
+ "appId": {
945
+ "type": "string"
946
+ },
947
+ "platforms": {
948
+ "type": "object",
949
+ "additionalProperties": {
950
+ "type": "object",
951
+ "properties": {
952
+ "enabled": {
953
+ "type": "boolean"
954
+ },
955
+ "url": {
956
+ "type": "string"
957
+ },
958
+ "latest": {
959
+ "type": "object",
960
+ "properties": {
961
+ "status": {
962
+ "enum": [
963
+ "building",
964
+ "ready",
965
+ "failed",
966
+ "blocked"
967
+ ]
968
+ },
969
+ "reason": {
970
+ "type": "string"
971
+ },
972
+ "version": {
973
+ "type": "string"
974
+ },
975
+ "githubReleaseUrl": {
976
+ "type": "string"
977
+ },
978
+ "artifactUrl": {
979
+ "type": "string"
980
+ },
981
+ "updateUrl": {
982
+ "type": "string"
983
+ },
984
+ "run": {
985
+ "type": "object",
986
+ "properties": {
987
+ "id": {
988
+ "type": "number"
989
+ },
990
+ "attempt": {
991
+ "type": "number"
992
+ },
993
+ "number": {
994
+ "type": "number"
995
+ },
996
+ "commitSha": {
997
+ "type": "string"
998
+ },
999
+ "url": {
1000
+ "type": "string"
1001
+ }
1002
+ },
1003
+ "required": [
1004
+ "id",
1005
+ "attempt",
1006
+ "number",
1007
+ "commitSha",
1008
+ "url"
1009
+ ],
1010
+ "additionalProperties": false
1011
+ }
1012
+ },
1013
+ "required": ["status", "run"],
1014
+ "additionalProperties": false
1015
+ }
1016
+ },
1017
+ "required": ["enabled"],
1018
+ "additionalProperties": false
1019
+ }
1020
+ },
1021
+ "updatedAt": {
1022
+ "type": "number"
1023
+ }
1024
+ },
1025
+ "required": ["appId", "platforms", "updatedAt"],
1026
+ "additionalProperties": false
1027
+ },
1028
+ {
1029
+ "type": "null"
1030
+ }
1031
+ ]
1032
+ }
1033
+ }
1034
+ }
1035
+ },
1036
+ "400": {
1037
+ "description": "Invalid arguments"
1038
+ },
1039
+ "401": {
1040
+ "description": "Authentication required"
1041
+ },
1042
+ "403": {
1043
+ "description": "Insufficient scope"
1044
+ },
1045
+ "500": {
1046
+ "description": "Internal error"
1047
+ }
1048
+ }
1049
+ }
1050
+ },
1051
+ "/api/users/current": {
1052
+ "get": {
1053
+ "operationId": "usersCurrent",
1054
+ "x-convex-function": "users/internal:current",
1055
+ "parameters": [],
1056
+ "responses": {
1057
+ "200": {
1058
+ "description": "Success",
1059
+ "content": {
1060
+ "application/json": {
1061
+ "schema": {
1062
+ "anyOf": [
1063
+ {
1064
+ "type": "null"
1065
+ },
1066
+ {
1067
+ "type": "object",
1068
+ "properties": {
1069
+ "id": {
1070
+ "type": "string",
1071
+ "description": "ID of a document in \"users\""
1072
+ },
1073
+ "username": {
1074
+ "anyOf": [
1075
+ {
1076
+ "type": "string"
1077
+ },
1078
+ {
1079
+ "type": "null"
1080
+ }
1081
+ ]
1082
+ }
1083
+ },
1084
+ "required": ["id", "username"],
1085
+ "additionalProperties": false
1086
+ }
1087
+ ]
170
1088
  }
171
1089
  }
172
1090
  }