kaafil-js 0.1.0-beta.7 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client-entry.cjs +98 -3
- package/dist/client-entry.cjs.map +1 -1
- package/dist/client-entry.d.cts +99 -33
- package/dist/client-entry.d.ts +99 -33
- package/dist/client-entry.js +98 -4
- package/dist/client-entry.js.map +1 -1
- package/dist/index.cjs +11 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +11 -0
- package/dist/index.js.map +1 -1
- package/dist/{vocabulary-Cjd7p4_r.d.cts → vocabulary-uZXjYsxn.d.cts} +17 -1
- package/dist/{vocabulary-Cjd7p4_r.d.ts → vocabulary-uZXjYsxn.d.ts} +17 -1
- package/package.json +3 -2
|
@@ -48979,6 +48979,12 @@ declare class ApiKeyEnvironmentMismatchError extends KaafilConfigError {
|
|
|
48979
48979
|
* outright (self-hosted / proxied / sandbox deployment) — the two are never
|
|
48980
48980
|
* merged or partially applied. Construction-time and immutable: there is no
|
|
48981
48981
|
* setter, callers re-construct a client to point elsewhere.
|
|
48982
|
+
*
|
|
48983
|
+
* `environment` is validated here rather than in each constructor because
|
|
48984
|
+
* this is the one call every client entry point makes before anything else
|
|
48985
|
+
* reads `environment` — including the `baseUrl`-override path, where the
|
|
48986
|
+
* value is otherwise never looked at and would go on to mis-shape the API
|
|
48987
|
+
* key guard and the sandbox-only `test` resource.
|
|
48982
48988
|
*/
|
|
48983
48989
|
declare function resolveBaseUrl(environment: Environment, baseUrl?: string): string;
|
|
48984
48990
|
|
|
@@ -49774,8 +49780,18 @@ declare class KaafilPaginationInFlightError extends KaafilPaginationError {
|
|
|
49774
49780
|
declare class KaafilPaginationExhaustedError extends KaafilPaginationError {
|
|
49775
49781
|
constructor();
|
|
49776
49782
|
}
|
|
49783
|
+
/**
|
|
49784
|
+
* A `list()` call builds one of these and returns it SYNCHRONOUSLY, before
|
|
49785
|
+
* any request goes out: it is not a promise, and `await list()` is a no-op
|
|
49786
|
+
* that hands back this same object with `items: []`. The first page arrives
|
|
49787
|
+
* only from `await paginator.next()` or from iterating the paginator — an
|
|
49788
|
+
* untouched paginator reading as an empty tenant is the shape of that
|
|
49789
|
+
* mistake, and `meta === undefined` distinguishes "not fetched yet" from a
|
|
49790
|
+
* genuinely empty first page.
|
|
49791
|
+
*/
|
|
49777
49792
|
interface KaafilPaginator<T, F> {
|
|
49778
|
-
/** Every row fetched so far, across every page pulled on the current
|
|
49793
|
+
/** Every row fetched so far, across every page pulled on the current
|
|
49794
|
+
* filters — `[]` until `next()` (or iteration) has actually run. */
|
|
49779
49795
|
readonly items: readonly T[];
|
|
49780
49796
|
/** From the last page's `meta.page.hasNext` — `true` until a first fetch has run. */
|
|
49781
49797
|
readonly hasNext: boolean;
|
|
@@ -48979,6 +48979,12 @@ declare class ApiKeyEnvironmentMismatchError extends KaafilConfigError {
|
|
|
48979
48979
|
* outright (self-hosted / proxied / sandbox deployment) — the two are never
|
|
48980
48980
|
* merged or partially applied. Construction-time and immutable: there is no
|
|
48981
48981
|
* setter, callers re-construct a client to point elsewhere.
|
|
48982
|
+
*
|
|
48983
|
+
* `environment` is validated here rather than in each constructor because
|
|
48984
|
+
* this is the one call every client entry point makes before anything else
|
|
48985
|
+
* reads `environment` — including the `baseUrl`-override path, where the
|
|
48986
|
+
* value is otherwise never looked at and would go on to mis-shape the API
|
|
48987
|
+
* key guard and the sandbox-only `test` resource.
|
|
48982
48988
|
*/
|
|
48983
48989
|
declare function resolveBaseUrl(environment: Environment, baseUrl?: string): string;
|
|
48984
48990
|
|
|
@@ -49774,8 +49780,18 @@ declare class KaafilPaginationInFlightError extends KaafilPaginationError {
|
|
|
49774
49780
|
declare class KaafilPaginationExhaustedError extends KaafilPaginationError {
|
|
49775
49781
|
constructor();
|
|
49776
49782
|
}
|
|
49783
|
+
/**
|
|
49784
|
+
* A `list()` call builds one of these and returns it SYNCHRONOUSLY, before
|
|
49785
|
+
* any request goes out: it is not a promise, and `await list()` is a no-op
|
|
49786
|
+
* that hands back this same object with `items: []`. The first page arrives
|
|
49787
|
+
* only from `await paginator.next()` or from iterating the paginator — an
|
|
49788
|
+
* untouched paginator reading as an empty tenant is the shape of that
|
|
49789
|
+
* mistake, and `meta === undefined` distinguishes "not fetched yet" from a
|
|
49790
|
+
* genuinely empty first page.
|
|
49791
|
+
*/
|
|
49777
49792
|
interface KaafilPaginator<T, F> {
|
|
49778
|
-
/** Every row fetched so far, across every page pulled on the current
|
|
49793
|
+
/** Every row fetched so far, across every page pulled on the current
|
|
49794
|
+
* filters — `[]` until `next()` (or iteration) has actually run. */
|
|
49779
49795
|
readonly items: readonly T[];
|
|
49780
49796
|
/** From the last page's `meta.page.hasNext` — `true` until a first fetch has run. */
|
|
49781
49797
|
readonly hasNext: boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "kaafil-js",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Headless, typed TypeScript client for the Kaafil on-ground and post-trip engine.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"kaafil",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
},
|
|
24
24
|
"publishConfig": {
|
|
25
25
|
"access": "public",
|
|
26
|
-
"tag": "
|
|
26
|
+
"tag": "latest",
|
|
27
27
|
"provenance": true
|
|
28
28
|
},
|
|
29
29
|
"exports": {
|
|
@@ -73,6 +73,7 @@
|
|
|
73
73
|
"smoke:surface": "pnpm build && node smoke/browser-entry-surface.mjs",
|
|
74
74
|
"smoke:offline": "pnpm build && node smoke/offline-engine.mjs",
|
|
75
75
|
"smoke": "pnpm build && node smoke/browser-entry-surface.mjs && node smoke/offline-engine.mjs",
|
|
76
|
+
"release": "pnpm build && pnpm publish --tag latest --no-provenance",
|
|
76
77
|
"release:beta": "pnpm build && pnpm publish --tag beta --no-provenance"
|
|
77
78
|
}
|
|
78
79
|
}
|