@palbase/backend 34.1.0 → 35.0.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/LICENSE +21 -0
- package/dist/bin/palbase-backend.cjs +0 -0
- package/dist/bin/palbase-backend.cjs.map +1 -1
- package/dist/bin/palbase-backend.js +2 -2
- package/dist/{chunk-X2UYIXDS.js → chunk-6FEHCEB7.js} +4 -2
- package/dist/chunk-6FEHCEB7.js.map +1 -0
- package/dist/{chunk-XZPDPYVY.js → chunk-BOD3DT6D.js} +2 -2
- package/dist/{chunk-5UGPXKMJ.js → chunk-L4R7WXLH.js} +4 -1
- package/dist/chunk-L4R7WXLH.js.map +1 -0
- package/dist/db/index.cjs.map +1 -1
- package/dist/db/index.d.cts +2 -2
- package/dist/db/index.d.ts +2 -2
- package/dist/db/index.js +1 -1
- package/dist/{endpoint-BXPdsTA5.d.ts → endpoint-BI0yGuEL.d.ts} +61 -2
- package/dist/{endpoint-DqhUP7RT.d.cts → endpoint-DaGnjt42.d.cts} +61 -2
- package/dist/engine/index.cjs.map +1 -1
- package/dist/engine/index.d.cts +3 -3
- package/dist/engine/index.d.ts +3 -3
- package/dist/engine/index.js +2 -2
- package/dist/{index-Co0Hj_aO.d.cts → index-DllNjpTl.d.cts} +2 -2
- package/dist/{index-MhCL7ll4.d.ts → index-E8Sd6NFy.d.ts} +2 -2
- package/dist/index.cjs +36 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +13 -8
- package/dist/index.d.ts +13 -8
- package/dist/index.js +32 -3
- package/dist/index.js.map +1 -1
- package/dist/openapi/index.d.cts +2 -2
- package/dist/openapi/index.d.ts +2 -2
- package/dist/{registry-BkIVHPzB.d.cts → registry-BnKvIyve.d.cts} +1 -1
- package/dist/{registry-CvGLR5j1.d.ts → registry-zDCj0eOU.d.ts} +1 -1
- package/dist/test/index.d.cts +1 -1
- package/dist/test/index.d.ts +1 -1
- package/package.json +15 -15
- package/stager/generics.js +12 -4
- package/stager/stage.js +38 -3
- package/template/scripts/test.sh +0 -0
- package/dist/chunk-5UGPXKMJ.js.map +0 -1
- package/dist/chunk-X2UYIXDS.js.map +0 -1
- /package/dist/{chunk-XZPDPYVY.js.map → chunk-BOD3DT6D.js.map} +0 -0
package/dist/db/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { P as PreparedRead,
|
|
2
|
-
export { q as AnyColumn, r as AtomicDatabase, s as AtomicOptions, y as ColumnBuilder, z as ColumnDef, G as ColumnType, i as CommandOptions, D as DatabaseBudget, d as DatabaseDiagnostics, c as DatabaseDiagnosticsOptions, K as DatabaseQueryEvent, L as DatabaseWorkload, O as EXTENSION_DEPENDENCIES, Q as EmbeddingModelRef, E as EnvServiceDatabase, X as EnvTypedDatabase, a8 as InsertManyOptions, a9 as InsertShape, ae as Materialized, al as OnDeleteAction, an as PALBASE_EXTENSIONS, g as Page, ap as PageInfo, aq as PageInput, ar as PageNavigation, a_ as PalbaseExtension,
|
|
1
|
+
import { P as PreparedRead, c9 as QueryDatabase, U as EnvQueryDatabase, C as CompiledRead, F as ColumnMap, cq as TableHandle, cY as WhereFilter, dE as ColValue, a2 as FindManyOpts } from '../endpoint-DaGnjt42.cjs';
|
|
2
|
+
export { q as AnyColumn, r as AtomicDatabase, s as AtomicOptions, y as ColumnBuilder, z as ColumnDef, G as ColumnType, i as CommandOptions, D as DatabaseBudget, d as DatabaseDiagnostics, c as DatabaseDiagnosticsOptions, K as DatabaseQueryEvent, L as DatabaseWorkload, O as EXTENSION_DEPENDENCIES, Q as EmbeddingModelRef, E as EnvServiceDatabase, X as EnvTypedDatabase, a8 as InsertManyOptions, a9 as InsertShape, ae as Materialized, al as OnDeleteAction, an as PALBASE_EXTENSIONS, g as Page, ap as PageInfo, aq as PageInput, ar as PageNavigation, a_ as PalbaseExtension, c1 as PolicyBuilder, c2 as PolicyCommand, c3 as PolicyDef, c6 as PolicyMode, c8 as QueryColumnContract, cb as RawConstraintDef, f as RawPageOptions, cd as Ref, cf as RowShape, S as SchemaDef, co as TABLE_META, cp as TableDef, cr as TableInput, T as TransactionIsolation, ct as TxColumnExpr, cu as TxInsertShape, cw as TxNow, cx as TxPlan, h as TxPlanBody, cy as TxPlanError, cz as TxPlanHandle, cA as TxPlanOpResult, cB as TxPlanRejection, j as TxPlanResponse, cC as TxRefError, cD as TxRow, cE as TxRows, cF as TxSelectOptions, cG as TxSetShape, cI as TxTable, cJ as TxTables, cK as TxWhere, cQ as TypedDB, cR as TypedTable, cS as TypedTx, cV as UniqueWhere, c_ as WorkloadOptions, d3 as bigint, d4 as boolean, d7 as dec, da as defineSchema, db as defineTable, dc as defineWorkload, dd as enumType, df as inc, di as installationRef, dj as integer, dk as isPalbaseExtension, dm as jsonb, dn as makeTypedDB, dp as now, dt as openai, du as ownedByUser, dv as policy, dw as raw, dy as text, dz as timestamp, dA as userRef, dB as uuid, dC as vector } from '../endpoint-DaGnjt42.cjs';
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
import '../stack.cjs';
|
|
5
5
|
import './env.cjs';
|
package/dist/db/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { P as PreparedRead,
|
|
2
|
-
export { q as AnyColumn, r as AtomicDatabase, s as AtomicOptions, y as ColumnBuilder, z as ColumnDef, G as ColumnType, i as CommandOptions, D as DatabaseBudget, d as DatabaseDiagnostics, c as DatabaseDiagnosticsOptions, K as DatabaseQueryEvent, L as DatabaseWorkload, O as EXTENSION_DEPENDENCIES, Q as EmbeddingModelRef, E as EnvServiceDatabase, X as EnvTypedDatabase, a8 as InsertManyOptions, a9 as InsertShape, ae as Materialized, al as OnDeleteAction, an as PALBASE_EXTENSIONS, g as Page, ap as PageInfo, aq as PageInput, ar as PageNavigation, a_ as PalbaseExtension,
|
|
1
|
+
import { P as PreparedRead, c9 as QueryDatabase, U as EnvQueryDatabase, C as CompiledRead, F as ColumnMap, cq as TableHandle, cY as WhereFilter, dE as ColValue, a2 as FindManyOpts } from '../endpoint-BI0yGuEL.js';
|
|
2
|
+
export { q as AnyColumn, r as AtomicDatabase, s as AtomicOptions, y as ColumnBuilder, z as ColumnDef, G as ColumnType, i as CommandOptions, D as DatabaseBudget, d as DatabaseDiagnostics, c as DatabaseDiagnosticsOptions, K as DatabaseQueryEvent, L as DatabaseWorkload, O as EXTENSION_DEPENDENCIES, Q as EmbeddingModelRef, E as EnvServiceDatabase, X as EnvTypedDatabase, a8 as InsertManyOptions, a9 as InsertShape, ae as Materialized, al as OnDeleteAction, an as PALBASE_EXTENSIONS, g as Page, ap as PageInfo, aq as PageInput, ar as PageNavigation, a_ as PalbaseExtension, c1 as PolicyBuilder, c2 as PolicyCommand, c3 as PolicyDef, c6 as PolicyMode, c8 as QueryColumnContract, cb as RawConstraintDef, f as RawPageOptions, cd as Ref, cf as RowShape, S as SchemaDef, co as TABLE_META, cp as TableDef, cr as TableInput, T as TransactionIsolation, ct as TxColumnExpr, cu as TxInsertShape, cw as TxNow, cx as TxPlan, h as TxPlanBody, cy as TxPlanError, cz as TxPlanHandle, cA as TxPlanOpResult, cB as TxPlanRejection, j as TxPlanResponse, cC as TxRefError, cD as TxRow, cE as TxRows, cF as TxSelectOptions, cG as TxSetShape, cI as TxTable, cJ as TxTables, cK as TxWhere, cQ as TypedDB, cR as TypedTable, cS as TypedTx, cV as UniqueWhere, c_ as WorkloadOptions, d3 as bigint, d4 as boolean, d7 as dec, da as defineSchema, db as defineTable, dc as defineWorkload, dd as enumType, df as inc, di as installationRef, dj as integer, dk as isPalbaseExtension, dm as jsonb, dn as makeTypedDB, dp as now, dt as openai, du as ownedByUser, dv as policy, dw as raw, dy as text, dz as timestamp, dA as userRef, dB as uuid, dC as vector } from '../endpoint-BI0yGuEL.js';
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
import '../stack.js';
|
|
5
5
|
import './env.js';
|
package/dist/db/index.js
CHANGED
|
@@ -1786,6 +1786,51 @@ interface PalbaseSmsSendParams {
|
|
|
1786
1786
|
variables?: Record<string, unknown>;
|
|
1787
1787
|
category?: string;
|
|
1788
1788
|
}
|
|
1789
|
+
/** A template translation approved on the sender's Meta account. */
|
|
1790
|
+
interface PalbaseWhatsAppTemplate {
|
|
1791
|
+
name: string;
|
|
1792
|
+
/** Meta's translation code, such as en_US; distinct from a message locale. */
|
|
1793
|
+
language: string;
|
|
1794
|
+
/** Native Meta components for parameters, media and buttons. */
|
|
1795
|
+
components?: Record<string, unknown>[];
|
|
1796
|
+
}
|
|
1797
|
+
/** Native WhatsApp send parameters; choose one message shape. */
|
|
1798
|
+
type PalbaseWhatsAppSendParams = {
|
|
1799
|
+
/** E.164 phone number. Requires service-role access and recipient opt-in. */
|
|
1800
|
+
to: string;
|
|
1801
|
+
userId?: string;
|
|
1802
|
+
category?: string;
|
|
1803
|
+
metadata?: Record<string, unknown>;
|
|
1804
|
+
} & ({
|
|
1805
|
+
templateSlug: string;
|
|
1806
|
+
variables?: Record<string, string>;
|
|
1807
|
+
locale?: string;
|
|
1808
|
+
body?: never;
|
|
1809
|
+
template?: never;
|
|
1810
|
+
} | {
|
|
1811
|
+
template: PalbaseWhatsAppTemplate;
|
|
1812
|
+
body?: never;
|
|
1813
|
+
templateSlug?: never;
|
|
1814
|
+
}
|
|
1815
|
+
/** Own sender only; Meta requires an open customer service window. */
|
|
1816
|
+
| {
|
|
1817
|
+
body: string;
|
|
1818
|
+
template?: never;
|
|
1819
|
+
templateSlug?: never;
|
|
1820
|
+
});
|
|
1821
|
+
interface PalbaseWhatsAppSendResponse {
|
|
1822
|
+
message_id?: string;
|
|
1823
|
+
skipped?: boolean;
|
|
1824
|
+
}
|
|
1825
|
+
interface PalbaseWhatsAppEvent {
|
|
1826
|
+
id: string;
|
|
1827
|
+
phone_number_id: string;
|
|
1828
|
+
provider_message_id: string;
|
|
1829
|
+
kind: "message" | "status";
|
|
1830
|
+
status?: "sent" | "delivered" | "read" | "failed";
|
|
1831
|
+
payload: Record<string, unknown>;
|
|
1832
|
+
received_at: string;
|
|
1833
|
+
}
|
|
1789
1834
|
/**
|
|
1790
1835
|
* Phone-verification start parameters.
|
|
1791
1836
|
*
|
|
@@ -1883,8 +1928,10 @@ interface PalbaseInboxListResult {
|
|
|
1883
1928
|
messages: PalbaseInboxMessage[];
|
|
1884
1929
|
next_cursor?: string;
|
|
1885
1930
|
}
|
|
1931
|
+
/** Notification delivery channels. */
|
|
1932
|
+
type PalbaseNotificationChannel = "push" | "email" | "sms" | "whatsapp" | "inbox";
|
|
1886
1933
|
/** Notification preferences (channel × category opt-in/out). */
|
|
1887
|
-
type PalbasePreferences = Partial<Record<
|
|
1934
|
+
type PalbasePreferences = Partial<Record<PalbaseNotificationChannel, Record<string, boolean>>>;
|
|
1888
1935
|
/** Register device params. */
|
|
1889
1936
|
interface PalbaseRegisterDeviceParams {
|
|
1890
1937
|
device_id: string;
|
|
@@ -2609,6 +2656,16 @@ interface PalbaseVerificationsClient {
|
|
|
2609
2656
|
/** Check a submitted code. A wrong code resolves to `approved: false`. */
|
|
2610
2657
|
check(params: PalbaseVerificationCheckParams): Promise<PalbaseResult<PalbaseVerificationCheckResponse>>;
|
|
2611
2658
|
}
|
|
2659
|
+
/** Native WhatsApp sender and webhook event log, service-role only. */
|
|
2660
|
+
interface PalbaseWhatsAppClient {
|
|
2661
|
+
send(params: PalbaseWhatsAppSendParams): Promise<PalbaseResult<PalbaseWhatsAppSendResponse>>;
|
|
2662
|
+
/** Events on this sender. Shared platform events belong to the control plane. */
|
|
2663
|
+
events(options?: {
|
|
2664
|
+
limit?: number;
|
|
2665
|
+
}): Promise<PalbaseResult<{
|
|
2666
|
+
events: PalbaseWhatsAppEvent[];
|
|
2667
|
+
}>>;
|
|
2668
|
+
}
|
|
2612
2669
|
/**
|
|
2613
2670
|
* Inbox sub-client surface (managed-runtime send + user read operations).
|
|
2614
2671
|
*/
|
|
@@ -2690,6 +2747,8 @@ interface PalbaseNotificationsClient {
|
|
|
2690
2747
|
email: PalbaseEmailClient;
|
|
2691
2748
|
/** SMS sender. */
|
|
2692
2749
|
sms: PalbaseSmsClient;
|
|
2750
|
+
/** WhatsApp sender through the platform relay or this backend's Meta account. */
|
|
2751
|
+
whatsapp: PalbaseWhatsAppClient;
|
|
2693
2752
|
/** Phone verification (OTP) sender and checker. */
|
|
2694
2753
|
verifications: PalbaseVerificationsClient;
|
|
2695
2754
|
/** Inbox (in-app) message sender and reader. */
|
|
@@ -5631,4 +5690,4 @@ type Middleware = (ctx: MiddlewareContext, next: () => Promise<void>) => Promise
|
|
|
5631
5690
|
*/
|
|
5632
5691
|
type AuthSpec = boolean | Partial<AuthConfig>;
|
|
5633
5692
|
|
|
5634
|
-
export { type ErrorMap as $, type AuthSpec as A, BadRequest as B, type CompiledRead as C, type DatabaseBudget as D, type EnvServiceDatabase as E, type ColumnMap as F, type ColumnType as G, HttpError as H, Conflict as I, Database as J, type DatabaseQueryEvent as K, type DatabaseWorkload as L, DeadlockDetected as M, Documents as N, EXTENSION_DEPENDENCIES as O, type PreparedRead as P, type EmbeddingModelRef as Q, type RateLimitConfig as R, type SchemaDef as S, type TransactionIsolation as T, type EnvQueryDatabase as U, type EnvSchemas as V, type EnvTables as W, type EnvTypedDatabase as X, type EnvTypedTable as Y, type ErrorDef as Z, __runWithRuntime as _, type DBClient as a, type PalbaseFileObject as a$, type ErrorThrowers as a0, type FileContext as a1, type FindManyOpts as a2, Flags as a3, Forbidden as a4, type HttpMethod as a5, IndexBuilder as a6, type IndexDef as a7, type InsertManyOptions as a8, type InsertShape as a9, type PalbaseAttestiOSResult as aA, type PalbaseAuthAdminClient as aB, type PalbaseAuthClient as aC, type PalbaseBatchOverrideOperation as aD, type PalbaseBatchSetOverridesResult as aE, type PalbaseBindDeviceParams as aF, type PalbaseBucketClient as aG, type PalbaseClearAllOverridesResult as aH, type PalbaseClearOverrideResult as aI, type PalbaseCohortQueryInput as aJ, type PalbaseCohortResult as aK, type PalbaseCollectionRef as aL, type PalbaseCountQueryInput as aM, type PalbaseCountResult as aN, type PalbaseCreateLinkParams as aO, type PalbaseDeviceInfo as aP, type PalbaseDeviceTokenView as aQ, type PalbaseDocsClient as aR, type PalbaseDocumentRef as aS, type PalbaseDocumentSnapshot as aT, type PalbaseEmailClient as aU, type PalbaseEmailSendParams as aV, type PalbaseEmailSendResponse as aW, type PalbaseEventNamesResult as aX, type PalbaseEventsQueryInput as aY, type PalbaseEventsResult as aZ, type PalbaseExtension as a_, type InsertValues as aa, type LifecycleHook as ab, Log as ac, type Logger as ad, type Materialized as ae, type Middleware as af, type MiddlewareContext as ag, type MiddlewareHandler as ah, type MutateInput as ai, NotFound as aj, Notifications as ak, type OnDeleteAction as al, type OrderBySpec as am, PALBASE_EXTENSIONS as an, type PBRequest as ao, type PageInfo as ap, type PageInput as aq, type PageNavigation as ar, PalError as as, type PalbaseAnalyticsClient as at, type PalbaseAnalyticsManagementNamespace as au, type PalbaseAnalyticsProperties as av, type PalbaseAnalyticsQueryNamespace as aw, type PalbaseAttestAndroidParams as ax, type PalbaseAttestAndroidResult as ay, type PalbaseAttestiOSParams as az, type RuntimeServices as b,
|
|
5693
|
+
export { type ErrorMap as $, type AuthSpec as A, BadRequest as B, type CompiledRead as C, type DatabaseBudget as D, type EnvServiceDatabase as E, type ColumnMap as F, type ColumnType as G, HttpError as H, Conflict as I, Database as J, type DatabaseQueryEvent as K, type DatabaseWorkload as L, DeadlockDetected as M, Documents as N, EXTENSION_DEPENDENCIES as O, type PreparedRead as P, type EmbeddingModelRef as Q, type RateLimitConfig as R, type SchemaDef as S, type TransactionIsolation as T, type EnvQueryDatabase as U, type EnvSchemas as V, type EnvTables as W, type EnvTypedDatabase as X, type EnvTypedTable as Y, type ErrorDef as Z, __runWithRuntime as _, type DBClient as a, type PalbaseFileObject as a$, type ErrorThrowers as a0, type FileContext as a1, type FindManyOpts as a2, Flags as a3, Forbidden as a4, type HttpMethod as a5, IndexBuilder as a6, type IndexDef as a7, type InsertManyOptions as a8, type InsertShape as a9, type PalbaseAttestiOSResult as aA, type PalbaseAuthAdminClient as aB, type PalbaseAuthClient as aC, type PalbaseBatchOverrideOperation as aD, type PalbaseBatchSetOverridesResult as aE, type PalbaseBindDeviceParams as aF, type PalbaseBucketClient as aG, type PalbaseClearAllOverridesResult as aH, type PalbaseClearOverrideResult as aI, type PalbaseCohortQueryInput as aJ, type PalbaseCohortResult as aK, type PalbaseCollectionRef as aL, type PalbaseCountQueryInput as aM, type PalbaseCountResult as aN, type PalbaseCreateLinkParams as aO, type PalbaseDeviceInfo as aP, type PalbaseDeviceTokenView as aQ, type PalbaseDocsClient as aR, type PalbaseDocumentRef as aS, type PalbaseDocumentSnapshot as aT, type PalbaseEmailClient as aU, type PalbaseEmailSendParams as aV, type PalbaseEmailSendResponse as aW, type PalbaseEventNamesResult as aX, type PalbaseEventsQueryInput as aY, type PalbaseEventsResult as aZ, type PalbaseExtension as a_, type InsertValues as aa, type LifecycleHook as ab, Log as ac, type Logger as ad, type Materialized as ae, type Middleware as af, type MiddlewareContext as ag, type MiddlewareHandler as ah, type MutateInput as ai, NotFound as aj, Notifications as ak, type OnDeleteAction as al, type OrderBySpec as am, PALBASE_EXTENSIONS as an, type PBRequest as ao, type PageInfo as ap, type PageInput as aq, type PageNavigation as ar, PalError as as, type PalbaseAnalyticsClient as at, type PalbaseAnalyticsManagementNamespace as au, type PalbaseAnalyticsProperties as av, type PalbaseAnalyticsQueryNamespace as aw, type PalbaseAttestAndroidParams as ax, type PalbaseAttestAndroidResult as ay, type PalbaseAttestiOSParams as az, type RuntimeServices as b, type PalbaseWhereOperator as b$, type PalbaseFlag as b0, type PalbaseFlagContext as b1, type PalbaseFlagSource as b2, type PalbaseFlagValue as b3, type PalbaseFlagVariant as b4, type PalbaseFlagsClient as b5, type PalbaseFlagsServiceClient as b6, type PalbaseFunctionsClient as b7, type PalbaseFunnelQueryInput as b8, type PalbaseFunnelResult as b9, type PalbaseQrCodeOptions as bA, type PalbaseQuerySnapshot as bB, type PalbaseRealtimeClient as bC, type PalbaseRegisterDeviceParams as bD, type PalbaseRetentionQueryInput as bE, type PalbaseRetentionResult as bF, type PalbaseSession as bG, type PalbaseSetOverrideResult as bH, type PalbaseSetOverridesResult as bI, type PalbaseSignedUrlResponse as bJ, type PalbaseSmsClient as bK, type PalbaseSmsSendParams as bL, type PalbaseSmsSendResponse as bM, type PalbaseStorageClient as bN, type PalbaseTransformOptions as bO, type PalbaseUpdateLinkParams as bP, type PalbaseUploadOptions as bQ, type PalbaseUser as bR, type PalbaseUserDetailResult as bS, type PalbaseUsersQueryInput as bT, type PalbaseUsersResult as bU, type PalbaseVerifyRequestSignatureParams as bV, type PalbaseWhatsAppClient as bW, type PalbaseWhatsAppEvent as bX, type PalbaseWhatsAppSendParams as bY, type PalbaseWhatsAppSendResponse as bZ, type PalbaseWhatsAppTemplate as b_, type PalbaseIdentifyTraits as ba, type PalbaseInboxClient as bb, type PalbaseInboxListOptions as bc, type PalbaseInboxListResult as bd, type PalbaseInboxMessage as be, type PalbaseInboxSendParams as bf, type PalbaseInboxSendResponse as bg, type PalbaseInitialLink as bh, type PalbaseInvokeOptions as bi, type PalbaseLink as bj, type PalbaseLinkAnalytics as bk, type PalbaseLinkDetails as bl, type PalbaseLinksClient as bm, type PalbaseListLinksOptions as bn, type PalbaseListLinksResult as bo, type PalbaseListOptions as bp, type PalbaseMatchParams as bq, type PalbaseMultiChannelResponse as br, type PalbaseNotificationChannel as bs, type PalbaseNotificationsClient as bt, type PalbaseOverviewResult as bu, type PalbasePreferences as bv, type PalbasePreferencesClient as bw, type PalbasePushClient as bx, type PalbasePushSendParams as by, type PalbasePushSendResponse as bz, type DatabaseDiagnosticsOptions as c, __getRuntime as c$, type PolicyBinOp as c0, PolicyBuilder as c1, type PolicyCommand as c2, type PolicyDef as c3, type PolicyExprCtx as c4, PolicyExprRef as c5, type PolicyMode as c6, type PolicyOperand as c7, type QueryColumnContract as c8, type QueryDatabase as c9, type TxPlanOpResult as cA, type TxPlanRejection as cB, TxRefError as cC, type TxRow as cD, type TxRows as cE, type TxSelectOptions as cF, type TxSetShape as cG, type TxSetValue as cH, type TxTable as cI, type TxTables as cJ, type TxWhere as cK, type TxWireExpr as cL, type TxWireGuard as cM, type TxWireOp as cN, type TxWireRef as cO, type TxWireValue as cP, type TypedDB as cQ, type TypedTable as cR, type TypedTx as cS, Unauthorized as cT, UniqueViolation as cU, type UniqueWhere as cV, type User as cW, type VerifiedDevice as cX, type WhereFilter as cY, type WhereOp as cZ, type WorkloadOptions as c_, type QueryInput as ca, type RawConstraintDef as cb, Realtime as cc, type Ref as cd, type RequestStore as ce, type RowShape as cf, Secrets as cg, type SecretsService as ch, SerializationFailure as ci, type SetShape as cj, type SetValue as ck, type ShutdownRunner as cl, type SqlFragment as cm, Storage as cn, TABLE_META as co, type TableDef as cp, type TableHandle as cq, type TableInput as cr, TooManyRequests as cs, type TxColumnExpr as ct, type TxInsertShape as cu, type TxInsertValue as cv, type TxNow as cw, type TxPlan as cx, TxPlanError as cy, type TxPlanHandle as cz, type DatabaseDiagnostics as d, __resetLifecycleHooks as d0, __runStartHooks as d1, __setRuntime as d2, bigint as d3, boolean as d4, can as d5, col as d6, dec as d7, decrement as d8, defineMiddleware as d9, userRef as dA, uuid as dB, vector as dC, withRetry as dD, type ColValue as dE, defineSchema as da, defineTable as db, defineWorkload as dc, enumType as dd, exprCtx as de, inc as df, increment as dg, index as dh, installationRef as di, integer as dj, isPalbaseExtension as dk, isRetryable as dl, jsonb as dm, makeTypedDB as dn, now as dp, numeric as dq, onShutdown as dr, onStart as ds, openai as dt, ownedByUser as du, policy as dv, raw as dw, sqlFragment as dx, text as dy, timestamp as dz, type DBOps as e, type RawPageOptions as f, type Page as g, type TxPlanBody as h, type CommandOptions as i, type TxPlanResponse as j, type CacheClient as k, __requestALS as l, type PalbaseResult as m, type PolicyExpr as n, type AggregateInput as o, type AggregateResult as p, type AnyColumn as q, type AtomicDatabase as r, type AtomicOptions as s, Auth as t, type AuthConfig as u, Cache as v, type ClientInfo as w, type ColRef as x, ColumnBuilder as y, type ColumnDef as z };
|
|
@@ -1786,6 +1786,51 @@ interface PalbaseSmsSendParams {
|
|
|
1786
1786
|
variables?: Record<string, unknown>;
|
|
1787
1787
|
category?: string;
|
|
1788
1788
|
}
|
|
1789
|
+
/** A template translation approved on the sender's Meta account. */
|
|
1790
|
+
interface PalbaseWhatsAppTemplate {
|
|
1791
|
+
name: string;
|
|
1792
|
+
/** Meta's translation code, such as en_US; distinct from a message locale. */
|
|
1793
|
+
language: string;
|
|
1794
|
+
/** Native Meta components for parameters, media and buttons. */
|
|
1795
|
+
components?: Record<string, unknown>[];
|
|
1796
|
+
}
|
|
1797
|
+
/** Native WhatsApp send parameters; choose one message shape. */
|
|
1798
|
+
type PalbaseWhatsAppSendParams = {
|
|
1799
|
+
/** E.164 phone number. Requires service-role access and recipient opt-in. */
|
|
1800
|
+
to: string;
|
|
1801
|
+
userId?: string;
|
|
1802
|
+
category?: string;
|
|
1803
|
+
metadata?: Record<string, unknown>;
|
|
1804
|
+
} & ({
|
|
1805
|
+
templateSlug: string;
|
|
1806
|
+
variables?: Record<string, string>;
|
|
1807
|
+
locale?: string;
|
|
1808
|
+
body?: never;
|
|
1809
|
+
template?: never;
|
|
1810
|
+
} | {
|
|
1811
|
+
template: PalbaseWhatsAppTemplate;
|
|
1812
|
+
body?: never;
|
|
1813
|
+
templateSlug?: never;
|
|
1814
|
+
}
|
|
1815
|
+
/** Own sender only; Meta requires an open customer service window. */
|
|
1816
|
+
| {
|
|
1817
|
+
body: string;
|
|
1818
|
+
template?: never;
|
|
1819
|
+
templateSlug?: never;
|
|
1820
|
+
});
|
|
1821
|
+
interface PalbaseWhatsAppSendResponse {
|
|
1822
|
+
message_id?: string;
|
|
1823
|
+
skipped?: boolean;
|
|
1824
|
+
}
|
|
1825
|
+
interface PalbaseWhatsAppEvent {
|
|
1826
|
+
id: string;
|
|
1827
|
+
phone_number_id: string;
|
|
1828
|
+
provider_message_id: string;
|
|
1829
|
+
kind: "message" | "status";
|
|
1830
|
+
status?: "sent" | "delivered" | "read" | "failed";
|
|
1831
|
+
payload: Record<string, unknown>;
|
|
1832
|
+
received_at: string;
|
|
1833
|
+
}
|
|
1789
1834
|
/**
|
|
1790
1835
|
* Phone-verification start parameters.
|
|
1791
1836
|
*
|
|
@@ -1883,8 +1928,10 @@ interface PalbaseInboxListResult {
|
|
|
1883
1928
|
messages: PalbaseInboxMessage[];
|
|
1884
1929
|
next_cursor?: string;
|
|
1885
1930
|
}
|
|
1931
|
+
/** Notification delivery channels. */
|
|
1932
|
+
type PalbaseNotificationChannel = "push" | "email" | "sms" | "whatsapp" | "inbox";
|
|
1886
1933
|
/** Notification preferences (channel × category opt-in/out). */
|
|
1887
|
-
type PalbasePreferences = Partial<Record<
|
|
1934
|
+
type PalbasePreferences = Partial<Record<PalbaseNotificationChannel, Record<string, boolean>>>;
|
|
1888
1935
|
/** Register device params. */
|
|
1889
1936
|
interface PalbaseRegisterDeviceParams {
|
|
1890
1937
|
device_id: string;
|
|
@@ -2609,6 +2656,16 @@ interface PalbaseVerificationsClient {
|
|
|
2609
2656
|
/** Check a submitted code. A wrong code resolves to `approved: false`. */
|
|
2610
2657
|
check(params: PalbaseVerificationCheckParams): Promise<PalbaseResult<PalbaseVerificationCheckResponse>>;
|
|
2611
2658
|
}
|
|
2659
|
+
/** Native WhatsApp sender and webhook event log, service-role only. */
|
|
2660
|
+
interface PalbaseWhatsAppClient {
|
|
2661
|
+
send(params: PalbaseWhatsAppSendParams): Promise<PalbaseResult<PalbaseWhatsAppSendResponse>>;
|
|
2662
|
+
/** Events on this sender. Shared platform events belong to the control plane. */
|
|
2663
|
+
events(options?: {
|
|
2664
|
+
limit?: number;
|
|
2665
|
+
}): Promise<PalbaseResult<{
|
|
2666
|
+
events: PalbaseWhatsAppEvent[];
|
|
2667
|
+
}>>;
|
|
2668
|
+
}
|
|
2612
2669
|
/**
|
|
2613
2670
|
* Inbox sub-client surface (managed-runtime send + user read operations).
|
|
2614
2671
|
*/
|
|
@@ -2690,6 +2747,8 @@ interface PalbaseNotificationsClient {
|
|
|
2690
2747
|
email: PalbaseEmailClient;
|
|
2691
2748
|
/** SMS sender. */
|
|
2692
2749
|
sms: PalbaseSmsClient;
|
|
2750
|
+
/** WhatsApp sender through the platform relay or this backend's Meta account. */
|
|
2751
|
+
whatsapp: PalbaseWhatsAppClient;
|
|
2693
2752
|
/** Phone verification (OTP) sender and checker. */
|
|
2694
2753
|
verifications: PalbaseVerificationsClient;
|
|
2695
2754
|
/** Inbox (in-app) message sender and reader. */
|
|
@@ -5631,4 +5690,4 @@ type Middleware = (ctx: MiddlewareContext, next: () => Promise<void>) => Promise
|
|
|
5631
5690
|
*/
|
|
5632
5691
|
type AuthSpec = boolean | Partial<AuthConfig>;
|
|
5633
5692
|
|
|
5634
|
-
export { type ErrorMap as $, type AuthSpec as A, BadRequest as B, type CompiledRead as C, type DatabaseBudget as D, type EnvServiceDatabase as E, type ColumnMap as F, type ColumnType as G, HttpError as H, Conflict as I, Database as J, type DatabaseQueryEvent as K, type DatabaseWorkload as L, DeadlockDetected as M, Documents as N, EXTENSION_DEPENDENCIES as O, type PreparedRead as P, type EmbeddingModelRef as Q, type RateLimitConfig as R, type SchemaDef as S, type TransactionIsolation as T, type EnvQueryDatabase as U, type EnvSchemas as V, type EnvTables as W, type EnvTypedDatabase as X, type EnvTypedTable as Y, type ErrorDef as Z, __runWithRuntime as _, type DBClient as a, type PalbaseFileObject as a$, type ErrorThrowers as a0, type FileContext as a1, type FindManyOpts as a2, Flags as a3, Forbidden as a4, type HttpMethod as a5, IndexBuilder as a6, type IndexDef as a7, type InsertManyOptions as a8, type InsertShape as a9, type PalbaseAttestiOSResult as aA, type PalbaseAuthAdminClient as aB, type PalbaseAuthClient as aC, type PalbaseBatchOverrideOperation as aD, type PalbaseBatchSetOverridesResult as aE, type PalbaseBindDeviceParams as aF, type PalbaseBucketClient as aG, type PalbaseClearAllOverridesResult as aH, type PalbaseClearOverrideResult as aI, type PalbaseCohortQueryInput as aJ, type PalbaseCohortResult as aK, type PalbaseCollectionRef as aL, type PalbaseCountQueryInput as aM, type PalbaseCountResult as aN, type PalbaseCreateLinkParams as aO, type PalbaseDeviceInfo as aP, type PalbaseDeviceTokenView as aQ, type PalbaseDocsClient as aR, type PalbaseDocumentRef as aS, type PalbaseDocumentSnapshot as aT, type PalbaseEmailClient as aU, type PalbaseEmailSendParams as aV, type PalbaseEmailSendResponse as aW, type PalbaseEventNamesResult as aX, type PalbaseEventsQueryInput as aY, type PalbaseEventsResult as aZ, type PalbaseExtension as a_, type InsertValues as aa, type LifecycleHook as ab, Log as ac, type Logger as ad, type Materialized as ae, type Middleware as af, type MiddlewareContext as ag, type MiddlewareHandler as ah, type MutateInput as ai, NotFound as aj, Notifications as ak, type OnDeleteAction as al, type OrderBySpec as am, PALBASE_EXTENSIONS as an, type PBRequest as ao, type PageInfo as ap, type PageInput as aq, type PageNavigation as ar, PalError as as, type PalbaseAnalyticsClient as at, type PalbaseAnalyticsManagementNamespace as au, type PalbaseAnalyticsProperties as av, type PalbaseAnalyticsQueryNamespace as aw, type PalbaseAttestAndroidParams as ax, type PalbaseAttestAndroidResult as ay, type PalbaseAttestiOSParams as az, type RuntimeServices as b,
|
|
5693
|
+
export { type ErrorMap as $, type AuthSpec as A, BadRequest as B, type CompiledRead as C, type DatabaseBudget as D, type EnvServiceDatabase as E, type ColumnMap as F, type ColumnType as G, HttpError as H, Conflict as I, Database as J, type DatabaseQueryEvent as K, type DatabaseWorkload as L, DeadlockDetected as M, Documents as N, EXTENSION_DEPENDENCIES as O, type PreparedRead as P, type EmbeddingModelRef as Q, type RateLimitConfig as R, type SchemaDef as S, type TransactionIsolation as T, type EnvQueryDatabase as U, type EnvSchemas as V, type EnvTables as W, type EnvTypedDatabase as X, type EnvTypedTable as Y, type ErrorDef as Z, __runWithRuntime as _, type DBClient as a, type PalbaseFileObject as a$, type ErrorThrowers as a0, type FileContext as a1, type FindManyOpts as a2, Flags as a3, Forbidden as a4, type HttpMethod as a5, IndexBuilder as a6, type IndexDef as a7, type InsertManyOptions as a8, type InsertShape as a9, type PalbaseAttestiOSResult as aA, type PalbaseAuthAdminClient as aB, type PalbaseAuthClient as aC, type PalbaseBatchOverrideOperation as aD, type PalbaseBatchSetOverridesResult as aE, type PalbaseBindDeviceParams as aF, type PalbaseBucketClient as aG, type PalbaseClearAllOverridesResult as aH, type PalbaseClearOverrideResult as aI, type PalbaseCohortQueryInput as aJ, type PalbaseCohortResult as aK, type PalbaseCollectionRef as aL, type PalbaseCountQueryInput as aM, type PalbaseCountResult as aN, type PalbaseCreateLinkParams as aO, type PalbaseDeviceInfo as aP, type PalbaseDeviceTokenView as aQ, type PalbaseDocsClient as aR, type PalbaseDocumentRef as aS, type PalbaseDocumentSnapshot as aT, type PalbaseEmailClient as aU, type PalbaseEmailSendParams as aV, type PalbaseEmailSendResponse as aW, type PalbaseEventNamesResult as aX, type PalbaseEventsQueryInput as aY, type PalbaseEventsResult as aZ, type PalbaseExtension as a_, type InsertValues as aa, type LifecycleHook as ab, Log as ac, type Logger as ad, type Materialized as ae, type Middleware as af, type MiddlewareContext as ag, type MiddlewareHandler as ah, type MutateInput as ai, NotFound as aj, Notifications as ak, type OnDeleteAction as al, type OrderBySpec as am, PALBASE_EXTENSIONS as an, type PBRequest as ao, type PageInfo as ap, type PageInput as aq, type PageNavigation as ar, PalError as as, type PalbaseAnalyticsClient as at, type PalbaseAnalyticsManagementNamespace as au, type PalbaseAnalyticsProperties as av, type PalbaseAnalyticsQueryNamespace as aw, type PalbaseAttestAndroidParams as ax, type PalbaseAttestAndroidResult as ay, type PalbaseAttestiOSParams as az, type RuntimeServices as b, type PalbaseWhereOperator as b$, type PalbaseFlag as b0, type PalbaseFlagContext as b1, type PalbaseFlagSource as b2, type PalbaseFlagValue as b3, type PalbaseFlagVariant as b4, type PalbaseFlagsClient as b5, type PalbaseFlagsServiceClient as b6, type PalbaseFunctionsClient as b7, type PalbaseFunnelQueryInput as b8, type PalbaseFunnelResult as b9, type PalbaseQrCodeOptions as bA, type PalbaseQuerySnapshot as bB, type PalbaseRealtimeClient as bC, type PalbaseRegisterDeviceParams as bD, type PalbaseRetentionQueryInput as bE, type PalbaseRetentionResult as bF, type PalbaseSession as bG, type PalbaseSetOverrideResult as bH, type PalbaseSetOverridesResult as bI, type PalbaseSignedUrlResponse as bJ, type PalbaseSmsClient as bK, type PalbaseSmsSendParams as bL, type PalbaseSmsSendResponse as bM, type PalbaseStorageClient as bN, type PalbaseTransformOptions as bO, type PalbaseUpdateLinkParams as bP, type PalbaseUploadOptions as bQ, type PalbaseUser as bR, type PalbaseUserDetailResult as bS, type PalbaseUsersQueryInput as bT, type PalbaseUsersResult as bU, type PalbaseVerifyRequestSignatureParams as bV, type PalbaseWhatsAppClient as bW, type PalbaseWhatsAppEvent as bX, type PalbaseWhatsAppSendParams as bY, type PalbaseWhatsAppSendResponse as bZ, type PalbaseWhatsAppTemplate as b_, type PalbaseIdentifyTraits as ba, type PalbaseInboxClient as bb, type PalbaseInboxListOptions as bc, type PalbaseInboxListResult as bd, type PalbaseInboxMessage as be, type PalbaseInboxSendParams as bf, type PalbaseInboxSendResponse as bg, type PalbaseInitialLink as bh, type PalbaseInvokeOptions as bi, type PalbaseLink as bj, type PalbaseLinkAnalytics as bk, type PalbaseLinkDetails as bl, type PalbaseLinksClient as bm, type PalbaseListLinksOptions as bn, type PalbaseListLinksResult as bo, type PalbaseListOptions as bp, type PalbaseMatchParams as bq, type PalbaseMultiChannelResponse as br, type PalbaseNotificationChannel as bs, type PalbaseNotificationsClient as bt, type PalbaseOverviewResult as bu, type PalbasePreferences as bv, type PalbasePreferencesClient as bw, type PalbasePushClient as bx, type PalbasePushSendParams as by, type PalbasePushSendResponse as bz, type DatabaseDiagnosticsOptions as c, __getRuntime as c$, type PolicyBinOp as c0, PolicyBuilder as c1, type PolicyCommand as c2, type PolicyDef as c3, type PolicyExprCtx as c4, PolicyExprRef as c5, type PolicyMode as c6, type PolicyOperand as c7, type QueryColumnContract as c8, type QueryDatabase as c9, type TxPlanOpResult as cA, type TxPlanRejection as cB, TxRefError as cC, type TxRow as cD, type TxRows as cE, type TxSelectOptions as cF, type TxSetShape as cG, type TxSetValue as cH, type TxTable as cI, type TxTables as cJ, type TxWhere as cK, type TxWireExpr as cL, type TxWireGuard as cM, type TxWireOp as cN, type TxWireRef as cO, type TxWireValue as cP, type TypedDB as cQ, type TypedTable as cR, type TypedTx as cS, Unauthorized as cT, UniqueViolation as cU, type UniqueWhere as cV, type User as cW, type VerifiedDevice as cX, type WhereFilter as cY, type WhereOp as cZ, type WorkloadOptions as c_, type QueryInput as ca, type RawConstraintDef as cb, Realtime as cc, type Ref as cd, type RequestStore as ce, type RowShape as cf, Secrets as cg, type SecretsService as ch, SerializationFailure as ci, type SetShape as cj, type SetValue as ck, type ShutdownRunner as cl, type SqlFragment as cm, Storage as cn, TABLE_META as co, type TableDef as cp, type TableHandle as cq, type TableInput as cr, TooManyRequests as cs, type TxColumnExpr as ct, type TxInsertShape as cu, type TxInsertValue as cv, type TxNow as cw, type TxPlan as cx, TxPlanError as cy, type TxPlanHandle as cz, type DatabaseDiagnostics as d, __resetLifecycleHooks as d0, __runStartHooks as d1, __setRuntime as d2, bigint as d3, boolean as d4, can as d5, col as d6, dec as d7, decrement as d8, defineMiddleware as d9, userRef as dA, uuid as dB, vector as dC, withRetry as dD, type ColValue as dE, defineSchema as da, defineTable as db, defineWorkload as dc, enumType as dd, exprCtx as de, inc as df, increment as dg, index as dh, installationRef as di, integer as dj, isPalbaseExtension as dk, isRetryable as dl, jsonb as dm, makeTypedDB as dn, now as dp, numeric as dq, onShutdown as dr, onStart as ds, openai as dt, ownedByUser as du, policy as dv, raw as dw, sqlFragment as dx, text as dy, timestamp as dz, type DBOps as e, type RawPageOptions as f, type Page as g, type TxPlanBody as h, type CommandOptions as i, type TxPlanResponse as j, type CacheClient as k, __requestALS as l, type PalbaseResult as m, type PolicyExpr as n, type AggregateInput as o, type AggregateResult as p, type AnyColumn as q, type AtomicDatabase as r, type AtomicOptions as s, Auth as t, type AuthConfig as u, Cache as v, type ClientInfo as w, type ColRef as x, ColumnBuilder as y, type ColumnDef as z };
|