@ax-hub/sdk 0.0.1 → 0.0.4
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/CHANGELOG.md +57 -1
- package/README.md +85 -1
- package/dist/cli/doctor.cjs +1 -1
- package/dist/cli/doctor.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +223 -17
- package/dist/index.d.ts +223 -17
- package/dist/index.js +1 -1
- package/package.json +9 -4
package/dist/index.d.ts
CHANGED
|
@@ -124,10 +124,24 @@ declare class StreamConsumedError extends AxHubError {
|
|
|
124
124
|
}
|
|
125
125
|
declare class TenantSlugRequiredError extends AxHubError {
|
|
126
126
|
}
|
|
127
|
+
declare class ConfigurationError extends AxHubError {
|
|
128
|
+
}
|
|
127
129
|
declare class PoolStaleError extends UnauthenticatedError {
|
|
128
130
|
}
|
|
129
131
|
declare class WebhookVerificationError extends ValidationError {
|
|
130
132
|
}
|
|
133
|
+
declare class TableNotFoundError extends NotFoundError {
|
|
134
|
+
}
|
|
135
|
+
declare class IntrospectFailedError extends InternalServerError {
|
|
136
|
+
}
|
|
137
|
+
declare class InvalidCursorError extends ValidationError {
|
|
138
|
+
}
|
|
139
|
+
declare class LegacyCursorError extends ValidationError {
|
|
140
|
+
}
|
|
141
|
+
declare class MockInProductionError extends ConfigurationError {
|
|
142
|
+
}
|
|
143
|
+
declare class ScanLimitExceededError extends InternalServerError {
|
|
144
|
+
}
|
|
131
145
|
interface OAuthErrorInit {
|
|
132
146
|
code: string;
|
|
133
147
|
description?: string;
|
|
@@ -317,10 +331,22 @@ interface PaginatedList<T> {
|
|
|
317
331
|
items: T[];
|
|
318
332
|
nextCursor: string | null;
|
|
319
333
|
total: number;
|
|
334
|
+
firstCursor?: string | null;
|
|
335
|
+
hasNext?: boolean;
|
|
336
|
+
hasPrev?: boolean;
|
|
337
|
+
/**
|
|
338
|
+
* `true` when `total` reflects the full filtered result set the caller will
|
|
339
|
+
* see. `false` when SDK-side filtering (no backend `where` pushdown) means
|
|
340
|
+
* `total` is the backend's unfiltered total and the true filtered count
|
|
341
|
+
* requires walking remaining pages. Absent on plain unfiltered queries.
|
|
342
|
+
*/
|
|
343
|
+
totalIsExact?: boolean;
|
|
320
344
|
}
|
|
321
345
|
interface ListOptions {
|
|
322
346
|
pageSize?: number;
|
|
323
347
|
cursor?: string;
|
|
348
|
+
after?: string;
|
|
349
|
+
before?: string;
|
|
324
350
|
}
|
|
325
351
|
interface ListAllOptions extends ListOptions {
|
|
326
352
|
signal?: AbortSignal;
|
|
@@ -332,6 +358,47 @@ type ListAllItem<T> = {
|
|
|
332
358
|
type: 'drift';
|
|
333
359
|
addedSince: number;
|
|
334
360
|
};
|
|
361
|
+
type CursorDirection = 'forward' | 'backward';
|
|
362
|
+
type OrderDirection = 'asc' | 'desc';
|
|
363
|
+
interface OrderByField {
|
|
364
|
+
field: string;
|
|
365
|
+
dir?: OrderDirection;
|
|
366
|
+
}
|
|
367
|
+
type DataOrderBy = string | readonly OrderByField[];
|
|
368
|
+
interface KeysetCursor {
|
|
369
|
+
values: Record<string, string | number | boolean | null>;
|
|
370
|
+
direction: CursorDirection;
|
|
371
|
+
orderBy: OrderByField[];
|
|
372
|
+
orderByFingerprint: string;
|
|
373
|
+
tiebreaker?: {
|
|
374
|
+
field: string;
|
|
375
|
+
value: string | number;
|
|
376
|
+
};
|
|
377
|
+
/**
|
|
378
|
+
* Backend compatibility metadata. Current AX Hub data API exposes offset
|
|
379
|
+
* `page`/`per_page` pagination and treats unknown query keys as filters, so
|
|
380
|
+
* SDK-generated v2 cursors carry the next/previous page number instead of
|
|
381
|
+
* sending unsupported `after`/`before` query parameters to production.
|
|
382
|
+
*/
|
|
383
|
+
page?: number;
|
|
384
|
+
/**
|
|
385
|
+
* Scope binding. SDK-generated cursors carry a fingerprint of the
|
|
386
|
+
* `${tenant}/${app}/${table}` resource so a cursor minted on table A cannot
|
|
387
|
+
* be silently replayed against table B. Optional on decoded cursors for
|
|
388
|
+
* backward compatibility with backend-emitted cursors that omit it.
|
|
389
|
+
*/
|
|
390
|
+
contextFingerprint?: string;
|
|
391
|
+
}
|
|
392
|
+
interface CursorBuildOptions {
|
|
393
|
+
direction?: CursorDirection;
|
|
394
|
+
orderBy?: DataOrderBy;
|
|
395
|
+
page?: number;
|
|
396
|
+
contextFingerprint?: string;
|
|
397
|
+
}
|
|
398
|
+
declare function encodeCursor(cursor: KeysetCursor): string;
|
|
399
|
+
declare function decodeCursor(token: string): KeysetCursor;
|
|
400
|
+
declare function orderByFingerprint(orderBy?: DataOrderBy): string;
|
|
401
|
+
declare function cursorFromRow(row: Record<string, unknown> | undefined, opts?: CursorBuildOptions): string | null;
|
|
335
402
|
|
|
336
403
|
interface RequestOptions {
|
|
337
404
|
signal?: AbortSignal;
|
|
@@ -1500,6 +1567,30 @@ declare class AppsClient {
|
|
|
1500
1567
|
deleteEnvVar: (...args: Parameters<AppsEnvVarsMixin["deleteEnvVar"]>) => Promise<void>;
|
|
1501
1568
|
}
|
|
1502
1569
|
|
|
1570
|
+
interface ValidationOptions {
|
|
1571
|
+
/**
|
|
1572
|
+
* Zod-compatible schema. The SDK deliberately duck-types `safeParse` so
|
|
1573
|
+
* zod stays an optional peer dependency and is never bundled.
|
|
1574
|
+
*/
|
|
1575
|
+
validate?: ZodSchemaLike;
|
|
1576
|
+
}
|
|
1577
|
+
interface ZodIssueLike {
|
|
1578
|
+
path?: Array<string | number>;
|
|
1579
|
+
code?: string;
|
|
1580
|
+
message?: string;
|
|
1581
|
+
}
|
|
1582
|
+
interface ZodErrorLike {
|
|
1583
|
+
issues?: ZodIssueLike[];
|
|
1584
|
+
}
|
|
1585
|
+
interface ZodResultLike {
|
|
1586
|
+
success: boolean;
|
|
1587
|
+
error?: ZodErrorLike;
|
|
1588
|
+
}
|
|
1589
|
+
interface ZodSchemaLike {
|
|
1590
|
+
safeParse(data: unknown): ZodResultLike;
|
|
1591
|
+
partial?: () => ZodSchemaLike;
|
|
1592
|
+
}
|
|
1593
|
+
|
|
1503
1594
|
type ColumnPrimitive = 'uuid' | 'string' | 'number' | 'integer' | 'boolean' | 'timestamp' | 'json';
|
|
1504
1595
|
type EnumColumn<V extends readonly string[]> = {
|
|
1505
1596
|
type: 'enum';
|
|
@@ -1512,12 +1603,13 @@ interface DataColumn<Name extends string = string, Def extends ColumnDef = Colum
|
|
|
1512
1603
|
name: Name;
|
|
1513
1604
|
def: Def;
|
|
1514
1605
|
}
|
|
1515
|
-
interface DataTableSchema<Row extends Record<string, unknown> = Record<string, unknown
|
|
1606
|
+
interface DataTableSchema<Row extends Record<string, unknown> = Record<string, unknown>, S extends SchemaShape = SchemaShape> {
|
|
1516
1607
|
table: string;
|
|
1517
|
-
columns:
|
|
1608
|
+
columns: S;
|
|
1518
1609
|
cols: {
|
|
1519
|
-
[K in keyof
|
|
1610
|
+
[K in keyof S & string]: DataColumn<K, S[K]>;
|
|
1520
1611
|
};
|
|
1612
|
+
validate?: ZodSchemaLike;
|
|
1521
1613
|
}
|
|
1522
1614
|
type ColumnValue<D extends ColumnDef> = D extends {
|
|
1523
1615
|
type: 'enum';
|
|
@@ -1526,10 +1618,17 @@ type ColumnValue<D extends ColumnDef> = D extends {
|
|
|
1526
1618
|
type RowFromSchema<S extends SchemaShape> = {
|
|
1527
1619
|
[K in keyof S & string]: ColumnValue<S[K]>;
|
|
1528
1620
|
};
|
|
1621
|
+
type InferRow<T extends DataTableSchema> = T extends DataTableSchema<infer Row, SchemaShape> ? Row : never;
|
|
1622
|
+
type StringColumnDef<V> = string extends V ? 'string' : EnumColumn<readonly Extract<V, string>[]>;
|
|
1623
|
+
type ColumnDefFromValue<V> = V extends boolean ? 'boolean' : V extends number ? 'number' : V extends string ? StringColumnDef<V> : 'json';
|
|
1624
|
+
type SchemaShapeFromRow<Row extends Record<string, unknown>> = {
|
|
1625
|
+
[K in keyof Row & string]: ColumnDefFromValue<Row[K]>;
|
|
1626
|
+
};
|
|
1529
1627
|
declare function defineSchema<const S extends SchemaShape>(input: {
|
|
1530
1628
|
table: string;
|
|
1531
1629
|
columns: S;
|
|
1532
|
-
}): DataTableSchema<RowFromSchema<S
|
|
1630
|
+
}, opts?: ValidationOptions): DataTableSchema<RowFromSchema<S>, S>;
|
|
1631
|
+
declare function defineSchema<Row extends Record<string, unknown>, S extends SchemaShape>(input: DataTableSchema<Row, S>, opts: ValidationOptions): DataTableSchema<Row, S>;
|
|
1533
1632
|
|
|
1534
1633
|
type QueryExpr = {
|
|
1535
1634
|
op: 'eq' | 'ne' | 'gt' | 'gte' | 'lt' | 'lte' | 'like';
|
|
@@ -1555,7 +1654,9 @@ declare function raw(sql: string, params?: unknown[]): QueryExpr;
|
|
|
1555
1654
|
declare function and(...clauses: QueryExpr[]): QueryExpr;
|
|
1556
1655
|
declare function or(...clauses: QueryExpr[]): QueryExpr;
|
|
1557
1656
|
declare function not(clause: QueryExpr): QueryExpr;
|
|
1558
|
-
declare function where<
|
|
1657
|
+
declare function where<D extends ColumnDef>(column: DataColumn<string, D>): WhereBuilder<ColumnValue<D>>;
|
|
1658
|
+
declare function where<T = unknown>(column: string): WhereBuilder<T>;
|
|
1659
|
+
interface WhereBuilder<T> {
|
|
1559
1660
|
eq: (value: T) => QueryExpr;
|
|
1560
1661
|
ne: (value: T) => QueryExpr;
|
|
1561
1662
|
gt: (value: T) => QueryExpr;
|
|
@@ -1569,24 +1670,103 @@ declare function where<T>(column: DataColumn<string> | string): {
|
|
|
1569
1670
|
endsWith: (value: string) => QueryExpr;
|
|
1570
1671
|
raw: (value: string) => QueryExpr;
|
|
1571
1672
|
};
|
|
1572
|
-
}
|
|
1673
|
+
}
|
|
1674
|
+
|
|
1675
|
+
interface DiscoverOptions extends RequestOptions {
|
|
1676
|
+
/**
|
|
1677
|
+
* Bypass the schema cache and force a backend introspection request.
|
|
1678
|
+
*/
|
|
1679
|
+
fresh?: boolean;
|
|
1680
|
+
/**
|
|
1681
|
+
* Override the cache TTL for this discovered schema.
|
|
1682
|
+
*/
|
|
1683
|
+
ttlMs?: number;
|
|
1684
|
+
}
|
|
1685
|
+
|
|
1686
|
+
type SelectColumns<Row extends Record<string, unknown>> = readonly (keyof Row & string)[];
|
|
1573
1687
|
|
|
1574
|
-
interface
|
|
1688
|
+
interface SchemaCacheOptions {
|
|
1689
|
+
maxEntries?: number;
|
|
1690
|
+
ttlMs?: number;
|
|
1691
|
+
negativeTtlMs?: number;
|
|
1692
|
+
}
|
|
1693
|
+
interface SchemaCacheLookupOptions {
|
|
1694
|
+
fresh?: boolean;
|
|
1695
|
+
ttlMs?: number;
|
|
1696
|
+
}
|
|
1697
|
+
declare class SchemaCache {
|
|
1698
|
+
private readonly store;
|
|
1699
|
+
private readonly inflight;
|
|
1700
|
+
private readonly maxEntries;
|
|
1701
|
+
private readonly ttlMs;
|
|
1702
|
+
private readonly negativeTtlMs;
|
|
1703
|
+
private writeCounter;
|
|
1704
|
+
constructor(opts?: SchemaCacheOptions);
|
|
1705
|
+
get size(): number;
|
|
1706
|
+
get(key: string): DataTableSchema<Record<string, unknown>> | null;
|
|
1707
|
+
set(key: string, schema: DataTableSchema<Record<string, unknown>>, opts?: Pick<SchemaCacheLookupOptions, 'ttlMs'>): void;
|
|
1708
|
+
invalidate(key?: string): void;
|
|
1709
|
+
getOrSet(key: string, loader: () => Promise<DataTableSchema<Record<string, unknown>>>, opts?: SchemaCacheLookupOptions): Promise<DataTableSchema<Record<string, unknown>>>;
|
|
1710
|
+
private evictOverflow;
|
|
1711
|
+
}
|
|
1712
|
+
declare function schemaCacheKey(tenantSlug: string, appSlug: string, table: string): string;
|
|
1713
|
+
|
|
1714
|
+
type MockRow = Record<string, unknown>;
|
|
1715
|
+
type MockFixtures = Record<string, MockRow[]>;
|
|
1716
|
+
type MockSchemas = Record<string, DataTableSchema<MockRow>>;
|
|
1717
|
+
declare class MockStore {
|
|
1718
|
+
private readonly initialFixtures;
|
|
1719
|
+
private tables;
|
|
1720
|
+
private readonly schemas;
|
|
1721
|
+
private nextId;
|
|
1722
|
+
constructor(fixtures?: MockFixtures, schemas?: MockSchemas);
|
|
1723
|
+
keys(): string[];
|
|
1724
|
+
schema(key: string): DataTableSchema<MockRow> | undefined;
|
|
1725
|
+
list(key: string): MockRow[];
|
|
1726
|
+
get(key: string, id: string): MockRow | null;
|
|
1727
|
+
insert(key: string, row: MockRow): MockRow;
|
|
1728
|
+
update(key: string, id: string, patch: MockRow): MockRow;
|
|
1729
|
+
delete(key: string, id: string): void;
|
|
1730
|
+
reset(key?: string): void;
|
|
1731
|
+
private ensureTable;
|
|
1732
|
+
}
|
|
1733
|
+
|
|
1734
|
+
interface MockRuntime<Row extends Record<string, unknown>> {
|
|
1735
|
+
store: MockStore;
|
|
1736
|
+
key: string;
|
|
1737
|
+
schema?: DataTableSchema<Row>;
|
|
1738
|
+
}
|
|
1739
|
+
|
|
1740
|
+
interface DataClientOptions {
|
|
1741
|
+
schemaCache?: SchemaCacheOptions | SchemaCache;
|
|
1742
|
+
mockStore?: MockStore;
|
|
1743
|
+
}
|
|
1744
|
+
interface DataListOptions<Row extends Record<string, unknown> = Record<string, unknown>> extends ListOptions, RequestOptions {
|
|
1575
1745
|
where?: QueryExpr;
|
|
1576
|
-
orderBy?:
|
|
1746
|
+
orderBy?: DataOrderBy;
|
|
1747
|
+
select?: SelectColumns<Row>;
|
|
1748
|
+
limit?: number;
|
|
1749
|
+
direction?: CursorDirection;
|
|
1577
1750
|
}
|
|
1578
1751
|
interface DataCountOptions extends RequestOptions {
|
|
1579
1752
|
where?: QueryExpr;
|
|
1580
1753
|
}
|
|
1754
|
+
interface DataGetOptions<Row extends Record<string, unknown> = Record<string, unknown>> extends RequestOptions {
|
|
1755
|
+
select?: SelectColumns<Row>;
|
|
1756
|
+
}
|
|
1581
1757
|
interface DataBulkResult<Row = unknown> {
|
|
1582
1758
|
items: Row[];
|
|
1583
1759
|
count: number;
|
|
1584
1760
|
}
|
|
1585
1761
|
declare class DataClient {
|
|
1586
1762
|
private readonly http;
|
|
1587
|
-
|
|
1763
|
+
private readonly schemaCache;
|
|
1764
|
+
private readonly mockStore?;
|
|
1765
|
+
constructor(http: HttpClient, opts?: DataClientOptions);
|
|
1588
1766
|
table<Row extends Record<string, unknown> = Record<string, unknown>>(tenantSlug: string, appSlug: string, table: string | DataTableSchema<Row>): DataTableClient<Row>;
|
|
1589
1767
|
scoped(tenantSlug: string): TenantDataFactory;
|
|
1768
|
+
discover<Row extends Record<string, unknown> = Record<string, unknown>>(tenantSlug: string, appSlug: string, table: string, opts?: DiscoverOptions): Promise<DataTableClient<Row, SchemaShapeFromRow<Row>>>;
|
|
1769
|
+
invalidateSchema(tenantSlug?: string, appSlug?: string, table?: string): void;
|
|
1590
1770
|
}
|
|
1591
1771
|
declare class TenantDataFactory {
|
|
1592
1772
|
private readonly data;
|
|
@@ -1600,18 +1780,29 @@ declare class AppDataFactory {
|
|
|
1600
1780
|
private readonly appSlug;
|
|
1601
1781
|
constructor(data: DataClient, tenantSlug: string, appSlug: string);
|
|
1602
1782
|
table<Row extends Record<string, unknown> = Record<string, unknown>>(table: string | DataTableSchema<Row>): DataTableClient<Row>;
|
|
1783
|
+
discover<Row extends Record<string, unknown> = Record<string, unknown>>(table: string, opts?: DiscoverOptions): Promise<DataTableClient<Row, SchemaShapeFromRow<Row>>>;
|
|
1784
|
+
invalidateSchema(table?: string): void;
|
|
1603
1785
|
}
|
|
1604
|
-
declare class DataTableClient<Row extends Record<string, unknown> = Record<string, unknown
|
|
1786
|
+
declare class DataTableClient<Row extends Record<string, unknown> = Record<string, unknown>, S extends SchemaShape = SchemaShape> {
|
|
1605
1787
|
private readonly http;
|
|
1606
1788
|
private readonly tenantSlug;
|
|
1607
1789
|
private readonly appSlug;
|
|
1608
1790
|
private readonly tableName;
|
|
1609
|
-
|
|
1791
|
+
readonly schema?: DataTableSchema<Row, S> | undefined;
|
|
1792
|
+
private readonly mockRuntime?;
|
|
1793
|
+
private readonly contextFingerprint;
|
|
1794
|
+
constructor(http: HttpClient, tenantSlug: string, appSlug: string, tableName: string, schema?: DataTableSchema<Row, S> | undefined, mockRuntime?: MockRuntime<Row> | undefined);
|
|
1610
1795
|
private path;
|
|
1611
|
-
list(opts
|
|
1612
|
-
|
|
1796
|
+
list<const K extends keyof Row & string>(opts: DataListOptions<Row> & {
|
|
1797
|
+
select: readonly K[];
|
|
1798
|
+
}): Promise<PaginatedList<Pick<Row, K>>>;
|
|
1799
|
+
list(opts?: DataListOptions<Row>): Promise<PaginatedList<Row>>;
|
|
1800
|
+
listAll(opts?: DataListOptions<Row>): AsyncGenerator<ListAllItem<Row>>;
|
|
1613
1801
|
count(opts?: DataCountOptions): Promise<number>;
|
|
1614
|
-
get(id: string, opts
|
|
1802
|
+
get<const K extends keyof Row & string>(id: string, opts: DataGetOptions<Row> & {
|
|
1803
|
+
select: readonly K[];
|
|
1804
|
+
}): Promise<Pick<Row, K>>;
|
|
1805
|
+
get(id: string, opts?: DataGetOptions<Row>): Promise<Row>;
|
|
1615
1806
|
insert(row: Partial<Row>, opts?: RequestOptions): Promise<Row>;
|
|
1616
1807
|
insertMany(rows: Array<Partial<Row>>, opts?: RequestOptions): Promise<DataBulkResult<Row>>;
|
|
1617
1808
|
update(id: string, patch: Partial<Row>, opts?: RequestOptions): Promise<Row>;
|
|
@@ -1654,6 +1845,8 @@ declare class AppScopedDataClient {
|
|
|
1654
1845
|
private readonly rootData;
|
|
1655
1846
|
constructor(tenantSlug: string, appSlug: string, rootData: DataClient);
|
|
1656
1847
|
table<Row extends Record<string, unknown> = Record<string, unknown>>(table: string | DataTableSchema<Row>): DataTableClient<Row>;
|
|
1848
|
+
discover<Row extends Record<string, unknown> = Record<string, unknown>>(table: string, opts?: DiscoverOptions): Promise<DataTableClient<Row, SchemaShapeFromRow<Row>>>;
|
|
1849
|
+
invalidateSchema(table?: string): void;
|
|
1657
1850
|
}
|
|
1658
1851
|
declare class AppScopedTablesClient {
|
|
1659
1852
|
private readonly tenantSlug;
|
|
@@ -2049,13 +2242,21 @@ declare class PublicationRequestsClient {
|
|
|
2049
2242
|
listPending(opts?: ListOptions): Promise<PaginatedList<PublicationRequest>>;
|
|
2050
2243
|
}
|
|
2051
2244
|
|
|
2245
|
+
interface MockClientOptions {
|
|
2246
|
+
mode?: 'live' | 'mock';
|
|
2247
|
+
fixtures?: MockFixtures;
|
|
2248
|
+
schemas?: Record<string, DataTableSchema<Record<string, unknown>>>;
|
|
2249
|
+
}
|
|
2250
|
+
declare function createMockStore(opts: MockClientOptions): MockStore | undefined;
|
|
2251
|
+
declare function assertMockModeAllowed(): void;
|
|
2252
|
+
|
|
2052
2253
|
/**
|
|
2053
2254
|
* Default production base URL for AX Hub. Override via `baseUrl` for staging,
|
|
2054
2255
|
* local dev, or self-hosted environments. Also overridable via env var
|
|
2055
2256
|
* `AX_HUB_BASE_URL` (caller wires this if desired).
|
|
2056
2257
|
*/
|
|
2057
2258
|
declare const DEFAULT_BASE_URL = "https://axhub-api.jocodingax.ai";
|
|
2058
|
-
interface AxHubClientOptions {
|
|
2259
|
+
interface AxHubClientOptions extends MockClientOptions {
|
|
2059
2260
|
/**
|
|
2060
2261
|
* Backend root URL. Defaults to {@link DEFAULT_BASE_URL}. Override for
|
|
2061
2262
|
* staging / self-hosted / local dev.
|
|
@@ -2080,18 +2281,23 @@ interface AxHubClientOptions {
|
|
|
2080
2281
|
};
|
|
2081
2282
|
retryPolicy?: RetryPolicy;
|
|
2082
2283
|
rateLimitStrategy?: RateLimitStrategy;
|
|
2284
|
+
schemaCache?: SchemaCacheOptions;
|
|
2083
2285
|
}
|
|
2084
2286
|
interface AxHubInternalOptions {
|
|
2085
|
-
__sharedHttp: HttpClient;
|
|
2287
|
+
'__sharedHttp': HttpClient;
|
|
2086
2288
|
defaultTenantSlug: string;
|
|
2087
2289
|
defaultTenantId?: string;
|
|
2088
2290
|
logger: Logger;
|
|
2291
|
+
schemaCacheOptions?: SchemaCacheOptions;
|
|
2292
|
+
mockStore?: MockStore;
|
|
2089
2293
|
}
|
|
2090
2294
|
declare class AxHubClient {
|
|
2091
2295
|
readonly http: HttpClient;
|
|
2092
2296
|
readonly defaultTenantSlug?: string;
|
|
2093
2297
|
readonly defaultTenantId?: string;
|
|
2094
2298
|
readonly logger: Logger;
|
|
2299
|
+
private readonly schemaCacheOptions?;
|
|
2300
|
+
readonly mock?: MockStore;
|
|
2095
2301
|
private _apps?;
|
|
2096
2302
|
private _audit?;
|
|
2097
2303
|
private _authz?;
|
|
@@ -2190,4 +2396,4 @@ interface VerifyWebhookResult {
|
|
|
2190
2396
|
declare function signWebhook(rawBody: Buffer | Uint8Array | string, secret: string, timestamp?: string): string;
|
|
2191
2397
|
declare function verifyWebhook(input: VerifyWebhookInput): VerifyWebhookResult;
|
|
2192
2398
|
|
|
2193
|
-
export { AbortError, AccessDeniedError, type AddColumnInput, type AddCommentInput, type AddGrantInput, AlreadyAccessedError, AlreadyActiveError, AlreadyDeletedError, AlreadyInactiveError, AlreadyMemberError, AlreadyRevokedError, AlreadySettledError, type AnonymizeInput, type AppAccess, type AppCategory, type AppID, type AppId, type AppResponse, AppScopedClient, AppScopedDataClient, type AppSlug, type AppTable, type AppTemplate, AppUnavailableError, AppsClient, AuditClient, type AuditEvent, type AuditEventID, type AuthProvider, type AuthRing, AuthorizationPendingError, AuthzClient, type AuthzGrant, type AuthzSubject, type AuthzTag, AxHubClient, type AxHubClientOptions, AxHubError, type AxHubErrorInit, BadRequestError, type Branded, type BuildLogEvent, type BulkInviteResult, type ColumnType, type Comment, ConflictError, type ConnectGitInput, type ConnectorID, type CreateAppInput, type CreateCategoryInput, type CreateDeploymentInput, type CreateOAuthClientInput, type CreateTableInput, type CreateTenantInput, DEFAULT_BASE_URL, type DataBulkResult, DataClient, type DataCountOptions, type DataListOptions, DataTableClient, type DataTableSchema, type DecideInput, type DecideResult, DecodeError, type DeploymentID, type DeploymentId, type DeploymentResponse, type DeploymentStatus, DeploymentsClient, type DeviceAuthorizationResponse, DeviceFlowDeniedError, DeviceFlowTimeoutError, type DiscoverAppsOptions, type DispatchContext, DomainTakenError, DuplicateError, type EmailDomain, type EmitAuditEventInput, EmptyError, type EnvVar, ExpiredTokenError, type FetchLike, type FieldError, ForbiddenError, GatewayClient, type GatewayConnector, type GatewayEngine, type GatewayQueryInput, type GatewayQueryResult, type GatewayResource, type GitConnection, type GitConnectionSetup, type GitConnectionStatus, type GithubInstallStart, type GrantID, type GrantPrincipalType, type GrantScope, IdentityClient, IdentityDeviceCodeClient, IdentityMeClient, IdentityOAuthClient, IdentityOIDCClient, IdentityPATClient, type IdentityProvider, IdentityProviderClient, IdentitySystemOAuthClientsClient, type InstallStartInput, type IntegrityCheckResult, InternalServerError, InvalidGrantError, InvalidPathError, InvalidStateTransitionError, InvalidValueError, InvitationExpiredError, type InviteTenantMemberInput, type IssuePersonalAccessTokenInput, type IssuePersonalAccessTokenResult, LastAdminError, type LikeResult, type LikeStatus, type ListAllItem, type ListAllOptions, type ListOptions, type Logger, type MeResponse, NetworkError, NoAuth, NotAdminError, NotAllowedError, NotDeletedError, NotFoundError, NotMemberError, type OAuthClient, type OAuthClientWithSecret, OAuthError, type OAuthErrorInit, type OAuthTokenResponse, type PATID, type PATSummary, type PaginatedList, type ParsedFrame, type PatId, PendingExistsError, PermanentlyDeletedError, PermissionDeniedError, type PodEventEvent, type PodLogEvent, PoolStaleError, PreconditionFailedError, type PublicationRequest, type PublicationRequestStatus, PublicationRequestsClient, type QueryExpr, type RateLimitStrategy, RateLimitedError, type RequestId, RequiredError, type ResourceID, type RetryInfo, type SSEStream, SchemaNameTakenError, type SettlePublicationInput, type SignIconUploadInput, type SignIconUploadResult, SlowDownError, SlugTakenError, StaticTokenAuth, StreamConsumedError, type StreamItem, type SubjectID, type SubmitPublicationInput, type SystemOAuthClient, type TableColumn, type TableConstraint, type TableGrant, type TableID, type TableIndex, type TableSchema, type TagID, type Tenant, type TenantID, type TenantId, type TenantInvitation, type TenantMember, TenantScopedAppsClient, TenantScopedClient, type TenantSlug, TenantSlugRequiredError, TenantsClient, TimeoutError, TokenExpiredError, TokenInvalidError, TokenMissingError, type TokenType, UnauthenticatedError, UnavailableError, type UnlikeResult, type UnpublishInput, type UpdateAppInput, type UpdateGitConnectionInput, type UpdateTenantInput, type UserID, type UserId, ValidationError, type VerifyWebhookInput, type VerifyWebhookResult, WebhookVerificationError, type WebhookVerifyReason, and, asAppId, asAppSlug, asDeploymentId, asPatId, asRequestId, asTenantId, asTenantSlug, asUserId, defineSchema, dispatch, escapeLike, formatErrorMessage, id, isOAuthPath, not, or, parseRetryAfter, raw, signWebhook, verifyWebhook, where };
|
|
2399
|
+
export { AbortError, AccessDeniedError, type AddColumnInput, type AddCommentInput, type AddGrantInput, AlreadyAccessedError, AlreadyActiveError, AlreadyDeletedError, AlreadyInactiveError, AlreadyMemberError, AlreadyRevokedError, AlreadySettledError, type AnonymizeInput, type AppAccess, type AppCategory, type AppID, type AppId, type AppResponse, AppScopedClient, AppScopedDataClient, type AppSlug, type AppTable, type AppTemplate, AppUnavailableError, AppsClient, AuditClient, type AuditEvent, type AuditEventID, type AuthProvider, type AuthRing, AuthorizationPendingError, AuthzClient, type AuthzGrant, type AuthzSubject, type AuthzTag, AxHubClient, type AxHubClientOptions, AxHubError, type AxHubErrorInit, BadRequestError, type Branded, type BuildLogEvent, type BulkInviteResult, type ColumnType, type Comment, ConfigurationError, ConflictError, type ConnectGitInput, type ConnectorID, type CreateAppInput, type CreateCategoryInput, type CreateDeploymentInput, type CreateOAuthClientInput, type CreateTableInput, type CreateTenantInput, type CursorDirection, DEFAULT_BASE_URL, type DataBulkResult, DataClient, type DataCountOptions, type DataGetOptions, type DataListOptions, type DataOrderBy, DataTableClient, type DataTableSchema, type DecideInput, type DecideResult, DecodeError, type DeploymentID, type DeploymentId, type DeploymentResponse, type DeploymentStatus, DeploymentsClient, type DeviceAuthorizationResponse, DeviceFlowDeniedError, DeviceFlowTimeoutError, type DiscoverAppsOptions, type DiscoverOptions, type DispatchContext, DomainTakenError, DuplicateError, type EmailDomain, type EmitAuditEventInput, EmptyError, type EnvVar, ExpiredTokenError, type FetchLike, type FieldError, ForbiddenError, GatewayClient, type GatewayConnector, type GatewayEngine, type GatewayQueryInput, type GatewayQueryResult, type GatewayResource, type GitConnection, type GitConnectionSetup, type GitConnectionStatus, type GithubInstallStart, type GrantID, type GrantPrincipalType, type GrantScope, IdentityClient, IdentityDeviceCodeClient, IdentityMeClient, IdentityOAuthClient, IdentityOIDCClient, IdentityPATClient, type IdentityProvider, IdentityProviderClient, IdentitySystemOAuthClientsClient, type InferRow, type InstallStartInput, type IntegrityCheckResult, InternalServerError, IntrospectFailedError, InvalidCursorError, InvalidGrantError, InvalidPathError, InvalidStateTransitionError, InvalidValueError, InvitationExpiredError, type InviteTenantMemberInput, type IssuePersonalAccessTokenInput, type IssuePersonalAccessTokenResult, type KeysetCursor, LastAdminError, LegacyCursorError, type LikeResult, type LikeStatus, type ListAllItem, type ListAllOptions, type ListOptions, type Logger, type MeResponse, type MockClientOptions, type MockFixtures, MockInProductionError, type MockRow, type MockSchemas, MockStore, NetworkError, NoAuth, NotAdminError, NotAllowedError, NotDeletedError, NotFoundError, NotMemberError, type OAuthClient, type OAuthClientWithSecret, OAuthError, type OAuthErrorInit, type OAuthTokenResponse, type OrderByField, type PATID, type PATSummary, type PaginatedList, type ParsedFrame, type PatId, PendingExistsError, PermanentlyDeletedError, PermissionDeniedError, type PodEventEvent, type PodLogEvent, PoolStaleError, PreconditionFailedError, type PublicationRequest, type PublicationRequestStatus, PublicationRequestsClient, type QueryExpr, type RateLimitStrategy, RateLimitedError, type RequestId, RequiredError, type ResourceID, type RetryInfo, type SSEStream, ScanLimitExceededError, SchemaCache, type SchemaCacheOptions, SchemaNameTakenError, type SchemaShapeFromRow, type SelectColumns, type SettlePublicationInput, type SignIconUploadInput, type SignIconUploadResult, SlowDownError, SlugTakenError, StaticTokenAuth, StreamConsumedError, type StreamItem, type SubjectID, type SubmitPublicationInput, type SystemOAuthClient, type TableColumn, type TableConstraint, type TableGrant, type TableID, type TableIndex, TableNotFoundError, type TableSchema, type TagID, type Tenant, type TenantID, type TenantId, type TenantInvitation, type TenantMember, TenantScopedAppsClient, TenantScopedClient, type TenantSlug, TenantSlugRequiredError, TenantsClient, TimeoutError, TokenExpiredError, TokenInvalidError, TokenMissingError, type TokenType, UnauthenticatedError, UnavailableError, type UnlikeResult, type UnpublishInput, type UpdateAppInput, type UpdateGitConnectionInput, type UpdateTenantInput, type UserID, type UserId, ValidationError, type VerifyWebhookInput, type VerifyWebhookResult, WebhookVerificationError, type WebhookVerifyReason, and, asAppId, asAppSlug, asDeploymentId, asPatId, asRequestId, asTenantId, asTenantSlug, asUserId, assertMockModeAllowed, createMockStore, cursorFromRow, decodeCursor, defineSchema, dispatch, encodeCursor, escapeLike, formatErrorMessage, id, isOAuthPath, not, or, orderByFingerprint, parseRetryAfter, raw, schemaCacheKey, signWebhook, verifyWebhook, where };
|