@constructive-io/sdk 0.21.0 → 0.21.3
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/admin/orm/client.js +1 -1
- package/auth/orm/client.js +1 -1
- package/esm/admin/orm/client.js +1 -1
- package/esm/auth/orm/client.js +1 -1
- package/esm/objects/orm/client.js +1 -1
- package/esm/public/orm/client.js +1 -1
- package/esm/public/orm/index.d.ts +5 -0
- package/esm/public/orm/input-types.d.ts +32 -2
- package/esm/public/orm/mutation/index.d.ts +14 -2
- package/esm/public/orm/mutation/index.js +12 -0
- package/objects/orm/client.js +1 -1
- package/package.json +6 -6
- package/public/orm/client.js +1 -1
- package/public/orm/index.d.ts +5 -0
- package/public/orm/input-types.d.ts +32 -2
- package/public/orm/mutation/index.d.ts +14 -2
- package/public/orm/mutation/index.js +12 -0
package/admin/orm/client.js
CHANGED
|
@@ -20,7 +20,7 @@ class FetchAdapter {
|
|
|
20
20
|
constructor(endpoint, headers, fetchFn) {
|
|
21
21
|
this.endpoint = endpoint;
|
|
22
22
|
this.headers = headers ?? {};
|
|
23
|
-
this.fetchFn = fetchFn ?? (0, runtime_1.createFetch)();
|
|
23
|
+
this.fetchFn = (fetchFn ?? (0, runtime_1.createFetch)()).bind(globalThis);
|
|
24
24
|
}
|
|
25
25
|
async execute(document, variables) {
|
|
26
26
|
const response = await this.fetchFn(this.endpoint, {
|
package/auth/orm/client.js
CHANGED
|
@@ -20,7 +20,7 @@ class FetchAdapter {
|
|
|
20
20
|
constructor(endpoint, headers, fetchFn) {
|
|
21
21
|
this.endpoint = endpoint;
|
|
22
22
|
this.headers = headers ?? {};
|
|
23
|
-
this.fetchFn = fetchFn ?? (0, runtime_1.createFetch)();
|
|
23
|
+
this.fetchFn = (fetchFn ?? (0, runtime_1.createFetch)()).bind(globalThis);
|
|
24
24
|
}
|
|
25
25
|
async execute(document, variables) {
|
|
26
26
|
const response = await this.fetchFn(this.endpoint, {
|
package/esm/admin/orm/client.js
CHANGED
|
@@ -16,7 +16,7 @@ export class FetchAdapter {
|
|
|
16
16
|
constructor(endpoint, headers, fetchFn) {
|
|
17
17
|
this.endpoint = endpoint;
|
|
18
18
|
this.headers = headers ?? {};
|
|
19
|
-
this.fetchFn = fetchFn ?? createFetch();
|
|
19
|
+
this.fetchFn = (fetchFn ?? createFetch()).bind(globalThis);
|
|
20
20
|
}
|
|
21
21
|
async execute(document, variables) {
|
|
22
22
|
const response = await this.fetchFn(this.endpoint, {
|
package/esm/auth/orm/client.js
CHANGED
|
@@ -16,7 +16,7 @@ export class FetchAdapter {
|
|
|
16
16
|
constructor(endpoint, headers, fetchFn) {
|
|
17
17
|
this.endpoint = endpoint;
|
|
18
18
|
this.headers = headers ?? {};
|
|
19
|
-
this.fetchFn = fetchFn ?? createFetch();
|
|
19
|
+
this.fetchFn = (fetchFn ?? createFetch()).bind(globalThis);
|
|
20
20
|
}
|
|
21
21
|
async execute(document, variables) {
|
|
22
22
|
const response = await this.fetchFn(this.endpoint, {
|
|
@@ -16,7 +16,7 @@ export class FetchAdapter {
|
|
|
16
16
|
constructor(endpoint, headers, fetchFn) {
|
|
17
17
|
this.endpoint = endpoint;
|
|
18
18
|
this.headers = headers ?? {};
|
|
19
|
-
this.fetchFn = fetchFn ?? createFetch();
|
|
19
|
+
this.fetchFn = (fetchFn ?? createFetch()).bind(globalThis);
|
|
20
20
|
}
|
|
21
21
|
async execute(document, variables) {
|
|
22
22
|
const response = await this.fetchFn(this.endpoint, {
|
package/esm/public/orm/client.js
CHANGED
|
@@ -16,7 +16,7 @@ export class FetchAdapter {
|
|
|
16
16
|
constructor(endpoint, headers, fetchFn) {
|
|
17
17
|
this.endpoint = endpoint;
|
|
18
18
|
this.headers = headers ?? {};
|
|
19
|
-
this.fetchFn = fetchFn ?? createFetch();
|
|
19
|
+
this.fetchFn = (fetchFn ?? createFetch()).bind(globalThis);
|
|
20
20
|
}
|
|
21
21
|
async execute(document, variables) {
|
|
22
22
|
const response = await this.fetchFn(this.endpoint, {
|
|
@@ -571,6 +571,11 @@ export declare function createClient(config: OrmClientConfig): {
|
|
|
571
571
|
} & import("./select-types").StrictSelect<S, import("./input-types").SetFieldOrderPayloadSelect>) => import("./query-builder").QueryBuilder<{
|
|
572
572
|
setFieldOrder: import("./select-types").InferSelectResult<import("./input-types").SetFieldOrderPayload, S> | null;
|
|
573
573
|
}>;
|
|
574
|
+
provisionCheckConstraint: <S extends import("./input-types").ProvisionCheckConstraintPayloadSelect>(args: import("./mutation").ProvisionCheckConstraintVariables, options: {
|
|
575
|
+
select: S;
|
|
576
|
+
} & import("./select-types").StrictSelect<S, import("./input-types").ProvisionCheckConstraintPayloadSelect>) => import("./query-builder").QueryBuilder<{
|
|
577
|
+
provisionCheckConstraint: import("./select-types").InferSelectResult<import("./input-types").ProvisionCheckConstraintPayload, S> | null;
|
|
578
|
+
}>;
|
|
574
579
|
provisionUniqueConstraint: <S extends import("./input-types").ProvisionUniqueConstraintPayloadSelect>(args: import("./mutation").ProvisionUniqueConstraintVariables, options: {
|
|
575
580
|
select: S;
|
|
576
581
|
} & import("./select-types").StrictSelect<S, import("./input-types").ProvisionUniqueConstraintPayloadSelect>) => import("./query-builder").QueryBuilder<{
|
|
@@ -1039,6 +1039,8 @@ export interface ApiSetting {
|
|
|
1039
1039
|
enableLtree?: boolean | null;
|
|
1040
1040
|
/** Override: enable LLM/AI integration features (NULL = inherit from database_settings) */
|
|
1041
1041
|
enableLlm?: boolean | null;
|
|
1042
|
+
/** Override: enable realtime subscriptions (NULL = inherit from database_settings) */
|
|
1043
|
+
enableRealtime?: boolean | null;
|
|
1042
1044
|
/** Extensible JSON for additional per-API settings that do not have dedicated columns */
|
|
1043
1045
|
options?: Record<string, unknown> | null;
|
|
1044
1046
|
}
|
|
@@ -2661,6 +2663,8 @@ export interface DatabaseSetting {
|
|
|
2661
2663
|
enableLtree?: boolean | null;
|
|
2662
2664
|
/** Enable LLM/AI integration features in the GraphQL API */
|
|
2663
2665
|
enableLlm?: boolean | null;
|
|
2666
|
+
/** Enable realtime subscriptions (cursor-tracked change delivery) in the GraphQL API */
|
|
2667
|
+
enableRealtime?: boolean | null;
|
|
2664
2668
|
/** Extensible JSON for additional settings that do not have dedicated columns */
|
|
2665
2669
|
options?: Record<string, unknown> | null;
|
|
2666
2670
|
}
|
|
@@ -5580,6 +5584,7 @@ export type ApiSettingSelect = {
|
|
|
5580
5584
|
enableConnectionFilter?: boolean;
|
|
5581
5585
|
enableLtree?: boolean;
|
|
5582
5586
|
enableLlm?: boolean;
|
|
5587
|
+
enableRealtime?: boolean;
|
|
5583
5588
|
options?: boolean;
|
|
5584
5589
|
api?: {
|
|
5585
5590
|
select: ApiSelect;
|
|
@@ -7480,6 +7485,7 @@ export type DatabaseSettingSelect = {
|
|
|
7480
7485
|
enableConnectionFilter?: boolean;
|
|
7481
7486
|
enableLtree?: boolean;
|
|
7482
7487
|
enableLlm?: boolean;
|
|
7488
|
+
enableRealtime?: boolean;
|
|
7483
7489
|
options?: boolean;
|
|
7484
7490
|
database?: {
|
|
7485
7491
|
select: DatabaseSelect;
|
|
@@ -10222,6 +10228,8 @@ export interface ApiSettingFilter {
|
|
|
10222
10228
|
enableLtree?: BooleanFilter;
|
|
10223
10229
|
/** Filter by the object’s `enableLlm` field. */
|
|
10224
10230
|
enableLlm?: BooleanFilter;
|
|
10231
|
+
/** Filter by the object’s `enableRealtime` field. */
|
|
10232
|
+
enableRealtime?: BooleanFilter;
|
|
10225
10233
|
/** Filter by the object’s `options` field. */
|
|
10226
10234
|
options?: JSONFilter;
|
|
10227
10235
|
/** Checks for all expressions in this list. */
|
|
@@ -13358,6 +13366,8 @@ export interface DatabaseSettingFilter {
|
|
|
13358
13366
|
enableLtree?: BooleanFilter;
|
|
13359
13367
|
/** Filter by the object’s `enableLlm` field. */
|
|
13360
13368
|
enableLlm?: BooleanFilter;
|
|
13369
|
+
/** Filter by the object’s `enableRealtime` field. */
|
|
13370
|
+
enableRealtime?: BooleanFilter;
|
|
13361
13371
|
/** Filter by the object’s `options` field. */
|
|
13362
13372
|
options?: JSONFilter;
|
|
13363
13373
|
/** Checks for all expressions in this list. */
|
|
@@ -14168,7 +14178,7 @@ export type DatabaseTransferOrderBy = 'NATURAL' | 'PRIMARY_KEY_ASC' | 'PRIMARY_K
|
|
|
14168
14178
|
export type ApiOrderBy = 'NATURAL' | 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' | 'ID_ASC' | 'ID_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' | 'NAME_ASC' | 'NAME_DESC' | 'DBNAME_ASC' | 'DBNAME_DESC' | 'ROLE_NAME_ASC' | 'ROLE_NAME_DESC' | 'ANON_ROLE_ASC' | 'ANON_ROLE_DESC' | 'IS_PUBLIC_ASC' | 'IS_PUBLIC_DESC';
|
|
14169
14179
|
export type SiteOrderBy = 'NATURAL' | 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' | 'ID_ASC' | 'ID_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' | 'TITLE_ASC' | 'TITLE_DESC' | 'DESCRIPTION_ASC' | 'DESCRIPTION_DESC' | 'OG_IMAGE_ASC' | 'OG_IMAGE_DESC' | 'FAVICON_ASC' | 'FAVICON_DESC' | 'APPLE_TOUCH_ICON_ASC' | 'APPLE_TOUCH_ICON_DESC' | 'LOGO_ASC' | 'LOGO_DESC' | 'DBNAME_ASC' | 'DBNAME_DESC';
|
|
14170
14180
|
export type AppOrderBy = 'NATURAL' | 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' | 'ID_ASC' | 'ID_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' | 'SITE_ID_ASC' | 'SITE_ID_DESC' | 'NAME_ASC' | 'NAME_DESC' | 'APP_IMAGE_ASC' | 'APP_IMAGE_DESC' | 'APP_STORE_LINK_ASC' | 'APP_STORE_LINK_DESC' | 'APP_STORE_ID_ASC' | 'APP_STORE_ID_DESC' | 'APP_ID_PREFIX_ASC' | 'APP_ID_PREFIX_DESC' | 'PLAY_STORE_LINK_ASC' | 'PLAY_STORE_LINK_DESC';
|
|
14171
|
-
export type ApiSettingOrderBy = 'NATURAL' | 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' | 'ID_ASC' | 'ID_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' | 'API_ID_ASC' | 'API_ID_DESC' | 'ENABLE_AGGREGATES_ASC' | 'ENABLE_AGGREGATES_DESC' | 'ENABLE_POSTGIS_ASC' | 'ENABLE_POSTGIS_DESC' | 'ENABLE_SEARCH_ASC' | 'ENABLE_SEARCH_DESC' | 'ENABLE_DIRECT_UPLOADS_ASC' | 'ENABLE_DIRECT_UPLOADS_DESC' | 'ENABLE_PRESIGNED_UPLOADS_ASC' | 'ENABLE_PRESIGNED_UPLOADS_DESC' | 'ENABLE_MANY_TO_MANY_ASC' | 'ENABLE_MANY_TO_MANY_DESC' | 'ENABLE_CONNECTION_FILTER_ASC' | 'ENABLE_CONNECTION_FILTER_DESC' | 'ENABLE_LTREE_ASC' | 'ENABLE_LTREE_DESC' | 'ENABLE_LLM_ASC' | 'ENABLE_LLM_DESC' | 'OPTIONS_ASC' | 'OPTIONS_DESC';
|
|
14181
|
+
export type ApiSettingOrderBy = 'NATURAL' | 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' | 'ID_ASC' | 'ID_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' | 'API_ID_ASC' | 'API_ID_DESC' | 'ENABLE_AGGREGATES_ASC' | 'ENABLE_AGGREGATES_DESC' | 'ENABLE_POSTGIS_ASC' | 'ENABLE_POSTGIS_DESC' | 'ENABLE_SEARCH_ASC' | 'ENABLE_SEARCH_DESC' | 'ENABLE_DIRECT_UPLOADS_ASC' | 'ENABLE_DIRECT_UPLOADS_DESC' | 'ENABLE_PRESIGNED_UPLOADS_ASC' | 'ENABLE_PRESIGNED_UPLOADS_DESC' | 'ENABLE_MANY_TO_MANY_ASC' | 'ENABLE_MANY_TO_MANY_DESC' | 'ENABLE_CONNECTION_FILTER_ASC' | 'ENABLE_CONNECTION_FILTER_DESC' | 'ENABLE_LTREE_ASC' | 'ENABLE_LTREE_DESC' | 'ENABLE_LLM_ASC' | 'ENABLE_LLM_DESC' | 'ENABLE_REALTIME_ASC' | 'ENABLE_REALTIME_DESC' | 'OPTIONS_ASC' | 'OPTIONS_DESC';
|
|
14172
14182
|
export type ConnectedAccountsModuleOrderBy = 'NATURAL' | 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' | 'ID_ASC' | 'ID_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' | 'SCHEMA_ID_ASC' | 'SCHEMA_ID_DESC' | 'PRIVATE_SCHEMA_ID_ASC' | 'PRIVATE_SCHEMA_ID_DESC' | 'TABLE_ID_ASC' | 'TABLE_ID_DESC' | 'OWNER_TABLE_ID_ASC' | 'OWNER_TABLE_ID_DESC' | 'TABLE_NAME_ASC' | 'TABLE_NAME_DESC';
|
|
14173
14183
|
export type CryptoAddressesModuleOrderBy = 'NATURAL' | 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' | 'ID_ASC' | 'ID_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' | 'SCHEMA_ID_ASC' | 'SCHEMA_ID_DESC' | 'PRIVATE_SCHEMA_ID_ASC' | 'PRIVATE_SCHEMA_ID_DESC' | 'TABLE_ID_ASC' | 'TABLE_ID_DESC' | 'OWNER_TABLE_ID_ASC' | 'OWNER_TABLE_ID_DESC' | 'TABLE_NAME_ASC' | 'TABLE_NAME_DESC' | 'CRYPTO_NETWORK_ASC' | 'CRYPTO_NETWORK_DESC';
|
|
14174
14184
|
export type CryptoAuthModuleOrderBy = 'NATURAL' | 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' | 'ID_ASC' | 'ID_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' | 'SCHEMA_ID_ASC' | 'SCHEMA_ID_DESC' | 'USERS_TABLE_ID_ASC' | 'USERS_TABLE_ID_DESC' | 'SECRETS_TABLE_ID_ASC' | 'SECRETS_TABLE_ID_DESC' | 'SESSIONS_TABLE_ID_ASC' | 'SESSIONS_TABLE_ID_DESC' | 'SESSION_CREDENTIALS_TABLE_ID_ASC' | 'SESSION_CREDENTIALS_TABLE_ID_DESC' | 'ADDRESSES_TABLE_ID_ASC' | 'ADDRESSES_TABLE_ID_DESC' | 'USER_FIELD_ASC' | 'USER_FIELD_DESC' | 'CRYPTO_NETWORK_ASC' | 'CRYPTO_NETWORK_DESC' | 'SIGN_IN_REQUEST_CHALLENGE_ASC' | 'SIGN_IN_REQUEST_CHALLENGE_DESC' | 'SIGN_IN_RECORD_FAILURE_ASC' | 'SIGN_IN_RECORD_FAILURE_DESC' | 'SIGN_UP_WITH_KEY_ASC' | 'SIGN_UP_WITH_KEY_DESC' | 'SIGN_IN_WITH_CHALLENGE_ASC' | 'SIGN_IN_WITH_CHALLENGE_DESC';
|
|
@@ -14258,7 +14268,7 @@ export type RlsSettingOrderBy = 'NATURAL' | 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DES
|
|
|
14258
14268
|
export type AppLimitEventOrderBy = 'NATURAL' | 'NAME_ASC' | 'NAME_DESC' | 'ACTOR_ID_ASC' | 'ACTOR_ID_DESC' | 'ENTITY_ID_ASC' | 'ENTITY_ID_DESC' | 'EVENT_TYPE_ASC' | 'EVENT_TYPE_DESC' | 'DELTA_ASC' | 'DELTA_DESC' | 'NUM_BEFORE_ASC' | 'NUM_BEFORE_DESC' | 'NUM_AFTER_ASC' | 'NUM_AFTER_DESC' | 'MAX_AT_EVENT_ASC' | 'MAX_AT_EVENT_DESC' | 'REASON_ASC' | 'REASON_DESC';
|
|
14259
14269
|
export type OrgLimitEventOrderBy = 'NATURAL' | 'NAME_ASC' | 'NAME_DESC' | 'ACTOR_ID_ASC' | 'ACTOR_ID_DESC' | 'ENTITY_ID_ASC' | 'ENTITY_ID_DESC' | 'EVENT_TYPE_ASC' | 'EVENT_TYPE_DESC' | 'DELTA_ASC' | 'DELTA_DESC' | 'NUM_BEFORE_ASC' | 'NUM_BEFORE_DESC' | 'NUM_AFTER_ASC' | 'NUM_AFTER_DESC' | 'MAX_AT_EVENT_ASC' | 'MAX_AT_EVENT_DESC' | 'REASON_ASC' | 'REASON_DESC';
|
|
14260
14270
|
export type RlsModuleOrderBy = 'NATURAL' | 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' | 'ID_ASC' | 'ID_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' | 'SCHEMA_ID_ASC' | 'SCHEMA_ID_DESC' | 'PRIVATE_SCHEMA_ID_ASC' | 'PRIVATE_SCHEMA_ID_DESC' | 'SESSION_CREDENTIALS_TABLE_ID_ASC' | 'SESSION_CREDENTIALS_TABLE_ID_DESC' | 'SESSIONS_TABLE_ID_ASC' | 'SESSIONS_TABLE_ID_DESC' | 'USERS_TABLE_ID_ASC' | 'USERS_TABLE_ID_DESC' | 'AUTHENTICATE_ASC' | 'AUTHENTICATE_DESC' | 'AUTHENTICATE_STRICT_ASC' | 'AUTHENTICATE_STRICT_DESC' | 'CURRENT_ROLE_ASC' | 'CURRENT_ROLE_DESC' | 'CURRENT_ROLE_ID_ASC' | 'CURRENT_ROLE_ID_DESC';
|
|
14261
|
-
export type DatabaseSettingOrderBy = 'NATURAL' | 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' | 'ID_ASC' | 'ID_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' | 'ENABLE_AGGREGATES_ASC' | 'ENABLE_AGGREGATES_DESC' | 'ENABLE_POSTGIS_ASC' | 'ENABLE_POSTGIS_DESC' | 'ENABLE_SEARCH_ASC' | 'ENABLE_SEARCH_DESC' | 'ENABLE_DIRECT_UPLOADS_ASC' | 'ENABLE_DIRECT_UPLOADS_DESC' | 'ENABLE_PRESIGNED_UPLOADS_ASC' | 'ENABLE_PRESIGNED_UPLOADS_DESC' | 'ENABLE_MANY_TO_MANY_ASC' | 'ENABLE_MANY_TO_MANY_DESC' | 'ENABLE_CONNECTION_FILTER_ASC' | 'ENABLE_CONNECTION_FILTER_DESC' | 'ENABLE_LTREE_ASC' | 'ENABLE_LTREE_DESC' | 'ENABLE_LLM_ASC' | 'ENABLE_LLM_DESC' | 'OPTIONS_ASC' | 'OPTIONS_DESC';
|
|
14271
|
+
export type DatabaseSettingOrderBy = 'NATURAL' | 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' | 'ID_ASC' | 'ID_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' | 'ENABLE_AGGREGATES_ASC' | 'ENABLE_AGGREGATES_DESC' | 'ENABLE_POSTGIS_ASC' | 'ENABLE_POSTGIS_DESC' | 'ENABLE_SEARCH_ASC' | 'ENABLE_SEARCH_DESC' | 'ENABLE_DIRECT_UPLOADS_ASC' | 'ENABLE_DIRECT_UPLOADS_DESC' | 'ENABLE_PRESIGNED_UPLOADS_ASC' | 'ENABLE_PRESIGNED_UPLOADS_DESC' | 'ENABLE_MANY_TO_MANY_ASC' | 'ENABLE_MANY_TO_MANY_DESC' | 'ENABLE_CONNECTION_FILTER_ASC' | 'ENABLE_CONNECTION_FILTER_DESC' | 'ENABLE_LTREE_ASC' | 'ENABLE_LTREE_DESC' | 'ENABLE_LLM_ASC' | 'ENABLE_LLM_DESC' | 'ENABLE_REALTIME_ASC' | 'ENABLE_REALTIME_DESC' | 'OPTIONS_ASC' | 'OPTIONS_DESC';
|
|
14262
14272
|
export type PlansModuleOrderBy = 'NATURAL' | 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' | 'ID_ASC' | 'ID_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' | 'SCHEMA_ID_ASC' | 'SCHEMA_ID_DESC' | 'PRIVATE_SCHEMA_ID_ASC' | 'PRIVATE_SCHEMA_ID_DESC' | 'PLANS_TABLE_ID_ASC' | 'PLANS_TABLE_ID_DESC' | 'PLANS_TABLE_NAME_ASC' | 'PLANS_TABLE_NAME_DESC' | 'PLAN_LIMITS_TABLE_ID_ASC' | 'PLAN_LIMITS_TABLE_ID_DESC' | 'PLAN_LIMITS_TABLE_NAME_ASC' | 'PLAN_LIMITS_TABLE_NAME_DESC' | 'PLAN_PRICING_TABLE_ID_ASC' | 'PLAN_PRICING_TABLE_ID_DESC' | 'PLAN_OVERRIDES_TABLE_ID_ASC' | 'PLAN_OVERRIDES_TABLE_ID_DESC' | 'APPLY_PLAN_FUNCTION_ASC' | 'APPLY_PLAN_FUNCTION_DESC' | 'APPLY_PLAN_AGGREGATE_FUNCTION_ASC' | 'APPLY_PLAN_AGGREGATE_FUNCTION_DESC' | 'PREFIX_ASC' | 'PREFIX_DESC';
|
|
14263
14273
|
export type SqlActionOrderBy = 'NATURAL' | 'ID_ASC' | 'ID_DESC' | 'NAME_ASC' | 'NAME_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' | 'DEPLOY_ASC' | 'DEPLOY_DESC' | 'DEPS_ASC' | 'DEPS_DESC' | 'PAYLOAD_ASC' | 'PAYLOAD_DESC' | 'CONTENT_ASC' | 'CONTENT_DESC' | 'REVERT_ASC' | 'REVERT_DESC' | 'VERIFY_ASC' | 'VERIFY_DESC' | 'CREATED_AT_ASC' | 'CREATED_AT_DESC' | 'ACTION_ASC' | 'ACTION_DESC' | 'ACTION_ID_ASC' | 'ACTION_ID_DESC' | 'ACTOR_ID_ASC' | 'ACTOR_ID_DESC';
|
|
14264
14274
|
export type BillingModuleOrderBy = 'NATURAL' | 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' | 'ID_ASC' | 'ID_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' | 'SCHEMA_ID_ASC' | 'SCHEMA_ID_DESC' | 'PRIVATE_SCHEMA_ID_ASC' | 'PRIVATE_SCHEMA_ID_DESC' | 'METERS_TABLE_ID_ASC' | 'METERS_TABLE_ID_DESC' | 'METERS_TABLE_NAME_ASC' | 'METERS_TABLE_NAME_DESC' | 'PLAN_SUBSCRIPTIONS_TABLE_ID_ASC' | 'PLAN_SUBSCRIPTIONS_TABLE_ID_DESC' | 'PLAN_SUBSCRIPTIONS_TABLE_NAME_ASC' | 'PLAN_SUBSCRIPTIONS_TABLE_NAME_DESC' | 'LEDGER_TABLE_ID_ASC' | 'LEDGER_TABLE_ID_DESC' | 'LEDGER_TABLE_NAME_ASC' | 'LEDGER_TABLE_NAME_DESC' | 'BALANCES_TABLE_ID_ASC' | 'BALANCES_TABLE_ID_DESC' | 'BALANCES_TABLE_NAME_ASC' | 'BALANCES_TABLE_NAME_DESC' | 'RECORD_USAGE_FUNCTION_ASC' | 'RECORD_USAGE_FUNCTION_DESC' | 'PREFIX_ASC' | 'PREFIX_DESC';
|
|
@@ -15817,6 +15827,7 @@ export interface CreateApiSettingInput {
|
|
|
15817
15827
|
enableConnectionFilter?: boolean;
|
|
15818
15828
|
enableLtree?: boolean;
|
|
15819
15829
|
enableLlm?: boolean;
|
|
15830
|
+
enableRealtime?: boolean;
|
|
15820
15831
|
options?: Record<string, unknown>;
|
|
15821
15832
|
};
|
|
15822
15833
|
}
|
|
@@ -15832,6 +15843,7 @@ export interface ApiSettingPatch {
|
|
|
15832
15843
|
enableConnectionFilter?: boolean | null;
|
|
15833
15844
|
enableLtree?: boolean | null;
|
|
15834
15845
|
enableLlm?: boolean | null;
|
|
15846
|
+
enableRealtime?: boolean | null;
|
|
15835
15847
|
options?: Record<string, unknown> | null;
|
|
15836
15848
|
}
|
|
15837
15849
|
export interface UpdateApiSettingInput {
|
|
@@ -18698,6 +18710,7 @@ export interface CreateDatabaseSettingInput {
|
|
|
18698
18710
|
enableConnectionFilter?: boolean;
|
|
18699
18711
|
enableLtree?: boolean;
|
|
18700
18712
|
enableLlm?: boolean;
|
|
18713
|
+
enableRealtime?: boolean;
|
|
18701
18714
|
options?: Record<string, unknown>;
|
|
18702
18715
|
};
|
|
18703
18716
|
}
|
|
@@ -18712,6 +18725,7 @@ export interface DatabaseSettingPatch {
|
|
|
18712
18725
|
enableConnectionFilter?: boolean | null;
|
|
18713
18726
|
enableLtree?: boolean | null;
|
|
18714
18727
|
enableLlm?: boolean | null;
|
|
18728
|
+
enableRealtime?: boolean | null;
|
|
18715
18729
|
options?: Record<string, unknown> | null;
|
|
18716
18730
|
}
|
|
18717
18731
|
export interface UpdateDatabaseSettingInput {
|
|
@@ -19273,6 +19287,12 @@ export interface SetFieldOrderInput {
|
|
|
19273
19287
|
clientMutationId?: string;
|
|
19274
19288
|
fieldIds?: string[];
|
|
19275
19289
|
}
|
|
19290
|
+
export interface ProvisionCheckConstraintInput {
|
|
19291
|
+
clientMutationId?: string;
|
|
19292
|
+
databaseId?: string;
|
|
19293
|
+
tableId?: string;
|
|
19294
|
+
definition?: Record<string, unknown>;
|
|
19295
|
+
}
|
|
19276
19296
|
export interface ProvisionUniqueConstraintInput {
|
|
19277
19297
|
clientMutationId?: string;
|
|
19278
19298
|
databaseId?: string;
|
|
@@ -22912,6 +22932,8 @@ export interface ApiSettingFilter {
|
|
|
22912
22932
|
enableLtree?: BooleanFilter;
|
|
22913
22933
|
/** Filter by the object’s `enableLlm` field. */
|
|
22914
22934
|
enableLlm?: BooleanFilter;
|
|
22935
|
+
/** Filter by the object’s `enableRealtime` field. */
|
|
22936
|
+
enableRealtime?: BooleanFilter;
|
|
22915
22937
|
/** Filter by the object’s `options` field. */
|
|
22916
22938
|
options?: JSONFilter;
|
|
22917
22939
|
/** Checks for all expressions in this list. */
|
|
@@ -26746,6 +26768,8 @@ export interface DatabaseSettingFilter {
|
|
|
26746
26768
|
enableLtree?: BooleanFilter;
|
|
26747
26769
|
/** Filter by the object’s `enableLlm` field. */
|
|
26748
26770
|
enableLlm?: BooleanFilter;
|
|
26771
|
+
/** Filter by the object’s `enableRealtime` field. */
|
|
26772
|
+
enableRealtime?: BooleanFilter;
|
|
26749
26773
|
/** Filter by the object’s `options` field. */
|
|
26750
26774
|
options?: JSONFilter;
|
|
26751
26775
|
/** Checks for all expressions in this list. */
|
|
@@ -27784,6 +27808,12 @@ export interface SetFieldOrderPayload {
|
|
|
27784
27808
|
export type SetFieldOrderPayloadSelect = {
|
|
27785
27809
|
clientMutationId?: boolean;
|
|
27786
27810
|
};
|
|
27811
|
+
export interface ProvisionCheckConstraintPayload {
|
|
27812
|
+
clientMutationId?: string | null;
|
|
27813
|
+
}
|
|
27814
|
+
export type ProvisionCheckConstraintPayloadSelect = {
|
|
27815
|
+
clientMutationId?: boolean;
|
|
27816
|
+
};
|
|
27787
27817
|
export interface ProvisionUniqueConstraintPayload {
|
|
27788
27818
|
clientMutationId?: string | null;
|
|
27789
27819
|
}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
import { OrmClient } from '../client';
|
|
7
7
|
import { QueryBuilder } from '../query-builder';
|
|
8
8
|
import type { InferSelectResult, StrictSelect } from '../select-types';
|
|
9
|
-
import type { SendAccountDeletionEmailInput, SignOutInput, AcceptDatabaseTransferInput, CancelDatabaseTransferInput, RejectDatabaseTransferInput, DisconnectAccountInput, RevokeApiKeyInput, RevokeSessionInput, VerifyPasswordInput, VerifyTotpInput, SubmitAppInviteCodeInput, SubmitOrgInviteCodeInput, CheckPasswordInput, ConfirmDeleteAccountInput, SetPasswordInput, VerifyEmailInput, FreezeObjectsInput, InitEmptyRepoInput, ConstructBlueprintInput, ProvisionNewUserInput, ResetPasswordInput, RemoveNodeAtPathInput, CopyTemplateToBlueprintInput, ProvisionSpatialRelationInput, BootstrapUserInput, SetFieldOrderInput, ProvisionUniqueConstraintInput, ProvisionFullTextSearchInput, ProvisionIndexInput, SetDataAtPathInput, SetPropsAndCommitInput, ProvisionDatabaseWithUserInput, InsertNodeAtPathInput, UpdateNodeAtPathInput, SetAndCommitInput, ProvisionRelationInput, ApplyRlsInput, SignInCrossOriginInput, CreateUserDatabaseInput, ExtendTokenExpiresInput, CreateApiKeyInput, SendVerificationEmailInput, ForgotPasswordInput, SignUpInput, RequestCrossOriginTokenInput, SignInInput, ProvisionTableInput, ProvisionBucketInput, SendAccountDeletionEmailPayload, SignOutPayload, AcceptDatabaseTransferPayload, CancelDatabaseTransferPayload, RejectDatabaseTransferPayload, DisconnectAccountPayload, RevokeApiKeyPayload, RevokeSessionPayload, VerifyPasswordPayload, VerifyTotpPayload, SubmitAppInviteCodePayload, SubmitOrgInviteCodePayload, CheckPasswordPayload, ConfirmDeleteAccountPayload, SetPasswordPayload, VerifyEmailPayload, FreezeObjectsPayload, InitEmptyRepoPayload, ConstructBlueprintPayload, ProvisionNewUserPayload, ResetPasswordPayload, RemoveNodeAtPathPayload, CopyTemplateToBlueprintPayload, ProvisionSpatialRelationPayload, BootstrapUserPayload, SetFieldOrderPayload, ProvisionUniqueConstraintPayload, ProvisionFullTextSearchPayload, ProvisionIndexPayload, SetDataAtPathPayload, SetPropsAndCommitPayload, ProvisionDatabaseWithUserPayload, InsertNodeAtPathPayload, UpdateNodeAtPathPayload, SetAndCommitPayload, ProvisionRelationPayload, ApplyRlsPayload, SignInCrossOriginPayload, CreateUserDatabasePayload, ExtendTokenExpiresPayload, CreateApiKeyPayload, SendVerificationEmailPayload, ForgotPasswordPayload, SignUpPayload, RequestCrossOriginTokenPayload, SignInPayload, ProvisionTablePayload, ProvisionBucketPayload, SendAccountDeletionEmailPayloadSelect, SignOutPayloadSelect, AcceptDatabaseTransferPayloadSelect, CancelDatabaseTransferPayloadSelect, RejectDatabaseTransferPayloadSelect, DisconnectAccountPayloadSelect, RevokeApiKeyPayloadSelect, RevokeSessionPayloadSelect, VerifyPasswordPayloadSelect, VerifyTotpPayloadSelect, SubmitAppInviteCodePayloadSelect, SubmitOrgInviteCodePayloadSelect, CheckPasswordPayloadSelect, ConfirmDeleteAccountPayloadSelect, SetPasswordPayloadSelect, VerifyEmailPayloadSelect, FreezeObjectsPayloadSelect, InitEmptyRepoPayloadSelect, ConstructBlueprintPayloadSelect, ProvisionNewUserPayloadSelect, ResetPasswordPayloadSelect, RemoveNodeAtPathPayloadSelect, CopyTemplateToBlueprintPayloadSelect, ProvisionSpatialRelationPayloadSelect, BootstrapUserPayloadSelect, SetFieldOrderPayloadSelect, ProvisionUniqueConstraintPayloadSelect, ProvisionFullTextSearchPayloadSelect, ProvisionIndexPayloadSelect, SetDataAtPathPayloadSelect, SetPropsAndCommitPayloadSelect, ProvisionDatabaseWithUserPayloadSelect, InsertNodeAtPathPayloadSelect, UpdateNodeAtPathPayloadSelect, SetAndCommitPayloadSelect, ProvisionRelationPayloadSelect, ApplyRlsPayloadSelect, SignInCrossOriginPayloadSelect, CreateUserDatabasePayloadSelect, ExtendTokenExpiresPayloadSelect, CreateApiKeyPayloadSelect, SendVerificationEmailPayloadSelect, ForgotPasswordPayloadSelect, SignUpPayloadSelect, RequestCrossOriginTokenPayloadSelect, SignInPayloadSelect, ProvisionTablePayloadSelect, ProvisionBucketPayloadSelect } from '../input-types';
|
|
9
|
+
import type { SendAccountDeletionEmailInput, SignOutInput, AcceptDatabaseTransferInput, CancelDatabaseTransferInput, RejectDatabaseTransferInput, DisconnectAccountInput, RevokeApiKeyInput, RevokeSessionInput, VerifyPasswordInput, VerifyTotpInput, SubmitAppInviteCodeInput, SubmitOrgInviteCodeInput, CheckPasswordInput, ConfirmDeleteAccountInput, SetPasswordInput, VerifyEmailInput, FreezeObjectsInput, InitEmptyRepoInput, ConstructBlueprintInput, ProvisionNewUserInput, ResetPasswordInput, RemoveNodeAtPathInput, CopyTemplateToBlueprintInput, ProvisionSpatialRelationInput, BootstrapUserInput, SetFieldOrderInput, ProvisionCheckConstraintInput, ProvisionUniqueConstraintInput, ProvisionFullTextSearchInput, ProvisionIndexInput, SetDataAtPathInput, SetPropsAndCommitInput, ProvisionDatabaseWithUserInput, InsertNodeAtPathInput, UpdateNodeAtPathInput, SetAndCommitInput, ProvisionRelationInput, ApplyRlsInput, SignInCrossOriginInput, CreateUserDatabaseInput, ExtendTokenExpiresInput, CreateApiKeyInput, SendVerificationEmailInput, ForgotPasswordInput, SignUpInput, RequestCrossOriginTokenInput, SignInInput, ProvisionTableInput, ProvisionBucketInput, SendAccountDeletionEmailPayload, SignOutPayload, AcceptDatabaseTransferPayload, CancelDatabaseTransferPayload, RejectDatabaseTransferPayload, DisconnectAccountPayload, RevokeApiKeyPayload, RevokeSessionPayload, VerifyPasswordPayload, VerifyTotpPayload, SubmitAppInviteCodePayload, SubmitOrgInviteCodePayload, CheckPasswordPayload, ConfirmDeleteAccountPayload, SetPasswordPayload, VerifyEmailPayload, FreezeObjectsPayload, InitEmptyRepoPayload, ConstructBlueprintPayload, ProvisionNewUserPayload, ResetPasswordPayload, RemoveNodeAtPathPayload, CopyTemplateToBlueprintPayload, ProvisionSpatialRelationPayload, BootstrapUserPayload, SetFieldOrderPayload, ProvisionCheckConstraintPayload, ProvisionUniqueConstraintPayload, ProvisionFullTextSearchPayload, ProvisionIndexPayload, SetDataAtPathPayload, SetPropsAndCommitPayload, ProvisionDatabaseWithUserPayload, InsertNodeAtPathPayload, UpdateNodeAtPathPayload, SetAndCommitPayload, ProvisionRelationPayload, ApplyRlsPayload, SignInCrossOriginPayload, CreateUserDatabasePayload, ExtendTokenExpiresPayload, CreateApiKeyPayload, SendVerificationEmailPayload, ForgotPasswordPayload, SignUpPayload, RequestCrossOriginTokenPayload, SignInPayload, ProvisionTablePayload, ProvisionBucketPayload, SendAccountDeletionEmailPayloadSelect, SignOutPayloadSelect, AcceptDatabaseTransferPayloadSelect, CancelDatabaseTransferPayloadSelect, RejectDatabaseTransferPayloadSelect, DisconnectAccountPayloadSelect, RevokeApiKeyPayloadSelect, RevokeSessionPayloadSelect, VerifyPasswordPayloadSelect, VerifyTotpPayloadSelect, SubmitAppInviteCodePayloadSelect, SubmitOrgInviteCodePayloadSelect, CheckPasswordPayloadSelect, ConfirmDeleteAccountPayloadSelect, SetPasswordPayloadSelect, VerifyEmailPayloadSelect, FreezeObjectsPayloadSelect, InitEmptyRepoPayloadSelect, ConstructBlueprintPayloadSelect, ProvisionNewUserPayloadSelect, ResetPasswordPayloadSelect, RemoveNodeAtPathPayloadSelect, CopyTemplateToBlueprintPayloadSelect, ProvisionSpatialRelationPayloadSelect, BootstrapUserPayloadSelect, SetFieldOrderPayloadSelect, ProvisionCheckConstraintPayloadSelect, ProvisionUniqueConstraintPayloadSelect, ProvisionFullTextSearchPayloadSelect, ProvisionIndexPayloadSelect, SetDataAtPathPayloadSelect, SetPropsAndCommitPayloadSelect, ProvisionDatabaseWithUserPayloadSelect, InsertNodeAtPathPayloadSelect, UpdateNodeAtPathPayloadSelect, SetAndCommitPayloadSelect, ProvisionRelationPayloadSelect, ApplyRlsPayloadSelect, SignInCrossOriginPayloadSelect, CreateUserDatabasePayloadSelect, ExtendTokenExpiresPayloadSelect, CreateApiKeyPayloadSelect, SendVerificationEmailPayloadSelect, ForgotPasswordPayloadSelect, SignUpPayloadSelect, RequestCrossOriginTokenPayloadSelect, SignInPayloadSelect, ProvisionTablePayloadSelect, ProvisionBucketPayloadSelect } from '../input-types';
|
|
10
10
|
export interface SendAccountDeletionEmailVariables {
|
|
11
11
|
input: SendAccountDeletionEmailInput;
|
|
12
12
|
}
|
|
@@ -63,7 +63,7 @@ export interface InitEmptyRepoVariables {
|
|
|
63
63
|
}
|
|
64
64
|
/**
|
|
65
65
|
* Variables for constructBlueprint
|
|
66
|
-
* Executes a blueprint definition by delegating to provision_* procedures. Creates a blueprint_construction record to track the attempt.
|
|
66
|
+
* Executes a blueprint definition by delegating to provision_* procedures. Creates a blueprint_construction record to track the attempt. Seven phases: (0) entity_type_provision for each membership_type entry — provisions entity tables, membership modules, and security, (1) provision_table() for each table with nodes[], fields[], policies[], and grants (table-level indexes/fts/unique_constraints/check_constraints are deferred), (2) provision_relation() for each relation, (3) provision_index() for top-level + deferred indexes, (4) provision_full_text_search() for top-level + deferred FTS, (5) provision_unique_constraint() for top-level + deferred unique constraints, (6) provision_check_constraint() for top-level + deferred check constraints. Phase 0 entity tables are added to the table_map so subsequent phases can reference them by name. Table-level entries are deferred to phases 3-6 so they can reference columns created by relations in phase 2. Returns the construction record ID on success, NULL on failure.
|
|
67
67
|
*/
|
|
68
68
|
export interface ConstructBlueprintVariables {
|
|
69
69
|
input: ConstructBlueprintInput;
|
|
@@ -97,6 +97,13 @@ export interface BootstrapUserVariables {
|
|
|
97
97
|
export interface SetFieldOrderVariables {
|
|
98
98
|
input: SetFieldOrderInput;
|
|
99
99
|
}
|
|
100
|
+
/**
|
|
101
|
+
* Variables for provisionCheckConstraint
|
|
102
|
+
* Creates a check constraint on a table from a $type + data blueprint definition. Supports: CheckOneOf (enum validation via = ANY(ARRAY[...])), CheckGreaterThan (single-column > value or cross-column), CheckLessThan (single-column < value or cross-column), CheckNotEqual (cross-column inequality). Builds AST expressions via ast_helpers and inserts into metaschema_public.check_constraint. Graceful: skips if a constraint with the same name already exists.
|
|
103
|
+
*/
|
|
104
|
+
export interface ProvisionCheckConstraintVariables {
|
|
105
|
+
input: ProvisionCheckConstraintInput;
|
|
106
|
+
}
|
|
100
107
|
/**
|
|
101
108
|
* Variables for provisionUniqueConstraint
|
|
102
109
|
* Creates a unique constraint on a table. Accepts a jsonb definition with columns (array of field names). Graceful: skips if the exact same unique constraint already exists.
|
|
@@ -340,6 +347,11 @@ export declare function createMutationOperations(client: OrmClient): {
|
|
|
340
347
|
} & StrictSelect<S, SetFieldOrderPayloadSelect>) => QueryBuilder<{
|
|
341
348
|
setFieldOrder: InferSelectResult<SetFieldOrderPayload, S> | null;
|
|
342
349
|
}>;
|
|
350
|
+
provisionCheckConstraint: <S extends ProvisionCheckConstraintPayloadSelect>(args: ProvisionCheckConstraintVariables, options: {
|
|
351
|
+
select: S;
|
|
352
|
+
} & StrictSelect<S, ProvisionCheckConstraintPayloadSelect>) => QueryBuilder<{
|
|
353
|
+
provisionCheckConstraint: InferSelectResult<ProvisionCheckConstraintPayload, S> | null;
|
|
354
|
+
}>;
|
|
343
355
|
provisionUniqueConstraint: <S extends ProvisionUniqueConstraintPayloadSelect>(args: ProvisionUniqueConstraintVariables, options: {
|
|
344
356
|
select: S;
|
|
345
357
|
} & StrictSelect<S, ProvisionUniqueConstraintPayloadSelect>) => QueryBuilder<{
|
|
@@ -314,6 +314,18 @@ export function createMutationOperations(client) {
|
|
|
314
314
|
},
|
|
315
315
|
], connectionFieldsMap, 'SetFieldOrderPayload'),
|
|
316
316
|
}),
|
|
317
|
+
provisionCheckConstraint: (args, options) => new QueryBuilder({
|
|
318
|
+
client,
|
|
319
|
+
operation: 'mutation',
|
|
320
|
+
operationName: 'ProvisionCheckConstraint',
|
|
321
|
+
fieldName: 'provisionCheckConstraint',
|
|
322
|
+
...buildCustomDocument('mutation', 'ProvisionCheckConstraint', 'provisionCheckConstraint', options.select, args, [
|
|
323
|
+
{
|
|
324
|
+
name: 'input',
|
|
325
|
+
type: 'ProvisionCheckConstraintInput!',
|
|
326
|
+
},
|
|
327
|
+
], connectionFieldsMap, 'ProvisionCheckConstraintPayload'),
|
|
328
|
+
}),
|
|
317
329
|
provisionUniqueConstraint: (args, options) => new QueryBuilder({
|
|
318
330
|
client,
|
|
319
331
|
operation: 'mutation',
|
package/objects/orm/client.js
CHANGED
|
@@ -20,7 +20,7 @@ class FetchAdapter {
|
|
|
20
20
|
constructor(endpoint, headers, fetchFn) {
|
|
21
21
|
this.endpoint = endpoint;
|
|
22
22
|
this.headers = headers ?? {};
|
|
23
|
-
this.fetchFn = fetchFn ?? (0, runtime_1.createFetch)();
|
|
23
|
+
this.fetchFn = (fetchFn ?? (0, runtime_1.createFetch)()).bind(globalThis);
|
|
24
24
|
}
|
|
25
25
|
async execute(document, variables) {
|
|
26
26
|
const response = await this.fetchFn(this.endpoint, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@constructive-io/sdk",
|
|
3
|
-
"version": "0.21.
|
|
3
|
+
"version": "0.21.3",
|
|
4
4
|
"author": "Constructive <developers@constructive.io>",
|
|
5
5
|
"description": "Constructive SDK - Auto-generated GraphQL types and ORM client",
|
|
6
6
|
"main": "index.js",
|
|
@@ -42,17 +42,17 @@
|
|
|
42
42
|
],
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"@0no-co/graphql.web": "^1.1.2",
|
|
45
|
-
"@constructive-io/graphql-query": "^3.23.
|
|
46
|
-
"@constructive-io/graphql-types": "^3.9.
|
|
47
|
-
"gql-ast": "^3.9.
|
|
45
|
+
"@constructive-io/graphql-query": "^3.23.2",
|
|
46
|
+
"@constructive-io/graphql-types": "^3.9.1",
|
|
47
|
+
"gql-ast": "^3.9.1",
|
|
48
48
|
"graphql": "16.13.0"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
|
-
"@constructive-io/graphql-codegen": "^4.40.
|
|
51
|
+
"@constructive-io/graphql-codegen": "^4.40.3",
|
|
52
52
|
"@types/node": "^22.19.11",
|
|
53
53
|
"makage": "^0.3.0",
|
|
54
54
|
"tsx": "^4.19.0",
|
|
55
55
|
"typescript": "^5.9.3"
|
|
56
56
|
},
|
|
57
|
-
"gitHead": "
|
|
57
|
+
"gitHead": "a4774481064e5cc16ca64f83cd705931e2b58250"
|
|
58
58
|
}
|
package/public/orm/client.js
CHANGED
|
@@ -20,7 +20,7 @@ class FetchAdapter {
|
|
|
20
20
|
constructor(endpoint, headers, fetchFn) {
|
|
21
21
|
this.endpoint = endpoint;
|
|
22
22
|
this.headers = headers ?? {};
|
|
23
|
-
this.fetchFn = fetchFn ?? (0, runtime_1.createFetch)();
|
|
23
|
+
this.fetchFn = (fetchFn ?? (0, runtime_1.createFetch)()).bind(globalThis);
|
|
24
24
|
}
|
|
25
25
|
async execute(document, variables) {
|
|
26
26
|
const response = await this.fetchFn(this.endpoint, {
|
package/public/orm/index.d.ts
CHANGED
|
@@ -571,6 +571,11 @@ export declare function createClient(config: OrmClientConfig): {
|
|
|
571
571
|
} & import("./select-types").StrictSelect<S, import("./input-types").SetFieldOrderPayloadSelect>) => import("./query-builder").QueryBuilder<{
|
|
572
572
|
setFieldOrder: import("./select-types").InferSelectResult<import("./input-types").SetFieldOrderPayload, S> | null;
|
|
573
573
|
}>;
|
|
574
|
+
provisionCheckConstraint: <S extends import("./input-types").ProvisionCheckConstraintPayloadSelect>(args: import("./mutation").ProvisionCheckConstraintVariables, options: {
|
|
575
|
+
select: S;
|
|
576
|
+
} & import("./select-types").StrictSelect<S, import("./input-types").ProvisionCheckConstraintPayloadSelect>) => import("./query-builder").QueryBuilder<{
|
|
577
|
+
provisionCheckConstraint: import("./select-types").InferSelectResult<import("./input-types").ProvisionCheckConstraintPayload, S> | null;
|
|
578
|
+
}>;
|
|
574
579
|
provisionUniqueConstraint: <S extends import("./input-types").ProvisionUniqueConstraintPayloadSelect>(args: import("./mutation").ProvisionUniqueConstraintVariables, options: {
|
|
575
580
|
select: S;
|
|
576
581
|
} & import("./select-types").StrictSelect<S, import("./input-types").ProvisionUniqueConstraintPayloadSelect>) => import("./query-builder").QueryBuilder<{
|
|
@@ -1039,6 +1039,8 @@ export interface ApiSetting {
|
|
|
1039
1039
|
enableLtree?: boolean | null;
|
|
1040
1040
|
/** Override: enable LLM/AI integration features (NULL = inherit from database_settings) */
|
|
1041
1041
|
enableLlm?: boolean | null;
|
|
1042
|
+
/** Override: enable realtime subscriptions (NULL = inherit from database_settings) */
|
|
1043
|
+
enableRealtime?: boolean | null;
|
|
1042
1044
|
/** Extensible JSON for additional per-API settings that do not have dedicated columns */
|
|
1043
1045
|
options?: Record<string, unknown> | null;
|
|
1044
1046
|
}
|
|
@@ -2661,6 +2663,8 @@ export interface DatabaseSetting {
|
|
|
2661
2663
|
enableLtree?: boolean | null;
|
|
2662
2664
|
/** Enable LLM/AI integration features in the GraphQL API */
|
|
2663
2665
|
enableLlm?: boolean | null;
|
|
2666
|
+
/** Enable realtime subscriptions (cursor-tracked change delivery) in the GraphQL API */
|
|
2667
|
+
enableRealtime?: boolean | null;
|
|
2664
2668
|
/** Extensible JSON for additional settings that do not have dedicated columns */
|
|
2665
2669
|
options?: Record<string, unknown> | null;
|
|
2666
2670
|
}
|
|
@@ -5580,6 +5584,7 @@ export type ApiSettingSelect = {
|
|
|
5580
5584
|
enableConnectionFilter?: boolean;
|
|
5581
5585
|
enableLtree?: boolean;
|
|
5582
5586
|
enableLlm?: boolean;
|
|
5587
|
+
enableRealtime?: boolean;
|
|
5583
5588
|
options?: boolean;
|
|
5584
5589
|
api?: {
|
|
5585
5590
|
select: ApiSelect;
|
|
@@ -7480,6 +7485,7 @@ export type DatabaseSettingSelect = {
|
|
|
7480
7485
|
enableConnectionFilter?: boolean;
|
|
7481
7486
|
enableLtree?: boolean;
|
|
7482
7487
|
enableLlm?: boolean;
|
|
7488
|
+
enableRealtime?: boolean;
|
|
7483
7489
|
options?: boolean;
|
|
7484
7490
|
database?: {
|
|
7485
7491
|
select: DatabaseSelect;
|
|
@@ -10222,6 +10228,8 @@ export interface ApiSettingFilter {
|
|
|
10222
10228
|
enableLtree?: BooleanFilter;
|
|
10223
10229
|
/** Filter by the object’s `enableLlm` field. */
|
|
10224
10230
|
enableLlm?: BooleanFilter;
|
|
10231
|
+
/** Filter by the object’s `enableRealtime` field. */
|
|
10232
|
+
enableRealtime?: BooleanFilter;
|
|
10225
10233
|
/** Filter by the object’s `options` field. */
|
|
10226
10234
|
options?: JSONFilter;
|
|
10227
10235
|
/** Checks for all expressions in this list. */
|
|
@@ -13358,6 +13366,8 @@ export interface DatabaseSettingFilter {
|
|
|
13358
13366
|
enableLtree?: BooleanFilter;
|
|
13359
13367
|
/** Filter by the object’s `enableLlm` field. */
|
|
13360
13368
|
enableLlm?: BooleanFilter;
|
|
13369
|
+
/** Filter by the object’s `enableRealtime` field. */
|
|
13370
|
+
enableRealtime?: BooleanFilter;
|
|
13361
13371
|
/** Filter by the object’s `options` field. */
|
|
13362
13372
|
options?: JSONFilter;
|
|
13363
13373
|
/** Checks for all expressions in this list. */
|
|
@@ -14168,7 +14178,7 @@ export type DatabaseTransferOrderBy = 'NATURAL' | 'PRIMARY_KEY_ASC' | 'PRIMARY_K
|
|
|
14168
14178
|
export type ApiOrderBy = 'NATURAL' | 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' | 'ID_ASC' | 'ID_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' | 'NAME_ASC' | 'NAME_DESC' | 'DBNAME_ASC' | 'DBNAME_DESC' | 'ROLE_NAME_ASC' | 'ROLE_NAME_DESC' | 'ANON_ROLE_ASC' | 'ANON_ROLE_DESC' | 'IS_PUBLIC_ASC' | 'IS_PUBLIC_DESC';
|
|
14169
14179
|
export type SiteOrderBy = 'NATURAL' | 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' | 'ID_ASC' | 'ID_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' | 'TITLE_ASC' | 'TITLE_DESC' | 'DESCRIPTION_ASC' | 'DESCRIPTION_DESC' | 'OG_IMAGE_ASC' | 'OG_IMAGE_DESC' | 'FAVICON_ASC' | 'FAVICON_DESC' | 'APPLE_TOUCH_ICON_ASC' | 'APPLE_TOUCH_ICON_DESC' | 'LOGO_ASC' | 'LOGO_DESC' | 'DBNAME_ASC' | 'DBNAME_DESC';
|
|
14170
14180
|
export type AppOrderBy = 'NATURAL' | 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' | 'ID_ASC' | 'ID_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' | 'SITE_ID_ASC' | 'SITE_ID_DESC' | 'NAME_ASC' | 'NAME_DESC' | 'APP_IMAGE_ASC' | 'APP_IMAGE_DESC' | 'APP_STORE_LINK_ASC' | 'APP_STORE_LINK_DESC' | 'APP_STORE_ID_ASC' | 'APP_STORE_ID_DESC' | 'APP_ID_PREFIX_ASC' | 'APP_ID_PREFIX_DESC' | 'PLAY_STORE_LINK_ASC' | 'PLAY_STORE_LINK_DESC';
|
|
14171
|
-
export type ApiSettingOrderBy = 'NATURAL' | 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' | 'ID_ASC' | 'ID_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' | 'API_ID_ASC' | 'API_ID_DESC' | 'ENABLE_AGGREGATES_ASC' | 'ENABLE_AGGREGATES_DESC' | 'ENABLE_POSTGIS_ASC' | 'ENABLE_POSTGIS_DESC' | 'ENABLE_SEARCH_ASC' | 'ENABLE_SEARCH_DESC' | 'ENABLE_DIRECT_UPLOADS_ASC' | 'ENABLE_DIRECT_UPLOADS_DESC' | 'ENABLE_PRESIGNED_UPLOADS_ASC' | 'ENABLE_PRESIGNED_UPLOADS_DESC' | 'ENABLE_MANY_TO_MANY_ASC' | 'ENABLE_MANY_TO_MANY_DESC' | 'ENABLE_CONNECTION_FILTER_ASC' | 'ENABLE_CONNECTION_FILTER_DESC' | 'ENABLE_LTREE_ASC' | 'ENABLE_LTREE_DESC' | 'ENABLE_LLM_ASC' | 'ENABLE_LLM_DESC' | 'OPTIONS_ASC' | 'OPTIONS_DESC';
|
|
14181
|
+
export type ApiSettingOrderBy = 'NATURAL' | 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' | 'ID_ASC' | 'ID_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' | 'API_ID_ASC' | 'API_ID_DESC' | 'ENABLE_AGGREGATES_ASC' | 'ENABLE_AGGREGATES_DESC' | 'ENABLE_POSTGIS_ASC' | 'ENABLE_POSTGIS_DESC' | 'ENABLE_SEARCH_ASC' | 'ENABLE_SEARCH_DESC' | 'ENABLE_DIRECT_UPLOADS_ASC' | 'ENABLE_DIRECT_UPLOADS_DESC' | 'ENABLE_PRESIGNED_UPLOADS_ASC' | 'ENABLE_PRESIGNED_UPLOADS_DESC' | 'ENABLE_MANY_TO_MANY_ASC' | 'ENABLE_MANY_TO_MANY_DESC' | 'ENABLE_CONNECTION_FILTER_ASC' | 'ENABLE_CONNECTION_FILTER_DESC' | 'ENABLE_LTREE_ASC' | 'ENABLE_LTREE_DESC' | 'ENABLE_LLM_ASC' | 'ENABLE_LLM_DESC' | 'ENABLE_REALTIME_ASC' | 'ENABLE_REALTIME_DESC' | 'OPTIONS_ASC' | 'OPTIONS_DESC';
|
|
14172
14182
|
export type ConnectedAccountsModuleOrderBy = 'NATURAL' | 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' | 'ID_ASC' | 'ID_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' | 'SCHEMA_ID_ASC' | 'SCHEMA_ID_DESC' | 'PRIVATE_SCHEMA_ID_ASC' | 'PRIVATE_SCHEMA_ID_DESC' | 'TABLE_ID_ASC' | 'TABLE_ID_DESC' | 'OWNER_TABLE_ID_ASC' | 'OWNER_TABLE_ID_DESC' | 'TABLE_NAME_ASC' | 'TABLE_NAME_DESC';
|
|
14173
14183
|
export type CryptoAddressesModuleOrderBy = 'NATURAL' | 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' | 'ID_ASC' | 'ID_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' | 'SCHEMA_ID_ASC' | 'SCHEMA_ID_DESC' | 'PRIVATE_SCHEMA_ID_ASC' | 'PRIVATE_SCHEMA_ID_DESC' | 'TABLE_ID_ASC' | 'TABLE_ID_DESC' | 'OWNER_TABLE_ID_ASC' | 'OWNER_TABLE_ID_DESC' | 'TABLE_NAME_ASC' | 'TABLE_NAME_DESC' | 'CRYPTO_NETWORK_ASC' | 'CRYPTO_NETWORK_DESC';
|
|
14174
14184
|
export type CryptoAuthModuleOrderBy = 'NATURAL' | 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' | 'ID_ASC' | 'ID_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' | 'SCHEMA_ID_ASC' | 'SCHEMA_ID_DESC' | 'USERS_TABLE_ID_ASC' | 'USERS_TABLE_ID_DESC' | 'SECRETS_TABLE_ID_ASC' | 'SECRETS_TABLE_ID_DESC' | 'SESSIONS_TABLE_ID_ASC' | 'SESSIONS_TABLE_ID_DESC' | 'SESSION_CREDENTIALS_TABLE_ID_ASC' | 'SESSION_CREDENTIALS_TABLE_ID_DESC' | 'ADDRESSES_TABLE_ID_ASC' | 'ADDRESSES_TABLE_ID_DESC' | 'USER_FIELD_ASC' | 'USER_FIELD_DESC' | 'CRYPTO_NETWORK_ASC' | 'CRYPTO_NETWORK_DESC' | 'SIGN_IN_REQUEST_CHALLENGE_ASC' | 'SIGN_IN_REQUEST_CHALLENGE_DESC' | 'SIGN_IN_RECORD_FAILURE_ASC' | 'SIGN_IN_RECORD_FAILURE_DESC' | 'SIGN_UP_WITH_KEY_ASC' | 'SIGN_UP_WITH_KEY_DESC' | 'SIGN_IN_WITH_CHALLENGE_ASC' | 'SIGN_IN_WITH_CHALLENGE_DESC';
|
|
@@ -14258,7 +14268,7 @@ export type RlsSettingOrderBy = 'NATURAL' | 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DES
|
|
|
14258
14268
|
export type AppLimitEventOrderBy = 'NATURAL' | 'NAME_ASC' | 'NAME_DESC' | 'ACTOR_ID_ASC' | 'ACTOR_ID_DESC' | 'ENTITY_ID_ASC' | 'ENTITY_ID_DESC' | 'EVENT_TYPE_ASC' | 'EVENT_TYPE_DESC' | 'DELTA_ASC' | 'DELTA_DESC' | 'NUM_BEFORE_ASC' | 'NUM_BEFORE_DESC' | 'NUM_AFTER_ASC' | 'NUM_AFTER_DESC' | 'MAX_AT_EVENT_ASC' | 'MAX_AT_EVENT_DESC' | 'REASON_ASC' | 'REASON_DESC';
|
|
14259
14269
|
export type OrgLimitEventOrderBy = 'NATURAL' | 'NAME_ASC' | 'NAME_DESC' | 'ACTOR_ID_ASC' | 'ACTOR_ID_DESC' | 'ENTITY_ID_ASC' | 'ENTITY_ID_DESC' | 'EVENT_TYPE_ASC' | 'EVENT_TYPE_DESC' | 'DELTA_ASC' | 'DELTA_DESC' | 'NUM_BEFORE_ASC' | 'NUM_BEFORE_DESC' | 'NUM_AFTER_ASC' | 'NUM_AFTER_DESC' | 'MAX_AT_EVENT_ASC' | 'MAX_AT_EVENT_DESC' | 'REASON_ASC' | 'REASON_DESC';
|
|
14260
14270
|
export type RlsModuleOrderBy = 'NATURAL' | 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' | 'ID_ASC' | 'ID_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' | 'SCHEMA_ID_ASC' | 'SCHEMA_ID_DESC' | 'PRIVATE_SCHEMA_ID_ASC' | 'PRIVATE_SCHEMA_ID_DESC' | 'SESSION_CREDENTIALS_TABLE_ID_ASC' | 'SESSION_CREDENTIALS_TABLE_ID_DESC' | 'SESSIONS_TABLE_ID_ASC' | 'SESSIONS_TABLE_ID_DESC' | 'USERS_TABLE_ID_ASC' | 'USERS_TABLE_ID_DESC' | 'AUTHENTICATE_ASC' | 'AUTHENTICATE_DESC' | 'AUTHENTICATE_STRICT_ASC' | 'AUTHENTICATE_STRICT_DESC' | 'CURRENT_ROLE_ASC' | 'CURRENT_ROLE_DESC' | 'CURRENT_ROLE_ID_ASC' | 'CURRENT_ROLE_ID_DESC';
|
|
14261
|
-
export type DatabaseSettingOrderBy = 'NATURAL' | 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' | 'ID_ASC' | 'ID_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' | 'ENABLE_AGGREGATES_ASC' | 'ENABLE_AGGREGATES_DESC' | 'ENABLE_POSTGIS_ASC' | 'ENABLE_POSTGIS_DESC' | 'ENABLE_SEARCH_ASC' | 'ENABLE_SEARCH_DESC' | 'ENABLE_DIRECT_UPLOADS_ASC' | 'ENABLE_DIRECT_UPLOADS_DESC' | 'ENABLE_PRESIGNED_UPLOADS_ASC' | 'ENABLE_PRESIGNED_UPLOADS_DESC' | 'ENABLE_MANY_TO_MANY_ASC' | 'ENABLE_MANY_TO_MANY_DESC' | 'ENABLE_CONNECTION_FILTER_ASC' | 'ENABLE_CONNECTION_FILTER_DESC' | 'ENABLE_LTREE_ASC' | 'ENABLE_LTREE_DESC' | 'ENABLE_LLM_ASC' | 'ENABLE_LLM_DESC' | 'OPTIONS_ASC' | 'OPTIONS_DESC';
|
|
14271
|
+
export type DatabaseSettingOrderBy = 'NATURAL' | 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' | 'ID_ASC' | 'ID_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' | 'ENABLE_AGGREGATES_ASC' | 'ENABLE_AGGREGATES_DESC' | 'ENABLE_POSTGIS_ASC' | 'ENABLE_POSTGIS_DESC' | 'ENABLE_SEARCH_ASC' | 'ENABLE_SEARCH_DESC' | 'ENABLE_DIRECT_UPLOADS_ASC' | 'ENABLE_DIRECT_UPLOADS_DESC' | 'ENABLE_PRESIGNED_UPLOADS_ASC' | 'ENABLE_PRESIGNED_UPLOADS_DESC' | 'ENABLE_MANY_TO_MANY_ASC' | 'ENABLE_MANY_TO_MANY_DESC' | 'ENABLE_CONNECTION_FILTER_ASC' | 'ENABLE_CONNECTION_FILTER_DESC' | 'ENABLE_LTREE_ASC' | 'ENABLE_LTREE_DESC' | 'ENABLE_LLM_ASC' | 'ENABLE_LLM_DESC' | 'ENABLE_REALTIME_ASC' | 'ENABLE_REALTIME_DESC' | 'OPTIONS_ASC' | 'OPTIONS_DESC';
|
|
14262
14272
|
export type PlansModuleOrderBy = 'NATURAL' | 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' | 'ID_ASC' | 'ID_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' | 'SCHEMA_ID_ASC' | 'SCHEMA_ID_DESC' | 'PRIVATE_SCHEMA_ID_ASC' | 'PRIVATE_SCHEMA_ID_DESC' | 'PLANS_TABLE_ID_ASC' | 'PLANS_TABLE_ID_DESC' | 'PLANS_TABLE_NAME_ASC' | 'PLANS_TABLE_NAME_DESC' | 'PLAN_LIMITS_TABLE_ID_ASC' | 'PLAN_LIMITS_TABLE_ID_DESC' | 'PLAN_LIMITS_TABLE_NAME_ASC' | 'PLAN_LIMITS_TABLE_NAME_DESC' | 'PLAN_PRICING_TABLE_ID_ASC' | 'PLAN_PRICING_TABLE_ID_DESC' | 'PLAN_OVERRIDES_TABLE_ID_ASC' | 'PLAN_OVERRIDES_TABLE_ID_DESC' | 'APPLY_PLAN_FUNCTION_ASC' | 'APPLY_PLAN_FUNCTION_DESC' | 'APPLY_PLAN_AGGREGATE_FUNCTION_ASC' | 'APPLY_PLAN_AGGREGATE_FUNCTION_DESC' | 'PREFIX_ASC' | 'PREFIX_DESC';
|
|
14263
14273
|
export type SqlActionOrderBy = 'NATURAL' | 'ID_ASC' | 'ID_DESC' | 'NAME_ASC' | 'NAME_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' | 'DEPLOY_ASC' | 'DEPLOY_DESC' | 'DEPS_ASC' | 'DEPS_DESC' | 'PAYLOAD_ASC' | 'PAYLOAD_DESC' | 'CONTENT_ASC' | 'CONTENT_DESC' | 'REVERT_ASC' | 'REVERT_DESC' | 'VERIFY_ASC' | 'VERIFY_DESC' | 'CREATED_AT_ASC' | 'CREATED_AT_DESC' | 'ACTION_ASC' | 'ACTION_DESC' | 'ACTION_ID_ASC' | 'ACTION_ID_DESC' | 'ACTOR_ID_ASC' | 'ACTOR_ID_DESC';
|
|
14264
14274
|
export type BillingModuleOrderBy = 'NATURAL' | 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' | 'ID_ASC' | 'ID_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' | 'SCHEMA_ID_ASC' | 'SCHEMA_ID_DESC' | 'PRIVATE_SCHEMA_ID_ASC' | 'PRIVATE_SCHEMA_ID_DESC' | 'METERS_TABLE_ID_ASC' | 'METERS_TABLE_ID_DESC' | 'METERS_TABLE_NAME_ASC' | 'METERS_TABLE_NAME_DESC' | 'PLAN_SUBSCRIPTIONS_TABLE_ID_ASC' | 'PLAN_SUBSCRIPTIONS_TABLE_ID_DESC' | 'PLAN_SUBSCRIPTIONS_TABLE_NAME_ASC' | 'PLAN_SUBSCRIPTIONS_TABLE_NAME_DESC' | 'LEDGER_TABLE_ID_ASC' | 'LEDGER_TABLE_ID_DESC' | 'LEDGER_TABLE_NAME_ASC' | 'LEDGER_TABLE_NAME_DESC' | 'BALANCES_TABLE_ID_ASC' | 'BALANCES_TABLE_ID_DESC' | 'BALANCES_TABLE_NAME_ASC' | 'BALANCES_TABLE_NAME_DESC' | 'RECORD_USAGE_FUNCTION_ASC' | 'RECORD_USAGE_FUNCTION_DESC' | 'PREFIX_ASC' | 'PREFIX_DESC';
|
|
@@ -15817,6 +15827,7 @@ export interface CreateApiSettingInput {
|
|
|
15817
15827
|
enableConnectionFilter?: boolean;
|
|
15818
15828
|
enableLtree?: boolean;
|
|
15819
15829
|
enableLlm?: boolean;
|
|
15830
|
+
enableRealtime?: boolean;
|
|
15820
15831
|
options?: Record<string, unknown>;
|
|
15821
15832
|
};
|
|
15822
15833
|
}
|
|
@@ -15832,6 +15843,7 @@ export interface ApiSettingPatch {
|
|
|
15832
15843
|
enableConnectionFilter?: boolean | null;
|
|
15833
15844
|
enableLtree?: boolean | null;
|
|
15834
15845
|
enableLlm?: boolean | null;
|
|
15846
|
+
enableRealtime?: boolean | null;
|
|
15835
15847
|
options?: Record<string, unknown> | null;
|
|
15836
15848
|
}
|
|
15837
15849
|
export interface UpdateApiSettingInput {
|
|
@@ -18698,6 +18710,7 @@ export interface CreateDatabaseSettingInput {
|
|
|
18698
18710
|
enableConnectionFilter?: boolean;
|
|
18699
18711
|
enableLtree?: boolean;
|
|
18700
18712
|
enableLlm?: boolean;
|
|
18713
|
+
enableRealtime?: boolean;
|
|
18701
18714
|
options?: Record<string, unknown>;
|
|
18702
18715
|
};
|
|
18703
18716
|
}
|
|
@@ -18712,6 +18725,7 @@ export interface DatabaseSettingPatch {
|
|
|
18712
18725
|
enableConnectionFilter?: boolean | null;
|
|
18713
18726
|
enableLtree?: boolean | null;
|
|
18714
18727
|
enableLlm?: boolean | null;
|
|
18728
|
+
enableRealtime?: boolean | null;
|
|
18715
18729
|
options?: Record<string, unknown> | null;
|
|
18716
18730
|
}
|
|
18717
18731
|
export interface UpdateDatabaseSettingInput {
|
|
@@ -19273,6 +19287,12 @@ export interface SetFieldOrderInput {
|
|
|
19273
19287
|
clientMutationId?: string;
|
|
19274
19288
|
fieldIds?: string[];
|
|
19275
19289
|
}
|
|
19290
|
+
export interface ProvisionCheckConstraintInput {
|
|
19291
|
+
clientMutationId?: string;
|
|
19292
|
+
databaseId?: string;
|
|
19293
|
+
tableId?: string;
|
|
19294
|
+
definition?: Record<string, unknown>;
|
|
19295
|
+
}
|
|
19276
19296
|
export interface ProvisionUniqueConstraintInput {
|
|
19277
19297
|
clientMutationId?: string;
|
|
19278
19298
|
databaseId?: string;
|
|
@@ -22912,6 +22932,8 @@ export interface ApiSettingFilter {
|
|
|
22912
22932
|
enableLtree?: BooleanFilter;
|
|
22913
22933
|
/** Filter by the object’s `enableLlm` field. */
|
|
22914
22934
|
enableLlm?: BooleanFilter;
|
|
22935
|
+
/** Filter by the object’s `enableRealtime` field. */
|
|
22936
|
+
enableRealtime?: BooleanFilter;
|
|
22915
22937
|
/** Filter by the object’s `options` field. */
|
|
22916
22938
|
options?: JSONFilter;
|
|
22917
22939
|
/** Checks for all expressions in this list. */
|
|
@@ -26746,6 +26768,8 @@ export interface DatabaseSettingFilter {
|
|
|
26746
26768
|
enableLtree?: BooleanFilter;
|
|
26747
26769
|
/** Filter by the object’s `enableLlm` field. */
|
|
26748
26770
|
enableLlm?: BooleanFilter;
|
|
26771
|
+
/** Filter by the object’s `enableRealtime` field. */
|
|
26772
|
+
enableRealtime?: BooleanFilter;
|
|
26749
26773
|
/** Filter by the object’s `options` field. */
|
|
26750
26774
|
options?: JSONFilter;
|
|
26751
26775
|
/** Checks for all expressions in this list. */
|
|
@@ -27784,6 +27808,12 @@ export interface SetFieldOrderPayload {
|
|
|
27784
27808
|
export type SetFieldOrderPayloadSelect = {
|
|
27785
27809
|
clientMutationId?: boolean;
|
|
27786
27810
|
};
|
|
27811
|
+
export interface ProvisionCheckConstraintPayload {
|
|
27812
|
+
clientMutationId?: string | null;
|
|
27813
|
+
}
|
|
27814
|
+
export type ProvisionCheckConstraintPayloadSelect = {
|
|
27815
|
+
clientMutationId?: boolean;
|
|
27816
|
+
};
|
|
27787
27817
|
export interface ProvisionUniqueConstraintPayload {
|
|
27788
27818
|
clientMutationId?: string | null;
|
|
27789
27819
|
}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
import { OrmClient } from '../client';
|
|
7
7
|
import { QueryBuilder } from '../query-builder';
|
|
8
8
|
import type { InferSelectResult, StrictSelect } from '../select-types';
|
|
9
|
-
import type { SendAccountDeletionEmailInput, SignOutInput, AcceptDatabaseTransferInput, CancelDatabaseTransferInput, RejectDatabaseTransferInput, DisconnectAccountInput, RevokeApiKeyInput, RevokeSessionInput, VerifyPasswordInput, VerifyTotpInput, SubmitAppInviteCodeInput, SubmitOrgInviteCodeInput, CheckPasswordInput, ConfirmDeleteAccountInput, SetPasswordInput, VerifyEmailInput, FreezeObjectsInput, InitEmptyRepoInput, ConstructBlueprintInput, ProvisionNewUserInput, ResetPasswordInput, RemoveNodeAtPathInput, CopyTemplateToBlueprintInput, ProvisionSpatialRelationInput, BootstrapUserInput, SetFieldOrderInput, ProvisionUniqueConstraintInput, ProvisionFullTextSearchInput, ProvisionIndexInput, SetDataAtPathInput, SetPropsAndCommitInput, ProvisionDatabaseWithUserInput, InsertNodeAtPathInput, UpdateNodeAtPathInput, SetAndCommitInput, ProvisionRelationInput, ApplyRlsInput, SignInCrossOriginInput, CreateUserDatabaseInput, ExtendTokenExpiresInput, CreateApiKeyInput, SendVerificationEmailInput, ForgotPasswordInput, SignUpInput, RequestCrossOriginTokenInput, SignInInput, ProvisionTableInput, ProvisionBucketInput, SendAccountDeletionEmailPayload, SignOutPayload, AcceptDatabaseTransferPayload, CancelDatabaseTransferPayload, RejectDatabaseTransferPayload, DisconnectAccountPayload, RevokeApiKeyPayload, RevokeSessionPayload, VerifyPasswordPayload, VerifyTotpPayload, SubmitAppInviteCodePayload, SubmitOrgInviteCodePayload, CheckPasswordPayload, ConfirmDeleteAccountPayload, SetPasswordPayload, VerifyEmailPayload, FreezeObjectsPayload, InitEmptyRepoPayload, ConstructBlueprintPayload, ProvisionNewUserPayload, ResetPasswordPayload, RemoveNodeAtPathPayload, CopyTemplateToBlueprintPayload, ProvisionSpatialRelationPayload, BootstrapUserPayload, SetFieldOrderPayload, ProvisionUniqueConstraintPayload, ProvisionFullTextSearchPayload, ProvisionIndexPayload, SetDataAtPathPayload, SetPropsAndCommitPayload, ProvisionDatabaseWithUserPayload, InsertNodeAtPathPayload, UpdateNodeAtPathPayload, SetAndCommitPayload, ProvisionRelationPayload, ApplyRlsPayload, SignInCrossOriginPayload, CreateUserDatabasePayload, ExtendTokenExpiresPayload, CreateApiKeyPayload, SendVerificationEmailPayload, ForgotPasswordPayload, SignUpPayload, RequestCrossOriginTokenPayload, SignInPayload, ProvisionTablePayload, ProvisionBucketPayload, SendAccountDeletionEmailPayloadSelect, SignOutPayloadSelect, AcceptDatabaseTransferPayloadSelect, CancelDatabaseTransferPayloadSelect, RejectDatabaseTransferPayloadSelect, DisconnectAccountPayloadSelect, RevokeApiKeyPayloadSelect, RevokeSessionPayloadSelect, VerifyPasswordPayloadSelect, VerifyTotpPayloadSelect, SubmitAppInviteCodePayloadSelect, SubmitOrgInviteCodePayloadSelect, CheckPasswordPayloadSelect, ConfirmDeleteAccountPayloadSelect, SetPasswordPayloadSelect, VerifyEmailPayloadSelect, FreezeObjectsPayloadSelect, InitEmptyRepoPayloadSelect, ConstructBlueprintPayloadSelect, ProvisionNewUserPayloadSelect, ResetPasswordPayloadSelect, RemoveNodeAtPathPayloadSelect, CopyTemplateToBlueprintPayloadSelect, ProvisionSpatialRelationPayloadSelect, BootstrapUserPayloadSelect, SetFieldOrderPayloadSelect, ProvisionUniqueConstraintPayloadSelect, ProvisionFullTextSearchPayloadSelect, ProvisionIndexPayloadSelect, SetDataAtPathPayloadSelect, SetPropsAndCommitPayloadSelect, ProvisionDatabaseWithUserPayloadSelect, InsertNodeAtPathPayloadSelect, UpdateNodeAtPathPayloadSelect, SetAndCommitPayloadSelect, ProvisionRelationPayloadSelect, ApplyRlsPayloadSelect, SignInCrossOriginPayloadSelect, CreateUserDatabasePayloadSelect, ExtendTokenExpiresPayloadSelect, CreateApiKeyPayloadSelect, SendVerificationEmailPayloadSelect, ForgotPasswordPayloadSelect, SignUpPayloadSelect, RequestCrossOriginTokenPayloadSelect, SignInPayloadSelect, ProvisionTablePayloadSelect, ProvisionBucketPayloadSelect } from '../input-types';
|
|
9
|
+
import type { SendAccountDeletionEmailInput, SignOutInput, AcceptDatabaseTransferInput, CancelDatabaseTransferInput, RejectDatabaseTransferInput, DisconnectAccountInput, RevokeApiKeyInput, RevokeSessionInput, VerifyPasswordInput, VerifyTotpInput, SubmitAppInviteCodeInput, SubmitOrgInviteCodeInput, CheckPasswordInput, ConfirmDeleteAccountInput, SetPasswordInput, VerifyEmailInput, FreezeObjectsInput, InitEmptyRepoInput, ConstructBlueprintInput, ProvisionNewUserInput, ResetPasswordInput, RemoveNodeAtPathInput, CopyTemplateToBlueprintInput, ProvisionSpatialRelationInput, BootstrapUserInput, SetFieldOrderInput, ProvisionCheckConstraintInput, ProvisionUniqueConstraintInput, ProvisionFullTextSearchInput, ProvisionIndexInput, SetDataAtPathInput, SetPropsAndCommitInput, ProvisionDatabaseWithUserInput, InsertNodeAtPathInput, UpdateNodeAtPathInput, SetAndCommitInput, ProvisionRelationInput, ApplyRlsInput, SignInCrossOriginInput, CreateUserDatabaseInput, ExtendTokenExpiresInput, CreateApiKeyInput, SendVerificationEmailInput, ForgotPasswordInput, SignUpInput, RequestCrossOriginTokenInput, SignInInput, ProvisionTableInput, ProvisionBucketInput, SendAccountDeletionEmailPayload, SignOutPayload, AcceptDatabaseTransferPayload, CancelDatabaseTransferPayload, RejectDatabaseTransferPayload, DisconnectAccountPayload, RevokeApiKeyPayload, RevokeSessionPayload, VerifyPasswordPayload, VerifyTotpPayload, SubmitAppInviteCodePayload, SubmitOrgInviteCodePayload, CheckPasswordPayload, ConfirmDeleteAccountPayload, SetPasswordPayload, VerifyEmailPayload, FreezeObjectsPayload, InitEmptyRepoPayload, ConstructBlueprintPayload, ProvisionNewUserPayload, ResetPasswordPayload, RemoveNodeAtPathPayload, CopyTemplateToBlueprintPayload, ProvisionSpatialRelationPayload, BootstrapUserPayload, SetFieldOrderPayload, ProvisionCheckConstraintPayload, ProvisionUniqueConstraintPayload, ProvisionFullTextSearchPayload, ProvisionIndexPayload, SetDataAtPathPayload, SetPropsAndCommitPayload, ProvisionDatabaseWithUserPayload, InsertNodeAtPathPayload, UpdateNodeAtPathPayload, SetAndCommitPayload, ProvisionRelationPayload, ApplyRlsPayload, SignInCrossOriginPayload, CreateUserDatabasePayload, ExtendTokenExpiresPayload, CreateApiKeyPayload, SendVerificationEmailPayload, ForgotPasswordPayload, SignUpPayload, RequestCrossOriginTokenPayload, SignInPayload, ProvisionTablePayload, ProvisionBucketPayload, SendAccountDeletionEmailPayloadSelect, SignOutPayloadSelect, AcceptDatabaseTransferPayloadSelect, CancelDatabaseTransferPayloadSelect, RejectDatabaseTransferPayloadSelect, DisconnectAccountPayloadSelect, RevokeApiKeyPayloadSelect, RevokeSessionPayloadSelect, VerifyPasswordPayloadSelect, VerifyTotpPayloadSelect, SubmitAppInviteCodePayloadSelect, SubmitOrgInviteCodePayloadSelect, CheckPasswordPayloadSelect, ConfirmDeleteAccountPayloadSelect, SetPasswordPayloadSelect, VerifyEmailPayloadSelect, FreezeObjectsPayloadSelect, InitEmptyRepoPayloadSelect, ConstructBlueprintPayloadSelect, ProvisionNewUserPayloadSelect, ResetPasswordPayloadSelect, RemoveNodeAtPathPayloadSelect, CopyTemplateToBlueprintPayloadSelect, ProvisionSpatialRelationPayloadSelect, BootstrapUserPayloadSelect, SetFieldOrderPayloadSelect, ProvisionCheckConstraintPayloadSelect, ProvisionUniqueConstraintPayloadSelect, ProvisionFullTextSearchPayloadSelect, ProvisionIndexPayloadSelect, SetDataAtPathPayloadSelect, SetPropsAndCommitPayloadSelect, ProvisionDatabaseWithUserPayloadSelect, InsertNodeAtPathPayloadSelect, UpdateNodeAtPathPayloadSelect, SetAndCommitPayloadSelect, ProvisionRelationPayloadSelect, ApplyRlsPayloadSelect, SignInCrossOriginPayloadSelect, CreateUserDatabasePayloadSelect, ExtendTokenExpiresPayloadSelect, CreateApiKeyPayloadSelect, SendVerificationEmailPayloadSelect, ForgotPasswordPayloadSelect, SignUpPayloadSelect, RequestCrossOriginTokenPayloadSelect, SignInPayloadSelect, ProvisionTablePayloadSelect, ProvisionBucketPayloadSelect } from '../input-types';
|
|
10
10
|
export interface SendAccountDeletionEmailVariables {
|
|
11
11
|
input: SendAccountDeletionEmailInput;
|
|
12
12
|
}
|
|
@@ -63,7 +63,7 @@ export interface InitEmptyRepoVariables {
|
|
|
63
63
|
}
|
|
64
64
|
/**
|
|
65
65
|
* Variables for constructBlueprint
|
|
66
|
-
* Executes a blueprint definition by delegating to provision_* procedures. Creates a blueprint_construction record to track the attempt.
|
|
66
|
+
* Executes a blueprint definition by delegating to provision_* procedures. Creates a blueprint_construction record to track the attempt. Seven phases: (0) entity_type_provision for each membership_type entry — provisions entity tables, membership modules, and security, (1) provision_table() for each table with nodes[], fields[], policies[], and grants (table-level indexes/fts/unique_constraints/check_constraints are deferred), (2) provision_relation() for each relation, (3) provision_index() for top-level + deferred indexes, (4) provision_full_text_search() for top-level + deferred FTS, (5) provision_unique_constraint() for top-level + deferred unique constraints, (6) provision_check_constraint() for top-level + deferred check constraints. Phase 0 entity tables are added to the table_map so subsequent phases can reference them by name. Table-level entries are deferred to phases 3-6 so they can reference columns created by relations in phase 2. Returns the construction record ID on success, NULL on failure.
|
|
67
67
|
*/
|
|
68
68
|
export interface ConstructBlueprintVariables {
|
|
69
69
|
input: ConstructBlueprintInput;
|
|
@@ -97,6 +97,13 @@ export interface BootstrapUserVariables {
|
|
|
97
97
|
export interface SetFieldOrderVariables {
|
|
98
98
|
input: SetFieldOrderInput;
|
|
99
99
|
}
|
|
100
|
+
/**
|
|
101
|
+
* Variables for provisionCheckConstraint
|
|
102
|
+
* Creates a check constraint on a table from a $type + data blueprint definition. Supports: CheckOneOf (enum validation via = ANY(ARRAY[...])), CheckGreaterThan (single-column > value or cross-column), CheckLessThan (single-column < value or cross-column), CheckNotEqual (cross-column inequality). Builds AST expressions via ast_helpers and inserts into metaschema_public.check_constraint. Graceful: skips if a constraint with the same name already exists.
|
|
103
|
+
*/
|
|
104
|
+
export interface ProvisionCheckConstraintVariables {
|
|
105
|
+
input: ProvisionCheckConstraintInput;
|
|
106
|
+
}
|
|
100
107
|
/**
|
|
101
108
|
* Variables for provisionUniqueConstraint
|
|
102
109
|
* Creates a unique constraint on a table. Accepts a jsonb definition with columns (array of field names). Graceful: skips if the exact same unique constraint already exists.
|
|
@@ -340,6 +347,11 @@ export declare function createMutationOperations(client: OrmClient): {
|
|
|
340
347
|
} & StrictSelect<S, SetFieldOrderPayloadSelect>) => QueryBuilder<{
|
|
341
348
|
setFieldOrder: InferSelectResult<SetFieldOrderPayload, S> | null;
|
|
342
349
|
}>;
|
|
350
|
+
provisionCheckConstraint: <S extends ProvisionCheckConstraintPayloadSelect>(args: ProvisionCheckConstraintVariables, options: {
|
|
351
|
+
select: S;
|
|
352
|
+
} & StrictSelect<S, ProvisionCheckConstraintPayloadSelect>) => QueryBuilder<{
|
|
353
|
+
provisionCheckConstraint: InferSelectResult<ProvisionCheckConstraintPayload, S> | null;
|
|
354
|
+
}>;
|
|
343
355
|
provisionUniqueConstraint: <S extends ProvisionUniqueConstraintPayloadSelect>(args: ProvisionUniqueConstraintVariables, options: {
|
|
344
356
|
select: S;
|
|
345
357
|
} & StrictSelect<S, ProvisionUniqueConstraintPayloadSelect>) => QueryBuilder<{
|
|
@@ -317,6 +317,18 @@ function createMutationOperations(client) {
|
|
|
317
317
|
},
|
|
318
318
|
], input_types_1.connectionFieldsMap, 'SetFieldOrderPayload'),
|
|
319
319
|
}),
|
|
320
|
+
provisionCheckConstraint: (args, options) => new query_builder_1.QueryBuilder({
|
|
321
|
+
client,
|
|
322
|
+
operation: 'mutation',
|
|
323
|
+
operationName: 'ProvisionCheckConstraint',
|
|
324
|
+
fieldName: 'provisionCheckConstraint',
|
|
325
|
+
...(0, query_builder_1.buildCustomDocument)('mutation', 'ProvisionCheckConstraint', 'provisionCheckConstraint', options.select, args, [
|
|
326
|
+
{
|
|
327
|
+
name: 'input',
|
|
328
|
+
type: 'ProvisionCheckConstraintInput!',
|
|
329
|
+
},
|
|
330
|
+
], input_types_1.connectionFieldsMap, 'ProvisionCheckConstraintPayload'),
|
|
331
|
+
}),
|
|
320
332
|
provisionUniqueConstraint: (args, options) => new query_builder_1.QueryBuilder({
|
|
321
333
|
client,
|
|
322
334
|
operation: 'mutation',
|