@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
package/src/framework.ts
DELETED
|
@@ -1,450 +0,0 @@
|
|
|
1
|
-
// The FrameworkClient class is a mini version of a query store that allows making queries on both the frontend and backend
|
|
2
|
-
// you can register queries, await their results and serialize them over a server/client boundary.
|
|
3
|
-
// The class is generic so that it can be a good starting off point to make other ssr adapters.
|
|
4
|
-
import {
|
|
5
|
-
coerceQuery,
|
|
6
|
-
BackendRelayAPIError,
|
|
7
|
-
BackendRelayCoreDatabase,
|
|
8
|
-
BackendRelayDBAttr,
|
|
9
|
-
BackendRelayError,
|
|
10
|
-
weakHash,
|
|
11
|
-
} from './index.ts';
|
|
12
|
-
import * as s from './store.js';
|
|
13
|
-
import instaql from './instaql.js';
|
|
14
|
-
import { RuleParams } from './schemaTypes.ts';
|
|
15
|
-
import { createLinkIndex } from './utils/linkIndex.ts';
|
|
16
|
-
|
|
17
|
-
export const isServer = typeof window === 'undefined' || 'Deno' in globalThis;
|
|
18
|
-
|
|
19
|
-
export type FrameworkConfig = {
|
|
20
|
-
token?: string | null;
|
|
21
|
-
db: BackendRelayCoreDatabase<any, any>;
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
function isRecord(value: unknown): value is Record<string, unknown> {
|
|
25
|
-
return typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
function parseFrameworkQueryResponse(data: unknown): {
|
|
29
|
-
attrs: BackendRelayDBAttr[];
|
|
30
|
-
triples: any[];
|
|
31
|
-
pageInfo: unknown;
|
|
32
|
-
} {
|
|
33
|
-
if (
|
|
34
|
-
!isRecord(data) ||
|
|
35
|
-
!Array.isArray(data.attrs) ||
|
|
36
|
-
!data.attrs.every((attr) => isRecord(attr) && typeof attr.id === 'string')
|
|
37
|
-
) {
|
|
38
|
-
throw new Error('Invalid framework query response: expected attrs array');
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
if (!Array.isArray(data.result) || !isRecord(data.result[0])) {
|
|
42
|
-
throw new Error('Invalid framework query response: expected result entry');
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
const resultData = data.result[0].data;
|
|
46
|
-
if (!isRecord(resultData) || !isRecord(resultData['datalog-result'])) {
|
|
47
|
-
throw new Error(
|
|
48
|
-
'Invalid framework query response: expected datalog result',
|
|
49
|
-
);
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
const joinRows = resultData['datalog-result']['join-rows'];
|
|
53
|
-
if (!Array.isArray(joinRows) || !Array.isArray(joinRows[0])) {
|
|
54
|
-
throw new Error('Invalid framework query response: expected join rows');
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
const triples = joinRows[0];
|
|
58
|
-
if (
|
|
59
|
-
!triples.every(
|
|
60
|
-
(triple) =>
|
|
61
|
-
Array.isArray(triple) &&
|
|
62
|
-
triple.length === 4 &&
|
|
63
|
-
typeof triple[0] === 'string' &&
|
|
64
|
-
typeof triple[1] === 'string' &&
|
|
65
|
-
typeof triple[3] === 'number',
|
|
66
|
-
)
|
|
67
|
-
) {
|
|
68
|
-
throw new Error('Invalid framework query response: expected triples');
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
const pageInfo = resultData['page-info'];
|
|
72
|
-
if (pageInfo !== undefined && !isRecord(pageInfo)) {
|
|
73
|
-
throw new Error('Invalid framework query response: expected page info');
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
return {
|
|
77
|
-
attrs: data.attrs as BackendRelayDBAttr[],
|
|
78
|
-
triples,
|
|
79
|
-
pageInfo,
|
|
80
|
-
};
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
// represents an eventual result from running a query
|
|
84
|
-
// either via ssr or by using the existing websocket connection.
|
|
85
|
-
type QueryPromise =
|
|
86
|
-
| {
|
|
87
|
-
type: 'http';
|
|
88
|
-
triples: any;
|
|
89
|
-
attrs: any;
|
|
90
|
-
queryHash: any;
|
|
91
|
-
query: any;
|
|
92
|
-
pageInfo?: any;
|
|
93
|
-
}
|
|
94
|
-
| {
|
|
95
|
-
type: 'session';
|
|
96
|
-
queryResult: any;
|
|
97
|
-
};
|
|
98
|
-
|
|
99
|
-
export class FrameworkClient {
|
|
100
|
-
private params: FrameworkConfig;
|
|
101
|
-
private db: BackendRelayCoreDatabase<any, any>;
|
|
102
|
-
|
|
103
|
-
// stores all of the query promises so that ssr can read them
|
|
104
|
-
// and send the relevant results alongside the html that resulted in the query resolving
|
|
105
|
-
public resultMap: Map<
|
|
106
|
-
string,
|
|
107
|
-
{
|
|
108
|
-
status: 'pending' | 'success' | 'error';
|
|
109
|
-
type: 'http' | 'session';
|
|
110
|
-
promise?: Promise<QueryPromise> | null;
|
|
111
|
-
data?: any;
|
|
112
|
-
error?: any;
|
|
113
|
-
}
|
|
114
|
-
> = new Map();
|
|
115
|
-
|
|
116
|
-
private queryResolvedCallbacks: ((result: {
|
|
117
|
-
triples: any;
|
|
118
|
-
attrs: any;
|
|
119
|
-
queryHash: any;
|
|
120
|
-
query: any;
|
|
121
|
-
pageInfo?: any;
|
|
122
|
-
}) => void)[] = [];
|
|
123
|
-
|
|
124
|
-
constructor(params: FrameworkConfig) {
|
|
125
|
-
this.params = params;
|
|
126
|
-
this.db = params.db;
|
|
127
|
-
this.resultMap = new Map<
|
|
128
|
-
string,
|
|
129
|
-
{
|
|
130
|
-
type: 'http' | 'session';
|
|
131
|
-
status: 'pending' | 'success' | 'error';
|
|
132
|
-
promise?: Promise<QueryPromise>;
|
|
133
|
-
data?: any;
|
|
134
|
-
error?: any;
|
|
135
|
-
}
|
|
136
|
-
>();
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
public subscribe = (
|
|
140
|
-
callback: (result: {
|
|
141
|
-
triples: any;
|
|
142
|
-
attrs: any;
|
|
143
|
-
queryHash: string;
|
|
144
|
-
pageInfo?: any;
|
|
145
|
-
}) => void,
|
|
146
|
-
) => {
|
|
147
|
-
this.queryResolvedCallbacks.push(callback);
|
|
148
|
-
};
|
|
149
|
-
|
|
150
|
-
// Runs on the client when ssr gets html script tags
|
|
151
|
-
public addQueryResult = (queryKey: string, value: any) => {
|
|
152
|
-
this.resultMap.set(queryKey, {
|
|
153
|
-
type: value.type,
|
|
154
|
-
status: 'success',
|
|
155
|
-
data: value,
|
|
156
|
-
promise: null,
|
|
157
|
-
error: null,
|
|
158
|
-
});
|
|
159
|
-
// send the result to the client
|
|
160
|
-
if (!isServer) {
|
|
161
|
-
// make sure the attrs are there to create stores
|
|
162
|
-
if (!this.db._reactor.attrs) {
|
|
163
|
-
this.db._reactor._setAttrs(value.attrs);
|
|
164
|
-
}
|
|
165
|
-
this.db._reactor._addQueryData(
|
|
166
|
-
value.query,
|
|
167
|
-
value,
|
|
168
|
-
!!this.db._reactor.config.schema,
|
|
169
|
-
);
|
|
170
|
-
}
|
|
171
|
-
};
|
|
172
|
-
|
|
173
|
-
public removeCachedQueryResult = (queryHash: string) => {
|
|
174
|
-
this.resultMap.delete(queryHash);
|
|
175
|
-
};
|
|
176
|
-
|
|
177
|
-
// Run a query on the client and return a promise with the result
|
|
178
|
-
public queryClient = (
|
|
179
|
-
query_: any,
|
|
180
|
-
opts?: { ruleParams: RuleParams },
|
|
181
|
-
): Promise<QueryPromise> => {
|
|
182
|
-
const { hash, query } = this.hashQuery(query_, opts);
|
|
183
|
-
|
|
184
|
-
let resolve;
|
|
185
|
-
let reject;
|
|
186
|
-
|
|
187
|
-
const promise: Promise<QueryPromise> = new Promise(
|
|
188
|
-
(resolvePromise, rejectPromise) => {
|
|
189
|
-
resolve = resolvePromise;
|
|
190
|
-
reject = rejectPromise;
|
|
191
|
-
},
|
|
192
|
-
);
|
|
193
|
-
|
|
194
|
-
let entry = {
|
|
195
|
-
status: 'pending' as 'pending' | 'success' | 'error',
|
|
196
|
-
type: 'session' as 'http' | 'session',
|
|
197
|
-
data: undefined as any,
|
|
198
|
-
error: undefined as any,
|
|
199
|
-
promise: promise as any,
|
|
200
|
-
};
|
|
201
|
-
|
|
202
|
-
let unsub: null | (() => void) = null;
|
|
203
|
-
let unsubImmediately = false;
|
|
204
|
-
|
|
205
|
-
unsub = this.db.subscribeQuery(query, (res) => {
|
|
206
|
-
if (res.error) {
|
|
207
|
-
entry.status = 'error';
|
|
208
|
-
entry.error = res.error;
|
|
209
|
-
entry.promise = null;
|
|
210
|
-
reject(res.error);
|
|
211
|
-
} else {
|
|
212
|
-
entry.status = 'success';
|
|
213
|
-
entry.data = res;
|
|
214
|
-
entry.promise = null;
|
|
215
|
-
resolve(res);
|
|
216
|
-
}
|
|
217
|
-
if (unsub !== null) {
|
|
218
|
-
unsub();
|
|
219
|
-
} else {
|
|
220
|
-
// The listener fired before subscribeQuery returned: unsubscribe as
|
|
221
|
-
// soon as `unsub` exists, below.
|
|
222
|
-
unsubImmediately = true;
|
|
223
|
-
}
|
|
224
|
-
});
|
|
225
|
-
|
|
226
|
-
// We may have gotten the result inside of subscribeQuery before
|
|
227
|
-
// we defined the `unsub` function
|
|
228
|
-
if (unsubImmediately) {
|
|
229
|
-
unsub();
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
this.resultMap.set(hash, entry);
|
|
233
|
-
return promise;
|
|
234
|
-
};
|
|
235
|
-
|
|
236
|
-
// creates an entry in the results map
|
|
237
|
-
// and returns the same thing added to the map
|
|
238
|
-
public query = (
|
|
239
|
-
_query: any,
|
|
240
|
-
opts?: {
|
|
241
|
-
ruleParams: RuleParams;
|
|
242
|
-
},
|
|
243
|
-
): {
|
|
244
|
-
type: 'http' | 'session';
|
|
245
|
-
status: 'pending' | 'success' | 'error';
|
|
246
|
-
promise?: Promise<QueryPromise>;
|
|
247
|
-
data?: any;
|
|
248
|
-
error?: any;
|
|
249
|
-
} => {
|
|
250
|
-
const { hash, query } = this.hashQuery(_query, opts);
|
|
251
|
-
|
|
252
|
-
if (this.db._reactor.status === 'authenticated') {
|
|
253
|
-
const promise = this.db.queryOnce(_query, opts);
|
|
254
|
-
let entry = {
|
|
255
|
-
status: 'pending' as 'pending' | 'success' | 'error',
|
|
256
|
-
type: 'session' as 'http' | 'session',
|
|
257
|
-
data: undefined as any,
|
|
258
|
-
error: undefined as any,
|
|
259
|
-
promise: promise as any,
|
|
260
|
-
};
|
|
261
|
-
promise.then((result) => {
|
|
262
|
-
entry.status = 'success';
|
|
263
|
-
entry.data = result;
|
|
264
|
-
entry.promise = null;
|
|
265
|
-
});
|
|
266
|
-
promise.catch((error) => {
|
|
267
|
-
entry.status = 'error';
|
|
268
|
-
entry.error = error;
|
|
269
|
-
entry.promise = null;
|
|
270
|
-
});
|
|
271
|
-
this.resultMap.set(hash, entry);
|
|
272
|
-
return entry as any;
|
|
273
|
-
}
|
|
274
|
-
|
|
275
|
-
const promise = this.getTriplesAndAttrsForQuery(query);
|
|
276
|
-
let entry = {
|
|
277
|
-
status: 'pending' as 'pending' | 'success' | 'error',
|
|
278
|
-
type: 'http' as 'http' | 'session',
|
|
279
|
-
data: undefined as any,
|
|
280
|
-
error: undefined as any,
|
|
281
|
-
promise: promise as any,
|
|
282
|
-
};
|
|
283
|
-
|
|
284
|
-
promise.then((result) => {
|
|
285
|
-
entry.status = 'success';
|
|
286
|
-
entry.data = result;
|
|
287
|
-
entry.promise = null;
|
|
288
|
-
});
|
|
289
|
-
promise.catch((error) => {
|
|
290
|
-
entry.status = 'error';
|
|
291
|
-
entry.error = error;
|
|
292
|
-
entry.promise = null;
|
|
293
|
-
});
|
|
294
|
-
|
|
295
|
-
promise.then((result) => {
|
|
296
|
-
this.queryResolvedCallbacks.forEach((callback) => {
|
|
297
|
-
callback({
|
|
298
|
-
queryHash: hash,
|
|
299
|
-
query: query,
|
|
300
|
-
attrs: result.attrs,
|
|
301
|
-
triples: result.triples,
|
|
302
|
-
pageInfo: result.pageInfo,
|
|
303
|
-
});
|
|
304
|
-
});
|
|
305
|
-
});
|
|
306
|
-
|
|
307
|
-
this.resultMap.set(hash, entry);
|
|
308
|
-
return entry;
|
|
309
|
-
};
|
|
310
|
-
|
|
311
|
-
public getExistingResultForQuery = (
|
|
312
|
-
_query: any,
|
|
313
|
-
opts?: {
|
|
314
|
-
ruleParams: RuleParams;
|
|
315
|
-
},
|
|
316
|
-
) => {
|
|
317
|
-
const { hash } = this.hashQuery(_query, opts);
|
|
318
|
-
return this.resultMap.get(hash);
|
|
319
|
-
};
|
|
320
|
-
|
|
321
|
-
// creates a query result from a set of triples, query, and attrs
|
|
322
|
-
// can be run server side or client side
|
|
323
|
-
public completeIsomorphic = (
|
|
324
|
-
query: any,
|
|
325
|
-
triples: any[],
|
|
326
|
-
attrs: BackendRelayDBAttr[],
|
|
327
|
-
pageInfo?: any,
|
|
328
|
-
) => {
|
|
329
|
-
const attrMap = {};
|
|
330
|
-
attrs.forEach((attr) => {
|
|
331
|
-
attrMap[attr.id] = attr;
|
|
332
|
-
});
|
|
333
|
-
|
|
334
|
-
const enableCardinalityInference =
|
|
335
|
-
Boolean(this.db?._reactor?.config?.schema) &&
|
|
336
|
-
('cardinalityInference' in this.db?._reactor?.config
|
|
337
|
-
? Boolean(this.db?._reactor.config?.cardinalityInference)
|
|
338
|
-
: true);
|
|
339
|
-
|
|
340
|
-
const attrsStore = new s.AttrsStoreClass(
|
|
341
|
-
attrs.reduce((acc, attr) => {
|
|
342
|
-
acc[attr.id] = attr;
|
|
343
|
-
return acc;
|
|
344
|
-
}, {}),
|
|
345
|
-
createLinkIndex(this.db?._reactor.config.schema),
|
|
346
|
-
);
|
|
347
|
-
|
|
348
|
-
const store = s.createStore(
|
|
349
|
-
attrsStore,
|
|
350
|
-
triples,
|
|
351
|
-
enableCardinalityInference,
|
|
352
|
-
this.params.db._reactor.config.useDateObjects || false,
|
|
353
|
-
);
|
|
354
|
-
const resp = instaql(
|
|
355
|
-
{
|
|
356
|
-
store: store,
|
|
357
|
-
attrsStore: attrsStore,
|
|
358
|
-
pageInfo: pageInfo,
|
|
359
|
-
aggregate: undefined,
|
|
360
|
-
},
|
|
361
|
-
query,
|
|
362
|
-
);
|
|
363
|
-
return resp;
|
|
364
|
-
};
|
|
365
|
-
|
|
366
|
-
public hashQuery = (
|
|
367
|
-
_query: any,
|
|
368
|
-
opts?: {
|
|
369
|
-
ruleParams: RuleParams;
|
|
370
|
-
},
|
|
371
|
-
): { hash: string; query: any } => {
|
|
372
|
-
if (_query && opts && 'ruleParams' in opts) {
|
|
373
|
-
_query = { $$ruleParams: opts['ruleParams'], ..._query };
|
|
374
|
-
}
|
|
375
|
-
const query = _query ? coerceQuery(_query) : null;
|
|
376
|
-
return { hash: weakHash(query), query: query };
|
|
377
|
-
};
|
|
378
|
-
|
|
379
|
-
// Run by the server to get triples and attrs
|
|
380
|
-
public getTriplesAndAttrsForQuery = async (
|
|
381
|
-
query: any,
|
|
382
|
-
): Promise<{
|
|
383
|
-
triples: any[];
|
|
384
|
-
attrs: BackendRelayDBAttr[];
|
|
385
|
-
query: any;
|
|
386
|
-
queryHash: string;
|
|
387
|
-
type: 'http';
|
|
388
|
-
pageInfo?: any;
|
|
389
|
-
}> => {
|
|
390
|
-
try {
|
|
391
|
-
const response = await fetch(
|
|
392
|
-
`${this.db._reactor.config.apiURI}/runtime/framework/query`,
|
|
393
|
-
{
|
|
394
|
-
method: 'POST',
|
|
395
|
-
headers: {
|
|
396
|
-
'app-id': this.params.db._reactor.config.appId,
|
|
397
|
-
'Content-Type': 'application/json',
|
|
398
|
-
Authorization: this.params.token
|
|
399
|
-
? `Bearer ${this.params.token}`
|
|
400
|
-
: undefined,
|
|
401
|
-
} as Record<string, string>,
|
|
402
|
-
body: JSON.stringify({
|
|
403
|
-
query: query,
|
|
404
|
-
}),
|
|
405
|
-
},
|
|
406
|
-
);
|
|
407
|
-
|
|
408
|
-
if (!response.ok) {
|
|
409
|
-
try {
|
|
410
|
-
const data = await response.json();
|
|
411
|
-
if ('message' in data) {
|
|
412
|
-
throw new BackendRelayAPIError({
|
|
413
|
-
body: data,
|
|
414
|
-
status: response.status,
|
|
415
|
-
});
|
|
416
|
-
} else {
|
|
417
|
-
throw new Error('Error getting triples from server');
|
|
418
|
-
}
|
|
419
|
-
} catch (e) {
|
|
420
|
-
if (e instanceof BackendRelayError) {
|
|
421
|
-
throw e;
|
|
422
|
-
}
|
|
423
|
-
throw new Error('Error getting triples from server');
|
|
424
|
-
}
|
|
425
|
-
}
|
|
426
|
-
|
|
427
|
-
const { attrs, triples, pageInfo } = parseFrameworkQueryResponse(
|
|
428
|
-
await response.json(),
|
|
429
|
-
);
|
|
430
|
-
|
|
431
|
-
return {
|
|
432
|
-
attrs,
|
|
433
|
-
triples,
|
|
434
|
-
type: 'http',
|
|
435
|
-
queryHash: this.hashQuery(query).hash,
|
|
436
|
-
query,
|
|
437
|
-
pageInfo,
|
|
438
|
-
};
|
|
439
|
-
} catch (err: any) {
|
|
440
|
-
if (err instanceof BackendRelayError) {
|
|
441
|
-
throw err;
|
|
442
|
-
}
|
|
443
|
-
const errWithMessage = new Error(
|
|
444
|
-
'Error getting triples from framework client',
|
|
445
|
-
);
|
|
446
|
-
errWithMessage.cause = err;
|
|
447
|
-
throw errWithMessage;
|
|
448
|
-
}
|
|
449
|
-
};
|
|
450
|
-
}
|
package/src/helperTypes.ts
DELETED
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
InstaQLEntity,
|
|
3
|
-
InstaQLResult,
|
|
4
|
-
InstaQLParams,
|
|
5
|
-
Remove$,
|
|
6
|
-
} from './queryTypes.ts';
|
|
7
|
-
import type {
|
|
8
|
-
IContainEntitiesAndLinks,
|
|
9
|
-
BackendRelaySchemaDef,
|
|
10
|
-
} from './schemaTypes.ts';
|
|
11
|
-
import type { IBackendRelayDatabase } from './coreTypes.ts';
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* @deprecated
|
|
15
|
-
* `BackendRelayQuery` is deprecated. Use `InstaQLParams` instead.
|
|
16
|
-
*
|
|
17
|
-
* @example
|
|
18
|
-
* // Before
|
|
19
|
-
* const db = init_experimental({ ...config, schema });
|
|
20
|
-
* type DB = typeof db;
|
|
21
|
-
* const myQuery = { ... } satisfies BackendRelayQuery<DB>;
|
|
22
|
-
*
|
|
23
|
-
* // After
|
|
24
|
-
* type Schema = typeof schema;
|
|
25
|
-
* const myQuery = { ... } satisfies InstaQLParams<Schema>;
|
|
26
|
-
*/
|
|
27
|
-
export type BackendRelayQuery<DB extends IBackendRelayDatabase<any>> =
|
|
28
|
-
DB extends IBackendRelayDatabase<infer Schema>
|
|
29
|
-
? InstaQLParams<Schema>
|
|
30
|
-
: never;
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* @deprecated
|
|
34
|
-
* `BackendRelayQueryResult` is deprecated. Use `InstaQLResult` instead.
|
|
35
|
-
*
|
|
36
|
-
* @example
|
|
37
|
-
* // Before
|
|
38
|
-
* const db = init_experimental({ ...config, schema });
|
|
39
|
-
* type DB = typeof db;
|
|
40
|
-
* type MyQueryResult = BackendRelayQueryResult<DB, typeof myQuery>;
|
|
41
|
-
*
|
|
42
|
-
* // After
|
|
43
|
-
* type Schema = typeof schema;
|
|
44
|
-
* type MyQueryResult = InstaQLResult<Schema, typeof myQuery>;
|
|
45
|
-
*/
|
|
46
|
-
export type BackendRelayQueryResult<DB extends IBackendRelayDatabase<any>, Q> =
|
|
47
|
-
DB extends IBackendRelayDatabase<infer Schema>
|
|
48
|
-
? Q extends InstaQLParams<Schema> | undefined
|
|
49
|
-
? InstaQLResult<Schema, Remove$<Q>>
|
|
50
|
-
: never
|
|
51
|
-
: never;
|
|
52
|
-
/**
|
|
53
|
-
* @deprecated
|
|
54
|
-
* `BackendRelaySchema` is deprecated. Use typeof schema directly:
|
|
55
|
-
* @example
|
|
56
|
-
* // Before
|
|
57
|
-
* const db = init_experimental({ ...config, schema });
|
|
58
|
-
* type Schema = BackendRelaySchema<typeof db>;
|
|
59
|
-
*
|
|
60
|
-
* // After
|
|
61
|
-
* type Schema = typeof schema;
|
|
62
|
-
*/
|
|
63
|
-
export type BackendRelaySchema<DB extends IBackendRelayDatabase<any>> =
|
|
64
|
-
DB extends IBackendRelayDatabase<infer Schema> ? Schema : never;
|
|
65
|
-
|
|
66
|
-
/**
|
|
67
|
-
* @deprecated
|
|
68
|
-
* `BackendRelayEntity` is deprecated. Use `InstaQLEntity` instead.
|
|
69
|
-
*
|
|
70
|
-
* @example
|
|
71
|
-
* // Before
|
|
72
|
-
* const db = init_experimental({ ...config, schema });
|
|
73
|
-
* type DB = typeof db;
|
|
74
|
-
* type MyEntity = BackendRelayEntity<DB, "myEntityName">;
|
|
75
|
-
*
|
|
76
|
-
* // After
|
|
77
|
-
* type Schema = typeof schema;
|
|
78
|
-
* type MyEntity = InstaQLEntity<Schema, "myEntityName">;
|
|
79
|
-
*/
|
|
80
|
-
export type BackendRelayEntity<
|
|
81
|
-
DB extends IBackendRelayDatabase<any>,
|
|
82
|
-
EntityName extends DB extends IBackendRelayDatabase<infer Schema>
|
|
83
|
-
? Schema extends IContainEntitiesAndLinks<infer Entities, any>
|
|
84
|
-
? keyof Entities
|
|
85
|
-
: never
|
|
86
|
-
: never,
|
|
87
|
-
Query extends
|
|
88
|
-
| (DB extends IBackendRelayDatabase<infer Schema>
|
|
89
|
-
? Schema extends IContainEntitiesAndLinks<infer Entities, any>
|
|
90
|
-
? {
|
|
91
|
-
[QueryPropName in keyof Entities[EntityName]['links']]?: any;
|
|
92
|
-
}
|
|
93
|
-
: never
|
|
94
|
-
: never)
|
|
95
|
-
| {} = {},
|
|
96
|
-
> =
|
|
97
|
-
DB extends IBackendRelayDatabase<infer Schema>
|
|
98
|
-
? InstaQLEntity<Schema, EntityName, Query>
|
|
99
|
-
: never;
|
|
100
|
-
|
|
101
|
-
/**
|
|
102
|
-
* @deprecated
|
|
103
|
-
* `BackendRelaySchemaDatabase` is deprecated. You generally don't need to
|
|
104
|
-
* create a return type for a DB. But, if you like you can use `IBackendRelayDatabase`:
|
|
105
|
-
*
|
|
106
|
-
* @example
|
|
107
|
-
* // Before
|
|
108
|
-
* type DB = BackendRelaySchemaDatabase<typeof schema>;
|
|
109
|
-
*
|
|
110
|
-
* // After
|
|
111
|
-
* type DB = IBackendRelayDatabase<typeof schema>;
|
|
112
|
-
*/
|
|
113
|
-
export type BackendRelaySchemaDatabase<
|
|
114
|
-
Schema extends BackendRelaySchemaDef<any, any, any>,
|
|
115
|
-
_T1 extends any = any,
|
|
116
|
-
_T2 extends any = any,
|
|
117
|
-
> = IBackendRelayDatabase<Schema>;
|