better-supabase 0.33.0 → 0.35.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/ai-sdk/agents/index.d.ts +2 -2
- package/dist/{app-tables-IrglDJCs.d.ts → app-tables-X3yzJljM.d.ts} +1 -1
- package/dist/{authorization-BlmDNI2b.d.ts → authorization-D1P3VBOd.d.ts} +53 -1
- package/dist/{automations-Bw5cX7oj.js → automations-D4QTP8nI.js} +2 -1
- package/dist/{bind-DP-KLgYI.d.ts → bind-Bvv-Zrdh.d.ts} +1 -1
- package/dist/{block-env-CJ38ZSTP.d.ts → block-env-h_uPl2f_.d.ts} +3 -3
- package/dist/{block-tables-CQTU71zn.d.ts → block-tables-pj3eHfoP.d.ts} +1 -1
- 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 +1 -1
- package/dist/blocks/catalog/index.d.ts +15 -0
- package/dist/blocks/catalog/index.js +23 -8
- package/dist/blocks/comments/index.d.ts +4 -4
- package/dist/blocks/deals/index.js +1 -1
- package/dist/blocks/drive/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/invoices/index.d.ts +4 -0
- package/dist/blocks/invoices/index.js +6 -3
- 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/quotes/index.js +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 +2 -2
- package/dist/blocks/sessions/index.d.ts +1 -1
- package/dist/blocks/settings/index.d.ts +1 -1
- package/dist/blocks/subjects/index.d.ts +1 -1
- package/dist/blocks/tags/index.d.ts +1 -1
- package/dist/blocks/time-tracking/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/workflow-editor/index.d.ts +3 -3
- package/dist/blocks/workflows/index.d.ts +3 -3
- package/dist/claims/index.d.ts +3 -3
- package/dist/cli/add-BaB3y1lv.js +1 -0
- package/dist/cli/{add-D2pKTbPw.js → add-CYreXA68.js} +9 -9
- package/dist/cli/{add-BDLLVLI8.js → add-DzgsOE8V.js} +2 -2
- package/dist/cli/{app-table-files-CimWi_eh.js → app-table-files-BnISa3uY.js} +2 -2
- package/dist/cli/{backfill-B1xAsdL4.js → backfill-BLLTSDSa.js} +1 -1
- package/dist/cli/bin.js +1 -1
- package/dist/cli/{blocks-DtZtn-R4.js → blocks-CpRvI7x8.js} +1 -1
- package/dist/cli/{blocks-rBeis04I.js → blocks-uzh1g_0v.js} +1 -1
- package/dist/cli/{cache-CvBRwv02.js → cache-BPWC7tGD.js} +1 -1
- package/dist/cli/{codemod-DYbVbJ-e.js → codemod-CbJVS_kG.js} +1 -1
- package/dist/cli/{content-mapper-DrhtDsAm.js → content-mapper-Cjkm2Sg3.js} +2 -2
- package/dist/cli/{doctor-Dn4TzGmw.js → doctor-D94FEJZs.js} +19 -19
- package/dist/cli/{gen-BbeS0KgF.js → gen-Cd0VNDjE.js} +11 -11
- package/dist/cli/index.d.ts +1 -1
- package/dist/cli/index.js +6 -6
- package/dist/cli/{init-C30xdMSs.js → init-Co1N9ZoA.js} +8 -8
- package/dist/cli/{live-Ctc8Qh9Y.js → live-NFNeZsP7.js} +2 -2
- package/dist/cli/{mcp-5J0kUOtD.js → mcp-WZ8t7NMz.js} +2 -2
- package/dist/cli/{metadata-DxhUNctA.js → metadata-BzMkmrZR.js} +3 -3
- package/dist/cli/{migrate-ockrh3UX.js → migrate-C9gyDAV7.js} +1 -1
- package/dist/cli/{migration-safety-CLrqC0D-.js → migration-safety-BNi8PIiM.js} +1 -1
- package/dist/cli/{migrations-CZTg2UJM.js → migrations-Ds0J_TmZ.js} +2 -2
- package/dist/cli/{module-migration-BptQzmj2.js → module-migration-hFrlzQZ5.js} +2 -2
- package/dist/cli/powersync-J2Kms2NT.js +1 -0
- package/dist/cli/{powersync-DIvsipKr.js → powersync-oFiwgsBi.js} +3 -3
- package/dist/cli/{print-DdHt8xCc.js → print-BtreoJSm.js} +2 -2
- package/dist/cli/{providers-k-1cEna6.js → providers-Be2dgyuR.js} +1 -1
- package/dist/cli/{prune-workflows-Ddv-GfkO.js → prune-workflows-BPxgRrqY.js} +1 -1
- package/dist/cli/{remove-DEEQDoc7.js → remove-B4ad996E.js} +5 -5
- package/dist/cli/{render-SjSVz8yK.js → render-C-Mfq-o3.js} +3 -3
- package/dist/cli/{run-DdhIK7-K.js → run-D2nuyyPo.js} +47 -39
- package/dist/cli/{run-Ixt9mEb6.js → run-cLdnJHH0.js} +25 -25
- package/dist/cli/{shared-p6sxli_5.js → shared-DCHxLAEL.js} +1 -1
- package/dist/cli/{snapshot-Dd_8B9g-.js → snapshot-CloKPNxv.js} +2 -2
- package/dist/cli/{source-BYvVe_Es.js → source-Bwyp18Rj.js} +1 -1
- package/dist/cli/{spec-BxQgllJY.js → spec-DAUF4ybu.js} +2 -2
- package/dist/cli/{spec-liRzcZTa.js → spec-DsVq4_qV.js} +1 -1
- package/dist/cli/{sql-layout-DHwiUOaD.js → sql-layout-CHpEL0oq.js} +3 -3
- package/dist/cli/{sync-CreQWj53.js → sync-DZu1r34s.js} +4 -4
- package/dist/cli/{upgrade-U7IKj45h.js → upgrade-A-BALvp3.js} +2 -2
- package/dist/cli/{upgrade-3NQOUO1_.js → upgrade-Bpvi70zm.js} +5 -5
- package/dist/cli/{version-mBwP-aMG.js → version-B59mZJoy.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 +2 -2
- package/dist/config/index.js +4 -4
- package/dist/{config-Bu6pwqcO.js → config-BZWSFxkG.js} +3 -3
- package/dist/{config-MDRA2sre.js → config-DQP0IvDX.js} +1 -1
- package/dist/{context-D7jICqdN.d.ts → context-CderJRZf.d.ts} +1 -1
- package/dist/contract/index.d.ts +3 -3
- package/dist/{controller-DxtxeYdf.d.ts → controller-DaWA9eWS.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-w04ivvAy.d.ts → entitlements-BefkpQIz.d.ts} +1 -1
- package/dist/{field-errors-DKCaSlZw.d.ts → field-errors-D1meOs_H.d.ts} +4 -4
- package/dist/{index-BvcMQYL-.d.ts → index-BQlLxOj5.d.ts} +1 -1
- package/dist/{index-DU0UwWvL.d.ts → index-BbDiBiKt.d.ts} +4 -4
- package/dist/{index-BZCmy767.d.ts → index-C13UgV67.d.ts} +2 -2
- package/dist/{index-BgkHbf9C.d.ts → index-ChLuLxy-.d.ts} +6 -6
- package/dist/{index-BdC2IqkU.d.ts → index-D9aV0Fvx.d.ts} +2 -2
- package/dist/{index-CbUXFzQV.d.ts → index-DXUiRyEk.d.ts} +1 -1
- package/dist/{index-CiE37wKX.d.ts → index-ZQZMQF4l.d.ts} +1 -1
- package/dist/{instances-D31jrmKh.js → instances-D9YrkoAy.js} +28 -1
- package/dist/mapper/bin.js +5 -5
- package/dist/mcp/index.d.ts +1 -1
- package/dist/next/index.d.ts +4 -4
- package/dist/{operations-CsCwruKT.d.ts → operations-t_hlXkS4.d.ts} +1 -1
- package/dist/{options-CgMiQGOF.js → options-C9bp3SEA.js} +2 -0
- package/dist/{options-B56njigZ.js → options-CjocPkX1.js} +2 -0
- package/dist/{options-Sq4bYbf5.js → options-CuaWhsQS.js} +2 -0
- package/dist/{options-DjFbIRgV.js → options-DjdxZgHi.js} +2 -1
- package/dist/{options-C-NFS6e3.js → options-DxgZ8tVc.js} +2 -1
- package/dist/otel/index.js +4 -4
- package/dist/{permissions-BP593xxk.d.ts → permissions-C8p6RlIZ.d.ts} +1 -1
- package/dist/{ports-BVLhLUvR.d.ts → ports-C-8uduFM.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-om2rbdYw.js → preset-B_sSI9vg.js} +2 -2
- package/dist/{project-D4ArwcS5.js → project-DVlXQGEp.js} +5 -5
- package/dist/{push-token-B0j171on.d.ts → push-token-D41lOoE8.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/records/index.d.ts +3 -3
- package/dist/{resolved-names-DYYyh35i.js → resolved-names-h-3UbKcw.js} +1 -1
- package/dist/server/index.d.ts +3 -3
- package/dist/solid/index.d.ts +5 -5
- package/dist/sql/index.d.ts +5 -5
- package/dist/sql/index.js +2 -2
- package/dist/{sql-DiUP7fKX.js → sql-C9nO-Mat.js} +493 -198
- package/dist/ssr/index.d.ts +1 -1
- package/dist/svelte/index.d.ts +5 -5
- package/dist/{tenant-B3IIq8Eq.d.ts → tenant-gezshhcs.d.ts} +1 -1
- package/dist/testing/index.d.ts +3 -3
- package/dist/testing/index.js +1 -1
- package/dist/{topic-D2MyBeaI.d.ts → topic-BVq5RdsI.d.ts} +1 -1
- package/dist/{types-BFEKRmEK.d.ts → types-hTj5OuFo.d.ts} +2 -2
- package/dist/vue/index.d.ts +5 -5
- package/dist/{watch-topic-q6krNw0T.d.ts → watch-topic-BOclyLFd.d.ts} +1 -1
- package/dist/yjs/index.d.ts +1 -1
- package/package.json +1 -1
- package/schemas/config-v1.json +41 -0
- package/dist/cli/add-BaOCKKt6.js +0 -1
- package/dist/cli/powersync-CmsXOuui.js +0 -1
|
@@ -2,8 +2,8 @@ import { a as SessionActor, c as agentClaims, r as AgentActOptions } from "../..
|
|
|
2
2
|
import { d as KnowledgeSearchOptions, o as KnowledgeHit, r as Knowledge } from "../../knowledge-BBC2sfAY.js";
|
|
3
3
|
import { t as Agent } from "../../agents-DXiOPB3V.js";
|
|
4
4
|
import { P as AiToolPolicy, _ as AiModerationAction, b as AiModerationStage, i as AiChat } from "../../ai-chat-DlcBdOhJ.js";
|
|
5
|
-
import { r as AuthorizationOperation } from "../../authorization-
|
|
6
|
-
import { t as OperationTable } from "../../operations-
|
|
5
|
+
import { r as AuthorizationOperation } from "../../authorization-D1P3VBOd.js";
|
|
6
|
+
import { t as OperationTable } from "../../operations-t_hlXkS4.js";
|
|
7
7
|
import { i as SearchToolOptions, r as ResultsFilter } from "../../embeddings-rVR2AKVz.js";
|
|
8
8
|
import { n as GatewayOptions } from "../../gateway-options-Mut8jih_.js";
|
|
9
9
|
import { LanguageModel, LanguageModelMiddleware, StopCondition, ToolLoopAgent, ToolLoopAgentSettings, ToolSet } from "ai";
|
|
@@ -623,7 +623,7 @@ interface BlockNameRegistry {
|
|
|
623
623
|
readonly "nodes": "id" | "tenant" | "drive" | "parent" | "kind" | "name" | "attachment" | "path" | "rank" | "deletedAt" | "source" | "externalId" | "externalMetadata" | "legalHoldUntil" | "createdBy" | "createdAt" | "updatedAt";
|
|
624
624
|
readonly "grants": "id" | "tenant" | "node" | "principalType" | "principalId" | "user" | "team" | "role" | "expiresAt" | "createdBy" | "createdAt";
|
|
625
625
|
readonly "drives": "id" | "tenant" | "name" | "kind" | "owner" | "connection" | "createdBy" | "createdAt" | "updatedAt";
|
|
626
|
-
readonly "driveGrants": "id" | "tenant" | "drive" | "principalType" | "principalId" | "role" | "expiresAt" | "createdBy" | "createdAt";
|
|
626
|
+
readonly "driveGrants": "id" | "tenant" | "drive" | "principalType" | "principalId" | "user" | "team" | "role" | "expiresAt" | "createdBy" | "createdAt";
|
|
627
627
|
readonly "connections": "id" | "tenant" | "user" | "provider" | "name" | "status" | "syncCursor" | "syncClaimedAt" | "lastSyncedAt" | "lastSyncError" | "createdBy" | "createdAt" | "updatedAt";
|
|
628
628
|
};
|
|
629
629
|
readonly functions: "drive_ancestors" | "drive_can" | "drive_check_parent" | "drive_clean_name" | "drive_conflict" | "drive_create_folder" | "drive_delete" | "drive_free_name" | "drive_get" | "drive_grants" | "drive_hold" | "drive_insert_node" | "drive_list" | "drive_lock_siblings" | "drive_move" | "drive_node_held" | "drive_node_json" | "drive_node_moved" | "drive_node_path" | "drive_node_writable" | "drive_path" | "drive_readable_ids" | "drive_release_hold" | "drive_rename" | "drive_role" | "drive_share" | "drive_shared" | "drive_subtree" | "drive_unshare";
|
|
@@ -2173,6 +2173,13 @@ type CalendarSqlOptions = {
|
|
|
2173
2173
|
type CatalogSqlOptions = {
|
|
2174
2174
|
readonly storefront?: string;
|
|
2175
2175
|
readonly extraColumns?: ExtraColumns;
|
|
2176
|
+
/** App columns of the variants table, which `saveVariant` sets from `fields`. */
|
|
2177
|
+
readonly variantExtraColumns?: ExtraColumns;
|
|
2178
|
+
/**
|
|
2179
|
+
* App columns of the categories table, which `saveCategory` sets from
|
|
2180
|
+
* `fields`.
|
|
2181
|
+
*/
|
|
2182
|
+
readonly categoryExtraColumns?: ExtraColumns;
|
|
2176
2183
|
/** Language tags the catalog translates into; the first is the default. */
|
|
2177
2184
|
readonly locales?: readonly string[];
|
|
2178
2185
|
/**
|
|
@@ -2264,6 +2271,12 @@ type DealsSqlOptions = {
|
|
|
2264
2271
|
readonly readAll?: boolean;
|
|
2265
2272
|
readonly extraColumns?: ExtraColumns;
|
|
2266
2273
|
readonly lineExtraColumns?: ExtraColumns;
|
|
2274
|
+
/**
|
|
2275
|
+
* `"percent"` when your own line table keeps discount and tax rates as
|
|
2276
|
+
* percentages, such as `vat_rate numeric(5, 2)`: the block converts them from
|
|
2277
|
+
* and to basis points. Default `"bps"`.
|
|
2278
|
+
*/
|
|
2279
|
+
readonly lineRates?: "bps" | "percent";
|
|
2267
2280
|
};
|
|
2268
2281
|
/** `blocks.documents.options`. */
|
|
2269
2282
|
type DocumentsSqlOptions = {
|
|
@@ -2285,6 +2298,19 @@ type DomainsSqlOptions = {
|
|
|
2285
2298
|
type DonationsSqlOptions = {
|
|
2286
2299
|
readonly extraColumns?: ExtraColumns;
|
|
2287
2300
|
};
|
|
2301
|
+
/**
|
|
2302
|
+
* App functions that decide the caller's role on a node or a drive:
|
|
2303
|
+
* `schema.name(id uuid, user uuid)` returns one of `options.roles`, or null.
|
|
2304
|
+
* With one set, the block calls it instead of its own grants for that level.
|
|
2305
|
+
*/
|
|
2306
|
+
type DriveRoleHook = string | {
|
|
2307
|
+
readonly rows: string;
|
|
2308
|
+
readonly roles: Readonly<Record<string, string>>;
|
|
2309
|
+
};
|
|
2310
|
+
type DriveRoleFunctions = {
|
|
2311
|
+
readonly node?: DriveRoleHook;
|
|
2312
|
+
readonly drive?: DriveRoleHook;
|
|
2313
|
+
};
|
|
2288
2314
|
/** `blocks.drive.options`. */
|
|
2289
2315
|
type DriveSqlOptions = {
|
|
2290
2316
|
readonly roles?: readonly string[];
|
|
@@ -2296,6 +2322,8 @@ type DriveSqlOptions = {
|
|
|
2296
2322
|
readonly drives?: boolean;
|
|
2297
2323
|
readonly driveKinds?: readonly string[];
|
|
2298
2324
|
readonly sources?: readonly string[];
|
|
2325
|
+
readonly roleFunctions?: DriveRoleFunctions;
|
|
2326
|
+
readonly readPolicy?: boolean;
|
|
2299
2327
|
readonly extraColumns?: ExtraColumns;
|
|
2300
2328
|
};
|
|
2301
2329
|
/** `blocks.employees.options`. */
|
|
@@ -2426,6 +2454,17 @@ type InvoicesSqlOptions = {
|
|
|
2426
2454
|
readonly termsDays?: number;
|
|
2427
2455
|
readonly extraColumns?: ExtraColumns;
|
|
2428
2456
|
readonly lineExtraColumns?: ExtraColumns;
|
|
2457
|
+
/**
|
|
2458
|
+
* `"percent"` when your own line table keeps discount and tax rates as
|
|
2459
|
+
* percentages, such as `vat_rate numeric(5, 2)`: the block converts them from
|
|
2460
|
+
* and to basis points. Default `"bps"`.
|
|
2461
|
+
*/
|
|
2462
|
+
readonly lineRates?: "bps" | "percent";
|
|
2463
|
+
/**
|
|
2464
|
+
* App columns of the charges table, such as a `not null` kind, which
|
|
2465
|
+
* `charge()` sets from `fields`.
|
|
2466
|
+
*/
|
|
2467
|
+
readonly chargeExtraColumns?: ExtraColumns;
|
|
2429
2468
|
/**
|
|
2430
2469
|
* `"app"` when the app keeps the totals columns itself, such as with VAT per
|
|
2431
2470
|
* rate: the block never recounts or writes them and reads what they hold.
|
|
@@ -2674,6 +2713,12 @@ type QuotesSqlOptions = {
|
|
|
2674
2713
|
readonly validDays?: number;
|
|
2675
2714
|
readonly extraColumns?: ExtraColumns;
|
|
2676
2715
|
readonly lineExtraColumns?: ExtraColumns;
|
|
2716
|
+
/**
|
|
2717
|
+
* `"percent"` when your own line table keeps discount and tax rates as
|
|
2718
|
+
* percentages, such as `vat_rate numeric(5, 2)`: the block converts them from
|
|
2719
|
+
* and to basis points. Default `"bps"`.
|
|
2720
|
+
*/
|
|
2721
|
+
readonly lineRates?: "bps" | "percent";
|
|
2677
2722
|
};
|
|
2678
2723
|
/** `blocks.reactions.options`. */
|
|
2679
2724
|
type ReactionsSqlOptions = {
|
|
@@ -2840,6 +2885,13 @@ type TimeTrackingSqlOptions = {
|
|
|
2840
2885
|
* running and `stop_timer` takes the entry. Needs `overlap: "allow"`.
|
|
2841
2886
|
*/
|
|
2842
2887
|
readonly timers?: "one" | "many";
|
|
2888
|
+
/**
|
|
2889
|
+
* The entry columns a submitted or approved week refuses to change, as
|
|
2890
|
+
* logical names (`startedAt`) or the table's own column names. Default: the
|
|
2891
|
+
* ones that change logged time (start, end or duration, subject, owner and
|
|
2892
|
+
* rate), so a billable flag, a note or a link column stays writable.
|
|
2893
|
+
*/
|
|
2894
|
+
readonly lockedColumns?: readonly string[];
|
|
2843
2895
|
};
|
|
2844
2896
|
/** `blocks.trash.options`. */
|
|
2845
2897
|
type TrashSqlOptions = {
|
|
@@ -6,7 +6,8 @@ const quotesSqlOptions = blockOptions({
|
|
|
6
6
|
prefix: option.string({ default: "Q-" }),
|
|
7
7
|
validDays: option.number({ default: 30 }),
|
|
8
8
|
extraColumns: option.extraColumns(),
|
|
9
|
-
lineExtraColumns: option.extraColumns()
|
|
9
|
+
lineExtraColumns: option.extraColumns(),
|
|
10
|
+
lineRates: option.string({ default: "bps" })
|
|
10
11
|
});
|
|
11
12
|
// src/blocks/quotes/automations.ts
|
|
12
13
|
/**
|
|
@@ -4,7 +4,7 @@ import { t as BetterSupabase, y as Db } from "./define-ITQA71fw.js";
|
|
|
4
4
|
import { n as DataEngine } from "./data-engine-CMENsp3d.js";
|
|
5
5
|
import { Dn as GeneratedBlocks } from "./define-block-COmMkx2x.js";
|
|
6
6
|
import { rt as BetterQueries } from "./index-BIAtapnD.js";
|
|
7
|
-
import { t as ClientPorts } from "./ports-
|
|
7
|
+
import { t as ClientPorts } from "./ports-C-8uduFM.js";
|
|
8
8
|
import { SupabaseClient } from "@supabase/supabase-js";
|
|
9
9
|
interface AuthUser {
|
|
10
10
|
readonly id: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Dn as GeneratedBlocks } from "./define-block-COmMkx2x.js";
|
|
2
|
-
import { n as TopicPort } from "./watch-topic-
|
|
3
|
-
import { t as ClientPorts } from "./ports-
|
|
4
|
-
import { t as AuthPort } from "./controller-
|
|
2
|
+
import { n as TopicPort } from "./watch-topic-BOclyLFd.js";
|
|
3
|
+
import { t as ClientPorts } from "./ports-C-8uduFM.js";
|
|
4
|
+
import { t as AuthPort } from "./controller-DaWA9eWS.js";
|
|
5
5
|
import { SupabaseClient } from "@supabase/supabase-js";
|
|
6
6
|
/**
|
|
7
7
|
* What the block bindings hand their controllers: the provider's client,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { cn as ResolvedConfig } from "./context-
|
|
1
|
+
import { cn as ResolvedConfig } from "./context-CderJRZf.js";
|
|
2
2
|
/**
|
|
3
3
|
* One block table as the config names it: unquoted schema and table, and each
|
|
4
4
|
* logical column's written name, or `null` when an adopted table lacks it.
|
|
@@ -5,9 +5,9 @@ import { a as AiMessagePart, c as AiReasoningPart, d as AiTextPart, f as AiToolA
|
|
|
5
5
|
import { A as AiStoredMessageStatus, B as AiHarnessSession, C as AiProject, D as AiSaveResult, E as AiRunStatus, F as AiUserMessageTrigger, G as AiRun, H as AiHarnessSessions, I as SharedAiChat, J as AiRunStep, K as AiRunQuery, L as aiChatListTopic, M as AiToolApproval, N as AiToolApprovalRequest, O as AiShareLink, P as AiToolPolicy, Q as createHarnessSessions, R as aiChatTopic, S as AiPendingInputRequest, T as AiRunRelease, U as AiHarnessStatus, V as AiHarnessSessionPatch, W as AiPendingApproval, X as AiRunStepStatus, Y as AiRunStepInput, Z as AiRuns, _ as AiModerationAction, a as AiChatInput, b as AiModerationStage, c as AiChatPatch, d as AiChatShare, f as AiChatVisibility, g as AiModelInput, h as AiModel, i as AiChat, j as AiStreamClaim, k as AiStoredMessage, l as AiChatQuery, m as AiMessageSibling, n as AiApprovalDecision, o as AiChatOptions, p as AiFeedback, q as AiRunState, r as AiAssistantMessageOptions, s as AiChatPage, t as AiAppendResult, u as AiChatRecord, v as AiModerationEvent, w as AiProjectInput, x as AiPendingInput, y as AiModerationInput, z as createAiChat } from "../../ai-chat-DlcBdOhJ.js";
|
|
6
6
|
import { a as NewAiSandbox, i as AiSandboxes, n as AiSandboxStatus, r as AiSandboxStopper, t as AiSandbox } from "../../sandboxes-B2hBoBvJ.js";
|
|
7
7
|
import { c as BlockOf } from "../../define-block-COmMkx2x.js";
|
|
8
|
-
import { p as SubscriptionStatus } from "../../topic-
|
|
9
|
-
import { n as TopicPort } from "../../watch-topic-
|
|
10
|
-
import { n as Controller, t as AuthPort } from "../../controller-
|
|
8
|
+
import { p as SubscriptionStatus } from "../../topic-BVq5RdsI.js";
|
|
9
|
+
import { n as TopicPort } from "../../watch-topic-BOclyLFd.js";
|
|
10
|
+
import { n as Controller, t as AuthPort } from "../../controller-DaWA9eWS.js";
|
|
11
11
|
import { StandardSchemaV1 } from "@standard-schema/spec";
|
|
12
12
|
/**
|
|
13
13
|
* The `type` of each part in the canonical AI message (version 1); the SQL
|
|
@@ -8,9 +8,9 @@ import { r as BlockTemporalOptions } from "../../block-helpers-disoUWCp.js";
|
|
|
8
8
|
import { a as dbTransport, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-BEtC_Kis.js";
|
|
9
9
|
import { n as BlockHooks } from "../../block-hooks-DrA_d1dJ.js";
|
|
10
10
|
import { c as BlockOf } from "../../define-block-COmMkx2x.js";
|
|
11
|
-
import { p as SubscriptionStatus } from "../../topic-
|
|
12
|
-
import { n as TopicPort } from "../../watch-topic-
|
|
13
|
-
import { n as Controller, t as AuthPort } from "../../controller-
|
|
11
|
+
import { p as SubscriptionStatus } from "../../topic-BVq5RdsI.js";
|
|
12
|
+
import { n as TopicPort } from "../../watch-topic-BOclyLFd.js";
|
|
13
|
+
import { n as Controller, t as AuthPort } from "../../controller-DaWA9eWS.js";
|
|
14
14
|
type AnnouncementSeverity = "info" | "success" | "warning" | "critical";
|
|
15
15
|
/**
|
|
16
16
|
* Who sees it: everyone, members of some tenants, members with some roles, or
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { a as dbTransport, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-BEtC_Kis.js";
|
|
2
2
|
import { _ as createApiKeys, a as ApiKeyExtraClaims, c as ApiKeyState, d as CreateApiKeyInput, f as CreatedApiKey, g as apiKeyResolver, h as apiKeyClaims, i as ApiKeyExtraClaim, l as ApiKeys, m as apiKeyChecksum, n as ApiKeyCheck, o as ApiKeyReservedClaim, p as ParsedApiKey, r as ApiKeyClaimsOptions, s as ApiKeyResolverOptions, t as ApiKey, u as ApiKeysOptions, v as parseApiKey } from "../../api-keys-DbIbkGxx.js";
|
|
3
|
-
import { a as ApiKeyDraft, c as ApiKeysControllerOptions, d as ApiKeyAuth, f as ApiKeyContributions, i as ApiKeyChange, l as ApiKeysSnapshot, m as withApiKey, n as ApiKeysEvents, o as ApiKeysActions, p as WithApiKeyOptions, r as apiKeysEvents, s as ApiKeysController, t as apiKeysBlock, u as createApiKeysController } from "../../index-
|
|
3
|
+
import { a as ApiKeyDraft, c as ApiKeysControllerOptions, d as ApiKeyAuth, f as ApiKeyContributions, i as ApiKeyChange, l as ApiKeysSnapshot, m as withApiKey, n as ApiKeysEvents, o as ApiKeysActions, p as WithApiKeyOptions, r as apiKeysEvents, s as ApiKeysController, t as apiKeysBlock, u as createApiKeysController } from "../../index-DXUiRyEk.js";
|
|
4
4
|
export { type ApiKey, type ApiKeyAuth, type ApiKeyChange, type ApiKeyCheck, type ApiKeyClaimsOptions, type ApiKeyContributions, type ApiKeyDraft, type ApiKeyExtraClaim, type ApiKeyExtraClaims, type ApiKeyReservedClaim, type ApiKeyResolverOptions, type ApiKeyState, type ApiKeys, type ApiKeysActions, type ApiKeysController, type ApiKeysControllerOptions, type ApiKeysEvents, type ApiKeysOptions, type ApiKeysSnapshot, type BlockTransport, type CreateApiKeyInput, type CreatedApiKey, type ParsedApiKey, type WithApiKeyOptions, apiKeyChecksum, apiKeyClaims, apiKeyResolver, apiKeysBlock, apiKeysEvents, createApiKeys, createApiKeysController, dbTransport, parseApiKey, rpcTransport, sqlTransport, withApiKey };
|
|
@@ -3,7 +3,7 @@ import { Ct as Events, ot as StorageObjectEventData, y as AttachmentEventData }
|
|
|
3
3
|
import { a as dbTransport, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-BEtC_Kis.js";
|
|
4
4
|
import { t as Author } from "../../block-authors-C5z3tGVu.js";
|
|
5
5
|
import { At as NewAttachment, Ct as AttachmentScannerOptions, Dt as AttachmentVersion, Et as AttachmentUpload, Ft as ScannedObject, It as attachmentVersionOf, Lt as createAttachmentScanner, Mt as ObjectScanner, Nt as ObjectScannerOptions, Ot as Attachments, Pt as ScanVerdict, Rt as createAttachments, Sn as EntitySchema, St as AttachmentScanner, Tt as AttachmentStorage, _t as AttachmentDownload, bt as AttachmentReplacement, c as BlockOf, gt as AttachmentBucket, ht as Attachment, jt as ObjectScanJob, kt as AttachmentsOptions, ln as RecordBindingWrite, mn as RecordRowInput, rn as RecordBinding, vt as AttachmentImageUrlOptions, wt as AttachmentStatus, xt as AttachmentScanJob, yt as AttachmentImages, zt as createObjectScanner } from "../../define-block-COmMkx2x.js";
|
|
6
|
-
import { n as Controller } from "../../controller-
|
|
6
|
+
import { n as Controller } from "../../controller-DaWA9eWS.js";
|
|
7
7
|
/** A pending write to a record's files, for `useOptimistic`. */
|
|
8
8
|
type AttachmentsOptimisticAction = {
|
|
9
9
|
readonly type: "add";
|
|
@@ -11,9 +11,9 @@ import { Yt as WhereInput, t as BetterSupabase } from "../../define-ITQA71fw.js"
|
|
|
11
11
|
import { c as BlockOf } from "../../define-block-COmMkx2x.js";
|
|
12
12
|
import { i as EventSink, t as CloudEvent } from "../../cloud-event-DXWmXrus.js";
|
|
13
13
|
import { i as ListDefinition } from "../../list-query-C7V8kUaD.js";
|
|
14
|
-
import { n as Controller, t as AuthPort } from "../../controller-
|
|
14
|
+
import { n as Controller, t as AuthPort } from "../../controller-DaWA9eWS.js";
|
|
15
15
|
import { a as UndoToken } from "../../undo-22ofP6Zp.js";
|
|
16
|
-
import { n as AuditCategory } from "../../context-
|
|
16
|
+
import { n as AuditCategory } from "../../context-CderJRZf.js";
|
|
17
17
|
interface PurgeAuditLogOptions extends BlockTemporalOptions {
|
|
18
18
|
/**
|
|
19
19
|
* How long entries are kept when `retention` has no answer. Defaults to `1
|
|
@@ -8,7 +8,7 @@ import { a as dbTransport, i as RpcClient, o as rpcTransport, s as sqlTransport,
|
|
|
8
8
|
import { a as BlockTransportMiddleware, d as extendBlock, f as withBlockHooks, n as BlockHooks, p as wrapTransport } from "../../block-hooks-DrA_d1dJ.js";
|
|
9
9
|
import { _ as FilterRule, d as FilterLimits, f as FilterNode, h as FilterQuery, i as FilterCombinator, m as FilterOperatorSpec, r as FilterClock } from "../../filter-query-DV-x8fio.js";
|
|
10
10
|
import { $t as createActionRegistry, Bt as Action, Gt as ActionInfo, Ht as ActionContext, Jt as ActionRegistry, Kt as ActionOrigin, L as NotifierInput, Qt as actionKey, Ut as ActionDescriptor, Vt as ActionCall, Wt as ActionHandler, Yt as ActionSpec, Zt as DefaultAutomation, c as BlockOf, en as defineAction, qt as ActionRef } from "../../define-block-COmMkx2x.js";
|
|
11
|
-
import { n as Controller, t as AuthPort } from "../../controller-
|
|
11
|
+
import { n as Controller, t as AuthPort } from "../../controller-DaWA9eWS.js";
|
|
12
12
|
import { o as ApprovalRequestInput } from "../../approvals-DZoGtNFv.js";
|
|
13
13
|
import { n as FilterRecordField, t as FilterEvaluation } from "../../filter-evaluate-Bz3Fzhz2.js";
|
|
14
14
|
import { a as checkRuleConditions, c as ruleFilterFields, i as RuleFieldDefinition, n as RuleField, o as defineRuleFields, r as RuleFieldCatalog, s as ruleFilterFieldInfo, t as RULE_LIMITS } from "../../fields-CAVk9dxX.js";
|
|
@@ -9,7 +9,7 @@ import { n as BlockHooks } from "../../block-hooks-DrA_d1dJ.js";
|
|
|
9
9
|
import { n as StripeSource, r as StripeTaxId, t as StripeClient } from "../../stripe-Bl-sjnl6.js";
|
|
10
10
|
import { c as BlockOf } from "../../define-block-COmMkx2x.js";
|
|
11
11
|
import { i as EventSink } from "../../cloud-event-DXWmXrus.js";
|
|
12
|
-
import { n as Controller, t as AuthPort } from "../../controller-
|
|
12
|
+
import { n as Controller, t as AuthPort } from "../../controller-DaWA9eWS.js";
|
|
13
13
|
import { d as stripeInboxVerify, f as verifyStripeWebhook, u as signStripeWebhook } from "../../verify-BQu3eBNW.js";
|
|
14
14
|
/** The events of the `billing` block: type to data. */
|
|
15
15
|
type BillingEvents = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { b as DbError } from "../../result-DTOQRyGY.js";
|
|
2
2
|
import { Ct as Events, tt as SchedulingEventData } from "../../events-DVt3Z9hw.js";
|
|
3
3
|
import { c as BlockOf } from "../../define-block-COmMkx2x.js";
|
|
4
|
-
import { n as Controller } from "../../controller-
|
|
4
|
+
import { n as Controller } from "../../controller-DaWA9eWS.js";
|
|
5
5
|
import { o as WeeklyHours } from "../../availability-CebEOfMN.js";
|
|
6
6
|
import { C as bookingSeriesOf, S as BookingWeekday, T as parseRecurrence, _ as BookedSeries, a as BookingExceptionInput, b as BookingSeriesScope, c as BookingResourceInput, d as BookingStatus, f as Bookings, g as createBookings, h as PublicBookingService, i as BookingDuration, l as BookingServiceInput, m as PlacedBooking, n as Booking, o as BookingExpirePayload, p as BookingsOptions, r as BookingCustomer, s as BookingRange, t as BOOKING_EXPIRE_QUEUE, u as BookingSlot, v as BookingRecurrence, w as formatRecurrence, x as BookingSeriesStatus, y as BookingSeries } from "../../bookings-Br0VXzaf.js";
|
|
7
7
|
import { t as EventCalendarEvent } from "../../event-calendar-DUtFyRrv.js";
|
|
@@ -7,7 +7,7 @@ import { n as Logger } from "../../logger-0LfhvwE4.js";
|
|
|
7
7
|
import { t as BlockTransport } from "../../block-transport-BEtC_Kis.js";
|
|
8
8
|
import { n as BlockHooks } from "../../block-hooks-DrA_d1dJ.js";
|
|
9
9
|
import { Sn as EntitySchema, c as BlockOf } from "../../define-block-COmMkx2x.js";
|
|
10
|
-
import { n as Controller } from "../../controller-
|
|
10
|
+
import { n as Controller } from "../../controller-DaWA9eWS.js";
|
|
11
11
|
import { C as CalendarReminder, D as ToIcsOptions, E as ParsedIcs, O as parseIcs, S as CalendarEventStatus, T as IcsSource, _ as expandOccurrences, a as FreeBusy, b as AttendeeRole, c as WorkingHoursInput, d as workingHoursOf, f as CalendarEvent, g as SplitRules, h as OccurrenceRange, i as CommonFreeTimeOptions, k as toIcs, l as commonFreeTime, m as OccurrenceOptions, n as CalendarEventKind, o as WeeklyHours, p as CalendarOccurrence, r as CalendarTransparency, s as WorkingHours, t as BusyRange, u as freeBusyOf, v as splitRule, w as IcsEvent, x as CalendarAttendee, y as AttendeeResponse } from "../../availability-CebEOfMN.js";
|
|
12
12
|
import { a as fromEventCalendarUpdate, c as toEventCalendarResources, i as OccurrenceMove, n as EventCalendarOptions, o as seriesOf, r as EventCalendarResource, s as toEventCalendarEvents, t as EventCalendarEvent } from "../../event-calendar-DUtFyRrv.js";
|
|
13
13
|
import { t as VisibleRange } from "../../range-BN3kpJAE.js";
|
|
@@ -39,6 +39,13 @@ interface ProductInput {
|
|
|
39
39
|
readonly description?: string;
|
|
40
40
|
/** Default `physical`. */
|
|
41
41
|
readonly kind?: ProductKind;
|
|
42
|
+
/**
|
|
43
|
+
* The product's own price and currency, when your products table maps `price`
|
|
44
|
+
* and `currency`. Left out, the columns keep their value.
|
|
45
|
+
*/
|
|
46
|
+
readonly price?: Money;
|
|
47
|
+
/** When your products table maps `trackInventory`. */
|
|
48
|
+
readonly trackInventory?: boolean;
|
|
42
49
|
}
|
|
43
50
|
interface SavedProduct {
|
|
44
51
|
readonly id: string;
|
|
@@ -75,12 +82,16 @@ interface VariantInput {
|
|
|
75
82
|
readonly trackInventory?: boolean;
|
|
76
83
|
/** Whether it sells with no stock available. Default `false`. */
|
|
77
84
|
readonly allowBackorder?: boolean;
|
|
85
|
+
/** The extra columns (`options.variantExtraColumns`) by name. */
|
|
86
|
+
readonly fields?: Readonly<Record<string, unknown>>;
|
|
78
87
|
}
|
|
79
88
|
interface SavedVariant {
|
|
80
89
|
readonly id: string;
|
|
81
90
|
readonly sku: string;
|
|
82
91
|
/** Its rank key among the product's variants. */
|
|
83
92
|
readonly rank: string;
|
|
93
|
+
/** The extra columns, with `options.variantExtraColumns`. */
|
|
94
|
+
readonly fields?: Readonly<Record<string, unknown>>;
|
|
84
95
|
}
|
|
85
96
|
interface PriceListInput {
|
|
86
97
|
readonly id?: string;
|
|
@@ -123,11 +134,15 @@ interface CategoryInput {
|
|
|
123
134
|
readonly name: string;
|
|
124
135
|
readonly slug?: string;
|
|
125
136
|
readonly description?: string;
|
|
137
|
+
/** The extra columns (`options.categoryExtraColumns`) by name. */
|
|
138
|
+
readonly fields?: Readonly<Record<string, unknown>>;
|
|
126
139
|
}
|
|
127
140
|
interface SavedCategory {
|
|
128
141
|
readonly id: string;
|
|
129
142
|
readonly slug: string;
|
|
130
143
|
readonly rank: string;
|
|
144
|
+
/** The extra columns, with `options.categoryExtraColumns`. */
|
|
145
|
+
readonly fields?: Readonly<Record<string, unknown>>;
|
|
131
146
|
}
|
|
132
147
|
interface CollectionBase {
|
|
133
148
|
readonly id?: string;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { n as dbError } from "../../errors-B7tCfCvX.js";
|
|
2
2
|
import { n as isRecord } from "../../guards-CsRa6v57.js";
|
|
3
3
|
import { t as AsyncResult } from "../../result-8xza7w5W.js";
|
|
4
|
-
import { t as catalogSqlOptions } from "../../options-
|
|
4
|
+
import { t as catalogSqlOptions } from "../../options-C9bp3SEA.js";
|
|
5
5
|
import { n as event, t as defineEvents } from "../../event-map-DxfsFgQT.js";
|
|
6
6
|
import { A as recordsOf, L as textOf, O as recordOf, T as pageOf, U as rpcTransport, V as dbTransport, W as sqlTransport, d as enumOrThrow, h as instantOf, m as instantArg, n as applyTemporal, o as blockCall, w as optionalText } from "../../block-helpers-I7UzjNEf.js";
|
|
7
7
|
import { i as wrapTransport, n as extendBlock, r as withBlockHooks } from "../../block-hooks-CadxQ9-_.js";
|
|
8
|
-
import { n as entitySchema } from "../../entity-schema-DEIz0I8i.js";
|
|
8
|
+
import { n as entitySchema, r as moneyField } from "../../entity-schema-DEIz0I8i.js";
|
|
9
9
|
import { c as withFields, n as blockFields, r as extraFieldsArg } from "../../block-fields-Bjcv6_zc.js";
|
|
10
10
|
import { n as defineBlock } from "../../define-block-22Jv4U_-.js";
|
|
11
11
|
import { t as rankBetweenResult } from "../../rank-result-DzaTKKhH.js";
|
|
12
12
|
import { d as money } from "../../money-DH--bbYr.js";
|
|
13
|
-
import { a as optionalAmountText, o as optionalMoneyOf } from "../../money-codec-SKPm8FPw.js";
|
|
13
|
+
import { a as optionalAmountText, o as optionalMoneyOf, t as amountText } from "../../money-codec-SKPm8FPw.js";
|
|
14
14
|
// src/blocks/catalog/catalog.ts
|
|
15
15
|
const PRODUCT_KINDS = [
|
|
16
16
|
"physical",
|
|
@@ -35,7 +35,8 @@ function variantOf(value) {
|
|
|
35
35
|
return {
|
|
36
36
|
id: textOf(row["id"]),
|
|
37
37
|
sku: textOf(row["sku"]),
|
|
38
|
-
rank: textOf(row["rank"])
|
|
38
|
+
rank: textOf(row["rank"]),
|
|
39
|
+
...isRecord(row["fields"]) ? { fields: row["fields"] } : {}
|
|
39
40
|
};
|
|
40
41
|
}
|
|
41
42
|
function priceOf(value) {
|
|
@@ -115,7 +116,8 @@ function variantArgs(productId, variantId, input) {
|
|
|
115
116
|
barcode: input.barcode ?? null,
|
|
116
117
|
weight_grams: input.weightGrams ?? null,
|
|
117
118
|
track_inventory: input.trackInventory ?? null,
|
|
118
|
-
allow_backorder: input.allowBackorder ?? null
|
|
119
|
+
allow_backorder: input.allowBackorder ?? null,
|
|
120
|
+
fields: input.fields
|
|
119
121
|
};
|
|
120
122
|
}
|
|
121
123
|
/**
|
|
@@ -126,13 +128,16 @@ function createCatalog(options) {
|
|
|
126
128
|
applyTemporal(options);
|
|
127
129
|
const call = blockCall(options.transport, options.schema, options.mappers);
|
|
128
130
|
const fields = blockFields(options.fields, "product fields");
|
|
129
|
-
const saveProduct = (organizationId, productId, { title, slug, description, kind, ...extra }) => AsyncResult.from(() => extraFieldsArg(fields, extra)).andThen((more) => call("save_product", {
|
|
131
|
+
const saveProduct = (organizationId, productId, { title, slug, description, kind, price, trackInventory, ...extra }) => AsyncResult.from(() => extraFieldsArg(fields, extra)).andThen((more) => call("save_product", {
|
|
130
132
|
tenant: organizationId,
|
|
131
133
|
product: productId,
|
|
132
134
|
title,
|
|
133
135
|
slug: slug ?? null,
|
|
134
136
|
description: description ?? null,
|
|
135
137
|
kind: kind ?? null,
|
|
138
|
+
price: price === void 0 ? void 0 : amountText(price),
|
|
139
|
+
currency: price?.currency,
|
|
140
|
+
track_inventory: trackInventory,
|
|
136
141
|
...more
|
|
137
142
|
}, (value) => value)).andThen((value) => withFields(fields, value, productOf(value)));
|
|
138
143
|
return withBlockHooks({
|
|
@@ -217,13 +222,15 @@ function createCatalog(options) {
|
|
|
217
222
|
parent: input.parentId ?? null,
|
|
218
223
|
name: input.name,
|
|
219
224
|
slug: input.slug ?? null,
|
|
220
|
-
description: input.description ?? null
|
|
225
|
+
description: input.description ?? null,
|
|
226
|
+
fields: input.fields
|
|
221
227
|
}, (value) => {
|
|
222
228
|
const row = recordOf(value, "save_category");
|
|
223
229
|
return {
|
|
224
230
|
id: textOf(row["id"]),
|
|
225
231
|
slug: textOf(row["slug"]),
|
|
226
|
-
rank: textOf(row["rank"])
|
|
232
|
+
rank: textOf(row["rank"]),
|
|
233
|
+
...isRecord(row["fields"]) ? { fields: row["fields"] } : {}
|
|
227
234
|
};
|
|
228
235
|
}),
|
|
229
236
|
moveCategory: (categoryId, parentId, neighbors) => {
|
|
@@ -402,6 +409,14 @@ const productInputSchema = entitySchema({
|
|
|
402
409
|
kind: "enum",
|
|
403
410
|
values: PRODUCT_KINDS,
|
|
404
411
|
optional: true
|
|
412
|
+
},
|
|
413
|
+
price: {
|
|
414
|
+
...moneyField,
|
|
415
|
+
optional: true
|
|
416
|
+
},
|
|
417
|
+
trackInventory: {
|
|
418
|
+
kind: "boolean",
|
|
419
|
+
optional: true
|
|
405
420
|
}
|
|
406
421
|
}
|
|
407
422
|
});
|
|
@@ -7,14 +7,14 @@ import { n as Logger } from "../../logger-0LfhvwE4.js";
|
|
|
7
7
|
import { a as BlockTenantOptions, i as CursorPageOptions, r as BlockTemporalOptions } from "../../block-helpers-disoUWCp.js";
|
|
8
8
|
import { a as dbTransport, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-BEtC_Kis.js";
|
|
9
9
|
import { n as BlockHooks } from "../../block-hooks-DrA_d1dJ.js";
|
|
10
|
-
import { F as CommentsSqlOptions } from "../../authorization-
|
|
10
|
+
import { F as CommentsSqlOptions } from "../../authorization-D1P3VBOd.js";
|
|
11
11
|
import { t as Author } from "../../block-authors-C5z3tGVu.js";
|
|
12
12
|
import { a as isFileAnchor, i as fileAnchor, n as FileAnchor, o as conversationTopic, r as FileAnchorAt, t as AnchorRegion } from "../../anchors-sCLvYj-8.js";
|
|
13
13
|
import { c as MessageEdit, l as MessageEdition, o as Message } from "../../messaging-D5z2TR37.js";
|
|
14
14
|
import { Sn as EntitySchema, c as BlockOf, ln as RecordBindingWrite, mn as RecordRowInput, rn as RecordBinding } from "../../define-block-COmMkx2x.js";
|
|
15
|
-
import { p as SubscriptionStatus } from "../../topic-
|
|
16
|
-
import { n as TopicPort } from "../../watch-topic-
|
|
17
|
-
import { n as Controller, t as AuthPort } from "../../controller-
|
|
15
|
+
import { p as SubscriptionStatus } from "../../topic-BVq5RdsI.js";
|
|
16
|
+
import { n as TopicPort } from "../../watch-topic-BOclyLFd.js";
|
|
17
|
+
import { n as Controller, t as AuthPort } from "../../controller-DaWA9eWS.js";
|
|
18
18
|
interface CommentsOptions<S extends StandardSchemaV1 | undefined = undefined> extends BlockTemporalOptions, BlockTenantOptions {
|
|
19
19
|
/**
|
|
20
20
|
* A Standard Schema for the message extra columns
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as temporal } from "../../temporal-required-w_2u4EDp.js";
|
|
2
2
|
import { a as ok, r as err, t as AsyncResult } from "../../result-8xza7w5W.js";
|
|
3
|
-
import { t as dealsSqlOptions } from "../../options-
|
|
3
|
+
import { t as dealsSqlOptions } from "../../options-DxgZ8tVc.js";
|
|
4
4
|
import { n as event, t as defineEvents } from "../../event-map-DxfsFgQT.js";
|
|
5
5
|
import { A as recordsOf, C as optionalInstant, L as textOf, O as recordOf, U as rpcTransport, V as dbTransport, W as sqlTransport, a as bigintOf, d as enumOrThrow, j as requiredInstant, n as applyTemporal, o as blockCall, w as optionalText } from "../../block-helpers-I7UzjNEf.js";
|
|
6
6
|
import { i as wrapTransport, n as extendBlock, r as withBlockHooks } from "../../block-hooks-CadxQ9-_.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { n as dbError } from "../../errors-B7tCfCvX.js";
|
|
2
2
|
import { n as isRecord } from "../../guards-CsRa6v57.js";
|
|
3
3
|
import { a as ok, r as err, t as AsyncResult } from "../../result-8xza7w5W.js";
|
|
4
|
-
import { t as driveSqlOptions } from "../../options-
|
|
4
|
+
import { t as driveSqlOptions } from "../../options-CjocPkX1.js";
|
|
5
5
|
import { n as event, t as defineEvents } from "../../event-map-DxfsFgQT.js";
|
|
6
6
|
import { A as recordsOf, C as optionalInstant, L as textOf, O as recordOf, U as rpcTransport, V as dbTransport, W as sqlTransport, d as enumOrThrow, j as requiredInstant, n as applyTemporal, o as blockCall, w as optionalText } from "../../block-helpers-I7UzjNEf.js";
|
|
7
7
|
import { r as withBlockHooks } from "../../block-hooks-CadxQ9-_.js";
|
|
@@ -4,8 +4,8 @@ import { n as SqlClient } from "../../executor-CFmee_nV.js";
|
|
|
4
4
|
import { a as dbTransport, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-BEtC_Kis.js";
|
|
5
5
|
import { n as BlockHooks } from "../../block-hooks-DrA_d1dJ.js";
|
|
6
6
|
import { c as BlockOf } from "../../define-block-COmMkx2x.js";
|
|
7
|
-
import { a as hasEntitlement, n as EntitlementKey, t as EntitlementClaimOptions } from "../../entitlements-
|
|
8
|
-
import { n as Controller, t as AuthPort } from "../../controller-
|
|
7
|
+
import { a as hasEntitlement, n as EntitlementKey, t as EntitlementClaimOptions } from "../../entitlements-BefkpQIz.js";
|
|
8
|
+
import { n as Controller, t as AuthPort } from "../../controller-DaWA9eWS.js";
|
|
9
9
|
/** The Stripe event sent when a customer's active entitlements change. */
|
|
10
10
|
export declare const ENTITLEMENTS_UPDATED = "entitlements.active_entitlement_summary.updated";
|
|
11
11
|
/**
|
|
@@ -8,7 +8,7 @@ import { r as BlockTemporalOptions } from "../../block-helpers-disoUWCp.js";
|
|
|
8
8
|
import { a as dbTransport, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-BEtC_Kis.js";
|
|
9
9
|
import { n as BlockHooks } from "../../block-hooks-DrA_d1dJ.js";
|
|
10
10
|
import { c as BlockOf } from "../../define-block-COmMkx2x.js";
|
|
11
|
-
import { n as Controller } from "../../controller-
|
|
11
|
+
import { n as Controller } from "../../controller-DaWA9eWS.js";
|
|
12
12
|
import { _ as isFormDefinition, a as FormDefinition, c as FormJson, d as FormScoring, f as FormStep, g as formSchema, h as formDefinitionProblems, i as FormCondition, l as FormJsonSchema, m as UNSCORED_FIELD_TYPES, n as FORM_FIELD_TYPES, o as FormField, p as NPS_MAX, r as FORM_SCHEMA_DIALECT, s as FormFieldType, t as FORM_DEFINITION_SCHEMA, u as FormOption } from "../../form-definition-BN8shngm.js";
|
|
13
13
|
import { StandardSchemaV1 } from "@standard-schema/spec";
|
|
14
14
|
/** A submission's answers, by field key. */
|
|
@@ -2,10 +2,10 @@ import { Ct as Events, H as InboxEventData } from "../../events-DVt3Z9hw.js";
|
|
|
2
2
|
import { a as dbTransport, i as RpcClient, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-BEtC_Kis.js";
|
|
3
3
|
import { d as MessageKind, p as MessageReaction, u as MessageFile } from "../../messaging-D5z2TR37.js";
|
|
4
4
|
import { Zt as DefaultAutomation, c as BlockOf } from "../../define-block-COmMkx2x.js";
|
|
5
|
-
import { p as SubscriptionStatus } from "../../topic-
|
|
6
|
-
import { n as TopicPort } from "../../watch-topic-
|
|
7
|
-
import { l as StoragePort } from "../../ports-
|
|
8
|
-
import { n as Controller, t as AuthPort } from "../../controller-
|
|
5
|
+
import { p as SubscriptionStatus } from "../../topic-BVq5RdsI.js";
|
|
6
|
+
import { n as TopicPort } from "../../watch-topic-BOclyLFd.js";
|
|
7
|
+
import { l as StoragePort } from "../../ports-C-8uduFM.js";
|
|
8
|
+
import { n as Controller, t as AuthPort } from "../../controller-DaWA9eWS.js";
|
|
9
9
|
import { S as StoredInboundEvent, _ as MessageDirection, a as ConversationEvent, b as PurgedContact, c as DeliveryStatus, d as InboxCounts, f as InboxFileSource, g as MessageDelivery, h as InboxUpload, i as Conversation, l as InboundResult, m as InboxRow, n as BotMode, o as ConversationPriority, p as InboxMessage, r as Contact, s as ConversationStatus, t as AuthorType, u as InboxChannel, v as MessageTemplate, x as ScheduledInboxMessage, y as PendingInboxFile } from "../../types-TH3zlMiM.js";
|
|
10
10
|
import { a as Inbox, c as InboxPatch, d as ScheduledMessageInput, f as StartConversationInput, i as InboundInput, l as MessageInput, m as createInbox, n as ConversationFilter, o as InboxHooks, p as TemplateInput, r as CreateInboxInput, s as InboxOptions, t as ContactInput, u as MessagePageOptions } from "../../inbox-DavCzW7b.js";
|
|
11
11
|
export declare const INBOX_CHANNELS: readonly InboxChannel[];
|
package/dist/blocks/index.d.ts
CHANGED
|
@@ -12,7 +12,7 @@ import { a as OptionInput, c as OptionSpecs, d as optionsJsonSchema, i as Option
|
|
|
12
12
|
import { A as CreateBlocksOptions, An as BlockNaming, C as BlockContext, Cn as EntitySchemaSpec, D as Blocks, Dn as GeneratedBlocks, E as BlockSinks, En as GeneratedBlock, F as BlockPorts, Fn as entityNames, I as Notifier, L as NotifierInput, M as createBlockClient, Mn as EntityNames, N as createBlocks, Nn as EntityNoun, O as BlocksEventMap, On as fillTopic, P as defineBlocks, Pn as EntityRename, R as PortName, S as BlockClientSource, Sn as EntitySchema, T as BlockSet, Tn as entitySchema, _ as BlockProvider, a as BlockConsumes, b as BLOCK_EVENT_SOURCE, bn as BlockSchemas, c as BlockOf, d as ClientOf, f as ConsumedPorts, g as BlockEnvKey, h as defineBlock, i as BlockCategory, j as UniquePort, jn as blockNames, k as BlocksHooks, kn as generatedOptions, l as BlockOptionSchemas, m as UsingOptions, n as BLOCK_CATEGORIES, o as BlockDefinition, p as ProvidedPorts, r as Block, s as BlockInvalidates, t as AnyBlock, tn as AnyRecordBinding, u as BlockProvides, v as BlockWiring, w as BlockMap, wn as EntitySchemas, x as BlockClientOptions, xn as EntityFieldSpecs, y as BlockWorker } from "../define-block-COmMkx2x.js";
|
|
13
13
|
import { t as VisibleRange } from "../range-BN3kpJAE.js";
|
|
14
14
|
import { t as subjectKey } from "../block-subjects-Br2MQNFn.js";
|
|
15
|
-
import { t as BlockEnv } from "../block-env-
|
|
15
|
+
import { t as BlockEnv } from "../block-env-h_uPl2f_.js";
|
|
16
16
|
/** What a hook passes a block creator from the env. */
|
|
17
17
|
interface EnvBlockOptions {
|
|
18
18
|
readonly transport: BlockTransport;
|
|
@@ -27,6 +27,8 @@ interface InvoiceCharge {
|
|
|
27
27
|
readonly amount: Money;
|
|
28
28
|
readonly description?: string;
|
|
29
29
|
readonly createdAt?: Temporal.Instant;
|
|
30
|
+
/** The charge's extra columns (`options.chargeExtraColumns`). */
|
|
31
|
+
readonly fields?: Readonly<Record<string, unknown>>;
|
|
30
32
|
}
|
|
31
33
|
/** An invoice. `F` types the extra columns the `fields` schema describes. */
|
|
32
34
|
interface Invoice<F extends object = Record<never, never>> {
|
|
@@ -120,6 +122,8 @@ interface Invoices<F extends object = Record<never, never>> {
|
|
|
120
122
|
charge(invoiceId: string, charge: {
|
|
121
123
|
readonly amount: Money;
|
|
122
124
|
readonly description?: string;
|
|
125
|
+
/** The charge's extra columns (`options.chargeExtraColumns`) by name. */
|
|
126
|
+
readonly fields?: Readonly<Record<string, unknown>>;
|
|
123
127
|
}): AsyncResult<Invoice<F>>;
|
|
124
128
|
aging(organizationId: string, currency: string, asOf?: Temporal.PlainDate): AsyncResult<InvoiceAging>;
|
|
125
129
|
/**
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { n as isRecord } from "../../guards-CsRa6v57.js";
|
|
1
2
|
import { t as AsyncResult } from "../../result-8xza7w5W.js";
|
|
2
|
-
import { t as invoicesSqlOptions } from "../../options-
|
|
3
|
+
import { t as invoicesSqlOptions } from "../../options-CuaWhsQS.js";
|
|
3
4
|
import { n as event, t as defineEvents } from "../../event-map-DxfsFgQT.js";
|
|
4
5
|
import { A as recordsOf, C as optionalInstant, L as textOf, O as recordOf, U as rpcTransport, V as dbTransport, W as sqlTransport, a as bigintOf, d as enumOrThrow, j as requiredInstant, m as instantArg, n as applyTemporal, o as blockCall, w as optionalText } from "../../block-helpers-I7UzjNEf.js";
|
|
5
6
|
import { i as wrapTransport, n as extendBlock, r as withBlockHooks } from "../../block-hooks-CadxQ9-_.js";
|
|
@@ -86,7 +87,8 @@ function invoiceOf(value) {
|
|
|
86
87
|
id: textOf(charge["id"]),
|
|
87
88
|
amount: moneyOf(charge["amount"], currency, "invoice charge amount"),
|
|
88
89
|
description: optionalText(charge["description"]),
|
|
89
|
-
createdAt: optionalInstant(charge["createdAt"])
|
|
90
|
+
createdAt: optionalInstant(charge["createdAt"]),
|
|
91
|
+
fields: isRecord(charge["fields"]) ? charge["fields"] : void 0
|
|
90
92
|
})),
|
|
91
93
|
paidAt: optionalInstant(row["paid_at"]),
|
|
92
94
|
voidReason: optionalText(row["void_reason"]),
|
|
@@ -172,7 +174,8 @@ function createInvoices(options) {
|
|
|
172
174
|
invoice: invoiceId,
|
|
173
175
|
amount: amountText(charge.amount),
|
|
174
176
|
currency: charge.amount.currency,
|
|
175
|
-
description: charge.description ?? null
|
|
177
|
+
description: charge.description ?? null,
|
|
178
|
+
fields: charge.fields
|
|
176
179
|
}),
|
|
177
180
|
aging: (organizationId, currency, asOf) => amountsError(currency, []) === void 0 ? call("invoice_aging", {
|
|
178
181
|
tenant: organizationId,
|
|
@@ -4,14 +4,14 @@ import { Ct as Events } from "../../events-DVt3Z9hw.js";
|
|
|
4
4
|
import { _ as ConversationEventData, k as MessageEventData } from "../../index-D18su_r5.js";
|
|
5
5
|
import { a as dbTransport, i as RpcClient, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-BEtC_Kis.js";
|
|
6
6
|
import { a as BlockTransportMiddleware, d as extendBlock, f as withBlockHooks, n as BlockHooks, p as wrapTransport } from "../../block-hooks-DrA_d1dJ.js";
|
|
7
|
-
import { P as MessagingSqlOptions } from "../../authorization-
|
|
7
|
+
import { P as MessagingSqlOptions } from "../../authorization-D1P3VBOd.js";
|
|
8
8
|
import { a as isFileAnchor, i as fileAnchor, n as FileAnchor, o as conversationTopic, r as FileAnchorAt, t as AnchorRegion } from "../../anchors-sCLvYj-8.js";
|
|
9
9
|
import { _ as NotifyLevel, a as FollowTarget, b as UnreadCount, c as MessageEdit, d as MessageKind, f as MessageListOptions, g as NewMessage, h as MessagingOptions, i as ConversationSummary, l as MessageEdition, m as Messaging, n as ConversationAccess, o as Message, p as MessageReaction, r as ConversationKind, s as MessageCursor, t as Conversation, u as MessageFile, v as OpenConversation, x as createMessaging, y as RecordMention } from "../../messaging-D5z2TR37.js";
|
|
10
10
|
import { a as ThreadSummary, i as ThreadSummarizer, n as SummaryMessage, o as ThreadSummaryInput, r as SummaryTarget, s as ThreadSummaryOutput, t as SummarizeOptions } from "../../summaries-CUemsYwV.js";
|
|
11
11
|
import { Sn as EntitySchema, c as BlockOf } from "../../define-block-COmMkx2x.js";
|
|
12
|
-
import { p as SubscriptionStatus } from "../../topic-
|
|
13
|
-
import { n as TopicPort } from "../../watch-topic-
|
|
14
|
-
import { n as Controller, t as AuthPort } from "../../controller-
|
|
12
|
+
import { p as SubscriptionStatus } from "../../topic-BVq5RdsI.js";
|
|
13
|
+
import { n as TopicPort } from "../../watch-topic-BOclyLFd.js";
|
|
14
|
+
import { n as Controller, t as AuthPort } from "../../controller-DaWA9eWS.js";
|
|
15
15
|
type MentionScope = "channel" | "here";
|
|
16
16
|
interface ParsedMentions {
|
|
17
17
|
/** Mentioned user ids, lowercase, in order and without repeats. */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { b as DbError, f as Result } from "../../result-DTOQRyGY.js";
|
|
2
2
|
import { t as Aal } from "../../mfa-CM5r904M.js";
|
|
3
3
|
import { r as Block } from "../../define-block-COmMkx2x.js";
|
|
4
|
-
import { n as Controller, t as AuthPort } from "../../controller-
|
|
4
|
+
import { n as Controller, t as AuthPort } from "../../controller-DaWA9eWS.js";
|
|
5
5
|
import { t as AuthReply } from "../../auth-reply-BMPJQssh.js";
|
|
6
6
|
/** A factor as `auth.mfa.listFactors()` returns it. */
|
|
7
7
|
interface RawMfaFactor {
|
|
@@ -10,9 +10,9 @@ import { t as BlockProblemOptions } from "../../problem-NGBjN-TO.js";
|
|
|
10
10
|
import { c as BlockOf } from "../../define-block-COmMkx2x.js";
|
|
11
11
|
import { i as EventSink, t as CloudEvent } from "../../cloud-event-DXWmXrus.js";
|
|
12
12
|
import { g as SubscriberPolicy, i as AuthorizationHooks } from "../../authorization-hooks-CxwsRnfV.js";
|
|
13
|
-
import { p as SubscriptionStatus } from "../../topic-
|
|
14
|
-
import { n as TopicPort } from "../../watch-topic-
|
|
15
|
-
import { n as Controller, t as AuthPort } from "../../controller-
|
|
13
|
+
import { p as SubscriptionStatus } from "../../topic-BVq5RdsI.js";
|
|
14
|
+
import { n as TopicPort } from "../../watch-topic-BOclyLFd.js";
|
|
15
|
+
import { n as Controller, t as AuthPort } from "../../controller-DaWA9eWS.js";
|
|
16
16
|
import { n as VerifyOptions } from "../../signatures-jPr9JXyw.js";
|
|
17
17
|
import { a as NotificationItem, i as NotificationAction, n as NotificationMessage, o as NotificationSubject, r as NotificationSendResult, s as RenderedText, t as NotificationChannel } from "../../channel-B_kufDZy.js";
|
|
18
18
|
import { a as DeliveryTransport, c as UnsubscribeTarget, i as DeliverySendOptions, l as mailHeaders, n as DeliveryMessages, o as EmailMessage, r as DeliveryReceipt, s as MailCategory, t as DeliveryChannel } from "../../delivery-CWcbh87x.js";
|
|
@@ -5,7 +5,7 @@ import { n as BlockOptions } from "../../block-helpers-disoUWCp.js";
|
|
|
5
5
|
import { a as dbTransport, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-BEtC_Kis.js";
|
|
6
6
|
import { n as BlockHooks } from "../../block-hooks-DrA_d1dJ.js";
|
|
7
7
|
import { c as BlockOf } from "../../define-block-COmMkx2x.js";
|
|
8
|
-
import { n as Controller, t as AuthPort } from "../../controller-
|
|
8
|
+
import { n as Controller, t as AuthPort } from "../../controller-DaWA9eWS.js";
|
|
9
9
|
type ChecklistScope = "user" | "organization";
|
|
10
10
|
/** One step. `events` completes it when the outbox records one of those types. */
|
|
11
11
|
interface ChecklistStep<Id extends string = string> {
|