@backendrelay/core 1.1.0 → 2.0.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.
- package/dist/standalone/index.js +1 -1
- package/dist/standalone/index.umd.cjs +1 -1
- package/node_modules/@backendrelay/admin/dist/commonjs/__types__/typeUtils.d.ts +20 -0
- package/node_modules/@backendrelay/admin/dist/commonjs/__types__/typeUtils.d.ts.map +1 -0
- package/node_modules/@backendrelay/admin/dist/commonjs/__types__/typeUtils.js +5 -0
- package/node_modules/@backendrelay/admin/dist/commonjs/__types__/typeUtils.js.map +1 -0
- package/node_modules/@backendrelay/admin/dist/commonjs/__types__/typesTests.d.ts +2 -0
- package/node_modules/@backendrelay/admin/dist/commonjs/__types__/typesTests.d.ts.map +1 -0
- package/node_modules/@backendrelay/admin/dist/commonjs/__types__/typesTests.js +88 -0
- package/node_modules/@backendrelay/admin/dist/commonjs/__types__/typesTests.js.map +1 -0
- package/node_modules/@backendrelay/admin/dist/commonjs/byop.live.e2e.test.d.ts +2 -0
- package/node_modules/@backendrelay/admin/dist/commonjs/byop.live.e2e.test.d.ts.map +1 -0
- package/node_modules/@backendrelay/admin/dist/commonjs/byop.live.e2e.test.js +131 -0
- package/node_modules/@backendrelay/admin/dist/commonjs/byop.live.e2e.test.js.map +1 -0
- package/node_modules/@backendrelay/admin/dist/commonjs/config.test.d.ts +2 -0
- package/node_modules/@backendrelay/admin/dist/commonjs/config.test.d.ts.map +1 -0
- package/node_modules/@backendrelay/admin/dist/commonjs/config.test.js +65 -0
- package/node_modules/@backendrelay/admin/dist/commonjs/config.test.js.map +1 -0
- package/node_modules/@backendrelay/admin/dist/commonjs/index.d.ts +725 -0
- package/node_modules/@backendrelay/admin/dist/commonjs/index.d.ts.map +1 -0
- package/node_modules/@backendrelay/admin/dist/commonjs/index.js +1159 -0
- package/node_modules/@backendrelay/admin/dist/commonjs/index.js.map +1 -0
- package/node_modules/@backendrelay/admin/dist/commonjs/live.e2e.test.d.ts +2 -0
- package/node_modules/@backendrelay/admin/dist/commonjs/live.e2e.test.d.ts.map +1 -0
- package/node_modules/@backendrelay/admin/dist/commonjs/live.e2e.test.js +91 -0
- package/node_modules/@backendrelay/admin/dist/commonjs/live.e2e.test.js.map +1 -0
- package/node_modules/@backendrelay/admin/dist/commonjs/package.json +3 -0
- package/node_modules/@backendrelay/admin/dist/commonjs/polyfill.d.ts +17 -0
- package/node_modules/@backendrelay/admin/dist/commonjs/polyfill.d.ts.map +1 -0
- package/node_modules/@backendrelay/admin/dist/commonjs/polyfill.js +26 -0
- package/node_modules/@backendrelay/admin/dist/commonjs/polyfill.js.map +1 -0
- package/node_modules/@backendrelay/admin/dist/commonjs/removed-features.test.d.ts +2 -0
- package/node_modules/@backendrelay/admin/dist/commonjs/removed-features.test.d.ts.map +1 -0
- package/node_modules/@backendrelay/admin/dist/commonjs/removed-features.test.js +50 -0
- package/node_modules/@backendrelay/admin/dist/commonjs/removed-features.test.js.map +1 -0
- package/node_modules/@backendrelay/admin/dist/commonjs/storage-upload.test.d.ts +2 -0
- package/node_modules/@backendrelay/admin/dist/commonjs/storage-upload.test.d.ts.map +1 -0
- package/node_modules/@backendrelay/admin/dist/commonjs/storage-upload.test.js +33 -0
- package/node_modules/@backendrelay/admin/dist/commonjs/storage-upload.test.js.map +1 -0
- package/node_modules/@backendrelay/admin/dist/commonjs/subscribe.d.ts +39 -0
- package/node_modules/@backendrelay/admin/dist/commonjs/subscribe.d.ts.map +1 -0
- package/node_modules/@backendrelay/admin/dist/commonjs/subscribe.js +306 -0
- package/node_modules/@backendrelay/admin/dist/commonjs/subscribe.js.map +1 -0
- package/node_modules/@backendrelay/admin/dist/commonjs/version.d.ts +3 -0
- package/node_modules/@backendrelay/admin/dist/commonjs/version.d.ts.map +1 -0
- package/node_modules/@backendrelay/admin/dist/commonjs/version.js +5 -0
- package/node_modules/@backendrelay/admin/dist/commonjs/version.js.map +1 -0
- package/node_modules/@backendrelay/admin/dist/esm/__types__/typeUtils.d.ts +20 -0
- package/node_modules/@backendrelay/admin/dist/esm/__types__/typeUtils.d.ts.map +1 -0
- package/node_modules/@backendrelay/admin/dist/esm/__types__/typeUtils.js +4 -0
- package/node_modules/@backendrelay/admin/dist/esm/__types__/typeUtils.js.map +1 -0
- package/node_modules/@backendrelay/admin/dist/esm/__types__/typesTests.d.ts +2 -0
- package/node_modules/@backendrelay/admin/dist/esm/__types__/typesTests.d.ts.map +1 -0
- package/node_modules/@backendrelay/admin/dist/esm/__types__/typesTests.js +86 -0
- package/node_modules/@backendrelay/admin/dist/esm/__types__/typesTests.js.map +1 -0
- package/node_modules/@backendrelay/admin/dist/esm/byop.live.e2e.test.d.ts +2 -0
- package/node_modules/@backendrelay/admin/dist/esm/byop.live.e2e.test.d.ts.map +1 -0
- package/node_modules/@backendrelay/admin/dist/esm/byop.live.e2e.test.js +129 -0
- package/node_modules/@backendrelay/admin/dist/esm/byop.live.e2e.test.js.map +1 -0
- package/node_modules/@backendrelay/admin/dist/esm/config.test.d.ts +2 -0
- package/node_modules/@backendrelay/admin/dist/esm/config.test.d.ts.map +1 -0
- package/node_modules/@backendrelay/admin/dist/esm/config.test.js +63 -0
- package/node_modules/@backendrelay/admin/dist/esm/config.test.js.map +1 -0
- package/node_modules/@backendrelay/admin/dist/esm/index.d.ts +725 -0
- package/node_modules/@backendrelay/admin/dist/esm/index.d.ts.map +1 -0
- package/node_modules/@backendrelay/admin/dist/esm/index.js +1146 -0
- package/node_modules/@backendrelay/admin/dist/esm/index.js.map +1 -0
- package/node_modules/@backendrelay/admin/dist/esm/live.e2e.test.d.ts +2 -0
- package/node_modules/@backendrelay/admin/dist/esm/live.e2e.test.d.ts.map +1 -0
- package/node_modules/@backendrelay/admin/dist/esm/live.e2e.test.js +89 -0
- package/node_modules/@backendrelay/admin/dist/esm/live.e2e.test.js.map +1 -0
- package/node_modules/@backendrelay/admin/dist/esm/package.json +3 -0
- package/node_modules/@backendrelay/admin/dist/esm/polyfill.d.ts +17 -0
- package/node_modules/@backendrelay/admin/dist/esm/polyfill.d.ts.map +1 -0
- package/node_modules/@backendrelay/admin/dist/esm/polyfill.js +22 -0
- package/node_modules/@backendrelay/admin/dist/esm/polyfill.js.map +1 -0
- package/node_modules/@backendrelay/admin/dist/esm/removed-features.test.d.ts +2 -0
- package/node_modules/@backendrelay/admin/dist/esm/removed-features.test.d.ts.map +1 -0
- package/node_modules/@backendrelay/admin/dist/esm/removed-features.test.js +48 -0
- package/node_modules/@backendrelay/admin/dist/esm/removed-features.test.js.map +1 -0
- package/node_modules/@backendrelay/admin/dist/esm/storage-upload.test.d.ts +2 -0
- package/node_modules/@backendrelay/admin/dist/esm/storage-upload.test.d.ts.map +1 -0
- package/node_modules/@backendrelay/admin/dist/esm/storage-upload.test.js +31 -0
- package/node_modules/@backendrelay/admin/dist/esm/storage-upload.test.js.map +1 -0
- package/node_modules/@backendrelay/admin/dist/esm/subscribe.d.ts +39 -0
- package/node_modules/@backendrelay/admin/dist/esm/subscribe.d.ts.map +1 -0
- package/node_modules/@backendrelay/admin/dist/esm/subscribe.js +300 -0
- package/node_modules/@backendrelay/admin/dist/esm/subscribe.js.map +1 -0
- package/node_modules/@backendrelay/admin/dist/esm/version.d.ts +3 -0
- package/node_modules/@backendrelay/admin/dist/esm/version.d.ts.map +1 -0
- package/{src/version.ts → node_modules/@backendrelay/admin/dist/esm/version.js} +1 -1
- package/node_modules/@backendrelay/admin/dist/esm/version.js.map +1 -0
- package/node_modules/@backendrelay/admin/package.json +52 -0
- package/node_modules/@backendrelay/functions/README.md +131 -0
- package/node_modules/@backendrelay/functions/dist/commonjs/__types__/typeUtils.d.ts +3 -0
- package/node_modules/@backendrelay/functions/dist/commonjs/__types__/typeUtils.d.ts.map +1 -0
- package/node_modules/@backendrelay/functions/dist/commonjs/__types__/typeUtils.js +3 -0
- package/node_modules/@backendrelay/functions/dist/commonjs/__types__/typeUtils.js.map +1 -0
- package/node_modules/@backendrelay/functions/dist/commonjs/__types__/typesTests.d.ts +2 -0
- package/node_modules/@backendrelay/functions/dist/commonjs/__types__/typesTests.d.ts.map +1 -0
- package/node_modules/@backendrelay/functions/dist/commonjs/__types__/typesTests.js +51 -0
- package/node_modules/@backendrelay/functions/dist/commonjs/__types__/typesTests.js.map +1 -0
- package/node_modules/@backendrelay/functions/dist/commonjs/index.d.ts +230 -0
- package/node_modules/@backendrelay/functions/dist/commonjs/index.d.ts.map +1 -0
- package/node_modules/@backendrelay/functions/dist/commonjs/index.js +415 -0
- package/node_modules/@backendrelay/functions/dist/commonjs/index.js.map +1 -0
- package/node_modules/@backendrelay/functions/dist/commonjs/package.json +3 -0
- package/node_modules/@backendrelay/functions/dist/esm/__types__/typeUtils.d.ts +3 -0
- package/node_modules/@backendrelay/functions/dist/esm/__types__/typeUtils.d.ts.map +1 -0
- package/node_modules/@backendrelay/functions/dist/esm/__types__/typeUtils.js +2 -0
- package/node_modules/@backendrelay/functions/dist/esm/__types__/typeUtils.js.map +1 -0
- package/node_modules/@backendrelay/functions/dist/esm/__types__/typesTests.d.ts +2 -0
- package/node_modules/@backendrelay/functions/dist/esm/__types__/typesTests.d.ts.map +1 -0
- package/node_modules/@backendrelay/functions/dist/esm/__types__/typesTests.js +49 -0
- package/node_modules/@backendrelay/functions/dist/esm/__types__/typesTests.js.map +1 -0
- package/node_modules/@backendrelay/functions/dist/esm/index.d.ts +230 -0
- package/node_modules/@backendrelay/functions/dist/esm/index.d.ts.map +1 -0
- package/node_modules/@backendrelay/functions/dist/esm/index.js +403 -0
- package/node_modules/@backendrelay/functions/dist/esm/index.js.map +1 -0
- package/node_modules/@backendrelay/functions/dist/esm/package.json +3 -0
- package/node_modules/@backendrelay/functions/package.json +49 -0
- package/node_modules/@backendrelay/hatchet/dist/commonjs/index.d.ts +43 -0
- package/node_modules/@backendrelay/hatchet/dist/commonjs/index.d.ts.map +1 -0
- package/node_modules/@backendrelay/hatchet/dist/commonjs/index.js +63 -0
- package/node_modules/@backendrelay/hatchet/dist/commonjs/index.js.map +1 -0
- package/node_modules/@backendrelay/hatchet/dist/commonjs/package.json +3 -0
- package/node_modules/@backendrelay/hatchet/dist/esm/index.d.ts +43 -0
- package/node_modules/@backendrelay/hatchet/dist/esm/index.d.ts.map +1 -0
- package/node_modules/@backendrelay/hatchet/dist/esm/index.js +59 -0
- package/node_modules/@backendrelay/hatchet/dist/esm/index.js.map +1 -0
- package/node_modules/@backendrelay/hatchet/dist/esm/package.json +3 -0
- package/node_modules/@backendrelay/hatchet/package.json +46 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/ProgressPromise.d.ts +18 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/ProgressPromise.d.ts.map +1 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/ProgressPromise.js +77 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/ProgressPromise.js.map +1 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/api/apps.d.ts +99 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/api/apps.d.ts.map +1 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/api/apps.js +177 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/api/apps.js.map +1 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/api/auth.d.ts +7 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/api/auth.d.ts.map +1 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/api/auth.js +15 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/api/auth.js.map +1 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/api/http.d.ts +3 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/api/http.d.ts.map +1 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/api/http.js +46 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/api/http.js.map +1 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/api/perms.d.ts +13 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/api/perms.d.ts.map +1 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/api/perms.js +25 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/api/perms.js.map +1 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/api/platform-api.d.ts +285 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/api/platform-api.d.ts.map +1 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/api/platform-api.js +426 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/api/platform-api.js.map +1 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/api/schema-coerce.d.ts +24 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/api/schema-coerce.d.ts.map +1 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/api/schema-coerce.js +108 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/api/schema-coerce.js.map +1 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/api/schema.d.ts +188 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/api/schema.d.ts.map +1 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/api/schema.js +412 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/api/schema.js.map +1 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/api.d.ts +9 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/api.d.ts.map +1 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/api.js +12 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/api.js.map +1 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/backupDownload.d.ts +89 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/backupDownload.d.ts.map +1 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/backupDownload.js +357 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/backupDownload.js.map +1 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/backups.d.ts +146 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/backups.d.ts.map +1 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/backups.js +251 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/backups.js.map +1 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/clerk.d.ts +2 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/clerk.d.ts.map +1 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/clerk.js +29 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/clerk.js.map +1 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/consts.d.ts +11 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/consts.d.ts.map +1 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/consts.js +17 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/consts.js.map +1 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/crypto.d.ts +4 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/crypto.d.ts.map +1 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/crypto.js +26 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/crypto.js.map +1 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/index.d.ts +19 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/index.d.ts.map +1 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/index.js +76 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/index.js.map +1 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/migrationUtils.d.ts +4 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/migrationUtils.d.ts.map +1 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/migrationUtils.js +52 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/migrationUtils.js.map +1 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/migrations.d.ts +99 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/migrations.d.ts.map +1 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/migrations.js +597 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/migrations.js.map +1 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/oauth.d.ts +98 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/oauth.d.ts.map +1 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/oauth.js +275 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/oauth.js.map +1 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/oauthCommon.d.ts +12 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/oauthCommon.d.ts.map +1 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/oauthCommon.js +26 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/oauthCommon.js.map +1 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/package.json +3 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/perms.d.ts +3 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/perms.d.ts.map +1 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/perms.js +66 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/perms.js.map +1 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/privateFields.d.ts +13 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/privateFields.d.ts.map +1 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/privateFields.js +31 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/privateFields.js.map +1 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/relationships.d.ts +7 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/relationships.d.ts.map +1 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/relationships.js +46 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/relationships.js.map +1 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/schema.d.ts +161 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/schema.d.ts.map +1 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/schema.js +174 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/schema.js.map +1 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/serverOAuth.d.ts +25 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/serverOAuth.d.ts.map +1 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/serverOAuth.js +68 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/serverOAuth.js.map +1 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/typescript-schema.d.ts +17 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/typescript-schema.d.ts.map +1 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/typescript-schema.js +314 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/typescript-schema.js.map +1 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/util.d.ts +13 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/util.d.ts.map +1 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/util.js +55 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/util.js.map +1 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/version.d.ts +3 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/version.d.ts.map +1 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/version.js +5 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/version.js.map +1 -0
- package/node_modules/@backendrelay/platform/dist/esm/ProgressPromise.d.ts +18 -0
- package/node_modules/@backendrelay/platform/dist/esm/ProgressPromise.d.ts.map +1 -0
- package/node_modules/@backendrelay/platform/dist/esm/ProgressPromise.js +73 -0
- package/node_modules/@backendrelay/platform/dist/esm/ProgressPromise.js.map +1 -0
- package/node_modules/@backendrelay/platform/dist/esm/api/apps.d.ts +99 -0
- package/node_modules/@backendrelay/platform/dist/esm/api/apps.d.ts.map +1 -0
- package/node_modules/@backendrelay/platform/dist/esm/api/apps.js +165 -0
- package/node_modules/@backendrelay/platform/dist/esm/api/apps.js.map +1 -0
- package/node_modules/@backendrelay/platform/dist/esm/api/auth.d.ts +7 -0
- package/node_modules/@backendrelay/platform/dist/esm/api/auth.d.ts.map +1 -0
- package/node_modules/@backendrelay/platform/dist/esm/api/auth.js +12 -0
- package/node_modules/@backendrelay/platform/dist/esm/api/auth.js.map +1 -0
- package/node_modules/@backendrelay/platform/dist/esm/api/http.d.ts +3 -0
- package/node_modules/@backendrelay/platform/dist/esm/api/http.d.ts.map +1 -0
- package/node_modules/@backendrelay/platform/dist/esm/api/http.js +39 -0
- package/node_modules/@backendrelay/platform/dist/esm/api/http.js.map +1 -0
- package/node_modules/@backendrelay/platform/dist/esm/api/perms.d.ts +13 -0
- package/node_modules/@backendrelay/platform/dist/esm/api/perms.d.ts.map +1 -0
- package/node_modules/@backendrelay/platform/dist/esm/api/perms.js +21 -0
- package/node_modules/@backendrelay/platform/dist/esm/api/perms.js.map +1 -0
- package/node_modules/@backendrelay/platform/dist/esm/api/platform-api.d.ts +285 -0
- package/node_modules/@backendrelay/platform/dist/esm/api/platform-api.d.ts.map +1 -0
- package/node_modules/@backendrelay/platform/dist/esm/api/platform-api.js +421 -0
- package/node_modules/@backendrelay/platform/dist/esm/api/platform-api.js.map +1 -0
- package/node_modules/@backendrelay/platform/dist/esm/api/schema-coerce.d.ts +24 -0
- package/node_modules/@backendrelay/platform/dist/esm/api/schema-coerce.d.ts.map +1 -0
- package/node_modules/@backendrelay/platform/dist/esm/api/schema-coerce.js +99 -0
- package/node_modules/@backendrelay/platform/dist/esm/api/schema-coerce.js.map +1 -0
- package/node_modules/@backendrelay/platform/dist/esm/api/schema.d.ts +188 -0
- package/node_modules/@backendrelay/platform/dist/esm/api/schema.d.ts.map +1 -0
- package/node_modules/@backendrelay/platform/dist/esm/api/schema.js +393 -0
- package/node_modules/@backendrelay/platform/dist/esm/api/schema.js.map +1 -0
- package/node_modules/@backendrelay/platform/dist/esm/api.d.ts +9 -0
- package/node_modules/@backendrelay/platform/dist/esm/api.d.ts.map +1 -0
- package/node_modules/@backendrelay/platform/dist/esm/api.js +4 -0
- package/node_modules/@backendrelay/platform/dist/esm/api.js.map +1 -0
- package/node_modules/@backendrelay/platform/dist/esm/backupDownload.d.ts +89 -0
- package/node_modules/@backendrelay/platform/dist/esm/backupDownload.d.ts.map +1 -0
- package/node_modules/@backendrelay/platform/dist/esm/backupDownload.js +354 -0
- package/node_modules/@backendrelay/platform/dist/esm/backupDownload.js.map +1 -0
- package/node_modules/@backendrelay/platform/dist/esm/backups.d.ts +146 -0
- package/node_modules/@backendrelay/platform/dist/esm/backups.d.ts.map +1 -0
- package/node_modules/@backendrelay/platform/dist/esm/backups.js +240 -0
- package/node_modules/@backendrelay/platform/dist/esm/backups.js.map +1 -0
- package/node_modules/@backendrelay/platform/dist/esm/clerk.d.ts +2 -0
- package/node_modules/@backendrelay/platform/dist/esm/clerk.d.ts.map +1 -0
- package/node_modules/@backendrelay/platform/dist/esm/clerk.js +26 -0
- package/node_modules/@backendrelay/platform/dist/esm/clerk.js.map +1 -0
- package/node_modules/@backendrelay/platform/dist/esm/consts.d.ts +11 -0
- package/node_modules/@backendrelay/platform/dist/esm/consts.d.ts.map +1 -0
- package/node_modules/@backendrelay/platform/dist/esm/consts.js +13 -0
- package/node_modules/@backendrelay/platform/dist/esm/consts.js.map +1 -0
- package/node_modules/@backendrelay/platform/dist/esm/crypto.d.ts +4 -0
- package/node_modules/@backendrelay/platform/dist/esm/crypto.d.ts.map +1 -0
- package/node_modules/@backendrelay/platform/dist/esm/crypto.js +21 -0
- package/node_modules/@backendrelay/platform/dist/esm/crypto.js.map +1 -0
- package/node_modules/@backendrelay/platform/dist/esm/index.d.ts +19 -0
- package/node_modules/@backendrelay/platform/dist/esm/index.d.ts.map +1 -0
- package/node_modules/@backendrelay/platform/dist/esm/index.js +18 -0
- package/node_modules/@backendrelay/platform/dist/esm/index.js.map +1 -0
- package/node_modules/@backendrelay/platform/dist/esm/migrationUtils.d.ts +4 -0
- package/node_modules/@backendrelay/platform/dist/esm/migrationUtils.d.ts.map +1 -0
- package/node_modules/@backendrelay/platform/dist/esm/migrationUtils.js +47 -0
- package/node_modules/@backendrelay/platform/dist/esm/migrationUtils.js.map +1 -0
- package/node_modules/@backendrelay/platform/dist/esm/migrations.d.ts +99 -0
- package/node_modules/@backendrelay/platform/dist/esm/migrations.d.ts.map +1 -0
- package/node_modules/@backendrelay/platform/dist/esm/migrations.js +588 -0
- package/node_modules/@backendrelay/platform/dist/esm/migrations.js.map +1 -0
- package/node_modules/@backendrelay/platform/dist/esm/oauth.d.ts +98 -0
- package/node_modules/@backendrelay/platform/dist/esm/oauth.d.ts.map +1 -0
- package/node_modules/@backendrelay/platform/dist/esm/oauth.js +266 -0
- package/node_modules/@backendrelay/platform/dist/esm/oauth.js.map +1 -0
- package/node_modules/@backendrelay/platform/dist/esm/oauthCommon.d.ts +12 -0
- package/node_modules/@backendrelay/platform/dist/esm/oauthCommon.d.ts.map +1 -0
- package/node_modules/@backendrelay/platform/dist/esm/oauthCommon.js +22 -0
- package/node_modules/@backendrelay/platform/dist/esm/oauthCommon.js.map +1 -0
- package/node_modules/@backendrelay/platform/dist/esm/package.json +3 -0
- package/node_modules/@backendrelay/platform/dist/esm/perms.d.ts +3 -0
- package/node_modules/@backendrelay/platform/dist/esm/perms.d.ts.map +1 -0
- package/node_modules/@backendrelay/platform/dist/esm/perms.js +62 -0
- package/node_modules/@backendrelay/platform/dist/esm/perms.js.map +1 -0
- package/node_modules/@backendrelay/platform/dist/esm/privateFields.d.ts +13 -0
- package/node_modules/@backendrelay/platform/dist/esm/privateFields.d.ts.map +1 -0
- package/node_modules/@backendrelay/platform/dist/esm/privateFields.js +28 -0
- package/node_modules/@backendrelay/platform/dist/esm/privateFields.js.map +1 -0
- package/node_modules/@backendrelay/platform/dist/esm/relationships.d.ts +7 -0
- package/node_modules/@backendrelay/platform/dist/esm/relationships.d.ts.map +1 -0
- package/node_modules/@backendrelay/platform/dist/esm/relationships.js +43 -0
- package/node_modules/@backendrelay/platform/dist/esm/relationships.js.map +1 -0
- package/node_modules/@backendrelay/platform/dist/esm/schema.d.ts +161 -0
- package/node_modules/@backendrelay/platform/dist/esm/schema.d.ts.map +1 -0
- package/node_modules/@backendrelay/platform/dist/esm/schema.js +158 -0
- package/node_modules/@backendrelay/platform/dist/esm/schema.js.map +1 -0
- package/node_modules/@backendrelay/platform/dist/esm/serverOAuth.d.ts +25 -0
- package/node_modules/@backendrelay/platform/dist/esm/serverOAuth.d.ts.map +1 -0
- package/node_modules/@backendrelay/platform/dist/esm/serverOAuth.js +64 -0
- package/node_modules/@backendrelay/platform/dist/esm/serverOAuth.js.map +1 -0
- package/node_modules/@backendrelay/platform/dist/esm/typescript-schema.d.ts +17 -0
- package/node_modules/@backendrelay/platform/dist/esm/typescript-schema.d.ts.map +1 -0
- package/node_modules/@backendrelay/platform/dist/esm/typescript-schema.js +310 -0
- package/node_modules/@backendrelay/platform/dist/esm/typescript-schema.js.map +1 -0
- package/node_modules/@backendrelay/platform/dist/esm/util.d.ts +13 -0
- package/node_modules/@backendrelay/platform/dist/esm/util.d.ts.map +1 -0
- package/node_modules/@backendrelay/platform/dist/esm/util.js +46 -0
- package/node_modules/@backendrelay/platform/dist/esm/util.js.map +1 -0
- package/node_modules/@backendrelay/platform/dist/esm/version.d.ts +3 -0
- package/node_modules/@backendrelay/platform/dist/esm/version.d.ts.map +1 -0
- package/node_modules/@backendrelay/platform/dist/esm/version.js +3 -0
- package/node_modules/@backendrelay/platform/dist/esm/version.js.map +1 -0
- package/node_modules/@backendrelay/platform/dist/standalone/index.js +13738 -0
- package/node_modules/@backendrelay/platform/dist/standalone/index.umd.cjs +72 -0
- package/node_modules/@backendrelay/platform/package.json +51 -0
- package/node_modules/@backendrelay/resumable-stream/dist/commonjs/index.d.ts +67 -0
- package/node_modules/@backendrelay/resumable-stream/dist/commonjs/index.d.ts.map +1 -0
- package/node_modules/@backendrelay/resumable-stream/dist/commonjs/index.js +129 -0
- package/node_modules/@backendrelay/resumable-stream/dist/commonjs/index.js.map +1 -0
- package/node_modules/@backendrelay/resumable-stream/dist/commonjs/package.json +3 -0
- package/node_modules/@backendrelay/resumable-stream/dist/esm/index.d.ts +67 -0
- package/node_modules/@backendrelay/resumable-stream/dist/esm/index.d.ts.map +1 -0
- package/node_modules/@backendrelay/resumable-stream/dist/esm/index.js +126 -0
- package/node_modules/@backendrelay/resumable-stream/dist/esm/index.js.map +1 -0
- package/node_modules/@backendrelay/resumable-stream/dist/esm/package.json +3 -0
- package/node_modules/@backendrelay/resumable-stream/dist/standalone/index.js +4354 -0
- package/node_modules/@backendrelay/resumable-stream/dist/standalone/index.umd.cjs +6 -0
- package/node_modules/@backendrelay/resumable-stream/package.json +47 -0
- package/node_modules/@backendrelay/rules/README.md +34 -0
- package/node_modules/@backendrelay/rules/dist/commonjs/index.d.ts +117 -0
- package/node_modules/@backendrelay/rules/dist/commonjs/index.d.ts.map +1 -0
- package/node_modules/@backendrelay/rules/dist/commonjs/index.js +68 -0
- package/node_modules/@backendrelay/rules/dist/commonjs/index.js.map +1 -0
- package/node_modules/@backendrelay/rules/dist/commonjs/package.json +3 -0
- package/node_modules/@backendrelay/rules/dist/esm/index.d.ts +117 -0
- package/node_modules/@backendrelay/rules/dist/esm/index.d.ts.map +1 -0
- package/node_modules/@backendrelay/rules/dist/esm/index.js +64 -0
- package/node_modules/@backendrelay/rules/dist/esm/index.js.map +1 -0
- package/node_modules/@backendrelay/rules/dist/esm/package.json +3 -0
- package/node_modules/@backendrelay/rules/package.json +46 -0
- package/node_modules/@backendrelay/test/README.md +75 -0
- package/node_modules/@backendrelay/test/dist/commonjs/index.d.ts +74 -0
- package/node_modules/@backendrelay/test/dist/commonjs/index.d.ts.map +1 -0
- package/node_modules/@backendrelay/test/dist/commonjs/index.js +197 -0
- package/node_modules/@backendrelay/test/dist/commonjs/index.js.map +1 -0
- package/node_modules/@backendrelay/test/dist/commonjs/live.e2e.test.d.ts +2 -0
- package/node_modules/@backendrelay/test/dist/commonjs/live.e2e.test.d.ts.map +1 -0
- package/node_modules/@backendrelay/test/dist/commonjs/live.e2e.test.js +45 -0
- package/node_modules/@backendrelay/test/dist/commonjs/live.e2e.test.js.map +1 -0
- package/node_modules/@backendrelay/test/dist/commonjs/package.json +3 -0
- package/node_modules/@backendrelay/test/dist/esm/index.d.ts +74 -0
- package/node_modules/@backendrelay/test/dist/esm/index.d.ts.map +1 -0
- package/node_modules/@backendrelay/test/dist/esm/index.js +192 -0
- package/node_modules/@backendrelay/test/dist/esm/index.js.map +1 -0
- package/node_modules/@backendrelay/test/dist/esm/live.e2e.test.d.ts +2 -0
- package/node_modules/@backendrelay/test/dist/esm/live.e2e.test.d.ts.map +1 -0
- package/node_modules/@backendrelay/test/dist/esm/live.e2e.test.js +43 -0
- package/node_modules/@backendrelay/test/dist/esm/live.e2e.test.js.map +1 -0
- package/node_modules/@backendrelay/test/dist/esm/package.json +3 -0
- package/node_modules/@backendrelay/test/package.json +49 -0
- package/node_modules/@backendrelay/version/dist/commonjs/index.d.ts +3 -0
- package/node_modules/@backendrelay/version/dist/commonjs/index.d.ts.map +1 -0
- package/node_modules/@backendrelay/version/dist/commonjs/index.js +6 -0
- package/node_modules/@backendrelay/version/dist/commonjs/index.js.map +1 -0
- package/node_modules/@backendrelay/version/dist/commonjs/package.json +3 -0
- package/node_modules/@backendrelay/version/dist/commonjs/version.d.ts +3 -0
- package/node_modules/@backendrelay/version/dist/commonjs/version.d.ts.map +1 -0
- package/node_modules/@backendrelay/version/dist/commonjs/version.js +10 -0
- package/node_modules/@backendrelay/version/dist/commonjs/version.js.map +1 -0
- package/node_modules/@backendrelay/version/dist/esm/index.d.ts +3 -0
- package/node_modules/@backendrelay/version/dist/esm/index.d.ts.map +1 -0
- package/node_modules/@backendrelay/version/dist/esm/index.js +3 -0
- package/node_modules/@backendrelay/version/dist/esm/index.js.map +1 -0
- package/node_modules/@backendrelay/version/dist/esm/package.json +3 -0
- package/node_modules/@backendrelay/version/dist/esm/version.d.ts +3 -0
- package/node_modules/@backendrelay/version/dist/esm/version.d.ts.map +1 -0
- package/node_modules/@backendrelay/version/dist/esm/version.js +7 -0
- package/node_modules/@backendrelay/version/dist/esm/version.js.map +1 -0
- package/node_modules/@backendrelay/version/dist/standalone/index.js +4 -0
- package/node_modules/@backendrelay/version/dist/standalone/index.umd.cjs +1 -0
- package/node_modules/@backendrelay/version/package.json +44 -0
- package/node_modules/@backendrelay/webhooks/dist/commonjs/__types__/typeUtils.d.ts +12 -0
- package/node_modules/@backendrelay/webhooks/dist/commonjs/__types__/typeUtils.d.ts.map +1 -0
- package/node_modules/@backendrelay/webhooks/dist/commonjs/__types__/typeUtils.js +5 -0
- package/node_modules/@backendrelay/webhooks/dist/commonjs/__types__/typeUtils.js.map +1 -0
- package/node_modules/@backendrelay/webhooks/dist/commonjs/__types__/typesTests.d.ts +2 -0
- package/node_modules/@backendrelay/webhooks/dist/commonjs/__types__/typesTests.d.ts.map +1 -0
- package/node_modules/@backendrelay/webhooks/dist/commonjs/__types__/typesTests.js +82 -0
- package/node_modules/@backendrelay/webhooks/dist/commonjs/__types__/typesTests.js.map +1 -0
- package/node_modules/@backendrelay/webhooks/dist/commonjs/index.d.ts +607 -0
- package/node_modules/@backendrelay/webhooks/dist/commonjs/index.d.ts.map +1 -0
- package/node_modules/@backendrelay/webhooks/dist/commonjs/index.js +830 -0
- package/node_modules/@backendrelay/webhooks/dist/commonjs/index.js.map +1 -0
- package/node_modules/@backendrelay/webhooks/dist/commonjs/live.e2e.test.d.ts +2 -0
- package/node_modules/@backendrelay/webhooks/dist/commonjs/live.e2e.test.d.ts.map +1 -0
- package/node_modules/@backendrelay/webhooks/dist/commonjs/live.e2e.test.js +139 -0
- package/node_modules/@backendrelay/webhooks/dist/commonjs/live.e2e.test.js.map +1 -0
- package/node_modules/@backendrelay/webhooks/dist/commonjs/package.json +3 -0
- package/node_modules/@backendrelay/webhooks/dist/esm/__types__/typeUtils.d.ts +12 -0
- package/node_modules/@backendrelay/webhooks/dist/esm/__types__/typeUtils.d.ts.map +1 -0
- package/node_modules/@backendrelay/webhooks/dist/esm/__types__/typeUtils.js +4 -0
- package/node_modules/@backendrelay/webhooks/dist/esm/__types__/typeUtils.js.map +1 -0
- package/node_modules/@backendrelay/webhooks/dist/esm/__types__/typesTests.d.ts +2 -0
- package/node_modules/@backendrelay/webhooks/dist/esm/__types__/typesTests.d.ts.map +1 -0
- package/node_modules/@backendrelay/webhooks/dist/esm/__types__/typesTests.js +80 -0
- package/node_modules/@backendrelay/webhooks/dist/esm/__types__/typesTests.js.map +1 -0
- package/node_modules/@backendrelay/webhooks/dist/esm/index.d.ts +607 -0
- package/node_modules/@backendrelay/webhooks/dist/esm/index.d.ts.map +1 -0
- package/node_modules/@backendrelay/webhooks/dist/esm/index.js +825 -0
- package/node_modules/@backendrelay/webhooks/dist/esm/index.js.map +1 -0
- package/node_modules/@backendrelay/webhooks/dist/esm/live.e2e.test.d.ts +2 -0
- package/node_modules/@backendrelay/webhooks/dist/esm/live.e2e.test.d.ts.map +1 -0
- package/node_modules/@backendrelay/webhooks/dist/esm/live.e2e.test.js +137 -0
- package/node_modules/@backendrelay/webhooks/dist/esm/live.e2e.test.js.map +1 -0
- package/node_modules/@backendrelay/webhooks/dist/esm/package.json +3 -0
- package/node_modules/@backendrelay/webhooks/package.json +46 -0
- package/package.json +129 -56
- package/subpaths/admin/index.cjs +1 -0
- package/subpaths/admin/index.d.ts +1 -0
- package/subpaths/admin/index.mjs +3 -0
- package/subpaths/functions/index.cjs +1 -0
- package/subpaths/functions/index.d.ts +1 -0
- package/subpaths/functions/index.mjs +3 -0
- package/subpaths/hatchet/index.cjs +1 -0
- package/subpaths/hatchet/index.d.ts +1 -0
- package/subpaths/hatchet/index.mjs +3 -0
- package/subpaths/platform/index.cjs +1 -0
- package/subpaths/platform/index.d.ts +1 -0
- package/subpaths/platform/index.mjs +3 -0
- package/subpaths/resumable-stream/index.cjs +1 -0
- package/subpaths/resumable-stream/index.d.ts +1 -0
- package/subpaths/resumable-stream/index.mjs +3 -0
- package/subpaths/rules/index.cjs +1 -0
- package/subpaths/rules/index.d.ts +1 -0
- package/subpaths/rules/index.mjs +3 -0
- package/subpaths/test/index.cjs +1 -0
- package/subpaths/test/index.d.ts +1 -0
- package/subpaths/test/index.mjs +3 -0
- package/subpaths/version/index.cjs +1 -0
- package/subpaths/version/index.d.ts +1 -0
- package/subpaths/version/index.mjs +3 -0
- package/subpaths/webhooks/index.cjs +1 -0
- package/subpaths/webhooks/index.d.ts +1 -0
- package/subpaths/webhooks/index.mjs +3 -0
- package/.tshy/build.json +0 -8
- package/.tshy/commonjs.json +0 -16
- package/.tshy/esm.json +0 -15
- package/__example__/standalone.esm.html +0 -23
- package/__example__/standalone.umd.html +0 -21
- package/__tests__/src/Connection.test.ts +0 -292
- package/__tests__/src/IndexedDBStorage.test.ts +0 -96
- package/__tests__/src/Reactor.test.ts +0 -1179
- package/__tests__/src/auth-extra-fields.e2e.test.ts +0 -160
- package/__tests__/src/byop.e2e.test.ts +0 -762
- package/__tests__/src/config.test.ts +0 -85
- package/__tests__/src/cookieSync.e2e.test.ts +0 -163
- package/__tests__/src/data/movies/attrs.json +0 -145
- package/__tests__/src/data/movies/triples.json +0 -1507
- package/__tests__/src/data/zeneca/attrs.json +0 -251
- package/__tests__/src/data/zeneca/triples.json +0 -15854
- package/__tests__/src/datalog.test.ts +0 -175
- package/__tests__/src/devtool.test.ts +0 -23
- package/__tests__/src/framework.test.ts +0 -173
- package/__tests__/src/infiniteQuery.e2e.test.ts +0 -467
- package/__tests__/src/instaml.test.ts +0 -1593
- package/__tests__/src/instaql.bench.ts +0 -34
- package/__tests__/src/instaql.test.ts +0 -1497
- package/__tests__/src/instaqlInference.test.ts +0 -243
- package/__tests__/src/presence.test.ts +0 -49
- package/__tests__/src/queryValidation.test.ts +0 -1101
- package/__tests__/src/schema.test.ts +0 -653
- package/__tests__/src/serializeSchema.test.ts +0 -123
- package/__tests__/src/simple.e2e.test.ts +0 -133
- package/__tests__/src/storage-upload.test.ts +0 -37
- package/__tests__/src/store.test.ts +0 -960
- package/__tests__/src/syncTable.e2e.test.ts +0 -245
- package/__tests__/src/syncTable.test.ts +0 -235
- package/__tests__/src/transactionValidation.test.ts +0 -450
- package/__tests__/src/typeUtils.ts +0 -39
- package/__tests__/src/upstream-improvements.e2e.test.ts +0 -54
- package/__tests__/src/utils/MutationStorage.test.ts +0 -77
- package/__tests__/src/utils/PersistedObject.test.ts +0 -569
- package/__tests__/src/utils/dates.test.ts +0 -111
- package/__tests__/src/utils/e2e.ts +0 -100
- package/__tests__/src/utils/msw.ts +0 -3
- package/__tests__/src/utils/object.test.ts +0 -78
- package/__tests__/src/utils/weakHash.test.ts +0 -68
- package/__tests__/src/utils/weakHashLegacy.test.ts +0 -22
- package/__tests__/src/vite.env.d.ts +0 -1
- package/src/BackendRelayError.ts +0 -50
- package/src/Connection.ts +0 -361
- package/src/InMemoryStorage.ts +0 -34
- package/src/IndexedDBStorage.ts +0 -398
- package/src/Reactor.js +0 -1541
- package/src/StorageAPI.ts +0 -147
- package/src/Stream.ts +0 -1252
- package/src/SyncTable.ts +0 -750
- package/src/WindowNetworkListener.js +0 -19
- package/src/__types__/fieldsTypeTest.ts +0 -111
- package/src/__types__/typeUtils.ts +0 -39
- package/src/__types__/useDatesTypeTest.ts +0 -66
- package/src/attrTypes.ts +0 -37
- package/src/authAPI.ts +0 -205
- package/src/clientTypes.ts +0 -28
- package/src/coreTypes.ts +0 -58
- package/src/createRouteHandler.ts +0 -68
- package/src/datalog.js +0 -116
- package/src/devtool.ts +0 -179
- package/src/framework.ts +0 -450
- package/src/helperTypes.ts +0 -117
- package/src/index.ts +0 -1293
- package/src/infiniteQuery.ts +0 -599
- package/src/instaml.ts +0 -676
- package/src/instaql.ts +0 -999
- package/src/instatx.ts +0 -265
- package/src/model/instaqlResult.js +0 -25
- package/src/parseSchemaFromJSON.ts +0 -176
- package/src/presence.ts +0 -123
- package/src/presenceTypes.ts +0 -19
- package/src/queryTypes.ts +0 -749
- package/src/queryValidation.ts +0 -598
- package/src/reactorAuth.js +0 -236
- package/src/reactorEvents.js +0 -414
- package/src/reactorMutations.js +0 -354
- package/src/reactorRooms.js +0 -297
- package/src/reactorStorage.js +0 -180
- package/src/reactorSubs.js +0 -275
- package/src/reactorTransport.js +0 -391
- package/src/reactorTypes.ts +0 -41
- package/src/routeHandlerProtocol.ts +0 -25
- package/src/rulesTypes.ts +0 -132
- package/src/sanityCheckQueries.ts +0 -191
- package/src/schema.ts +0 -206
- package/src/schemaTypes.ts +0 -664
- package/src/store.ts +0 -1165
- package/src/transactionValidation.ts +0 -204
- package/src/urls.ts +0 -50
- package/src/utils/Deferred.ts +0 -20
- package/src/utils/MutationStorage.ts +0 -89
- package/src/utils/PersistedObject.ts +0 -612
- package/src/utils/dates.ts +0 -269
- package/src/utils/error.ts +0 -9
- package/src/utils/fetch.ts +0 -131
- package/src/utils/flags.ts +0 -14
- package/src/utils/id.ts +0 -28
- package/src/utils/linkIndex.ts +0 -33
- package/src/utils/log.ts +0 -23
- package/src/utils/object.js +0 -180
- package/src/utils/pgtime.ts +0 -199
- package/src/utils/pick.js +0 -9
- package/src/utils/strings.ts +0 -19
- package/src/utils/weakHash.ts +0 -77
- package/src/utils/weakHashLegacy.ts +0 -75
- package/src/warningToggle.ts +0 -5
- package/tsconfig.cjs.dev.json +0 -15
- package/tsconfig.dev.json +0 -14
- package/tsconfig.json +0 -13
- package/tsconfig.test.json +0 -5
- package/vite.config.ts +0 -19
- package/vitest.config.ts +0 -54
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
export default class WindowNetworkListener {
|
|
2
|
-
static async getIsOnline() {
|
|
3
|
-
return navigator.onLine;
|
|
4
|
-
}
|
|
5
|
-
static listen(f) {
|
|
6
|
-
const onOnline = () => {
|
|
7
|
-
f(true);
|
|
8
|
-
};
|
|
9
|
-
const onOffline = () => {
|
|
10
|
-
f(false);
|
|
11
|
-
};
|
|
12
|
-
addEventListener('online', onOnline);
|
|
13
|
-
addEventListener('offline', onOffline);
|
|
14
|
-
return () => {
|
|
15
|
-
removeEventListener('online', onOnline);
|
|
16
|
-
removeEventListener('offline', onOffline);
|
|
17
|
-
};
|
|
18
|
-
}
|
|
19
|
-
}
|
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
import { i, init } from '../index.ts';
|
|
2
|
-
import type { Equal, Expect, NotAny } from './typeUtils.ts';
|
|
3
|
-
|
|
4
|
-
// These tests just check types. See `type _cases = ` for the test cases.
|
|
5
|
-
|
|
6
|
-
const schema = i.schema({
|
|
7
|
-
entities: {
|
|
8
|
-
tbl: i.entity({
|
|
9
|
-
a: i.number(),
|
|
10
|
-
b: i.string(),
|
|
11
|
-
}),
|
|
12
|
-
},
|
|
13
|
-
});
|
|
14
|
-
|
|
15
|
-
// Test that fields works with a schema
|
|
16
|
-
function _testFieldsWithSchema() {
|
|
17
|
-
const schemaDb = init({
|
|
18
|
-
schema: schema,
|
|
19
|
-
appId: '123',
|
|
20
|
-
});
|
|
21
|
-
schemaDb.subscribeQuery({ tbl: { $: { fields: ['a'] } } }, (resp) => {
|
|
22
|
-
const item = resp.data?.tbl[0];
|
|
23
|
-
if (item) {
|
|
24
|
-
type t = typeof item;
|
|
25
|
-
type _cases = [
|
|
26
|
-
Expect<NotAny<t>>,
|
|
27
|
-
Expect<Equal<t, { id: string; a: number }>>,
|
|
28
|
-
];
|
|
29
|
-
}
|
|
30
|
-
});
|
|
31
|
-
schemaDb.subscribeQuery({ tbl: { $: { fields: ['id', 'a'] } } }, (resp) => {
|
|
32
|
-
const item = resp.data?.tbl[0];
|
|
33
|
-
if (item) {
|
|
34
|
-
type t = typeof item;
|
|
35
|
-
type _cases = [
|
|
36
|
-
Expect<NotAny<t>>,
|
|
37
|
-
Expect<Equal<t, { id: string; a: number }>>,
|
|
38
|
-
];
|
|
39
|
-
}
|
|
40
|
-
});
|
|
41
|
-
schemaDb.subscribeQuery({ tbl: { $: { fields: undefined } } }, (resp) => {
|
|
42
|
-
const item = resp.data?.tbl[0];
|
|
43
|
-
if (item) {
|
|
44
|
-
type t = typeof item;
|
|
45
|
-
type _cases = [
|
|
46
|
-
Expect<NotAny<t>>,
|
|
47
|
-
Expect<Equal<t, { id: string; a: number; b: string }>>,
|
|
48
|
-
];
|
|
49
|
-
}
|
|
50
|
-
});
|
|
51
|
-
schemaDb.subscribeQuery({ tbl: {} }, (resp) => {
|
|
52
|
-
const item = resp.data?.tbl[0];
|
|
53
|
-
if (item) {
|
|
54
|
-
type t = typeof item;
|
|
55
|
-
type _cases = [
|
|
56
|
-
Expect<NotAny<t>>,
|
|
57
|
-
Expect<Equal<t, { id: string; a: number; b: string }>>,
|
|
58
|
-
];
|
|
59
|
-
}
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
// Test that fields does nothing when there is no schema
|
|
64
|
-
function _testFieldsNoSchema() {
|
|
65
|
-
const noSchemaDb = init({
|
|
66
|
-
appId: '123',
|
|
67
|
-
});
|
|
68
|
-
|
|
69
|
-
noSchemaDb.subscribeQuery({ tbl: { $: { fields: ['a'] } } }, (resp) => {
|
|
70
|
-
const item = resp.data?.tbl[0];
|
|
71
|
-
if (item) {
|
|
72
|
-
type t = typeof item;
|
|
73
|
-
type _cases = [
|
|
74
|
-
Expect<NotAny<t>>,
|
|
75
|
-
Expect<Equal<t, { id: string; [x: string]: any }>>,
|
|
76
|
-
];
|
|
77
|
-
}
|
|
78
|
-
});
|
|
79
|
-
|
|
80
|
-
noSchemaDb.subscribeQuery({ tbl: { $: { fields: ['id', 'a'] } } }, (resp) => {
|
|
81
|
-
const item = resp.data?.tbl[0];
|
|
82
|
-
if (item) {
|
|
83
|
-
type t = typeof item;
|
|
84
|
-
type _cases = [
|
|
85
|
-
Expect<NotAny<t>>,
|
|
86
|
-
Expect<Equal<t, { id: string; [x: string]: any }>>,
|
|
87
|
-
];
|
|
88
|
-
}
|
|
89
|
-
});
|
|
90
|
-
|
|
91
|
-
noSchemaDb.subscribeQuery({ tbl: { $: { fields: undefined } } }, (resp) => {
|
|
92
|
-
const item = resp.data?.tbl[0];
|
|
93
|
-
if (item) {
|
|
94
|
-
type t = typeof item;
|
|
95
|
-
type _cases = [
|
|
96
|
-
Expect<NotAny<t>>,
|
|
97
|
-
Expect<Equal<t, { id: string; [x: string]: any }>>,
|
|
98
|
-
];
|
|
99
|
-
}
|
|
100
|
-
});
|
|
101
|
-
noSchemaDb.subscribeQuery({ tbl: {} }, (resp) => {
|
|
102
|
-
const item = resp.data?.tbl[0];
|
|
103
|
-
if (item) {
|
|
104
|
-
type t = typeof item;
|
|
105
|
-
type _cases = [
|
|
106
|
-
Expect<NotAny<t>>,
|
|
107
|
-
Expect<Equal<t, { id: string; [x: string]: any }>>,
|
|
108
|
-
];
|
|
109
|
-
}
|
|
110
|
-
});
|
|
111
|
-
}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
// Type testing utils from
|
|
2
|
-
// https://github.com/type-challenges/type-challenges/blob/main/utils/index.d.ts
|
|
3
|
-
|
|
4
|
-
export type Expect<T extends true> = T;
|
|
5
|
-
export type ExpectTrue<T extends true> = T;
|
|
6
|
-
export type ExpectFalse<T extends false> = T;
|
|
7
|
-
export type IsTrue<T extends true> = T;
|
|
8
|
-
export type IsFalse<T extends false> = T;
|
|
9
|
-
|
|
10
|
-
export type Equal<X, Y> =
|
|
11
|
-
(<T>() => T extends X ? 1 : 2) extends <T>() => T extends Y ? 1 : 2
|
|
12
|
-
? true
|
|
13
|
-
: false;
|
|
14
|
-
export type NotEqual<X, Y> = true extends Equal<X, Y> ? false : true;
|
|
15
|
-
|
|
16
|
-
// https://stackoverflow.com/questions/49927523/disallow-call-with-any/49928360#49928360
|
|
17
|
-
export type IsAny<T> = 0 extends 1 & T ? true : false;
|
|
18
|
-
export type NotAny<T> = true extends IsAny<T> ? false : true;
|
|
19
|
-
|
|
20
|
-
export type Debug<T> = { [K in keyof T]: T[K] };
|
|
21
|
-
export type MergeInsertions<T> = T extends object
|
|
22
|
-
? { [K in keyof T]: MergeInsertions<T[K]> }
|
|
23
|
-
: T;
|
|
24
|
-
|
|
25
|
-
export type Alike<X, Y> = Equal<MergeInsertions<X>, MergeInsertions<Y>>;
|
|
26
|
-
|
|
27
|
-
export type ExpectExtends<VALUE, EXPECTED> = EXPECTED extends VALUE
|
|
28
|
-
? true
|
|
29
|
-
: false;
|
|
30
|
-
export type ExpectValidArgs<
|
|
31
|
-
FUNC extends (...args: any[]) => any,
|
|
32
|
-
ARGS extends any[],
|
|
33
|
-
> = ARGS extends Parameters<FUNC> ? true : false;
|
|
34
|
-
|
|
35
|
-
export type UnionToIntersection<U> = (
|
|
36
|
-
U extends any ? (k: U) => void : never
|
|
37
|
-
) extends (k: infer I) => void
|
|
38
|
-
? I
|
|
39
|
-
: never;
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import { i, init } from '../index.ts';
|
|
2
|
-
import type { Equal, Expect, NotAny } from './typeUtils.ts';
|
|
3
|
-
// These tests just check types. See `type _cases = ` for the test cases.
|
|
4
|
-
|
|
5
|
-
const schema = i.schema({
|
|
6
|
-
entities: {
|
|
7
|
-
tbl: i.entity({
|
|
8
|
-
d: i.date(),
|
|
9
|
-
}),
|
|
10
|
-
},
|
|
11
|
-
});
|
|
12
|
-
|
|
13
|
-
const dateDb = init({
|
|
14
|
-
schema: schema,
|
|
15
|
-
appId: '123',
|
|
16
|
-
useDateObjects: true,
|
|
17
|
-
});
|
|
18
|
-
|
|
19
|
-
function _testDateDb() {
|
|
20
|
-
dateDb.subscribeQuery({ tbl: {} }, (resp) => {
|
|
21
|
-
const item = resp.data?.tbl[0];
|
|
22
|
-
if (item) {
|
|
23
|
-
const d = item.d;
|
|
24
|
-
type _cases = [Expect<NotAny<typeof d>>, Expect<Equal<typeof d, Date>>];
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
const undefinedDateDb = init({
|
|
30
|
-
schema: schema,
|
|
31
|
-
appId: '123',
|
|
32
|
-
});
|
|
33
|
-
|
|
34
|
-
// Test that undefined returns string | number for date
|
|
35
|
-
function _testUndefinedDateDb() {
|
|
36
|
-
undefinedDateDb.subscribeQuery({ tbl: {} }, (resp) => {
|
|
37
|
-
const item = resp.data?.tbl[0];
|
|
38
|
-
if (item) {
|
|
39
|
-
const d = item.d;
|
|
40
|
-
type _cases = [
|
|
41
|
-
Expect<NotAny<typeof d>>,
|
|
42
|
-
Expect<Equal<typeof d, string | number>>,
|
|
43
|
-
];
|
|
44
|
-
}
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
const noDateDb = init({
|
|
49
|
-
schema: schema,
|
|
50
|
-
appId: '123',
|
|
51
|
-
useDateObjects: false,
|
|
52
|
-
});
|
|
53
|
-
|
|
54
|
-
// Test that false returns string | number for date
|
|
55
|
-
function _testNoDateDb() {
|
|
56
|
-
noDateDb.subscribeQuery({ tbl: {} }, (resp) => {
|
|
57
|
-
const item = resp.data?.tbl[0];
|
|
58
|
-
if (item) {
|
|
59
|
-
const d = item.d;
|
|
60
|
-
type _cases = [
|
|
61
|
-
Expect<NotAny<typeof d>>,
|
|
62
|
-
Expect<Equal<typeof d, string | number>>,
|
|
63
|
-
];
|
|
64
|
-
}
|
|
65
|
-
});
|
|
66
|
-
}
|
package/src/attrTypes.ts
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
type id = string;
|
|
2
|
-
type etype = string;
|
|
3
|
-
type label = string;
|
|
4
|
-
|
|
5
|
-
export type BackendRelayDBIdent = [id, etype, label];
|
|
6
|
-
|
|
7
|
-
export type BackendRelayDBInferredType =
|
|
8
|
-
| 'number'
|
|
9
|
-
| 'string'
|
|
10
|
-
| 'boolean'
|
|
11
|
-
| 'json';
|
|
12
|
-
|
|
13
|
-
export type BackendRelayDBCheckedDataType =
|
|
14
|
-
| 'number'
|
|
15
|
-
| 'string'
|
|
16
|
-
| 'boolean'
|
|
17
|
-
| 'date';
|
|
18
|
-
|
|
19
|
-
export type BackendRelayDBAttrOnDelete = 'cascade';
|
|
20
|
-
|
|
21
|
-
export type BackendRelayDBAttr = {
|
|
22
|
-
id: string;
|
|
23
|
-
'value-type': 'blob' | 'ref';
|
|
24
|
-
cardinality: 'many' | 'one';
|
|
25
|
-
'forward-identity': BackendRelayDBIdent;
|
|
26
|
-
'reverse-identity'?: BackendRelayDBIdent | null | undefined;
|
|
27
|
-
'unique?': boolean;
|
|
28
|
-
'index?': boolean;
|
|
29
|
-
'required?': boolean;
|
|
30
|
-
'inferred-types': BackendRelayDBInferredType[] | null;
|
|
31
|
-
catalog: 'system' | 'user';
|
|
32
|
-
'on-delete'?: BackendRelayDBAttrOnDelete | null | undefined;
|
|
33
|
-
'on-delete-reverse'?: BackendRelayDBAttrOnDelete | null | undefined;
|
|
34
|
-
'checked-data-type'?: BackendRelayDBCheckedDataType | null | undefined;
|
|
35
|
-
'indexing?'?: boolean;
|
|
36
|
-
'setting-unique?'?: boolean;
|
|
37
|
-
};
|
package/src/authAPI.ts
DELETED
|
@@ -1,205 +0,0 @@
|
|
|
1
|
-
import { User } from './clientTypes.ts';
|
|
2
|
-
import { jsonFetch } from './utils/fetch.js';
|
|
3
|
-
|
|
4
|
-
type SharedInput = {
|
|
5
|
-
apiURI: string;
|
|
6
|
-
appId: string;
|
|
7
|
-
};
|
|
8
|
-
|
|
9
|
-
export type SendMagicCodeParams = { email: string };
|
|
10
|
-
export type SendMagicCodeResponse = {
|
|
11
|
-
sent: true;
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
export function sendMagicCode({
|
|
15
|
-
apiURI,
|
|
16
|
-
appId,
|
|
17
|
-
email,
|
|
18
|
-
}: SharedInput & SendMagicCodeParams): Promise<SendMagicCodeResponse> {
|
|
19
|
-
return jsonFetch(`${apiURI}/runtime/auth/send_magic_code`, {
|
|
20
|
-
method: 'POST',
|
|
21
|
-
headers: { 'content-type': 'application/json' },
|
|
22
|
-
body: JSON.stringify({ 'app-id': appId, email }),
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export type VerifyMagicCodeParams = {
|
|
27
|
-
email: string;
|
|
28
|
-
code: string;
|
|
29
|
-
refreshToken?: string | undefined;
|
|
30
|
-
};
|
|
31
|
-
export type VerifyResponse = {
|
|
32
|
-
user: User;
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* @deprecated Use {@link checkMagicCode} instead to get the `created` field
|
|
37
|
-
* and support `extraFields`.
|
|
38
|
-
*/
|
|
39
|
-
export async function verifyMagicCode({
|
|
40
|
-
apiURI,
|
|
41
|
-
appId,
|
|
42
|
-
email,
|
|
43
|
-
code,
|
|
44
|
-
refreshToken,
|
|
45
|
-
}: SharedInput & VerifyMagicCodeParams): Promise<VerifyResponse> {
|
|
46
|
-
const res = await jsonFetch(`${apiURI}/runtime/auth/verify_magic_code`, {
|
|
47
|
-
method: 'POST',
|
|
48
|
-
headers: { 'content-type': 'application/json' },
|
|
49
|
-
body: JSON.stringify({
|
|
50
|
-
'app-id': appId,
|
|
51
|
-
email,
|
|
52
|
-
code,
|
|
53
|
-
...(refreshToken ? { 'refresh-token': refreshToken } : {}),
|
|
54
|
-
}),
|
|
55
|
-
});
|
|
56
|
-
return res;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
export type CheckMagicCodeParams = {
|
|
60
|
-
email: string;
|
|
61
|
-
code: string;
|
|
62
|
-
refreshToken?: string | undefined;
|
|
63
|
-
extraFields?: Record<string, any> | undefined;
|
|
64
|
-
};
|
|
65
|
-
export type CheckMagicCodeResponse = {
|
|
66
|
-
user: User;
|
|
67
|
-
created: boolean;
|
|
68
|
-
};
|
|
69
|
-
export async function checkMagicCode({
|
|
70
|
-
apiURI,
|
|
71
|
-
appId,
|
|
72
|
-
email,
|
|
73
|
-
code,
|
|
74
|
-
refreshToken,
|
|
75
|
-
extraFields,
|
|
76
|
-
}: SharedInput & CheckMagicCodeParams): Promise<CheckMagicCodeResponse> {
|
|
77
|
-
const res = await jsonFetch(`${apiURI}/runtime/auth/verify_magic_code`, {
|
|
78
|
-
method: 'POST',
|
|
79
|
-
headers: { 'content-type': 'application/json' },
|
|
80
|
-
body: JSON.stringify({
|
|
81
|
-
'app-id': appId,
|
|
82
|
-
email,
|
|
83
|
-
code,
|
|
84
|
-
...(refreshToken ? { 'refresh-token': refreshToken } : {}),
|
|
85
|
-
...(extraFields ? { 'extra-fields': extraFields } : {}),
|
|
86
|
-
}),
|
|
87
|
-
});
|
|
88
|
-
return res;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
export type VerifyRefreshTokenParams = { refreshToken: string };
|
|
92
|
-
export async function verifyRefreshToken({
|
|
93
|
-
apiURI,
|
|
94
|
-
appId,
|
|
95
|
-
refreshToken,
|
|
96
|
-
}: SharedInput & VerifyRefreshTokenParams): Promise<VerifyResponse> {
|
|
97
|
-
const res = await jsonFetch(`${apiURI}/runtime/auth/verify_refresh_token`, {
|
|
98
|
-
method: 'POST',
|
|
99
|
-
headers: { 'content-type': 'application/json' },
|
|
100
|
-
body: JSON.stringify({
|
|
101
|
-
'app-id': appId,
|
|
102
|
-
'refresh-token': refreshToken,
|
|
103
|
-
}),
|
|
104
|
-
});
|
|
105
|
-
return res;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
export type SignInAsGuestParams = {
|
|
109
|
-
extraFields?: Record<string, any> | undefined;
|
|
110
|
-
};
|
|
111
|
-
export async function signInAsGuest({
|
|
112
|
-
apiURI,
|
|
113
|
-
appId,
|
|
114
|
-
extraFields,
|
|
115
|
-
}: SharedInput & SignInAsGuestParams): Promise<VerifyResponse> {
|
|
116
|
-
const res = await jsonFetch(`${apiURI}/runtime/auth/sign_in_guest`, {
|
|
117
|
-
method: 'POST',
|
|
118
|
-
headers: { 'content-type': 'application/json' },
|
|
119
|
-
body: JSON.stringify({
|
|
120
|
-
'app-id': appId,
|
|
121
|
-
...(extraFields ? { 'extra-fields': extraFields } : {}),
|
|
122
|
-
}),
|
|
123
|
-
});
|
|
124
|
-
return res;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
export type ExchangeCodeForTokenParams = {
|
|
128
|
-
code: string;
|
|
129
|
-
codeVerifier?: string;
|
|
130
|
-
refreshToken?: string | undefined;
|
|
131
|
-
extraFields?: Record<string, any> | undefined;
|
|
132
|
-
};
|
|
133
|
-
|
|
134
|
-
export async function exchangeCodeForToken({
|
|
135
|
-
apiURI,
|
|
136
|
-
appId,
|
|
137
|
-
code,
|
|
138
|
-
codeVerifier,
|
|
139
|
-
refreshToken,
|
|
140
|
-
extraFields,
|
|
141
|
-
}: SharedInput & ExchangeCodeForTokenParams): Promise<CheckMagicCodeResponse> {
|
|
142
|
-
const res = await jsonFetch(`${apiURI}/runtime/oauth/token`, {
|
|
143
|
-
method: 'POST',
|
|
144
|
-
headers: { 'content-type': 'application/json' },
|
|
145
|
-
body: JSON.stringify({
|
|
146
|
-
app_id: appId,
|
|
147
|
-
code: code,
|
|
148
|
-
code_verifier: codeVerifier,
|
|
149
|
-
refresh_token: refreshToken,
|
|
150
|
-
...(extraFields ? { extra_fields: extraFields } : {}),
|
|
151
|
-
}),
|
|
152
|
-
});
|
|
153
|
-
return res;
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
export type SignInWithIdTokenParams = {
|
|
157
|
-
nonce?: string | null | undefined;
|
|
158
|
-
idToken: string;
|
|
159
|
-
clientName: string;
|
|
160
|
-
refreshToken?: string;
|
|
161
|
-
extraFields?: Record<string, any> | undefined;
|
|
162
|
-
};
|
|
163
|
-
|
|
164
|
-
export async function signInWithIdToken({
|
|
165
|
-
apiURI,
|
|
166
|
-
appId,
|
|
167
|
-
nonce,
|
|
168
|
-
idToken,
|
|
169
|
-
clientName,
|
|
170
|
-
refreshToken,
|
|
171
|
-
extraFields,
|
|
172
|
-
}: SharedInput & SignInWithIdTokenParams): Promise<CheckMagicCodeResponse> {
|
|
173
|
-
const res = await jsonFetch(`${apiURI}/runtime/oauth/id_token`, {
|
|
174
|
-
method: 'POST',
|
|
175
|
-
headers: { 'content-type': 'application/json' },
|
|
176
|
-
body: JSON.stringify({
|
|
177
|
-
app_id: appId,
|
|
178
|
-
nonce,
|
|
179
|
-
id_token: idToken,
|
|
180
|
-
client_name: clientName,
|
|
181
|
-
refresh_token: refreshToken,
|
|
182
|
-
...(extraFields ? { extra_fields: extraFields } : {}),
|
|
183
|
-
}),
|
|
184
|
-
});
|
|
185
|
-
return res;
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
export type SignoutParams = { refreshToken: string };
|
|
189
|
-
export async function signOut({
|
|
190
|
-
apiURI,
|
|
191
|
-
appId,
|
|
192
|
-
refreshToken,
|
|
193
|
-
}: SharedInput & SignoutParams): Promise<{}> {
|
|
194
|
-
const res = await jsonFetch(`${apiURI}/runtime/signout`, {
|
|
195
|
-
method: 'POST',
|
|
196
|
-
headers: {
|
|
197
|
-
'content-type': 'application/json',
|
|
198
|
-
},
|
|
199
|
-
body: JSON.stringify({
|
|
200
|
-
app_id: appId,
|
|
201
|
-
refresh_token: refreshToken,
|
|
202
|
-
}),
|
|
203
|
-
});
|
|
204
|
-
return res;
|
|
205
|
-
}
|
package/src/clientTypes.ts
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
export type User = {
|
|
2
|
-
id: string;
|
|
3
|
-
refresh_token: string;
|
|
4
|
-
email?: string | null | undefined;
|
|
5
|
-
imageURL?: string | null | undefined;
|
|
6
|
-
type?: 'user' | 'guest' | undefined;
|
|
7
|
-
isGuest: boolean;
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
export type AuthResult =
|
|
11
|
-
| { user: User | undefined; error: undefined }
|
|
12
|
-
| { user: undefined; error: { message: string } };
|
|
13
|
-
|
|
14
|
-
export type AuthState =
|
|
15
|
-
| { isLoading: true; error: undefined; user: undefined }
|
|
16
|
-
| { isLoading: false; error: { message: string }; user: undefined }
|
|
17
|
-
| { isLoading: false; error: undefined; user: User | null | undefined };
|
|
18
|
-
|
|
19
|
-
export type ConnectionStatus =
|
|
20
|
-
| 'connecting'
|
|
21
|
-
| 'opened'
|
|
22
|
-
| 'authenticated'
|
|
23
|
-
| 'closed'
|
|
24
|
-
| 'errored';
|
|
25
|
-
|
|
26
|
-
export type AppStatusState =
|
|
27
|
-
| { isLoading: true; isReadOnly: undefined }
|
|
28
|
-
| { isLoading: false; isReadOnly: boolean };
|
package/src/coreTypes.ts
DELETED
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import { TxChunk } from './instatx.ts';
|
|
2
|
-
import { RoomSchemaShape } from './presence.ts';
|
|
3
|
-
import type {
|
|
4
|
-
IContainEntitiesAndLinks,
|
|
5
|
-
BackendRelaySchemaDef,
|
|
6
|
-
} from './schemaTypes.ts';
|
|
7
|
-
|
|
8
|
-
export interface IDatabase<
|
|
9
|
-
Schema extends IContainEntitiesAndLinks<any, any> | {} = {},
|
|
10
|
-
_RoomSchema extends RoomSchemaShape = {},
|
|
11
|
-
WithCardinalityInference extends boolean = false,
|
|
12
|
-
> {
|
|
13
|
-
tx: TxChunk<
|
|
14
|
-
Schema extends IContainEntitiesAndLinks<any, any>
|
|
15
|
-
? Schema
|
|
16
|
-
: BackendRelaySchemaDef<any, any, any>
|
|
17
|
-
>;
|
|
18
|
-
|
|
19
|
-
withCardinalityInference?: WithCardinalityInference;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export interface IBackendRelayDatabase<
|
|
23
|
-
Schema extends BackendRelaySchemaDef<any, any, any>,
|
|
24
|
-
> {
|
|
25
|
-
tx: TxChunk<Schema>;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export type DevtoolPosition =
|
|
29
|
-
| 'bottom-left'
|
|
30
|
-
| 'bottom-right'
|
|
31
|
-
| 'top-right'
|
|
32
|
-
| 'top-left';
|
|
33
|
-
|
|
34
|
-
export type DevtoolConfig = {
|
|
35
|
-
/**
|
|
36
|
-
* Position of the devtool panel on the screen
|
|
37
|
-
* @default 'bottom-right'
|
|
38
|
-
*/
|
|
39
|
-
position?: DevtoolPosition;
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* Hosts where the devtool should be shown
|
|
43
|
-
* @default ['localhost']
|
|
44
|
-
*/
|
|
45
|
-
allowedHosts?: string[];
|
|
46
|
-
|
|
47
|
-
/**
|
|
48
|
-
* Dashboard URI used to render the devtool. Required when the devtool is
|
|
49
|
-
* enabled; it no longer defaults to backendrelay.com.
|
|
50
|
-
*/
|
|
51
|
-
dashURI?: string;
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
export type StrictDevtoolConfig = {
|
|
55
|
-
position: DevtoolPosition;
|
|
56
|
-
allowedHosts: string[];
|
|
57
|
-
dashURI?: string;
|
|
58
|
-
};
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
BackendRelayRouteHandlerBody,
|
|
3
|
-
BackendRelayRouteHandlerPayloadByType,
|
|
4
|
-
} from './routeHandlerProtocol.ts';
|
|
5
|
-
|
|
6
|
-
type CreateRouteHandlerConfig = {
|
|
7
|
-
appId: string;
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
function createUserSyncResponse(
|
|
11
|
-
config: CreateRouteHandlerConfig,
|
|
12
|
-
user: BackendRelayRouteHandlerPayloadByType['sync-user']['user'],
|
|
13
|
-
) {
|
|
14
|
-
if (user && user.refresh_token) {
|
|
15
|
-
return new Response(JSON.stringify({ ok: true }), {
|
|
16
|
-
headers: {
|
|
17
|
-
'Content-Type': 'application/json',
|
|
18
|
-
// 7 day expiry
|
|
19
|
-
'Set-Cookie': `backendrelay_user_${config.appId}=${encodeURIComponent(JSON.stringify(user))}; Path=/; HttpOnly; Secure; SameSite=Strict; Max-Age=604800`,
|
|
20
|
-
},
|
|
21
|
-
});
|
|
22
|
-
} else {
|
|
23
|
-
return new Response(JSON.stringify({ ok: true }), {
|
|
24
|
-
headers: {
|
|
25
|
-
'Content-Type': 'application/json',
|
|
26
|
-
// remove the cookie (some browsers)
|
|
27
|
-
'Set-Cookie': `backendrelay_user_${config.appId}=; Path=/; HttpOnly; Secure; SameSite=Strict; Max-Age=-1`,
|
|
28
|
-
},
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
function errorResponse(status: number, message: string) {
|
|
34
|
-
return new Response(JSON.stringify({ ok: false, error: message }), {
|
|
35
|
-
status,
|
|
36
|
-
headers: { 'Content-Type': 'application/json' },
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
export const createBackendRelayRouteHandler = (
|
|
41
|
-
config: CreateRouteHandlerConfig,
|
|
42
|
-
) => {
|
|
43
|
-
return {
|
|
44
|
-
POST: async (req: Request) => {
|
|
45
|
-
let body: Partial<BackendRelayRouteHandlerBody>;
|
|
46
|
-
try {
|
|
47
|
-
body = await req.json();
|
|
48
|
-
} catch {
|
|
49
|
-
return errorResponse(400, 'Invalid JSON body');
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
if (!body.type) {
|
|
53
|
-
return errorResponse(400, 'Missing "type" field');
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
if (body.appId !== config.appId) {
|
|
57
|
-
return errorResponse(403, 'App ID mismatch');
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
switch (body.type) {
|
|
61
|
-
case 'sync-user':
|
|
62
|
-
return createUserSyncResponse(config, body.user ?? null);
|
|
63
|
-
default:
|
|
64
|
-
return errorResponse(400, `Unknown type: ${body.type}`);
|
|
65
|
-
}
|
|
66
|
-
},
|
|
67
|
-
};
|
|
68
|
-
};
|