@palbase/backend 24.0.2 → 24.1.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.
Files changed (43) hide show
  1. package/dist/bin/palbase-backend.cjs +61 -9
  2. package/dist/bin/palbase-backend.cjs.map +1 -1
  3. package/dist/bin/palbase-backend.js +2 -2
  4. package/dist/{chunk-T5IOSOE5.js → chunk-ERDL5VAE.js} +2 -2
  5. package/dist/{chunk-RPZNHY7J.js → chunk-HPUSV4AZ.js} +57 -11
  6. package/dist/chunk-HPUSV4AZ.js.map +1 -0
  7. package/dist/{chunk-H3JAISUY.js → chunk-UWSYTUGM.js} +11 -1
  8. package/dist/{chunk-H3JAISUY.js.map → chunk-UWSYTUGM.js.map} +1 -1
  9. package/dist/db/index.d.cts +2 -2
  10. package/dist/db/index.d.ts +2 -2
  11. package/dist/engine/index.cjs +61 -9
  12. package/dist/engine/index.cjs.map +1 -1
  13. package/dist/engine/index.d.cts +4 -4
  14. package/dist/engine/index.d.ts +4 -4
  15. package/dist/engine/index.js +2 -2
  16. package/dist/{index-BOS_rFBO.d.ts → index-ByBMibIJ.d.ts} +1 -1
  17. package/dist/{index-dJNhDZ7j.d.ts → index-C0PMn5jl.d.ts} +3 -3
  18. package/dist/{index-MoQ31B6M.d.cts → index-D4rts8T7.d.cts} +1 -1
  19. package/dist/{index-C84bLgeO.d.cts → index-DAwHMppB.d.cts} +3 -3
  20. package/dist/index.cjs +8 -0
  21. package/dist/index.cjs.map +1 -1
  22. package/dist/index.d.cts +23 -9
  23. package/dist/index.d.ts +23 -9
  24. package/dist/index.js +5 -3
  25. package/dist/index.js.map +1 -1
  26. package/dist/openapi/index.cjs.map +1 -1
  27. package/dist/openapi/index.d.cts +2 -2
  28. package/dist/openapi/index.d.ts +2 -2
  29. package/dist/openapi/index.js +2 -2
  30. package/dist/{registry-CEod_5sz.d.ts → registry-B8pld3fj.d.ts} +1 -1
  31. package/dist/{registry-1X-skBNu.d.cts → registry-CgJvDYUW.d.cts} +1 -1
  32. package/dist/test/index.cjs.map +1 -1
  33. package/dist/test/index.d.cts +1 -1
  34. package/dist/test/index.d.ts +1 -1
  35. package/dist/test/index.js.map +1 -1
  36. package/docs/README.md +5 -1
  37. package/docs/llms-full.txt +5 -1
  38. package/package.json +1 -1
  39. package/template/AGENTS.md +34 -22
  40. package/dist/chunk-RPZNHY7J.js.map +0 -1
  41. package/dist/{chunk-T5IOSOE5.js.map → chunk-ERDL5VAE.js.map} +0 -0
  42. package/dist/{endpoint-CcQ1a36a.d.cts → endpoint-BSGw1pTu.d.cts} +16 -16
  43. package/dist/{endpoint-0_DGBajf.d.ts → endpoint-DMwJjEHQ.d.ts} +16 -16
@@ -450,20 +450,6 @@ declare function inc(by: number): TxColumnExpr;
450
450
  /** Subtract `by` from the column's current value. Only valid in an update's `set`. */
451
451
  declare function dec(by: number): TxColumnExpr;
452
452
 
453
- /** HTTP error with structured error response format.
454
- *
455
- * The base class for the throwable error classes (`PalError`, `Conflict`,
456
- * `NotFound`, …). Construct one directly with `throw new HttpError(404,
457
- * "todo_not_found", "No such todo")`, or throw a named subclass
458
- * (`throw new NotFound("todo not found")`). The runtime catches any `HttpError`
459
- * and emits the standard envelope; on the wire (and to iOS) it surfaces as
460
- * `BackendError.server(code, status, message, requestId)`.
461
- *
462
- * The optional `data` field carries a structured payload alongside the
463
- * standard envelope — for errors that need to ship extra context
464
- * (e.g. `new Conflict("locked", "title_locked", { retryAfter: 30 })`). It rides
465
- * through to the iOS typed enum's associated value.
466
- */
467
453
  /**
468
454
  * The brand that identifies an HttpError ACROSS SDK instances.
469
455
  *
@@ -482,6 +468,20 @@ declare function dec(by: number): TxColumnExpr;
482
468
  * agrees on it by VALUE rather than by identity.
483
469
  */
484
470
  declare const HTTP_ERROR_BRAND: unique symbol;
