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
|
@@ -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-DtECa_QW.js";
|
|
3
3
|
import { t as Agent } from "../../agents-BAiLeoR-.js";
|
|
4
4
|
import { R as AiToolPolicy, t as AiChat, w as AiModerationStage, x as AiModerationAction } from "../../ai-chat-rQ7Ftq9W.js";
|
|
5
|
-
import { r as AuthorizationOperation } from "../../authorization-
|
|
6
|
-
import { t as OperationTable } from "../../operations-
|
|
5
|
+
import { r as AuthorizationOperation } from "../../authorization-hGBtxrnQ.js";
|
|
6
|
+
import { t as OperationTable } from "../../operations-J0PkKTaF.js";
|
|
7
7
|
import { i as SearchToolOptions, r as ResultsFilter } from "../../embeddings-C2PBJ2Lx.js";
|
|
8
8
|
import { n as GatewayOptions } from "../../gateway-options-Mut8jih_.js";
|
|
9
9
|
import { LanguageModel, LanguageModelMiddleware, StopCondition, ToolLoopAgent, ToolLoopAgentSettings, ToolSet } from "ai";
|
|
@@ -140,6 +140,29 @@ interface ApprovalTenantPolicy {
|
|
|
140
140
|
readonly createdAt: Temporal.Instant;
|
|
141
141
|
readonly updatedAt?: Temporal.Instant;
|
|
142
142
|
}
|
|
143
|
+
/**
|
|
144
|
+
* The app's own policy for one request, which the service role passes to
|
|
145
|
+
* `request`. It only tightens the configured and stored policies for the
|
|
146
|
+
* subject type and action: their steps come first, the stricter mode wins,
|
|
147
|
+
* self-approval needs both to allow it and the shorter expiry applies. Without
|
|
148
|
+
* a configured or stored policy it is the request's whole policy.
|
|
149
|
+
*/
|
|
150
|
+
interface ApprovalRequestPolicy {
|
|
151
|
+
/**
|
|
152
|
+
* In order. `required` is a count (`1` for any approver, `n` for a quorum) or
|
|
153
|
+
* `"all"`: every named user, or every holder of `approvers.permission`.
|
|
154
|
+
*/
|
|
155
|
+
readonly steps: readonly ApprovalStepInput[];
|
|
156
|
+
readonly mode?: ApprovalMode;
|
|
157
|
+
readonly selfApproval?: boolean;
|
|
158
|
+
/** An ISO 8601 duration or Postgres interval, such as `P2D`. */
|
|
159
|
+
readonly expiresIn?: string;
|
|
160
|
+
/**
|
|
161
|
+
* The employee whose manager an `approvers.manager` step asks, instead of the
|
|
162
|
+
* requester's. Needs the employees block.
|
|
163
|
+
*/
|
|
164
|
+
readonly managerOf?: string;
|
|
165
|
+
}
|
|
143
166
|
/** A new policy needs `subjectType`, `action` and `name`; `id` changes one. */
|
|
144
167
|
interface ApprovalPolicyInput {
|
|
145
168
|
readonly id?: string;
|
|
@@ -158,6 +181,11 @@ interface ApprovalPolicyInput {
|
|
|
158
181
|
/** A Postgres interval such as `3 days`; `null` removes it. */
|
|
159
182
|
readonly expiresIn?: string | null;
|
|
160
183
|
readonly enabled?: boolean;
|
|
184
|
+
/**
|
|
185
|
+
* Values for `options.policyExtraColumns`, keyed by column name; a key left
|
|
186
|
+
* out keeps its value.
|
|
187
|
+
*/
|
|
188
|
+
readonly fields?: Readonly<Record<string, unknown>>;
|
|
161
189
|
}
|
|
162
190
|
interface ApprovalDecision {
|
|
163
191
|
readonly id: string;
|
|
@@ -193,6 +221,16 @@ interface ApprovalRequestInput {
|
|
|
193
221
|
* `options.tenantless`; the block's `tenant` is not needed.
|
|
194
222
|
*/
|
|
195
223
|
readonly tenantless?: boolean;
|
|
224
|
+
/**
|
|
225
|
+
* Files the request under the app's own policy as well, such as a workflow
|
|
226
|
+
* node's approvers. Only the service role may pass it.
|
|
227
|
+
*/
|
|
228
|
+
readonly policy?: ApprovalRequestPolicy;
|
|
229
|
+
/**
|
|
230
|
+
* The user the service role files the request for. They are its requester, so
|
|
231
|
+
* they can't approve it unless the policy allows self-approval.
|
|
232
|
+
*/
|
|
233
|
+
readonly requestedBy?: string;
|
|
196
234
|
}
|
|
197
235
|
/** Who decides when the service role calls `approve` or `reject`. */
|
|
198
236
|
interface ApprovalDecideOptions {
|
|
@@ -279,4 +317,4 @@ interface Approvals<F extends object = Record<never, never>> {
|
|
|
279
317
|
declare function approvalFingerprint(value: unknown): Promise<string>;
|
|
280
318
|
/** The `approvals` SQL module as typed calls. */
|
|
281
319
|
declare function createApprovals<S extends StandardSchemaV1 | undefined = undefined>(options: ApprovalsOptions<S>): Approvals<FieldsOf<S>>;
|
|
282
|
-
export {
|
|
320
|
+
export { ApprovalsOptions as _, ApprovalMode as a, ApprovalRequestDetail as c, ApprovalRequirement as d, ApprovalStatus as f, Approvals as g, ApprovalTenantPolicy as h, ApprovalListOptions as i, ApprovalRequestInput as l, ApprovalStepInput as m, ApprovalDecideOptions as n, ApprovalPolicyInput as o, ApprovalStep as p, ApprovalDecision as r, ApprovalRequest as s, ApprovalApprovers as t, ApprovalRequestPolicy as u, approvalFingerprint as v, createApprovals as y };
|
|
@@ -122,11 +122,17 @@ function conditionsOf(value) {
|
|
|
122
122
|
if (!isFilterGroup(value)) throw new TypeError(`approval conditions are ${JSON.stringify(value)}`);
|
|
123
123
|
return value;
|
|
124
124
|
}
|
|
125
|
+
/** `required: "all"` over named users is their count, as the SQL expects. */
|
|
126
|
+
const stepInput = (step) => step.required === "all" && step.approvers.users !== void 0 && Object.keys(step.approvers).length === 1 ? {
|
|
127
|
+
...step,
|
|
128
|
+
required: step.approvers.users.length
|
|
129
|
+
} : step;
|
|
125
130
|
function tenantPolicyOf(value, fn) {
|
|
126
131
|
const row = recordOf(value, fn);
|
|
127
132
|
const expiresIn = optionalText(row["expiresIn"]);
|
|
128
133
|
const effect = optionalText(row["effect"]);
|
|
129
134
|
const conditions = row["conditions"];
|
|
135
|
+
const fields = row["fields"];
|
|
130
136
|
return {
|
|
131
137
|
id: textOf(row["id"]),
|
|
132
138
|
organizationId: optionalText(row["organizationId"]) ?? null,
|
|
@@ -141,7 +147,8 @@ function tenantPolicyOf(value, fn) {
|
|
|
141
147
|
createdAt: requiredInstant(row["createdAt"], "createdAt"),
|
|
142
148
|
...conditions === null || conditions === void 0 ? {} : { conditions: conditionsOf(conditions) },
|
|
143
149
|
...expiresIn === void 0 ? {} : { expiresIn },
|
|
144
|
-
...instant(row["updatedAt"], "updatedAt")
|
|
150
|
+
...instant(row["updatedAt"], "updatedAt"),
|
|
151
|
+
...isRecord(fields) ? { fields } : {}
|
|
145
152
|
};
|
|
146
153
|
}
|
|
147
154
|
function decisionOf(value) {
|
|
@@ -207,7 +214,7 @@ function createApprovals(options) {
|
|
|
207
214
|
}));
|
|
208
215
|
const tenantOr = (tenantless) => tenantless === true ? AsyncResult.ok(null) : tenant();
|
|
209
216
|
return withBlockHooks({
|
|
210
|
-
request: (subject, { action, reason, payload, fingerprint, tenantless, ...extra }) => tenantOr(tenantless).andThen((organizationId) => AsyncResult.from(() => extraFieldsArg(fields, extra)).andThen((more) => one("request_approval", {
|
|
217
|
+
request: (subject, { action, reason, payload, fingerprint, tenantless, policy, requestedBy, ...extra }) => tenantOr(tenantless).andThen((organizationId) => AsyncResult.from(() => extraFieldsArg(fields, extra)).andThen((more) => one("request_approval", {
|
|
211
218
|
tenant: organizationId,
|
|
212
219
|
subject_type: subject.type,
|
|
213
220
|
subject_id: subject.id,
|
|
@@ -215,7 +222,12 @@ function createApprovals(options) {
|
|
|
215
222
|
reason: reason ?? null,
|
|
216
223
|
payload: payload ?? {},
|
|
217
224
|
...more,
|
|
218
|
-
...fingerprint === void 0 ? {} : { fingerprint }
|
|
225
|
+
...fingerprint === void 0 ? {} : { fingerprint },
|
|
226
|
+
...policy === void 0 ? {} : { policy: {
|
|
227
|
+
...policy,
|
|
228
|
+
steps: policy.steps.map(stepInput)
|
|
229
|
+
} },
|
|
230
|
+
...requestedBy === void 0 ? {} : { requested_by: requestedBy }
|
|
219
231
|
}))),
|
|
220
232
|
approve: (id, comment, decideOptions) => decide(id, "approved", comment, decideOptions),
|
|
221
233
|
reject: (id, comment, decideOptions) => decide(id, "rejected", comment, decideOptions),
|
|
@@ -173,9 +173,9 @@ interface BlockNameRegistry {
|
|
|
173
173
|
readonly "decisions": "id" | "request" | "tenant" | "step" | "approver" | "decision" | "delegateTo" | "comment" | "createdAt";
|
|
174
174
|
readonly "policies": "id" | "tenant" | "subjectType" | "action" | "name" | "conditions" | "mode" | "steps" | "selfApproval" | "expiresIn" | "enabled" | "createdBy" | "createdAt" | "updatedAt" | "effect";
|
|
175
175
|
};
|
|
176
|
-
readonly functions: "approval_effective_policy" | "approval_eligible" | "approval_finalize" | "approval_notify" | "approval_policy" | "approval_requirement" | "cancel_approval" | "consume_approval" | "decide_approval" | "delegate_approval" | "escalate_approvals" | "expire_approvals" | "get_approval" | "is_approved" | "list_approvals" | "open_approval" | "remind_approvals" | "request_approval";
|
|
176
|
+
readonly functions: "approval_effective_policy" | "approval_eligible" | "approval_finalize" | "approval_notify" | "approval_policy" | "approval_policy_tighten" | "approval_requirement" | "cancel_approval" | "consume_approval" | "decide_approval" | "delegate_approval" | "escalate_approvals" | "expire_approvals" | "get_approval" | "is_approved" | "list_approvals" | "open_approval" | "remind_approvals" | "request_approval";
|
|
177
177
|
readonly actions: "read" | "request" | "manage";
|
|
178
|
-
readonly hooks: "before_approval_request" | "after_approval_request" | "before_approval_decide" | "after_approval_decide";
|
|
178
|
+
readonly hooks: "before_approval_request" | "after_approval_request" | "before_approval_decide" | "after_approval_decide" | "approval_notification";
|
|
179
179
|
readonly entities: {
|
|
180
180
|
readonly "approval": "id" | "tenant_id" | "subject_type" | "subject_id" | "action" | "policy" | "step" | "status" | "requested_by" | "reason" | "payload" | "expires_at" | "reminded_at" | "decided_at" | "fingerprint" | "consumed_at" | "created_at";
|
|
181
181
|
};
|
|
@@ -953,7 +953,7 @@ interface BlockNameRegistry {
|
|
|
953
953
|
};
|
|
954
954
|
readonly "invoices": {
|
|
955
955
|
readonly tables: {
|
|
956
|
-
readonly "invoices": "id" | "tenant" | "kind" | "number" | "identifier" | "original" | "title" | "companyType" | "companyId" | "contactType" | "contactId" | "currency" | "status" | "termsDays" | "issuedOn" | "dueOn" | "paidTotal" | "creditedTotal" | "paidAt" | "voidedAt" | "voidReason" | "writeOffReason" | "note" | "originType" | "originId" | "depositBps" | "pricesIncludeTax" | "createdBy" | "createdAt" | "updatedAt" | "listTotal" | "discountTotal" | "subtotal" | "taxTotal" | "total";
|
|
956
|
+
readonly "invoices": "id" | "tenant" | "kind" | "number" | "identifier" | "original" | "title" | "companyType" | "companyId" | "contactType" | "contactId" | "currency" | "status" | "termsDays" | "issuedOn" | "dueOn" | "paidTotal" | "creditedTotal" | "paidAt" | "voidedAt" | "voidReason" | "writeOffReason" | "note" | "originType" | "originId" | "depositBps" | "depositAmount" | "discountBps" | "discountAmount" | "pricesIncludeTax" | "createdBy" | "createdAt" | "updatedAt" | "listTotal" | "discountTotal" | "subtotal" | "taxTotal" | "total";
|
|
957
957
|
readonly "lines": "id" | "tenant" | "parent" | "productType" | "productId" | "description" | "quantity" | "unitAmount" | "discountBps" | "taxRateBps" | "taxCode" | "position" | "createdAt";
|
|
958
958
|
readonly "charges": "id" | "tenant" | "invoice" | "amount" | "currency" | "description" | "createdBy" | "createdAt";
|
|
959
959
|
};
|
|
@@ -961,7 +961,7 @@ interface BlockNameRegistry {
|
|
|
961
961
|
readonly actions: "read" | "write" | "manage" | "create" | "update" | "issue" | "payment" | "credit" | "charge" | "void" | "writeOff" | "reverse" | "delete";
|
|
962
962
|
readonly hooks: "before_invoice_issue" | "after_invoice_issue" | "before_invoice_payment" | "after_invoice_payment";
|
|
963
963
|
readonly entities: {
|
|
964
|
-
readonly "invoice": "id" | "tenant_id" | "kind" | "number" | "identifier" | "original_id" | "title" | "company_type" | "company_id" | "contact_type" | "contact_id" | "currency" | "status" | "terms_days" | "issued_on" | "due_on" | "paid_total" | "credited_total" | "paid_at" | "voided_at" | "void_reason" | "write_off_reason" | "note" | "origin_type" | "origin_id" | "deposit_bps" | "prices_include_tax" | "created_by" | "created_at" | "updated_at" | "list_total" | "discount_total" | "subtotal" | "tax_total" | "total";
|
|
964
|
+
readonly "invoice": "id" | "tenant_id" | "kind" | "number" | "identifier" | "original_id" | "title" | "company_type" | "company_id" | "contact_type" | "contact_id" | "currency" | "status" | "terms_days" | "issued_on" | "due_on" | "paid_total" | "credited_total" | "paid_at" | "voided_at" | "void_reason" | "write_off_reason" | "note" | "origin_type" | "origin_id" | "deposit_bps" | "deposit_amount" | "discount_bps" | "discount_amount" | "prices_include_tax" | "created_by" | "created_at" | "updated_at" | "list_total" | "discount_total" | "subtotal" | "tax_total" | "total";
|
|
965
965
|
};
|
|
966
966
|
readonly primary: "invoice";
|
|
967
967
|
};
|
|
@@ -2077,6 +2077,16 @@ type ApprovalsSqlOptions = {
|
|
|
2077
2077
|
/** Subject types whose requests may have no organization. */
|
|
2078
2078
|
readonly tenantless?: readonly string[];
|
|
2079
2079
|
readonly extraColumns?: ExtraColumns;
|
|
2080
|
+
/**
|
|
2081
|
+
* `false` sends none of the block's approval notifications, so the app can
|
|
2082
|
+
* send its own from the `approval.*` events. Default `true`.
|
|
2083
|
+
*/
|
|
2084
|
+
readonly notifications?: boolean;
|
|
2085
|
+
/**
|
|
2086
|
+
* Columns the app adds to `approval_policies`, such as a description. Needs
|
|
2087
|
+
* `tenantPolicies`; `savePolicy` writes them from `fields`.
|
|
2088
|
+
*/
|
|
2089
|
+
readonly policyExtraColumns?: ExtraColumns;
|
|
2080
2090
|
};
|
|
2081
2091
|
/** `blocks.attachments.options`. */
|
|
2082
2092
|
type AttachmentsSqlOptions = {
|
|
@@ -2438,6 +2448,18 @@ type ExpensesSqlOptions = {
|
|
|
2438
2448
|
* so may a holder of `permissions.withdraw` (default the `update` key).
|
|
2439
2449
|
*/
|
|
2440
2450
|
readonly withdrawApproved?: boolean;
|
|
2451
|
+
/**
|
|
2452
|
+
* Without reports: each submitted expense files a request with the approvals
|
|
2453
|
+
* block, whose final decision approves or rejects it. `decideExpense` is
|
|
2454
|
+
* refused while that request waits. The expense's owner is the requester;
|
|
2455
|
+
* with `owner: "employee"`, a manager step asks the employee's manager.
|
|
2456
|
+
*/
|
|
2457
|
+
readonly standaloneApprovals?: boolean;
|
|
2458
|
+
/**
|
|
2459
|
+
* The approval policy of `standaloneApprovals`. Default: one step for holders
|
|
2460
|
+
* of the approve permission.
|
|
2461
|
+
*/
|
|
2462
|
+
readonly policy?: unknown;
|
|
2441
2463
|
};
|
|
2442
2464
|
/**
|
|
2443
2465
|
* A custom context's source: the table and column that hold a tenant's value,
|
|
@@ -2566,6 +2588,12 @@ type InvoicesSqlOptions = {
|
|
|
2566
2588
|
*/
|
|
2567
2589
|
readonly linePositionKey?: boolean;
|
|
2568
2590
|
readonly paymentsAfterWriteOff?: boolean;
|
|
2591
|
+
/**
|
|
2592
|
+
* The kind column's value that marks a deposit invoice, one of the values
|
|
2593
|
+
* `values.invoices.kind.invoice` maps to. `fromQuote` writes it on a deposit
|
|
2594
|
+
* invoice and finds the deposits to deduct by it and the quote link.
|
|
2595
|
+
*/
|
|
2596
|
+
readonly depositKind?: string;
|
|
2569
2597
|
};
|
|
2570
2598
|
/** `blocks.knowledge.options`. */
|
|
2571
2599
|
type KnowledgeSqlOptions = {
|
|
@@ -2627,6 +2655,12 @@ type LeaveSqlOptions = {
|
|
|
2627
2655
|
readonly approvals?: boolean;
|
|
2628
2656
|
readonly owner?: "user" | "employee";
|
|
2629
2657
|
readonly reapprove?: boolean;
|
|
2658
|
+
/**
|
|
2659
|
+
* `"employee"` makes the request's employee the approval's requester, so they
|
|
2660
|
+
* can't approve their own leave, and points a manager step at their manager
|
|
2661
|
+
* instead of the filer's. Needs `owner: "employee"`. Default `"filer"`.
|
|
2662
|
+
*/
|
|
2663
|
+
readonly approvalOwner?: "filer" | "employee";
|
|
2630
2664
|
};
|
|
2631
2665
|
/** `blocks.memory.options`. */
|
|
2632
2666
|
type MemorySqlOptions = {
|
|
@@ -2862,6 +2896,25 @@ type QuotesSqlOptions = {
|
|
|
2862
2896
|
* `quote_version_lines`, so other records can point at them.
|
|
2863
2897
|
*/
|
|
2864
2898
|
readonly versionLines?: boolean;
|
|
2899
|
+
/**
|
|
2900
|
+
* App columns of the version lines table. On publish, each one takes the
|
|
2901
|
+
* value of the line column of the same name (`lineExtraColumns`), so checks
|
|
2902
|
+
* and references on the version lines hold.
|
|
2903
|
+
*/
|
|
2904
|
+
readonly versionLineExtraColumns?: ExtraColumns;
|
|
2905
|
+
/**
|
|
2906
|
+
* `"app"` when the app keeps the totals columns itself, such as with fixed
|
|
2907
|
+
* line discounts or a VAT regime: the block never recounts or writes them,
|
|
2908
|
+
* reads what they hold, and refuses a change to them once a quote is
|
|
2909
|
+
* answered, expired or withdrawn.
|
|
2910
|
+
*/
|
|
2911
|
+
readonly totals?: "block" | "app";
|
|
2912
|
+
/**
|
|
2913
|
+
* `send` and `publish` also take a rejected, withdrawn or expired quote and
|
|
2914
|
+
* send it again in one call, without a draft step. With `workingCopy`, such a
|
|
2915
|
+
* quote can be edited before it is sent again.
|
|
2916
|
+
*/
|
|
2917
|
+
readonly resend?: boolean;
|
|
2865
2918
|
};
|
|
2866
2919
|
/** `blocks.reactions.options`. */
|
|
2867
2920
|
type ReactionsSqlOptions = {
|
|
@@ -9,7 +9,10 @@ const quotesSqlOptions = blockOptions({
|
|
|
9
9
|
lineExtraColumns: option.extraColumns(),
|
|
10
10
|
lineRates: option.string({ default: "bps" }),
|
|
11
11
|
workingCopy: option.boolean({ default: false }),
|
|
12
|
-
versionLines: option.boolean({ default: false })
|
|
12
|
+
versionLines: option.boolean({ default: false }),
|
|
13
|
+
versionLineExtraColumns: option.extraColumns(),
|
|
14
|
+
totals: option.string({ default: "block" }),
|
|
15
|
+
resend: option.boolean({ default: false })
|
|
13
16
|
});
|
|
14
17
|
// src/blocks/quotes/automations.ts
|
|
15
18
|
/**
|
|
@@ -4,7 +4,7 @@ import { t as BetterSupabase, y as Db } from "./define-C_He1bQO.js";
|
|
|
4
4
|
import { n as DataEngine } from "./data-engine-CX1oYDZl.js";
|
|
5
5
|
import { Dn as GeneratedBlocks } from "./define-block-DBD7yhQg.js";
|
|
6
6
|
import { rt as BetterQueries } from "./index-1_-lg9Gc.js";
|
|
7
|
-
import { t as ClientPorts } from "./ports-
|
|
7
|
+
import { t as ClientPorts } from "./ports-C61eesjD.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-DBD7yhQg.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-jqBMNMs3.js";
|
|
3
|
+
import { t as ClientPorts } from "./ports-C61eesjD.js";
|
|
4
|
+
import { t as AuthPort } from "./controller-BFOCK5AG.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,5 +1,5 @@
|
|
|
1
1
|
import { a as entityNoun, i as entityNames, n as checkEntityName, s as tenantRename, t as DEFAULT_TENANT } from "./entity-naming-BES3pkQI.js";
|
|
2
|
-
import { I as resolveBlock, L as tenantNameOf, M as PRESET_CATALOG } from "./instances-
|
|
2
|
+
import { I as resolveBlock, L as tenantNameOf, M as PRESET_CATALOG } from "./instances-Bx94JGSW.js";
|
|
3
3
|
// src/config/defaults.ts
|
|
4
4
|
/**
|
|
5
5
|
* Every default `resolveConfig` fills in. Other modules (the SQL module
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { cn as ResolvedConfig } from "./context-
|
|
1
|
+
import { cn as ResolvedConfig } from "./context-Dga2sgyx.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 { $ as createHarnessSessions, A as AiRunStatus, B as SharedAiChat, C as AiModerationInput, D as AiProject, E as AiPendingInputRequest, F as AiStreamClaim, G as AiPendingApproval, H as AiHarnessSessionPatch, I as AiToolApproval, J as AiRunState, K as AiRun, L as AiToolApprovalRequest, M as AiShareLink, N as AiStoredMessage, O as AiProjectInput, P as AiStoredMessageStatus, Q as AiRuns, R as AiToolPolicy, S as AiModerationEvent, T as AiPendingInput, U as AiHarnessSessions, V as AiHarnessSession, W as AiHarnessStatus, X as AiRunStepInput, Y as AiRunStep, Z as AiRunStepStatus, _ as AiFeedback, a as createAiChat, b as AiModelInput, c as AiAssistantMessageOptions, d as AiChatPage, f as AiChatPatch, g as AiChatVisibility, h as AiChatShare, i as aiChatTopic, j as AiSaveResult, k as AiRunRelease, l as AiChatInput, m as AiChatRecord, n as AiChatOptions, o as AiAppendResult, p as AiChatQuery, q as AiRunQuery, r as aiChatListTopic, s as AiApprovalDecision, t as AiChat, v as AiMessageSibling, w as AiModerationStage, x as AiModerationAction, y as AiModel, z as AiUserMessageTrigger } from "../../ai-chat-rQ7Ftq9W.js";
|
|
6
6
|
import { a as NewAiSandbox, i as AiSandboxes, n as AiSandboxStatus, r as AiSandboxStopper, t as AiSandbox } from "../../sandboxes-DKgJZYUZ.js";
|
|
7
7
|
import { c as BlockOf } from "../../define-block-DBD7yhQg.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 { 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-Sj-efEhC.js";
|
|
|
8
8
|
import { a as dbTransport, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-CDmOUuLZ.js";
|
|
9
9
|
import { n as BlockHooks } from "../../block-hooks-VW4knarE.js";
|
|
10
10
|
import { c as BlockOf } from "../../define-block-DBD7yhQg.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-CjKlzHD-.js";
|
|
12
|
+
import { n as TopicPort } from "../../watch-topic-jqBMNMs3.js";
|
|
13
|
+
import { n as Controller, t as AuthPort } from "../../controller-BFOCK5AG.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-CDmOUuLZ.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-U3JQ8IlM.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-DUmsXPdh.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 };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { A as CollaborationEventData, Ct as Events } from "../../events-DddDlibJ.js";
|
|
2
2
|
import { a as dbTransport, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-CDmOUuLZ.js";
|
|
3
3
|
import { c as BlockOf } from "../../define-block-DBD7yhQg.js";
|
|
4
|
-
import { _ as
|
|
4
|
+
import { _ as ApprovalsOptions, a as ApprovalMode, c as ApprovalRequestDetail, d as ApprovalRequirement, f as ApprovalStatus, g as Approvals, h as ApprovalTenantPolicy, i as ApprovalListOptions, l as ApprovalRequestInput, m as ApprovalStepInput, n as ApprovalDecideOptions, o as ApprovalPolicyInput, p as ApprovalStep, r as ApprovalDecision, s as ApprovalRequest, t as ApprovalApprovers, u as ApprovalRequestPolicy, v as approvalFingerprint, y as createApprovals } from "../../approvals-CYbTzQ7v.js";
|
|
5
5
|
/** `approval_policy.saved` and `approval_policy.removed`. */
|
|
6
6
|
interface ApprovalPolicyEventData {
|
|
7
7
|
readonly organizationId: string;
|
|
@@ -27,4 +27,4 @@ type ApprovalsEvents = {
|
|
|
27
27
|
export declare const approvalsEvents: Events<ApprovalsEvents>;
|
|
28
28
|
/** The `approvals` block's manifest (ADR 0029). */
|
|
29
29
|
export declare const approvalsBlock: BlockOf<"approvals", typeof createApprovals, ApprovalsEvents>;
|
|
30
|
-
export { type ApprovalApprovers, type ApprovalDecideOptions, type ApprovalDecision, type ApprovalListOptions, type ApprovalMode, type ApprovalPolicyInput, type ApprovalRequest, type ApprovalRequestDetail, type ApprovalRequestInput, type ApprovalRequirement, type ApprovalStatus, type ApprovalStep, type ApprovalStepInput, type ApprovalTenantPolicy, type Approvals, type ApprovalsEvents, type ApprovalsOptions, type BlockTransport, approvalFingerprint, createApprovals, dbTransport, rpcTransport, sqlTransport };
|
|
30
|
+
export { type ApprovalApprovers, type ApprovalDecideOptions, type ApprovalDecision, type ApprovalListOptions, type ApprovalMode, type ApprovalPolicyInput, type ApprovalRequest, type ApprovalRequestDetail, type ApprovalRequestInput, type ApprovalRequestPolicy, type ApprovalRequirement, type ApprovalStatus, type ApprovalStep, type ApprovalStepInput, type ApprovalTenantPolicy, type Approvals, type ApprovalsEvents, type ApprovalsOptions, type BlockTransport, approvalFingerprint, createApprovals, dbTransport, rpcTransport, sqlTransport };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { t as approvalsSqlOptions } from "../../options-
|
|
1
|
+
import { t as approvalsSqlOptions } from "../../options-DLJTiX29.js";
|
|
2
2
|
import { n as event, t as defineEvents } from "../../event-map-DxfsFgQT.js";
|
|
3
3
|
import { U as rpcTransport, V as dbTransport, W as sqlTransport } from "../../block-helpers-I7UzjNEf.js";
|
|
4
4
|
import { n as defineBlock } from "../../define-block-22Jv4U_-.js";
|
|
5
|
-
import { n as createApprovals, t as approvalFingerprint } from "../../approvals-
|
|
5
|
+
import { n as createApprovals, t as approvalFingerprint } from "../../approvals-cyL5CmU7.js";
|
|
6
6
|
// src/blocks/approvals/events.ts
|
|
7
7
|
/** The `approvals` block's event types, for its manifest and `onBlockEvent`. */
|
|
8
8
|
const approvalsEvents = defineEvents({
|
|
@@ -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-CDmOUuLZ.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-DBD7yhQg.js";
|
|
6
|
-
import { n as Controller } from "../../controller-
|
|
6
|
+
import { n as Controller } from "../../controller-BFOCK5AG.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-C_He1bQO.js"
|
|
|
11
11
|
import { c as BlockOf } from "../../define-block-DBD7yhQg.js";
|
|
12
12
|
import { i as EventSink, t as CloudEvent } from "../../cloud-event-BjgxkfJJ.js";
|
|
13
13
|
import { i as ListDefinition } from "../../list-query-BkbLV-Yc.js";
|
|
14
|
-
import { n as Controller, t as AuthPort } from "../../controller-
|
|
14
|
+
import { n as Controller, t as AuthPort } from "../../controller-BFOCK5AG.js";
|
|
15
15
|
import { a as UndoToken } from "../../undo-BCQMqIQN.js";
|
|
16
|
-
import { n as AuditCategory } from "../../context-
|
|
16
|
+
import { n as AuditCategory } from "../../context-Dga2sgyx.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,8 +8,8 @@ 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-VW4knarE.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-Xj40B5KT.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-DBD7yhQg.js";
|
|
11
|
-
import { n as Controller, t as AuthPort } from "../../controller-
|
|
12
|
-
import { l as ApprovalRequestInput } from "../../approvals-
|
|
11
|
+
import { n as Controller, t as AuthPort } from "../../controller-BFOCK5AG.js";
|
|
12
|
+
import { l as ApprovalRequestInput } from "../../approvals-CYbTzQ7v.js";
|
|
13
13
|
import { n as FilterRecordField, t as FilterEvaluation } from "../../filter-evaluate-Bkbb0nuQ.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-CP46SPNE.js";
|
|
15
15
|
import { a as ConversionRelations, i as ConversionRef, n as ConversionContext, o as ConversionSpec, r as ConversionOutcome, s as defineConversionAction, t as ConversionClients } from "../../conversion-BShzA-u-.js";
|
|
@@ -9,7 +9,7 @@ import { n as BlockHooks } from "../../block-hooks-VW4knarE.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-DBD7yhQg.js";
|
|
11
11
|
import { i as EventSink } from "../../cloud-event-BjgxkfJJ.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
|
import { d as stripeInboxVerify, f as verifyStripeWebhook, u as signStripeWebhook } from "../../verify-Cpc1upDA.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-DddDlibJ.js";
|
|
3
3
|
import { c as BlockOf } from "../../define-block-DBD7yhQg.js";
|
|
4
|
-
import { n as Controller } from "../../controller-
|
|
4
|
+
import { n as Controller } from "../../controller-BFOCK5AG.js";
|
|
5
5
|
import { o as WeeklyHours } from "../../availability-CZlcrkqD.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-CHUzFwOI.js";
|
|
7
7
|
import { t as EventCalendarEvent } from "../../event-calendar-DPMcqy7Q.js";
|
|
@@ -7,7 +7,7 @@ import { n as Logger } from "../../logger-0LfhvwE4.js";
|
|
|
7
7
|
import { t as BlockTransport } from "../../block-transport-CDmOUuLZ.js";
|
|
8
8
|
import { n as BlockHooks } from "../../block-hooks-VW4knarE.js";
|
|
9
9
|
import { Sn as EntitySchema, c as BlockOf } from "../../define-block-DBD7yhQg.js";
|
|
10
|
-
import { n as Controller } from "../../controller-
|
|
10
|
+
import { n as Controller } from "../../controller-BFOCK5AG.js";
|
|
11
11
|
import { A as CalendarAlarmAction, C as IcsEvent, D as parseIcs, E as ToIcsOptions, O as toIcs, S as CalendarEventStatus, T as ParsedIcs, _ 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, j as CalendarReminder, k as CalendarAlarm, 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 IcsSource, x as CalendarAttendee, y as AttendeeResponse } from "../../availability-CZlcrkqD.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-DPMcqy7Q.js";
|
|
13
13
|
import { t as VisibleRange } from "../../range-BN3kpJAE.js";
|
|
@@ -7,14 +7,14 @@ import { n as Logger } from "../../logger-0LfhvwE4.js";
|
|
|
7
7
|
import { i as CursorPageOptions, o as BlockTenantOptions, r as BlockTemporalOptions } from "../../block-helpers-Sj-efEhC.js";
|
|
8
8
|
import { a as dbTransport, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-CDmOUuLZ.js";
|
|
9
9
|
import { n as BlockHooks } from "../../block-hooks-VW4knarE.js";
|
|
10
|
-
import { F as CommentsSqlOptions } from "../../authorization-
|
|
10
|
+
import { F as CommentsSqlOptions } from "../../authorization-hGBtxrnQ.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-CpQIhkFi.js";
|
|
14
14
|
import { Sn as EntitySchema, c as BlockOf, ln as RecordBindingWrite, mn as RecordRowInput, rn as RecordBinding } from "../../define-block-DBD7yhQg.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-CjKlzHD-.js";
|
|
16
|
+
import { n as TopicPort } from "../../watch-topic-jqBMNMs3.js";
|
|
17
|
+
import { n as Controller, t as AuthPort } from "../../controller-BFOCK5AG.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
|
|
@@ -8,7 +8,7 @@ import { r as BlockTemporalOptions } from "../../block-helpers-Sj-efEhC.js";
|
|
|
8
8
|
import { a as dbTransport, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-CDmOUuLZ.js";
|
|
9
9
|
import { n as BlockHooks } from "../../block-hooks-VW4knarE.js";
|
|
10
10
|
import { Ot as Attachments, Tt as AttachmentStorage, _t as AttachmentDownload, c as BlockOf, ht as Attachment } from "../../define-block-DBD7yhQg.js";
|
|
11
|
-
import {
|
|
11
|
+
import { f as ApprovalStatus } from "../../approvals-CYbTzQ7v.js";
|
|
12
12
|
import { t as SubjectConfig } from "../../subjects-BGwLJ3IB.js";
|
|
13
13
|
interface DriveOptions<S extends StandardSchemaV1 | undefined = undefined> extends BlockTemporalOptions {
|
|
14
14
|
/** The caller's transport (`rpcTransport(supabase)`), so grants apply. */
|
|
@@ -4,8 +4,8 @@ import { n as SqlClient } from "../../executor-DoSNec_H.js";
|
|
|
4
4
|
import { a as dbTransport, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-CDmOUuLZ.js";
|
|
5
5
|
import { n as BlockHooks } from "../../block-hooks-VW4knarE.js";
|
|
6
6
|
import { c as BlockOf } from "../../define-block-DBD7yhQg.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-C5k_9hHt.js";
|
|
8
|
+
import { n as Controller, t as AuthPort } from "../../controller-BFOCK5AG.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
|
/**
|
|
@@ -2,7 +2,7 @@ import { n as dbError } from "../../errors-B7tCfCvX.js";
|
|
|
2
2
|
import { n as isRecord } from "../../guards-CsRa6v57.js";
|
|
3
3
|
import { t as temporal } from "../../temporal-required-w_2u4EDp.js";
|
|
4
4
|
import { t as AsyncResult } from "../../result-8xza7w5W.js";
|
|
5
|
-
import { t as expensesSqlOptions } from "../../options-
|
|
5
|
+
import { t as expensesSqlOptions } from "../../options-BXiUftgG.js";
|
|
6
6
|
import { n as event, t as defineEvents } from "../../event-map-DxfsFgQT.js";
|
|
7
7
|
import { A as recordsOf, L as textOf, O as recordOf, U as rpcTransport, V as dbTransport, W as sqlTransport, d as enumOrThrow, j as requiredInstant, m as instantArg, n as applyTemporal, o as blockCall, w as optionalText } from "../../block-helpers-I7UzjNEf.js";
|
|
8
8
|
import { i as wrapTransport, n as extendBlock, r as withBlockHooks } from "../../block-hooks-CadxQ9-_.js";
|
|
@@ -8,7 +8,7 @@ import { r as BlockTemporalOptions } from "../../block-helpers-Sj-efEhC.js";
|
|
|
8
8
|
import { a as dbTransport, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-CDmOUuLZ.js";
|
|
9
9
|
import { n as BlockHooks } from "../../block-hooks-VW4knarE.js";
|
|
10
10
|
import { c as BlockOf } from "../../define-block-DBD7yhQg.js";
|
|
11
|
-
import { n as Controller } from "../../controller-
|
|
11
|
+
import { n as Controller } from "../../controller-BFOCK5AG.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-DddDlibJ.js";
|
|
|
2
2
|
import { a as dbTransport, i as RpcClient, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-CDmOUuLZ.js";
|
|
3
3
|
import { d as MessageKind, p as MessageReaction, u as MessageFile } from "../../messaging-CpQIhkFi.js";
|
|
4
4
|
import { Zt as DefaultAutomation, c as BlockOf } from "../../define-block-DBD7yhQg.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-CjKlzHD-.js";
|
|
6
|
+
import { n as TopicPort } from "../../watch-topic-jqBMNMs3.js";
|
|
7
|
+
import { l as StoragePort } from "../../ports-C61eesjD.js";
|
|
8
|
+
import { n as Controller, t as AuthPort } from "../../controller-BFOCK5AG.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-kq8S5HVE.js";
|
|
10
10
|
import { _ as InboxDraftSource, a as Inbox, c as InboxPatch, d as ScheduledMessageInput, f as StartConversationInput, g as InboxDraftInput, h as InboxDraft, 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, v as InboxDraftStatus, y as InboxDrafts } from "../../inbox-DiQ8KhG8.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-DBD7yhQg.js";
|
|
13
13
|
import { t as VisibleRange } from "../range-BN3kpJAE.js";
|
|
14
14
|
import { t as subjectKey } from "../block-subjects-Bkieh2Xk.js";
|
|
15
|
-
import { t as BlockEnv } from "../block-env-
|
|
15
|
+
import { t as BlockEnv } from "../block-env-C6OEu9Xk.js";
|
|
16
16
|
/** What a hook passes a block creator from the env. */
|
|
17
17
|
interface EnvBlockOptions {
|
|
18
18
|
readonly transport: BlockTransport;
|