better-supabase 0.41.0 → 0.43.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-kHGNXFsd.d.ts → app-tables-CVMn4c4b.d.ts} +1 -1
- package/dist/{approvals-CTVaWq1O.d.ts → approvals-CYbTzQ7v.d.ts} +39 -1
- package/dist/{approvals-Qjn42OAZ.js → approvals-cyL5CmU7.js} +15 -3
- package/dist/{authorization-CS5Q1V7A.d.ts → authorization-hGBtxrnQ.d.ts} +57 -4
- package/dist/{automations-CJhRmPmq.js → automations-K0O3En6E.js} +4 -1
- package/dist/{bind-XrFxNm5r.d.ts → bind-DWAIKYvJ.d.ts} +1 -1
- package/dist/{block-env-CHFHOjvz.d.ts → block-env-C6OEu9Xk.d.ts} +3 -3
- package/dist/{block-subjects-Bz95_dqA.js → block-subjects-B1zfhFWC.js} +1 -1
- package/dist/{block-tables-EXcmuOJT.d.ts → block-tables-BIExrL2J.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/approvals/index.d.ts +2 -2
- package/dist/blocks/approvals/index.js +2 -2
- 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 +2 -2
- 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/comments/index.d.ts +4 -4
- package/dist/blocks/drive/index.d.ts +1 -1
- package/dist/blocks/entitlements/index.d.ts +2 -2
- package/dist/blocks/expenses/index.js +1 -1
- 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 +29 -6
- package/dist/blocks/invoices/index.js +29 -12
- package/dist/blocks/leave/index.js +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/quotes/index.d.ts +9 -4
- package/dist/blocks/quotes/index.js +5 -2
- 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/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-CjSPssgL.js +1 -0
- package/dist/cli/{add-BGErz-yb.js → add-fdZAY8C_.js} +10 -10
- package/dist/cli/{add-DU5HAq6w.js → add-uwUI80aZ.js} +2 -2
- package/dist/cli/{app-table-files-Drzpekpt.js → app-table-files-BR_7lT4u.js} +2 -2
- package/dist/cli/{app-tables-dZpH63--.js → app-tables-DoxrhJb1.js} +2 -2
- package/dist/cli/{backfill-B-p-19g6.js → backfill-BTMgDL6X.js} +1 -1
- package/dist/cli/bin.js +1 -1
- package/dist/cli/{blocks-Ews-FZZO.js → blocks-BgPbXNhB.js} +1 -1
- package/dist/cli/{blocks-iUjNl5yJ.js → blocks-Bj0LS3rF.js} +1 -1
- package/dist/cli/{cache-JT4JhdmX.js → cache-CEGpAmXJ.js} +1 -1
- package/dist/cli/{codemod-KIxYiazj.js → codemod-CaXGpQ10.js} +1 -1
- package/dist/cli/{content-mapper-DkXzxt6f.js → content-mapper-BJRfCnFX.js} +2 -2
- package/dist/cli/{doctor-VWanOD74.js → doctor-CHQDLcwL.js} +15 -15
- package/dist/cli/{gen-_lBdTgaR.js → gen-DSK152A3.js} +11 -11
- package/dist/cli/index.d.ts +1 -1
- package/dist/cli/index.js +6 -6
- package/dist/cli/{init-Cm6n4u_3.js → init-CPC1ceqC.js} +8 -8
- package/dist/cli/{live-D4iSuTmS.js → live-BFXisTDf.js} +2 -2
- package/dist/cli/{mcp-CHYX7utI.js → mcp-CrulrTBs.js} +2 -2
- package/dist/cli/{metadata-DLba0VjH.js → metadata-yePOltZY.js} +3 -3
- package/dist/cli/{migrate-nQhh0nEJ.js → migrate-kjYx7du-.js} +1 -1
- package/dist/cli/{migration-safety-C2d3BSTf.js → migration-safety-DnvCYRsw.js} +1 -1
- package/dist/cli/{migrations-BOmMcme9.js → migrations-ZYHA0gks.js} +2 -2
- package/dist/cli/{module-migration-DSDB473C.js → module-migration-Du7UHsO9.js} +2 -2
- package/dist/cli/{powersync-CAHvPkkb.js → powersync-BOxy1_xW.js} +3 -3
- package/dist/cli/powersync-BurpZLJB.js +1 -0
- package/dist/cli/{print-CahE8HYK.js → print-B4OqfSML.js} +2 -2
- package/dist/cli/{providers-CL5Z5Uj4.js → providers-KYOKi_jp.js} +1 -1
- package/dist/cli/{prune-workflows-C9xO0fRU.js → prune-workflows-7JISyAI7.js} +1 -1
- package/dist/cli/{remove-DIy7gthm.js → remove-DvncDSRp.js} +5 -5
- package/dist/cli/{render-CoCZr3Ru.js → render-C6dQ0C0Y.js} +3 -3
- package/dist/cli/{run-CVw8hmLk.js → run-BYiApqFR.js} +9 -9
- package/dist/cli/{run-BBj137Fn.js → run-DWDRg4vp.js} +27 -27
- package/dist/cli/{shared-BdKeo7xp.js → shared-DC86fQYk.js} +1 -1
- package/dist/cli/{snapshot-P2ww2xCt.js → snapshot-CwCG_YX2.js} +2 -2
- package/dist/cli/{source-BCs4oBl2.js → source-DDxRHVzk.js} +1 -1
- package/dist/cli/{spec-uCpXPLoF.js → spec-Cnxqc7kC.js} +2 -2
- package/dist/cli/{spec-oPbt9sbZ.js → spec-CvKJ6GpI.js} +1 -1
- package/dist/cli/{sql-layout-Bsnge2oW.js → sql-layout-BwbfVSR8.js} +2 -2
- package/dist/cli/{sync-Cv7iBRhe.js → sync-lpbLqJly.js} +4 -4
- package/dist/cli/{upgrade-C6jWNxkc.js → upgrade-34ZODJZj.js} +2 -2
- package/dist/cli/{upgrade-DV7jTRdh.js → upgrade-Cq4EFBH7.js} +5 -5
- package/dist/cli/{version-Hza4Q2PB.js → version-BGN5319Z.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-B7hnJFxh.js → config-BN17nVp1.js} +1 -1
- package/dist/{config-DwXYtmwt.js → config-C-eXOuhp.js} +3 -3
- package/dist/{context-tFoygone.d.ts → context-Dga2sgyx.d.ts} +3 -1
- package/dist/contract/index.d.ts +3 -3
- package/dist/{controller-phhsPHSz.d.ts → controller-BFOCK5AG.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-LfW6S2RW.d.ts → entitlements-C5k_9hHt.d.ts} +1 -1
- package/dist/eve/index.d.ts +1 -1
- package/dist/eve/index.js +1 -1
- package/dist/{field-errors-CMWRPBmF.d.ts → field-errors-LVBXokQN.d.ts} +4 -4
- package/dist/{index-X5igfnIi.d.ts → index-BA8sPQ49.d.ts} +2 -2
- package/dist/{index-fmrLdtVT.d.ts → index-BhmjjkMu.d.ts} +1 -1
- package/dist/{index-B21Pim3I.d.ts → index-CjN6kzvL.d.ts} +2 -2
- package/dist/{index-B-HuxATL.d.ts → index-D-SIdOiL.d.ts} +6 -6
- package/dist/{index-BXkPvYzd.d.ts → index-DBbdaYAH.d.ts} +1 -1
- package/dist/{index-D-uiT4Qz.d.ts → index-DUmsXPdh.d.ts} +1 -1
- package/dist/{index-RZqQdq1G.d.ts → index-DwP65vFk.d.ts} +2 -2
- package/dist/{instances-DJOknCJ0.js → instances-Bx94JGSW.js} +5 -0
- 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-Cm4mSrAX.d.ts → operations-J0PkKTaF.d.ts} +1 -1
- package/dist/{options-zsLpIqBA.js → options-B1oSaIZ4.js} +2 -1
- package/dist/{options-CYZH9uxU.js → options-BXiUftgG.js} +3 -1
- package/dist/{options-C5cLEJEa.js → options-ByxOMSXu.js} +2 -1
- package/dist/{options-CzxG2Phg.js → options-DLJTiX29.js} +3 -1
- package/dist/otel/index.js +4 -4
- package/dist/{permissions-r0Cxhxos.d.ts → permissions-Cp2qvVJo.d.ts} +1 -1
- package/dist/{ports-BJJJmfWK.d.ts → ports-C61eesjD.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-U47pzJMK.js → preset-yRJgGbn9.js} +2 -2
- package/dist/{project-Dng8tO8S.js → project-ps9mOsLx.js} +5 -5
- package/dist/{push-token-CA31xmQr.d.ts → push-token-2LRdwl_8.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/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 +3 -3
- package/dist/{sql-BudVz33a.js → sql-CWzlxS6f.js} +827 -291
- package/dist/ssr/index.d.ts +1 -1
- package/dist/svelte/index.d.ts +5 -5
- package/dist/{tenant-C2vnB0wX.d.ts → tenant-P7mo0ulH.d.ts} +1 -1
- package/dist/testing/index.d.ts +3 -3
- package/dist/testing/index.js +1 -1
- package/dist/{topic-CKN3kmoi.d.ts → topic-CjKlzHD-.d.ts} +1 -1
- package/dist/{types-D8Tltfdq.d.ts → types-VwM7DBvC.d.ts} +2 -2
- package/dist/vue/index.d.ts +5 -5
- package/dist/{watch-topic-0dXuJMuE.d.ts → watch-topic-jqBMNMs3.d.ts} +1 -1
- package/dist/workflow-sdk/world/index.js +1 -1
- package/dist/{workflow-sdk-vXuxBSrk.js → workflow-sdk-Bps7tpOv.js} +7 -1
- package/dist/yjs/index.d.ts +1 -1
- package/package.json +1 -1
- package/schemas/config-v1.json +37 -1
- package/dist/cli/add-CoP8iie6.js +0 -1
- package/dist/cli/powersync-nH-NLDjy.js +0 -1
|
@@ -67,6 +67,12 @@ interface Invoice<F extends object = Record<never, never>> {
|
|
|
67
67
|
readonly origin?: RecordRef;
|
|
68
68
|
/** For a deposit invoice: its share of the quote in basis points. */
|
|
69
69
|
readonly depositBps?: number;
|
|
70
|
+
/** For a fixed deposit invoice: its amount, tax included. */
|
|
71
|
+
readonly depositAmount?: Money;
|
|
72
|
+
/** A percentage off the whole invoice, when the table has the column. */
|
|
73
|
+
readonly discountBps?: number;
|
|
74
|
+
/** An amount off the whole invoice, after `discountBps`. */
|
|
75
|
+
readonly discountAmount?: Money;
|
|
70
76
|
/** Unit amounts include tax, so tax is counted out of them. */
|
|
71
77
|
readonly pricesIncludeTax: boolean;
|
|
72
78
|
readonly lines: readonly Line[];
|
|
@@ -87,6 +93,10 @@ interface InvoiceInput<F extends object = Record<never, never>> {
|
|
|
87
93
|
readonly origin?: RecordRef;
|
|
88
94
|
/** Unit amounts include tax. Needs the `prices_include_tax` column. */
|
|
89
95
|
readonly pricesIncludeTax?: boolean;
|
|
96
|
+
/** A percentage off the whole invoice. Needs the `discountBps` column. */
|
|
97
|
+
readonly discountBps?: number;
|
|
98
|
+
/** An amount off the whole invoice. Needs the `discountAmount` column. */
|
|
99
|
+
readonly discountAmount?: Money;
|
|
90
100
|
/** Values for the extra columns, by column name. */
|
|
91
101
|
readonly fields?: Partial<F> & Readonly<Record<string, unknown>>;
|
|
92
102
|
}
|
|
@@ -98,6 +108,8 @@ interface InvoicePatch<F extends object = Record<never, never>> {
|
|
|
98
108
|
readonly note?: string | null;
|
|
99
109
|
readonly depositBps?: number | null;
|
|
100
110
|
readonly pricesIncludeTax?: boolean;
|
|
111
|
+
readonly discountBps?: number;
|
|
112
|
+
readonly discountAmount?: Money;
|
|
101
113
|
readonly fields?: Partial<F> & Readonly<Record<string, unknown>>;
|
|
102
114
|
}
|
|
103
115
|
/** What is owed in one currency, by days past due. */
|
|
@@ -112,6 +124,10 @@ interface InvoiceAging {
|
|
|
112
124
|
readonly overdueCount: number;
|
|
113
125
|
}
|
|
114
126
|
/** `F` types the invoices' extra columns, from the `fields` schema. */
|
|
127
|
+
/** Who made a status change, for the state machine's history. */
|
|
128
|
+
interface InvoiceActorOptions {
|
|
129
|
+
readonly actor?: TransitionActor;
|
|
130
|
+
}
|
|
115
131
|
interface Invoices<F extends object = Record<never, never>> {
|
|
116
132
|
create(organizationId: string, input: InvoiceInput<F>, lines?: readonly LineInput[]): AsyncResult<Invoice<F>>;
|
|
117
133
|
update(invoiceId: string, patch: InvoicePatch<F>): AsyncResult<Invoice<F>>;
|
|
@@ -141,10 +157,13 @@ interface Invoices<F extends object = Record<never, never>> {
|
|
|
141
157
|
readonly lines?: readonly LineInput[];
|
|
142
158
|
readonly note?: string;
|
|
143
159
|
}): AsyncResult<Invoice<F>>;
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
160
|
+
/** The reason and `actor` go to the state machine's history. */
|
|
161
|
+
void(invoiceId: string, reason?: string, options?: InvoiceActorOptions): AsyncResult<Invoice<F>>;
|
|
162
|
+
/** The reason and `actor` go to the state machine's history. */
|
|
163
|
+
writeOff(invoiceId: string, reason?: string, options?: InvoiceActorOptions): AsyncResult<Invoice<F>>;
|
|
164
|
+
/** The reason and `actor` go to the state machine's history. */
|
|
165
|
+
reversePayment(paymentId: string, reason?: string, options?: InvoiceActorOptions): AsyncResult<Invoice<F>>;
|
|
166
|
+
removeCharge(chargeId: string, options?: InvoiceActorOptions): AsyncResult<Invoice<F>>;
|
|
148
167
|
/**
|
|
149
168
|
* Adds a charge on top of an issued invoice's total, in its currency. The
|
|
150
169
|
* balance rises, so a paid invoice is open again until the charge is paid.
|
|
@@ -154,15 +173,19 @@ interface Invoices<F extends object = Record<never, never>> {
|
|
|
154
173
|
readonly description?: string;
|
|
155
174
|
/** The charge's extra columns (`options.chargeExtraColumns`) by name. */
|
|
156
175
|
readonly fields?: Readonly<Record<string, unknown>>;
|
|
176
|
+
/** Who added it, for the state machine's history. */
|
|
177
|
+
readonly actor?: TransitionActor;
|
|
157
178
|
}): AsyncResult<Invoice<F>>;
|
|
158
179
|
aging(organizationId: string, currency: string, asOf?: Temporal.PlainDate): AsyncResult<InvoiceAging>;
|
|
159
180
|
payments(invoiceId: string): AsyncResult<readonly InvoicePayment[]>;
|
|
160
181
|
/**
|
|
161
182
|
* An invoice from an accepted quote: the full invoice once, minus the
|
|
162
|
-
* deposits already issued, or a deposit invoice for `depositBps` of it
|
|
183
|
+
* deposits already issued, or a deposit invoice for `depositBps` of it or a
|
|
184
|
+
* fixed `depositAmount`, tax included.
|
|
163
185
|
*/
|
|
164
186
|
fromQuote(quoteId: string, options?: {
|
|
165
187
|
readonly depositBps?: number;
|
|
188
|
+
readonly depositAmount?: Money;
|
|
166
189
|
}): AsyncResult<Invoice<F>>;
|
|
167
190
|
}
|
|
168
191
|
interface InvoicesOptions<S extends StandardSchemaV1 | undefined = undefined> extends BlockTemporalOptions {
|
|
@@ -203,4 +226,4 @@ type InvoicesEvents = {
|
|
|
203
226
|
export declare const invoicesEvents: Events<InvoicesEvents>;
|
|
204
227
|
/** The `invoices` block's manifest (ADR 0029). */
|
|
205
228
|
export declare const invoicesBlock: BlockOf<"invoices", typeof createInvoices, InvoicesEvents>;
|
|
206
|
-
export { type BlockHooks, type BlockTransport, type BlockTransportMiddleware, type Invoice, type InvoiceAging, type InvoiceCharge, type InvoiceInput, type InvoicePatch, type InvoicePayment, type InvoiceStatus, type Invoices, type InvoicesEvents, type InvoicesOptions, type Line, type LineInput, type RecordRef, type RpcClient, type Totals, dbTransport, extendBlock, rpcTransport, sqlTransport, withBlockHooks, wrapTransport };
|
|
229
|
+
export { type BlockHooks, type BlockTransport, type BlockTransportMiddleware, type Invoice, type InvoiceActorOptions, type InvoiceAging, type InvoiceCharge, type InvoiceInput, type InvoicePatch, type InvoicePayment, type InvoiceStatus, type Invoices, type InvoicesEvents, type InvoicesOptions, type Line, type LineInput, type RecordRef, type RpcClient, type Totals, dbTransport, extendBlock, rpcTransport, sqlTransport, withBlockHooks, wrapTransport };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as isRecord } from "../../guards-CsRa6v57.js";
|
|
2
2
|
import { t as AsyncResult } from "../../result-8xza7w5W.js";
|
|
3
|
-
import { t as invoicesSqlOptions } from "../../options-
|
|
3
|
+
import { t as invoicesSqlOptions } from "../../options-ByxOMSXu.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, m as instantArg, 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";
|
|
@@ -18,6 +18,7 @@ const STATUSES = [
|
|
|
18
18
|
"void",
|
|
19
19
|
"uncollectible"
|
|
20
20
|
];
|
|
21
|
+
const actorArg = (actor) => actor === void 0 ? {} : { actor };
|
|
21
22
|
const KNOWN = /* @__PURE__ */ new Set([
|
|
22
23
|
"id",
|
|
23
24
|
"tenant_id",
|
|
@@ -44,6 +45,9 @@ const KNOWN = /* @__PURE__ */ new Set([
|
|
|
44
45
|
"origin_type",
|
|
45
46
|
"origin_id",
|
|
46
47
|
"deposit_bps",
|
|
48
|
+
"deposit_amount",
|
|
49
|
+
"discount_bps",
|
|
50
|
+
"discount_amount",
|
|
47
51
|
"prices_include_tax",
|
|
48
52
|
"created_by",
|
|
49
53
|
"created_at",
|
|
@@ -107,6 +111,9 @@ function invoiceOf(value) {
|
|
|
107
111
|
note: optionalText(row["note"]),
|
|
108
112
|
origin: refOf(row["origin_type"], row["origin_id"]),
|
|
109
113
|
depositBps: typeof row["deposit_bps"] === "number" ? row["deposit_bps"] : void 0,
|
|
114
|
+
depositAmount: typeof row["deposit_amount"] === "string" ? moneyOf(row["deposit_amount"], currency, "invoice depositAmount") : void 0,
|
|
115
|
+
discountBps: typeof row["discount_bps"] === "number" ? row["discount_bps"] : void 0,
|
|
116
|
+
discountAmount: typeof row["discount_amount"] === "string" ? moneyOf(row["discount_amount"], currency, "invoice discountAmount") : void 0,
|
|
110
117
|
pricesIncludeTax: row["prices_include_tax"] === true,
|
|
111
118
|
lines: recordsOf(row["lines"], "invoice lines").map((line) => lineOf(line, currency)),
|
|
112
119
|
payments: recordsOf(row["payments"], "invoice payments").map((payment) => paymentOf(payment, currency)),
|
|
@@ -130,7 +137,7 @@ function createInvoices(options) {
|
|
|
130
137
|
})));
|
|
131
138
|
return withBlockHooks({
|
|
132
139
|
create: (organizationId, input, lines) => {
|
|
133
|
-
const { fields: extra, ...rest } = input;
|
|
140
|
+
const { fields: extra, discountAmount, ...rest } = input;
|
|
134
141
|
const amounts = (lines ?? []).map((line) => line.unitAmount);
|
|
135
142
|
const invalid = amountsError(input.currency, amounts);
|
|
136
143
|
if (invalid !== void 0) return AsyncResult.err(invalid);
|
|
@@ -140,17 +147,19 @@ function createInvoices(options) {
|
|
|
140
147
|
attrs: attrsArg({
|
|
141
148
|
...rest,
|
|
142
149
|
...currency === void 0 ? {} : { currency },
|
|
150
|
+
...discountAmount === void 0 ? {} : { discountAmount: amountText(discountAmount) },
|
|
143
151
|
...valid
|
|
144
152
|
}),
|
|
145
153
|
lines: lines === void 0 ? null : lines.map(lineArg)
|
|
146
154
|
}));
|
|
147
155
|
},
|
|
148
156
|
update: (invoiceId, patch) => {
|
|
149
|
-
const { fields: extra, ...rest } = patch;
|
|
157
|
+
const { fields: extra, discountAmount, ...rest } = patch;
|
|
150
158
|
return AsyncResult.from(() => fields.write({ ...extra })).andThen((valid) => invoice("update_invoice", {
|
|
151
159
|
invoice: invoiceId,
|
|
152
160
|
attrs: attrsArg({
|
|
153
161
|
...rest,
|
|
162
|
+
...discountAmount === void 0 ? {} : { discountAmount: amountText(discountAmount) },
|
|
154
163
|
...valid
|
|
155
164
|
})
|
|
156
165
|
}));
|
|
@@ -187,25 +196,32 @@ function createInvoices(options) {
|
|
|
187
196
|
note: credit.note ?? null
|
|
188
197
|
}) : AsyncResult.err(invalid);
|
|
189
198
|
},
|
|
190
|
-
void: (invoiceId, reason) => invoice("void_invoice", {
|
|
199
|
+
void: (invoiceId, reason, actorOptions) => invoice("void_invoice", {
|
|
191
200
|
invoice: invoiceId,
|
|
192
|
-
reason: reason ?? null
|
|
201
|
+
reason: reason ?? null,
|
|
202
|
+
...actorArg(actorOptions?.actor)
|
|
193
203
|
}),
|
|
194
|
-
writeOff: (invoiceId, reason) => invoice("write_off_invoice", {
|
|
204
|
+
writeOff: (invoiceId, reason, actorOptions) => invoice("write_off_invoice", {
|
|
195
205
|
invoice: invoiceId,
|
|
196
|
-
reason: reason ?? null
|
|
206
|
+
reason: reason ?? null,
|
|
207
|
+
...actorArg(actorOptions?.actor)
|
|
197
208
|
}),
|
|
198
|
-
reversePayment: (paymentId, reason) => invoice("reverse_invoice_payment", {
|
|
209
|
+
reversePayment: (paymentId, reason, actorOptions) => invoice("reverse_invoice_payment", {
|
|
199
210
|
payment: paymentId,
|
|
200
|
-
reason: reason ?? null
|
|
211
|
+
reason: reason ?? null,
|
|
212
|
+
...actorArg(actorOptions?.actor)
|
|
213
|
+
}),
|
|
214
|
+
removeCharge: (chargeId, actorOptions) => invoice("remove_invoice_charge", {
|
|
215
|
+
charge: chargeId,
|
|
216
|
+
...actorArg(actorOptions?.actor)
|
|
201
217
|
}),
|
|
202
|
-
removeCharge: (chargeId) => invoice("remove_invoice_charge", { charge: chargeId }),
|
|
203
218
|
charge: (invoiceId, charge) => invoice("add_invoice_charge", {
|
|
204
219
|
invoice: invoiceId,
|
|
205
220
|
amount: amountText(charge.amount),
|
|
206
221
|
currency: charge.amount.currency,
|
|
207
222
|
description: charge.description ?? null,
|
|
208
|
-
fields: charge.fields
|
|
223
|
+
fields: charge.fields,
|
|
224
|
+
...actorArg(charge.actor)
|
|
209
225
|
}),
|
|
210
226
|
aging: (organizationId, currency, asOf) => amountsError(currency, []) === void 0 ? call("invoice_aging", {
|
|
211
227
|
tenant: organizationId,
|
|
@@ -233,7 +249,8 @@ function createInvoices(options) {
|
|
|
233
249
|
}),
|
|
234
250
|
fromQuote: (quoteId, fromQuote = {}) => invoice("invoice_from_quote", {
|
|
235
251
|
quote: quoteId,
|
|
236
|
-
deposit_bps: fromQuote.depositBps ?? null
|
|
252
|
+
deposit_bps: fromQuote.depositBps ?? null,
|
|
253
|
+
...fromQuote.depositAmount === void 0 ? {} : { deposit_amount: amountText(fromQuote.depositAmount) }
|
|
237
254
|
})
|
|
238
255
|
}, options.hooks, {
|
|
239
256
|
block: "invoices",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as isRecord } from "../../guards-CsRa6v57.js";
|
|
2
2
|
import { t as temporal } from "../../temporal-required-w_2u4EDp.js";
|
|
3
|
-
import { t as leaveSqlOptions } from "../../options-
|
|
3
|
+
import { t as leaveSqlOptions } from "../../options-B1oSaIZ4.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, 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";
|
|
@@ -4,14 +4,14 @@ import { Ct as Events } from "../../events-DddDlibJ.js";
|
|
|
4
4
|
import { _ as ConversationEventData, k as MessageEventData } from "../../index-DjJUamhw.js";
|
|
5
5
|
import { a as dbTransport, i as RpcClient, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-CDmOUuLZ.js";
|
|
6
6
|
import { a as BlockTransportMiddleware, d as extendBlock, f as withBlockHooks, n as BlockHooks, p as wrapTransport } from "../../block-hooks-VW4knarE.js";
|
|
7
|
-
import { P as MessagingSqlOptions } from "../../authorization-
|
|
7
|
+
import { P as MessagingSqlOptions } from "../../authorization-hGBtxrnQ.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-CpQIhkFi.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-DBD7yhQg.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-CjKlzHD-.js";
|
|
13
|
+
import { n as TopicPort } from "../../watch-topic-jqBMNMs3.js";
|
|
14
|
+
import { n as Controller, t as AuthPort } from "../../controller-BFOCK5AG.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-DBD7yhQg.js";
|
|
4
|
-
import { n as Controller, t as AuthPort } from "../../controller-
|
|
4
|
+
import { n as Controller, t as AuthPort } from "../../controller-BFOCK5AG.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-DBD7yhQg.js";
|
|
11
11
|
import { i as EventSink, t as CloudEvent } from "../../cloud-event-BjgxkfJJ.js";
|
|
12
12
|
import { g as SubscriberPolicy, i as AuthorizationHooks } from "../../authorization-hooks-CR8TVvqo.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-CjKlzHD-.js";
|
|
14
|
+
import { n as TopicPort } from "../../watch-topic-jqBMNMs3.js";
|
|
15
|
+
import { n as Controller, t as AuthPort } from "../../controller-BFOCK5AG.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-Sj-efEhC.js";
|
|
|
5
5
|
import { a as dbTransport, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-CDmOUuLZ.js";
|
|
6
6
|
import { n as BlockHooks } from "../../block-hooks-VW4knarE.js";
|
|
7
7
|
import { c as BlockOf } from "../../define-block-DBD7yhQg.js";
|
|
8
|
-
import { n as Controller, t as AuthPort } from "../../controller-
|
|
8
|
+
import { n as Controller, t as AuthPort } from "../../controller-BFOCK5AG.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> {
|
|
@@ -7,9 +7,9 @@ import { Ct as Events, W as InvitationEventData, Z as OrganizationEventData, o a
|
|
|
7
7
|
import { r as BlockTemporalOptions } from "../../block-helpers-Sj-efEhC.js";
|
|
8
8
|
import { a as dbTransport, i as RpcClient, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-CDmOUuLZ.js";
|
|
9
9
|
import { a as BlockTransportMiddleware, d as extendBlock, f as withBlockHooks, n as BlockHooks, p as wrapTransport } from "../../block-hooks-VW4knarE.js";
|
|
10
|
-
import { N as PlatformRolesOption } from "../../authorization-
|
|
10
|
+
import { N as PlatformRolesOption } from "../../authorization-hGBtxrnQ.js";
|
|
11
11
|
import { c as BlockOf } from "../../define-block-DBD7yhQg.js";
|
|
12
|
-
import { n as Controller, t as AuthPort } from "../../controller-
|
|
12
|
+
import { n as Controller, t as AuthPort } from "../../controller-BFOCK5AG.js";
|
|
13
13
|
declare const INVITATION_ERRORS: {
|
|
14
14
|
readonly INVITATION_FORBIDDEN: "42501";
|
|
15
15
|
readonly INVITATION_ROLE_FORBIDDEN: "42501";
|
|
@@ -6,7 +6,7 @@ import { a as dbTransport, o as rpcTransport, s as sqlTransport, t as BlockTrans
|
|
|
6
6
|
import { n as BlockHooks } from "../../block-hooks-VW4knarE.js";
|
|
7
7
|
import { c as BlockOf } from "../../define-block-DBD7yhQg.js";
|
|
8
8
|
import { B as PermissionFlags, H as can, U as permissionFlags, V as PermissionSet, W as permissionMatches } from "../../index-1_-lg9Gc.js";
|
|
9
|
-
import { n as Controller, t as AuthPort } from "../../controller-
|
|
9
|
+
import { n as Controller, t as AuthPort } from "../../controller-BFOCK5AG.js";
|
|
10
10
|
interface PermissionsOptions extends BlockOptions {
|
|
11
11
|
/** `withBlockHooks` hooks around the client's methods. */
|
|
12
12
|
readonly hooks?: BlockHooks<Permissions>;
|
|
@@ -10,7 +10,7 @@ import { a as dbTransport, o as rpcTransport, s as sqlTransport, t as BlockTrans
|
|
|
10
10
|
import { n as BlockHooks } from "../../block-hooks-VW4knarE.js";
|
|
11
11
|
import { c as BlockOf } from "../../define-block-DBD7yhQg.js";
|
|
12
12
|
import { n as NotificationMessage, t as NotificationChannel } from "../../channel-B_kufDZy.js";
|
|
13
|
-
import { t as ExpoNotificationsLike } from "../../push-token-
|
|
13
|
+
import { t as ExpoNotificationsLike } from "../../push-token-2LRdwl_8.js";
|
|
14
14
|
type PushPlatform = "ios" | "android" | "web";
|
|
15
15
|
type PushProvider = "expo" | "fcm" | "apns" | "webpush";
|
|
16
16
|
/**
|
|
@@ -200,7 +200,11 @@ interface Quotes<F extends object = Record<never, never>> {
|
|
|
200
200
|
/** Changes a draft, or a quote with changes requested. */
|
|
201
201
|
update(quoteId: string, input: QuoteInput<F>): AsyncResult<Quote<F>>;
|
|
202
202
|
setLines(quoteId: string, lines: readonly QuoteLineInput[]): AsyncResult<Totals>;
|
|
203
|
-
/**
|
|
203
|
+
/**
|
|
204
|
+
* Sends it: resolves to the quote and the link token, returned only now. With
|
|
205
|
+
* `options.resend`, a rejected, withdrawn or expired quote is sent again in
|
|
206
|
+
* the same call.
|
|
207
|
+
*/
|
|
204
208
|
send(quoteId: string, options?: QuoteActorOptions): AsyncResult<{
|
|
205
209
|
readonly quote: Quote<F>;
|
|
206
210
|
readonly token: string;
|
|
@@ -227,7 +231,7 @@ interface Quotes<F extends object = Record<never, never>> {
|
|
|
227
231
|
* `options.workingCopy` the link stays.
|
|
228
232
|
*/
|
|
229
233
|
revise(quoteId: string, options?: QuoteActorOptions): AsyncResult<Quote<F>>;
|
|
230
|
-
/** Takes back a sent quote the customer hasn't accepted. */
|
|
234
|
+
/** Takes back a sent or expired quote the customer hasn't accepted. */
|
|
231
235
|
withdraw(quoteId: string, options?: QuoteActorOptions): AsyncResult<Quote<F>>;
|
|
232
236
|
/** The revisions sent so far, oldest first. */
|
|
233
237
|
versions(quoteId: string): AsyncResult<readonly QuoteVersionSummary[]>;
|
|
@@ -241,9 +245,10 @@ interface Quotes<F extends object = Record<never, never>> {
|
|
|
241
245
|
respond(token: string, decision: QuoteDecision, answer: QuoteAnswer): AsyncResult<QuoteResponse>;
|
|
242
246
|
/**
|
|
243
247
|
* A quote shared with the signed-in guest (portal), as the customer sees it.
|
|
244
|
-
* Marks it viewed.
|
|
248
|
+
* Marks it viewed. The service role passes the customer as `actor` for an
|
|
249
|
+
* app's own portal.
|
|
245
250
|
*/
|
|
246
|
-
portalView(quoteId: string): AsyncResult<PublicQuote>;
|
|
251
|
+
portalView(quoteId: string, options?: QuoteActorOptions): AsyncResult<PublicQuote>;
|
|
247
252
|
/**
|
|
248
253
|
* The signed-in guest's answer, with no token. The name defaults to the
|
|
249
254
|
* guest's email.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as isRecord } from "../../guards-CsRa6v57.js";
|
|
2
2
|
import { t as AsyncResult } from "../../result-8xza7w5W.js";
|
|
3
|
-
import { n as QUOTE_TO_ORDER, r as quotesSqlOptions, t as QUOTES_AUTOMATIONS } from "../../automations-
|
|
3
|
+
import { n as QUOTE_TO_ORDER, r as quotesSqlOptions, t as QUOTES_AUTOMATIONS } from "../../automations-K0O3En6E.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";
|
|
@@ -285,7 +285,10 @@ function createQuotes(options) {
|
|
|
285
285
|
note: answer.note ?? null,
|
|
286
286
|
selected: answer.selected ?? null
|
|
287
287
|
}, responseOf),
|
|
288
|
-
portalView: (quoteId) => call("portal_quote", {
|
|
288
|
+
portalView: (quoteId, viewOptions = {}) => call("portal_quote", {
|
|
289
|
+
quote: quoteId,
|
|
290
|
+
...actorArg(viewOptions)
|
|
291
|
+
}, publicOf),
|
|
289
292
|
portalRespond: (quoteId, decision, answer = {}) => call("respond_to_portal_quote", {
|
|
290
293
|
quote: quoteId,
|
|
291
294
|
decision,
|
|
@@ -7,9 +7,9 @@ import { o as BlockTenantOptions, r as BlockTemporalOptions } from "../../block-
|
|
|
7
7
|
import { a as dbTransport, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-CDmOUuLZ.js";
|
|
8
8
|
import { n as BlockHooks } from "../../block-hooks-VW4knarE.js";
|
|
9
9
|
import { c as BlockOf } from "../../define-block-DBD7yhQg.js";
|
|
10
|
-
import { p as SubscriptionStatus } from "../../topic-
|
|
11
|
-
import { n as TopicPort } from "../../watch-topic-
|
|
12
|
-
import { n as Controller, t as AuthPort } from "../../controller-
|
|
10
|
+
import { p as SubscriptionStatus } from "../../topic-CjKlzHD-.js";
|
|
11
|
+
import { n as TopicPort } from "../../watch-topic-jqBMNMs3.js";
|
|
12
|
+
import { n as Controller, t as AuthPort } from "../../controller-BFOCK5AG.js";
|
|
13
13
|
interface ReactionsOptions extends BlockTemporalOptions, BlockTenantOptions {
|
|
14
14
|
readonly transport: BlockTransport;
|
|
15
15
|
/**
|
|
@@ -7,7 +7,7 @@ import { t as BlockTransport } from "../../block-transport-CDmOUuLZ.js";
|
|
|
7
7
|
import { n as BlockHooks } from "../../block-hooks-VW4knarE.js";
|
|
8
8
|
import { c as BlockOf } from "../../define-block-DBD7yhQg.js";
|
|
9
9
|
import { p as ListQueryInput } from "../../list-query-BkbLV-Yc.js";
|
|
10
|
-
import { n as Controller } from "../../controller-
|
|
10
|
+
import { n as Controller } from "../../controller-BFOCK5AG.js";
|
|
11
11
|
import { t as RankNeighbors } from "../../rank-result-B_xLQCBV.js";
|
|
12
12
|
export declare const SAVED_VIEW_KINDS: readonly ["table", "board", "calendar", "timeline", "gantt"];
|
|
13
13
|
type SavedViewKind = (typeof SAVED_VIEW_KINDS)[number];
|
|
@@ -6,8 +6,8 @@ import { a as dbTransport, o as rpcTransport, s as sqlTransport, t as BlockTrans
|
|
|
6
6
|
import { n as BlockHooks } from "../../block-hooks-VW4knarE.js";
|
|
7
7
|
import { c as BlockOf } from "../../define-block-DBD7yhQg.js";
|
|
8
8
|
import { i as EventSink } from "../../cloud-event-BjgxkfJJ.js";
|
|
9
|
-
import { i as KeyboardPort } from "../../ports-
|
|
10
|
-
import { n as Controller } from "../../controller-
|
|
9
|
+
import { i as KeyboardPort } from "../../ports-C61eesjD.js";
|
|
10
|
+
import { n as Controller } from "../../controller-BFOCK5AG.js";
|
|
11
11
|
interface SearchOptions extends Pick<BlockOptions, "transport" | "service" | "schema" | "mappers"> {
|
|
12
12
|
/** `withBlockHooks` hooks around the methods. */
|
|
13
13
|
readonly hooks?: BlockHooks<Search>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference lib="esnext.temporal" />
|
|
2
2
|
import { b as DbError, f as Result } from "../../result-DTOQRyGY.js";
|
|
3
3
|
import { r as Block } from "../../define-block-DBD7yhQg.js";
|
|
4
|
-
import { n as Controller, t as AuthPort } from "../../controller-
|
|
4
|
+
import { n as Controller, t as AuthPort } from "../../controller-BFOCK5AG.js";
|
|
5
5
|
import { t as AuthReply } from "../../auth-reply-BMPJQssh.js";
|
|
6
6
|
/** An OAuth client as the Auth OAuth server describes it. */
|
|
7
7
|
interface RawOAuthClient {
|
|
@@ -5,7 +5,7 @@ import { n as BlockOptions } from "../../block-helpers-Sj-efEhC.js";
|
|
|
5
5
|
import { a as dbTransport, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-CDmOUuLZ.js";
|
|
6
6
|
import { n as BlockHooks } from "../../block-hooks-VW4knarE.js";
|
|
7
7
|
import { c as BlockOf } from "../../define-block-DBD7yhQg.js";
|
|
8
|
-
import { n as Controller, t as AuthPort } from "../../controller-
|
|
8
|
+
import { n as Controller, t as AuthPort } from "../../controller-BFOCK5AG.js";
|
|
9
9
|
import { StandardSchemaV1 } from "@standard-schema/spec";
|
|
10
10
|
/**
|
|
11
11
|
* One setting: its Standard Schema and the value `get` returns when none is
|
|
@@ -2,7 +2,7 @@ import { b as DbError } from "../../result-DTOQRyGY.js";
|
|
|
2
2
|
import { et as RecordRef } from "../../types-BzIYSSWK.js";
|
|
3
3
|
import { a as dbTransport, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-CDmOUuLZ.js";
|
|
4
4
|
import { c as BlockOf } from "../../define-block-DBD7yhQg.js";
|
|
5
|
-
import { n as Controller, t as AuthPort } from "../../controller-
|
|
5
|
+
import { n as Controller, t as AuthPort } from "../../controller-BFOCK5AG.js";
|
|
6
6
|
import { t as subjectKey } from "../../block-subjects-Bkieh2Xk.js";
|
|
7
7
|
import { c as Subjects, d as MY_WORK_KINDS, f as MyWorkKind, l as SubjectsOptions, n as MyWorkItem, o as ResolvedSubject, r as MyWorkOptions, s as SUBJECT_TITLES_LIMIT, t as MY_WORK_LIMIT, u as createSubjects } from "../../subjects-DNFE2rMl.js";
|
|
8
8
|
/** The `subjects` block's manifest (ADR 0029). */
|
|
@@ -7,7 +7,7 @@ import { n as Logger } from "../../logger-0LfhvwE4.js";
|
|
|
7
7
|
import { n as BlockOptions } from "../../block-helpers-Sj-efEhC.js";
|
|
8
8
|
import { n as BlockHooks } from "../../block-hooks-VW4knarE.js";
|
|
9
9
|
import { Sn as EntitySchema, c as BlockOf, ln as RecordBindingWrite, rn as RecordBinding } from "../../define-block-DBD7yhQg.js";
|
|
10
|
-
import { n as Controller, t as AuthPort } from "../../controller-
|
|
10
|
+
import { n as Controller, t as AuthPort } from "../../controller-BFOCK5AG.js";
|
|
11
11
|
import { t as RankNeighbors } from "../../rank-result-B_xLQCBV.js";
|
|
12
12
|
interface TagsOptions<S extends StandardSchemaV1 | undefined = undefined> extends BlockOptions {
|
|
13
13
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as dbTransport, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-CDmOUuLZ.js";
|
|
2
2
|
import { c as BlockOf } from "../../define-block-DBD7yhQg.js";
|
|
3
|
-
import { n as Controller } from "../../controller-
|
|
3
|
+
import { n as Controller } from "../../controller-BFOCK5AG.js";
|
|
4
4
|
import { a as UndoToken, c as undoToken, i as UndoOptions, n as Undo, o as createUndo, r as UndoCall, s as isUndoToken, t as UNDO_FUNCTIONS } from "../../undo-BCQMqIQN.js";
|
|
5
5
|
interface UndoEntry {
|
|
6
6
|
readonly id: number;
|
|
@@ -3,7 +3,7 @@ import { a as dbTransport, o as rpcTransport, s as sqlTransport, t as BlockTrans
|
|
|
3
3
|
import { n as StripeSource, t as StripeClient } from "../../stripe-Bl-sjnl6.js";
|
|
4
4
|
import { _ as reportUsageToStripe, a as Usage, c as UsageEntry, d as UsageMeterInfo, f as UsageOptions, g as createUsage, h as UsageStatus, i as ReportUsageResult, l as UsageHistoryEntry, m as UsageRecorded, n as RecordUsageOptions, o as UsageBatchRecorded, p as UsagePeriod, r as ReportUsageOptions, s as UsageBreakdownEntry, t as PurgeUsageOptions, u as UsageHistoryOptions } from "../../usage-CJDj5j15.js";
|
|
5
5
|
import { c as BlockOf } from "../../define-block-DBD7yhQg.js";
|
|
6
|
-
import { n as Controller, t as AuthPort } from "../../controller-
|
|
6
|
+
import { n as Controller, t as AuthPort } from "../../controller-BFOCK5AG.js";
|
|
7
7
|
/** The `usage` block's manifest (ADR 0029). */
|
|
8
8
|
export declare const usageBlock: BlockOf<"usage", typeof createUsage>;
|
|
9
9
|
interface UsageMeterControllerOptions {
|
|
@@ -5,9 +5,9 @@ import { Ct as Events, gt as WorkflowEventData } from "../../events-DddDlibJ.js"
|
|
|
5
5
|
import { a as dbTransport, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-CDmOUuLZ.js";
|
|
6
6
|
import { c as BlockOf } from "../../define-block-DBD7yhQg.js";
|
|
7
7
|
import { g as Workflows, n as WorkflowRun } from "../../workflows-D7HvWeNu.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-CjKlzHD-.js";
|
|
9
|
+
import { n as TopicPort } from "../../watch-topic-jqBMNMs3.js";
|
|
10
|
+
import { n as Controller, t as AuthPort } from "../../controller-BFOCK5AG.js";
|
|
11
11
|
import { $ as diffGraphs, A as WorkflowTriggerKind, B as WorkflowBuiltinNodeKind, C as WorkflowGrantPrincipal, D as WorkflowResolved, E as WorkflowPurpose, F as WorkflowNodeKindRow, G as WorkflowGraph, H as WorkflowConditionOperator, I as defineNodeKind, J as WorkflowGraphNode, K as WorkflowGraphDiff, L as GraphScope, M as WorkflowVersionOwner, N as WorkflowVersionStatus, O as WorkflowStepInfo, P as WorkflowNodeKindDefinition, Q as approved, R as ValidateGraphOptions, S as WorkflowGrantAction, T as WorkflowNodeRunStatus, U as WorkflowFilterCondition, V as WorkflowCondition, W as WorkflowFilterField, X as WorkflowNodeKind, Y as WorkflowNodeCondition, Z as WorkflowNodeKindInfo, _ as WorkflowCredential, a as CredentialInput, at as topologicalOrder, b as WorkflowDefinitionScope, c as GraphCompiler, d as RunInput, et as durationMs, f as TestRunInput, g as WorkflowBuilderHooks, h as WorkflowAlert, i as BuilderStarter, it as matchesFilter, j as WorkflowVersion, k as WorkflowTrigger, l as NodeRunRecord, m as VersionSaveOptions, n as BuilderOptions, nt as filterConditionOf, o as DefinitionInput, ot as validateGraph, p as TriggerInput, q as WorkflowGraphEdge, r as BuilderStartCall, rt as isBuiltinNodeKind, s as GrantInput, t as AlertInput, tt as evaluateCondition, u as PublishOptions, v as WorkflowDefinition, w as WorkflowNodeRun, x as WorkflowEditor, y as WorkflowDefinitionGrant, z as WORKFLOW_BUILTIN_NODE_KINDS } from "../../types-D--4dv5K.js";
|
|
12
12
|
import { a as GraphStepCall, c as graphRunFields, i as GraphRuntime, l as startNodeOf, n as GraphNodeCall, o as GraphSubject, r as GraphRunFields, s as executeGraph, t as GraphApprovalCall } from "../../executor-DL7cZ-3T.js";
|
|
13
13
|
/**
|
|
@@ -3,9 +3,9 @@ import { Ct as Events, _t as WorkflowRunEventData } from "../../events-DddDlibJ.
|
|
|
3
3
|
import { a as dbTransport, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-CDmOUuLZ.js";
|
|
4
4
|
import { c as BlockOf } from "../../define-block-DBD7yhQg.js";
|
|
5
5
|
import { _ as WorkflowsHooks, a as WorkflowRunStatus, c as WorkflowScheduleInput, d as WorkflowStartTicket, f as WorkflowStarter, g as Workflows, h as WorkflowTickResult, i as WorkflowRunRecord, l as WorkflowStartCall, m as WorkflowTickOptions, n as WorkflowRun, o as WorkflowRunsQuery, s as WorkflowSchedule, u as WorkflowStartRequest, v as WorkflowsOptions, y as createWorkflows } from "../../workflows-D7HvWeNu.js";
|
|
6
|
-
import { p as SubscriptionStatus } from "../../topic-
|
|
7
|
-
import { n as TopicPort } from "../../watch-topic-
|
|
8
|
-
import { n as Controller, t as AuthPort } from "../../controller-
|
|
6
|
+
import { p as SubscriptionStatus } from "../../topic-CjKlzHD-.js";
|
|
7
|
+
import { n as TopicPort } from "../../watch-topic-jqBMNMs3.js";
|
|
8
|
+
import { n as Controller, t as AuthPort } from "../../controller-BFOCK5AG.js";
|
|
9
9
|
interface WorkflowRunsControllerOptions {
|
|
10
10
|
readonly client: {
|
|
11
11
|
readonly runs: Pick<Workflows["runs"], "list">;
|
package/dist/claims/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { g as isSessionSnapshot, m as SessionSnapshot } from "../resolve-XlMQRUeG.js";
|
|
2
2
|
import { a as PERMISSIONS_TRUNCATED_CLAIM, i as PERMISSIONS_CLAIM, n as FEATURES_CLAIM, o as PERMISSION_CAP_CLAIM, r as MEMBERSHIPS_CLAIM, t as AUTHZ_VERSION_CLAIM } from "../index-IKfbX_39.js";
|
|
3
3
|
import { G as permissionCapOf } from "../types-LLCyr-xs.js";
|
|
4
|
-
import { i as decodeEntitlementClaim, o as ClaimsRecord, r as MembershipClaim, s as ClaimsSource, t as EntitlementClaimOptions } from "../entitlements-
|
|
5
|
-
import { t as tenantOf } from "../tenant-
|
|
6
|
-
import { n as isTruncated, r as permissionsOf, t as PermissionsOfOptions } from "../permissions-
|
|
4
|
+
import { i as decodeEntitlementClaim, o as ClaimsRecord, r as MembershipClaim, s as ClaimsSource, t as EntitlementClaimOptions } from "../entitlements-C5k_9hHt.js";
|
|
5
|
+
import { t as tenantOf } from "../tenant-P7mo0ulH.js";
|
|
6
|
+
import { n as isTruncated, r as permissionsOf, t as PermissionsOfOptions } from "../permissions-Cp2qvVJo.js";
|
|
7
7
|
import { a as isUserSession, i as isApiKeySession, n as AuthSession, r as UserSession, t as ApiKeySession } from "../view-eHgOOyRS.js";
|
|
8
8
|
export { AUTHZ_VERSION_CLAIM, type ApiKeySession, type AuthSession, type ClaimsRecord, type ClaimsSource, type EntitlementClaimOptions, FEATURES_CLAIM, MEMBERSHIPS_CLAIM, type MembershipClaim, PERMISSIONS_CLAIM, PERMISSIONS_TRUNCATED_CLAIM, PERMISSION_CAP_CLAIM, type PermissionsOfOptions, type SessionSnapshot, type UserSession, decodeEntitlementClaim, isApiKeySession, isSessionSnapshot, isTruncated, isUserSession, permissionCapOf, permissionsOf, tenantOf };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { t as addCommand } from "./add-fdZAY8C_.js";
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import { a as list, m as commandMeta, r as defineCliCommand } from "./command-67WobzTC.js";
|
|
2
2
|
import { i as plain } from "./style-B5-nByxb.js";
|
|
3
|
-
import { t as VERSION } from "./version-
|
|
3
|
+
import { t as VERSION } from "./version-BGN5319Z.js";
|
|
4
4
|
import { a as parseNames, n as CliError } from "./errors-DcJ_PayO.js";
|
|
5
5
|
import { r as readIfExists, t as display } from "./io-CQzy8PEZ.js";
|
|
6
|
-
import { t as loadSnapshot } from "./snapshot-
|
|
6
|
+
import { t as loadSnapshot } from "./snapshot-CwCG_YX2.js";
|
|
7
7
|
import { t as isRecord } from "./guards-DxwRG0Uv.js";
|
|
8
|
-
import { a as toCatalog } from "./source-
|
|
8
|
+
import { a as toCatalog } from "./source-DDxRHVzk.js";
|
|
9
9
|
import { a as findConfig, f as INTEGRATIONS, s as loadConfig } from "./config-DrrkMihk.js";
|
|
10
10
|
import { i as changeLines, n as PLAN_ARGS, r as applyPlan, u as planResult } from "./files-DQayErI8.js";
|
|
11
|
-
import { n as adoptionContext } from "./app-tables-
|
|
12
|
-
import { n as dataMigration } from "./migrations-
|
|
13
|
-
import { a as wiringFiles, d as libEntry, f as needsLib, i as wiringChecklist, l as importFrom, n as latestMigrationVersion, o as wiringFor, p as resolveIntegrations, s as TEMPLATES, u as isIntegration } from "./migration-safety-
|
|
11
|
+
import { n as adoptionContext } from "./app-tables-DoxrhJb1.js";
|
|
12
|
+
import { n as dataMigration } from "./migrations-ZYHA0gks.js";
|
|
13
|
+
import { a as wiringFiles, d as libEntry, f as needsLib, i as wiringChecklist, l as importFrom, n as latestMigrationVersion, o as wiringFor, p as resolveIntegrations, s as TEMPLATES, u as isIntegration } from "./migration-safety-DnvCYRsw.js";
|
|
14
14
|
import { n as installCommand, t as detectProject } from "./detect-BcUDaO8I.js";
|
|
15
15
|
import { d as setBlockInJson, f as setPathInConfig, h as setPresetInJson, m as setPresetInConfig, n as addBlocksToJson, p as setPathInJson, r as addBlocksToWiring, t as addBlocksToConfig, u as setBlockInConfig } from "./config-edit-C6sQ1MqT.js";
|
|
16
|
-
import { t as syncModules } from "./sync-
|
|
17
|
-
import { t as addModules } from "./add-
|
|
18
|
-
import { t as appTablePlan } from "./app-table-files-
|
|
19
|
-
import { t as blockNames } from "./blocks-
|
|
16
|
+
import { t as syncModules } from "./sync-lpbLqJly.js";
|
|
17
|
+
import { t as addModules } from "./add-uwUI80aZ.js";
|
|
18
|
+
import { t as appTablePlan } from "./app-table-files-BR_7lT4u.js";
|
|
19
|
+
import { t as blockNames } from "./blocks-Bj0LS3rF.js";
|
|
20
20
|
import { i as sourceArgs, n as SOURCE_ARGS } from "./source-args-Bz5QQne2.js";
|
|
21
21
|
import { existsSync } from "node:fs";
|
|
22
22
|
import { dirname, join, posix, resolve } from "node:path";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { n as CliError } from "./errors-DcJ_PayO.js";
|
|
2
2
|
import { o as providerLabel } from "./authorization-DJkkOjjG.js";
|
|
3
3
|
import { r as applyPlan } from "./files-DQayErI8.js";
|
|
4
|
-
import { i as providerOwnsMemberships, r as layoutFor, t as MEMBERSHIP_CLAIM_MODULES } from "./providers-
|
|
4
|
+
import { i as providerOwnsMemberships, r as layoutFor, t as MEMBERSHIP_CLAIM_MODULES } from "./providers-KYOKi_jp.js";
|
|
5
5
|
import { n as addBlocksToJson, s as keyText, t as addBlocksToConfig } from "./config-edit-C6sQ1MqT.js";
|
|
6
|
-
import { a as write, i as unlistedModuleFiles, r as nextStep } from "./sync-
|
|
6
|
+
import { a as write, i as unlistedModuleFiles, r as nextStep } from "./sync-lpbLqJly.js";
|
|
7
7
|
import { basename, dirname } from "node:path";
|
|
8
8
|
import { readFile } from "node:fs/promises";
|
|
9
9
|
import { SQL_MODULES, resolveBlocks } from "better-supabase/sql";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { n as CliError } from "./errors-DcJ_PayO.js";
|
|
2
2
|
import { h as subjectTagArgs } from "./config-DrrkMihk.js";
|
|
3
3
|
import { d as readSupabaseToml, n as declarativeSchemasDir } from "./supabase-toml-B6-eEV5p.js";
|
|
4
|
-
import { r as layoutFor } from "./providers-
|
|
5
|
-
import { r as literal } from "./live-
|
|
4
|
+
import { r as layoutFor } from "./providers-KYOKi_jp.js";
|
|
5
|
+
import { r as literal } from "./live-BFXisTDf.js";
|
|
6
6
|
import { join, resolve, sep } from "node:path";
|
|
7
7
|
import { FIELD_FORMATS } from "better-supabase/config";
|
|
8
8
|
import { APP_TABLES_MODULE, renderBlocks, setTableFeature } from "better-supabase/sql";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as accessProviderMode } from "./authorization-DJkkOjjG.js";
|
|
2
|
-
import { o as writtenByBlocks } from "./sql-layout-
|
|
3
|
-
import { s as qualified, t as catalogOf } from "./shared-
|
|
2
|
+
import { o as writtenByBlocks } from "./sql-layout-BwbfVSR8.js";
|
|
3
|
+
import { s as qualified, t as catalogOf } from "./shared-DC86fQYk.js";
|
|
4
4
|
import { declaredTables, resolveBlocks } from "better-supabase/sql";
|
|
5
5
|
// src/cli/doctor/app-tables.ts
|
|
6
6
|
/**
|
|
@@ -3,7 +3,7 @@ import { n as CliError, r as errorText } from "./errors-DcJ_PayO.js";
|
|
|
3
3
|
import { i as isLocalDatabaseUrl, r as databaseHost } from "./agent-Tqq3MAqx.js";
|
|
4
4
|
import { l as stdinDatabaseUrl, n as databaseUrl } from "./config-DrrkMihk.js";
|
|
5
5
|
import { t as connect } from "./db-B8zfxjl2.js";
|
|
6
|
-
import { n as ident } from "./live-
|
|
6
|
+
import { n as ident } from "./live-BFXisTDf.js";
|
|
7
7
|
import { r as STACK_ARG, t as DB_URL_STDIN_ARG } from "./source-args-Bz5QQne2.js";
|
|
8
8
|
// src/cli/commands/backfill.ts
|
|
9
9
|
const DEFAULT_BATCH = 1e3;
|
package/dist/cli/bin.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { n as blocksListCommand, r as blocksSearchCommand, i as blocksViewCommand } from "./blocks-
|
|
1
|
+
export { n as blocksListCommand, r as blocksSearchCommand, i as blocksViewCommand } from "./blocks-Bj0LS3rF.js";
|