471
+ /** HTTP error with structured error response format.
472
+ *
473
+ * The base class for the throwable error classes (`PalError`, `Conflict`,
474
+ * `NotFound`, …). Construct one directly with `throw new HttpError(404,
475
+ * "todo_not_found", "No such todo")`, or throw a named subclass
476
+ * (`throw new NotFound("todo not found")`). The runtime catches any `HttpError`
477
+ * and emits the standard envelope; on the wire (and to iOS) it surfaces as
478
+ * `BackendError.server(code, status, message, requestId)`.
479
+ *
480
+ * The optional `data` field carries a structured payload alongside the
481
+ * standard envelope — for errors that need to ship extra context
482
+ * (e.g. `new Conflict("locked", "title_locked", { retryAfter: 30 })`). It rides
483
+ * through to the iOS typed enum's associated value.
484
+ */
485
485
  declare class HttpError extends Error {
486
486
  readonly status: number;
487
487
  readonly error: string;
@@ -1982,8 +1982,6 @@ interface DBOps {
1982
1982
  /** Validity'li tabloda satırın yeni versiyonu — eski kapanır (valid_to/superseded_by),
1983
1983
  * yenisi eklenir; TEK savepoint, dönüş yeni satır (FR-029, C-9). */
1984
1984
  supersede(table: string, id: string, row: Record<string, unknown>): Promise<Record<string, unknown>>;
1985
- /** Filtre + sıralama + sayfa. `offset` yalnız `limit` ile birlikte geçerlidir
1986
- * (limitsiz offset sayfa değildir; motor adıyla reddeder — FR-004). */
1987
1985
  /** Update every row the filter matches, in one statement; resolves to them.
1988
1986
  * An EMPTY filter is refused — a whole-table write is not something to reach
1989
1987
  * by accident. */
@@ -1994,6 +1992,8 @@ interface DBOps {
1994
1992
  /** How many rows match — the half of pagination limit/offset cannot supply.
1995
1993
  * An empty filter is legitimate here: counting is a read. */
1996
1994
  count(table: string, where?: Record<string, unknown>): Promise<number>;
1995
+ /** Filtre + sıralama + sayfa. `offset` yalnız `limit` ile birlikte geçerlidir
1996
+ * (limitsiz offset sayfa değildir; motor adıyla reddeder — FR-004). */
1997
1997
  findMany(table: string, query?: Record<string, unknown>, opts?: {
1998
1998
  orderBy?: {
1999
1999
  column: string;
@@ -450,20 +450,6 @@ declare function inc(by: number): TxColumnExpr;
450
450
  /** Subtract `by` from the column's current value. Only valid in an update's `set`. */
451
451
  declare function dec(by: number): TxColumnExpr;
452
452
 
453
- /** HTTP error with structured error response format.
454
- *
455
- * The base class for the throwable error classes (`PalError`, `Conflict`,
456
- * `NotFound`, …). Construct one directly with `throw new HttpError(404,
457
- * "todo_not_found", "No such todo")`, or throw a named subclass
458
- * (`throw new NotFound("todo not found")`). The runtime catches any `HttpError`
459
- * and emits the standard envelope; on the wire (and to iOS) it surfaces as
460
- * `BackendError.server(code, status, message, requestId)`.
461
- *
462
- * The optional `data` field carries a structured payload alongside the
463
- * standard envelope — for errors that need to ship extra context
464
- * (e.g. `new Conflict("locked", "title_locked", { retryAfter: 30 })`). It rides
465
- * through to the iOS typed enum's associated value.
466
- */
467
453
  /**
468
454
  * The brand that identifies an HttpError ACROSS SDK instances.
469
455
  *
@@ -482,6 +468,20 @@ declare function dec(by: number): TxColumnExpr;
482
468
  * agrees on it by VALUE rather than by identity.
483
469
  */
484
470
  declare const HTTP_ERROR_BRAND: unique symbol;
471
+ /** HTTP error with structured error response format.
472
+ *
473
+ * The base class for the throwable error classes (`PalError`, `Conflict`,
474
+ * `NotFound`, …). Construct one directly with `throw new HttpError(404,
475
+ * "todo_not_found", "No such todo")`, or throw a named subclass
476
+ * (`throw new NotFound("todo not found")`). The runtime catches any `HttpError`
477
+ * and emits the standard envelope; on the wire (and to iOS) it surfaces as
478
+ * `BackendError.server(code, status, message, requestId)`.
479
+ *
480
+ * The optional `data` field carries a structured payload alongside the
481
+ * standard envelope — for errors that need to ship extra context
482
+ * (e.g. `new Conflict("locked", "title_locked", { retryAfter: 30 })`). It rides
483
+ * through to the iOS typed enum's associated value.
484
+ */
485
485
  declare class HttpError extends Error {
486
486
  readonly status: number;
487
487
  readonly error: string;
@@ -1982,8 +1982,6 @@ interface DBOps {
1982
1982
  /** Validity'li tabloda satırın yeni versiyonu — eski kapanır (valid_to/superseded_by),
1983
1983
  * yenisi eklenir; TEK savepoint, dönüş yeni satır (FR-029, C-9). */
1984
1984
  supersede(table: string, id: string, row: Record<string, unknown>): Promise<Record<string, unknown>>;
1985
- /** Filtre + sıralama + sayfa. `offset` yalnız `limit` ile birlikte geçerlidir
1986
- * (limitsiz offset sayfa değildir; motor adıyla reddeder — FR-004). */
1987
1985
  /** Update every row the filter matches, in one statement; resolves to them.
1988
1986
  * An EMPTY filter is refused — a whole-table write is not something to reach
1989
1987
  * by accident. */
@@ -1994,6 +1992,8 @@ interface DBOps {
1994
1992
  /** How many rows match — the half of pagination limit/offset cannot supply.
1995
1993
  * An empty filter is legitimate here: counting is a read. */
1996
1994
  count(table: string, where?: Record<string, unknown>): Promise<number>;
1995
+ /** Filtre + sıralama + sayfa. `offset` yalnız `limit` ile birlikte geçerlidir
1996
+ * (limitsiz offset sayfa değildir; motor adıyla reddeder — FR-004). */
1997
1997
  findMany(table: string, query?: Record<string, unknown>, opts?: {
1998
1998
  orderBy?: {
1999
1999
  column: string;