@palbase/backend 39.1.3 → 39.1.5
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/MIGRATION.md +363 -0
- package/README.md +56 -10
- package/dist/db/index.d.cts +1 -1
- package/dist/db/index.d.ts +1 -1
- package/dist/engine/index.d.cts +3 -3
- package/dist/engine/index.d.ts +3 -3
- package/dist/{index-pK2At5Yc.d.cts → index-CCY1h_J2.d.cts} +3 -3
- package/dist/{index-Brhp8cxj.d.cts → index-Db5QHdTa.d.cts} +2 -2
- package/dist/{index-Dlu2b9-f.d.ts → index-QWN1Ncrv.d.ts} +2 -2
- package/dist/{index-eN4KzGa5.d.ts → index-fLaf0PN2.d.ts} +3 -3
- package/dist/index.d.cts +6 -6
- package/dist/index.d.ts +6 -6
- package/dist/openapi/index.d.cts +2 -2
- package/dist/openapi/index.d.ts +2 -2
- package/dist/{registry-B8ddZiMY.d.ts → registry-C7tCRyPm.d.ts} +1 -1
- package/dist/{registry-9dNeVN5d.d.cts → registry-CH6HRR6T.d.cts} +1 -1
- package/dist/test/index.cjs.map +1 -1
- package/dist/test/index.d.cts +1 -1
- package/dist/test/index.d.ts +1 -1
- package/dist/test/index.js.map +1 -1
- package/docs/auth.md +4 -3
- package/docs/llms-full.txt +4 -3
- package/package.json +4 -3
- package/template/AGENTS.md +1 -1
- package/docs/paltimate/2026-09-06-fake-offset-claim/research.md +0 -75
- package/docs/paltimate/2026-09-06-fake-offset-claim/verification.md +0 -145
package/MIGRATION.md
ADDED
|
@@ -0,0 +1,363 @@
|
|
|
1
|
+
# 33.0.0 — `Flags.$asService()` TİPTE de var (yayınlanmış bir kusurun düzeltmesi)
|
|
2
|
+
|
|
3
|
+
32.0.0'da `Flags.$asService()` YAZILDI ama TÜKETİCİYE ULAŞMIYORDU: ambient
|
|
4
|
+
singleton ham istemcinin tipiyle (`PalbaseFlagsClient`) anote edilmişti ve o
|
|
5
|
+
annotation, `Object.assign`'ın kattığı `$asService`'i public tipten SİLİYORDU.
|
|
6
|
+
|
|
7
|
+
TS2551: Property '$asService' does not exist on type 'PalbaseFlagsClient'.
|
|
8
|
+
Did you mean 'asService'?
|
|
9
|
+
|
|
10
|
+
Derlenen tek yol (`asService()`) ise tasarım gereği FIRLATIYOR — yani
|
|
11
|
+
kullanıcılar arası flag yazma 32.0.0'da tamamen kapalıydı. Singleton artık
|
|
12
|
+
kendi tipini taşıyor (`PalbaseFlagsAmbient`), tıpkı `Database`'in
|
|
13
|
+
`EnvTypedDatabase` taşıması gibi. Kod değişikliği gerekmiyor; 33.0.0'a yükselin.
|
|
14
|
+
|
|
15
|
+
# 32.0.0 — kolon codec'leri ve `$` sözünün tutulması: göç notu
|
|
16
|
+
|
|
17
|
+
## 1. `.transform<T>()` artık REDDEDİLİYOR — `.asNumber()` / `.asDecimal()` kullanın
|
|
18
|
+
|
|
19
|
+
```ts
|
|
20
|
+
// ÖNCE — derleniyordu, ama üretilen tip YALAN SÖYLÜYORDU
|
|
21
|
+
amount: numeric().transform<number>({ fromDb: Number, toDb: String })
|
|
22
|
+
|
|
23
|
+
// SONRA
|
|
24
|
+
amount: numeric().asNumber()
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
**Neden kaldırıldı:** `transform`'un hedef tipi (`<number>`) bir TİP
|
|
28
|
+
PARAMETRESİDİR ve çalışma zamanında YOKTUR. `palbase-env.d.ts`'i üreten adım
|
|
29
|
+
şemanın çalışma zamanı nesnesini okuyor, yani o tipi hiç öğrenemiyordu:
|
|
30
|
+
`bigint`/`numeric` koşulsuz `string` basılıyor, motor ise `fromDb`'yi uygulayıp
|
|
31
|
+
`number` döndürüyordu. Tip, çalışma zamanının yaptığının TERSİNİ söylüyordu — ve
|
|
32
|
+
sessizce. Bu, yanlış bir tipten daha kötüdür, çünkü görünmez.
|
|
33
|
+
|
|
34
|
+
Codec TİPLENMEK yerine ADLANDIRILIR: ad `_def`'e düşer, çalışma zamanı
|
|
35
|
+
nesnesiyle üretece ulaşır, ve hem dönüşüm hem yayılan TypeScript tipi ondan
|
|
36
|
+
türer. Tek bildirim, tek gerçek.
|
|
37
|
+
|
|
38
|
+
| Bildirilen | Üretilen tip | Çalışma zamanı |
|
|
39
|
+
|---|---|---|
|
|
40
|
+
| `numeric()` / `bigint()` | `string` | dokunulmaz |
|
|
41
|
+
| `.asNumber()` | `number` | `Number(v)` ↔ `String(v)` |
|
|
42
|
+
| `.asDecimal()` | `string` | `String(v)` (açıkça BİLDİRİLMİŞ) |
|
|
43
|
+
|
|
44
|
+
Yalnız `bigint()` ve `numeric()` üzerinde; başka bir kolon tipinde çağrılırsa
|
|
45
|
+
adıyla reddedilir. `.asNumber()` 2^53'ün üstünde hassasiyet kaybeder — o aralık
|
|
46
|
+
için `.asDecimal()`.
|
|
47
|
+
|
|
48
|
+
`palbase build` codec'siz bir `.transform<T>()` görürse tabloyu ve kolonu
|
|
49
|
+
adlandırarak reddeder; sessizce `string` basmaz.
|
|
50
|
+
|
|
51
|
+
## 2. `Flags.asService()` → `Flags.$asService()`
|
|
52
|
+
|
|
53
|
+
```ts
|
|
54
|
+
// ÖNCE
|
|
55
|
+
await Flags.asService().setOverrideForUser("u_9", "checkout", true);
|
|
56
|
+
// SONRA
|
|
57
|
+
await Flags.$asService().setOverrideForUser("u_9", "checkout", true);
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Sistem üyeleri `$` önekli (27.0.0 §3) ve `Database` bunu zaten yapıyordu;
|
|
61
|
+
`Flags`'in JSDoc'u "exactly like `Database.$asService()`" diye söz veriyordu ama
|
|
62
|
+
söz tutulmamıştı. Eski ad SESSİZCE çalışmaz: çağrılınca yeni adı söyleyerek
|
|
63
|
+
fırlatır.
|
|
64
|
+
|
|
65
|
+
Ham `PalbaseFlagsClient.asService()` DEĞİŞMEDİ — o bir iç seam ve singleton ona
|
|
66
|
+
forward eder.
|
|
67
|
+
|
|
68
|
+
## 3. `fakeDatabase().db` artık TİPLİ yüzey — ham istemci `raw`'da
|
|
69
|
+
|
|
70
|
+
```ts
|
|
71
|
+
// ÖNCE — db, çıplak DBClient'tı
|
|
72
|
+
const { db } = fakeDatabase();
|
|
73
|
+
await db.insert("todos", { id, title });
|
|
74
|
+
|
|
75
|
+
// SONRA — db, yazarın gerçekte kullandığı yüzey
|
|
76
|
+
const { db, raw } = fakeDatabase();
|
|
77
|
+
await db.$insert("todos", { id, title }); // ham op'lar `$` önekli
|
|
78
|
+
await db.public.todos.findMany({ where: … }); // tipli şema yüzeyi
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
`db` artık üretimdeki `Database`'i kuran AYNI fonksiyonla kuruluyor, yani
|
|
82
|
+
sahtenin yüzeyi gerçeğinden ayrışamaz. Doğrudan `db.insert(...)` yazan çağrılar
|
|
83
|
+
`db.$insert(...)` olur.
|
|
84
|
+
|
|
85
|
+
**DAVRANIŞ da değişti:** eşleşmeyen bir `update` artık **`null`** döndürüyor —
|
|
86
|
+
motorun her zaman döndürdüğü şey. Sahte eskiden uydurma bir satır
|
|
87
|
+
(`{ id, ...applied }`) veriyor ve onu `updated()`'a da yazıyordu. Dönüşünü
|
|
88
|
+
kullanan bir tüketici testi artık `null` üzerinde `TypeError` alır; bildirilen
|
|
89
|
+
tip zaten `| null` olduğu için derleyici uyarmaz, o yüzden burada yazıyor.
|
|
90
|
+
|
|
91
|
+
Aynı sınıftan ikinci bir düzeltme: `updateMany(…, { returning: false })` artık
|
|
92
|
+
**sayı** döndürüyor (motor gibi), dizi değil. `const n = await updateMany(…,
|
|
93
|
+
{ returning: false }); if (n === 0) throw` guard'ı sahtede HİÇ çalışmıyordu.
|
|
94
|
+
Ve `updateMany` yazdığını artık `updated()`'a kaydediyor.
|
|
95
|
+
|
|
96
|
+
**Ambient runtime'a `raw` verilir, `db` DEĞİL:**
|
|
97
|
+
|
|
98
|
+
```ts
|
|
99
|
+
withServices({ Database: fake.raw }, () => …)
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
`RuntimeServices.Database` ham istemcidir — ambient `Database` singleton'ı onu
|
|
103
|
+
SARAN şeydir. `db` verilirse yüzey iki kez sarılır ve her `$op` ıskalar.
|
|
104
|
+
|
|
105
|
+
## 4. Değişken tablo adıyla `tx.public[t]` derlenmiyor (değişiklik değil, BELGE)
|
|
106
|
+
|
|
107
|
+
Bu bir 31.0.0 kırıcısı değil; hiç çalışmamış bir yüzeyin artık YAZILI olması.
|
|
108
|
+
|
|
109
|
+
```
|
|
110
|
+
error TS2590: Expression produces a union type that is too complex to represent.
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
**Ölçüldü:** yedi tabloya kadar temiz, **sekiz tabloda düşüyor** (12, 20, 26, 40
|
|
114
|
+
tabloda da). Sınırı belirleyen tablo sayısı ile tabloların birbirinden FARKLI
|
|
115
|
+
relation ad kümesi taşıması; **kolon sayısı ETKİLEMİYOR** (8 tablo × 2 kolon
|
|
116
|
+
düşüyor, 4 tablo × 200 kolon temiz), yani "kolonlarını azalt" bir çare değildir.
|
|
117
|
+
|
|
118
|
+
Sebep TypeScript'in kendi karmaşıklık tavanı: değişken bir anahtar, derleyiciyi
|
|
119
|
+
her tablonun `where` parametresini kesiştirmeye zorluyor.
|
|
120
|
+
|
|
121
|
+
**Çare:** tablo adını literal yazın —
|
|
122
|
+
|
|
123
|
+
```ts
|
|
124
|
+
await Database.$transaction((tx) => [tx.public.payments.deleteWhere({ id })]);
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
— ya da ad gerçekten çalışma zamanında belirleniyorsa ham op'ları kullanın
|
|
128
|
+
(`Database.$query`, `Database.$deleteMany`). Aynı sınırı Kysely v0.28'de
|
|
129
|
+
kaldırdı, Drizzle'da hiç olmadı.
|
|
130
|
+
|
|
131
|
+
# 25.1.0 → 27.x — modül + DI: GERİYE DÖNÜK göç notu
|
|
132
|
+
|
|
133
|
+
**26.0.0 npm'e HİÇ YAYINLANMADI.** Registry 25.1.0'dan sonra doğrudan 27.0.0'ı
|
|
134
|
+
gösterir. 26.0.0 git'te kesildi ama yayınlanmadığı için İÇERİĞİ 27.0.0 ile
|
|
135
|
+
birlikte indi — yani 25.1.0'dan yükselen bir proje TEK yükseltmede İKİ major'ın
|
|
136
|
+
kırıcılarını aldı, ve bunlardan biri hiç belgelenmemişti. Bu bölüm o eksiği
|
|
137
|
+
kapatıyor. Aşağıdakiler 27.0.0'ın veri erişim değişikliklerine EK'tir.
|
|
138
|
+
|
|
139
|
+
## A. `controllers/` + `services/` → `modules/<alan>/`
|
|
140
|
+
|
|
141
|
+
Keşif artık dizin adından değil MODÜL bildiriminden. Her alan kendi klasöründe
|
|
142
|
+
bir `*.module.ts` taşır:
|
|
143
|
+
|
|
144
|
+
```ts
|
|
145
|
+
@Module({
|
|
146
|
+
controllers: [NotesController as Token],
|
|
147
|
+
providers: [NoteService as Token, DbNoteRepo as Token],
|
|
148
|
+
exports: [], // bu modülün DIŞARIYA açtığı sınıflar
|
|
149
|
+
imports: [], // bu modülün ERİŞEBİLECEĞİ modüller
|
|
150
|
+
})
|
|
151
|
+
export class NotesModule {}
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
Dört liste dört ayrı soruyu cevaplar: neyi SAHİPLENİYOR (`providers`), hangi
|
|
155
|
+
giriş noktalarını (`controllers`), kendi sınıflarından hangisine BAŞKASI
|
|
156
|
+
erişebilir (`exports`), kimin export'una BU erişebilir (`imports`).
|
|
157
|
+
|
|
158
|
+
**Hiçbir yerde listelenmemiş bir sınıf YOKTUR:** build onu adıyla reddeder ve
|
|
159
|
+
sınıf rota tablosuna, dispatcher'a ya da OpenAPI belgesine hiç ulaşmaz.
|
|
160
|
+
|
|
161
|
+
Kök modül YOKTUR ve mount edilecek bir yer de yoktur — sağlık probu bile
|
|
162
|
+
`modules/health/`, diğerleri gibi bir alan. Kuralın istisnası olmaması, "alan
|
|
163
|
+
eklemek" ile "klasör eklemek"i aynı şey yapan şeydir.
|
|
164
|
+
|
|
165
|
+
Bağımlılıklar KURUCUDAN gelir (`emitDecoratorMetadata` şart). Testte ikame
|
|
166
|
+
`isolated().with(Token, sahte)` ile yapılır.
|
|
167
|
+
|
|
168
|
+
> `tsconfig.json`'ın `include`'unu da kontrol edin: `controllers/`,
|
|
169
|
+
> `services/`, `models/` diye SAYAN bir liste `modules/` düzeninde HİÇBİR ŞEYLE
|
|
170
|
+
> eşleşmez, `tsc --noEmit` sıfır dosya derler ve **0 ile çıkar** — sessiz bir
|
|
171
|
+
> yeşil. Şablon artık tek bir `"**/*.ts"` kullanıyor.
|
|
172
|
+
|
|
173
|
+
## B. `@Job` ve `@Webhook` artık `name` İSTİYOR — ve varsayılanı YOK
|
|
174
|
+
|
|
175
|
+
```ts
|
|
176
|
+
@Job({ name: "nightly-rollup", schedule: "0 3 * * *" })
|
|
177
|
+
@Webhook({ name: "stripe-payments", secret: { env: "STRIPE_WEBHOOK_SECRET" } })
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
> ⚠️ **DOSYASINI YENİDEN ADLANDIRAN BİR PROJE, CANLI WEBHOOK URL'İNİ SESSİZCE
|
|
181
|
+
> KAYBEDİYORDU.** Kimlik dosyanın YERİNDEN geldiği sürece
|
|
182
|
+
> `stripe.webhook.ts` → `payments.webhook.ts` yeniden adlandırması,
|
|
183
|
+
> gönderenin yapılandırdığı `/webhooks/stripe`'ı çözülemez hâle getiriyordu ve
|
|
184
|
+
> hiçbir şey bunu söylemiyordu. Aynı şey job'lar için de geçerliydi: dosya adı
|
|
185
|
+
> değişince scheduler BAŞKA bir job başlatıyordu.
|
|
186
|
+
|
|
187
|
+
Bu yüzden `name` zorunlu ve VARSAYILANSIZ: bir varsayılan, kimlik için İKİNCİ
|
|
188
|
+
bir kaynak olurdu. Eksik ya da boş `name` açılışta adıyla fırlatır. Şekil:
|
|
189
|
+
küçük harf, rakam ve tire (bir URL'e ve bir log satırına ulaşıyor).
|
|
190
|
+
|
|
191
|
+
**Yükselirken:** her `@Job`/`@Webhook`'a bugünkü DOSYA ADINDAN türeyen adı
|
|
192
|
+
yazın — böylece scheduler satırı ve webhook URL'i DEĞİŞMEZ. Adı sonradan
|
|
193
|
+
değiştirmek isterseniz bu, göndereni yeniden yapılandırmayı gerektiren ayrı bir
|
|
194
|
+
karardır.
|
|
195
|
+
|
|
196
|
+
# 27.0.0 — veri erişim yüzeyi: göç notu
|
|
197
|
+
|
|
198
|
+
Bu sürüm **yedi kırıcı değişiklik** taşıyor. Hepsi aynı sebepten: aynı iş için iki
|
|
199
|
+
uyumsuz kapı vardı (`Database.tables.x.findMany()` ve `Database.query()`),
|
|
200
|
+
aralarında geçiş yoktu, ve yetmediğinde geliştirici her şeyi bırakıp ham SQL'e
|
|
201
|
+
geçiyordu — orada tipi de RLS yardımını da kaybederek.
|
|
202
|
+
|
|
203
|
+
**Codemod yok, ve bu bilinçli.** Yedisi de DERLEME hatası veriyor: kırılma
|
|
204
|
+
sessiz değil, `tsc` size tam olarak nerede olduğunu söylüyor. Bir codemod'un
|
|
205
|
+
sessizce yanlış dönüştürdüğü bir çağrı, elle düzeltilen bir hatadan pahalıdır.
|
|
206
|
+
|
|
207
|
+
`deploy/fixture` bu notun uygulanabilir olduğunun kanıtı: 41 derleme hatasıyla
|
|
208
|
+
başladı, sıfırla bitti, ve tek satır susturma (`as never`) kalmadı.
|
|
209
|
+
|
|
210
|
+
---
|
|
211
|
+
|
|
212
|
+
## 1. `Database.tables.x` → `Database.public.x`
|
|
213
|
+
|
|
214
|
+
```diff
|
|
215
|
+
- await Database.tables.todos.findMany(...)
|
|
216
|
+
+ await Database.public.todos.findMany(...)
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
`tables` ara katmanı kalktı. Şema adı artık YOLUN kendisi.
|
|
220
|
+
|
|
221
|
+
## 2. `Database.schema("billing").tables.x` → `Database.billing.x`
|
|
222
|
+
|
|
223
|
+
```diff
|
|
224
|
+
- await Database.schema("billing").tables.invoices.findMany(...)
|
|
225
|
+
+ await Database.billing.invoices.findMany(...)
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
Bildirilmemiş bir şema adı artık derleme hatası — eskiden çalışma zamanında
|
|
229
|
+
bulunuyordu.
|
|
230
|
+
|
|
231
|
+
## 3. Sistem üyeleri `$` önekli
|
|
232
|
+
|
|
233
|
+
```diff
|
|
234
|
+
- await Database.query("select 1")
|
|
235
|
+
- await Database.transaction(tx => ...)
|
|
236
|
+
- Database.asService()
|
|
237
|
+
+ await Database.$query("select 1")
|
|
238
|
+
+ await Database.$transaction(tx => ...)
|
|
239
|
+
+ Database.$asService()
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
**Neden:** `transactions` adlı bir tablo fintech'te neredeyse kaçınılmaz ve
|
|
243
|
+
`transaction` bir sistem üyesiydi. `$` öneki çakışmayı MATEMATİKSEL olarak
|
|
244
|
+
imkânsız kılıyor: şema doğrulayıcısı bir tablo adının `$` ile başlamasına izin
|
|
245
|
+
vermiyor.
|
|
246
|
+
|
|
247
|
+
Etkilenen üyeler: `$query`, `$transaction`, `$asService`, `$insert`, `$put`,
|
|
248
|
+
`$update`, `$delete`, `$findById`, `$findMany`, `$updateMany`, `$deleteMany`,
|
|
249
|
+
`$count`, `$search`, `$similar`, `$recommend`, `$facets`, `$supersede`,
|
|
250
|
+
`$attempt`, `$claim`, `$lockRows`, `$advisoryXactLock`.
|
|
251
|
+
|
|
252
|
+
## 4. `$query` generic'siz `unknown[]` döndürür
|
|
253
|
+
|
|
254
|
+
```diff
|
|
255
|
+
- const rows = await Database.$query("select count(*)::int as n from todos");
|
|
256
|
+
- rows[0].n // derleniyordu, doğrulanmıyordu
|
|
257
|
+
+ const rows = await Database.$query<{ n: number }>("select count(*)::int as n from todos");
|
|
258
|
+
+ rows[0].n // şekli SİZ söylediniz
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
**Neden:** eski `Row[]` dönüşü BİLİNMEYENİ biliniyormuş gibi sunuyordu.
|
|
262
|
+
TypeScript bir SQL string'ini okuyamaz; `rows[0].n` derleniyordu ama `n` diye bir
|
|
263
|
+
alan olduğunu kimse doğrulamamıştı.
|
|
264
|
+
|
|
265
|
+
## 5. `findMany(where, opts)` → `findMany({ where, ...opts })`
|
|
266
|
+
|
|
267
|
+
```diff
|
|
268
|
+
- await Database.public.todos.findMany({ done: false }, { limit: 10 })
|
|
269
|
+
+ await Database.public.todos.findMany({ where: { done: false }, limit: 10 })
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
**Neden:** iki argümanlı biçimde `findMany({ limit: 10 })` yazmak sessizce
|
|
273
|
+
"limit adlı kolonu 10'a eşit satırlar" demekti. Tek obje bu belirsizliği
|
|
274
|
+
kaldırıyor. Aynı değişiklik `updateMany`, `deleteMany`, `count` için de geçerli.
|
|
275
|
+
|
|
276
|
+
## 6. `upsert(data, { onConflict })` → `put({ data, onConflict })` — ya da `claim()`
|
|
277
|
+
|
|
278
|
+
```diff
|
|
279
|
+
- await Database.public.settings.upsert({ user_id, theme }, { onConflict: ["user_id"] })
|
|
280
|
+
+ await Database.public.settings.put({ data: { user_id, theme }, onConflict: ["user_id"] })
|
|
281
|
+
```
|
|
282
|
+
|
|
283
|
+
**Ve idempotency istiyorsanız `put` DEĞİL `claim`:**
|
|
284
|
+
|
|
285
|
+
```ts
|
|
286
|
+
const { inserted, row } = await Database.public.payments.claim(
|
|
287
|
+
{ idem_key: req.headers["idempotency-key"] },
|
|
288
|
+
{ amount, user_id },
|
|
289
|
+
);
|
|
290
|
+
if (!inserted) return row; // aynı istek ikinci kez geldi
|
|
291
|
+
```
|
|
292
|
+
|
|
293
|
+
**Neden:** `upsert` tek isim altında iki niyet taşıyordu ve ikincisi için
|
|
294
|
+
ÖLÇÜLMÜŞ biçimde yanlıştı — `ON CONFLICT DO UPDATE` ikinci çağrının verisiyle
|
|
295
|
+
birincininkini EZİYOR (canlıda ölçüldü: 10.00 → 999.00).
|
|
296
|
+
|
|
297
|
+
`tx.tables.x.upsert()` de `put()` oldu; aynı iş için transaction içinde ve
|
|
298
|
+
dışında iki farklı yazım kalmasın diye.
|
|
299
|
+
|
|
300
|
+
## 7. `indexes: [{name, columns}]` → `indexes: (c) => [index(name).on(...)]`
|
|
301
|
+
|
|
302
|
+
```diff
|
|
303
|
+
- indexes: [{ name: "orders_status_idx", columns: ["status"] }]
|
|
304
|
+
+ indexes: (c) => [index("orders_status_idx").on(c.col("status"))]
|
|
305
|
+
```
|
|
306
|
+
|
|
307
|
+
**Ve aynı biçim `policies` için de:**
|
|
308
|
+
|
|
309
|
+
```diff
|
|
310
|
+
- policies: [policy("own").using("owner = auth.uid()")]
|
|
311
|
+
+ policies: (p) => [policy("own").using(p.col("owner").eq(p.auth.uid()))]
|
|
312
|
+
```
|
|
313
|
+
|
|
314
|
+
**Neden:** kolon adları artık DERLEMEDE doğrulanıyor. Bir RLS politikasında
|
|
315
|
+
yanlış kolon adı yetki hatasıdır ve eskiden ancak deploy sırasında
|
|
316
|
+
`CREATE POLICY` çalışırken görülüyordu.
|
|
317
|
+
|
|
318
|
+
Callback olmasının sebebi teknik: index ve politika tablo tanımının İÇİNDE
|
|
319
|
+
bildiriliyor, yani `orders.status` yazmak mümkün değil — `orders` bağlaması o
|
|
320
|
+
noktada henüz kurulmamış oluyor. Kolon bağlamı callback'ten geliyor.
|
|
321
|
+
|
|
322
|
+
Ham string kaçış kapağı KALDI: `policy("x").using("<sql>")` çalışmaya devam
|
|
323
|
+
ediyor, ama orada kolon doğrulaması yok ve hata deploy anında geliyor.
|
|
324
|
+
|
|
325
|
+
---
|
|
326
|
+
|
|
327
|
+
## Yeni yüzey — kırıcı olmayanlar
|
|
328
|
+
|
|
329
|
+
Bunlar için bir şey yapmanız gerekmiyor; kademeler ham SQL'e düşmeden yukarı
|
|
330
|
+
çıkmanız için var.
|
|
331
|
+
|
|
332
|
+
| Ne | Ne zaman |
|
|
333
|
+
|---|---|
|
|
334
|
+
| `col("x")` | kolon-kolon karşılaştırma: `{ total: { gt: col("amount_paid") } }` |
|
|
335
|
+
| `increment(n)` / `decrement(n)` | sayaç: tek statement, lost update yok |
|
|
336
|
+
| `sqlFragment` | tipli filtre yetmediğinde — `select`/`orderBy`/`limit`/RLS çalışmaya devam eder |
|
|
337
|
+
| `select: [...]` | projeksiyon: dönüş tipi `Pick<Row, K>`'ye daralır |
|
|
338
|
+
| `OR` / `AND` / `NOT` | boolean bileşim |
|
|
339
|
+
| `contains` / `startsWith` / `isNull` | metin ve null operatörleri |
|
|
340
|
+
| `claim(unique, extra)` | idempotency anahtarı |
|
|
341
|
+
| `$lockRows(table, ids)` | deterministik kilit sırası — deadlock önler |
|
|
342
|
+
| `$advisoryXactLock(key)` | satırı olmayan iş için ad kilidi |
|
|
343
|
+
| `$transaction(fn, { retry })` | serileştirme hatasında yeniden dener |
|
|
344
|
+
| `appendOnly: true` | tabloda `update`/`delete`/`put`/`supersede` üyeleri TİPTE YOK, motor onları adıyla reddediyor, veritabanında REVOKE + RESTRICTIVE policy + BEFORE UPDATE/DELETE trigger |
|
|
345
|
+
| `counter()` | kolonun `increment()` ile güncellendiğini bildirir; plan HOT çakışmasını uyarır |
|
|
346
|
+
| `existsIn(table, row => …)` | üyelik tabanlı kiracılık — korelasyonlu EXISTS |
|
|
347
|
+
| `numeric().transform<T>()` | para tipini bir kez şemada tanımlayın |
|
|
348
|
+
|
|
349
|
+
## Otomatik olan şeyler
|
|
350
|
+
|
|
351
|
+
Bunları siz istemeden sistem yapıyor; plan çıktısı hepsini gerekçesiyle gösterir.
|
|
352
|
+
|
|
353
|
+
- **FK kolonlarına index** — Postgres foreign key'i otomatik indekslemez ve bedeli
|
|
354
|
+
her JOIN'de, her `ON DELETE CASCADE`'de ödenir. `references(..., { index: false })`
|
|
355
|
+
ile kapatılır.
|
|
356
|
+
- **Politika filtre kolonuna index** — kiracı bunu kendi bulamaz: yazdığı sorgu
|
|
357
|
+
`WHERE status='open'`, yavaşlığın sebebi hiç yazmadığı `tenant_id` predikatı.
|
|
358
|
+
- **`auth.uid()` → `(SELECT auth.uid())`** — satır başına değil statement başına
|
|
359
|
+
bir kez. Ölçüldü: politikada satır-başına çalışan bir fonksiyonla
|
|
360
|
+
71.958 ms → 10 ms.
|
|
361
|
+
- **`TO <rol>`** — her politikada, roller boşsa `TO PUBLIC`.
|
|
362
|
+
- **`CREATE INDEX CONCURRENTLY`** — var olan tabloya index eklemek yazmaları
|
|
363
|
+
bloklamaz; migration transaction'ının dışında koşar.
|
package/README.md
CHANGED
|
@@ -1,23 +1,69 @@
|
|
|
1
1
|
# @palbase/backend
|
|
2
2
|
|
|
3
|
-
The backend SDK for Palbase. Write
|
|
4
|
-
|
|
3
|
+
The backend SDK for Palbase. Write TypeScript class controllers, services, and
|
|
4
|
+
schema that run in the Palbase managed runtime as a typed HTTP API — a
|
|
5
|
+
`@Module` says what exists, who owns it, and what it may reach; a class no
|
|
6
|
+
module lists does not exist.
|
|
5
7
|
|
|
6
8
|
```ts
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
export
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
9
|
+
// modules/notes/dto/create.ts — the request/response schemas, as a value + a type.
|
|
10
|
+
import { z } from "@palbase/backend";
|
|
11
|
+
export const CreateNoteBody = z.object({ body: z.string().min(1) });
|
|
12
|
+
export type CreateNoteBody = z.infer<typeof CreateNoteBody>;
|
|
13
|
+
export const NoteSchema = z.object({ id: z.string(), body: z.string() });
|
|
14
|
+
export type NoteSchema = z.infer<typeof NoteSchema>;
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
```ts
|
|
18
|
+
// modules/notes/note.service.ts — @Injectable() classes. The real work.
|
|
19
|
+
import { Database, Injectable } from "@palbase/backend";
|
|
20
|
+
import { NoteSchema } from "./dto/create";
|
|
21
|
+
|
|
22
|
+
@Injectable()
|
|
23
|
+
export class NoteService {
|
|
24
|
+
create(userId: string, body: string): Promise<NoteSchema> {
|
|
25
|
+
return Database.public.notes.insert({ user_id: userId, body });
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
```ts
|
|
31
|
+
// modules/notes/notes.controller.ts — @Controller class, no `Database` import.
|
|
32
|
+
import { Body, Controller, Post, User } from "@palbase/backend";
|
|
33
|
+
import type { UserT } from "@palbase/backend";
|
|
34
|
+
import { CreateNoteBody, NoteSchema } from "./dto/create";
|
|
35
|
+
import { NoteService } from "./note.service";
|
|
36
|
+
|
|
37
|
+
@Controller("/notes")
|
|
38
|
+
export class NotesController {
|
|
39
|
+
constructor(private readonly notes: NoteService) {}
|
|
40
|
+
|
|
41
|
+
@Post("")
|
|
42
|
+
create(@Body(CreateNoteBody) body: CreateNoteBody, @User() user: UserT): Promise<NoteSchema> {
|
|
43
|
+
return this.notes.create(user.id, body.body);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
```ts
|
|
49
|
+
// modules/notes/notes.module.ts — lists them. Nothing is wired by hand.
|
|
50
|
+
import { Module, type Token } from "@palbase/backend";
|
|
51
|
+
import { NotesController } from "./notes.controller";
|
|
52
|
+
import { NoteService } from "./note.service";
|
|
53
|
+
|
|
54
|
+
@Module({
|
|
55
|
+
controllers: [NotesController as Token],
|
|
56
|
+
providers: [NoteService as Token],
|
|
57
|
+
})
|
|
58
|
+
export class NotesModule {}
|
|
15
59
|
```
|
|
16
60
|
|
|
17
61
|
## Documentation
|
|
18
62
|
|
|
19
63
|
Start with [`docs/README.md`](./docs/README.md). For AI coding tools, a single
|
|
20
64
|
concatenated corpus is generated at [`docs/llms-full.txt`](./docs/llms-full.txt).
|
|
65
|
+
See [`MIGRATION.md`](./MIGRATION.md) for breaking-change notes between major
|
|
66
|
+
versions.
|
|
21
67
|
|
|
22
68
|
## License
|
|
23
69
|
|
package/dist/db/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { o as AnyColumn, p as AtomicDatabase, q as AtomicOptions, y as ColumnBuilder, z as ColumnDef, F as ColumnMap, G as ColumnType, C as CommandOptions, D as DatabaseBudget, d as DatabaseDiagnostics, c as DatabaseDiagnosticsOptions, K as DatabaseQueryEvent, N as EXTENSION_DEPENDENCIES, O as EmbeddingModelRef, E as EnvServiceDatabase, V as EnvTypedDatabase, af as InsertManyOptions, ag as InsertShape, al as Materialized, as as OnDeleteAction, au as PALBASE_EXTENSIONS, P as Page, aw as PageInfo, ax as PageInput, ay as PageNavigation, b5 as PalbaseExtension, c8 as PolicyBuilder, c9 as PolicyCommand, ca as PolicyDef, cd as PolicyMode, cg as RawConstraintDef, f as RawPageOptions, ci as Ref, ck as RowShape, S as SchemaDef, ct as TABLE_META, cu as TableDef, cv as TableHandle, cw as TableInput, T as TransactionIsolation, cz as TxColumnExpr, cA as TxInsertShape, cC as TxNow, cD as TxPlan, g as TxPlanBody, cE as TxPlanError, cF as TxPlanHandle, cG as TxPlanOpResult, cH as TxPlanRejection, h as TxPlanResponse, cI as TxRefError, cJ as TxRow, cK as TxRows, cL as TxSelectOptions, cM as TxSetShape, cO as TxTable, cP as TxTables, cQ as TxWhere, cW as TypedDB, cX as TypedTable, cY as TypedTx, c$ as UniqueWhere, d9 as bigint, da as boolean, de as dec, dh as defineSchema, di as defineTable, dj as enumType, dp as inc, ds as installationRef, dt as integer, du as isPalbaseExtension, dw as jsonb, dx as makeTypedDB, dy as now, dC as openai, dD as ownedByUser, dE as policy, dF as raw, dH as text, dI as timestamp, dJ as userRef, dK as uuid, dL as vector } from '../index-
|
|
1
|
+
export { o as AnyColumn, p as AtomicDatabase, q as AtomicOptions, y as ColumnBuilder, z as ColumnDef, F as ColumnMap, G as ColumnType, C as CommandOptions, D as DatabaseBudget, d as DatabaseDiagnostics, c as DatabaseDiagnosticsOptions, K as DatabaseQueryEvent, N as EXTENSION_DEPENDENCIES, O as EmbeddingModelRef, E as EnvServiceDatabase, V as EnvTypedDatabase, af as InsertManyOptions, ag as InsertShape, al as Materialized, as as OnDeleteAction, au as PALBASE_EXTENSIONS, P as Page, aw as PageInfo, ax as PageInput, ay as PageNavigation, b5 as PalbaseExtension, c8 as PolicyBuilder, c9 as PolicyCommand, ca as PolicyDef, cd as PolicyMode, cg as RawConstraintDef, f as RawPageOptions, ci as Ref, ck as RowShape, S as SchemaDef, ct as TABLE_META, cu as TableDef, cv as TableHandle, cw as TableInput, T as TransactionIsolation, cz as TxColumnExpr, cA as TxInsertShape, cC as TxNow, cD as TxPlan, g as TxPlanBody, cE as TxPlanError, cF as TxPlanHandle, cG as TxPlanOpResult, cH as TxPlanRejection, h as TxPlanResponse, cI as TxRefError, cJ as TxRow, cK as TxRows, cL as TxSelectOptions, cM as TxSetShape, cO as TxTable, cP as TxTables, cQ as TxWhere, cW as TypedDB, cX as TypedTable, cY as TypedTx, c$ as UniqueWhere, d9 as bigint, da as boolean, de as dec, dh as defineSchema, di as defineTable, dj as enumType, dp as inc, ds as installationRef, dt as integer, du as isPalbaseExtension, dw as jsonb, dx as makeTypedDB, dy as now, dC as openai, dD as ownedByUser, dE as policy, dF as raw, dH as text, dI as timestamp, dJ as userRef, dK as uuid, dL as vector } from '../index-CCY1h_J2.cjs';
|
|
2
2
|
import 'zod';
|
|
3
3
|
import './env.cjs';
|
|
4
4
|
import '../stack.cjs';
|
package/dist/db/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { o as AnyColumn, p as AtomicDatabase, q as AtomicOptions, y as ColumnBuilder, z as ColumnDef, F as ColumnMap, G as ColumnType, C as CommandOptions, D as DatabaseBudget, d as DatabaseDiagnostics, c as DatabaseDiagnosticsOptions, K as DatabaseQueryEvent, N as EXTENSION_DEPENDENCIES, O as EmbeddingModelRef, E as EnvServiceDatabase, V as EnvTypedDatabase, af as InsertManyOptions, ag as InsertShape, al as Materialized, as as OnDeleteAction, au as PALBASE_EXTENSIONS, P as Page, aw as PageInfo, ax as PageInput, ay as PageNavigation, b5 as PalbaseExtension, c8 as PolicyBuilder, c9 as PolicyCommand, ca as PolicyDef, cd as PolicyMode, cg as RawConstraintDef, f as RawPageOptions, ci as Ref, ck as RowShape, S as SchemaDef, ct as TABLE_META, cu as TableDef, cv as TableHandle, cw as TableInput, T as TransactionIsolation, cz as TxColumnExpr, cA as TxInsertShape, cC as TxNow, cD as TxPlan, g as TxPlanBody, cE as TxPlanError, cF as TxPlanHandle, cG as TxPlanOpResult, cH as TxPlanRejection, h as TxPlanResponse, cI as TxRefError, cJ as TxRow, cK as TxRows, cL as TxSelectOptions, cM as TxSetShape, cO as TxTable, cP as TxTables, cQ as TxWhere, cW as TypedDB, cX as TypedTable, cY as TypedTx, c$ as UniqueWhere, d9 as bigint, da as boolean, de as dec, dh as defineSchema, di as defineTable, dj as enumType, dp as inc, ds as installationRef, dt as integer, du as isPalbaseExtension, dw as jsonb, dx as makeTypedDB, dy as now, dC as openai, dD as ownedByUser, dE as policy, dF as raw, dH as text, dI as timestamp, dJ as userRef, dK as uuid, dL as vector } from '../index-
|
|
1
|
+
export { o as AnyColumn, p as AtomicDatabase, q as AtomicOptions, y as ColumnBuilder, z as ColumnDef, F as ColumnMap, G as ColumnType, C as CommandOptions, D as DatabaseBudget, d as DatabaseDiagnostics, c as DatabaseDiagnosticsOptions, K as DatabaseQueryEvent, N as EXTENSION_DEPENDENCIES, O as EmbeddingModelRef, E as EnvServiceDatabase, V as EnvTypedDatabase, af as InsertManyOptions, ag as InsertShape, al as Materialized, as as OnDeleteAction, au as PALBASE_EXTENSIONS, P as Page, aw as PageInfo, ax as PageInput, ay as PageNavigation, b5 as PalbaseExtension, c8 as PolicyBuilder, c9 as PolicyCommand, ca as PolicyDef, cd as PolicyMode, cg as RawConstraintDef, f as RawPageOptions, ci as Ref, ck as RowShape, S as SchemaDef, ct as TABLE_META, cu as TableDef, cv as TableHandle, cw as TableInput, T as TransactionIsolation, cz as TxColumnExpr, cA as TxInsertShape, cC as TxNow, cD as TxPlan, g as TxPlanBody, cE as TxPlanError, cF as TxPlanHandle, cG as TxPlanOpResult, cH as TxPlanRejection, h as TxPlanResponse, cI as TxRefError, cJ as TxRow, cK as TxRows, cL as TxSelectOptions, cM as TxSetShape, cO as TxTable, cP as TxTables, cQ as TxWhere, cW as TypedDB, cX as TypedTable, cY as TypedTx, c$ as UniqueWhere, d9 as bigint, da as boolean, de as dec, dh as defineSchema, di as defineTable, dj as enumType, dp as inc, ds as installationRef, dt as integer, du as isPalbaseExtension, dw as jsonb, dx as makeTypedDB, dy as now, dC as openai, dD as ownedByUser, dE as policy, dF as raw, dH as text, dI as timestamp, dJ as userRef, dK as uuid, dL as vector } from '../index-fLaf0PN2.js';
|
|
2
2
|
import 'zod';
|
|
3
3
|
import './env.js';
|
|
4
4
|
import '../stack.js';
|
package/dist/engine/index.d.cts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import '../index-
|
|
2
|
-
export { A as App, g as AuthVerifier, B as BootRefused, h as COMMAND_EXECUTOR_DDL, j as CreateAppOptions, D as DECLARATION_REFUSAL, a as DeclarationRefused, E as EgressPolicy, k as EngineConfig, M as ModuleClients, R as RateLimiter, l as RequestDatabase, m as RouteEntry, n as RuntimeHooks, S as ScrubResult, o as SqlDriver, p as SqlTx, q as buildRouteTable, r as createApp, s as createLazyTransaction, t as createOps, u as createRequestDatabase, v as effectiveAuth, w as hostAllowed, x as installCommandExecutor, y as installEgressFence, i as isDeclarationRefused, z as loadConfig, F as makeMemoryCache, G as matchRoute, H as quoteIdent, I as scrubSecrets, J as setCursorKey, K as withQueryCancellation, L as withTables } from '../index-
|
|
1
|
+
import '../index-CCY1h_J2.cjs';
|
|
2
|
+
export { A as App, g as AuthVerifier, B as BootRefused, h as COMMAND_EXECUTOR_DDL, j as CreateAppOptions, D as DECLARATION_REFUSAL, a as DeclarationRefused, E as EgressPolicy, k as EngineConfig, M as ModuleClients, R as RateLimiter, l as RequestDatabase, m as RouteEntry, n as RuntimeHooks, S as ScrubResult, o as SqlDriver, p as SqlTx, q as buildRouteTable, r as createApp, s as createLazyTransaction, t as createOps, u as createRequestDatabase, v as effectiveAuth, w as hostAllowed, x as installCommandExecutor, y as installEgressFence, i as isDeclarationRefused, z as loadConfig, F as makeMemoryCache, G as matchRoute, H as quoteIdent, I as scrubSecrets, J as setCursorKey, K as withQueryCancellation, L as withTables } from '../index-Db5QHdTa.cjs';
|
|
3
3
|
import 'zod';
|
|
4
4
|
import '../db/env.cjs';
|
|
5
5
|
import '../stack.cjs';
|
|
6
6
|
import 'node:async_hooks';
|
|
7
7
|
import '../module-Dl1KFVtc.cjs';
|
|
8
|
-
import '../registry-
|
|
8
|
+
import '../registry-CH6HRR6T.cjs';
|
package/dist/engine/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import '../index-
|
|
2
|
-
export { A as App, g as AuthVerifier, B as BootRefused, h as COMMAND_EXECUTOR_DDL, j as CreateAppOptions, D as DECLARATION_REFUSAL, a as DeclarationRefused, E as EgressPolicy, k as EngineConfig, M as ModuleClients, R as RateLimiter, l as RequestDatabase, m as RouteEntry, n as RuntimeHooks, S as ScrubResult, o as SqlDriver, p as SqlTx, q as buildRouteTable, r as createApp, s as createLazyTransaction, t as createOps, u as createRequestDatabase, v as effectiveAuth, w as hostAllowed, x as installCommandExecutor, y as installEgressFence, i as isDeclarationRefused, z as loadConfig, F as makeMemoryCache, G as matchRoute, H as quoteIdent, I as scrubSecrets, J as setCursorKey, K as withQueryCancellation, L as withTables } from '../index-
|
|
1
|
+
import '../index-fLaf0PN2.js';
|
|
2
|
+
export { A as App, g as AuthVerifier, B as BootRefused, h as COMMAND_EXECUTOR_DDL, j as CreateAppOptions, D as DECLARATION_REFUSAL, a as DeclarationRefused, E as EgressPolicy, k as EngineConfig, M as ModuleClients, R as RateLimiter, l as RequestDatabase, m as RouteEntry, n as RuntimeHooks, S as ScrubResult, o as SqlDriver, p as SqlTx, q as buildRouteTable, r as createApp, s as createLazyTransaction, t as createOps, u as createRequestDatabase, v as effectiveAuth, w as hostAllowed, x as installCommandExecutor, y as installEgressFence, i as isDeclarationRefused, z as loadConfig, F as makeMemoryCache, G as matchRoute, H as quoteIdent, I as scrubSecrets, J as setCursorKey, K as withQueryCancellation, L as withTables } from '../index-QWN1Ncrv.js';
|
|
3
3
|
import 'zod';
|
|
4
4
|
import '../db/env.js';
|
|
5
5
|
import '../stack.js';
|
|
6
6
|
import 'node:async_hooks';
|
|
7
7
|
import '../module-Dl1KFVtc.js';
|
|
8
|
-
import '../registry-
|
|
8
|
+
import '../registry-C7tCRyPm.js';
|
|
@@ -2238,9 +2238,9 @@ interface PalbaseEmailSendParams {
|
|
|
2238
2238
|
templateSlug?: string;
|
|
2239
2239
|
/**
|
|
2240
2240
|
* Which locale of `templateSlug` to render — a BCP47 short tag ("tr").
|
|
2241
|
-
* Falls back to "en" when the slug has no row for it. Declaring a locale
|
|
2242
|
-
*
|
|
2243
|
-
* rows exist and are unreachable.
|
|
2241
|
+
* Falls back to "en" when the slug has no row for it. Declaring a locale
|
|
2242
|
+
* with `palbase notifications templates set` is only half the feature:
|
|
2243
|
+
* without this the extra rows exist and are unreachable.
|
|
2244
2244
|
*/
|
|
2245
2245
|
locale?: string;
|
|
2246
2246
|
variables?: Record<string, unknown>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { c as DatabaseDiagnosticsOptions, d as DatabaseDiagnostics, a as DBClient, T as TransactionIsolation, e as DBOps, f as RawPageOptions, P as Page, g as TxPlanBody, C as CommandOptions, h as TxPlanResponse, A as AuthSpec, i as CacheClient, b as RuntimeServices, _ as __runWithRuntime, j as __requestALS } from './index-
|
|
1
|
+
import { c as DatabaseDiagnosticsOptions, d as DatabaseDiagnostics, a as DBClient, T as TransactionIsolation, e as DBOps, f as RawPageOptions, P as Page, g as TxPlanBody, C as CommandOptions, h as TxPlanResponse, A as AuthSpec, i as CacheClient, b as RuntimeServices, _ as __runWithRuntime, j as __requestALS } from './index-CCY1h_J2.cjs';
|
|
2
2
|
import { T as Token } from './module-Dl1KFVtc.cjs';
|
|
3
|
-
import { R as RouteMeta } from './registry-
|
|
3
|
+
import { R as RouteMeta } from './registry-CH6HRR6T.cjs';
|
|
4
4
|
|
|
5
5
|
interface AdmissionLease {
|
|
6
6
|
queueMs: number;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { c as DatabaseDiagnosticsOptions, d as DatabaseDiagnostics, a as DBClient, T as TransactionIsolation, e as DBOps, f as RawPageOptions, P as Page, g as TxPlanBody, C as CommandOptions, h as TxPlanResponse, A as AuthSpec, i as CacheClient, b as RuntimeServices, _ as __runWithRuntime, j as __requestALS } from './index-
|
|
1
|
+
import { c as DatabaseDiagnosticsOptions, d as DatabaseDiagnostics, a as DBClient, T as TransactionIsolation, e as DBOps, f as RawPageOptions, P as Page, g as TxPlanBody, C as CommandOptions, h as TxPlanResponse, A as AuthSpec, i as CacheClient, b as RuntimeServices, _ as __runWithRuntime, j as __requestALS } from './index-fLaf0PN2.js';
|
|
2
2
|
import { T as Token } from './module-Dl1KFVtc.js';
|
|
3
|
-
import { R as RouteMeta } from './registry-
|
|
3
|
+
import { R as RouteMeta } from './registry-C7tCRyPm.js';
|
|
4
4
|
|
|
5
5
|
interface AdmissionLease {
|
|
6
6
|
queueMs: number;
|
|
@@ -2238,9 +2238,9 @@ interface PalbaseEmailSendParams {
|
|
|
2238
2238
|
templateSlug?: string;
|
|
2239
2239
|
/**
|
|
2240
2240
|
* Which locale of `templateSlug` to render — a BCP47 short tag ("tr").
|
|
2241
|
-
* Falls back to "en" when the slug has no row for it. Declaring a locale
|
|
2242
|
-
*
|
|
2243
|
-
* rows exist and are unreachable.
|
|
2241
|
+
* Falls back to "en" when the slug has no row for it. Declaring a locale
|
|
2242
|
+
* with `palbase notifications templates set` is only half the feature:
|
|
2243
|
+
* without this the extra rows exist and are unreachable.
|
|
2244
2244
|
*/
|
|
2245
2245
|
locale?: string;
|
|
2246
2246
|
variables?: Record<string, unknown>;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { k as PalbaseResult, l as PolicyExpr, S as SchemaDef, A as AuthSpec, H as HttpError } from './index-
|
|
2
|
-
export { m as AggregateInput, n as AggregateResult, o as AnyColumn, p as AtomicDatabase, q as AtomicOptions, r as Auth, s as AuthConfig, B as BackfillDef, t as BadRequest, u as Cache, i as CacheClient, v as CheckDef, w as ClientInfo, x as ColRef, y as ColumnBuilder, z as ColumnDef, F as ColumnMap, G as ColumnType, C as CommandOptions, I as Conflict, a as DBClient, e as DBOps, J as Database, D as DatabaseBudget, d as DatabaseDiagnostics, c as DatabaseDiagnosticsOptions, K as DatabaseQueryEvent, L as DeadlockDetected, M as Documents, N as EXTENSION_DEPENDENCIES, O as EmbeddingModelRef, Q as EnvSchemas, E as EnvServiceDatabase, U as EnvTables, V as EnvTypedDatabase, W as EnvTypedTable, X as ErrorDef, Y as ErrorMap, Z as ErrorThrowers, $ as FileContext, a0 as FindManyOpts, a1 as FkAction, a2 as FkMatch, a3 as Flags, a4 as Forbidden, a5 as ForeignKeyBuilder, a6 as ForeignKeyDef, a7 as FreezeBuilder, a8 as FreezeDef, a9 as GuardBuilder, aa as GuardDef, ab as GuardEvent, ac as HttpMethod, ad as IndexBuilder, ae as IndexDef, af as InsertManyOptions, ag as InsertShape, ah as InsertValues, ai as LifecycleHook, aj as Log, ak as Logger, al as Materialized, am as Middleware, an as MiddlewareContext, ao as MiddlewareHandler, ap as MutateInput, aq as NotFound, ar as Notifications, as as OnDeleteAction, at as OrderBySpec, au as PALBASE_EXTENSIONS, av as PBRequest, P as Page, aw as PageInfo, ax as PageInput, ay as PageNavigation, az as PalError, aA as PalbaseAnalyticsClient, aB as PalbaseAnalyticsManagementNamespace, aC as PalbaseAnalyticsProperties, aD as PalbaseAnalyticsQueryNamespace, aE as PalbaseAttestAndroidParams, aF as PalbaseAttestAndroidResult, aG as PalbaseAttestiOSParams, aH as PalbaseAttestiOSResult, aI as PalbaseAuthAdminClient, aJ as PalbaseAuthClient, aK as PalbaseBatchOverrideOperation, aL as PalbaseBatchSetOverridesResult, aM as PalbaseBindDeviceParams, aN as PalbaseBucketClient, aO as PalbaseClearAllOverridesResult, aP as PalbaseClearOverrideResult, aQ as PalbaseCohortQueryInput, aR as PalbaseCohortResult, aS as PalbaseCollectionRef, aT as PalbaseCountQueryInput, aU as PalbaseCountResult, aV as PalbaseCreateLinkParams, aW as PalbaseDeviceInfo, aX as PalbaseDeviceTokenView, aY as PalbaseDocsClient, aZ as PalbaseDocumentRef, a_ as PalbaseDocumentSnapshot, a$ as PalbaseEmailClient, b0 as PalbaseEmailSendParams, b1 as PalbaseEmailSendResponse, b2 as PalbaseEventNamesResult, b3 as PalbaseEventsQueryInput, b4 as PalbaseEventsResult, b5 as PalbaseExtension, b6 as PalbaseFileObject, b7 as PalbaseFlag, b8 as PalbaseFlagContext, b9 as PalbaseFlagSource, ba as PalbaseFlagValue, bb as PalbaseFlagVariant, bc as PalbaseFlagsClient, bd as PalbaseFlagsServiceClient, be as PalbaseFunctionsClient, bf as PalbaseFunnelQueryInput, bg as PalbaseFunnelResult, bh as PalbaseIdentifyTraits, bi as PalbaseInboxClient, bj as PalbaseInboxListOptions, bk as PalbaseInboxListResult, bl as PalbaseInboxMessage, bm as PalbaseInboxSendParams, bn as PalbaseInboxSendResponse, bo as PalbaseInitialLink, bp as PalbaseInvokeOptions, bq as PalbaseLink, br as PalbaseLinkAnalytics, bs as PalbaseLinkDetails, bt as PalbaseLinksClient, bu as PalbaseListLinksOptions, bv as PalbaseListLinksResult, bw as PalbaseListOptions, bx as PalbaseMatchParams, by as PalbaseMultiChannelResponse, bz as PalbaseNotificationChannel, bA as PalbaseNotificationsClient, bB as PalbaseOverviewResult, bC as PalbasePreferences, bD as PalbasePreferencesClient, bE as PalbasePushClient, bF as PalbasePushSendParams, bG as PalbasePushSendResponse, bH as PalbaseQrCodeOptions, bI as PalbaseQuerySnapshot, bJ as PalbaseRealtimeClient, bK as PalbaseRegisterDeviceParams, bL as PalbaseRetentionQueryInput, bM as PalbaseRetentionResult, bN as PalbaseSession, bO as PalbaseSetOverrideResult, bP as PalbaseSetOverridesResult, bQ as PalbaseSignedUrlResponse, bR as PalbaseSmsClient, bS as PalbaseSmsSendParams, bT as PalbaseSmsSendResponse, bU as PalbaseStorageClient, bV as PalbaseTransformOptions, bW as PalbaseUpdateLinkParams, bX as PalbaseUploadOptions, bY as PalbaseUser, bZ as PalbaseUserDetailResult, b_ as PalbaseUsersQueryInput, b$ as PalbaseUsersResult, c0 as PalbaseVerifyRequestSignatureParams, c1 as PalbaseWhatsAppClient, c2 as PalbaseWhatsAppEvent, c3 as PalbaseWhatsAppSendParams, c4 as PalbaseWhatsAppSendResponse, c5 as PalbaseWhatsAppTemplate, c6 as PalbaseWhereOperator, c7 as PolicyBinOp, c8 as PolicyBuilder, c9 as PolicyCommand, ca as PolicyDef, cb as PolicyExprCtx, cc as PolicyExprRef, cd as PolicyMode, ce as PolicyOperand, cf as QueryInput, R as RateLimitConfig, cg as RawConstraintDef, f as RawPageOptions, ch as Realtime, ci as Ref, cj as RequestStore, ck as RowShape, b as RuntimeServices, cl as Secrets, cm as SecretsService, cn as SerializationFailure, co as SetShape, cp as SetValue, cq as ShutdownRunner, cr as SqlFragment, cs as Storage, ct as TABLE_META, cu as TableDef, cv as TableHandle, cw as TableInput, cx as TableRef, cy as TooManyRequests, T as TransactionIsolation, cz as TxColumnExpr, cA as TxInsertShape, cB as TxInsertValue, cC as TxNow, cD as TxPlan, g as TxPlanBody, cE as TxPlanError, cF as TxPlanHandle, cG as TxPlanOpResult, cH as TxPlanRejection, h as TxPlanResponse, cI as TxRefError, cJ as TxRow, cK as TxRows, cL as TxSelectOptions, cM as TxSetShape, cN as TxSetValue, cO as TxTable, cP as TxTables, cQ as TxWhere, cR as TxWireExpr, cS as TxWireGuard, cT as TxWireOp, cU as TxWireRef, cV as TxWireValue, cW as TypedDB, cX as TypedTable, cY as TypedTx, cZ as Unauthorized, c_ as UniqueViolation, c$ as UniqueWhere, d0 as UserT, d1 as VerifiedDevice, d2 as WhereFilter, d3 as WhereOp, d4 as __getRuntime, j as __requestALS, d5 as __resetLifecycleHooks, d6 as __runStartHooks, _ as __runWithRuntime, d7 as __setRuntime, d8 as backfill, d9 as bigint, da as boolean, db as can, dc as check, dd as col, de as dec, df as decrement, dg as defineMiddleware, dh as defineSchema, di as defineTable, dj as enumType, dk as exprCtx, dl as foreignKey, dm as freeze, dn as guard, dp as inc, dq as increment, dr as index, ds as installationRef, dt as integer, du as isPalbaseExtension, dv as isRetryable, dw as jsonb, dx as makeTypedDB, dy as now, dz as numeric, dA as onShutdown, dB as onStart, dC as openai, dD as ownedByUser, dE as policy, dF as raw, dG as sqlFragment, dH as text, dI as timestamp, dJ as userRef, dK as uuid, dL as vector, dM as withRetry } from './index-
|
|
3
|
-
import { M as ModuleClients, C as Container } from './index-
|
|
4
|
-
export { D as DECLARATION_REFUSAL, a as DeclarationRefused, b as DiError, c as DiKind, d as ModulePressure, e as assertNoOrphanEntryPoints, f as buildContainer, i as isDeclarationRefused } from './index-
|
|
1
|
+
import { k as PalbaseResult, l as PolicyExpr, S as SchemaDef, A as AuthSpec, H as HttpError } from './index-CCY1h_J2.cjs';
|
|
2
|
+
export { m as AggregateInput, n as AggregateResult, o as AnyColumn, p as AtomicDatabase, q as AtomicOptions, r as Auth, s as AuthConfig, B as BackfillDef, t as BadRequest, u as Cache, i as CacheClient, v as CheckDef, w as ClientInfo, x as ColRef, y as ColumnBuilder, z as ColumnDef, F as ColumnMap, G as ColumnType, C as CommandOptions, I as Conflict, a as DBClient, e as DBOps, J as Database, D as DatabaseBudget, d as DatabaseDiagnostics, c as DatabaseDiagnosticsOptions, K as DatabaseQueryEvent, L as DeadlockDetected, M as Documents, N as EXTENSION_DEPENDENCIES, O as EmbeddingModelRef, Q as EnvSchemas, E as EnvServiceDatabase, U as EnvTables, V as EnvTypedDatabase, W as EnvTypedTable, X as ErrorDef, Y as ErrorMap, Z as ErrorThrowers, $ as FileContext, a0 as FindManyOpts, a1 as FkAction, a2 as FkMatch, a3 as Flags, a4 as Forbidden, a5 as ForeignKeyBuilder, a6 as ForeignKeyDef, a7 as FreezeBuilder, a8 as FreezeDef, a9 as GuardBuilder, aa as GuardDef, ab as GuardEvent, ac as HttpMethod, ad as IndexBuilder, ae as IndexDef, af as InsertManyOptions, ag as InsertShape, ah as InsertValues, ai as LifecycleHook, aj as Log, ak as Logger, al as Materialized, am as Middleware, an as MiddlewareContext, ao as MiddlewareHandler, ap as MutateInput, aq as NotFound, ar as Notifications, as as OnDeleteAction, at as OrderBySpec, au as PALBASE_EXTENSIONS, av as PBRequest, P as Page, aw as PageInfo, ax as PageInput, ay as PageNavigation, az as PalError, aA as PalbaseAnalyticsClient, aB as PalbaseAnalyticsManagementNamespace, aC as PalbaseAnalyticsProperties, aD as PalbaseAnalyticsQueryNamespace, aE as PalbaseAttestAndroidParams, aF as PalbaseAttestAndroidResult, aG as PalbaseAttestiOSParams, aH as PalbaseAttestiOSResult, aI as PalbaseAuthAdminClient, aJ as PalbaseAuthClient, aK as PalbaseBatchOverrideOperation, aL as PalbaseBatchSetOverridesResult, aM as PalbaseBindDeviceParams, aN as PalbaseBucketClient, aO as PalbaseClearAllOverridesResult, aP as PalbaseClearOverrideResult, aQ as PalbaseCohortQueryInput, aR as PalbaseCohortResult, aS as PalbaseCollectionRef, aT as PalbaseCountQueryInput, aU as PalbaseCountResult, aV as PalbaseCreateLinkParams, aW as PalbaseDeviceInfo, aX as PalbaseDeviceTokenView, aY as PalbaseDocsClient, aZ as PalbaseDocumentRef, a_ as PalbaseDocumentSnapshot, a$ as PalbaseEmailClient, b0 as PalbaseEmailSendParams, b1 as PalbaseEmailSendResponse, b2 as PalbaseEventNamesResult, b3 as PalbaseEventsQueryInput, b4 as PalbaseEventsResult, b5 as PalbaseExtension, b6 as PalbaseFileObject, b7 as PalbaseFlag, b8 as PalbaseFlagContext, b9 as PalbaseFlagSource, ba as PalbaseFlagValue, bb as PalbaseFlagVariant, bc as PalbaseFlagsClient, bd as PalbaseFlagsServiceClient, be as PalbaseFunctionsClient, bf as PalbaseFunnelQueryInput, bg as PalbaseFunnelResult, bh as PalbaseIdentifyTraits, bi as PalbaseInboxClient, bj as PalbaseInboxListOptions, bk as PalbaseInboxListResult, bl as PalbaseInboxMessage, bm as PalbaseInboxSendParams, bn as PalbaseInboxSendResponse, bo as PalbaseInitialLink, bp as PalbaseInvokeOptions, bq as PalbaseLink, br as PalbaseLinkAnalytics, bs as PalbaseLinkDetails, bt as PalbaseLinksClient, bu as PalbaseListLinksOptions, bv as PalbaseListLinksResult, bw as PalbaseListOptions, bx as PalbaseMatchParams, by as PalbaseMultiChannelResponse, bz as PalbaseNotificationChannel, bA as PalbaseNotificationsClient, bB as PalbaseOverviewResult, bC as PalbasePreferences, bD as PalbasePreferencesClient, bE as PalbasePushClient, bF as PalbasePushSendParams, bG as PalbasePushSendResponse, bH as PalbaseQrCodeOptions, bI as PalbaseQuerySnapshot, bJ as PalbaseRealtimeClient, bK as PalbaseRegisterDeviceParams, bL as PalbaseRetentionQueryInput, bM as PalbaseRetentionResult, bN as PalbaseSession, bO as PalbaseSetOverrideResult, bP as PalbaseSetOverridesResult, bQ as PalbaseSignedUrlResponse, bR as PalbaseSmsClient, bS as PalbaseSmsSendParams, bT as PalbaseSmsSendResponse, bU as PalbaseStorageClient, bV as PalbaseTransformOptions, bW as PalbaseUpdateLinkParams, bX as PalbaseUploadOptions, bY as PalbaseUser, bZ as PalbaseUserDetailResult, b_ as PalbaseUsersQueryInput, b$ as PalbaseUsersResult, c0 as PalbaseVerifyRequestSignatureParams, c1 as PalbaseWhatsAppClient, c2 as PalbaseWhatsAppEvent, c3 as PalbaseWhatsAppSendParams, c4 as PalbaseWhatsAppSendResponse, c5 as PalbaseWhatsAppTemplate, c6 as PalbaseWhereOperator, c7 as PolicyBinOp, c8 as PolicyBuilder, c9 as PolicyCommand, ca as PolicyDef, cb as PolicyExprCtx, cc as PolicyExprRef, cd as PolicyMode, ce as PolicyOperand, cf as QueryInput, R as RateLimitConfig, cg as RawConstraintDef, f as RawPageOptions, ch as Realtime, ci as Ref, cj as RequestStore, ck as RowShape, b as RuntimeServices, cl as Secrets, cm as SecretsService, cn as SerializationFailure, co as SetShape, cp as SetValue, cq as ShutdownRunner, cr as SqlFragment, cs as Storage, ct as TABLE_META, cu as TableDef, cv as TableHandle, cw as TableInput, cx as TableRef, cy as TooManyRequests, T as TransactionIsolation, cz as TxColumnExpr, cA as TxInsertShape, cB as TxInsertValue, cC as TxNow, cD as TxPlan, g as TxPlanBody, cE as TxPlanError, cF as TxPlanHandle, cG as TxPlanOpResult, cH as TxPlanRejection, h as TxPlanResponse, cI as TxRefError, cJ as TxRow, cK as TxRows, cL as TxSelectOptions, cM as TxSetShape, cN as TxSetValue, cO as TxTable, cP as TxTables, cQ as TxWhere, cR as TxWireExpr, cS as TxWireGuard, cT as TxWireOp, cU as TxWireRef, cV as TxWireValue, cW as TypedDB, cX as TypedTable, cY as TypedTx, cZ as Unauthorized, c_ as UniqueViolation, c$ as UniqueWhere, d0 as UserT, d1 as VerifiedDevice, d2 as WhereFilter, d3 as WhereOp, d4 as __getRuntime, j as __requestALS, d5 as __resetLifecycleHooks, d6 as __runStartHooks, _ as __runWithRuntime, d7 as __setRuntime, d8 as backfill, d9 as bigint, da as boolean, db as can, dc as check, dd as col, de as dec, df as decrement, dg as defineMiddleware, dh as defineSchema, di as defineTable, dj as enumType, dk as exprCtx, dl as foreignKey, dm as freeze, dn as guard, dp as inc, dq as increment, dr as index, ds as installationRef, dt as integer, du as isPalbaseExtension, dv as isRetryable, dw as jsonb, dx as makeTypedDB, dy as now, dz as numeric, dA as onShutdown, dB as onStart, dC as openai, dD as ownedByUser, dE as policy, dF as raw, dG as sqlFragment, dH as text, dI as timestamp, dJ as userRef, dK as uuid, dL as vector, dM as withRetry } from './index-CCY1h_J2.cjs';
|
|
3
|
+
import { M as ModuleClients, C as Container } from './index-Db5QHdTa.cjs';
|
|
4
|
+
export { D as DECLARATION_REFUSAL, a as DeclarationRefused, b as DiError, c as DiKind, d as ModulePressure, e as assertNoOrphanEntryPoints, f as buildContainer, i as isDeclarationRefused } from './index-Db5QHdTa.cjs';
|
|
5
5
|
export { TableTypes, Tables } from './db/env.cjs';
|
|
6
6
|
export { PalbaseBucketName, PalbaseFlagKey, PalbaseSecretName } from './stack.cjs';
|
|
7
|
-
import { a as RouteOptions } from './registry-
|
|
8
|
-
export { H as HttpMethodUpper, b as ParamKind, P as ParamMeta, R as RouteMeta, c as Signal, d as Sse, S as SseConfig, e as SseOut, f as SseWriter, T as ThrowDescriptor, g as Upload, U as UploadConfig, h as UploadedObject, i as getRoutes, r as recordThrows } from './registry-
|
|
7
|
+
import { a as RouteOptions } from './registry-CH6HRR6T.cjs';
|
|
8
|
+
export { H as HttpMethodUpper, b as ParamKind, P as ParamMeta, R as RouteMeta, c as Signal, d as Sse, S as SseConfig, e as SseOut, f as SseWriter, T as ThrowDescriptor, g as Upload, U as UploadConfig, h as UploadedObject, i as getRoutes, r as recordThrows } from './registry-CH6HRR6T.cjs';
|
|
9
9
|
import { ZodTypeAny, z } from 'zod';
|
|
10
10
|
export { z } from 'zod';
|
|
11
11
|
import { T as Token } from './module-Dl1KFVtc.cjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { k as PalbaseResult, l as PolicyExpr, S as SchemaDef, A as AuthSpec, H as HttpError } from './index-
|
|
2
|
-
export { m as AggregateInput, n as AggregateResult, o as AnyColumn, p as AtomicDatabase, q as AtomicOptions, r as Auth, s as AuthConfig, B as BackfillDef, t as BadRequest, u as Cache, i as CacheClient, v as CheckDef, w as ClientInfo, x as ColRef, y as ColumnBuilder, z as ColumnDef, F as ColumnMap, G as ColumnType, C as CommandOptions, I as Conflict, a as DBClient, e as DBOps, J as Database, D as DatabaseBudget, d as DatabaseDiagnostics, c as DatabaseDiagnosticsOptions, K as DatabaseQueryEvent, L as DeadlockDetected, M as Documents, N as EXTENSION_DEPENDENCIES, O as EmbeddingModelRef, Q as EnvSchemas, E as EnvServiceDatabase, U as EnvTables, V as EnvTypedDatabase, W as EnvTypedTable, X as ErrorDef, Y as ErrorMap, Z as ErrorThrowers, $ as FileContext, a0 as FindManyOpts, a1 as FkAction, a2 as FkMatch, a3 as Flags, a4 as Forbidden, a5 as ForeignKeyBuilder, a6 as ForeignKeyDef, a7 as FreezeBuilder, a8 as FreezeDef, a9 as GuardBuilder, aa as GuardDef, ab as GuardEvent, ac as HttpMethod, ad as IndexBuilder, ae as IndexDef, af as InsertManyOptions, ag as InsertShape, ah as InsertValues, ai as LifecycleHook, aj as Log, ak as Logger, al as Materialized, am as Middleware, an as MiddlewareContext, ao as MiddlewareHandler, ap as MutateInput, aq as NotFound, ar as Notifications, as as OnDeleteAction, at as OrderBySpec, au as PALBASE_EXTENSIONS, av as PBRequest, P as Page, aw as PageInfo, ax as PageInput, ay as PageNavigation, az as PalError, aA as PalbaseAnalyticsClient, aB as PalbaseAnalyticsManagementNamespace, aC as PalbaseAnalyticsProperties, aD as PalbaseAnalyticsQueryNamespace, aE as PalbaseAttestAndroidParams, aF as PalbaseAttestAndroidResult, aG as PalbaseAttestiOSParams, aH as PalbaseAttestiOSResult, aI as PalbaseAuthAdminClient, aJ as PalbaseAuthClient, aK as PalbaseBatchOverrideOperation, aL as PalbaseBatchSetOverridesResult, aM as PalbaseBindDeviceParams, aN as PalbaseBucketClient, aO as PalbaseClearAllOverridesResult, aP as PalbaseClearOverrideResult, aQ as PalbaseCohortQueryInput, aR as PalbaseCohortResult, aS as PalbaseCollectionRef, aT as PalbaseCountQueryInput, aU as PalbaseCountResult, aV as PalbaseCreateLinkParams, aW as PalbaseDeviceInfo, aX as PalbaseDeviceTokenView, aY as PalbaseDocsClient, aZ as PalbaseDocumentRef, a_ as PalbaseDocumentSnapshot, a$ as PalbaseEmailClient, b0 as PalbaseEmailSendParams, b1 as PalbaseEmailSendResponse, b2 as PalbaseEventNamesResult, b3 as PalbaseEventsQueryInput, b4 as PalbaseEventsResult, b5 as PalbaseExtension, b6 as PalbaseFileObject, b7 as PalbaseFlag, b8 as PalbaseFlagContext, b9 as PalbaseFlagSource, ba as PalbaseFlagValue, bb as PalbaseFlagVariant, bc as PalbaseFlagsClient, bd as PalbaseFlagsServiceClient, be as PalbaseFunctionsClient, bf as PalbaseFunnelQueryInput, bg as PalbaseFunnelResult, bh as PalbaseIdentifyTraits, bi as PalbaseInboxClient, bj as PalbaseInboxListOptions, bk as PalbaseInboxListResult, bl as PalbaseInboxMessage, bm as PalbaseInboxSendParams, bn as PalbaseInboxSendResponse, bo as PalbaseInitialLink, bp as PalbaseInvokeOptions, bq as PalbaseLink, br as PalbaseLinkAnalytics, bs as PalbaseLinkDetails, bt as PalbaseLinksClient, bu as PalbaseListLinksOptions, bv as PalbaseListLinksResult, bw as PalbaseListOptions, bx as PalbaseMatchParams, by as PalbaseMultiChannelResponse, bz as PalbaseNotificationChannel, bA as PalbaseNotificationsClient, bB as PalbaseOverviewResult, bC as PalbasePreferences, bD as PalbasePreferencesClient, bE as PalbasePushClient, bF as PalbasePushSendParams, bG as PalbasePushSendResponse, bH as PalbaseQrCodeOptions, bI as PalbaseQuerySnapshot, bJ as PalbaseRealtimeClient, bK as PalbaseRegisterDeviceParams, bL as PalbaseRetentionQueryInput, bM as PalbaseRetentionResult, bN as PalbaseSession, bO as PalbaseSetOverrideResult, bP as PalbaseSetOverridesResult, bQ as PalbaseSignedUrlResponse, bR as PalbaseSmsClient, bS as PalbaseSmsSendParams, bT as PalbaseSmsSendResponse, bU as PalbaseStorageClient, bV as PalbaseTransformOptions, bW as PalbaseUpdateLinkParams, bX as PalbaseUploadOptions, bY as PalbaseUser, bZ as PalbaseUserDetailResult, b_ as PalbaseUsersQueryInput, b$ as PalbaseUsersResult, c0 as PalbaseVerifyRequestSignatureParams, c1 as PalbaseWhatsAppClient, c2 as PalbaseWhatsAppEvent, c3 as PalbaseWhatsAppSendParams, c4 as PalbaseWhatsAppSendResponse, c5 as PalbaseWhatsAppTemplate, c6 as PalbaseWhereOperator, c7 as PolicyBinOp, c8 as PolicyBuilder, c9 as PolicyCommand, ca as PolicyDef, cb as PolicyExprCtx, cc as PolicyExprRef, cd as PolicyMode, ce as PolicyOperand, cf as QueryInput, R as RateLimitConfig, cg as RawConstraintDef, f as RawPageOptions, ch as Realtime, ci as Ref, cj as RequestStore, ck as RowShape, b as RuntimeServices, cl as Secrets, cm as SecretsService, cn as SerializationFailure, co as SetShape, cp as SetValue, cq as ShutdownRunner, cr as SqlFragment, cs as Storage, ct as TABLE_META, cu as TableDef, cv as TableHandle, cw as TableInput, cx as TableRef, cy as TooManyRequests, T as TransactionIsolation, cz as TxColumnExpr, cA as TxInsertShape, cB as TxInsertValue, cC as TxNow, cD as TxPlan, g as TxPlanBody, cE as TxPlanError, cF as TxPlanHandle, cG as TxPlanOpResult, cH as TxPlanRejection, h as TxPlanResponse, cI as TxRefError, cJ as TxRow, cK as TxRows, cL as TxSelectOptions, cM as TxSetShape, cN as TxSetValue, cO as TxTable, cP as TxTables, cQ as TxWhere, cR as TxWireExpr, cS as TxWireGuard, cT as TxWireOp, cU as TxWireRef, cV as TxWireValue, cW as TypedDB, cX as TypedTable, cY as TypedTx, cZ as Unauthorized, c_ as UniqueViolation, c$ as UniqueWhere, d0 as UserT, d1 as VerifiedDevice, d2 as WhereFilter, d3 as WhereOp, d4 as __getRuntime, j as __requestALS, d5 as __resetLifecycleHooks, d6 as __runStartHooks, _ as __runWithRuntime, d7 as __setRuntime, d8 as backfill, d9 as bigint, da as boolean, db as can, dc as check, dd as col, de as dec, df as decrement, dg as defineMiddleware, dh as defineSchema, di as defineTable, dj as enumType, dk as exprCtx, dl as foreignKey, dm as freeze, dn as guard, dp as inc, dq as increment, dr as index, ds as installationRef, dt as integer, du as isPalbaseExtension, dv as isRetryable, dw as jsonb, dx as makeTypedDB, dy as now, dz as numeric, dA as onShutdown, dB as onStart, dC as openai, dD as ownedByUser, dE as policy, dF as raw, dG as sqlFragment, dH as text, dI as timestamp, dJ as userRef, dK as uuid, dL as vector, dM as withRetry } from './index-
|
|
3
|
-
import { M as ModuleClients, C as Container } from './index-
|
|
4
|
-
export { D as DECLARATION_REFUSAL, a as DeclarationRefused, b as DiError, c as DiKind, d as ModulePressure, e as assertNoOrphanEntryPoints, f as buildContainer, i as isDeclarationRefused } from './index-
|
|
1
|
+
import { k as PalbaseResult, l as PolicyExpr, S as SchemaDef, A as AuthSpec, H as HttpError } from './index-fLaf0PN2.js';
|
|
2
|
+
export { m as AggregateInput, n as AggregateResult, o as AnyColumn, p as AtomicDatabase, q as AtomicOptions, r as Auth, s as AuthConfig, B as BackfillDef, t as BadRequest, u as Cache, i as CacheClient, v as CheckDef, w as ClientInfo, x as ColRef, y as ColumnBuilder, z as ColumnDef, F as ColumnMap, G as ColumnType, C as CommandOptions, I as Conflict, a as DBClient, e as DBOps, J as Database, D as DatabaseBudget, d as DatabaseDiagnostics, c as DatabaseDiagnosticsOptions, K as DatabaseQueryEvent, L as DeadlockDetected, M as Documents, N as EXTENSION_DEPENDENCIES, O as EmbeddingModelRef, Q as EnvSchemas, E as EnvServiceDatabase, U as EnvTables, V as EnvTypedDatabase, W as EnvTypedTable, X as ErrorDef, Y as ErrorMap, Z as ErrorThrowers, $ as FileContext, a0 as FindManyOpts, a1 as FkAction, a2 as FkMatch, a3 as Flags, a4 as Forbidden, a5 as ForeignKeyBuilder, a6 as ForeignKeyDef, a7 as FreezeBuilder, a8 as FreezeDef, a9 as GuardBuilder, aa as GuardDef, ab as GuardEvent, ac as HttpMethod, ad as IndexBuilder, ae as IndexDef, af as InsertManyOptions, ag as InsertShape, ah as InsertValues, ai as LifecycleHook, aj as Log, ak as Logger, al as Materialized, am as Middleware, an as MiddlewareContext, ao as MiddlewareHandler, ap as MutateInput, aq as NotFound, ar as Notifications, as as OnDeleteAction, at as OrderBySpec, au as PALBASE_EXTENSIONS, av as PBRequest, P as Page, aw as PageInfo, ax as PageInput, ay as PageNavigation, az as PalError, aA as PalbaseAnalyticsClient, aB as PalbaseAnalyticsManagementNamespace, aC as PalbaseAnalyticsProperties, aD as PalbaseAnalyticsQueryNamespace, aE as PalbaseAttestAndroidParams, aF as PalbaseAttestAndroidResult, aG as PalbaseAttestiOSParams, aH as PalbaseAttestiOSResult, aI as PalbaseAuthAdminClient, aJ as PalbaseAuthClient, aK as PalbaseBatchOverrideOperation, aL as PalbaseBatchSetOverridesResult, aM as PalbaseBindDeviceParams, aN as PalbaseBucketClient, aO as PalbaseClearAllOverridesResult, aP as PalbaseClearOverrideResult, aQ as PalbaseCohortQueryInput, aR as PalbaseCohortResult, aS as PalbaseCollectionRef, aT as PalbaseCountQueryInput, aU as PalbaseCountResult, aV as PalbaseCreateLinkParams, aW as PalbaseDeviceInfo, aX as PalbaseDeviceTokenView, aY as PalbaseDocsClient, aZ as PalbaseDocumentRef, a_ as PalbaseDocumentSnapshot, a$ as PalbaseEmailClient, b0 as PalbaseEmailSendParams, b1 as PalbaseEmailSendResponse, b2 as PalbaseEventNamesResult, b3 as PalbaseEventsQueryInput, b4 as PalbaseEventsResult, b5 as PalbaseExtension, b6 as PalbaseFileObject, b7 as PalbaseFlag, b8 as PalbaseFlagContext, b9 as PalbaseFlagSource, ba as PalbaseFlagValue, bb as PalbaseFlagVariant, bc as PalbaseFlagsClient, bd as PalbaseFlagsServiceClient, be as PalbaseFunctionsClient, bf as PalbaseFunnelQueryInput, bg as PalbaseFunnelResult, bh as PalbaseIdentifyTraits, bi as PalbaseInboxClient, bj as PalbaseInboxListOptions, bk as PalbaseInboxListResult, bl as PalbaseInboxMessage, bm as PalbaseInboxSendParams, bn as PalbaseInboxSendResponse, bo as PalbaseInitialLink, bp as PalbaseInvokeOptions, bq as PalbaseLink, br as PalbaseLinkAnalytics, bs as PalbaseLinkDetails, bt as PalbaseLinksClient, bu as PalbaseListLinksOptions, bv as PalbaseListLinksResult, bw as PalbaseListOptions, bx as PalbaseMatchParams, by as PalbaseMultiChannelResponse, bz as PalbaseNotificationChannel, bA as PalbaseNotificationsClient, bB as PalbaseOverviewResult, bC as PalbasePreferences, bD as PalbasePreferencesClient, bE as PalbasePushClient, bF as PalbasePushSendParams, bG as PalbasePushSendResponse, bH as PalbaseQrCodeOptions, bI as PalbaseQuerySnapshot, bJ as PalbaseRealtimeClient, bK as PalbaseRegisterDeviceParams, bL as PalbaseRetentionQueryInput, bM as PalbaseRetentionResult, bN as PalbaseSession, bO as PalbaseSetOverrideResult, bP as PalbaseSetOverridesResult, bQ as PalbaseSignedUrlResponse, bR as PalbaseSmsClient, bS as PalbaseSmsSendParams, bT as PalbaseSmsSendResponse, bU as PalbaseStorageClient, bV as PalbaseTransformOptions, bW as PalbaseUpdateLinkParams, bX as PalbaseUploadOptions, bY as PalbaseUser, bZ as PalbaseUserDetailResult, b_ as PalbaseUsersQueryInput, b$ as PalbaseUsersResult, c0 as PalbaseVerifyRequestSignatureParams, c1 as PalbaseWhatsAppClient, c2 as PalbaseWhatsAppEvent, c3 as PalbaseWhatsAppSendParams, c4 as PalbaseWhatsAppSendResponse, c5 as PalbaseWhatsAppTemplate, c6 as PalbaseWhereOperator, c7 as PolicyBinOp, c8 as PolicyBuilder, c9 as PolicyCommand, ca as PolicyDef, cb as PolicyExprCtx, cc as PolicyExprRef, cd as PolicyMode, ce as PolicyOperand, cf as QueryInput, R as RateLimitConfig, cg as RawConstraintDef, f as RawPageOptions, ch as Realtime, ci as Ref, cj as RequestStore, ck as RowShape, b as RuntimeServices, cl as Secrets, cm as SecretsService, cn as SerializationFailure, co as SetShape, cp as SetValue, cq as ShutdownRunner, cr as SqlFragment, cs as Storage, ct as TABLE_META, cu as TableDef, cv as TableHandle, cw as TableInput, cx as TableRef, cy as TooManyRequests, T as TransactionIsolation, cz as TxColumnExpr, cA as TxInsertShape, cB as TxInsertValue, cC as TxNow, cD as TxPlan, g as TxPlanBody, cE as TxPlanError, cF as TxPlanHandle, cG as TxPlanOpResult, cH as TxPlanRejection, h as TxPlanResponse, cI as TxRefError, cJ as TxRow, cK as TxRows, cL as TxSelectOptions, cM as TxSetShape, cN as TxSetValue, cO as TxTable, cP as TxTables, cQ as TxWhere, cR as TxWireExpr, cS as TxWireGuard, cT as TxWireOp, cU as TxWireRef, cV as TxWireValue, cW as TypedDB, cX as TypedTable, cY as TypedTx, cZ as Unauthorized, c_ as UniqueViolation, c$ as UniqueWhere, d0 as UserT, d1 as VerifiedDevice, d2 as WhereFilter, d3 as WhereOp, d4 as __getRuntime, j as __requestALS, d5 as __resetLifecycleHooks, d6 as __runStartHooks, _ as __runWithRuntime, d7 as __setRuntime, d8 as backfill, d9 as bigint, da as boolean, db as can, dc as check, dd as col, de as dec, df as decrement, dg as defineMiddleware, dh as defineSchema, di as defineTable, dj as enumType, dk as exprCtx, dl as foreignKey, dm as freeze, dn as guard, dp as inc, dq as increment, dr as index, ds as installationRef, dt as integer, du as isPalbaseExtension, dv as isRetryable, dw as jsonb, dx as makeTypedDB, dy as now, dz as numeric, dA as onShutdown, dB as onStart, dC as openai, dD as ownedByUser, dE as policy, dF as raw, dG as sqlFragment, dH as text, dI as timestamp, dJ as userRef, dK as uuid, dL as vector, dM as withRetry } from './index-fLaf0PN2.js';
|
|
3
|
+
import { M as ModuleClients, C as Container } from './index-QWN1Ncrv.js';
|
|
4
|
+
export { D as DECLARATION_REFUSAL, a as DeclarationRefused, b as DiError, c as DiKind, d as ModulePressure, e as assertNoOrphanEntryPoints, f as buildContainer, i as isDeclarationRefused } from './index-QWN1Ncrv.js';
|
|
5
5
|
export { TableTypes, Tables } from './db/env.js';
|
|
6
6
|
export { PalbaseBucketName, PalbaseFlagKey, PalbaseSecretName } from './stack.js';
|
|
7
|
-
import { a as RouteOptions } from './registry-
|
|
8
|
-
export { H as HttpMethodUpper, b as ParamKind, P as ParamMeta, R as RouteMeta, c as Signal, d as Sse, S as SseConfig, e as SseOut, f as SseWriter, T as ThrowDescriptor, g as Upload, U as UploadConfig, h as UploadedObject, i as getRoutes, r as recordThrows } from './registry-
|
|
7
|
+
import { a as RouteOptions } from './registry-C7tCRyPm.js';
|
|
8
|
+
export { H as HttpMethodUpper, b as ParamKind, P as ParamMeta, R as RouteMeta, c as Signal, d as Sse, S as SseConfig, e as SseOut, f as SseWriter, T as ThrowDescriptor, g as Upload, U as UploadConfig, h as UploadedObject, i as getRoutes, r as recordThrows } from './registry-C7tCRyPm.js';
|
|
9
9
|
import { ZodTypeAny, z } from 'zod';
|
|
10
10
|
export { z } from 'zod';
|
|
11
11
|
import { T as Token } from './module-Dl1KFVtc.js';
|