better-supabase 0.21.0 → 0.23.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/{access-sql-CNIgUqWf.js → access-sql-bjWFUWlk.js} +11 -0
- package/dist/{adapter-DZJZTY6g.js → adapter-D4aNBxhm.js} +2 -2
- package/dist/ai-sdk/agents/index.d.ts +2 -2
- package/dist/api-3C0AWFeP.js +696 -0
- package/dist/{api-Cj4W_pqT.d.ts → api-CHObZL7m.d.ts} +1 -1
- package/dist/{app-tables-C5HjXs2k.d.ts → app-tables-CJO6pWwy.d.ts} +1 -1
- package/dist/astro/index.js +5 -5
- package/dist/{authorization-DhoA7dsD.d.ts → authorization-Dtwpjeuz.d.ts} +91 -13
- package/dist/{bind-CFsctoFJ.d.ts → bind-DaoTunvE.d.ts} +1 -1
- package/dist/{block-env-BrUNeuJ_.d.ts → block-env-DUyo2I5O.d.ts} +3 -3
- package/dist/blocks/access-requests/index.js +1 -1
- package/dist/blocks/activities/index.js +1 -1
- package/dist/blocks/agents/index.js +1 -1
- package/dist/blocks/ai-chat/index.d.ts +3 -3
- package/dist/blocks/ai-chat/index.js +1 -1
- package/dist/blocks/ai-keys/index.js +1 -1
- package/dist/blocks/announcements/index.d.ts +3 -3
- package/dist/blocks/announcements/index.js +1 -1
- package/dist/blocks/api-keys/index.d.ts +1 -1
- package/dist/blocks/api-keys/index.js +1 -1
- package/dist/blocks/approvals/index.js +1 -1
- package/dist/blocks/assets/index.js +1 -1
- package/dist/blocks/assignment/index.js +1 -1
- package/dist/blocks/attachments/index.d.ts +1 -1
- package/dist/blocks/attachments/index.js +1 -1
- package/dist/blocks/audit/index.d.ts +2 -2
- package/dist/blocks/audit/index.js +1 -1
- package/dist/blocks/automations/index.d.ts +1 -1
- package/dist/blocks/automations/index.js +1 -1
- package/dist/blocks/billable-time/index.js +1 -1
- package/dist/blocks/billing/index.d.ts +1 -1
- package/dist/blocks/billing/index.js +2 -2
- package/dist/blocks/bookings/index.d.ts +1 -1
- package/dist/blocks/bookings/index.js +1 -1
- package/dist/blocks/bulk/index.js +1 -1
- package/dist/blocks/calendar/index.d.ts +5 -1
- package/dist/blocks/calendar/index.js +7 -4
- package/dist/blocks/catalog/index.js +1 -1
- package/dist/blocks/channels/index.js +1 -1
- package/dist/blocks/collections/index.js +1 -1
- package/dist/blocks/comments/index.d.ts +4 -4
- package/dist/blocks/compliance/index.js +1 -1
- package/dist/blocks/connectors/index.js +1 -1
- package/dist/blocks/contacts/index.js +1 -1
- package/dist/blocks/content/index.js +1 -1
- package/dist/blocks/contracts/index.js +1 -1
- package/dist/blocks/courses/index.js +1 -1
- package/dist/blocks/custom-fields/index.d.ts +43 -1
- package/dist/blocks/custom-fields/index.js +41 -2
- package/dist/blocks/data-lifecycle/index.js +1 -1
- package/dist/blocks/deals/index.js +1 -1
- package/dist/blocks/dispatch/index.js +1 -1
- package/dist/blocks/documents/index.js +1 -1
- package/dist/blocks/domains/index.js +1 -1
- package/dist/blocks/donations/index.js +1 -1
- package/dist/blocks/drive/index.d.ts +1 -1
- package/dist/blocks/drive/index.js +1 -1
- package/dist/blocks/employees/index.d.ts +4 -0
- package/dist/blocks/employees/index.js +2 -2
- package/dist/blocks/enrichment/index.js +1 -1
- package/dist/blocks/enrollments/index.js +1 -1
- package/dist/blocks/entitlements/index.d.ts +2 -2
- package/dist/blocks/expenses/index.js +1 -1
- package/dist/blocks/flags/index.js +1 -1
- package/dist/blocks/forecasts/index.js +1 -1
- package/dist/blocks/forms/index.d.ts +1 -1
- package/dist/blocks/forms/index.js +1 -1
- package/dist/blocks/guests/index.js +1 -1
- package/dist/blocks/hiring/index.js +1 -1
- package/dist/blocks/imports/index.js +1 -1
- package/dist/blocks/inbox/index.d.ts +4 -4
- package/dist/blocks/inbox/index.js +1 -1
- package/dist/blocks/incidents/index.js +1 -1
- package/dist/blocks/index.d.ts +1 -1
- package/dist/blocks/index.js +2 -2
- package/dist/blocks/inventory/index.js +1 -1
- package/dist/blocks/invoices/index.js +1 -1
- package/dist/blocks/leases/index.js +1 -1
- package/dist/blocks/leave/index.js +1 -1
- package/dist/blocks/ledger/index.js +1 -1
- package/dist/blocks/mail-sync/index.js +1 -1
- package/dist/blocks/messaging/index.d.ts +4 -4
- package/dist/blocks/messaging/index.js +1 -1
- package/dist/blocks/metrics/index.js +1 -1
- package/dist/blocks/mfa/index.d.ts +1 -1
- package/dist/blocks/moderation/index.js +1 -1
- package/dist/blocks/notifications/index.d.ts +3 -3
- package/dist/blocks/notifications/index.js +3 -3
- package/dist/blocks/numbering/index.js +1 -1
- package/dist/blocks/oauth-server/index.js +1 -1
- package/dist/blocks/onboarding/index.d.ts +1 -1
- package/dist/blocks/orders/index.js +1 -1
- package/dist/blocks/organizations/index.d.ts +2 -2
- package/dist/blocks/organizations/index.js +1 -1
- package/dist/blocks/outbox/index.js +1 -1
- package/dist/blocks/passes/index.js +1 -1
- package/dist/blocks/permissions/index.d.ts +1 -1
- package/dist/blocks/pipelines/index.js +1 -1
- package/dist/blocks/posts/index.js +1 -1
- package/dist/blocks/promotions/index.js +1 -1
- package/dist/blocks/push/index.d.ts +1 -1
- package/dist/blocks/push/index.js +1 -1
- package/dist/blocks/quotes/index.js +1 -1
- package/dist/blocks/reactions/index.d.ts +3 -3
- package/dist/blocks/reactions/index.js +1 -1
- package/dist/blocks/relations/index.js +1 -1
- package/dist/blocks/reminders/index.js +1 -1
- package/dist/blocks/reviews/index.js +1 -1
- package/dist/blocks/saved-views/index.d.ts +1 -1
- package/dist/blocks/saved-views/index.js +1 -1
- package/dist/blocks/scores/index.js +1 -1
- package/dist/blocks/search/index.d.ts +4 -2
- package/dist/blocks/search/index.js +3 -1
- package/dist/blocks/security-events/index.js +1 -1
- package/dist/blocks/segments/index.js +1 -1
- package/dist/blocks/sequences/index.js +1 -1
- package/dist/blocks/service-accounts/index.js +1 -1
- package/dist/blocks/sessions/index.d.ts +1 -1
- package/dist/blocks/settings/index.d.ts +1 -1
- package/dist/blocks/settings/index.js +1 -1
- package/dist/blocks/share-links/index.d.ts +28 -3
- package/dist/blocks/share-links/index.js +59 -23
- package/dist/blocks/shipments/index.js +1 -1
- package/dist/blocks/signatures/index.js +1 -1
- package/dist/blocks/signing-keys/index.js +1 -1
- package/dist/blocks/sla/index.js +1 -1
- package/dist/blocks/sso/index.js +1 -1
- package/dist/blocks/state-machine/index.js +1 -1
- package/dist/blocks/subjects/index.d.ts +1 -1
- package/dist/blocks/tags/index.d.ts +18 -3
- package/dist/blocks/tags/index.js +16 -3
- package/dist/blocks/tasks/index.js +2 -2
- package/dist/blocks/teams/index.d.ts +26 -4
- package/dist/blocks/teams/index.js +11 -4
- package/dist/blocks/templates/index.js +1 -1
- package/dist/blocks/time-tracking/index.d.ts +18 -0
- package/dist/blocks/time-tracking/index.js +13 -4
- package/dist/blocks/timeline/index.js +1 -1
- package/dist/blocks/trash/index.js +1 -1
- package/dist/blocks/undo/index.d.ts +1 -1
- package/dist/blocks/usage/index.d.ts +1 -1
- package/dist/blocks/vercel-marketplace/index.js +1 -1
- package/dist/blocks/versions/index.js +1 -1
- package/dist/blocks/waitlist/index.js +1 -1
- package/dist/blocks/webhooks/index.js +4 -4
- package/dist/blocks/workflow-editor/index.d.ts +3 -3
- package/dist/blocks/workflow-editor/index.js +1 -1
- package/dist/blocks/workflows/index.d.ts +3 -3
- package/dist/blocks/workflows/index.js +1 -1
- package/dist/cli/{add-BTDPjVGC.js → add-C7lKQNBL.js} +11 -11
- package/dist/cli/{add-C0w-mVTQ.js → add-DVHniZOO.js} +2 -2
- package/dist/cli/add-vZRn-uH0.js +1 -0
- package/dist/cli/{backfill-BDdBs6Ne.js → backfill-Lrn-Qp5X.js} +3 -3
- package/dist/cli/bin.js +1 -1
- package/dist/cli/{blocks-Bs-lA-U_.js → blocks-2Yw9t-_U.js} +1 -1
- package/dist/cli/{blocks-CQLME-HQ.js → blocks-BKNd886C.js} +1 -1
- package/dist/cli/{cache-DDKao2Va.js → cache-ByhPVMo-.js} +1 -1
- package/dist/cli/{codemod-Bjl998Do.js → codemod-C0eXpzFu.js} +1 -1
- package/dist/cli/{config-BH0goim0.js → config-BVfeG3A5.js} +37 -5
- package/dist/cli/{config-CTRzkX0H.js → config-CeaQMrvS.js} +1 -1
- package/dist/cli/{content-mapper-DgSTl-DL.js → content-mapper-qH-_YQ8H.js} +2 -2
- package/dist/cli/{db-DCeyHS1y.js → db-DwjyUbAh.js} +2 -2
- package/dist/cli/{doctor-CMLWbt44.js → doctor-BnxkqXGA.js} +21 -19
- package/dist/cli/{gen-D3VX8WdV.js → gen-aERmP3Sw.js} +14 -14
- package/dist/cli/index.d.ts +1 -1
- package/dist/cli/index.js +7 -7
- package/dist/cli/{init-D6D6eWze.js → init-DWUqVSVW.js} +6 -6
- package/dist/cli/{live-C_xgTOfD.js → live-KcdTBUij.js} +2 -2
- package/dist/cli/{mcp-B0Irjbes.js → mcp-Dsjjo-LT.js} +2 -2
- package/dist/cli/{metadata-cLXra-XB.js → metadata-DWQSIZ59.js} +3 -3
- package/dist/cli/{migration-safety-OUK-Afbb.js → migration-safety-Cy7xlU4G.js} +2 -2
- package/dist/cli/{migrations-CHenMvl_.js → migrations-CUjNXokR.js} +1 -1
- package/dist/cli/{module-migration-6V7vXWUK.js → module-migration-C6NLY9iZ.js} +2 -2
- package/dist/cli/powersync-BOhjVQCb.js +1 -0
- package/dist/cli/{powersync-D83yAFbl.js → powersync-CE_hQdgc.js} +2 -2
- package/dist/cli/{print-C0OmQyTu.js → print-Cy_ram9N.js} +2 -2
- package/dist/cli/{remove-BWlOngNT.js → remove-DmwjzqaW.js} +5 -5
- package/dist/cli/{render-9m70qveo.js → render-CF09FCra.js} +7 -4
- package/dist/cli/{run-He3M-ZRq.js → run-BYpZ8FjF.js} +25 -25
- package/dist/cli/{run-gE4eAazR.js → run-lh-chAJW.js} +8 -8
- package/dist/cli/{seed-CdSxunFT.js → seed-BMynpMPy.js} +2 -2
- package/dist/cli/seed-CO3j_bly.js +1 -0
- package/dist/cli/{shared-Cx2WFVWq.js → shared-D05A6t1e.js} +1 -1
- package/dist/cli/{snapshot-CZb3uVKE.js → snapshot-BITNbA5V.js} +3 -3
- package/dist/cli/{source-CrYSCdPZ.js → source-GGJHuzpH.js} +1 -1
- package/dist/cli/{source-args-z-jkabmO.js → source-args-CDmmFmFG.js} +1 -1
- package/dist/cli/{spec-Cn5RhuQc.js → spec-BGcRdlhN.js} +2 -2
- package/dist/cli/{spec-D4b9ePuQ.js → spec-BjxXWaNQ.js} +1 -1
- package/dist/cli/{sql-layout-CLJ67h3L.js → sql-layout-BoD5ynN9.js} +2 -2
- package/dist/cli/{sync-B8VGiaHk.js → sync-_QlsTmqu.js} +3 -3
- package/dist/cli/{upgrade-BvBWK3Fo.js → upgrade-Cwhb1M7O.js} +4 -4
- package/dist/cli/{upgrade-DMiYx1C8.js → upgrade-n9ar1kc4.js} +2 -2
- package/dist/cli/{version-BVg2Z6yv.js → version-RSpJIWDd.js} +1 -1
- package/dist/client/index.d.ts +5 -5
- package/dist/client/native/index.d.ts +4 -4
- package/dist/{composite-Dw5ofSF_.js → composite-CBRbvn5j.js} +2 -2
- package/dist/config/index.d.ts +4 -4
- package/dist/config/index.js +4 -4
- package/dist/{config-BOt5T6Vs.js → config-RwpFcPq8.js} +3 -3
- package/dist/{config-CD2OGfCG.js → config-vHLJ8SKf.js} +1 -1
- package/dist/{context-sgrUjA3U.d.ts → context-CMf4OKpN.d.ts} +72 -16
- package/dist/{controller-B6vWdKSa.d.ts → controller-BGto_kYM.d.ts} +1 -1
- package/dist/create/index.d.ts +72 -451
- package/dist/create/index.js +15 -1687
- package/dist/create/lite/index.d.ts +250 -13
- package/dist/create/lite/index.js +1007 -24
- package/dist/credentials/index.js +1 -1
- package/dist/edge/index.js +7 -7
- package/dist/elysia/index.js +1 -1
- package/dist/{entitlements-BPaPd3MD.d.ts → entitlements-CIhVQ-0u.d.ts} +1 -1
- package/dist/events/index.js +1 -1
- package/dist/expo/index.js +3 -3
- package/dist/{field-errors-DBgDCITw.d.ts → field-errors-BDhPaO0a.d.ts} +4 -4
- package/dist/{framework-DXM1vNcV.js → framework-DYEUraqt.js} +1 -1
- package/dist/h3/index.js +1 -1
- package/dist/h3/v1/index.js +1 -1
- package/dist/hono/index.js +6 -6
- package/dist/{index-ByF22_C6.d.ts → index--OhYKouV.d.ts} +2 -2
- package/dist/{index-Bt7_mxn0.d.ts → index-4MStWaeF.d.ts} +185 -7
- package/dist/{index-5JSxY1MG.d.ts → index-CFWlHuVY.d.ts} +77 -2
- package/dist/{index-CdMZQCYR.d.ts → index-lV43eM34.d.ts} +2 -2
- package/dist/{index-C4sjewrr.d.ts → index-ujNqgZ6B.d.ts} +6 -6
- package/dist/{app-tables-DyswUg6J.js → instances-BPJSESPx.js} +176 -11
- package/dist/{kit-DhlB-vv_.js → kit-Bcd9wYCV.js} +1 -1
- package/dist/mapper/bin.js +6 -6
- package/dist/mcp/index.d.ts +1 -1
- package/dist/mcp/index.js +6 -6
- package/dist/mcp/sdk/index.js +2 -2
- package/dist/nestjs/index.js +1 -1
- package/dist/next/index.d.ts +3 -3
- package/dist/next/index.js +7 -7
- package/dist/node/index.js +1 -1
- package/dist/{operations-DC3wU3Sy.d.ts → operations-qSBBV5vl.d.ts} +1 -1
- package/dist/{options-fMxhtuVR.js → options-BJtdsK7b.js} +4 -1
- package/dist/{options-DhdazgTZ.js → options-BPp2zzsz.js} +3 -1
- package/dist/options-BSsYXjhC.js +9 -0
- package/dist/{options-ChiL-4ZS.js → options-D4ADKTKo.js} +3 -1
- package/dist/{options-C1-pwEqm.js → options-DztCKw_f.js} +4 -1
- package/dist/{options-BfFC4iFE.js → options-jsOCvLUz.js} +3 -1
- package/dist/orpc/index.d.ts +1 -1
- package/dist/orpc/index.js +5 -5
- package/dist/otel/index.js +4 -4
- package/dist/{ports-BbBJVyS0.d.ts → ports-DbHiNSAa.d.ts} +1 -1
- package/dist/powersync/index.d.ts +2 -2
- package/dist/preset/index.d.ts +4 -4
- package/dist/preset/index.js +4 -4
- package/dist/{preset-B3CukUhu.js → preset-B1xXOJ0T.js} +179 -7
- package/dist/project-BM6QMtzV.js +1760 -0
- package/dist/{push-token-CPJfPFa2.d.ts → push-token-BwF1fyjA.d.ts} +1 -1
- package/dist/react/index.d.ts +5 -5
- package/dist/react/index.js +2 -2
- package/dist/react/native/index.d.ts +1 -1
- package/dist/react/server.d.ts +5 -5
- package/dist/react/server.js +2 -2
- package/dist/{react-_D_CeZMk.js → react-CcrQQl0_.js} +2 -2
- package/dist/react-router/index.js +5 -5
- package/dist/realtime/index.d.ts +3 -3
- package/dist/realtime/index.js +1 -1
- package/dist/records/index.d.ts +3 -3
- package/dist/{refusal-D48CMqpQ.js → refusal-DDlInPff.js} +2 -2
- package/dist/{instances-DDt7NdVl.js → resolved-names-WzRYhUez.js} +2 -146
- package/dist/{resource-R3KToNze.js → resource-BUJcZKiW.js} +2 -2
- package/dist/{resources-DqIwoQsP.js → resources-jb3R6rEa.js} +1 -1
- package/dist/server/index.d.ts +1 -1
- package/dist/server/index.js +7 -7
- package/dist/{sign-in-1FJiXXyG.js → sign-in-NO7LWlw4.js} +2 -2
- package/dist/solid/index.d.ts +5 -5
- package/dist/solid/index.js +1 -1
- package/dist/solid-start/index.js +5 -5
- package/dist/spec/index.d.ts +2 -2
- package/dist/spec/index.js +2 -693
- package/dist/sql/index.d.ts +5 -5
- package/dist/sql/index.js +5 -5
- package/dist/{sql-BjjgwJKg.js → sql-CNH8kjLS.js} +2727 -955
- package/dist/ssr/index.d.ts +1 -1
- package/dist/storage/index.js +1 -1
- package/dist/subjects-NomQg6Eg.d.ts +131 -0
- package/dist/svelte/index.d.ts +5 -5
- package/dist/svelte/index.js +1 -1
- package/dist/sveltekit/index.js +5 -5
- package/dist/tanstack-start/index.js +5 -5
- package/dist/{tenant-BHvMFNXl.d.ts → tenant-D4BA7XQ-.d.ts} +1 -1
- package/dist/testing/index.d.ts +4 -4
- package/dist/testing/index.js +5 -5
- package/dist/{topic-J9I3yu6f.js → topic-F0FKzJyQ.js} +2 -2
- package/dist/{topic-gTVjLGTk.d.ts → topic-utZqhw96.d.ts} +1 -1
- package/dist/types-DLnBJ3ST.d.ts +461 -0
- package/dist/vue/index.d.ts +5 -5
- package/dist/vue/index.js +1 -1
- package/dist/{watch-topic-C6HhbnVz.d.ts → watch-topic-B1UCoQfz.d.ts} +1 -1
- package/dist/workflow-sdk/world/index.js +1 -1
- package/dist/{workflow-sdk-DELaQEp3.js → workflow-sdk-CE8sEK57.js} +38 -1
- package/dist/yjs/index.d.ts +1 -1
- package/dist/yjs/index.js +1 -1
- package/package.json +1 -1
- package/schemas/config-v1.json +166 -2
- package/dist/cli/add-CspY9jKT.js +0 -1
- package/dist/cli/powersync-DwhCH0gs.js +0 -1
- package/dist/cli/seed-CXJvTU5D.js +0 -1
- package/dist/options-CTv-xmbA.js +0 -5
- package/dist/subjects-DvmQeF_F.d.ts +0 -79
- package/dist/types-DGHfTW8_.d.ts +0 -9
- package/dist/{build-CM8PJqwW.js → build-CH2N3Yf0.js} +3 -3
- package/dist/{create-blocks-CUS28FfS.js → create-blocks-BfrDUSM6.js} +1 -1
- package/dist/{data-hooks-tgF1Ct0F.js → data-hooks-CdcZfVS1.js} +1 -1
- package/dist/{respond-3RKp6VgU.js → respond-CZMWbUs3.js} +1 -1
package/dist/ssr/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { C as readSession, D as writeSession, E as sessionEncoding, S as pruneSessionChunks, T as sessionCookieName, _ as StoredSession, a as ResolveAuthOptions, b as clearSessionAtScopes, d as CookieOptions, f as CookieRecord, g as SessionEncoding, h as DEFAULT_SESSION_ENCODING, l as resolveAuth, m as CookieWrite, n as AuthResolver, p as CookieScope, r as AuthState, t as AuthResolution, u as AUTH_CACHE_HEADERS, v as WriteSessionOptions, w as serializeCookie, x as parseCookies, y as applyCookieWrites } from "../resolve-CXX6DHv3.js";
|
|
2
2
|
import { n as toSession, t as AuthSession } from "../view-DyFdMCqg.js";
|
|
3
|
-
import { r as MembershipClaim } from "../entitlements-
|
|
3
|
+
import { r as MembershipClaim } from "../entitlements-CIhVQ-0u.js";
|
|
4
4
|
import { n as RefreshOutcome, r as refreshSession, t as RefreshOptions } from "../refresh-DT_ICaK-.js";
|
|
5
5
|
import { a as sessionStatus, i as clearSessionCookies, n as SessionStatus, o as authContext, r as SessionStatusOptions, t as ClearSessionCookiesOptions } from "../ended-gUsMZVNg.js";
|
|
6
6
|
export { AUTH_CACHE_HEADERS, type AuthResolution, type AuthResolver, type AuthSession, type AuthState, type ClearSessionCookiesOptions, type CookieOptions, type CookieRecord, type CookieScope, type CookieWrite, DEFAULT_SESSION_ENCODING, type MembershipClaim, type RefreshOptions, type RefreshOutcome, type ResolveAuthOptions, type SessionEncoding, type SessionStatus, type SessionStatusOptions, type StoredSession, type WriteSessionOptions, applyCookieWrites, authContext, clearSessionAtScopes, clearSessionCookies, parseCookies, pruneSessionChunks, readSession, refreshSession, resolveAuth, serializeCookie, sessionCookieName, sessionEncoding, sessionStatus, toSession, writeSession };
|
package/dist/storage/index.js
CHANGED
|
@@ -8,7 +8,7 @@ import { a as spansAllTenants } from "../plugin-AKwwe2gF.js";
|
|
|
8
8
|
import { n as decodeJwtPayload } from "../base64-B9Wlsdj7.js";
|
|
9
9
|
import { a as tenantClaimPaths, o as tenantFrom, s as tenantPathsFor } from "../claims-Bp9My7XP.js";
|
|
10
10
|
import { a as sqlString, i as sqlIdent, n as parseTemplate, r as slug, t as claimSql } from "../template-Drgg3v2J.js";
|
|
11
|
-
import { r as accessCheck } from "../access-sql-
|
|
11
|
+
import { r as accessCheck } from "../access-sql-bjWFUWlk.js";
|
|
12
12
|
import { t as fromStorageError } from "../errors-CyxMxzlu.js";
|
|
13
13
|
import { a as ttlSeconds, i as TTL, r as transformFor, t as checkVariants } from "../variants-Cy--Ub-a.js";
|
|
14
14
|
import { i as storageImageUrl, r as storageImageSrcSet } from "../image-url-_d7xYsXK.js";
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
//#region src/config/types/subjects.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* One entity the app's blocks attach to (`subjects.<type>`): a task, a
|
|
4
|
+
* customer, a document. Every subject-bound SQL module reads these entries
|
|
5
|
+
* unless its own `on` says otherwise. ADR 0020.
|
|
6
|
+
*/
|
|
7
|
+
interface SubjectConfig {
|
|
8
|
+
/** `schema.table`, or a table in `public`. */
|
|
9
|
+
readonly table: string;
|
|
10
|
+
/** The id column. Defaults to `id`. */
|
|
11
|
+
readonly id?: string;
|
|
12
|
+
/**
|
|
13
|
+
* The id column's type, such as `uuid` or `bigint`, so lookups compare on the
|
|
14
|
+
* primary key's own type. Without it the column is compared as text.
|
|
15
|
+
*/
|
|
16
|
+
readonly idType?: string;
|
|
17
|
+
/**
|
|
18
|
+
* The tenant column. Defaults to `organization_id`, or
|
|
19
|
+
* `<blocks.memberships.names.organization>_id` when the tenant is renamed.
|
|
20
|
+
* `false` for a subject without a tenant, which modules that keep a tenant on
|
|
21
|
+
* every row skip.
|
|
22
|
+
*/
|
|
23
|
+
readonly tenant?: string | false;
|
|
24
|
+
/** The column `subject_title` returns. */
|
|
25
|
+
readonly title?: string;
|
|
26
|
+
/**
|
|
27
|
+
* The path `subject_url` returns, with `{column}` placeholders:
|
|
28
|
+
* `/tasks/{id}`.
|
|
29
|
+
*/
|
|
30
|
+
readonly url?: string;
|
|
31
|
+
/**
|
|
32
|
+
* A permission key per action (`read`, `write`, `share`, `comment`,
|
|
33
|
+
* `moderate`, or an app action) that `can_subject` checks in the subject's
|
|
34
|
+
* tenant, on top of the row being visible to the caller. `read` is also the
|
|
35
|
+
* permission modules check before they attach rows to the subject. An object
|
|
36
|
+
* adds per-row grants: `rows` asks the authorization provider for the rows of
|
|
37
|
+
* that resource the caller holds `key` on, and `owner` names a uuid column
|
|
38
|
+
* whose value is the caller; any form that holds grants the action.
|
|
39
|
+
*/
|
|
40
|
+
readonly permissions?: Readonly<Record<string, string | SubjectPermission>>;
|
|
41
|
+
/**
|
|
42
|
+
* A scope the authorization provider declares whose ids are this subject's
|
|
43
|
+
* ids, so a grant on the record counts as well as one on the tenant.
|
|
44
|
+
*/
|
|
45
|
+
readonly scope?: string;
|
|
46
|
+
/** Delete module rows for a subject when its row is deleted. */
|
|
47
|
+
readonly cascade?: boolean;
|
|
48
|
+
/**
|
|
49
|
+
* The column holding the soft-delete time. Blocks hide rows where it is set,
|
|
50
|
+
* metrics skip them, and `gen` makes it the table's `trashExtension()`
|
|
51
|
+
* column.
|
|
52
|
+
*/
|
|
53
|
+
readonly deletedAt?: string;
|
|
54
|
+
/** The columns a search index reads. */
|
|
55
|
+
readonly search?: SubjectSearch;
|
|
56
|
+
/**
|
|
57
|
+
* The text column holding the subject's rank key, and the column it is
|
|
58
|
+
* grouped by (a board stage), for `move()`. ADR 0021.
|
|
59
|
+
*/
|
|
60
|
+
readonly rank?: {
|
|
61
|
+
readonly column: string;
|
|
62
|
+
readonly group?: string;
|
|
63
|
+
};
|
|
64
|
+
/**
|
|
65
|
+
* The columns the versions block snapshots and restores, and whether it
|
|
66
|
+
* snapshots on each change. An app table's `subject.versions` sets it.
|
|
67
|
+
*/
|
|
68
|
+
readonly versions?: {
|
|
69
|
+
readonly columns: readonly string[];
|
|
70
|
+
readonly auto: boolean;
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* An action on a subject granted in more ways than a tenant key: the tenant
|
|
75
|
+
* (and `scope`) key, the provider's per-row grants and the row's owner. Any one
|
|
76
|
+
* that holds grants the action.
|
|
77
|
+
*/
|
|
78
|
+
interface SubjectPermission {
|
|
79
|
+
/** The permission key, checked in the tenant and on `scope`. */
|
|
80
|
+
readonly key?: string;
|
|
81
|
+
/**
|
|
82
|
+
* A resource of the authorization provider (its SQL name, such as
|
|
83
|
+
* `file_node`) whose row grants for `key` count, through the provider's
|
|
84
|
+
* `rowsWith` template. Needs `key`.
|
|
85
|
+
*/
|
|
86
|
+
readonly rows?: string;
|
|
87
|
+
/** A uuid column of the subject row that grants the action to its user. */
|
|
88
|
+
readonly owner?: string;
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* What the search index reads for a record type: `title` and `body` columns of
|
|
92
|
+
* the row (or of `from`), a `description` returned with each hit, and an
|
|
93
|
+
* `exclude` column that keeps a row out of search while it is set.
|
|
94
|
+
*/
|
|
95
|
+
interface SubjectSearch {
|
|
96
|
+
readonly title?: string;
|
|
97
|
+
readonly body?: readonly string[];
|
|
98
|
+
/** A column whose value each hit returns as `description`. */
|
|
99
|
+
readonly description?: string;
|
|
100
|
+
/**
|
|
101
|
+
* A column that keeps the row out of the index while it is set (not null, and
|
|
102
|
+
* not `false`), such as `archived_at`; other blocks still see the row.
|
|
103
|
+
*/
|
|
104
|
+
readonly exclude?: string;
|
|
105
|
+
/**
|
|
106
|
+
* A view or table with one row per record, keyed by `key` (the record's id),
|
|
107
|
+
* that `title`, `body`, `description` and `exclude` read instead of the
|
|
108
|
+
* record's own row.
|
|
109
|
+
*/
|
|
110
|
+
readonly from?: {
|
|
111
|
+
readonly view: string;
|
|
112
|
+
readonly key: string;
|
|
113
|
+
};
|
|
114
|
+
/**
|
|
115
|
+
* Tables whose changes re-index the record: `key` is the column holding the
|
|
116
|
+
* record's id, or, with `via`, the column the record's `via` column points
|
|
117
|
+
* at.
|
|
118
|
+
*/
|
|
119
|
+
readonly watch?: readonly {
|
|
120
|
+
readonly table: string;
|
|
121
|
+
readonly key: string;
|
|
122
|
+
readonly via?: string;
|
|
123
|
+
}[];
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* The app's subject types, keyed by type name (lowercase, digits and
|
|
127
|
+
* underscores).
|
|
128
|
+
*/
|
|
129
|
+
type SubjectsConfig = Readonly<Record<string, SubjectConfig>>;
|
|
130
|
+
//#endregion
|
|
131
|
+
export { SubjectsConfig as i, SubjectPermission as n, SubjectSearch as r, SubjectConfig as t };
|
package/dist/svelte/index.d.ts
CHANGED
|
@@ -2,12 +2,12 @@ import { b as DbError } from "../result-DZeA5KS6.js";
|
|
|
2
2
|
import { Ct as Events, D as BlockEventPattern, T as BlockEvent, bt as EventMap, k as BlockEventsMatching } from "../events-vcqenSYU.js";
|
|
3
3
|
import { mt as QuerySpec } from "../define-Lf6rI2QN.js";
|
|
4
4
|
import { tt as TemplateValues } from "../bucket-vc-QRrva.js";
|
|
5
|
-
import { g as TopicHandlers, m as Topic, p as SubscriptionStatus, r as PresenceMember, t as EventSchemas } from "../topic-
|
|
6
|
-
import { t as AuthSnapshot } from "../bind-
|
|
5
|
+
import { g as TopicHandlers, m as Topic, p as SubscriptionStatus, r as PresenceMember, t as EventSchemas } from "../topic-utZqhw96.js";
|
|
6
|
+
import { t as AuthSnapshot } from "../bind-DaoTunvE.js";
|
|
7
7
|
import { t as AuthSession } from "../view-DyFdMCqg.js";
|
|
8
|
-
import { n as Controller } from "../controller-
|
|
9
|
-
import { C as LiveCountSource, D as ProfileOf, E as PresenceTopic, O as UseActionOptions, S as LiveCountHookOptions, T as PresenceHookOptions, _ as ActionResultOf, a as DataRows, b as ClaimsOf, c as DataWrites, d as BlockMutationState, f as BlockQueryActions, g as ActionInputOf, h as BlockRefetchOn, i as DataRow, l as BlockEventSource, m as BlockQueryState, n as DataId, o as DataSource, p as BlockQueryOptions, r as DataListArgs, s as DataState, t as fieldErrorsOf, u as BlockMutationActions, v as ActionState, w as LiveQueryHookOptions, x as ClientLike, y as BroadcastOptions } from "../field-errors-
|
|
10
|
-
import { n as BlockOptions } from "../block-env-
|
|
8
|
+
import { n as Controller } from "../controller-BGto_kYM.js";
|
|
9
|
+
import { C as LiveCountSource, D as ProfileOf, E as PresenceTopic, O as UseActionOptions, S as LiveCountHookOptions, T as PresenceHookOptions, _ as ActionResultOf, a as DataRows, b as ClaimsOf, c as DataWrites, d as BlockMutationState, f as BlockQueryActions, g as ActionInputOf, h as BlockRefetchOn, i as DataRow, l as BlockEventSource, m as BlockQueryState, n as DataId, o as DataSource, p as BlockQueryOptions, r as DataListArgs, s as DataState, t as fieldErrorsOf, u as BlockMutationActions, v as ActionState, w as LiveQueryHookOptions, x as ClientLike, y as BroadcastOptions } from "../field-errors-BDhPaO0a.js";
|
|
10
|
+
import { n as BlockOptions } from "../block-env-DUyo2I5O.js";
|
|
11
11
|
import { n as BlockDataOf, r as BlockMethodName, t as BlockArgsOf } from "../block-method-CiVa2G-J.js";
|
|
12
12
|
import { SupabaseClient } from "@supabase/supabase-js";
|
|
13
13
|
import { QueryClient } from "@tanstack/query-core";
|
package/dist/svelte/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as clearOnUserChange } from "../user-change-DgWC6RRC.js";
|
|
2
2
|
import { a as createActionRunner, c as liveKey, d as shownCount, f as startBroadcast, i as countSource, l as notJoined, m as startLiveQuery, n as assertInvalidateClient, o as joinPresence, p as startLiveCount, r as callerOf, s as keyed, t as NO_COUNT, u as plainCaller } from "../client-C_mlji5R.js";
|
|
3
|
-
import { c as listenToBlockEvents, d as fieldErrorsOf, i as dataTarget, l as blockEnv, n as createDataOne, o as createBlockMutation, s as createBlockQuery, t as createDataList, u as withEnv } from "../data-hooks-
|
|
3
|
+
import { c as listenToBlockEvents, d as fieldErrorsOf, i as dataTarget, l as blockEnv, n as createDataOne, o as createBlockMutation, s as createBlockQuery, t as createDataList, u as withEnv } from "../data-hooks-CdcZfVS1.js";
|
|
4
4
|
import { getContext, onDestroy, onMount, setContext } from "svelte";
|
|
5
5
|
import { createSubscriber } from "svelte/reactivity";
|
|
6
6
|
import { readable } from "svelte/store";
|
package/dist/sveltekit/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { t as DbException } from "../db-exception-Lngc1W49.js";
|
|
2
2
|
import { r as dbErrorOf } from "../errors-BVFgt8BZ.js";
|
|
3
3
|
import { c as toProblem } from "../problem-Bf0cJ7tk.js";
|
|
4
|
-
import { c as extendServer, o as withFlush, s as createServer } from "../adapter-
|
|
5
|
-
import { n as defaultExpose } from "../respond-
|
|
4
|
+
import { c as extendServer, o as withFlush, s as createServer } from "../adapter-D4aNBxhm.js";
|
|
5
|
+
import { n as defaultExpose } from "../respond-CZMWbUs3.js";
|
|
6
6
|
import { r as tagFor } from "../tags-CIZTqtlY.js";
|
|
7
|
-
import { i as requireCaller, o as runAction } from "../kit-
|
|
7
|
+
import { i as requireCaller, o as runAction } from "../kit-Bcd9wYCV.js";
|
|
8
8
|
import { n as bufferInPlace, t as around } from "../shared-Bf-I13Ht.js";
|
|
9
|
-
import { a as platformWaitUntil, i as localsOf, n as actionInput, r as frameworkEntry } from "../framework-
|
|
10
|
-
import { i as refusalTarget } from "../refusal-
|
|
9
|
+
import { a as platformWaitUntil, i as localsOf, n as actionInput, r as frameworkEntry } from "../framework-DYEUraqt.js";
|
|
10
|
+
import { i as refusalTarget } from "../refusal-DDlInPff.js";
|
|
11
11
|
//#region src/bridges/sveltekit.ts
|
|
12
12
|
/**
|
|
13
13
|
* Runs an entry array as a SvelteKit `handle` hook. Every contributed key lands
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { c as extendServer, o as withFlush, s as createServer } from "../adapter-
|
|
2
|
-
import { n as defaultExpose } from "../respond-
|
|
3
|
-
import { i as requireCaller, o as runAction } from "../kit-
|
|
1
|
+
import { c as extendServer, o as withFlush, s as createServer } from "../adapter-D4aNBxhm.js";
|
|
2
|
+
import { n as defaultExpose } from "../respond-CZMWbUs3.js";
|
|
3
|
+
import { i as requireCaller, o as runAction } from "../kit-Bcd9wYCV.js";
|
|
4
4
|
import { n as bufferInPlace, t as around } from "../shared-Bf-I13Ht.js";
|
|
5
|
-
import { i as localsOf, r as frameworkEntry } from "../framework-
|
|
6
|
-
import { r as refusalResponse } from "../refusal-
|
|
5
|
+
import { i as localsOf, r as frameworkEntry } from "../framework-DYEUraqt.js";
|
|
6
|
+
import { r as refusalResponse } from "../refusal-DDlInPff.js";
|
|
7
7
|
//#region src/bridges/tanstack-start.ts
|
|
8
8
|
/**
|
|
9
9
|
* The `response` of a request middleware's `next()` result; server function
|
package/dist/testing/index.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ import { a as BlockTransportMiddleware } from "../block-hooks-DZN2w69m.js";
|
|
|
9
9
|
import { a as SessionActor, o as SessionDelegation } from "../actor-CoveJgya.js";
|
|
10
10
|
import { P as QueueProvider } from "../types-Czq9Xtpa.js";
|
|
11
11
|
import { n as Embedder } from "../knowledge-F1IhRI4Q.js";
|
|
12
|
-
import { a as AuthorizationProvider } from "../authorization-
|
|
12
|
+
import { a as AuthorizationProvider } from "../authorization-Dtwpjeuz.js";
|
|
13
13
|
import { o as StreamStore } from "../store-CpheI-lN.js";
|
|
14
14
|
import { o as Authorizer } from "../authorizer-B6X09otb.js";
|
|
15
15
|
import { Qt as CacheAdapter, Y as DbStats, t as BetterSupabase, y as Db } from "../define-Lf6rI2QN.js";
|
|
@@ -24,9 +24,9 @@ import { s as SqlClaims, t as BetterPostgres } from "../pool-CrtT4dg-.js";
|
|
|
24
24
|
import { C as SupportSessionStore } from "../support-B4ZBVxt3.js";
|
|
25
25
|
import { r as GuardOptions } from "../respond-oZeJ342J.js";
|
|
26
26
|
import { l as Transcriber, s as NoteTaker, u as TranscriberInput } from "../recordings-BBSJt_YV.js";
|
|
27
|
-
import { n as Controller } from "../controller-
|
|
27
|
+
import { n as Controller } from "../controller-BGto_kYM.js";
|
|
28
28
|
import { c as AiTaskRunner, o as AiTaskRun, r as AiTask } from "../ai-schedules-7uQNMXve.js";
|
|
29
|
-
import { Ht as GeneratorModel, Qt as ResolvedConfig, jt as Generator, zt as GeneratorInput } from "../context-
|
|
29
|
+
import { Ht as GeneratorModel, Qt as ResolvedConfig, jt as Generator, zt as GeneratorInput } from "../context-CMf4OKpN.js";
|
|
30
30
|
import { r as WebhookInput } from "../signatures-Dkx9OE8j.js";
|
|
31
31
|
import { n as Payment, o as PaymentProvider } from "../payments-BYcN34Fp.js";
|
|
32
32
|
import { t as NotificationChannel } from "../channel-JcMd5lNP.js";
|
|
@@ -36,8 +36,8 @@ import { p as ShippingProvider, s as ShipmentAddress } from "../carrier-KzeYXVrW
|
|
|
36
36
|
import { L as WorkflowGraph, c as GraphCompiler, i as BuilderStarter, r as BuilderStartCall } from "../types-yj8VF4oY.js";
|
|
37
37
|
import { O as IncomingDestination, f as WebhookSecretStore, o as WebhookSigner, v as WebhookTransport } from "../signers-BKgmVh6A.js";
|
|
38
38
|
import { t as ApiModel } from "../model-hwpvole9.js";
|
|
39
|
-
import { t as EveDocumentBackend } from "../eve-B7jxYPCw.js";
|
|
40
39
|
import { l as VersionOf, t as AnyDocumentFormat } from "../format-u-65igKI.js";
|
|
40
|
+
import { t as EveDocumentBackend } from "../eve-B7jxYPCw.js";
|
|
41
41
|
import { SupabaseClient } from "@supabase/supabase-js";
|
|
42
42
|
import { Message, StateAdapter } from "chat";
|
|
43
43
|
import { webcrypto } from "node:crypto";
|
package/dist/testing/index.js
CHANGED
|
@@ -6,13 +6,15 @@ import { t as temporal } from "../temporal-required-DcLhnDhQ.js";
|
|
|
6
6
|
import { a as ok } from "../result-ntFBW2p2.js";
|
|
7
7
|
import { t as BetterSupabase } from "../define-D-dLADd5.js";
|
|
8
8
|
import { a as toBase64Url, r as fromBase64, t as base64ToText } from "../base64-B9Wlsdj7.js";
|
|
9
|
-
import { c as resolveConfig } from "../config-
|
|
10
|
-
import { a as isScopeName, c as templateFunctions, l as templatePlaceholders, n as TEMPLATE_PLACEHOLDERS, s as scopeProblems, u as templateProblems } from "../access-sql-
|
|
9
|
+
import { c as resolveConfig } from "../config-RwpFcPq8.js";
|
|
10
|
+
import { a as isScopeName, c as templateFunctions, l as templatePlaceholders, n as TEMPLATE_PLACEHOLDERS, s as scopeProblems, u as templateProblems } from "../access-sql-bjWFUWlk.js";
|
|
11
11
|
import { r as TRACKING_STATUSES, t as LABEL_FORMATS } from "../statuses-zRcc2TeZ.js";
|
|
12
12
|
import { i as seedLite, n as loadLite, r as migrateLite, t as LITE_INSTALL } from "../runtime-CoKxZibd.js";
|
|
13
|
+
import { t as buildApiModel } from "../build-CH2N3Yf0.js";
|
|
14
|
+
import { t as onBlockEvent } from "../block-event-listener-Bu6G0TFH.js";
|
|
15
|
+
import { toCloudEvents } from "../events/index.js";
|
|
13
16
|
import { ENV_VARIABLES } from "../env/index.js";
|
|
14
17
|
import { t as defineController } from "../controller-BEliOBOv.js";
|
|
15
|
-
import { t as onBlockEvent } from "../block-event-listener-Bu6G0TFH.js";
|
|
16
18
|
import { H as rawError } from "../block-helpers-B0f0ZVb5.js";
|
|
17
19
|
import "../replicas-Dyoh3CEg.js";
|
|
18
20
|
import { i as defineAuthorizer, r as checkPermission, s as requestOf } from "../authorizer-BGhXaDmo.js";
|
|
@@ -22,14 +24,12 @@ import { n as parseDbStats } from "../timing-dypS0nxW.js";
|
|
|
22
24
|
import { r as subjectKey } from "../block-subjects-DFSuFY1a.js";
|
|
23
25
|
import { t as organizationsEvents } from "../events-DuLhzjP6.js";
|
|
24
26
|
import { t as mailHeaders } from "../delivery-Bm0jxmzI.js";
|
|
25
|
-
import { toCloudEvents } from "../events/index.js";
|
|
26
27
|
import { c as isMoney, d as money, l as isRate } from "../money-BZl985O-.js";
|
|
27
28
|
import { t as SHIPPING_LINE } from "../tax-BkCNWWMc.js";
|
|
28
29
|
import { t as trashExtension } from "../extension-DzCc0IOd.js";
|
|
29
30
|
import { t as membershipsExtension } from "../extension-DeAd_MqI.js";
|
|
30
31
|
import { t as createdByExtension } from "../extension-DTaHjwdc.js";
|
|
31
32
|
import { t as updatedAtExtension } from "../extension-mGylYROs.js";
|
|
32
|
-
import { t as buildApiModel } from "../build-CM8PJqwW.js";
|
|
33
33
|
import { createClient } from "@supabase/supabase-js";
|
|
34
34
|
import { existsSync } from "node:fs";
|
|
35
35
|
import { readFile } from "node:fs/promises";
|
|
@@ -3,11 +3,11 @@ import { a as ok, r as err, t as AsyncResult } from "./result-ntFBW2p2.js";
|
|
|
3
3
|
import { t as toApp } from "./casing-DdFWEtqr.js";
|
|
4
4
|
import { a as tenantClaimPaths } from "./claims-Bp9My7XP.js";
|
|
5
5
|
import { a as sqlString, i as sqlIdent, n as parseTemplate, r as slug, t as claimSql } from "./template-Drgg3v2J.js";
|
|
6
|
-
import { a as isScopeName, i as fillTemplate, o as resolveProviderSql, r as accessCheck } from "./access-sql-
|
|
6
|
+
import { a as isScopeName, i as fillTemplate, o as resolveProviderSql, r as accessCheck } from "./access-sql-bjWFUWlk.js";
|
|
7
|
+
import { t as topicStatus } from "./realtime-status-asHvhiOh.js";
|
|
7
8
|
import { t as refreshRealtimeAuth } from "./auth-DyF_LRxd.js";
|
|
8
9
|
import { t as joinTopic } from "./channels-CfcFPuo_.js";
|
|
9
10
|
import { t as allowedSubscribers } from "./subscribers-BvZxcd63.js";
|
|
10
|
-
import { t as topicStatus } from "./realtime-status-asHvhiOh.js";
|
|
11
11
|
//#region src/realtime/fan-out.ts
|
|
12
12
|
/** Runs the policy, then `send` for each subscriber it keeps, one at a time. */
|
|
13
13
|
function fanOutTopic(fallback, options, send) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { D as ValidationIssue, b as DbError, t as AsyncResult } from "./result-DZeA5KS6.js";
|
|
2
2
|
import { D as AccessTopicPolicy, O as AnyFunctions, it as Row, k as AnyModels, ut as TableKey } from "./types-DFdg_4yN.js";
|
|
3
|
-
import { t as AuthorizationFunctions } from "./authorization-
|
|
3
|
+
import { t as AuthorizationFunctions } from "./authorization-Dtwpjeuz.js";
|
|
4
4
|
import { t as BetterSupabase } from "./define-Lf6rI2QN.js";
|
|
5
5
|
import { et as TemplateParams, tt as TemplateValues } from "./bucket-vc-QRrva.js";
|
|
6
6
|
import { g as SubscriberPolicy, h as SubscriberEvent, i as AuthorizationHooks, m as Subscriber } from "./authorization-hooks-D_pwXlBs.js";
|