@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/queryTypes.ts
DELETED
|
@@ -1,749 +0,0 @@
|
|
|
1
|
-
// Query
|
|
2
|
-
// -----
|
|
3
|
-
|
|
4
|
-
import type {
|
|
5
|
-
EntitiesDef,
|
|
6
|
-
IContainEntitiesAndLinks,
|
|
7
|
-
BackendRelayGraph,
|
|
8
|
-
LinkAttrDef,
|
|
9
|
-
RuleParams,
|
|
10
|
-
ResolveAttrs,
|
|
11
|
-
ResolveEntityAttrs,
|
|
12
|
-
DataAttrDef,
|
|
13
|
-
AttrsDefs,
|
|
14
|
-
EntityDefFromSchema,
|
|
15
|
-
BackendRelayUnknownSchemaDef,
|
|
16
|
-
} from './schemaTypes.ts';
|
|
17
|
-
|
|
18
|
-
type BuiltIn = Date | Function | Error | RegExp;
|
|
19
|
-
|
|
20
|
-
type Primitive = string | number | boolean | symbol | null | undefined;
|
|
21
|
-
|
|
22
|
-
export type Expand<T> = T extends BuiltIn | Primitive
|
|
23
|
-
? T
|
|
24
|
-
: T extends object
|
|
25
|
-
? T extends infer O
|
|
26
|
-
? { [K in keyof O]: Expand<O[K]> }
|
|
27
|
-
: never
|
|
28
|
-
: T;
|
|
29
|
-
|
|
30
|
-
// NonEmpty disallows {}, so that you must provide at least one field
|
|
31
|
-
export type NonEmpty<T> = {
|
|
32
|
-
[K in keyof T]-?: Required<Pick<T, K>>;
|
|
33
|
-
}[keyof T];
|
|
34
|
-
|
|
35
|
-
type BaseWhereClauseValueComplex<V> = {
|
|
36
|
-
/** @deprecated use `$in` instead of `in` */
|
|
37
|
-
in?: V[];
|
|
38
|
-
$in?: V[];
|
|
39
|
-
/** @deprecated use `$ne` instead of `not` */
|
|
40
|
-
$not?: V;
|
|
41
|
-
$ne?: V;
|
|
42
|
-
$gt?: V;
|
|
43
|
-
$lt?: V;
|
|
44
|
-
$gte?: V;
|
|
45
|
-
$lte?: V;
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
type IsAny<T> = boolean extends (T extends never ? true : false) ? true : false;
|
|
49
|
-
|
|
50
|
-
type WhereClauseValueComplex<V, R, I> = BaseWhereClauseValueComplex<V> &
|
|
51
|
-
(IsAny<V> extends true
|
|
52
|
-
? {
|
|
53
|
-
$ilike?: string;
|
|
54
|
-
$like?: string;
|
|
55
|
-
$search?: string;
|
|
56
|
-
$isNull?: boolean;
|
|
57
|
-
$nearest?: number[] | { vector: number[]; limit?: number };
|
|
58
|
-
}
|
|
59
|
-
: (V extends string
|
|
60
|
-
? {
|
|
61
|
-
$like?: string;
|
|
62
|
-
$search?: string;
|
|
63
|
-
}
|
|
64
|
-
: {}) &
|
|
65
|
-
(R extends false
|
|
66
|
-
? {
|
|
67
|
-
$isNull?: boolean;
|
|
68
|
-
}
|
|
69
|
-
: {}) &
|
|
70
|
-
(I extends true
|
|
71
|
-
? {
|
|
72
|
-
$ilike?: string;
|
|
73
|
-
}
|
|
74
|
-
: {}) &
|
|
75
|
-
(V extends number[]
|
|
76
|
-
? {
|
|
77
|
-
$nearest?:
|
|
78
|
-
| number[]
|
|
79
|
-
| {
|
|
80
|
-
vector: number[];
|
|
81
|
-
limit?: number;
|
|
82
|
-
};
|
|
83
|
-
}
|
|
84
|
-
: {}));
|
|
85
|
-
|
|
86
|
-
// Make type display better
|
|
87
|
-
type WhereClauseValue<
|
|
88
|
-
D extends DataAttrDef<string | number | boolean, boolean, boolean, boolean>,
|
|
89
|
-
> =
|
|
90
|
-
D extends DataAttrDef<infer V, infer R, infer I, boolean>
|
|
91
|
-
?
|
|
92
|
-
| (IsAny<V> extends true ? string | number | boolean : V)
|
|
93
|
-
| NonEmpty<WhereClauseValueComplex<V, R, I>>
|
|
94
|
-
: never;
|
|
95
|
-
|
|
96
|
-
type WhereClauseColumnEntries<
|
|
97
|
-
T extends {
|
|
98
|
-
[key: string]: DataAttrDef<any, boolean, boolean, boolean>;
|
|
99
|
-
},
|
|
100
|
-
> = {
|
|
101
|
-
[key in keyof T]?: WhereClauseValue<T[key]>;
|
|
102
|
-
};
|
|
103
|
-
|
|
104
|
-
type WhereClauseComboEntries<
|
|
105
|
-
T extends Record<any, DataAttrDef<any, boolean, boolean, boolean>>,
|
|
106
|
-
> = {
|
|
107
|
-
or?:
|
|
108
|
-
| WhereClauses<T>[]
|
|
109
|
-
| WhereClauseValue<DataAttrDef<any, false, true, boolean>>;
|
|
110
|
-
and?:
|
|
111
|
-
| WhereClauses<T>[]
|
|
112
|
-
| WhereClauseValue<DataAttrDef<any, false, true, boolean>>;
|
|
113
|
-
};
|
|
114
|
-
|
|
115
|
-
type WhereClauses<
|
|
116
|
-
T extends Record<any, DataAttrDef<any, boolean, boolean, boolean>>,
|
|
117
|
-
> = (
|
|
118
|
-
| WhereClauseComboEntries<T>
|
|
119
|
-
| (WhereClauseComboEntries<T> & WhereClauseColumnEntries<T>)
|
|
120
|
-
) & {
|
|
121
|
-
id?: WhereClauseValue<DataAttrDef<string, false, true, boolean>>;
|
|
122
|
-
[key: `${string}.${string}`]: WhereClauseValue<
|
|
123
|
-
DataAttrDef<any, false, true, boolean>
|
|
124
|
-
>;
|
|
125
|
-
};
|
|
126
|
-
|
|
127
|
-
/**
|
|
128
|
-
* A tuple representing a cursor.
|
|
129
|
-
* These should not be constructed manually. The current format
|
|
130
|
-
* is an implementation detail that may change in the future.
|
|
131
|
-
* Use the `endCursor` or `startCursor` from the PageInfoResponse as the
|
|
132
|
-
* `before` or `after` field in the query options.
|
|
133
|
-
*/
|
|
134
|
-
type Cursor = [string, string, any, number];
|
|
135
|
-
|
|
136
|
-
type Direction = 'asc' | 'desc';
|
|
137
|
-
|
|
138
|
-
type IndexedKeys<Attrs extends AttrsDefs> = {
|
|
139
|
-
[K in keyof Attrs]: Attrs[K] extends DataAttrDef<
|
|
140
|
-
any,
|
|
141
|
-
any,
|
|
142
|
-
infer IsIndexed,
|
|
143
|
-
boolean
|
|
144
|
-
>
|
|
145
|
-
? IsIndexed extends true
|
|
146
|
-
? K
|
|
147
|
-
: never
|
|
148
|
-
: never;
|
|
149
|
-
}[keyof Attrs];
|
|
150
|
-
|
|
151
|
-
export type Order<
|
|
152
|
-
Schema extends IContainEntitiesAndLinks<any, any>,
|
|
153
|
-
EntityName extends keyof Schema['entities'],
|
|
154
|
-
> =
|
|
155
|
-
IndexedKeys<Schema['entities'][EntityName]['attrs']> extends never
|
|
156
|
-
? {
|
|
157
|
-
serverCreatedAt?: Direction;
|
|
158
|
-
}
|
|
159
|
-
: {
|
|
160
|
-
[K in IndexedKeys<Schema['entities'][EntityName]['attrs']>]?: Direction;
|
|
161
|
-
} & {
|
|
162
|
-
serverCreatedAt?: Direction;
|
|
163
|
-
};
|
|
164
|
-
|
|
165
|
-
type $Option<
|
|
166
|
-
S extends IContainEntitiesAndLinks<any, any>,
|
|
167
|
-
K extends keyof S['entities'],
|
|
168
|
-
> = {
|
|
169
|
-
$?: {
|
|
170
|
-
where?: WhereClauses<EntityDefFromSchema<S, K>>;
|
|
171
|
-
order?: Order<S, K>;
|
|
172
|
-
limit?: number;
|
|
173
|
-
last?: number;
|
|
174
|
-
first?: number;
|
|
175
|
-
offset?: number;
|
|
176
|
-
after?: Cursor;
|
|
177
|
-
afterInclusive?: boolean;
|
|
178
|
-
before?: Cursor;
|
|
179
|
-
beforeInclusive?: boolean;
|
|
180
|
-
fields?: InstaQLFields<S, K>;
|
|
181
|
-
};
|
|
182
|
-
};
|
|
183
|
-
|
|
184
|
-
type NamespaceVal =
|
|
185
|
-
| $Option<IContainEntitiesAndLinks<any, any>, keyof EntitiesDef>
|
|
186
|
-
| ($Option<IContainEntitiesAndLinks<any, any>, keyof EntitiesDef> & Subquery);
|
|
187
|
-
|
|
188
|
-
type Subquery = { [namespace: string]: NamespaceVal };
|
|
189
|
-
|
|
190
|
-
interface Query {
|
|
191
|
-
[namespace: string]: NamespaceVal;
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
type BackendRelayObject = {
|
|
195
|
-
id: string;
|
|
196
|
-
[prop: string]: any;
|
|
197
|
-
};
|
|
198
|
-
|
|
199
|
-
type ResponseObject<K, Schema> = K extends keyof Schema
|
|
200
|
-
? { id: string } & Schema[K]
|
|
201
|
-
: BackendRelayObject;
|
|
202
|
-
|
|
203
|
-
type IsEmptyObject<T> = T extends Record<string, never> ? true : false;
|
|
204
|
-
|
|
205
|
-
type ResponseOf<Q, Schema> = {
|
|
206
|
-
[K in keyof Q]: IsEmptyObject<Q[K]> extends true
|
|
207
|
-
? ResponseObject<K, Schema>[]
|
|
208
|
-
: (ResponseOf<Q[K], Schema> & ResponseObject<K, Schema>)[];
|
|
209
|
-
};
|
|
210
|
-
|
|
211
|
-
type Remove$<T> = T extends object
|
|
212
|
-
? { [K in keyof T as Exclude<K, '$'>]: Remove$<T[K]> }
|
|
213
|
-
: T;
|
|
214
|
-
|
|
215
|
-
type Remove$NonRecursive<T> = T extends object
|
|
216
|
-
? { [K in keyof T as Exclude<K, '$'>]: T[K] }
|
|
217
|
-
: T;
|
|
218
|
-
|
|
219
|
-
type QueryResponse<
|
|
220
|
-
Q,
|
|
221
|
-
Schema,
|
|
222
|
-
WithCardinalityInference extends boolean = false,
|
|
223
|
-
UseDates extends boolean = false,
|
|
224
|
-
> =
|
|
225
|
-
Schema extends BackendRelayGraph<infer E, any>
|
|
226
|
-
? InstaQLQueryResult<E, Q, WithCardinalityInference, UseDates>
|
|
227
|
-
: ResponseOf<{ [K in keyof Q]: Remove$<Q[K]> }, Schema>;
|
|
228
|
-
|
|
229
|
-
type InstaQLResponse<Schema, Q, UseDates extends boolean = false> =
|
|
230
|
-
Schema extends IContainEntitiesAndLinks<any, any>
|
|
231
|
-
? Q extends InstaQLParams<Schema> | undefined
|
|
232
|
-
? InstaQLResult<Schema, Q, UseDates>
|
|
233
|
-
: never
|
|
234
|
-
: never;
|
|
235
|
-
|
|
236
|
-
type PageInfoResponse<T> = {
|
|
237
|
-
[K in keyof T]: {
|
|
238
|
-
startCursor: Cursor;
|
|
239
|
-
endCursor: Cursor;
|
|
240
|
-
hasNextPage: boolean;
|
|
241
|
-
hasPreviousPage: boolean;
|
|
242
|
-
};
|
|
243
|
-
};
|
|
244
|
-
|
|
245
|
-
/**
|
|
246
|
-
* (XXX)
|
|
247
|
-
* https://github.com/microsoft/TypeScript/issues/26051
|
|
248
|
-
*
|
|
249
|
-
* TypeScript can permit extra keys when a generic extends a type.
|
|
250
|
-
*
|
|
251
|
-
* For some reason, it makes it possible to write a query like so:
|
|
252
|
-
*
|
|
253
|
-
* dummyQuery({
|
|
254
|
-
* users: {
|
|
255
|
-
* $: { where: { "foo": 1 } },
|
|
256
|
-
* posts: {
|
|
257
|
-
* $: { "far": {} }
|
|
258
|
-
* }
|
|
259
|
-
* }
|
|
260
|
-
*
|
|
261
|
-
* The problem: $: { "far": {} }
|
|
262
|
-
*
|
|
263
|
-
* This passes, when it should in reality fail. I don't know why
|
|
264
|
-
* adding `Exactly` fixes this, but it does.
|
|
265
|
-
*
|
|
266
|
-
* */
|
|
267
|
-
type Exactly<Parent, Child> = Parent & {
|
|
268
|
-
[K in keyof Child]: K extends keyof Parent ? Child[K] : never;
|
|
269
|
-
};
|
|
270
|
-
|
|
271
|
-
// SafeLookup<T, ['A', 'B', number]> is like doing
|
|
272
|
-
// T['A']['B'][number], but it will merge with undefined if any
|
|
273
|
-
// of the intermediates are undefined
|
|
274
|
-
type SafeLookup<T, K extends readonly PropertyKey[]> = K extends [
|
|
275
|
-
infer First,
|
|
276
|
-
...infer Rest extends readonly PropertyKey[],
|
|
277
|
-
]
|
|
278
|
-
? First extends keyof NonNullable<T>
|
|
279
|
-
?
|
|
280
|
-
| SafeLookup<NonNullable<T>[First], Rest>
|
|
281
|
-
| (T extends null | undefined ? undefined : never)
|
|
282
|
-
: undefined
|
|
283
|
-
: T;
|
|
284
|
-
|
|
285
|
-
// ==========
|
|
286
|
-
// InstaQL helpers
|
|
287
|
-
|
|
288
|
-
type InstaQLEntitySubqueryResult<
|
|
289
|
-
Schema extends IContainEntitiesAndLinks<EntitiesDef, any>,
|
|
290
|
-
EntityName extends keyof Schema['entities'],
|
|
291
|
-
Query extends InstaQLEntitySubquery<Schema, EntityName> | undefined = {},
|
|
292
|
-
UseDates extends boolean = false,
|
|
293
|
-
> = {
|
|
294
|
-
[QueryPropName in keyof Query]: Schema['entities'][EntityName]['links'][QueryPropName] extends LinkAttrDef<
|
|
295
|
-
infer Cardinality,
|
|
296
|
-
infer LinkedEntityName
|
|
297
|
-
>
|
|
298
|
-
? LinkedEntityName extends keyof Schema['entities']
|
|
299
|
-
? Cardinality extends 'one'
|
|
300
|
-
?
|
|
301
|
-
| InstaQLEntity<
|
|
302
|
-
Schema,
|
|
303
|
-
LinkedEntityName,
|
|
304
|
-
Remove$NonRecursive<SafeLookup<Query, [QueryPropName]>>,
|
|
305
|
-
SafeLookup<Query, [QueryPropName, '$', 'fields']>,
|
|
306
|
-
UseDates
|
|
307
|
-
>
|
|
308
|
-
| undefined
|
|
309
|
-
: InstaQLEntity<
|
|
310
|
-
Schema,
|
|
311
|
-
LinkedEntityName,
|
|
312
|
-
Remove$NonRecursive<SafeLookup<Query, [QueryPropName]>>,
|
|
313
|
-
SafeLookup<Query, [QueryPropName, '$', 'fields']>,
|
|
314
|
-
UseDates
|
|
315
|
-
>[]
|
|
316
|
-
: never
|
|
317
|
-
: never;
|
|
318
|
-
};
|
|
319
|
-
|
|
320
|
-
type InstaQLQueryEntityLinksResult<
|
|
321
|
-
Entities extends EntitiesDef,
|
|
322
|
-
EntityName extends keyof Entities,
|
|
323
|
-
Query extends {
|
|
324
|
-
[LinkAttrName in keyof Entities[EntityName]['links']]?: any;
|
|
325
|
-
},
|
|
326
|
-
WithCardinalityInference extends boolean,
|
|
327
|
-
UseDates extends boolean = false,
|
|
328
|
-
> = {
|
|
329
|
-
[QueryPropName in keyof Query]: Entities[EntityName]['links'][QueryPropName] extends LinkAttrDef<
|
|
330
|
-
infer Cardinality,
|
|
331
|
-
infer LinkedEntityName
|
|
332
|
-
>
|
|
333
|
-
? LinkedEntityName extends keyof Entities
|
|
334
|
-
? WithCardinalityInference extends true
|
|
335
|
-
? Cardinality extends 'one'
|
|
336
|
-
?
|
|
337
|
-
| InstaQLQueryEntityResult<
|
|
338
|
-
Entities,
|
|
339
|
-
LinkedEntityName,
|
|
340
|
-
Query[QueryPropName],
|
|
341
|
-
WithCardinalityInference,
|
|
342
|
-
UseDates
|
|
343
|
-
>
|
|
344
|
-
| undefined
|
|
345
|
-
: InstaQLQueryEntityResult<
|
|
346
|
-
Entities,
|
|
347
|
-
LinkedEntityName,
|
|
348
|
-
Query[QueryPropName],
|
|
349
|
-
WithCardinalityInference,
|
|
350
|
-
UseDates
|
|
351
|
-
>[]
|
|
352
|
-
: InstaQLQueryEntityResult<
|
|
353
|
-
Entities,
|
|
354
|
-
LinkedEntityName,
|
|
355
|
-
Query[QueryPropName],
|
|
356
|
-
WithCardinalityInference,
|
|
357
|
-
UseDates
|
|
358
|
-
>[]
|
|
359
|
-
: never
|
|
360
|
-
: never;
|
|
361
|
-
};
|
|
362
|
-
|
|
363
|
-
// Pick, but applies the pick to each union
|
|
364
|
-
type DistributePick<T, K extends string> = T extends any
|
|
365
|
-
? { [P in K]: P extends keyof T ? T[P] : never }
|
|
366
|
-
: never;
|
|
367
|
-
|
|
368
|
-
type InstaQLFields<
|
|
369
|
-
S extends IContainEntitiesAndLinks<any, any>,
|
|
370
|
-
K extends keyof S['entities'],
|
|
371
|
-
> = (Extract<keyof ResolveEntityAttrs<S['entities'][K]>, string> | 'id')[];
|
|
372
|
-
|
|
373
|
-
type ComputeAttrs<
|
|
374
|
-
AllAttrs,
|
|
375
|
-
Fields extends readonly string[] | undefined,
|
|
376
|
-
> = Fields extends readonly string[]
|
|
377
|
-
? DistributePick<AllAttrs, Exclude<Fields[number], 'id'>>
|
|
378
|
-
: AllAttrs;
|
|
379
|
-
|
|
380
|
-
type InstaQLEntity<
|
|
381
|
-
Schema extends IContainEntitiesAndLinks<EntitiesDef, any>,
|
|
382
|
-
EntityName extends keyof Schema['entities'],
|
|
383
|
-
Subquery extends InstaQLEntitySubquery<Schema, EntityName> | undefined = {},
|
|
384
|
-
Fields extends InstaQLFields<Schema, EntityName> | undefined = undefined,
|
|
385
|
-
UseDates extends boolean = false,
|
|
386
|
-
> = Expand<
|
|
387
|
-
{ id: string } & ComputeAttrs<
|
|
388
|
-
ResolveEntityAttrs<Schema['entities'][EntityName], UseDates>,
|
|
389
|
-
Fields
|
|
390
|
-
> &
|
|
391
|
-
InstaQLEntitySubqueryResult<Schema, EntityName, Subquery, UseDates>
|
|
392
|
-
>;
|
|
393
|
-
|
|
394
|
-
export type InstaQLQueryEntityResult<
|
|
395
|
-
Entities extends EntitiesDef,
|
|
396
|
-
EntityName extends keyof Entities,
|
|
397
|
-
Query extends {
|
|
398
|
-
[QueryPropName in keyof Entities[EntityName]['links']]?: any;
|
|
399
|
-
},
|
|
400
|
-
WithCardinalityInference extends boolean,
|
|
401
|
-
UseDates extends boolean,
|
|
402
|
-
> = { id: string } & ResolveAttrs<Entities, EntityName, UseDates> &
|
|
403
|
-
InstaQLQueryEntityLinksResult<
|
|
404
|
-
Entities,
|
|
405
|
-
EntityName,
|
|
406
|
-
Query,
|
|
407
|
-
WithCardinalityInference,
|
|
408
|
-
UseDates
|
|
409
|
-
>;
|
|
410
|
-
|
|
411
|
-
type InstaQLQueryResult<
|
|
412
|
-
Entities extends EntitiesDef,
|
|
413
|
-
Query,
|
|
414
|
-
WithCardinalityInference extends boolean,
|
|
415
|
-
UseDates extends boolean,
|
|
416
|
-
> = {
|
|
417
|
-
[QueryPropName in keyof Query]: QueryPropName extends keyof Entities
|
|
418
|
-
? InstaQLQueryEntityResult<
|
|
419
|
-
Entities,
|
|
420
|
-
QueryPropName,
|
|
421
|
-
Query[QueryPropName],
|
|
422
|
-
WithCardinalityInference,
|
|
423
|
-
UseDates
|
|
424
|
-
>[]
|
|
425
|
-
: never;
|
|
426
|
-
};
|
|
427
|
-
|
|
428
|
-
type InstaQLResult<
|
|
429
|
-
Schema extends IContainEntitiesAndLinks<EntitiesDef, any>,
|
|
430
|
-
Query extends InstaQLParams<Schema> | undefined,
|
|
431
|
-
UseDates extends boolean = false,
|
|
432
|
-
> = Expand<{
|
|
433
|
-
[QueryPropName in keyof Query]: QueryPropName extends keyof Schema['entities']
|
|
434
|
-
? InstaQLEntity<
|
|
435
|
-
Schema,
|
|
436
|
-
QueryPropName,
|
|
437
|
-
Remove$NonRecursive<SafeLookup<Query, [QueryPropName]>>,
|
|
438
|
-
SafeLookup<Query, [QueryPropName, '$', 'fields']>,
|
|
439
|
-
UseDates
|
|
440
|
-
>[]
|
|
441
|
-
: never;
|
|
442
|
-
}>;
|
|
443
|
-
|
|
444
|
-
type InstaQLEntitySubquery<
|
|
445
|
-
Schema extends IContainEntitiesAndLinks<EntitiesDef, any>,
|
|
446
|
-
EntityName extends keyof Schema['entities'],
|
|
447
|
-
> = {
|
|
448
|
-
[QueryPropName in keyof Schema['entities'][EntityName]['links']]?:
|
|
449
|
-
| $Option<Schema, EntityName>
|
|
450
|
-
| ($Option<Schema, EntityName> &
|
|
451
|
-
InstaQLEntitySubquery<
|
|
452
|
-
Schema,
|
|
453
|
-
Schema['entities'][EntityName]['links'][QueryPropName]['entityName']
|
|
454
|
-
>);
|
|
455
|
-
};
|
|
456
|
-
|
|
457
|
-
type InstaQLQuerySubqueryParams<
|
|
458
|
-
S extends IContainEntitiesAndLinks<any, any>,
|
|
459
|
-
E extends keyof S['entities'],
|
|
460
|
-
> = {
|
|
461
|
-
[K in keyof S['entities'][E]['links']]?:
|
|
462
|
-
| $Option<S, S['entities'][E]['links'][K]['entityName']>
|
|
463
|
-
| ($Option<S, S['entities'][E]['links'][K]['entityName']> &
|
|
464
|
-
InstaQLQuerySubqueryParams<
|
|
465
|
-
S,
|
|
466
|
-
S['entities'][E]['links'][K]['entityName']
|
|
467
|
-
>);
|
|
468
|
-
};
|
|
469
|
-
|
|
470
|
-
type InstaQLParams<S extends IContainEntitiesAndLinks<any, any>> = {
|
|
471
|
-
[K in keyof S['entities']]?:
|
|
472
|
-
| $Option<S, K>
|
|
473
|
-
| ($Option<S, K> & InstaQLQuerySubqueryParams<S, K>);
|
|
474
|
-
};
|
|
475
|
-
|
|
476
|
-
/**
|
|
477
|
-
* @deprecated
|
|
478
|
-
* `InstaQLQueryParams` is deprecated. Use `InstaQLParams` instead.
|
|
479
|
-
*
|
|
480
|
-
* @example
|
|
481
|
-
* // Before
|
|
482
|
-
* const myQuery = {...} satisfies InstaQLQueryParams<Schema>
|
|
483
|
-
* // After
|
|
484
|
-
* const myQuery = {...} satisfies InstaQLParams<Schema>
|
|
485
|
-
*/
|
|
486
|
-
type InstaQLQueryParams<S extends IContainEntitiesAndLinks<any, any>> =
|
|
487
|
-
InstaQLParams<S>;
|
|
488
|
-
|
|
489
|
-
type InstaQLOptions = {
|
|
490
|
-
ruleParams: RuleParams;
|
|
491
|
-
};
|
|
492
|
-
|
|
493
|
-
// Start of new types
|
|
494
|
-
|
|
495
|
-
type ValidQueryObject<
|
|
496
|
-
T extends Record<string, any>,
|
|
497
|
-
Schema extends IContainEntitiesAndLinks<any, any>,
|
|
498
|
-
EntityName extends keyof Schema['entities'],
|
|
499
|
-
TopLevel extends boolean,
|
|
500
|
-
> = keyof T extends keyof Schema['entities'][EntityName]['links'] | '$'
|
|
501
|
-
? {
|
|
502
|
-
[K in keyof Schema['entities'][EntityName]['links']]?: ValidQueryObject<
|
|
503
|
-
T[K],
|
|
504
|
-
Schema,
|
|
505
|
-
Schema['entities'][EntityName]['links'][K]['entityName'],
|
|
506
|
-
false
|
|
507
|
-
>;
|
|
508
|
-
} & {
|
|
509
|
-
$?: ValidDollarSignQuery<T['$'], Schema, EntityName, TopLevel>;
|
|
510
|
-
}
|
|
511
|
-
: never;
|
|
512
|
-
|
|
513
|
-
type PaginationKeys =
|
|
514
|
-
| 'limit'
|
|
515
|
-
| 'last'
|
|
516
|
-
| 'first'
|
|
517
|
-
| 'offset'
|
|
518
|
-
| 'after'
|
|
519
|
-
| 'afterInclusive'
|
|
520
|
-
| 'before'
|
|
521
|
-
| 'beforeInclusive';
|
|
522
|
-
|
|
523
|
-
type AllowedDollarSignKeys<TopLevel extends boolean> = TopLevel extends true
|
|
524
|
-
? PaginationKeys | 'where' | 'fields' | 'order'
|
|
525
|
-
: 'where' | 'fields' | 'order' | 'limit';
|
|
526
|
-
|
|
527
|
-
type ValidFieldNames<
|
|
528
|
-
S extends IContainEntitiesAndLinks<any, any>,
|
|
529
|
-
EntityName extends keyof S['entities'],
|
|
530
|
-
> = Extract<keyof ResolveEntityAttrs<S['entities'][EntityName]>, string> | 'id';
|
|
531
|
-
|
|
532
|
-
type ValidDollarSignQuery<
|
|
533
|
-
Input extends { [key: string]: any },
|
|
534
|
-
Schema extends IContainEntitiesAndLinks<any, any>,
|
|
535
|
-
EntityName extends keyof Schema['entities'],
|
|
536
|
-
TopLevel extends boolean,
|
|
537
|
-
> =
|
|
538
|
-
keyof Input extends AllowedDollarSignKeys<TopLevel>
|
|
539
|
-
? {
|
|
540
|
-
where?: ValidWhereObject<Input['where'], Schema, EntityName>;
|
|
541
|
-
fields?: ValidFieldNames<Schema, EntityName>[];
|
|
542
|
-
order?: Order<Schema, EntityName>;
|
|
543
|
-
limit?: number;
|
|
544
|
-
} & (TopLevel extends true
|
|
545
|
-
? {
|
|
546
|
-
last?: number;
|
|
547
|
-
first?: number;
|
|
548
|
-
offset?: number;
|
|
549
|
-
after?: Cursor;
|
|
550
|
-
afterInclusive?: boolean;
|
|
551
|
-
before?: Cursor;
|
|
552
|
-
beforeInclusive?: boolean;
|
|
553
|
-
}
|
|
554
|
-
: {})
|
|
555
|
-
: never;
|
|
556
|
-
|
|
557
|
-
type StringifiableKey<T> = Extract<T, string | number | bigint | boolean>;
|
|
558
|
-
|
|
559
|
-
type ValidWhereNestedPath<
|
|
560
|
-
T,
|
|
561
|
-
K extends string | number | symbol,
|
|
562
|
-
Schema extends IContainEntitiesAndLinks<any, any>,
|
|
563
|
-
> = T extends object
|
|
564
|
-
? K extends keyof T
|
|
565
|
-
? K // Allow link names as valid paths (they'll default to id)
|
|
566
|
-
: K extends `${infer K0}.${infer KR}`
|
|
567
|
-
? K0 extends keyof T
|
|
568
|
-
? T[K0] extends keyof Schema['entities']
|
|
569
|
-
? `${K0}.${
|
|
570
|
-
| ValidWhereNestedPath<
|
|
571
|
-
{
|
|
572
|
-
[K in keyof Schema['entities'][T[K0]]['links']]: Schema['entities'][T[K0]]['links'][K]['entityName'];
|
|
573
|
-
},
|
|
574
|
-
KR,
|
|
575
|
-
Schema
|
|
576
|
-
>
|
|
577
|
-
| StringifiableKey<keyof Schema['entities'][T[K0]]['attrs']>
|
|
578
|
-
| 'id'}`
|
|
579
|
-
: string & keyof T
|
|
580
|
-
: string & keyof T
|
|
581
|
-
: string & keyof T
|
|
582
|
-
: never;
|
|
583
|
-
|
|
584
|
-
type ValidDotPath<
|
|
585
|
-
Input extends string | number | symbol,
|
|
586
|
-
Schema extends IContainEntitiesAndLinks<any, any>,
|
|
587
|
-
EntityName extends keyof Schema['entities'],
|
|
588
|
-
> = ValidWhereNestedPath<
|
|
589
|
-
{
|
|
590
|
-
[K in keyof Schema['entities'][EntityName]['links']]: Schema['entities'][EntityName]['links'][K]['entityName'];
|
|
591
|
-
},
|
|
592
|
-
Input,
|
|
593
|
-
Schema
|
|
594
|
-
>;
|
|
595
|
-
|
|
596
|
-
type WhereOperatorObject<Input, V, R, I> = keyof Input extends
|
|
597
|
-
| keyof BaseWhereClauseValueComplex<V>
|
|
598
|
-
| '$ilike'
|
|
599
|
-
| '$like'
|
|
600
|
-
| '$search'
|
|
601
|
-
| '$isNull'
|
|
602
|
-
| '$nearest'
|
|
603
|
-
? BaseWhereClauseValueComplex<V> &
|
|
604
|
-
(IsAny<V> extends true
|
|
605
|
-
? {
|
|
606
|
-
$ilike?: string;
|
|
607
|
-
$like?: string;
|
|
608
|
-
$search?: string;
|
|
609
|
-
$isNull?: boolean;
|
|
610
|
-
$nearest?: number[] | { vector: number[]; limit?: number };
|
|
611
|
-
}
|
|
612
|
-
: (V extends string
|
|
613
|
-
? {
|
|
614
|
-
$like?: string;
|
|
615
|
-
$search?: string;
|
|
616
|
-
}
|
|
617
|
-
: {}) &
|
|
618
|
-
(R extends false
|
|
619
|
-
? {
|
|
620
|
-
$isNull?: boolean;
|
|
621
|
-
}
|
|
622
|
-
: {}) &
|
|
623
|
-
(I extends true
|
|
624
|
-
? {
|
|
625
|
-
$ilike?: string;
|
|
626
|
-
}
|
|
627
|
-
: {}) &
|
|
628
|
-
(V extends number[]
|
|
629
|
-
? {
|
|
630
|
-
$nearest?:
|
|
631
|
-
| number[]
|
|
632
|
-
| {
|
|
633
|
-
vector: number[];
|
|
634
|
-
limit?: number;
|
|
635
|
-
};
|
|
636
|
-
}
|
|
637
|
-
: {}))
|
|
638
|
-
: never;
|
|
639
|
-
|
|
640
|
-
type ValidWhereValue<
|
|
641
|
-
Input,
|
|
642
|
-
AttrDef extends DataAttrDef<any, any, any, boolean>,
|
|
643
|
-
> =
|
|
644
|
-
AttrDef extends DataAttrDef<infer V, infer R, infer I, boolean>
|
|
645
|
-
? Input extends V
|
|
646
|
-
? V
|
|
647
|
-
: NonEmpty<WhereOperatorObject<Input, V, R, I>>
|
|
648
|
-
: never;
|
|
649
|
-
|
|
650
|
-
type NoDistribute<T> = [T] extends [any] ? T : never;
|
|
651
|
-
|
|
652
|
-
type ValidWhereObject<
|
|
653
|
-
Input extends { [key: string]: any } | undefined,
|
|
654
|
-
Schema extends IContainEntitiesAndLinks<any, any>,
|
|
655
|
-
EntityName extends keyof Schema['entities'],
|
|
656
|
-
> = Input extends undefined
|
|
657
|
-
? undefined
|
|
658
|
-
: keyof Input extends
|
|
659
|
-
| ValidDotPath<keyof Input, Schema, EntityName>
|
|
660
|
-
| keyof Schema['entities'][EntityName]['attrs']
|
|
661
|
-
| 'and'
|
|
662
|
-
| 'or'
|
|
663
|
-
| 'id'
|
|
664
|
-
? {
|
|
665
|
-
[K in ValidDotPath<keyof Input, Schema, EntityName>]?: ValidWhereValue<
|
|
666
|
-
Input[K],
|
|
667
|
-
ExtractAttrFromDotPath<K, Schema, EntityName>
|
|
668
|
-
>;
|
|
669
|
-
} & {
|
|
670
|
-
[K in keyof Schema['entities'][EntityName]['attrs']]?: ValidWhereValue<
|
|
671
|
-
Input[K],
|
|
672
|
-
Schema['entities'][EntityName]['attrs'][K]
|
|
673
|
-
>;
|
|
674
|
-
} & {
|
|
675
|
-
and?: Input extends {
|
|
676
|
-
and: Array<infer Item extends { [key: string]: any } | undefined>;
|
|
677
|
-
}
|
|
678
|
-
? ValidWhereObject<NoDistribute<Item>, Schema, EntityName>[]
|
|
679
|
-
: never;
|
|
680
|
-
or?: Input extends {
|
|
681
|
-
or: Array<infer Item extends { [key: string]: any } | undefined>;
|
|
682
|
-
}
|
|
683
|
-
? ValidWhereObject<NoDistribute<Item>, Schema, EntityName>[]
|
|
684
|
-
: never;
|
|
685
|
-
} & {
|
|
686
|
-
// Special case for id
|
|
687
|
-
id?: ValidWhereValue<
|
|
688
|
-
SafeLookup<Input, ['id']>,
|
|
689
|
-
DataAttrDef<string, false, false, boolean>
|
|
690
|
-
>;
|
|
691
|
-
}
|
|
692
|
-
: never;
|
|
693
|
-
|
|
694
|
-
/**
|
|
695
|
-
* Extracts the attribute definition from a valid dot path.
|
|
696
|
-
* Given a dot path like "user.posts.title", this will resolve to the type of the "title" attribute.
|
|
697
|
-
* If the path is just a link name (e.g., "posts"), it defaults to the id field.
|
|
698
|
-
* Returns DataAttrDef or never
|
|
699
|
-
*/
|
|
700
|
-
type ExtractAttrFromDotPath<
|
|
701
|
-
Path extends string | number | symbol,
|
|
702
|
-
Schema extends IContainEntitiesAndLinks<any, any>,
|
|
703
|
-
EntityName extends keyof Schema['entities'],
|
|
704
|
-
> = Path extends keyof Schema['entities'][EntityName]['attrs']
|
|
705
|
-
? Schema['entities'][EntityName]['attrs'][Path]
|
|
706
|
-
: Path extends 'id'
|
|
707
|
-
? DataAttrDef<string, false, false, boolean>
|
|
708
|
-
: Path extends `${infer LinkName}.${infer RestPath}`
|
|
709
|
-
? LinkName extends keyof Schema['entities'][EntityName]['links']
|
|
710
|
-
? ExtractAttrFromDotPath<
|
|
711
|
-
RestPath,
|
|
712
|
-
Schema,
|
|
713
|
-
Schema['entities'][EntityName]['links'][LinkName]['entityName']
|
|
714
|
-
>
|
|
715
|
-
: never
|
|
716
|
-
: Path extends keyof Schema['entities'][EntityName]['links']
|
|
717
|
-
? DataAttrDef<string, false, false, boolean>
|
|
718
|
-
: never;
|
|
719
|
-
|
|
720
|
-
type ValidQuery<
|
|
721
|
-
Q extends Record<string, any>,
|
|
722
|
-
S extends IContainEntitiesAndLinks<any, any>,
|
|
723
|
-
> = S extends BackendRelayUnknownSchemaDef
|
|
724
|
-
? InstaQLParams<S>
|
|
725
|
-
: keyof Q extends keyof S['entities']
|
|
726
|
-
? {
|
|
727
|
-
[K in keyof S['entities']]?: ValidQueryObject<Q[K], S, K, true>;
|
|
728
|
-
}
|
|
729
|
-
: never;
|
|
730
|
-
|
|
731
|
-
export {
|
|
732
|
-
Query,
|
|
733
|
-
QueryResponse,
|
|
734
|
-
InstaQLResponse,
|
|
735
|
-
PageInfoResponse,
|
|
736
|
-
BackendRelayObject,
|
|
737
|
-
Exactly,
|
|
738
|
-
Remove$,
|
|
739
|
-
ValidQuery,
|
|
740
|
-
InstaQLQueryResult,
|
|
741
|
-
InstaQLParams,
|
|
742
|
-
InstaQLOptions,
|
|
743
|
-
InstaQLEntitySubquery,
|
|
744
|
-
InstaQLEntity,
|
|
745
|
-
InstaQLResult,
|
|
746
|
-
InstaQLFields,
|
|
747
|
-
Cursor,
|
|
748
|
-
InstaQLQueryParams,
|
|
749
|
-
};
|