better-supabase 0.22.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/ai-sdk/agents/index.d.ts +2 -2
- package/dist/{app-tables-BGzdnQm5.d.ts → app-tables-CJO6pWwy.d.ts} +1 -1
- 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/ai-chat/index.d.ts +3 -3
- package/dist/blocks/announcements/index.d.ts +3 -3
- package/dist/blocks/api-keys/index.d.ts +1 -1
- package/dist/blocks/attachments/index.d.ts +1 -1
- package/dist/blocks/audit/index.d.ts +2 -2
- package/dist/blocks/automations/index.d.ts +1 -1
- package/dist/blocks/billing/index.d.ts +1 -1
- package/dist/blocks/bookings/index.d.ts +1 -1
- package/dist/blocks/calendar/index.d.ts +5 -1
- package/dist/blocks/calendar/index.js +6 -3
- package/dist/blocks/comments/index.d.ts +4 -4
- package/dist/blocks/custom-fields/index.d.ts +43 -1
- package/dist/blocks/custom-fields/index.js +40 -1
- package/dist/blocks/drive/index.d.ts +1 -1
- package/dist/blocks/employees/index.d.ts +4 -0
- package/dist/blocks/employees/index.js +1 -1
- package/dist/blocks/entitlements/index.d.ts +2 -2
- package/dist/blocks/forms/index.d.ts +1 -1
- package/dist/blocks/inbox/index.d.ts +4 -4
- package/dist/blocks/index.d.ts +1 -1
- package/dist/blocks/messaging/index.d.ts +4 -4
- package/dist/blocks/mfa/index.d.ts +1 -1
- package/dist/blocks/notifications/index.d.ts +3 -3
- package/dist/blocks/onboarding/index.d.ts +1 -1
- package/dist/blocks/organizations/index.d.ts +2 -2
- package/dist/blocks/permissions/index.d.ts +1 -1
- package/dist/blocks/push/index.d.ts +1 -1
- package/dist/blocks/reactions/index.d.ts +3 -3
- package/dist/blocks/saved-views/index.d.ts +1 -1
- package/dist/blocks/search/index.d.ts +4 -2
- package/dist/blocks/search/index.js +2 -0
- package/dist/blocks/sessions/index.d.ts +1 -1
- package/dist/blocks/settings/index.d.ts +1 -1
- package/dist/blocks/share-links/index.d.ts +28 -3
- package/dist/blocks/share-links/index.js +58 -22
- package/dist/blocks/subjects/index.d.ts +1 -1
- package/dist/blocks/tags/index.d.ts +18 -3
- package/dist/blocks/tags/index.js +15 -2
- package/dist/blocks/teams/index.d.ts +26 -4
- package/dist/blocks/teams/index.js +10 -3
- package/dist/blocks/time-tracking/index.d.ts +18 -0
- package/dist/blocks/time-tracking/index.js +12 -3
- package/dist/blocks/undo/index.d.ts +1 -1
- package/dist/blocks/usage/index.d.ts +1 -1
- package/dist/blocks/workflow-editor/index.d.ts +3 -3
- package/dist/blocks/workflows/index.d.ts +3 -3
- package/dist/cli/{add-BXFzr0Wf.js → add-C7lKQNBL.js} +11 -11
- package/dist/cli/{add-B6CQOt3A.js → add-DVHniZOO.js} +2 -2
- package/dist/cli/add-vZRn-uH0.js +1 -0
- package/dist/cli/{backfill-Dflp6JZk.js → backfill-Lrn-Qp5X.js} +3 -3
- package/dist/cli/bin.js +1 -1
- package/dist/cli/{blocks-CBH3N7Fy.js → blocks-2Yw9t-_U.js} +1 -1
- package/dist/cli/{blocks-FtOIcUbu.js → blocks-BKNd886C.js} +1 -1
- package/dist/cli/{cache-61VwYKEv.js → cache-ByhPVMo-.js} +1 -1
- package/dist/cli/{codemod-CqPRa25J.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-DGQQY5IA.js → content-mapper-qH-_YQ8H.js} +2 -2
- package/dist/cli/{db-DCeyHS1y.js → db-DwjyUbAh.js} +2 -2
- package/dist/cli/{doctor-BxxSO193.js → doctor-BnxkqXGA.js} +16 -16
- package/dist/cli/{gen-D2cqqqTH.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-BnG1IE1y.js → init-DWUqVSVW.js} +6 -6
- package/dist/cli/{live-D26OWOAb.js → live-KcdTBUij.js} +2 -2
- package/dist/cli/{mcp-1l3C_GdB.js → mcp-Dsjjo-LT.js} +2 -2
- package/dist/cli/{metadata-DDfPBHwI.js → metadata-DWQSIZ59.js} +3 -3
- package/dist/cli/{migration-safety-CQbrfZIx.js → migration-safety-Cy7xlU4G.js} +2 -2
- package/dist/cli/{migrations-Ch5Uuvyj.js → migrations-CUjNXokR.js} +1 -1
- package/dist/cli/{module-migration-Dul1uTYX.js → module-migration-C6NLY9iZ.js} +2 -2
- package/dist/cli/powersync-BOhjVQCb.js +1 -0
- package/dist/cli/{powersync-CfT-tRx1.js → powersync-CE_hQdgc.js} +2 -2
- package/dist/cli/{print-CbPT4PTL.js → print-Cy_ram9N.js} +2 -2
- package/dist/cli/{remove-kDH1yxKZ.js → remove-DmwjzqaW.js} +5 -5
- package/dist/cli/{render-0Vd7BaNA.js → render-CF09FCra.js} +7 -4
- package/dist/cli/{run-DxTd55Ug.js → run-BYpZ8FjF.js} +25 -25
- package/dist/cli/{run-Dafms0D2.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-BQAMXvwd.js → shared-D05A6t1e.js} +1 -1
- package/dist/cli/{snapshot-B8K6gYjA.js → snapshot-BITNbA5V.js} +3 -3
- package/dist/cli/{source-CXDyCWz5.js → source-GGJHuzpH.js} +1 -1
- package/dist/cli/{source-args-z-jkabmO.js → source-args-CDmmFmFG.js} +1 -1
- package/dist/cli/{spec-BGsnTkIl.js → spec-BGcRdlhN.js} +2 -2
- package/dist/cli/{spec-CaN7nOqI.js → spec-BjxXWaNQ.js} +1 -1
- package/dist/cli/{sql-layout-BGAlcp1U.js → sql-layout-BoD5ynN9.js} +2 -2
- package/dist/cli/{sync-CT_5VG0E.js → sync-_QlsTmqu.js} +3 -3
- package/dist/cli/{upgrade-frUtPDDb.js → upgrade-Cwhb1M7O.js} +4 -4
- package/dist/cli/{upgrade-DA7aO88E.js → upgrade-n9ar1kc4.js} +2 -2
- package/dist/cli/{version-CUdPyV6J.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/config/index.d.ts +4 -4
- package/dist/config/index.js +4 -4
- package/dist/{config-CH-D2B-4.js → config-RwpFcPq8.js} +3 -3
- package/dist/{config-C9AOcQ9S.js → config-vHLJ8SKf.js} +1 -1
- package/dist/{context-DEisra3V.d.ts → context-CMf4OKpN.d.ts} +57 -13
- package/dist/{controller-B6vWdKSa.d.ts → controller-BGto_kYM.d.ts} +1 -1
- package/dist/create/index.d.ts +3 -3
- package/dist/create/index.js +3 -3
- package/dist/create/lite/index.d.ts +3 -3
- package/dist/create/lite/index.js +2 -2
- package/dist/{entitlements-BPaPd3MD.d.ts → entitlements-CIhVQ-0u.d.ts} +1 -1
- package/dist/{field-errors-DBgDCITw.d.ts → field-errors-BDhPaO0a.d.ts} +4 -4
- package/dist/{index-ByF22_C6.d.ts → index--OhYKouV.d.ts} +2 -2
- package/dist/{index-CM2aGNRo.d.ts → index-4MStWaeF.d.ts} +185 -7
- package/dist/{index-3p_oWttZ.d.ts → index-CFWlHuVY.d.ts} +1 -1
- 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/{instances-CK0jR3Pc.js → instances-BPJSESPx.js} +29 -8
- package/dist/mapper/bin.js +6 -6
- package/dist/mcp/index.d.ts +1 -1
- package/dist/next/index.d.ts +3 -3
- 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/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 +3 -3
- package/dist/preset/index.js +3 -3
- package/dist/{preset-CS490mYJ.js → preset-B1xXOJ0T.js} +2 -2
- package/dist/{project-NmP1NdLi.js → project-BM6QMtzV.js} +5 -5
- 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/native/index.d.ts +1 -1
- package/dist/react/server.d.ts +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/{resolved-names-DdlJzoMK.js → resolved-names-WzRYhUez.js} +1 -1
- package/dist/server/index.d.ts +1 -1
- package/dist/solid/index.d.ts +5 -5
- package/dist/sql/index.d.ts +5 -5
- package/dist/sql/index.js +5 -5
- package/dist/{sql-BMXEHTvr.js → sql-CNH8kjLS.js} +2712 -954
- 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/{tenant-BHvMFNXl.d.ts → tenant-D4BA7XQ-.d.ts} +1 -1
- package/dist/testing/index.d.ts +3 -3
- package/dist/testing/index.js +2 -2
- package/dist/{topic-DClSoqY7.js → topic-F0FKzJyQ.js} +1 -1
- package/dist/{topic-gTVjLGTk.d.ts → topic-utZqhw96.d.ts} +1 -1
- package/dist/{types-BC1HLEVx.d.ts → types-DLnBJ3ST.d.ts} +2 -2
- package/dist/vue/index.d.ts +5 -5
- 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-w_HumDPX.js +0 -1
- package/dist/cli/powersync-Vmhw5c1N.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/create/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { k as APP_ON_DELETE_ACTIONS } from "../instances-
|
|
2
|
-
import { m as diffDesigns } from "../preset-
|
|
3
|
-
import { $ as tableWithComputed, A as referenceFrom, B as withDesign, C as duplicateTable, D as isAppTable, E as identifierError, F as setTableId, G as filterColumns, H as computedColumnRenamed, I as singular, J as lookupSources, K as fittedRollup, L as tidy, M as renameTable, N as setColumn, O as isEmptyDesign, P as setExtraColumn, Q as rollupSources, R as updateTable, S as deleteTable, T as freeTableName, U as computedRows, V as ROLLUP_AGGREGATES, W as computedTableRenamed, X as readableColumns, Y as prunedComputed, Z as rollupColumns, _ as columnError, a as parseSchema, at as boundError, b as deleteColumn, c as tenantColumnOf, ct as fitted, d as previewFiles, dt as takesBounds, et as tableWithoutComputed, f as designIssues, ft as withBounds, g as appTableId, h as addTable, i as keyColumnsOf, it as subjectTypeError, j as renameColumn, k as moveTables, l as schemaData, lt as lockedWithoutDefault, m as EMPTY_DESIGN, n as loadProject, nt as subjectColumns, o as schemaRelations, ot as columnLabel, p as APP_MODULE, q as isRollupAggregate, r as checkDesign, rt as subjectColumnsEdited, s as tableStatements, st as encryptable, t as checkProject, tt as eventsColumnsEdited, u as previewAccessProvider, ut as optionError, v as connect, w as editTable, x as deleteExtraColumn, y as defaultError, z as userConnection } from "../project-
|
|
1
|
+
import { k as APP_ON_DELETE_ACTIONS } from "../instances-BPJSESPx.js";
|
|
2
|
+
import { m as diffDesigns } from "../preset-B1xXOJ0T.js";
|
|
3
|
+
import { $ as tableWithComputed, A as referenceFrom, B as withDesign, C as duplicateTable, D as isAppTable, E as identifierError, F as setTableId, G as filterColumns, H as computedColumnRenamed, I as singular, J as lookupSources, K as fittedRollup, L as tidy, M as renameTable, N as setColumn, O as isEmptyDesign, P as setExtraColumn, Q as rollupSources, R as updateTable, S as deleteTable, T as freeTableName, U as computedRows, V as ROLLUP_AGGREGATES, W as computedTableRenamed, X as readableColumns, Y as prunedComputed, Z as rollupColumns, _ as columnError, a as parseSchema, at as boundError, b as deleteColumn, c as tenantColumnOf, ct as fitted, d as previewFiles, dt as takesBounds, et as tableWithoutComputed, f as designIssues, ft as withBounds, g as appTableId, h as addTable, i as keyColumnsOf, it as subjectTypeError, j as renameColumn, k as moveTables, l as schemaData, lt as lockedWithoutDefault, m as EMPTY_DESIGN, n as loadProject, nt as subjectColumns, o as schemaRelations, ot as columnLabel, p as APP_MODULE, q as isRollupAggregate, r as checkDesign, rt as subjectColumnsEdited, s as tableStatements, st as encryptable, t as checkProject, tt as eventsColumnsEdited, u as previewAccessProvider, ut as optionError, v as connect, w as editTable, x as deleteExtraColumn, y as defaultError, z as userConnection } from "../project-BM6QMtzV.js";
|
|
4
4
|
//#region src/create/column-kinds.ts
|
|
5
5
|
/** The groups of the column type picker, in the order it shows them. */
|
|
6
6
|
const KIND_GROUPS = [
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ot as SchemaMeta } from "../../types-DFdg_4yN.js";
|
|
2
|
-
import { ht as PresetInput } from "../../context-
|
|
3
|
-
import { E as CreateDesign } from "../../index-
|
|
4
|
-
import { Tt as Issue, t as PresetMigrationFile, u as Design } from "../../types-
|
|
2
|
+
import { ht as PresetInput } from "../../context-CMf4OKpN.js";
|
|
3
|
+
import { E as CreateDesign } from "../../index-CFWlHuVY.js";
|
|
4
|
+
import { Tt as Issue, t as PresetMigrationFile, u as Design } from "../../types-DLnBJ3ST.js";
|
|
5
5
|
import { c as SpecDiagnostic } from "../../format-u-65igKI.js";
|
|
6
6
|
//#region src/lite/runtime.d.ts
|
|
7
7
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { y as appDefaultError } from "../../instances-
|
|
2
|
-
import { n as loadProject } from "../../project-
|
|
1
|
+
import { y as appDefaultError } from "../../instances-BPJSESPx.js";
|
|
2
|
+
import { n as loadProject } from "../../project-BM6QMtzV.js";
|
|
3
3
|
import { n as loadLite, t as LITE_INSTALL } from "../../runtime-CoKxZibd.js";
|
|
4
4
|
import { t as defineApi } from "../../api-3C0AWFeP.js";
|
|
5
5
|
//#region src/create/lite/apply.ts
|
|
@@ -5,10 +5,10 @@ import { mt as QuerySpec } from "./define-Lf6rI2QN.js";
|
|
|
5
5
|
import { tt as TemplateValues } from "./bucket-vc-QRrva.js";
|
|
6
6
|
import { n as DataEngine } from "./data-engine-BWoz9lED.js";
|
|
7
7
|
import { Dn as GeneratedBlocks } from "./define-block-DCAiOrNX.js";
|
|
8
|
-
import { _ as TopicMessage, c as RealtimeClient, d as SubscribeOptions, i as PresenceOptions, s as PresenceSubscription } from "./topic-
|
|
9
|
-
import { t as ClientPorts } from "./ports-
|
|
10
|
-
import { a as ClientAuth } from "./bind-
|
|
11
|
-
import { a as LiveSource, r as LiveCountSeed } from "./index
|
|
8
|
+
import { _ as TopicMessage, c as RealtimeClient, d as SubscribeOptions, i as PresenceOptions, s as PresenceSubscription } from "./topic-utZqhw96.js";
|
|
9
|
+
import { t as ClientPorts } from "./ports-DbHiNSAa.js";
|
|
10
|
+
import { a as ClientAuth } from "./bind-DaoTunvE.js";
|
|
11
|
+
import { a as LiveSource, r as LiveCountSeed } from "./index--OhYKouV.js";
|
|
12
12
|
import { SupabaseClient } from "@supabase/supabase-js";
|
|
13
13
|
import { QueryClient } from "@tanstack/query-core";
|
|
14
14
|
import { StandardSchemaV1 } from "@standard-schema/spec";
|
|
@@ -2,8 +2,8 @@ import { b as DbError, f as Result } from "./result-DZeA5KS6.js";
|
|
|
2
2
|
import { $ as RecordRef, ot as SchemaMeta } from "./types-DFdg_4yN.js";
|
|
3
3
|
import { mt as QuerySpec } from "./define-Lf6rI2QN.js";
|
|
4
4
|
import { t as DataChanges } from "./data-engine-BWoz9lED.js";
|
|
5
|
-
import { c as RealtimeClient, m as Topic, p as SubscriptionStatus } from "./topic-
|
|
6
|
-
import { n as TopicPort } from "./watch-topic-
|
|
5
|
+
import { c as RealtimeClient, m as Topic, p as SubscriptionStatus } from "./topic-utZqhw96.js";
|
|
6
|
+
import { n as TopicPort } from "./watch-topic-B1UCoQfz.js";
|
|
7
7
|
import { StandardSchemaV1 } from "@standard-schema/spec";
|
|
8
8
|
//#region src/realtime/relay.d.ts
|
|
9
9
|
/** The `EventSource` the relay client reads with; the browser's fits. */
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { E as AccessPolicySql } from "./types-DFdg_4yN.js";
|
|
2
|
-
import { p as AnyBlocksConfig, t as AuthorizationFunctions } from "./authorization-
|
|
2
|
+
import { p as AnyBlocksConfig, t as AuthorizationFunctions } from "./authorization-Dtwpjeuz.js";
|
|
3
3
|
import { nt as ReadSet } from "./define-Lf6rI2QN.js";
|
|
4
|
-
import { E as TableGrant, Qt as ResolvedConfig, _ as BlockSqlDeprecation, b as BlockSqlLayout, c as BlockSqlIdType, g as BlockSqlAccessProvider, h as BlockSql, hr as AppTableConfig, jr as CatalogPolicy, o as BlockSqlContractFunction, v as BlockSqlEntitlementsProvider, y as BlockSqlFile } from "./context-
|
|
5
|
-
import { t as SubjectConfig } from "./subjects-
|
|
4
|
+
import { E as TableGrant, Qt as ResolvedConfig, _ as BlockSqlDeprecation, b as BlockSqlLayout, c as BlockSqlIdType, g as BlockSqlAccessProvider, h as BlockSql, hr as AppTableConfig, jr as CatalogPolicy, o as BlockSqlContractFunction, v as BlockSqlEntitlementsProvider, y as BlockSqlFile } from "./context-CMf4OKpN.js";
|
|
5
|
+
import { t as SubjectConfig } from "./subjects-NomQg6Eg.js";
|
|
6
6
|
//#region src/sql/render.d.ts
|
|
7
7
|
/** A module's SQL for `layout`, without header; `undefined` in custom mode. */
|
|
8
8
|
declare function moduleBody(name: string, layout?: BlockSqlLayout): string | undefined;
|
|
@@ -542,17 +542,17 @@ declare const scopePolicyName: (table: {
|
|
|
542
542
|
declare const TENANT_SCOPE_POLICY = "bsb_tenant_scope";
|
|
543
543
|
//#endregion
|
|
544
544
|
//#region src/sql/policy-cover.d.ts
|
|
545
|
-
type PolicyCommand = "select" | "insert" | "update" | "delete";
|
|
545
|
+
type PolicyCommand$1 = "select" | "insert" | "update" | "delete";
|
|
546
546
|
/**
|
|
547
547
|
* The commands `block` grants beyond the app's permissive policies: the app has
|
|
548
548
|
* a policy for the command and none of them covers the block's. A command the
|
|
549
549
|
* app has no policy for is the block's to grant.
|
|
550
550
|
*/
|
|
551
|
-
declare function widenedCommands(block: CatalogPolicy, apps: readonly CatalogPolicy[]): PolicyCommand[];
|
|
551
|
+
declare function widenedCommands(block: CatalogPolicy, apps: readonly CatalogPolicy[]): PolicyCommand$1[];
|
|
552
552
|
declare function appTablePolicyNotes(sql: string): {
|
|
553
553
|
readonly table: string;
|
|
554
554
|
readonly policy: string;
|
|
555
|
-
readonly commands: readonly PolicyCommand[];
|
|
555
|
+
readonly commands: readonly PolicyCommand$1[];
|
|
556
556
|
}[];
|
|
557
557
|
/**
|
|
558
558
|
* The policies `sources` leave on each `schema.table` in `schemas`, in order: a
|
|
@@ -563,4 +563,182 @@ declare function declaredPolicies(sources: readonly {
|
|
|
563
563
|
readonly text: string;
|
|
564
564
|
}[], schemas: readonly string[]): Record<string, CatalogPolicy[]>;
|
|
565
565
|
//#endregion
|
|
566
|
-
|
|
566
|
+
//#region src/sql/policy.d.ts
|
|
567
|
+
/** A command a policy applies to. */
|
|
568
|
+
type PolicyCommand = "all" | "select" | "insert" | "update" | "delete";
|
|
569
|
+
/**
|
|
570
|
+
* One row level security policy (ADR 0103). `table` is `schema.table`,
|
|
571
|
+
* unquoted; a name without a schema is in `public`. `roles` lists the roles it
|
|
572
|
+
* applies to, `["public"]` when the statement names none.
|
|
573
|
+
*/
|
|
574
|
+
interface Policy {
|
|
575
|
+
readonly table: string;
|
|
576
|
+
readonly name: string;
|
|
577
|
+
readonly command: PolicyCommand;
|
|
578
|
+
readonly roles: readonly string[];
|
|
579
|
+
readonly permissive: boolean;
|
|
580
|
+
readonly using: string | null;
|
|
581
|
+
readonly check: string | null;
|
|
582
|
+
}
|
|
583
|
+
/** What `policy()` takes: only the table and the name are required. */
|
|
584
|
+
interface PolicyInput {
|
|
585
|
+
readonly table: string;
|
|
586
|
+
readonly name: string;
|
|
587
|
+
readonly command?: PolicyCommand;
|
|
588
|
+
readonly roles?: readonly string[];
|
|
589
|
+
readonly permissive?: boolean;
|
|
590
|
+
readonly using?: string | null;
|
|
591
|
+
readonly check?: string | null;
|
|
592
|
+
}
|
|
593
|
+
/** A policy with the defaults Postgres uses: `for all to public`, permissive. */
|
|
594
|
+
declare function policy(input: PolicyInput): Policy;
|
|
595
|
+
/** The catalog shape of `policy`, without its table. */
|
|
596
|
+
declare function catalogPolicy(entry: Policy): CatalogPolicy;
|
|
597
|
+
interface RenderPolicyOptions {
|
|
598
|
+
/** A `drop policy if exists` line before the `create policy`. */
|
|
599
|
+
readonly drop?: boolean;
|
|
600
|
+
/** The table as the caller writes it, instead of the quoted `schema.table`. */
|
|
601
|
+
readonly target?: string;
|
|
602
|
+
}
|
|
603
|
+
/**
|
|
604
|
+
* The `create policy` statement for `entry`, in the layout the block modules
|
|
605
|
+
* use: the header on one line, then `for`, `using` and `with check` on their
|
|
606
|
+
* own lines, ending with a semicolon.
|
|
607
|
+
*/
|
|
608
|
+
declare function renderPolicy(entry: Policy, options?: RenderPolicyOptions): string;
|
|
609
|
+
interface MaskOptions {
|
|
610
|
+
/**
|
|
611
|
+
* `"scan"` leaves the text of dollar-quoted bodies as code, so a scan finds
|
|
612
|
+
* the statements a `do` block or a function runs. Default: they are blanked.
|
|
613
|
+
*/
|
|
614
|
+
readonly dollarBodies?: "mask" | "scan";
|
|
615
|
+
}
|
|
616
|
+
/**
|
|
617
|
+
* `sql` with the text of comments, string literals, dollar-quoted bodies and
|
|
618
|
+
* quoted identifiers blanked, so a scan for keywords and parentheses can't
|
|
619
|
+
* match inside them. Offsets stay the same; line breaks stay.
|
|
620
|
+
*/
|
|
621
|
+
declare function maskSql(sql: string, options?: MaskOptions): string;
|
|
622
|
+
/** A policy found in a script, with where its statement sits. */
|
|
623
|
+
interface ReadPolicy {
|
|
624
|
+
readonly policy: Policy;
|
|
625
|
+
/** The statement, from `create policy` to its semicolon, as written. */
|
|
626
|
+
readonly statement: string;
|
|
627
|
+
/** The `[start, end)` of the statement in the script. */
|
|
628
|
+
readonly span: readonly [number, number];
|
|
629
|
+
}
|
|
630
|
+
/**
|
|
631
|
+
* Every `create policy` statement of `sql`. Comments, string literals,
|
|
632
|
+
* dollar-quoted bodies and quoted names can't confuse the scan. A statement
|
|
633
|
+
* that isn't a well-formed `create policy` is skipped.
|
|
634
|
+
*/
|
|
635
|
+
declare function readPolicies(sql: string): ReadPolicy[];
|
|
636
|
+
/** The policy one `create policy` statement creates. */
|
|
637
|
+
declare function readPolicy(statement: string): Policy | undefined;
|
|
638
|
+
/** A grant of privileges on a table to roles. */
|
|
639
|
+
interface Grant {
|
|
640
|
+
/** `schema.table`, unquoted. */
|
|
641
|
+
readonly table: string;
|
|
642
|
+
readonly roles: readonly string[];
|
|
643
|
+
}
|
|
644
|
+
/** The table grants of `sql`, read past comments, strings and dollar quotes. */
|
|
645
|
+
declare function readGrants(sql: string): Grant[];
|
|
646
|
+
//#endregion
|
|
647
|
+
//#region src/sql/policy-rule.d.ts
|
|
648
|
+
/** A comparison a rule can make against a column. */
|
|
649
|
+
type RuleOperator = "=" | "<>" | "<" | "<=" | ">" | ">=";
|
|
650
|
+
type RuleValue = string | number | boolean;
|
|
651
|
+
/**
|
|
652
|
+
* The policy DSL: a small tree that renders to a policy over the four `bsb.*`
|
|
653
|
+
* functions and reads back from the `@bsb rule` comment.
|
|
654
|
+
*/
|
|
655
|
+
type Rule = {
|
|
656
|
+
readonly kind: "public";
|
|
657
|
+
} | {
|
|
658
|
+
readonly kind: "owner";
|
|
659
|
+
readonly column: string;
|
|
660
|
+
} | {
|
|
661
|
+
readonly kind: "member";
|
|
662
|
+
readonly column: string;
|
|
663
|
+
} | {
|
|
664
|
+
readonly kind: "can";
|
|
665
|
+
readonly column: string;
|
|
666
|
+
readonly permission: string;
|
|
667
|
+
} | {
|
|
668
|
+
readonly kind: "compare";
|
|
669
|
+
readonly column: string;
|
|
670
|
+
readonly op: RuleOperator;
|
|
671
|
+
readonly value: RuleValue;
|
|
672
|
+
} | {
|
|
673
|
+
readonly kind: "null";
|
|
674
|
+
readonly column: string;
|
|
675
|
+
readonly isNull: boolean;
|
|
676
|
+
} | {
|
|
677
|
+
readonly kind: "and";
|
|
678
|
+
readonly rules: readonly Rule[];
|
|
679
|
+
} | {
|
|
680
|
+
readonly kind: "or";
|
|
681
|
+
readonly rules: readonly Rule[];
|
|
682
|
+
} | {
|
|
683
|
+
readonly kind: "not";
|
|
684
|
+
readonly rule: Rule;
|
|
685
|
+
};
|
|
686
|
+
/** The only functions a policy may call. */
|
|
687
|
+
declare const POLICY_FUNCTIONS: readonly string[];
|
|
688
|
+
/** The SQL expression a rule renders to. */
|
|
689
|
+
declare function renderRule(rule: Rule): string;
|
|
690
|
+
/** Whether `value` is a well-formed rule tree. */
|
|
691
|
+
declare function isRule(value: unknown): value is Rule;
|
|
692
|
+
/** The input of a policy built from rules. */
|
|
693
|
+
interface RulePolicyInput extends Omit<PolicyInput, "using" | "check"> {
|
|
694
|
+
readonly using?: Rule;
|
|
695
|
+
readonly check?: Rule;
|
|
696
|
+
}
|
|
697
|
+
/** A policy and the rules it was built from. */
|
|
698
|
+
interface RulePolicy {
|
|
699
|
+
readonly policy: Policy;
|
|
700
|
+
readonly using: Rule | null;
|
|
701
|
+
readonly check: Rule | null;
|
|
702
|
+
}
|
|
703
|
+
/** Builds a policy from rule trees. */
|
|
704
|
+
declare function rulePolicy(input: RulePolicyInput): RulePolicy;
|
|
705
|
+
/**
|
|
706
|
+
* The statement for a rule policy, with the `-- @bsb rule` comment that
|
|
707
|
+
* {@link readRulePolicies} reads back.
|
|
708
|
+
*/
|
|
709
|
+
declare function renderRulePolicy(built: RulePolicy, options?: {
|
|
710
|
+
readonly drop?: boolean;
|
|
711
|
+
}): string;
|
|
712
|
+
/** A policy that carries a rule comment, with the rules recovered. */
|
|
713
|
+
interface ReadRulePolicy extends RulePolicy {
|
|
714
|
+
/** True when the SQL still renders from the rules, false once hand-edited. */
|
|
715
|
+
readonly inSync: boolean;
|
|
716
|
+
}
|
|
717
|
+
/**
|
|
718
|
+
* Policies in `sql` that carry an `@bsb rule` comment directly above them.
|
|
719
|
+
* `inSync` says whether the policy still matches what its rules render to.
|
|
720
|
+
*/
|
|
721
|
+
declare function readRulePolicies(sql: string): ReadRulePolicy[];
|
|
722
|
+
/**
|
|
723
|
+
* The functions a policy calls that are not in {@link POLICY_FUNCTIONS},
|
|
724
|
+
* lowercased and without spaces. An empty list means the policy only uses the
|
|
725
|
+
* `bsb.*` functions.
|
|
726
|
+
*/
|
|
727
|
+
declare function disallowedPolicyCalls(built: Policy): string[];
|
|
728
|
+
/** Options for {@link policyFunctionsSql}. */
|
|
729
|
+
interface PolicyFunctionsOptions {
|
|
730
|
+
/** Set-returning function that lists the caller's tenant ids. */
|
|
731
|
+
readonly memberships?: string;
|
|
732
|
+
/** Function `(scope, scope_id, permission)` that answers a permission. */
|
|
733
|
+
readonly permission?: string;
|
|
734
|
+
/** Scope name `bsb.can` passes to the permission function. */
|
|
735
|
+
readonly scope?: string;
|
|
736
|
+
}
|
|
737
|
+
/**
|
|
738
|
+
* The `bsb` schema and the four functions policies may call. `uid` and `owns`
|
|
739
|
+
* are fixed; `is_member` and `can` delegate to the functions named in the
|
|
740
|
+
* options, so a library or your own tables can answer them.
|
|
741
|
+
*/
|
|
742
|
+
declare function policyFunctionsSql(options?: PolicyFunctionsOptions): string;
|
|
743
|
+
//#endregion
|
|
744
|
+
export { extensionSchema as $, renderBlocks as $t, declaredPolicies as A, modulePermissionKeys as At, migrationOptionUses as B, entityRenamePlan as Bt, maskSql as C, instanceFunctions as Ct, readPolicy as D, BlockSqlPermissionKey as Dt, readPolicies as E, BlockSqlExtension as Et, CompiledReadSet as F, sameBlockFile as Ft, templateFunctions as G, BlockSqlUpgradePlan as Gt, SCOPE_ID_TYPES as H, currentBlockName as Ht, compileReadSet as I, moduleDataDir as It, declaredColumnTypes as J, upgradePlan as Jt, DeclaredView as K, InstalledBlock as Kt, compileReadSets as L, moduleFilePaths as Lt, TENANT_SCOPE_POLICY as M, blockFileState as Mt, scopePolicyName as N, isModuleDataFile as Nt, renderPolicy as O, moduleEventTriggers as Ot, hasColumnAccess as P, moduleFileVersion as Pt, declaredViews as Q, moduleTopics as Qt, sharedRolesProblems as R, EntityRenamePlan as Rt, catalogPolicy as S, DEFAULT_ROLES as St, readGrants as T, resolveBlocks as Tt, resolveProviderSql as U, formerBlockName as Ut, moduleLayout as V, BLOCK_RENAMES as Vt, scopeProblems as W, renamedBlock as Wt, declaredTables as X, customContracts as Xt, declaredTableColumns as Y, BlockSqlTopic as Yt, declaredUpdatedAtTriggers as Z, moduleBody as Zt, Policy as _, adoptedViews as _t, RuleOperator as a, expiredFlagsQuery as at, ReadPolicy as b, APP_TABLES_MODULE as bt, RuleValue as c, DataExportPlan as ct, policyFunctionsSql as d, excludedColumns as dt, policyGrants as et, readRulePolicies as f, resolveExposeColumns as ft, Grant as g, adoptedTables as gt, rulePolicy as h, adoptedColumnProblems as ht, Rule as i, tenantsQuery as it, widenedCommands as j, moduleSchemaExtensions as jt, appTablePolicyNotes as k, moduleHidingColumns as kt, disallowedPolicyCalls as l, SECRET_COLUMNS as lt, renderRulePolicy as m, AdoptedView as mt, PolicyFunctionsOptions as n, subjectColumns as nt, RulePolicy as o, sameTenantColumn as ot, renderRule as p, AdoptedTable as pt, PolicyGrant as q, moduleDeprecations as qt, ReadRulePolicy as r, TenantQuery as rt, RulePolicyInput as s, sameTenantTrigger as st, POLICY_FUNCTIONS as t, rlsTables as tt, isRule as u, dataExportPlan as ut, PolicyCommand as v, moduleWritesText as vt, policy as w, SQL_MODULES as wt, RenderPolicyOptions as x, appTablesFiles as xt, PolicyInput as y, APP_TABLES_MARKER as yt, MigrationOptionUse as z, EntityRenameStep as zt };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Pn as PresetSpec, St as ResolvedPreset, Wn as PresetName, br as AppTablesConfig, cr as AppColumnType, di as Preset, hr as AppTableConfig, oi as PresetGlueItem, or as AppColumnConfig, ri as PresetCatalog, vt as presetConfig } from "./context-
|
|
1
|
+
import { Pn as PresetSpec, St as ResolvedPreset, Wn as PresetName, br as AppTablesConfig, cr as AppColumnType, di as Preset, hr as AppTableConfig, oi as PresetGlueItem, or as AppColumnConfig, ri as PresetCatalog, vt as presetConfig } from "./context-CMf4OKpN.js";
|
|
2
2
|
import { StandardSchemaV1 } from "@standard-schema/spec";
|
|
3
3
|
//#region src/preset/catalog.generated.d.ts
|
|
4
4
|
declare const PRESET_CATALOG: PresetCatalog;
|
|
@@ -3,8 +3,8 @@ import { O as AnyFunctions, k as AnyModels } from "./types-DFdg_4yN.js";
|
|
|
3
3
|
import { l as PublicEnv } from "./index-NRMMhhEi.js";
|
|
4
4
|
import { g as SessionEncoding } from "./resolve-CXX6DHv3.js";
|
|
5
5
|
import { t as BetterSupabase } from "./define-Lf6rI2QN.js";
|
|
6
|
-
import { i as KeyboardPort, l as StoragePort, n as DeepLinkPort, r as FilePickerPort, s as PushTokenPort, t as ClientPorts } from "./ports-
|
|
7
|
-
import { i as BindClientOptions, r as BetterClient } from "./bind-
|
|
6
|
+
import { i as KeyboardPort, l as StoragePort, n as DeepLinkPort, r as FilePickerPort, s as PushTokenPort, t as ClientPorts } from "./ports-DbHiNSAa.js";
|
|
7
|
+
import { i as BindClientOptions, r as BetterClient } from "./bind-DaoTunvE.js";
|
|
8
8
|
import { n as FunctionContract } from "./function-contract-DxFNOmsm.js";
|
|
9
9
|
import { FunctionInvokeOptions, SupabaseClient, SupabaseClientOptions } from "@supabase/supabase-js";
|
|
10
10
|
//#region src/client/functions.d.ts
|
|
@@ -5,13 +5,13 @@ import { mt as QuerySpec } from "./define-Lf6rI2QN.js";
|
|
|
5
5
|
import { A as TtlPreset, C as TransformOptions, E as UrlOptions, T as UploadOptions, l as ImageTransform, tt as TemplateValues, w as UploadBody } from "./bucket-vc-QRrva.js";
|
|
6
6
|
import { m as RejectedChange, o as DataSyncState } from "./data-engine-BWoz9lED.js";
|
|
7
7
|
import { M as BindingName, S as RecordWriteInput, _ as RecordTypeBlocks, b as RecordTypeWriteInput, d as BindingWritesOf, f as Plain, g as RecordType, h as RecordCan, m as PlainBindings, x as RecordTypeWriteOutput } from "./index-ClvuSZEz.js";
|
|
8
|
-
import { c as RealtimeClient, d as SubscribeOptions, g as TopicHandlers, i as PresenceOptions, m as Topic, p as SubscriptionStatus, r as PresenceMember, s as PresenceSubscription, t as EventSchemas } from "./topic-
|
|
9
|
-
import { t as AuthSnapshot } from "./bind-
|
|
8
|
+
import { c as RealtimeClient, d as SubscribeOptions, g as TopicHandlers, i as PresenceOptions, m as Topic, p as SubscriptionStatus, r as PresenceMember, s as PresenceSubscription, t as EventSchemas } from "./topic-utZqhw96.js";
|
|
9
|
+
import { t as AuthSnapshot } from "./bind-DaoTunvE.js";
|
|
10
10
|
import { t as AuthSession } from "./view-DyFdMCqg.js";
|
|
11
|
-
import { r as LiveCountSeed, v as RelayClientOptions } from "./index
|
|
12
|
-
import { n as Controller } from "./controller-
|
|
13
|
-
import { D as ProfileOf, O as UseActionOptions, S as LiveCountHookOptions, _ as ActionResultOf, a as DataRows, b as ClaimsOf, c as DataWrites, d as BlockMutationState, f as BlockQueryActions, g as ActionInputOf, i as DataRow, l as BlockEventSource, m as BlockQueryState, n as DataId, o as DataSource, p as BlockQueryOptions, r as DataListArgs, s as DataState, u as BlockMutationActions, w as LiveQueryHookOptions, x as ClientLike, y as BroadcastOptions } from "./field-errors-
|
|
14
|
-
import { t as BlockEnv } from "./block-env-
|
|
11
|
+
import { r as LiveCountSeed, v as RelayClientOptions } from "./index--OhYKouV.js";
|
|
12
|
+
import { n as Controller } from "./controller-BGto_kYM.js";
|
|
13
|
+
import { D as ProfileOf, O as UseActionOptions, S as LiveCountHookOptions, _ as ActionResultOf, a as DataRows, b as ClaimsOf, c as DataWrites, d as BlockMutationState, f as BlockQueryActions, g as ActionInputOf, i as DataRow, l as BlockEventSource, m as BlockQueryState, n as DataId, o as DataSource, p as BlockQueryOptions, r as DataListArgs, s as DataState, u as BlockMutationActions, w as LiveQueryHookOptions, x as ClientLike, y as BroadcastOptions } from "./field-errors-BDhPaO0a.js";
|
|
14
|
+
import { t as BlockEnv } from "./block-env-DUyo2I5O.js";
|
|
15
15
|
import { n as BlockDataOf, r as BlockMethodName, t as BlockArgsOf } from "./block-method-CiVa2G-J.js";
|
|
16
16
|
import { s as RecordFormValues, t as RecordForm } from "./record-form-BbZpwsEi.js";
|
|
17
17
|
import { SupabaseClient } from "@supabase/supabase-js";
|
|
@@ -44,6 +44,7 @@ function resolveBlock(config = {}) {
|
|
|
44
44
|
schema: config.schema ?? MODULE_SCHEMA,
|
|
45
45
|
tables: defined(config.tables),
|
|
46
46
|
columns: Object.fromEntries(Object.entries(defined(config.columns)).map(([table, columns]) => [table, defined(columns)])),
|
|
47
|
+
...config.values === void 0 ? {} : { values: config.values },
|
|
47
48
|
...config.idType === void 0 ? {} : { idType: config.idType },
|
|
48
49
|
...config.scope === void 0 ? {} : { scope: config.scope },
|
|
49
50
|
ownTablePolicies: config.ownTablePolicies ?? "block",
|
|
@@ -1232,6 +1233,7 @@ const PRESET_CATALOG = {
|
|
|
1232
1233
|
"integrates": [
|
|
1233
1234
|
"outbox",
|
|
1234
1235
|
"drive",
|
|
1236
|
+
"subjects",
|
|
1235
1237
|
"bulk"
|
|
1236
1238
|
],
|
|
1237
1239
|
"manifest": "tags",
|
|
@@ -1291,7 +1293,8 @@ const PRESET_CATALOG = {
|
|
|
1291
1293
|
"integrates": [
|
|
1292
1294
|
"outbox",
|
|
1293
1295
|
"field-encryption",
|
|
1294
|
-
"audit"
|
|
1296
|
+
"audit",
|
|
1297
|
+
"subjects"
|
|
1295
1298
|
],
|
|
1296
1299
|
"manifest": "custom-fields",
|
|
1297
1300
|
"scopes": ["tenant"],
|
|
@@ -1329,7 +1332,11 @@ const PRESET_CATALOG = {
|
|
|
1329
1332
|
"title": "Share links",
|
|
1330
1333
|
"category": "collaboration",
|
|
1331
1334
|
"requires": ["memberships", "permissions"],
|
|
1332
|
-
"integrates": [
|
|
1335
|
+
"integrates": [
|
|
1336
|
+
"outbox",
|
|
1337
|
+
"versions",
|
|
1338
|
+
"subjects"
|
|
1339
|
+
],
|
|
1333
1340
|
"manifest": "share-links",
|
|
1334
1341
|
"scopes": ["tenant"],
|
|
1335
1342
|
"extraColumns": "links",
|
|
@@ -1355,7 +1362,8 @@ const PRESET_CATALOG = {
|
|
|
1355
1362
|
"useCount": "use_count",
|
|
1356
1363
|
"createdBy": "created_by",
|
|
1357
1364
|
"leaf": "leaf_id",
|
|
1358
|
-
"versionId": "version_id"
|
|
1365
|
+
"versionId": "version_id",
|
|
1366
|
+
"createdAt": "created_at"
|
|
1359
1367
|
}
|
|
1360
1368
|
} },
|
|
1361
1369
|
"keys": {
|
|
@@ -2500,7 +2508,8 @@ const PRESET_CATALOG = {
|
|
|
2500
2508
|
"note": "note",
|
|
2501
2509
|
"createdAt": "created_at",
|
|
2502
2510
|
"updatedAt": "updated_at",
|
|
2503
|
-
"seconds": "seconds"
|
|
2511
|
+
"seconds": "seconds",
|
|
2512
|
+
"runningSince": "running_since"
|
|
2504
2513
|
}
|
|
2505
2514
|
},
|
|
2506
2515
|
"timesheets": {
|
|
@@ -2514,7 +2523,11 @@ const PRESET_CATALOG = {
|
|
|
2514
2523
|
"note": "note",
|
|
2515
2524
|
"submittedAt": "submitted_at",
|
|
2516
2525
|
"approvedAt": "approved_at",
|
|
2517
|
-
"createdAt": "created_at"
|
|
2526
|
+
"createdAt": "created_at",
|
|
2527
|
+
"status": "status",
|
|
2528
|
+
"decidedBy": "decided_by",
|
|
2529
|
+
"decidedAt": "decided_at",
|
|
2530
|
+
"decisionNote": "decision_note"
|
|
2518
2531
|
}
|
|
2519
2532
|
}
|
|
2520
2533
|
},
|
|
@@ -7138,7 +7151,9 @@ const PRESET_CATALOG = {
|
|
|
7138
7151
|
{ "name": "CustomFieldsOptions" },
|
|
7139
7152
|
{ "name": "CustomFieldType" },
|
|
7140
7153
|
{ "name": "FieldDefinition" },
|
|
7141
|
-
{ "name": "FieldDefinitionDetail" }
|
|
7154
|
+
{ "name": "FieldDefinitionDetail" },
|
|
7155
|
+
{ "name": "FieldValue" },
|
|
7156
|
+
{ "name": "SetFieldInput" }
|
|
7142
7157
|
],
|
|
7143
7158
|
"events": {
|
|
7144
7159
|
"type": "CustomFieldsEvents",
|
|
@@ -7146,6 +7161,7 @@ const PRESET_CATALOG = {
|
|
|
7146
7161
|
"custom_field.saved",
|
|
7147
7162
|
"custom_field.deleted",
|
|
7148
7163
|
"field_value.set",
|
|
7164
|
+
"field_value.deleted",
|
|
7149
7165
|
"field_value.viewed"
|
|
7150
7166
|
]
|
|
7151
7167
|
}
|
|
@@ -13869,6 +13885,7 @@ const PRESET_CATALOG = {
|
|
|
13869
13885
|
"name": "CreateShareLinkOptions",
|
|
13870
13886
|
"fields": true
|
|
13871
13887
|
},
|
|
13888
|
+
{ "name": "FoundShareLink" },
|
|
13872
13889
|
{ "name": "ResolvedShareLink" },
|
|
13873
13890
|
{
|
|
13874
13891
|
"name": "ShareLink",
|
|
@@ -14124,6 +14141,7 @@ const PRESET_CATALOG = {
|
|
|
14124
14141
|
"consumes": {},
|
|
14125
14142
|
"provides": [],
|
|
14126
14143
|
"entityTypes": [
|
|
14144
|
+
{ "name": "CreateTeamOptions" },
|
|
14127
14145
|
{
|
|
14128
14146
|
"name": "Team",
|
|
14129
14147
|
"fields": true
|
|
@@ -14133,7 +14151,8 @@ const PRESET_CATALOG = {
|
|
|
14133
14151
|
"fields": true
|
|
14134
14152
|
},
|
|
14135
14153
|
{ "name": "TeamsEvents" },
|
|
14136
|
-
{ "name": "TeamsOptions" }
|
|
14154
|
+
{ "name": "TeamsOptions" },
|
|
14155
|
+
{ "name": "UpdateTeamOptions" }
|
|
14137
14156
|
],
|
|
14138
14157
|
"events": {
|
|
14139
14158
|
"type": "TeamsEvents",
|
|
@@ -14141,6 +14160,7 @@ const PRESET_CATALOG = {
|
|
|
14141
14160
|
"team.created",
|
|
14142
14161
|
"team.updated",
|
|
14143
14162
|
"team.archived",
|
|
14163
|
+
"team.restored",
|
|
14144
14164
|
"team.deleted",
|
|
14145
14165
|
"team_member.added",
|
|
14146
14166
|
"team_member.removed"
|
|
@@ -14248,7 +14268,8 @@ const PRESET_CATALOG = {
|
|
|
14248
14268
|
"time_entry.deleted",
|
|
14249
14269
|
"timesheet.submitted",
|
|
14250
14270
|
"timesheet.approved",
|
|
14251
|
-
"timesheet.reopened"
|
|
14271
|
+
"timesheet.reopened",
|
|
14272
|
+
"timesheet.rejected"
|
|
14252
14273
|
]
|
|
14253
14274
|
}
|
|
14254
14275
|
},
|
package/dist/mapper/bin.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { t as VERSION } from "../cli/version-
|
|
2
|
-
import { a as lastTypesModule, c as writeAtomic, s as typesModuleKey } from "../cli/cache-
|
|
3
|
-
import { t as loadSnapshot } from "../cli/snapshot-
|
|
4
|
-
import { i as renderTypesModule, t as mapperFilePath } from "../cli/render-
|
|
5
|
-
import { i as discoverConfig, s as loadConfig } from "../cli/config-
|
|
1
|
+
import { t as VERSION } from "../cli/version-RSpJIWDd.js";
|
|
2
|
+
import { a as lastTypesModule, c as writeAtomic, s as typesModuleKey } from "../cli/cache-ByhPVMo-.js";
|
|
3
|
+
import { t as loadSnapshot } from "../cli/snapshot-BITNbA5V.js";
|
|
4
|
+
import { i as renderTypesModule, t as mapperFilePath } from "../cli/render-CF09FCra.js";
|
|
5
|
+
import { i as discoverConfig, s as loadConfig } from "../cli/config-BVfeG3A5.js";
|
|
6
6
|
import { i as parseEnv, n as configEnvironment } from "../cli/env-DMgjB_4y.js";
|
|
7
|
-
import { s as schemaStampPath } from "../cli/content-mapper-
|
|
7
|
+
import { s as schemaStampPath } from "../cli/content-mapper-qH-_YQ8H.js";
|
|
8
8
|
import { existsSync, realpathSync } from "node:fs";
|
|
9
9
|
import { basename, dirname, join, resolve } from "node:path";
|
|
10
10
|
import { createHash } from "node:crypto";
|
package/dist/mcp/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { O as AnyFunctions, k as AnyModels, ut as TableKey } from "../types-DFdg_4yN.js";
|
|
2
|
-
import { t as OperationTable } from "../operations-
|
|
2
|
+
import { t as OperationTable } from "../operations-qSBBV5vl.js";
|
|
3
3
|
import { l as PermissionRef, t as AnyAuthorizer } from "../authorizer-B6X09otb.js";
|
|
4
4
|
import { t as BetterSupabase } from "../define-Lf6rI2QN.js";
|
|
5
5
|
import { a as ServerContext, c as ServerOptions, n as BetterServer } from "../server-types-BH6AjDBN.js";
|
package/dist/next/index.d.ts
CHANGED
|
@@ -8,15 +8,15 @@ import { n as Impersonator } from "../impersonation-YTa9dZUv.js";
|
|
|
8
8
|
import { n as AmrEntry, t as Aal } from "../mfa-oIOYTpvc.js";
|
|
9
9
|
import { S as BlockClientSource, on as RecordBindingOptions } from "../define-block-DCAiOrNX.js";
|
|
10
10
|
import { M as BindingName, N as BindingOf, S as RecordWriteInput, _ as RecordTypeBlocks, b as RecordTypeWriteInput, d as BindingWritesOf, f as Plain, g as RecordType, h as RecordCan, m as PlainBindings, x as RecordTypeWriteOutput } from "../index-ClvuSZEz.js";
|
|
11
|
-
import { t as tenantOf } from "../tenant-
|
|
11
|
+
import { t as tenantOf } from "../tenant-D4BA7XQ-.js";
|
|
12
12
|
import { n as toSession, t as AuthSession } from "../view-DyFdMCqg.js";
|
|
13
13
|
import { a as SupportPolicy, c as supportSessions, i as SupportOptions, o as SupportSessions, s as SupportStartRequest, t as ActiveSupport } from "../support-B4ZBVxt3.js";
|
|
14
14
|
import { t as AuthOutageHook } from "../session-Y5SSYO2C.js";
|
|
15
15
|
import { n as AuthKind, r as GuardOptions } from "../respond-oZeJ342J.js";
|
|
16
16
|
import { a as AuthorizedContext, c as ResourceLoaderContext, i as AuthorizeOptions, l as Unwrapped, n as ActionParsed, r as ActionResult, t as ActionInput } from "../kit-CVgQCIBO.js";
|
|
17
17
|
import { c as ListParseOptions, m as ListSearchParams } from "../list-query-XYfUZb0j.js";
|
|
18
|
-
import { r as LiveCountSeed, t as CountRunner } from "../index
|
|
19
|
-
import { r as MembershipClaim } from "../entitlements-
|
|
18
|
+
import { r as LiveCountSeed, t as CountRunner } from "../index--OhYKouV.js";
|
|
19
|
+
import { r as MembershipClaim } from "../entitlements-CIhVQ-0u.js";
|
|
20
20
|
import { i as ResourceContext, l as ResourceRouteOptions, o as ResourceHooks, r as ResourceAction, t as ActionArgs } from "../resource-types-DjZ91WKA.js";
|
|
21
21
|
import { t as ResourceMap } from "../resources-6Ncdt9XT.js";
|
|
22
22
|
import { t as defineAction } from "../resource-execute-CUG6xUuh.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as AuthorizationOperation } from "./authorization-
|
|
1
|
+
import { r as AuthorizationOperation } from "./authorization-Dtwpjeuz.js";
|
|
2
2
|
//#region src/core/operations.d.ts
|
|
3
3
|
/** Operations by name, as `authorization.operations` or a module's own defaults. */
|
|
4
4
|
type OperationTable = Readonly<Record<string, AuthorizationOperation>>;
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { n as blockOptions, r as option } from "./options-CfVPctAw.js";
|
|
2
2
|
//#region src/blocks/tags/options.ts
|
|
3
|
-
const tagsSqlOptions = blockOptions({
|
|
3
|
+
const tagsSqlOptions = blockOptions({
|
|
4
|
+
extraColumns: option.extraColumns(),
|
|
5
|
+
patch: option.boolean({ default: false })
|
|
6
|
+
});
|
|
4
7
|
//#endregion
|
|
5
8
|
export { tagsSqlOptions as t };
|
|
@@ -6,7 +6,9 @@ const timeTrackingSqlOptions = blockOptions({
|
|
|
6
6
|
default: "UTC",
|
|
7
7
|
client: true
|
|
8
8
|
}),
|
|
9
|
-
extraColumns: option.extraColumns()
|
|
9
|
+
extraColumns: option.extraColumns(),
|
|
10
|
+
approvals: option.boolean({ default: true }),
|
|
11
|
+
userTimeZone: option.unknown()
|
|
10
12
|
});
|
|
11
13
|
//#endregion
|
|
12
14
|
export { timeTrackingSqlOptions as t };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { n as blockOptions, r as option } from "./options-CfVPctAw.js";
|
|
2
|
+
//#region src/blocks/share-links/options.ts
|
|
3
|
+
const shareLinksSqlOptions = blockOptions({
|
|
4
|
+
extraColumns: option.extraColumns(),
|
|
5
|
+
tokenHash: option.boolean({ default: false }),
|
|
6
|
+
fullRows: option.boolean({ default: false })
|
|
7
|
+
});
|
|
8
|
+
//#endregion
|
|
9
|
+
export { shareLinksSqlOptions as t };
|
|
@@ -2,7 +2,9 @@ import { n as blockOptions, r as option } from "./options-CfVPctAw.js";
|
|
|
2
2
|
//#region src/blocks/employees/options.ts
|
|
3
3
|
const employeesSqlOptions = blockOptions({
|
|
4
4
|
employmentTypes: option.strings(),
|
|
5
|
-
extraColumns: option.extraColumns()
|
|
5
|
+
extraColumns: option.extraColumns(),
|
|
6
|
+
privateDetailsExtraColumns: option.extraColumns(),
|
|
7
|
+
contractExtraColumns: option.extraColumns()
|
|
6
8
|
});
|
|
7
9
|
//#endregion
|
|
8
10
|
export { employeesSqlOptions as t };
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { n as blockOptions, r as option } from "./options-CfVPctAw.js";
|
|
2
2
|
//#region src/blocks/calendar/options.ts
|
|
3
|
-
const calendarSqlOptions = blockOptions({
|
|
3
|
+
const calendarSqlOptions = blockOptions({
|
|
4
|
+
extraColumns: option.extraColumns(),
|
|
5
|
+
calendarExtraColumns: option.extraColumns()
|
|
6
|
+
});
|
|
4
7
|
//#endregion
|
|
5
8
|
export { calendarSqlOptions as t };
|
|
@@ -2,7 +2,9 @@ import { n as blockOptions, r as option } from "./options-CfVPctAw.js";
|
|
|
2
2
|
//#region src/blocks/teams/options.ts
|
|
3
3
|
const teamsSqlOptions = blockOptions({
|
|
4
4
|
teamIdType: option.string({ default: "uuid" }),
|
|
5
|
-
extraColumns: option.extraColumns()
|
|
5
|
+
extraColumns: option.extraColumns(),
|
|
6
|
+
patch: option.boolean({ default: false }),
|
|
7
|
+
restore: option.boolean({ default: false })
|
|
6
8
|
});
|
|
7
9
|
//#endregion
|
|
8
10
|
export { teamsSqlOptions as t };
|
package/dist/otel/index.js
CHANGED
|
@@ -40,9 +40,9 @@ function systemOf(executor) {
|
|
|
40
40
|
* ```
|
|
41
41
|
*/
|
|
42
42
|
function otel(options = {}) {
|
|
43
|
-
const tracer = options.tracer ?? trace.getTracer("better-supabase", "0.
|
|
43
|
+
const tracer = options.tracer ?? trace.getTracer("better-supabase", "0.23.0");
|
|
44
44
|
let histogram;
|
|
45
|
-
if (options.metrics !== false) histogram = (options.meter ?? metrics.getMeter("better-supabase", "0.
|
|
45
|
+
if (options.metrics !== false) histogram = (options.meter ?? metrics.getMeter("better-supabase", "0.23.0")).createHistogram("db.client.operation.duration", {
|
|
46
46
|
unit: "s",
|
|
47
47
|
description: "Duration of database client operations.",
|
|
48
48
|
advice: { explicitBucketBoundaries: [
|
|
@@ -219,7 +219,7 @@ function otel(options = {}) {
|
|
|
219
219
|
* `betterSupabase.events`. Returns a function that stops listening.
|
|
220
220
|
*/
|
|
221
221
|
function traceAuth(betterSupabase, options = {}) {
|
|
222
|
-
const tracer = options.tracer ?? trace.getTracer("better-supabase", "0.
|
|
222
|
+
const tracer = options.tracer ?? trace.getTracer("better-supabase", "0.23.0");
|
|
223
223
|
const offAuth = betterSupabase.events.on("auth", (event) => {
|
|
224
224
|
const span = tracer.startSpan("auth.resolve", {
|
|
225
225
|
kind: SpanKind.INTERNAL,
|
|
@@ -257,7 +257,7 @@ function traceAuth(betterSupabase, options = {}) {
|
|
|
257
257
|
* an error status. Returns a function that stops listening.
|
|
258
258
|
*/
|
|
259
259
|
function traceBlockEvents(betterSupabase, options = {}) {
|
|
260
|
-
const tracer = options.tracer ?? trace.getTracer("better-supabase", "0.
|
|
260
|
+
const tracer = options.tracer ?? trace.getTracer("better-supabase", "0.23.0");
|
|
261
261
|
return betterSupabase.events.on("block", (event) => {
|
|
262
262
|
const attributes = {
|
|
263
263
|
...options.attributes,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as AsyncResult } from "./result-DZeA5KS6.js";
|
|
2
|
-
import { n as TopicPort } from "./watch-topic-
|
|
2
|
+
import { n as TopicPort } from "./watch-topic-B1UCoQfz.js";
|
|
3
3
|
import { SupabaseClient } from "@supabase/supabase-js";
|
|
4
4
|
//#region src/client/ports.d.ts
|
|
5
5
|
/**
|