@constructive-sdk/cli 0.15.1 → 0.16.1
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 -3
- package/admin/orm/input-types.d.ts +3 -0
- package/auth/orm/client.js +1 -3
- package/auth/orm/input-types.d.ts +3 -0
- package/esm/admin/orm/client.js +1 -3
- package/esm/admin/orm/input-types.d.ts +3 -0
- package/esm/auth/orm/client.js +1 -3
- package/esm/auth/orm/input-types.d.ts +3 -0
- package/esm/objects/orm/client.js +1 -3
- package/esm/objects/orm/input-types.d.ts +3 -0
- package/esm/public/cli/commands/entity-type-provision.js +44 -0
- package/esm/public/cli/commands/storage-module.js +25 -3
- package/esm/public/orm/client.js +1 -3
- package/esm/public/orm/input-types.d.ts +67 -12
- package/objects/orm/client.js +1 -3
- package/objects/orm/input-types.d.ts +3 -0
- package/package.json +4 -4
- package/public/cli/commands/entity-type-provision.js +44 -0
- package/public/cli/commands/storage-module.js +25 -3
- package/public/orm/client.js +1 -3
- package/public/orm/input-types.d.ts +67 -12
|
@@ -1357,7 +1357,8 @@ export interface StorageModule {
|
|
|
1357
1357
|
filesTableName?: string | null;
|
|
1358
1358
|
uploadRequestsTableName?: string | null;
|
|
1359
1359
|
membershipType?: number | null;
|
|
1360
|
-
policies?: string
|
|
1360
|
+
policies?: Record<string, unknown> | null;
|
|
1361
|
+
skipDefaultPolicyTables?: string[] | null;
|
|
1361
1362
|
entityTableId?: string | null;
|
|
1362
1363
|
endpoint?: string | null;
|
|
1363
1364
|
publicUrlPrefix?: string | null;
|
|
@@ -1385,8 +1386,8 @@ export interface EntityTypeProvision {
|
|
|
1385
1386
|
/** The database to provision this entity type in. Required. */
|
|
1386
1387
|
databaseId?: string | null;
|
|
1387
1388
|
/**
|
|
1388
|
-
* Human-readable name for this
|
|
1389
|
-
* Stored in the
|
|
1389
|
+
* Human-readable name for this entity type, e.g. 'Data Room', 'Team Channel'. Required.
|
|
1390
|
+
* Stored in the entity_types registry table.
|
|
1390
1391
|
*/
|
|
1391
1392
|
name?: string | null;
|
|
1392
1393
|
/**
|
|
@@ -1396,7 +1397,7 @@ export interface EntityTypeProvision {
|
|
|
1396
1397
|
* Must be unique per database — the (database_id, prefix) constraint ensures graceful ON CONFLICT DO NOTHING.
|
|
1397
1398
|
*/
|
|
1398
1399
|
prefix?: string | null;
|
|
1399
|
-
/** Description of this
|
|
1400
|
+
/** Description of this entity type. Stored in the entity_types registry table. Defaults to empty string. */
|
|
1400
1401
|
description?: string | null;
|
|
1401
1402
|
/**
|
|
1402
1403
|
* Prefix of the parent entity type. The trigger resolves this to a membership_type integer
|
|
@@ -1447,6 +1448,16 @@ export interface EntityTypeProvision {
|
|
|
1447
1448
|
* Storage tables get owner_id FK to the entity table, so files are owned by the entity.
|
|
1448
1449
|
*/
|
|
1449
1450
|
hasStorage?: boolean | null;
|
|
1451
|
+
/**
|
|
1452
|
+
* Whether to provision invites_module for this type. Defaults to false.
|
|
1453
|
+
* When true, the trigger inserts a row into invites_module which in turn
|
|
1454
|
+
* (via insert_invites_module BEFORE INSERT) creates {prefix}_invites and
|
|
1455
|
+
* {prefix}_claimed_invites tables plus the submit_{prefix}_invite_code() function.
|
|
1456
|
+
* Symmetric counterpart of has_storage. Re-provisioning is idempotent: the
|
|
1457
|
+
* UNIQUE (database_id, membership_type) constraint on invites_module combined with
|
|
1458
|
+
* ON CONFLICT DO NOTHING in the fan-out makes repeated INSERTs safe.
|
|
1459
|
+
*/
|
|
1460
|
+
hasInvites?: boolean | null;
|
|
1450
1461
|
/**
|
|
1451
1462
|
* Optional jsonb object for storage module configuration and initial bucket seeding.
|
|
1452
1463
|
* Only used when has_storage = true; ignored otherwise. NULL = use defaults.
|
|
@@ -1463,8 +1474,21 @@ export interface EntityTypeProvision {
|
|
|
1463
1474
|
* - allowed_mime_types (text[]) whitelist of MIME types (null = any)
|
|
1464
1475
|
* - max_file_size (bigint) max file size in bytes (null = use scope default)
|
|
1465
1476
|
* - allowed_origins (text[]) per-bucket CORS override
|
|
1477
|
+
* - provisions (jsonb object) optional: customize storage tables
|
|
1478
|
+
* with additional nodes, fields, grants, and policies.
|
|
1479
|
+
* Keyed by table role: "files", "buckets", "upload_requests".
|
|
1480
|
+
* Each value uses the same shape as table_provision:
|
|
1481
|
+
* { nodes, fields, grants, use_rls, policies }. Fanned out
|
|
1482
|
+
* to secure_table_provision targeting the corresponding table.
|
|
1483
|
+
* When a key includes policies[], those REPLACE the default
|
|
1484
|
+
* storage policies for that table; tables without a key still
|
|
1485
|
+
* get defaults. Missing "data" on policy entries is auto-populated
|
|
1486
|
+
* with storage-specific defaults (same as table_provision).
|
|
1487
|
+
* Example: add SearchBm25 for full-text search on files:
|
|
1488
|
+
* {"provisions": {"files": {"nodes": [{"$type":
|
|
1489
|
+
* "SearchBm25", "data": {"source_fields": ["description"]}}]}}}
|
|
1466
1490
|
* Example:
|
|
1467
|
-
* storage_config := '{"buckets": [{"name": "documents", "is_public": false, "allowed_mime_types": ["application/pdf"]}]}'::jsonb
|
|
1491
|
+
* storage_config := '{"buckets": [{"name": "documents", "is_public": false, "allowed_mime_types": ["application/pdf"]}], "provisions": {"files": {"nodes": [{"$type": "SearchBm25", "data": {"source_fields": ["description"]}}]}}}'::jsonb
|
|
1468
1492
|
*/
|
|
1469
1493
|
storageConfig?: Record<string, unknown> | null;
|
|
1470
1494
|
/**
|
|
@@ -1515,7 +1539,7 @@ export interface EntityTypeProvision {
|
|
|
1515
1539
|
tableProvision?: Record<string, unknown> | null;
|
|
1516
1540
|
/**
|
|
1517
1541
|
* Output: the auto-assigned integer membership type ID. Populated by the trigger after successful provisioning.
|
|
1518
|
-
* This is the ID used in
|
|
1542
|
+
* This is the ID used in entity_types, memberships_module, and all module tables.
|
|
1519
1543
|
*/
|
|
1520
1544
|
outMembershipType?: number | null;
|
|
1521
1545
|
/**
|
|
@@ -1536,6 +1560,12 @@ export interface EntityTypeProvision {
|
|
|
1536
1560
|
outBucketsTableId?: string | null;
|
|
1537
1561
|
/** Output: the UUID of the generated files table (e.g. data_room_files). Populated by the trigger when has_storage=true. */
|
|
1538
1562
|
outFilesTableId?: string | null;
|
|
1563
|
+
/**
|
|
1564
|
+
* Output: the UUID of the invites_module row created for this entity type. Populated by the trigger when has_invites=true.
|
|
1565
|
+
* NULL when has_invites=false, or when re-provisioning hits ON CONFLICT DO NOTHING
|
|
1566
|
+
* (i.e. the invites_module row was created in a previous run).
|
|
1567
|
+
*/
|
|
1568
|
+
outInvitesModuleId?: string | null;
|
|
1539
1569
|
}
|
|
1540
1570
|
/** Config row for the webauthn_credentials_module, which provisions the per-user WebAuthn/passkey credentials table (public key, counter, transports, device type, backup state) mirroring crypto_addresses_module. The sibling webauthn_auth_module holds RP config and the registration/sign-in challenge state. */
|
|
1541
1571
|
export interface WebauthnCredentialsModule {
|
|
@@ -5313,6 +5343,7 @@ export type StorageModuleSelect = {
|
|
|
5313
5343
|
uploadRequestsTableName?: boolean;
|
|
5314
5344
|
membershipType?: boolean;
|
|
5315
5345
|
policies?: boolean;
|
|
5346
|
+
skipDefaultPolicyTables?: boolean;
|
|
5316
5347
|
entityTableId?: boolean;
|
|
5317
5348
|
endpoint?: boolean;
|
|
5318
5349
|
publicUrlPrefix?: boolean;
|
|
@@ -5358,6 +5389,7 @@ export type EntityTypeProvisionSelect = {
|
|
|
5358
5389
|
hasProfiles?: boolean;
|
|
5359
5390
|
hasLevels?: boolean;
|
|
5360
5391
|
hasStorage?: boolean;
|
|
5392
|
+
hasInvites?: boolean;
|
|
5361
5393
|
storageConfig?: boolean;
|
|
5362
5394
|
skipEntityPolicies?: boolean;
|
|
5363
5395
|
tableProvision?: boolean;
|
|
@@ -5368,6 +5400,7 @@ export type EntityTypeProvisionSelect = {
|
|
|
5368
5400
|
outStorageModuleId?: boolean;
|
|
5369
5401
|
outBucketsTableId?: boolean;
|
|
5370
5402
|
outFilesTableId?: boolean;
|
|
5403
|
+
outInvitesModuleId?: boolean;
|
|
5371
5404
|
database?: {
|
|
5372
5405
|
select: DatabaseSelect;
|
|
5373
5406
|
};
|
|
@@ -9413,7 +9446,9 @@ export interface StorageModuleFilter {
|
|
|
9413
9446
|
/** Filter by the object’s `membershipType` field. */
|
|
9414
9447
|
membershipType?: IntFilter;
|
|
9415
9448
|
/** Filter by the object’s `policies` field. */
|
|
9416
|
-
policies?:
|
|
9449
|
+
policies?: JSONFilter;
|
|
9450
|
+
/** Filter by the object’s `skipDefaultPolicyTables` field. */
|
|
9451
|
+
skipDefaultPolicyTables?: StringListFilter;
|
|
9417
9452
|
/** Filter by the object’s `entityTableId` field. */
|
|
9418
9453
|
entityTableId?: UUIDFilter;
|
|
9419
9454
|
/** Filter by the object’s `endpoint` field. */
|
|
@@ -9482,6 +9517,8 @@ export interface EntityTypeProvisionFilter {
|
|
|
9482
9517
|
hasLevels?: BooleanFilter;
|
|
9483
9518
|
/** Filter by the object’s `hasStorage` field. */
|
|
9484
9519
|
hasStorage?: BooleanFilter;
|
|
9520
|
+
/** Filter by the object’s `hasInvites` field. */
|
|
9521
|
+
hasInvites?: BooleanFilter;
|
|
9485
9522
|
/** Filter by the object’s `storageConfig` field. */
|
|
9486
9523
|
storageConfig?: JSONFilter;
|
|
9487
9524
|
/** Filter by the object’s `skipEntityPolicies` field. */
|
|
@@ -9502,6 +9539,8 @@ export interface EntityTypeProvisionFilter {
|
|
|
9502
9539
|
outBucketsTableId?: UUIDFilter;
|
|
9503
9540
|
/** Filter by the object’s `outFilesTableId` field. */
|
|
9504
9541
|
outFilesTableId?: UUIDFilter;
|
|
9542
|
+
/** Filter by the object’s `outInvitesModuleId` field. */
|
|
9543
|
+
outInvitesModuleId?: UUIDFilter;
|
|
9505
9544
|
/** Checks for all expressions in this list. */
|
|
9506
9545
|
and?: EntityTypeProvisionFilter[];
|
|
9507
9546
|
/** Checks for any expressions in this list. */
|
|
@@ -11336,8 +11375,8 @@ export type UsersModuleOrderBy = 'NATURAL' | 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DE
|
|
|
11336
11375
|
export type BlueprintOrderBy = 'NATURAL' | 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' | 'ID_ASC' | 'ID_DESC' | 'OWNER_ID_ASC' | 'OWNER_ID_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' | 'NAME_ASC' | 'NAME_DESC' | 'DISPLAY_NAME_ASC' | 'DISPLAY_NAME_DESC' | 'DESCRIPTION_ASC' | 'DESCRIPTION_DESC' | 'DEFINITION_ASC' | 'DEFINITION_DESC' | 'TEMPLATE_ID_ASC' | 'TEMPLATE_ID_DESC' | 'DEFINITION_HASH_ASC' | 'DEFINITION_HASH_DESC' | 'TABLE_HASHES_ASC' | 'TABLE_HASHES_DESC' | 'CREATED_AT_ASC' | 'CREATED_AT_DESC' | 'UPDATED_AT_ASC' | 'UPDATED_AT_DESC';
|
|
11337
11376
|
export type BlueprintTemplateOrderBy = 'NATURAL' | 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' | 'ID_ASC' | 'ID_DESC' | 'NAME_ASC' | 'NAME_DESC' | 'VERSION_ASC' | 'VERSION_DESC' | 'DISPLAY_NAME_ASC' | 'DISPLAY_NAME_DESC' | 'DESCRIPTION_ASC' | 'DESCRIPTION_DESC' | 'OWNER_ID_ASC' | 'OWNER_ID_DESC' | 'VISIBILITY_ASC' | 'VISIBILITY_DESC' | 'CATEGORIES_ASC' | 'CATEGORIES_DESC' | 'TAGS_ASC' | 'TAGS_DESC' | 'DEFINITION_ASC' | 'DEFINITION_DESC' | 'DEFINITION_SCHEMA_VERSION_ASC' | 'DEFINITION_SCHEMA_VERSION_DESC' | 'SOURCE_ASC' | 'SOURCE_DESC' | 'COMPLEXITY_ASC' | 'COMPLEXITY_DESC' | 'COPY_COUNT_ASC' | 'COPY_COUNT_DESC' | 'FORK_COUNT_ASC' | 'FORK_COUNT_DESC' | 'FORKED_FROM_ID_ASC' | 'FORKED_FROM_ID_DESC' | 'DEFINITION_HASH_ASC' | 'DEFINITION_HASH_DESC' | 'TABLE_HASHES_ASC' | 'TABLE_HASHES_DESC' | 'CREATED_AT_ASC' | 'CREATED_AT_DESC' | 'UPDATED_AT_ASC' | 'UPDATED_AT_DESC';
|
|
11338
11377
|
export type BlueprintConstructionOrderBy = 'NATURAL' | 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' | 'ID_ASC' | 'ID_DESC' | 'BLUEPRINT_ID_ASC' | 'BLUEPRINT_ID_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' | 'SCHEMA_ID_ASC' | 'SCHEMA_ID_DESC' | 'STATUS_ASC' | 'STATUS_DESC' | 'ERROR_DETAILS_ASC' | 'ERROR_DETAILS_DESC' | 'TABLE_MAP_ASC' | 'TABLE_MAP_DESC' | 'CONSTRUCTED_DEFINITION_ASC' | 'CONSTRUCTED_DEFINITION_DESC' | 'CONSTRUCTED_AT_ASC' | 'CONSTRUCTED_AT_DESC' | 'CREATED_AT_ASC' | 'CREATED_AT_DESC' | 'UPDATED_AT_ASC' | 'UPDATED_AT_DESC';
|
|
11339
|
-
export type StorageModuleOrderBy = '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' | 'BUCKETS_TABLE_ID_ASC' | 'BUCKETS_TABLE_ID_DESC' | 'FILES_TABLE_ID_ASC' | 'FILES_TABLE_ID_DESC' | 'UPLOAD_REQUESTS_TABLE_ID_ASC' | 'UPLOAD_REQUESTS_TABLE_ID_DESC' | 'BUCKETS_TABLE_NAME_ASC' | 'BUCKETS_TABLE_NAME_DESC' | 'FILES_TABLE_NAME_ASC' | 'FILES_TABLE_NAME_DESC' | 'UPLOAD_REQUESTS_TABLE_NAME_ASC' | 'UPLOAD_REQUESTS_TABLE_NAME_DESC' | 'MEMBERSHIP_TYPE_ASC' | 'MEMBERSHIP_TYPE_DESC' | 'POLICIES_ASC' | 'POLICIES_DESC' | 'ENTITY_TABLE_ID_ASC' | 'ENTITY_TABLE_ID_DESC' | 'ENDPOINT_ASC' | 'ENDPOINT_DESC' | 'PUBLIC_URL_PREFIX_ASC' | 'PUBLIC_URL_PREFIX_DESC' | 'PROVIDER_ASC' | 'PROVIDER_DESC' | 'ALLOWED_ORIGINS_ASC' | 'ALLOWED_ORIGINS_DESC' | 'UPLOAD_URL_EXPIRY_SECONDS_ASC' | 'UPLOAD_URL_EXPIRY_SECONDS_DESC' | 'DOWNLOAD_URL_EXPIRY_SECONDS_ASC' | 'DOWNLOAD_URL_EXPIRY_SECONDS_DESC' | 'DEFAULT_MAX_FILE_SIZE_ASC' | 'DEFAULT_MAX_FILE_SIZE_DESC' | 'MAX_FILENAME_LENGTH_ASC' | 'MAX_FILENAME_LENGTH_DESC' | 'CACHE_TTL_SECONDS_ASC' | 'CACHE_TTL_SECONDS_DESC';
|
|
11340
|
-
export type EntityTypeProvisionOrderBy = 'NATURAL' | 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' | 'ID_ASC' | 'ID_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' | 'NAME_ASC' | 'NAME_DESC' | 'PREFIX_ASC' | 'PREFIX_DESC' | 'DESCRIPTION_ASC' | 'DESCRIPTION_DESC' | 'PARENT_ENTITY_ASC' | 'PARENT_ENTITY_DESC' | 'TABLE_NAME_ASC' | 'TABLE_NAME_DESC' | 'IS_VISIBLE_ASC' | 'IS_VISIBLE_DESC' | 'HAS_LIMITS_ASC' | 'HAS_LIMITS_DESC' | 'HAS_PROFILES_ASC' | 'HAS_PROFILES_DESC' | 'HAS_LEVELS_ASC' | 'HAS_LEVELS_DESC' | 'HAS_STORAGE_ASC' | 'HAS_STORAGE_DESC' | 'STORAGE_CONFIG_ASC' | 'STORAGE_CONFIG_DESC' | 'SKIP_ENTITY_POLICIES_ASC' | 'SKIP_ENTITY_POLICIES_DESC' | 'TABLE_PROVISION_ASC' | 'TABLE_PROVISION_DESC' | 'OUT_MEMBERSHIP_TYPE_ASC' | 'OUT_MEMBERSHIP_TYPE_DESC' | 'OUT_ENTITY_TABLE_ID_ASC' | 'OUT_ENTITY_TABLE_ID_DESC' | 'OUT_ENTITY_TABLE_NAME_ASC' | 'OUT_ENTITY_TABLE_NAME_DESC' | 'OUT_INSTALLED_MODULES_ASC' | 'OUT_INSTALLED_MODULES_DESC' | 'OUT_STORAGE_MODULE_ID_ASC' | 'OUT_STORAGE_MODULE_ID_DESC' | 'OUT_BUCKETS_TABLE_ID_ASC' | 'OUT_BUCKETS_TABLE_ID_DESC' | 'OUT_FILES_TABLE_ID_ASC' | 'OUT_FILES_TABLE_ID_DESC';
|
|
11378
|
+
export type StorageModuleOrderBy = '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' | 'BUCKETS_TABLE_ID_ASC' | 'BUCKETS_TABLE_ID_DESC' | 'FILES_TABLE_ID_ASC' | 'FILES_TABLE_ID_DESC' | 'UPLOAD_REQUESTS_TABLE_ID_ASC' | 'UPLOAD_REQUESTS_TABLE_ID_DESC' | 'BUCKETS_TABLE_NAME_ASC' | 'BUCKETS_TABLE_NAME_DESC' | 'FILES_TABLE_NAME_ASC' | 'FILES_TABLE_NAME_DESC' | 'UPLOAD_REQUESTS_TABLE_NAME_ASC' | 'UPLOAD_REQUESTS_TABLE_NAME_DESC' | 'MEMBERSHIP_TYPE_ASC' | 'MEMBERSHIP_TYPE_DESC' | 'POLICIES_ASC' | 'POLICIES_DESC' | 'SKIP_DEFAULT_POLICY_TABLES_ASC' | 'SKIP_DEFAULT_POLICY_TABLES_DESC' | 'ENTITY_TABLE_ID_ASC' | 'ENTITY_TABLE_ID_DESC' | 'ENDPOINT_ASC' | 'ENDPOINT_DESC' | 'PUBLIC_URL_PREFIX_ASC' | 'PUBLIC_URL_PREFIX_DESC' | 'PROVIDER_ASC' | 'PROVIDER_DESC' | 'ALLOWED_ORIGINS_ASC' | 'ALLOWED_ORIGINS_DESC' | 'UPLOAD_URL_EXPIRY_SECONDS_ASC' | 'UPLOAD_URL_EXPIRY_SECONDS_DESC' | 'DOWNLOAD_URL_EXPIRY_SECONDS_ASC' | 'DOWNLOAD_URL_EXPIRY_SECONDS_DESC' | 'DEFAULT_MAX_FILE_SIZE_ASC' | 'DEFAULT_MAX_FILE_SIZE_DESC' | 'MAX_FILENAME_LENGTH_ASC' | 'MAX_FILENAME_LENGTH_DESC' | 'CACHE_TTL_SECONDS_ASC' | 'CACHE_TTL_SECONDS_DESC';
|
|
11379
|
+
export type EntityTypeProvisionOrderBy = 'NATURAL' | 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' | 'ID_ASC' | 'ID_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' | 'NAME_ASC' | 'NAME_DESC' | 'PREFIX_ASC' | 'PREFIX_DESC' | 'DESCRIPTION_ASC' | 'DESCRIPTION_DESC' | 'PARENT_ENTITY_ASC' | 'PARENT_ENTITY_DESC' | 'TABLE_NAME_ASC' | 'TABLE_NAME_DESC' | 'IS_VISIBLE_ASC' | 'IS_VISIBLE_DESC' | 'HAS_LIMITS_ASC' | 'HAS_LIMITS_DESC' | 'HAS_PROFILES_ASC' | 'HAS_PROFILES_DESC' | 'HAS_LEVELS_ASC' | 'HAS_LEVELS_DESC' | 'HAS_STORAGE_ASC' | 'HAS_STORAGE_DESC' | 'HAS_INVITES_ASC' | 'HAS_INVITES_DESC' | 'STORAGE_CONFIG_ASC' | 'STORAGE_CONFIG_DESC' | 'SKIP_ENTITY_POLICIES_ASC' | 'SKIP_ENTITY_POLICIES_DESC' | 'TABLE_PROVISION_ASC' | 'TABLE_PROVISION_DESC' | 'OUT_MEMBERSHIP_TYPE_ASC' | 'OUT_MEMBERSHIP_TYPE_DESC' | 'OUT_ENTITY_TABLE_ID_ASC' | 'OUT_ENTITY_TABLE_ID_DESC' | 'OUT_ENTITY_TABLE_NAME_ASC' | 'OUT_ENTITY_TABLE_NAME_DESC' | 'OUT_INSTALLED_MODULES_ASC' | 'OUT_INSTALLED_MODULES_DESC' | 'OUT_STORAGE_MODULE_ID_ASC' | 'OUT_STORAGE_MODULE_ID_DESC' | 'OUT_BUCKETS_TABLE_ID_ASC' | 'OUT_BUCKETS_TABLE_ID_DESC' | 'OUT_FILES_TABLE_ID_ASC' | 'OUT_FILES_TABLE_ID_DESC' | 'OUT_INVITES_MODULE_ID_ASC' | 'OUT_INVITES_MODULE_ID_DESC';
|
|
11341
11380
|
export type WebauthnCredentialsModuleOrderBy = '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';
|
|
11342
11381
|
export type WebauthnAuthModuleOrderBy = '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' | 'CREDENTIALS_TABLE_ID_ASC' | 'CREDENTIALS_TABLE_ID_DESC' | 'SESSIONS_TABLE_ID_ASC' | 'SESSIONS_TABLE_ID_DESC' | 'SESSION_CREDENTIALS_TABLE_ID_ASC' | 'SESSION_CREDENTIALS_TABLE_ID_DESC' | 'SESSION_SECRETS_TABLE_ID_ASC' | 'SESSION_SECRETS_TABLE_ID_DESC' | 'AUTH_SETTINGS_TABLE_ID_ASC' | 'AUTH_SETTINGS_TABLE_ID_DESC' | 'RP_ID_ASC' | 'RP_ID_DESC' | 'RP_NAME_ASC' | 'RP_NAME_DESC' | 'ORIGIN_ALLOWLIST_ASC' | 'ORIGIN_ALLOWLIST_DESC' | 'ATTESTATION_TYPE_ASC' | 'ATTESTATION_TYPE_DESC' | 'REQUIRE_USER_VERIFICATION_ASC' | 'REQUIRE_USER_VERIFICATION_DESC' | 'RESIDENT_KEY_ASC' | 'RESIDENT_KEY_DESC' | 'CHALLENGE_EXPIRY_ASC' | 'CHALLENGE_EXPIRY_DESC';
|
|
11343
11382
|
export type NotificationsModuleOrderBy = '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' | 'NOTIFICATIONS_TABLE_ID_ASC' | 'NOTIFICATIONS_TABLE_ID_DESC' | 'READ_STATE_TABLE_ID_ASC' | 'READ_STATE_TABLE_ID_DESC' | 'PREFERENCES_TABLE_ID_ASC' | 'PREFERENCES_TABLE_ID_DESC' | 'CHANNELS_TABLE_ID_ASC' | 'CHANNELS_TABLE_ID_DESC' | 'DELIVERY_LOG_TABLE_ID_ASC' | 'DELIVERY_LOG_TABLE_ID_DESC' | 'OWNER_TABLE_ID_ASC' | 'OWNER_TABLE_ID_DESC' | 'USER_SETTINGS_TABLE_ID_ASC' | 'USER_SETTINGS_TABLE_ID_DESC' | 'ORGANIZATION_SETTINGS_TABLE_ID_ASC' | 'ORGANIZATION_SETTINGS_TABLE_ID_DESC' | 'HAS_CHANNELS_ASC' | 'HAS_CHANNELS_DESC' | 'HAS_PREFERENCES_ASC' | 'HAS_PREFERENCES_DESC' | 'HAS_SETTINGS_EXTENSION_ASC' | 'HAS_SETTINGS_EXTENSION_DESC' | 'HAS_DIGEST_METADATA_ASC' | 'HAS_DIGEST_METADATA_DESC' | 'HAS_SUBSCRIPTIONS_ASC' | 'HAS_SUBSCRIPTIONS_DESC';
|
|
@@ -13691,7 +13730,8 @@ export interface CreateStorageModuleInput {
|
|
|
13691
13730
|
filesTableName?: string;
|
|
13692
13731
|
uploadRequestsTableName?: string;
|
|
13693
13732
|
membershipType?: number;
|
|
13694
|
-
policies?: string
|
|
13733
|
+
policies?: Record<string, unknown>;
|
|
13734
|
+
skipDefaultPolicyTables?: string[];
|
|
13695
13735
|
entityTableId?: string;
|
|
13696
13736
|
endpoint?: string;
|
|
13697
13737
|
publicUrlPrefix?: string;
|
|
@@ -13715,7 +13755,8 @@ export interface StorageModulePatch {
|
|
|
13715
13755
|
filesTableName?: string | null;
|
|
13716
13756
|
uploadRequestsTableName?: string | null;
|
|
13717
13757
|
membershipType?: number | null;
|
|
13718
|
-
policies?: string
|
|
13758
|
+
policies?: Record<string, unknown> | null;
|
|
13759
|
+
skipDefaultPolicyTables?: string[] | null;
|
|
13719
13760
|
entityTableId?: string | null;
|
|
13720
13761
|
endpoint?: string | null;
|
|
13721
13762
|
publicUrlPrefix?: string | null;
|
|
@@ -13750,6 +13791,7 @@ export interface CreateEntityTypeProvisionInput {
|
|
|
13750
13791
|
hasProfiles?: boolean;
|
|
13751
13792
|
hasLevels?: boolean;
|
|
13752
13793
|
hasStorage?: boolean;
|
|
13794
|
+
hasInvites?: boolean;
|
|
13753
13795
|
storageConfig?: Record<string, unknown>;
|
|
13754
13796
|
skipEntityPolicies?: boolean;
|
|
13755
13797
|
tableProvision?: Record<string, unknown>;
|
|
@@ -13760,6 +13802,7 @@ export interface CreateEntityTypeProvisionInput {
|
|
|
13760
13802
|
outStorageModuleId?: string;
|
|
13761
13803
|
outBucketsTableId?: string;
|
|
13762
13804
|
outFilesTableId?: string;
|
|
13805
|
+
outInvitesModuleId?: string;
|
|
13763
13806
|
};
|
|
13764
13807
|
}
|
|
13765
13808
|
export interface EntityTypeProvisionPatch {
|
|
@@ -13774,6 +13817,7 @@ export interface EntityTypeProvisionPatch {
|
|
|
13774
13817
|
hasProfiles?: boolean | null;
|
|
13775
13818
|
hasLevels?: boolean | null;
|
|
13776
13819
|
hasStorage?: boolean | null;
|
|
13820
|
+
hasInvites?: boolean | null;
|
|
13777
13821
|
storageConfig?: Record<string, unknown> | null;
|
|
13778
13822
|
skipEntityPolicies?: boolean | null;
|
|
13779
13823
|
tableProvision?: Record<string, unknown> | null;
|
|
@@ -13784,6 +13828,7 @@ export interface EntityTypeProvisionPatch {
|
|
|
13784
13828
|
outStorageModuleId?: string | null;
|
|
13785
13829
|
outBucketsTableId?: string | null;
|
|
13786
13830
|
outFilesTableId?: string | null;
|
|
13831
|
+
outInvitesModuleId?: string | null;
|
|
13787
13832
|
}
|
|
13788
13833
|
export interface UpdateEntityTypeProvisionInput {
|
|
13789
13834
|
clientMutationId?: string;
|
|
@@ -15579,6 +15624,7 @@ export interface ProvisionTableInput {
|
|
|
15579
15624
|
indexes?: Record<string, unknown>;
|
|
15580
15625
|
fullTextSearches?: Record<string, unknown>;
|
|
15581
15626
|
uniqueConstraints?: Record<string, unknown>;
|
|
15627
|
+
description?: string;
|
|
15582
15628
|
}
|
|
15583
15629
|
export interface SendVerificationEmailInput {
|
|
15584
15630
|
clientMutationId?: string;
|
|
@@ -19850,7 +19896,9 @@ export interface StorageModuleFilter {
|
|
|
19850
19896
|
/** Filter by the object’s `membershipType` field. */
|
|
19851
19897
|
membershipType?: IntFilter;
|
|
19852
19898
|
/** Filter by the object’s `policies` field. */
|
|
19853
|
-
policies?:
|
|
19899
|
+
policies?: JSONFilter;
|
|
19900
|
+
/** Filter by the object’s `skipDefaultPolicyTables` field. */
|
|
19901
|
+
skipDefaultPolicyTables?: StringListFilter;
|
|
19854
19902
|
/** Filter by the object’s `entityTableId` field. */
|
|
19855
19903
|
entityTableId?: UUIDFilter;
|
|
19856
19904
|
/** Filter by the object’s `endpoint` field. */
|
|
@@ -19920,6 +19968,8 @@ export interface EntityTypeProvisionFilter {
|
|
|
19920
19968
|
hasLevels?: BooleanFilter;
|
|
19921
19969
|
/** Filter by the object’s `hasStorage` field. */
|
|
19922
19970
|
hasStorage?: BooleanFilter;
|
|
19971
|
+
/** Filter by the object’s `hasInvites` field. */
|
|
19972
|
+
hasInvites?: BooleanFilter;
|
|
19923
19973
|
/** Filter by the object’s `storageConfig` field. */
|
|
19924
19974
|
storageConfig?: JSONFilter;
|
|
19925
19975
|
/** Filter by the object’s `skipEntityPolicies` field. */
|
|
@@ -19940,6 +19990,8 @@ export interface EntityTypeProvisionFilter {
|
|
|
19940
19990
|
outBucketsTableId?: UUIDFilter;
|
|
19941
19991
|
/** Filter by the object’s `outFilesTableId` field. */
|
|
19942
19992
|
outFilesTableId?: UUIDFilter;
|
|
19993
|
+
/** Filter by the object’s `outInvitesModuleId` field. */
|
|
19994
|
+
outInvitesModuleId?: UUIDFilter;
|
|
19943
19995
|
/** Checks for all expressions in this list. */
|
|
19944
19996
|
and?: EntityTypeProvisionFilter[];
|
|
19945
19997
|
/** Checks for any expressions in this list. */
|
|
@@ -22798,6 +22850,8 @@ export interface RequestUploadUrlPayload {
|
|
|
22798
22850
|
deduplicated: boolean;
|
|
22799
22851
|
/** Presigned URL expiry time (null if deduplicated) */
|
|
22800
22852
|
expiresAt?: string | null;
|
|
22853
|
+
/** File status — 'pending' for fresh uploads, 'ready' or 'processed' for deduplicated files. Clients can use this to know immediately whether the file is usable. */
|
|
22854
|
+
status: string;
|
|
22801
22855
|
}
|
|
22802
22856
|
export type RequestUploadUrlPayloadSelect = {
|
|
22803
22857
|
uploadUrl?: boolean;
|
|
@@ -22805,6 +22859,7 @@ export type RequestUploadUrlPayloadSelect = {
|
|
|
22805
22859
|
key?: boolean;
|
|
22806
22860
|
deduplicated?: boolean;
|
|
22807
22861
|
expiresAt?: boolean;
|
|
22862
|
+
status?: boolean;
|
|
22808
22863
|
};
|
|
22809
22864
|
export interface ConfirmUploadPayload {
|
|
22810
22865
|
/** The confirmed file ID */
|
package/objects/orm/client.js
CHANGED
|
@@ -36,9 +36,7 @@ class FetchAdapter {
|
|
|
36
36
|
return {
|
|
37
37
|
ok: false,
|
|
38
38
|
data: null,
|
|
39
|
-
errors: [
|
|
40
|
-
{ message: `HTTP ${response.status}: ${response.statusText}` },
|
|
41
|
-
],
|
|
39
|
+
errors: [{ message: `HTTP ${response.status}: ${response.statusText}` }],
|
|
42
40
|
};
|
|
43
41
|
}
|
|
44
42
|
const json = (await response.json());
|
|
@@ -751,6 +751,8 @@ export interface RequestUploadUrlPayload {
|
|
|
751
751
|
deduplicated: boolean;
|
|
752
752
|
/** Presigned URL expiry time (null if deduplicated) */
|
|
753
753
|
expiresAt?: string | null;
|
|
754
|
+
/** File status — 'pending' for fresh uploads, 'ready' or 'processed' for deduplicated files. Clients can use this to know immediately whether the file is usable. */
|
|
755
|
+
status: string;
|
|
754
756
|
}
|
|
755
757
|
export type RequestUploadUrlPayloadSelect = {
|
|
756
758
|
uploadUrl?: boolean;
|
|
@@ -758,6 +760,7 @@ export type RequestUploadUrlPayloadSelect = {
|
|
|
758
760
|
key?: boolean;
|
|
759
761
|
deduplicated?: boolean;
|
|
760
762
|
expiresAt?: boolean;
|
|
763
|
+
status?: boolean;
|
|
761
764
|
};
|
|
762
765
|
export interface ConfirmUploadPayload {
|
|
763
766
|
/** The confirmed file ID */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@constructive-sdk/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.16.1",
|
|
4
4
|
"author": "Constructive <developers@constructive.io>",
|
|
5
5
|
"description": "Constructive CLI SDK - Auto-generated GraphQL CLI with ORM client, context management, and interactive prompts",
|
|
6
6
|
"main": "index.js",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
],
|
|
47
47
|
"dependencies": {
|
|
48
48
|
"@0no-co/graphql.web": "^1.1.2",
|
|
49
|
-
"@constructive-io/graphql-query": "^3.
|
|
49
|
+
"@constructive-io/graphql-query": "^3.16.0",
|
|
50
50
|
"@constructive-io/graphql-types": "^3.5.1",
|
|
51
51
|
"appstash": "^0.7.0",
|
|
52
52
|
"gql-ast": "^3.5.0",
|
|
@@ -56,11 +56,11 @@
|
|
|
56
56
|
"yanse": "^0.2.1"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
|
-
"@constructive-io/graphql-codegen": "^4.
|
|
59
|
+
"@constructive-io/graphql-codegen": "^4.33.0",
|
|
60
60
|
"@types/node": "^22.19.11",
|
|
61
61
|
"makage": "^0.3.0",
|
|
62
62
|
"tsx": "^4.19.0",
|
|
63
63
|
"typescript": "^5.9.3"
|
|
64
64
|
},
|
|
65
|
-
"gitHead": "
|
|
65
|
+
"gitHead": "39934959226c77d2fb4f32bdbae32bda59b2abd8"
|
|
66
66
|
}
|
|
@@ -21,6 +21,7 @@ const fieldSchema = {
|
|
|
21
21
|
hasProfiles: 'boolean',
|
|
22
22
|
hasLevels: 'boolean',
|
|
23
23
|
hasStorage: 'boolean',
|
|
24
|
+
hasInvites: 'boolean',
|
|
24
25
|
storageConfig: 'json',
|
|
25
26
|
skipEntityPolicies: 'boolean',
|
|
26
27
|
tableProvision: 'json',
|
|
@@ -31,6 +32,7 @@ const fieldSchema = {
|
|
|
31
32
|
outStorageModuleId: 'uuid',
|
|
32
33
|
outBucketsTableId: 'uuid',
|
|
33
34
|
outFilesTableId: 'uuid',
|
|
35
|
+
outInvitesModuleId: 'uuid',
|
|
34
36
|
};
|
|
35
37
|
const usage = '\nentity-type-provision <command>\n\nCommands:\n list List entityTypeProvision records\n find-first Find first matching entityTypeProvision record\n get Get a entityTypeProvision by ID\n create Create a new entityTypeProvision\n update Update an existing entityTypeProvision\n delete Delete a entityTypeProvision\n\nList Options:\n --limit <n> Max number of records to return (forward pagination)\n --last <n> Number of records from the end (backward pagination)\n --after <cursor> Cursor for forward pagination\n --before <cursor> Cursor for backward pagination\n --offset <n> Number of records to skip\n --select <fields> Comma-separated list of fields to return\n --where.<field>.<op> Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.<f>.<op> Condition filter (dot-notation)\n --orderBy <values> Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select <fields> Comma-separated list of fields to return\n --where.<field>.<op> Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.<f>.<op> Condition filter (dot-notation)\n\n --help, -h Show this help message\n';
|
|
36
38
|
exports.default = async (argv, prompter, _options) => {
|
|
@@ -86,6 +88,7 @@ async function handleList(argv, _prompter) {
|
|
|
86
88
|
hasProfiles: true,
|
|
87
89
|
hasLevels: true,
|
|
88
90
|
hasStorage: true,
|
|
91
|
+
hasInvites: true,
|
|
89
92
|
storageConfig: true,
|
|
90
93
|
skipEntityPolicies: true,
|
|
91
94
|
tableProvision: true,
|
|
@@ -96,6 +99,7 @@ async function handleList(argv, _prompter) {
|
|
|
96
99
|
outStorageModuleId: true,
|
|
97
100
|
outBucketsTableId: true,
|
|
98
101
|
outFilesTableId: true,
|
|
102
|
+
outInvitesModuleId: true,
|
|
99
103
|
};
|
|
100
104
|
const findManyArgs = (0, utils_1.parseFindManyArgs)(argv, defaultSelect);
|
|
101
105
|
const client = (0, executor_1.getClient)();
|
|
@@ -125,6 +129,7 @@ async function handleFindFirst(argv, _prompter) {
|
|
|
125
129
|
hasProfiles: true,
|
|
126
130
|
hasLevels: true,
|
|
127
131
|
hasStorage: true,
|
|
132
|
+
hasInvites: true,
|
|
128
133
|
storageConfig: true,
|
|
129
134
|
skipEntityPolicies: true,
|
|
130
135
|
tableProvision: true,
|
|
@@ -135,6 +140,7 @@ async function handleFindFirst(argv, _prompter) {
|
|
|
135
140
|
outStorageModuleId: true,
|
|
136
141
|
outBucketsTableId: true,
|
|
137
142
|
outFilesTableId: true,
|
|
143
|
+
outInvitesModuleId: true,
|
|
138
144
|
};
|
|
139
145
|
const findFirstArgs = (0, utils_1.parseFindFirstArgs)(argv, defaultSelect);
|
|
140
146
|
const client = (0, executor_1.getClient)();
|
|
@@ -176,6 +182,7 @@ async function handleGet(argv, prompter) {
|
|
|
176
182
|
hasProfiles: true,
|
|
177
183
|
hasLevels: true,
|
|
178
184
|
hasStorage: true,
|
|
185
|
+
hasInvites: true,
|
|
179
186
|
storageConfig: true,
|
|
180
187
|
skipEntityPolicies: true,
|
|
181
188
|
tableProvision: true,
|
|
@@ -186,6 +193,7 @@ async function handleGet(argv, prompter) {
|
|
|
186
193
|
outStorageModuleId: true,
|
|
187
194
|
outBucketsTableId: true,
|
|
188
195
|
outFilesTableId: true,
|
|
196
|
+
outInvitesModuleId: true,
|
|
189
197
|
},
|
|
190
198
|
})
|
|
191
199
|
.execute();
|
|
@@ -276,6 +284,13 @@ async function handleCreate(argv, prompter) {
|
|
|
276
284
|
required: false,
|
|
277
285
|
skipPrompt: true,
|
|
278
286
|
},
|
|
287
|
+
{
|
|
288
|
+
type: 'boolean',
|
|
289
|
+
name: 'hasInvites',
|
|
290
|
+
message: 'hasInvites',
|
|
291
|
+
required: false,
|
|
292
|
+
skipPrompt: true,
|
|
293
|
+
},
|
|
279
294
|
{
|
|
280
295
|
type: 'json',
|
|
281
296
|
name: 'storageConfig',
|
|
@@ -346,6 +361,13 @@ async function handleCreate(argv, prompter) {
|
|
|
346
361
|
required: false,
|
|
347
362
|
skipPrompt: true,
|
|
348
363
|
},
|
|
364
|
+
{
|
|
365
|
+
type: 'text',
|
|
366
|
+
name: 'outInvitesModuleId',
|
|
367
|
+
message: 'outInvitesModuleId',
|
|
368
|
+
required: false,
|
|
369
|
+
skipPrompt: true,
|
|
370
|
+
},
|
|
349
371
|
]);
|
|
350
372
|
const answers = (0, utils_1.coerceAnswers)(rawAnswers, fieldSchema);
|
|
351
373
|
const cleanedData = (0, utils_1.stripUndefined)(answers, fieldSchema);
|
|
@@ -364,6 +386,7 @@ async function handleCreate(argv, prompter) {
|
|
|
364
386
|
hasProfiles: cleanedData.hasProfiles,
|
|
365
387
|
hasLevels: cleanedData.hasLevels,
|
|
366
388
|
hasStorage: cleanedData.hasStorage,
|
|
389
|
+
hasInvites: cleanedData.hasInvites,
|
|
367
390
|
storageConfig: cleanedData.storageConfig,
|
|
368
391
|
skipEntityPolicies: cleanedData.skipEntityPolicies,
|
|
369
392
|
tableProvision: cleanedData.tableProvision,
|
|
@@ -374,6 +397,7 @@ async function handleCreate(argv, prompter) {
|
|
|
374
397
|
outStorageModuleId: cleanedData.outStorageModuleId,
|
|
375
398
|
outBucketsTableId: cleanedData.outBucketsTableId,
|
|
376
399
|
outFilesTableId: cleanedData.outFilesTableId,
|
|
400
|
+
outInvitesModuleId: cleanedData.outInvitesModuleId,
|
|
377
401
|
},
|
|
378
402
|
select: {
|
|
379
403
|
id: true,
|
|
@@ -388,6 +412,7 @@ async function handleCreate(argv, prompter) {
|
|
|
388
412
|
hasProfiles: true,
|
|
389
413
|
hasLevels: true,
|
|
390
414
|
hasStorage: true,
|
|
415
|
+
hasInvites: true,
|
|
391
416
|
storageConfig: true,
|
|
392
417
|
skipEntityPolicies: true,
|
|
393
418
|
tableProvision: true,
|
|
@@ -398,6 +423,7 @@ async function handleCreate(argv, prompter) {
|
|
|
398
423
|
outStorageModuleId: true,
|
|
399
424
|
outBucketsTableId: true,
|
|
400
425
|
outFilesTableId: true,
|
|
426
|
+
outInvitesModuleId: true,
|
|
401
427
|
},
|
|
402
428
|
})
|
|
403
429
|
.execute();
|
|
@@ -494,6 +520,13 @@ async function handleUpdate(argv, prompter) {
|
|
|
494
520
|
required: false,
|
|
495
521
|
skipPrompt: true,
|
|
496
522
|
},
|
|
523
|
+
{
|
|
524
|
+
type: 'boolean',
|
|
525
|
+
name: 'hasInvites',
|
|
526
|
+
message: 'hasInvites',
|
|
527
|
+
required: false,
|
|
528
|
+
skipPrompt: true,
|
|
529
|
+
},
|
|
497
530
|
{
|
|
498
531
|
type: 'json',
|
|
499
532
|
name: 'storageConfig',
|
|
@@ -564,6 +597,13 @@ async function handleUpdate(argv, prompter) {
|
|
|
564
597
|
required: false,
|
|
565
598
|
skipPrompt: true,
|
|
566
599
|
},
|
|
600
|
+
{
|
|
601
|
+
type: 'text',
|
|
602
|
+
name: 'outInvitesModuleId',
|
|
603
|
+
message: 'outInvitesModuleId',
|
|
604
|
+
required: false,
|
|
605
|
+
skipPrompt: true,
|
|
606
|
+
},
|
|
567
607
|
]);
|
|
568
608
|
const answers = (0, utils_1.coerceAnswers)(rawAnswers, fieldSchema);
|
|
569
609
|
const cleanedData = (0, utils_1.stripUndefined)(answers, fieldSchema);
|
|
@@ -585,6 +625,7 @@ async function handleUpdate(argv, prompter) {
|
|
|
585
625
|
hasProfiles: cleanedData.hasProfiles,
|
|
586
626
|
hasLevels: cleanedData.hasLevels,
|
|
587
627
|
hasStorage: cleanedData.hasStorage,
|
|
628
|
+
hasInvites: cleanedData.hasInvites,
|
|
588
629
|
storageConfig: cleanedData.storageConfig,
|
|
589
630
|
skipEntityPolicies: cleanedData.skipEntityPolicies,
|
|
590
631
|
tableProvision: cleanedData.tableProvision,
|
|
@@ -595,6 +636,7 @@ async function handleUpdate(argv, prompter) {
|
|
|
595
636
|
outStorageModuleId: cleanedData.outStorageModuleId,
|
|
596
637
|
outBucketsTableId: cleanedData.outBucketsTableId,
|
|
597
638
|
outFilesTableId: cleanedData.outFilesTableId,
|
|
639
|
+
outInvitesModuleId: cleanedData.outInvitesModuleId,
|
|
598
640
|
},
|
|
599
641
|
select: {
|
|
600
642
|
id: true,
|
|
@@ -609,6 +651,7 @@ async function handleUpdate(argv, prompter) {
|
|
|
609
651
|
hasProfiles: true,
|
|
610
652
|
hasLevels: true,
|
|
611
653
|
hasStorage: true,
|
|
654
|
+
hasInvites: true,
|
|
612
655
|
storageConfig: true,
|
|
613
656
|
skipEntityPolicies: true,
|
|
614
657
|
tableProvision: true,
|
|
@@ -619,6 +662,7 @@ async function handleUpdate(argv, prompter) {
|
|
|
619
662
|
outStorageModuleId: true,
|
|
620
663
|
outBucketsTableId: true,
|
|
621
664
|
outFilesTableId: true,
|
|
665
|
+
outInvitesModuleId: true,
|
|
622
666
|
},
|
|
623
667
|
})
|
|
624
668
|
.execute();
|
|
@@ -20,7 +20,8 @@ const fieldSchema = {
|
|
|
20
20
|
filesTableName: 'string',
|
|
21
21
|
uploadRequestsTableName: 'string',
|
|
22
22
|
membershipType: 'int',
|
|
23
|
-
policies: '
|
|
23
|
+
policies: 'json',
|
|
24
|
+
skipDefaultPolicyTables: 'string',
|
|
24
25
|
entityTableId: 'uuid',
|
|
25
26
|
endpoint: 'string',
|
|
26
27
|
publicUrlPrefix: 'string',
|
|
@@ -86,6 +87,7 @@ async function handleList(argv, _prompter) {
|
|
|
86
87
|
uploadRequestsTableName: true,
|
|
87
88
|
membershipType: true,
|
|
88
89
|
policies: true,
|
|
90
|
+
skipDefaultPolicyTables: true,
|
|
89
91
|
entityTableId: true,
|
|
90
92
|
endpoint: true,
|
|
91
93
|
publicUrlPrefix: true,
|
|
@@ -125,6 +127,7 @@ async function handleFindFirst(argv, _prompter) {
|
|
|
125
127
|
uploadRequestsTableName: true,
|
|
126
128
|
membershipType: true,
|
|
127
129
|
policies: true,
|
|
130
|
+
skipDefaultPolicyTables: true,
|
|
128
131
|
entityTableId: true,
|
|
129
132
|
endpoint: true,
|
|
130
133
|
publicUrlPrefix: true,
|
|
@@ -176,6 +179,7 @@ async function handleGet(argv, prompter) {
|
|
|
176
179
|
uploadRequestsTableName: true,
|
|
177
180
|
membershipType: true,
|
|
178
181
|
policies: true,
|
|
182
|
+
skipDefaultPolicyTables: true,
|
|
179
183
|
entityTableId: true,
|
|
180
184
|
endpoint: true,
|
|
181
185
|
publicUrlPrefix: true,
|
|
@@ -272,12 +276,19 @@ async function handleCreate(argv, prompter) {
|
|
|
272
276
|
skipPrompt: true,
|
|
273
277
|
},
|
|
274
278
|
{
|
|
275
|
-
type: '
|
|
279
|
+
type: 'json',
|
|
276
280
|
name: 'policies',
|
|
277
281
|
message: 'policies',
|
|
278
282
|
required: false,
|
|
279
283
|
skipPrompt: true,
|
|
280
284
|
},
|
|
285
|
+
{
|
|
286
|
+
type: 'text',
|
|
287
|
+
name: 'skipDefaultPolicyTables',
|
|
288
|
+
message: 'skipDefaultPolicyTables',
|
|
289
|
+
required: false,
|
|
290
|
+
skipPrompt: true,
|
|
291
|
+
},
|
|
281
292
|
{
|
|
282
293
|
type: 'text',
|
|
283
294
|
name: 'entityTableId',
|
|
@@ -366,6 +377,7 @@ async function handleCreate(argv, prompter) {
|
|
|
366
377
|
uploadRequestsTableName: cleanedData.uploadRequestsTableName,
|
|
367
378
|
membershipType: cleanedData.membershipType,
|
|
368
379
|
policies: cleanedData.policies,
|
|
380
|
+
skipDefaultPolicyTables: cleanedData.skipDefaultPolicyTables,
|
|
369
381
|
entityTableId: cleanedData.entityTableId,
|
|
370
382
|
endpoint: cleanedData.endpoint,
|
|
371
383
|
publicUrlPrefix: cleanedData.publicUrlPrefix,
|
|
@@ -390,6 +402,7 @@ async function handleCreate(argv, prompter) {
|
|
|
390
402
|
uploadRequestsTableName: true,
|
|
391
403
|
membershipType: true,
|
|
392
404
|
policies: true,
|
|
405
|
+
skipDefaultPolicyTables: true,
|
|
393
406
|
entityTableId: true,
|
|
394
407
|
endpoint: true,
|
|
395
408
|
publicUrlPrefix: true,
|
|
@@ -492,12 +505,19 @@ async function handleUpdate(argv, prompter) {
|
|
|
492
505
|
skipPrompt: true,
|
|
493
506
|
},
|
|
494
507
|
{
|
|
495
|
-
type: '
|
|
508
|
+
type: 'json',
|
|
496
509
|
name: 'policies',
|
|
497
510
|
message: 'policies',
|
|
498
511
|
required: false,
|
|
499
512
|
skipPrompt: true,
|
|
500
513
|
},
|
|
514
|
+
{
|
|
515
|
+
type: 'text',
|
|
516
|
+
name: 'skipDefaultPolicyTables',
|
|
517
|
+
message: 'skipDefaultPolicyTables',
|
|
518
|
+
required: false,
|
|
519
|
+
skipPrompt: true,
|
|
520
|
+
},
|
|
501
521
|
{
|
|
502
522
|
type: 'text',
|
|
503
523
|
name: 'entityTableId',
|
|
@@ -589,6 +609,7 @@ async function handleUpdate(argv, prompter) {
|
|
|
589
609
|
uploadRequestsTableName: cleanedData.uploadRequestsTableName,
|
|
590
610
|
membershipType: cleanedData.membershipType,
|
|
591
611
|
policies: cleanedData.policies,
|
|
612
|
+
skipDefaultPolicyTables: cleanedData.skipDefaultPolicyTables,
|
|
592
613
|
entityTableId: cleanedData.entityTableId,
|
|
593
614
|
endpoint: cleanedData.endpoint,
|
|
594
615
|
publicUrlPrefix: cleanedData.publicUrlPrefix,
|
|
@@ -613,6 +634,7 @@ async function handleUpdate(argv, prompter) {
|
|
|
613
634
|
uploadRequestsTableName: true,
|
|
614
635
|
membershipType: true,
|
|
615
636
|
policies: true,
|
|
637
|
+
skipDefaultPolicyTables: true,
|
|
616
638
|
entityTableId: true,
|
|
617
639
|
endpoint: true,
|
|
618
640
|
publicUrlPrefix: true,
|
package/public/orm/client.js
CHANGED
|
@@ -36,9 +36,7 @@ class FetchAdapter {
|
|
|
36
36
|
return {
|
|
37
37
|
ok: false,
|
|
38
38
|
data: null,
|
|
39
|
-
errors: [
|
|
40
|
-
{ message: `HTTP ${response.status}: ${response.statusText}` },
|
|
41
|
-
],
|
|
39
|
+
errors: [{ message: `HTTP ${response.status}: ${response.statusText}` }],
|
|
42
40
|
};
|
|
43
41
|
}
|
|
44
42
|
const json = (await response.json());
|