@ax-hub/sdk 0.0.4 → 0.0.6

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/index.d.cts CHANGED
@@ -305,28 +305,6 @@ declare class HttpClient {
305
305
  private logRequest;
306
306
  }
307
307
 
308
- interface ParsedFrame {
309
- id?: string;
310
- event?: string;
311
- data: string;
312
- }
313
- type StreamItem<T> = {
314
- type: 'item';
315
- value: T;
316
- id: string | undefined;
317
- } | {
318
- type: 'gap';
319
- sinceId: string | undefined;
320
- missingCount?: number;
321
- } | {
322
- type: 'decode-skip';
323
- frame: ParsedFrame;
324
- error: AxHubError;
325
- };
326
- interface SSEStream<T> extends AsyncIterable<StreamItem<T>> {
327
- dispose(): void;
328
- }
329
-
330
308
  interface PaginatedList<T> {
331
309
  items: T[];
332
310
  nextCursor: string | null;
@@ -408,77 +386,6 @@ interface RequestOptions {
408
386
  interface PageRequestOptions extends ListOptions, RequestOptions {
409
387
  }
410
388
 
411
- interface GatewayEngine {
412
- name: 'postgres' | 'mysql' | string;
413
- capabilities: string[];
414
- }
415
- interface GatewayConnector {
416
- id: string;
417
- engine: string;
418
- name: string;
419
- [key: string]: unknown;
420
- }
421
- interface GatewayResource {
422
- id: string;
423
- connectorId: string;
424
- name: string;
425
- [key: string]: unknown;
426
- }
427
- interface GatewayQueryInput {
428
- resourceId?: string;
429
- connectorId?: string;
430
- path?: string;
431
- sql: string;
432
- params?: unknown[];
433
- rowLimit?: number;
434
- }
435
- interface GatewayQueryResult<Row = Record<string, unknown>> {
436
- rows: Row[];
437
- rowCount: number;
438
- auditEventId?: string;
439
- }
440
- declare class GatewayClient {
441
- private readonly http;
442
- constructor(http: HttpClient);
443
- scoped(tenantSlug: string): TenantGatewayClient;
444
- }
445
- declare class TenantGatewayClient {
446
- readonly engines: GatewayEnginesClient;
447
- readonly connectors: GatewayConnectorsClient;
448
- readonly resources: GatewayResourcesClient;
449
- readonly query: GatewayQueryClient;
450
- constructor(http: HttpClient, tenantSlug: string);
451
- }
452
- declare class GatewayEnginesClient {
453
- private readonly http;
454
- private readonly base;
455
- constructor(http: HttpClient, base: string);
456
- list(opts?: RequestOptions): Promise<GatewayEngine[]>;
457
- }
458
- declare class GatewayCrud<T extends {
459
- id: string;
460
- }> {
461
- protected readonly http: HttpClient;
462
- protected readonly base: string;
463
- constructor(http: HttpClient, base: string);
464
- list(opts?: PageRequestOptions): Promise<PaginatedList<T>>;
465
- get(id: string, opts?: RequestOptions): Promise<T>;
466
- create(input: Record<string, unknown>, opts?: RequestOptions): Promise<T>;
467
- update(id: string, patch: Record<string, unknown>, opts?: RequestOptions): Promise<T>;
468
- delete(id: string, opts?: RequestOptions): Promise<void>;
469
- }
470
- declare class GatewayConnectorsClient extends GatewayCrud<GatewayConnector> {
471
- }
472
- declare class GatewayResourcesClient extends GatewayCrud<GatewayResource> {
473
- }
474
- declare class GatewayQueryClient {
475
- private readonly http;
476
- private readonly base;
477
- constructor(http: HttpClient, base: string);
478
- run<Row extends Record<string, unknown> = Record<string, unknown>>(input: GatewayQueryInput, opts?: RequestOptions): Promise<GatewayQueryResult<Row>>;
479
- stream<Row extends Record<string, unknown> = Record<string, unknown>>(input: GatewayQueryInput, opts?: RequestOptions): SSEStream<Row>;
480
- }
481
-
482
389
  interface AuditEvent {
483
390
  id: string;
484
391
  type?: string;
@@ -1857,6 +1764,28 @@ declare class AppScopedTablesClient {
1857
1764
  inspect(tableName: string, opts?: RequestOptions): Promise<unknown>;
1858
1765
  }
1859
1766
 
1767
+ interface ParsedFrame {
1768
+ id?: string;
1769
+ event?: string;
1770
+ data: string;
1771
+ }
1772
+ type StreamItem<T> = {
1773
+ type: 'item';
1774
+ value: T;
1775
+ id: string | undefined;
1776
+ } | {
1777
+ type: 'gap';
1778
+ sinceId: string | undefined;
1779
+ missingCount?: number;
1780
+ } | {
1781
+ type: 'decode-skip';
1782
+ frame: ParsedFrame;
1783
+ error: AxHubError;
1784
+ };
1785
+ interface SSEStream<T> extends AsyncIterable<StreamItem<T>> {
1786
+ dispose(): void;
1787
+ }
1788
+
1860
1789
  type DeploymentStatus = 'queued' | 'building' | 'deploying' | 'succeeded' | 'failed' | 'cancelled' | 'rolled_back';
1861
1790
  interface DeploymentResponse {
1862
1791
  id: string;
@@ -1997,6 +1926,83 @@ declare class DeploymentsClient {
1997
1926
  }): SSEStream<PodEventEvent>;
1998
1927
  }
1999
1928
 
1929
+ interface GatewayEngine {
1930
+ name: 'postgres' | 'mysql' | string;
1931
+ capabilities: string[];
1932
+ }
1933
+ interface GatewayConnector {
1934
+ id: string;
1935
+ engine: string;
1936
+ name: string;
1937
+ [key: string]: unknown;
1938
+ }
1939
+ interface GatewayResource {
1940
+ id: string;
1941
+ connectorId: string;
1942
+ name: string;
1943
+ [key: string]: unknown;
1944
+ }
1945
+ interface GatewayQueryInput {
1946
+ resourceId?: string;
1947
+ connectorId?: string;
1948
+ path?: string;
1949
+ sql: string;
1950
+ params?: unknown[];
1951
+ rowLimit?: number;
1952
+ }
1953
+ interface GatewayQueryColumn {
1954
+ name: string;
1955
+ dataType: string;
1956
+ }
1957
+ interface GatewayQueryResult<Row = Record<string, unknown>> {
1958
+ allowed: boolean;
1959
+ denyReason?: string;
1960
+ columns: GatewayQueryColumn[];
1961
+ rows: Row[];
1962
+ rowCount: number;
1963
+ matchedPolicies?: string[];
1964
+ }
1965
+ declare class GatewayClient {
1966
+ private readonly http;
1967
+ constructor(http: HttpClient);
1968
+ scoped(tenantSlug: string): TenantGatewayClient;
1969
+ }
1970
+ declare class TenantGatewayClient {
1971
+ readonly engines: GatewayEnginesClient;
1972
+ readonly connectors: GatewayConnectorsClient;
1973
+ readonly resources: GatewayResourcesClient;
1974
+ readonly query: GatewayQueryClient;
1975
+ constructor(http: HttpClient, tenantSlug: string);
1976
+ }
1977
+ declare class GatewayEnginesClient {
1978
+ private readonly http;
1979
+ private readonly base;
1980
+ constructor(http: HttpClient, base: string);
1981
+ list(opts?: RequestOptions): Promise<GatewayEngine[]>;
1982
+ }
1983
+ declare class GatewayCrud<T extends {
1984
+ id: string;
1985
+ }> {
1986
+ protected readonly http: HttpClient;
1987
+ protected readonly base: string;
1988
+ constructor(http: HttpClient, base: string);
1989
+ list(opts?: RequestOptions): Promise<T[]>;
1990
+ get(id: string, opts?: RequestOptions): Promise<T>;
1991
+ create(input: Record<string, unknown>, opts?: RequestOptions): Promise<T>;
1992
+ update(id: string, patch: Record<string, unknown>, opts?: RequestOptions): Promise<T>;
1993
+ delete(id: string, opts?: RequestOptions): Promise<void>;
1994
+ }
1995
+ declare class GatewayConnectorsClient extends GatewayCrud<GatewayConnector> {
1996
+ }
1997
+ declare class GatewayResourcesClient extends GatewayCrud<GatewayResource> {
1998
+ }
1999
+ declare class GatewayQueryClient {
2000
+ private readonly http;
2001
+ private readonly base;
2002
+ constructor(http: HttpClient, base: string);
2003
+ run<Row extends Record<string, unknown> = Record<string, unknown>>(input: GatewayQueryInput, opts?: RequestOptions): Promise<GatewayQueryResult<Row>>;
2004
+ }
2005
+
2000
2006
  interface IssuePersonalAccessTokenInput {
2001
2007
  name: string;
2002
2008
  expiresInDays?: number;
@@ -2396,4 +2402,4 @@ interface VerifyWebhookResult {
2396
2402
  declare function signWebhook(rawBody: Buffer | Uint8Array | string, secret: string, timestamp?: string): string;
2397
2403
  declare function verifyWebhook(input: VerifyWebhookInput): VerifyWebhookResult;
2398
2404
 
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 };
2405
+ 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 GatewayQueryColumn, 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, TenantGatewayClient, 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 };
package/dist/index.d.ts CHANGED
@@ -305,28 +305,6 @@ declare class HttpClient {
305
305
  private logRequest;
306
306
  }
307
307
 
308
- interface ParsedFrame {
309
- id?: string;
310
- event?: string;
311
- data: string;
312
- }
313
- type StreamItem<T> = {
314
- type: 'item';
315
- value: T;
316
- id: string | undefined;
317
- } | {
318
- type: 'gap';
319
- sinceId: string | undefined;
320
- missingCount?: number;
321
- } | {
322
- type: 'decode-skip';
323
- frame: ParsedFrame;
324
- error: AxHubError;
325
- };
326
- interface SSEStream<T> extends AsyncIterable<StreamItem<T>> {
327
- dispose(): void;
328
- }
329
-
330
308
  interface PaginatedList<T> {
331
309
  items: T[];
332
310
  nextCursor: string | null;
@@ -408,77 +386,6 @@ interface RequestOptions {
408
386
  interface PageRequestOptions extends ListOptions, RequestOptions {
409
387
  }
410
388
 
411
- interface GatewayEngine {
412
- name: 'postgres' | 'mysql' | string;
413
- capabilities: string[];
414
- }
415
- interface GatewayConnector {
416
- id: string;
417
- engine: string;
418
- name: string;
419
- [key: string]: unknown;
420
- }
421
- interface GatewayResource {
422
- id: string;
423
- connectorId: string;
424
- name: string;
425
- [key: string]: unknown;
426
- }
427
- interface GatewayQueryInput {
428
- resourceId?: string;
429
- connectorId?: string;
430
- path?: string;
431
- sql: string;
432
- params?: unknown[];
433
- rowLimit?: number;
434
- }
435
- interface GatewayQueryResult<Row = Record<string, unknown>> {
436
- rows: Row[];
437
- rowCount: number;
438
- auditEventId?: string;
439
- }
440
- declare class GatewayClient {
441
- private readonly http;
442
- constructor(http: HttpClient);
443
- scoped(tenantSlug: string): TenantGatewayClient;
444
- }
445
- declare class TenantGatewayClient {
446
- readonly engines: GatewayEnginesClient;
447
- readonly connectors: GatewayConnectorsClient;
448
- readonly resources: GatewayResourcesClient;
449
- readonly query: GatewayQueryClient;
450
- constructor(http: HttpClient, tenantSlug: string);
451
- }
452
- declare class GatewayEnginesClient {
453
- private readonly http;
454
- private readonly base;
455
- constructor(http: HttpClient, base: string);
456
- list(opts?: RequestOptions): Promise<GatewayEngine[]>;
457
- }
458
- declare class GatewayCrud<T extends {
459
- id: string;
460
- }> {
461
- protected readonly http: HttpClient;
462
- protected readonly base: string;
463
- constructor(http: HttpClient, base: string);
464
- list(opts?: PageRequestOptions): Promise<PaginatedList<T>>;
465
- get(id: string, opts?: RequestOptions): Promise<T>;
466
- create(input: Record<string, unknown>, opts?: RequestOptions): Promise<T>;
467
- update(id: string, patch: Record<string, unknown>, opts?: RequestOptions): Promise<T>;
468
- delete(id: string, opts?: RequestOptions): Promise<void>;
469
- }
470
- declare class GatewayConnectorsClient extends GatewayCrud<GatewayConnector> {
471
- }
472
- declare class GatewayResourcesClient extends GatewayCrud<GatewayResource> {
473
- }
474
- declare class GatewayQueryClient {
475
- private readonly http;
476
- private readonly base;
477
- constructor(http: HttpClient, base: string);
478
- run<Row extends Record<string, unknown> = Record<string, unknown>>(input: GatewayQueryInput, opts?: RequestOptions): Promise<GatewayQueryResult<Row>>;
479
- stream<Row extends Record<string, unknown> = Record<string, unknown>>(input: GatewayQueryInput, opts?: RequestOptions): SSEStream<Row>;
480
- }
481
-
482
389
  interface AuditEvent {
483
390
  id: string;
484
391
  type?: string;
@@ -1857,6 +1764,28 @@ declare class AppScopedTablesClient {
1857
1764
  inspect(tableName: string, opts?: RequestOptions): Promise<unknown>;
1858
1765
  }
1859
1766
 
1767
+ interface ParsedFrame {
1768
+ id?: string;
1769
+ event?: string;
1770
+ data: string;
1771
+ }
1772
+ type StreamItem<T> = {
1773
+ type: 'item';
1774
+ value: T;
1775
+ id: string | undefined;
1776
+ } | {
1777
+ type: 'gap';
1778
+ sinceId: string | undefined;
1779
+ missingCount?: number;
1780
+ } | {
1781
+ type: 'decode-skip';
1782
+ frame: ParsedFrame;
1783
+ error: AxHubError;
1784
+ };
1785
+ interface SSEStream<T> extends AsyncIterable<StreamItem<T>> {
1786
+ dispose(): void;
1787
+ }
1788
+
1860
1789
  type DeploymentStatus = 'queued' | 'building' | 'deploying' | 'succeeded' | 'failed' | 'cancelled' | 'rolled_back';
1861
1790
  interface DeploymentResponse {
1862
1791
  id: string;
@@ -1997,6 +1926,83 @@ declare class DeploymentsClient {
1997
1926
  }): SSEStream<PodEventEvent>;
1998
1927
  }
1999
1928
 
1929
+ interface GatewayEngine {
1930
+ name: 'postgres' | 'mysql' | string;
1931
+ capabilities: string[];
1932
+ }
1933
+ interface GatewayConnector {
1934
+ id: string;
1935
+ engine: string;
1936
+ name: string;
1937
+ [key: string]: unknown;
1938
+ }
1939
+ interface GatewayResource {
1940
+ id: string;
1941
+ connectorId: string;
1942
+ name: string;
1943
+ [key: string]: unknown;
1944
+ }
1945
+ interface GatewayQueryInput {
1946
+ resourceId?: string;
1947
+ connectorId?: string;
1948
+ path?: string;
1949
+ sql: string;
1950
+ params?: unknown[];
1951
+ rowLimit?: number;
1952
+ }
1953
+ interface GatewayQueryColumn {
1954
+ name: string;
1955
+ dataType: string;
1956
+ }
1957
+ interface GatewayQueryResult<Row = Record<string, unknown>> {
1958
+ allowed: boolean;
1959
+ denyReason?: string;
1960
+ columns: GatewayQueryColumn[];
1961
+ rows: Row[];
1962
+ rowCount: number;
1963
+ matchedPolicies?: string[];
1964
+ }
1965
+ declare class GatewayClient {
1966
+ private readonly http;
1967
+ constructor(http: HttpClient);
1968
+ scoped(tenantSlug: string): TenantGatewayClient;
1969
+ }
1970
+ declare class TenantGatewayClient {
1971
+ readonly engines: GatewayEnginesClient;
1972
+ readonly connectors: GatewayConnectorsClient;
1973
+ readonly resources: GatewayResourcesClient;
1974
+ readonly query: GatewayQueryClient;
1975
+ constructor(http: HttpClient, tenantSlug: string);
1976
+ }
1977
+ declare class GatewayEnginesClient {
1978
+ private readonly http;
1979
+ private readonly base;
1980
+ constructor(http: HttpClient, base: string);
1981
+ list(opts?: RequestOptions): Promise<GatewayEngine[]>;
1982
+ }
1983
+ declare class GatewayCrud<T extends {
1984
+ id: string;
1985
+ }> {
1986
+ protected readonly http: HttpClient;
1987
+ protected readonly base: string;
1988
+ constructor(http: HttpClient, base: string);
1989
+ list(opts?: RequestOptions): Promise<T[]>;
1990
+ get(id: string, opts?: RequestOptions): Promise<T>;
1991
+ create(input: Record<string, unknown>, opts?: RequestOptions): Promise<T>;
1992
+ update(id: string, patch: Record<string, unknown>, opts?: RequestOptions): Promise<T>;
1993
+ delete(id: string, opts?: RequestOptions): Promise<void>;
1994
+ }
1995
+ declare class GatewayConnectorsClient extends GatewayCrud<GatewayConnector> {
1996
+ }
1997
+ declare class GatewayResourcesClient extends GatewayCrud<GatewayResource> {
1998
+ }
1999
+ declare class GatewayQueryClient {
2000
+ private readonly http;
2001
+ private readonly base;
2002
+ constructor(http: HttpClient, base: string);
2003
+ run<Row extends Record<string, unknown> = Record<string, unknown>>(input: GatewayQueryInput, opts?: RequestOptions): Promise<GatewayQueryResult<Row>>;
2004
+ }
2005
+
2000
2006
  interface IssuePersonalAccessTokenInput {
2001
2007
  name: string;
2002
2008
  expiresInDays?: number;
@@ -2396,4 +2402,4 @@ interface VerifyWebhookResult {
2396
2402
  declare function signWebhook(rawBody: Buffer | Uint8Array | string, secret: string, timestamp?: string): string;
2397
2403
  declare function verifyWebhook(input: VerifyWebhookInput): VerifyWebhookResult;
2398
2404
 
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 };
2405
+ 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 GatewayQueryColumn, 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, TenantGatewayClient, 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 };