@constructive-sdk/cli 0.12.1 → 0.12.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm/public/cli/commands/{field-module.d.ts → migrate-file.d.ts} +1 -1
- package/esm/public/cli/commands/migrate-file.js +110 -0
- package/{public/cli/commands/field-module.d.ts → esm/public/cli/commands/sql-action.d.ts} +1 -1
- package/esm/public/cli/commands/{sql-migration.js → sql-action.js} +4 -4
- package/esm/public/cli/commands.js +5 -5
- package/esm/public/cli/executor.d.ts +2 -2
- package/esm/public/orm/index.d.ts +4 -4
- package/esm/public/orm/index.js +4 -4
- package/esm/public/orm/input-types.d.ts +118 -247
- package/esm/public/orm/input-types.js +0 -1
- package/esm/public/orm/models/index.d.ts +2 -2
- package/esm/public/orm/models/index.js +2 -2
- package/esm/public/orm/models/migrateFile.d.ts +38 -0
- package/esm/public/orm/models/migrateFile.js +72 -0
- package/esm/public/orm/models/sqlAction.d.ts +38 -0
- package/esm/public/orm/models/{sqlMigration.js → sqlAction.js} +17 -17
- package/package.json +5 -5
- package/{esm/public/cli/commands/sql-migration.d.ts → public/cli/commands/migrate-file.d.ts} +1 -1
- package/public/cli/commands/migrate-file.js +112 -0
- package/public/cli/commands/{sql-migration.d.ts → sql-action.d.ts} +1 -1
- package/public/cli/commands/{sql-migration.js → sql-action.js} +4 -4
- package/public/cli/commands.js +5 -5
- package/public/cli/executor.d.ts +2 -2
- package/public/orm/index.d.ts +4 -4
- package/public/orm/index.js +4 -4
- package/public/orm/input-types.d.ts +118 -247
- package/public/orm/input-types.js +0 -1
- package/public/orm/models/index.d.ts +2 -2
- package/public/orm/models/index.js +7 -7
- package/public/orm/models/migrateFile.d.ts +38 -0
- package/public/orm/models/{sqlMigration.js → migrateFile.js} +19 -19
- package/public/orm/models/sqlAction.d.ts +38 -0
- package/public/orm/models/sqlAction.js +76 -0
- package/esm/public/cli/commands/field-module.js +0 -354
- package/esm/public/orm/models/fieldModule.d.ts +0 -56
- package/esm/public/orm/models/fieldModule.js +0 -96
- package/esm/public/orm/models/sqlMigration.d.ts +0 -38
- package/public/cli/commands/field-module.js +0 -356
- package/public/orm/models/fieldModule.d.ts +0 -56
- package/public/orm/models/fieldModule.js +0 -100
- package/public/orm/models/sqlMigration.d.ts +0 -38
|
@@ -52,7 +52,6 @@ export { DefaultIdsModuleModel } from './defaultIdsModule';
|
|
|
52
52
|
export { DenormalizedTableFieldModel } from './denormalizedTableField';
|
|
53
53
|
export { EmailsModuleModel } from './emailsModule';
|
|
54
54
|
export { EncryptedSecretsModuleModel } from './encryptedSecretsModule';
|
|
55
|
-
export { FieldModuleModel } from './fieldModule';
|
|
56
55
|
export { InvitesModuleModel } from './invitesModule';
|
|
57
56
|
export { LevelsModuleModel } from './levelsModule';
|
|
58
57
|
export { LimitsModuleModel } from './limitsModule';
|
|
@@ -97,6 +96,7 @@ export { RefModel } from './ref';
|
|
|
97
96
|
export { StoreModel } from './store';
|
|
98
97
|
export { AppPermissionDefaultModel } from './appPermissionDefault';
|
|
99
98
|
export { RoleTypeModel } from './roleType';
|
|
99
|
+
export { MigrateFileModel } from './migrateFile';
|
|
100
100
|
export { AppLimitDefaultModel } from './appLimitDefault';
|
|
101
101
|
export { OrgLimitDefaultModel } from './orgLimitDefault';
|
|
102
102
|
export { NodeTypeRegistryModel } from './nodeTypeRegistry';
|
|
@@ -105,7 +105,7 @@ export { CommitModel } from './commit';
|
|
|
105
105
|
export { AppMembershipDefaultModel } from './appMembershipDefault';
|
|
106
106
|
export { RlsModuleModel } from './rlsModule';
|
|
107
107
|
export { OrgMembershipDefaultModel } from './orgMembershipDefault';
|
|
108
|
-
export {
|
|
108
|
+
export { SqlActionModel } from './sqlAction';
|
|
109
109
|
export { UserModel } from './user';
|
|
110
110
|
export { AstMigrationModel } from './astMigration';
|
|
111
111
|
export { AppMembershipModel } from './appMembership';
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MigrateFile model for ORM client
|
|
3
|
+
* @generated by @constructive-io/graphql-codegen
|
|
4
|
+
* DO NOT EDIT - changes will be overwritten
|
|
5
|
+
*/
|
|
6
|
+
import { OrmClient } from '../client';
|
|
7
|
+
import { QueryBuilder } from '../query-builder';
|
|
8
|
+
import type { ConnectionResult, FindManyArgs, FindFirstArgs, CreateArgs, InferSelectResult, StrictSelect } from '../select-types';
|
|
9
|
+
import type { MigrateFileWithRelations, MigrateFileSelect, MigrateFileFilter, MigrateFileOrderBy, CreateMigrateFileInput } from '../input-types';
|
|
10
|
+
export declare class MigrateFileModel {
|
|
11
|
+
private client;
|
|
12
|
+
constructor(client: OrmClient);
|
|
13
|
+
findMany<S extends MigrateFileSelect>(args: FindManyArgs<S, MigrateFileFilter, never, MigrateFileOrderBy> & {
|
|
14
|
+
select: S;
|
|
15
|
+
} & StrictSelect<S, MigrateFileSelect>): QueryBuilder<{
|
|
16
|
+
migrateFiles: ConnectionResult<InferSelectResult<MigrateFileWithRelations, S>>;
|
|
17
|
+
}>;
|
|
18
|
+
findFirst<S extends MigrateFileSelect>(args: FindFirstArgs<S, MigrateFileFilter> & {
|
|
19
|
+
select: S;
|
|
20
|
+
} & StrictSelect<S, MigrateFileSelect>): QueryBuilder<{
|
|
21
|
+
migrateFiles: {
|
|
22
|
+
nodes: InferSelectResult<MigrateFileWithRelations, S>[];
|
|
23
|
+
};
|
|
24
|
+
}>;
|
|
25
|
+
findOne<S extends MigrateFileSelect>(args: {
|
|
26
|
+
id: string;
|
|
27
|
+
select: S;
|
|
28
|
+
} & StrictSelect<S, MigrateFileSelect>): QueryBuilder<{
|
|
29
|
+
migrateFile: InferSelectResult<MigrateFileWithRelations, S> | null;
|
|
30
|
+
}>;
|
|
31
|
+
create<S extends MigrateFileSelect>(args: CreateArgs<S, CreateMigrateFileInput['migrateFile']> & {
|
|
32
|
+
select: S;
|
|
33
|
+
} & StrictSelect<S, MigrateFileSelect>): QueryBuilder<{
|
|
34
|
+
createMigrateFile: {
|
|
35
|
+
migrateFile: InferSelectResult<MigrateFileWithRelations, S>;
|
|
36
|
+
};
|
|
37
|
+
}>;
|
|
38
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { QueryBuilder, buildFindManyDocument, buildFindFirstDocument, buildCreateDocument, } from '../query-builder';
|
|
2
|
+
import { connectionFieldsMap } from '../input-types';
|
|
3
|
+
export class MigrateFileModel {
|
|
4
|
+
client;
|
|
5
|
+
constructor(client) {
|
|
6
|
+
this.client = client;
|
|
7
|
+
}
|
|
8
|
+
findMany(args) {
|
|
9
|
+
const { document, variables } = buildFindManyDocument('MigrateFile', 'migrateFiles', args.select, {
|
|
10
|
+
where: args?.where,
|
|
11
|
+
orderBy: args?.orderBy,
|
|
12
|
+
first: args?.first,
|
|
13
|
+
last: args?.last,
|
|
14
|
+
after: args?.after,
|
|
15
|
+
before: args?.before,
|
|
16
|
+
offset: args?.offset,
|
|
17
|
+
}, 'MigrateFileFilter', 'MigrateFileOrderBy', connectionFieldsMap);
|
|
18
|
+
return new QueryBuilder({
|
|
19
|
+
client: this.client,
|
|
20
|
+
operation: 'query',
|
|
21
|
+
operationName: 'MigrateFile',
|
|
22
|
+
fieldName: 'migrateFiles',
|
|
23
|
+
document,
|
|
24
|
+
variables,
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
findFirst(args) {
|
|
28
|
+
const { document, variables } = buildFindFirstDocument('MigrateFile', 'migrateFiles', args.select, {
|
|
29
|
+
where: args?.where,
|
|
30
|
+
}, 'MigrateFileFilter', connectionFieldsMap);
|
|
31
|
+
return new QueryBuilder({
|
|
32
|
+
client: this.client,
|
|
33
|
+
operation: 'query',
|
|
34
|
+
operationName: 'MigrateFile',
|
|
35
|
+
fieldName: 'migrateFiles',
|
|
36
|
+
document,
|
|
37
|
+
variables,
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
findOne(args) {
|
|
41
|
+
const { document, variables } = buildFindManyDocument('MigrateFile', 'migrateFiles', args.select, {
|
|
42
|
+
where: {
|
|
43
|
+
id: {
|
|
44
|
+
equalTo: args.id,
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
first: 1,
|
|
48
|
+
}, 'MigrateFileFilter', 'MigrateFileOrderBy', connectionFieldsMap);
|
|
49
|
+
return new QueryBuilder({
|
|
50
|
+
client: this.client,
|
|
51
|
+
operation: 'query',
|
|
52
|
+
operationName: 'MigrateFile',
|
|
53
|
+
fieldName: 'migrateFile',
|
|
54
|
+
document,
|
|
55
|
+
variables,
|
|
56
|
+
transform: (data) => ({
|
|
57
|
+
migrateFile: data.migrateFiles?.nodes?.[0] ?? null,
|
|
58
|
+
}),
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
create(args) {
|
|
62
|
+
const { document, variables } = buildCreateDocument('MigrateFile', 'createMigrateFile', 'migrateFile', args.select, args.data, 'CreateMigrateFileInput', connectionFieldsMap);
|
|
63
|
+
return new QueryBuilder({
|
|
64
|
+
client: this.client,
|
|
65
|
+
operation: 'mutation',
|
|
66
|
+
operationName: 'MigrateFile',
|
|
67
|
+
fieldName: 'createMigrateFile',
|
|
68
|
+
document,
|
|
69
|
+
variables,
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SqlAction model for ORM client
|
|
3
|
+
* @generated by @constructive-io/graphql-codegen
|
|
4
|
+
* DO NOT EDIT - changes will be overwritten
|
|
5
|
+
*/
|
|
6
|
+
import { OrmClient } from '../client';
|
|
7
|
+
import { QueryBuilder } from '../query-builder';
|
|
8
|
+
import type { ConnectionResult, FindManyArgs, FindFirstArgs, CreateArgs, InferSelectResult, StrictSelect } from '../select-types';
|
|
9
|
+
import type { SqlActionWithRelations, SqlActionSelect, SqlActionFilter, SqlActionOrderBy, CreateSqlActionInput } from '../input-types';
|
|
10
|
+
export declare class SqlActionModel {
|
|
11
|
+
private client;
|
|
12
|
+
constructor(client: OrmClient);
|
|
13
|
+
findMany<S extends SqlActionSelect>(args: FindManyArgs<S, SqlActionFilter, never, SqlActionOrderBy> & {
|
|
14
|
+
select: S;
|
|
15
|
+
} & StrictSelect<S, SqlActionSelect>): QueryBuilder<{
|
|
16
|
+
sqlActions: ConnectionResult<InferSelectResult<SqlActionWithRelations, S>>;
|
|
17
|
+
}>;
|
|
18
|
+
findFirst<S extends SqlActionSelect>(args: FindFirstArgs<S, SqlActionFilter> & {
|
|
19
|
+
select: S;
|
|
20
|
+
} & StrictSelect<S, SqlActionSelect>): QueryBuilder<{
|
|
21
|
+
sqlActions: {
|
|
22
|
+
nodes: InferSelectResult<SqlActionWithRelations, S>[];
|
|
23
|
+
};
|
|
24
|
+
}>;
|
|
25
|
+
findOne<S extends SqlActionSelect>(args: {
|
|
26
|
+
id: number;
|
|
27
|
+
select: S;
|
|
28
|
+
} & StrictSelect<S, SqlActionSelect>): QueryBuilder<{
|
|
29
|
+
sqlAction: InferSelectResult<SqlActionWithRelations, S> | null;
|
|
30
|
+
}>;
|
|
31
|
+
create<S extends SqlActionSelect>(args: CreateArgs<S, CreateSqlActionInput['sqlAction']> & {
|
|
32
|
+
select: S;
|
|
33
|
+
} & StrictSelect<S, SqlActionSelect>): QueryBuilder<{
|
|
34
|
+
createSqlAction: {
|
|
35
|
+
sqlAction: InferSelectResult<SqlActionWithRelations, S>;
|
|
36
|
+
};
|
|
37
|
+
}>;
|
|
38
|
+
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { QueryBuilder, buildFindManyDocument, buildFindFirstDocument, buildCreateDocument, } from '../query-builder';
|
|
2
2
|
import { connectionFieldsMap } from '../input-types';
|
|
3
|
-
export class
|
|
3
|
+
export class SqlActionModel {
|
|
4
4
|
client;
|
|
5
5
|
constructor(client) {
|
|
6
6
|
this.client = client;
|
|
7
7
|
}
|
|
8
8
|
findMany(args) {
|
|
9
|
-
const { document, variables } = buildFindManyDocument('
|
|
9
|
+
const { document, variables } = buildFindManyDocument('SqlAction', 'sqlActions', args.select, {
|
|
10
10
|
where: args?.where,
|
|
11
11
|
orderBy: args?.orderBy,
|
|
12
12
|
first: args?.first,
|
|
@@ -14,57 +14,57 @@ export class SqlMigrationModel {
|
|
|
14
14
|
after: args?.after,
|
|
15
15
|
before: args?.before,
|
|
16
16
|
offset: args?.offset,
|
|
17
|
-
}, '
|
|
17
|
+
}, 'SqlActionFilter', 'SqlActionOrderBy', connectionFieldsMap);
|
|
18
18
|
return new QueryBuilder({
|
|
19
19
|
client: this.client,
|
|
20
20
|
operation: 'query',
|
|
21
|
-
operationName: '
|
|
22
|
-
fieldName: '
|
|
21
|
+
operationName: 'SqlAction',
|
|
22
|
+
fieldName: 'sqlActions',
|
|
23
23
|
document,
|
|
24
24
|
variables,
|
|
25
25
|
});
|
|
26
26
|
}
|
|
27
27
|
findFirst(args) {
|
|
28
|
-
const { document, variables } = buildFindFirstDocument('
|
|
28
|
+
const { document, variables } = buildFindFirstDocument('SqlAction', 'sqlActions', args.select, {
|
|
29
29
|
where: args?.where,
|
|
30
|
-
}, '
|
|
30
|
+
}, 'SqlActionFilter', connectionFieldsMap);
|
|
31
31
|
return new QueryBuilder({
|
|
32
32
|
client: this.client,
|
|
33
33
|
operation: 'query',
|
|
34
|
-
operationName: '
|
|
35
|
-
fieldName: '
|
|
34
|
+
operationName: 'SqlAction',
|
|
35
|
+
fieldName: 'sqlActions',
|
|
36
36
|
document,
|
|
37
37
|
variables,
|
|
38
38
|
});
|
|
39
39
|
}
|
|
40
40
|
findOne(args) {
|
|
41
|
-
const { document, variables } = buildFindManyDocument('
|
|
41
|
+
const { document, variables } = buildFindManyDocument('SqlAction', 'sqlActions', args.select, {
|
|
42
42
|
where: {
|
|
43
43
|
id: {
|
|
44
44
|
equalTo: args.id,
|
|
45
45
|
},
|
|
46
46
|
},
|
|
47
47
|
first: 1,
|
|
48
|
-
}, '
|
|
48
|
+
}, 'SqlActionFilter', 'SqlActionOrderBy', connectionFieldsMap);
|
|
49
49
|
return new QueryBuilder({
|
|
50
50
|
client: this.client,
|
|
51
51
|
operation: 'query',
|
|
52
|
-
operationName: '
|
|
53
|
-
fieldName: '
|
|
52
|
+
operationName: 'SqlAction',
|
|
53
|
+
fieldName: 'sqlAction',
|
|
54
54
|
document,
|
|
55
55
|
variables,
|
|
56
56
|
transform: (data) => ({
|
|
57
|
-
|
|
57
|
+
sqlAction: data.sqlActions?.nodes?.[0] ?? null,
|
|
58
58
|
}),
|
|
59
59
|
});
|
|
60
60
|
}
|
|
61
61
|
create(args) {
|
|
62
|
-
const { document, variables } = buildCreateDocument('
|
|
62
|
+
const { document, variables } = buildCreateDocument('SqlAction', 'createSqlAction', 'sqlAction', args.select, args.data, 'CreateSqlActionInput', connectionFieldsMap);
|
|
63
63
|
return new QueryBuilder({
|
|
64
64
|
client: this.client,
|
|
65
65
|
operation: 'mutation',
|
|
66
|
-
operationName: '
|
|
67
|
-
fieldName: '
|
|
66
|
+
operationName: 'SqlAction',
|
|
67
|
+
fieldName: 'createSqlAction',
|
|
68
68
|
document,
|
|
69
69
|
variables,
|
|
70
70
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@constructive-sdk/cli",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.4",
|
|
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,20 +46,20 @@
|
|
|
46
46
|
],
|
|
47
47
|
"dependencies": {
|
|
48
48
|
"@0no-co/graphql.web": "^1.1.2",
|
|
49
|
-
"@constructive-io/graphql-types": "^3.4.
|
|
49
|
+
"@constructive-io/graphql-types": "^3.4.1",
|
|
50
50
|
"appstash": "^0.6.0",
|
|
51
|
-
"gql-ast": "^3.4.
|
|
51
|
+
"gql-ast": "^3.4.1",
|
|
52
52
|
"graphql": "16.13.0",
|
|
53
53
|
"inquirerer": "^4.7.0",
|
|
54
54
|
"nested-obj": "^0.2.1",
|
|
55
55
|
"yanse": "^0.2.1"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
|
-
"@constructive-io/graphql-codegen": "^4.24.
|
|
58
|
+
"@constructive-io/graphql-codegen": "^4.24.4",
|
|
59
59
|
"@types/node": "^22.19.11",
|
|
60
60
|
"makage": "^0.1.12",
|
|
61
61
|
"tsx": "^4.19.0",
|
|
62
62
|
"typescript": "^5.9.3"
|
|
63
63
|
},
|
|
64
|
-
"gitHead": "
|
|
64
|
+
"gitHead": "deeabeceebf3300fd6424e157c9d952b0f436f43"
|
|
65
65
|
}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
/**
|
|
4
|
+
* CLI commands for MigrateFile
|
|
5
|
+
* @generated by @constructive-io/graphql-codegen
|
|
6
|
+
* DO NOT EDIT - changes will be overwritten
|
|
7
|
+
*/
|
|
8
|
+
const inquirerer_1 = require("inquirerer");
|
|
9
|
+
const executor_1 = require("../executor");
|
|
10
|
+
const utils_1 = require("../utils");
|
|
11
|
+
const fieldSchema = {
|
|
12
|
+
id: 'uuid',
|
|
13
|
+
databaseId: 'uuid',
|
|
14
|
+
upload: 'string',
|
|
15
|
+
};
|
|
16
|
+
const usage = '\nmigrate-file <command>\n\nCommands:\n list List all migrateFile records\n create Create a new migrateFile\n\n --help, -h Show this help message\n';
|
|
17
|
+
exports.default = async (argv, prompter, _options) => {
|
|
18
|
+
if (argv.help || argv.h) {
|
|
19
|
+
console.log(usage);
|
|
20
|
+
process.exit(0);
|
|
21
|
+
}
|
|
22
|
+
const { first: subcommand, newArgv } = (0, inquirerer_1.extractFirst)(argv);
|
|
23
|
+
if (!subcommand) {
|
|
24
|
+
const answer = await prompter.prompt(argv, [
|
|
25
|
+
{
|
|
26
|
+
type: 'autocomplete',
|
|
27
|
+
name: 'subcommand',
|
|
28
|
+
message: 'What do you want to do?',
|
|
29
|
+
options: ['list', 'create'],
|
|
30
|
+
},
|
|
31
|
+
]);
|
|
32
|
+
return handleTableSubcommand(answer.subcommand, newArgv, prompter);
|
|
33
|
+
}
|
|
34
|
+
return handleTableSubcommand(subcommand, newArgv, prompter);
|
|
35
|
+
};
|
|
36
|
+
async function handleTableSubcommand(subcommand, argv, prompter) {
|
|
37
|
+
switch (subcommand) {
|
|
38
|
+
case 'list':
|
|
39
|
+
return handleList(argv, prompter);
|
|
40
|
+
case 'create':
|
|
41
|
+
return handleCreate(argv, prompter);
|
|
42
|
+
default:
|
|
43
|
+
console.log(usage);
|
|
44
|
+
process.exit(1);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
async function handleList(_argv, _prompter) {
|
|
48
|
+
try {
|
|
49
|
+
const client = (0, executor_1.getClient)();
|
|
50
|
+
const result = await client.migrateFile
|
|
51
|
+
.findMany({
|
|
52
|
+
select: {
|
|
53
|
+
id: true,
|
|
54
|
+
databaseId: true,
|
|
55
|
+
upload: true,
|
|
56
|
+
},
|
|
57
|
+
})
|
|
58
|
+
.execute();
|
|
59
|
+
console.log(JSON.stringify(result, null, 2));
|
|
60
|
+
}
|
|
61
|
+
catch (error) {
|
|
62
|
+
console.error('Failed to list records.');
|
|
63
|
+
if (error instanceof Error) {
|
|
64
|
+
console.error(error.message);
|
|
65
|
+
}
|
|
66
|
+
process.exit(1);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
async function handleCreate(argv, prompter) {
|
|
70
|
+
try {
|
|
71
|
+
const rawAnswers = await prompter.prompt(argv, [
|
|
72
|
+
{
|
|
73
|
+
type: 'text',
|
|
74
|
+
name: 'databaseId',
|
|
75
|
+
message: 'databaseId',
|
|
76
|
+
required: false,
|
|
77
|
+
skipPrompt: true,
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
type: 'text',
|
|
81
|
+
name: 'upload',
|
|
82
|
+
message: 'upload',
|
|
83
|
+
required: false,
|
|
84
|
+
skipPrompt: true,
|
|
85
|
+
},
|
|
86
|
+
]);
|
|
87
|
+
const answers = (0, utils_1.coerceAnswers)(rawAnswers, fieldSchema);
|
|
88
|
+
const cleanedData = (0, utils_1.stripUndefined)(answers, fieldSchema);
|
|
89
|
+
const client = (0, executor_1.getClient)();
|
|
90
|
+
const result = await client.migrateFile
|
|
91
|
+
.create({
|
|
92
|
+
data: {
|
|
93
|
+
databaseId: cleanedData.databaseId,
|
|
94
|
+
upload: cleanedData.upload,
|
|
95
|
+
},
|
|
96
|
+
select: {
|
|
97
|
+
id: true,
|
|
98
|
+
databaseId: true,
|
|
99
|
+
upload: true,
|
|
100
|
+
},
|
|
101
|
+
})
|
|
102
|
+
.execute();
|
|
103
|
+
console.log(JSON.stringify(result, null, 2));
|
|
104
|
+
}
|
|
105
|
+
catch (error) {
|
|
106
|
+
console.error('Failed to create record.');
|
|
107
|
+
if (error instanceof Error) {
|
|
108
|
+
console.error(error.message);
|
|
109
|
+
}
|
|
110
|
+
process.exit(1);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
/**
|
|
4
|
-
* CLI commands for
|
|
4
|
+
* CLI commands for SqlAction
|
|
5
5
|
* @generated by @constructive-io/graphql-codegen
|
|
6
6
|
* DO NOT EDIT - changes will be overwritten
|
|
7
7
|
*/
|
|
@@ -23,7 +23,7 @@ const fieldSchema = {
|
|
|
23
23
|
actionId: 'uuid',
|
|
24
24
|
actorId: 'uuid',
|
|
25
25
|
};
|
|
26
|
-
const usage = '\nsql-
|
|
26
|
+
const usage = '\nsql-action <command>\n\nCommands:\n list List all sqlAction records\n create Create a new sqlAction\n\n --help, -h Show this help message\n';
|
|
27
27
|
exports.default = async (argv, prompter, _options) => {
|
|
28
28
|
if (argv.help || argv.h) {
|
|
29
29
|
console.log(usage);
|
|
@@ -57,7 +57,7 @@ async function handleTableSubcommand(subcommand, argv, prompter) {
|
|
|
57
57
|
async function handleList(_argv, _prompter) {
|
|
58
58
|
try {
|
|
59
59
|
const client = (0, executor_1.getClient)();
|
|
60
|
-
const result = await client.
|
|
60
|
+
const result = await client.sqlAction
|
|
61
61
|
.findMany({
|
|
62
62
|
select: {
|
|
63
63
|
id: true,
|
|
@@ -170,7 +170,7 @@ async function handleCreate(argv, prompter) {
|
|
|
170
170
|
const answers = (0, utils_1.coerceAnswers)(rawAnswers, fieldSchema);
|
|
171
171
|
const cleanedData = (0, utils_1.stripUndefined)(answers, fieldSchema);
|
|
172
172
|
const client = (0, executor_1.getClient)();
|
|
173
|
-
const result = await client.
|
|
173
|
+
const result = await client.sqlAction
|
|
174
174
|
.create({
|
|
175
175
|
data: {
|
|
176
176
|
name: cleanedData.name,
|
package/public/cli/commands.js
CHANGED
|
@@ -61,7 +61,6 @@ const default_ids_module_1 = __importDefault(require("./commands/default-ids-mod
|
|
|
61
61
|
const denormalized_table_field_1 = __importDefault(require("./commands/denormalized-table-field"));
|
|
62
62
|
const emails_module_1 = __importDefault(require("./commands/emails-module"));
|
|
63
63
|
const encrypted_secrets_module_1 = __importDefault(require("./commands/encrypted-secrets-module"));
|
|
64
|
-
const field_module_1 = __importDefault(require("./commands/field-module"));
|
|
65
64
|
const invites_module_1 = __importDefault(require("./commands/invites-module"));
|
|
66
65
|
const levels_module_1 = __importDefault(require("./commands/levels-module"));
|
|
67
66
|
const limits_module_1 = __importDefault(require("./commands/limits-module"));
|
|
@@ -106,6 +105,7 @@ const ref_1 = __importDefault(require("./commands/ref"));
|
|
|
106
105
|
const store_1 = __importDefault(require("./commands/store"));
|
|
107
106
|
const app_permission_default_1 = __importDefault(require("./commands/app-permission-default"));
|
|
108
107
|
const role_type_1 = __importDefault(require("./commands/role-type"));
|
|
108
|
+
const migrate_file_1 = __importDefault(require("./commands/migrate-file"));
|
|
109
109
|
const app_limit_default_1 = __importDefault(require("./commands/app-limit-default"));
|
|
110
110
|
const org_limit_default_1 = __importDefault(require("./commands/org-limit-default"));
|
|
111
111
|
const node_type_registry_1 = __importDefault(require("./commands/node-type-registry"));
|
|
@@ -114,7 +114,7 @@ const commit_1 = __importDefault(require("./commands/commit"));
|
|
|
114
114
|
const app_membership_default_1 = __importDefault(require("./commands/app-membership-default"));
|
|
115
115
|
const rls_module_1 = __importDefault(require("./commands/rls-module"));
|
|
116
116
|
const org_membership_default_1 = __importDefault(require("./commands/org-membership-default"));
|
|
117
|
-
const
|
|
117
|
+
const sql_action_1 = __importDefault(require("./commands/sql-action"));
|
|
118
118
|
const user_1 = __importDefault(require("./commands/user"));
|
|
119
119
|
const ast_migration_1 = __importDefault(require("./commands/ast-migration"));
|
|
120
120
|
const app_membership_1 = __importDefault(require("./commands/app-membership"));
|
|
@@ -226,7 +226,6 @@ const createCommandMap = () => ({
|
|
|
226
226
|
'denormalized-table-field': denormalized_table_field_1.default,
|
|
227
227
|
'emails-module': emails_module_1.default,
|
|
228
228
|
'encrypted-secrets-module': encrypted_secrets_module_1.default,
|
|
229
|
-
'field-module': field_module_1.default,
|
|
230
229
|
'invites-module': invites_module_1.default,
|
|
231
230
|
'levels-module': levels_module_1.default,
|
|
232
231
|
'limits-module': limits_module_1.default,
|
|
@@ -271,6 +270,7 @@ const createCommandMap = () => ({
|
|
|
271
270
|
store: store_1.default,
|
|
272
271
|
'app-permission-default': app_permission_default_1.default,
|
|
273
272
|
'role-type': role_type_1.default,
|
|
273
|
+
'migrate-file': migrate_file_1.default,
|
|
274
274
|
'app-limit-default': app_limit_default_1.default,
|
|
275
275
|
'org-limit-default': org_limit_default_1.default,
|
|
276
276
|
'node-type-registry': node_type_registry_1.default,
|
|
@@ -279,7 +279,7 @@ const createCommandMap = () => ({
|
|
|
279
279
|
'app-membership-default': app_membership_default_1.default,
|
|
280
280
|
'rls-module': rls_module_1.default,
|
|
281
281
|
'org-membership-default': org_membership_default_1.default,
|
|
282
|
-
'sql-
|
|
282
|
+
'sql-action': sql_action_1.default,
|
|
283
283
|
user: user_1.default,
|
|
284
284
|
'ast-migration': ast_migration_1.default,
|
|
285
285
|
'app-membership': app_membership_1.default,
|
|
@@ -340,7 +340,7 @@ const createCommandMap = () => ({
|
|
|
340
340
|
'verify-password': verify_password_1.default,
|
|
341
341
|
'verify-totp': verify_totp_1.default,
|
|
342
342
|
});
|
|
343
|
-
const usage = "\ncsdk <command>\n\nCommands:\n context Manage API contexts\n auth Manage authentication\n get-all-record getAllRecord CRUD operations\n org-get-managers-record orgGetManagersRecord CRUD operations\n org-get-subordinates-record orgGetSubordinatesRecord CRUD operations\n object object CRUD operations\n app-permission appPermission CRUD operations\n org-permission orgPermission CRUD operations\n app-level-requirement appLevelRequirement CRUD operations\n database database CRUD operations\n schema schema CRUD operations\n table table CRUD operations\n check-constraint checkConstraint CRUD operations\n field field CRUD operations\n foreign-key-constraint foreignKeyConstraint CRUD operations\n full-text-search fullTextSearch CRUD operations\n index index CRUD operations\n policy policy CRUD operations\n primary-key-constraint primaryKeyConstraint CRUD operations\n table-grant tableGrant CRUD operations\n trigger trigger CRUD operations\n unique-constraint uniqueConstraint CRUD operations\n view view CRUD operations\n view-table viewTable CRUD operations\n view-grant viewGrant CRUD operations\n view-rule viewRule CRUD operations\n embedding-chunk embeddingChunk CRUD operations\n table-template-module tableTemplateModule CRUD operations\n secure-table-provision secureTableProvision CRUD operations\n relation-provision relationProvision CRUD operations\n schema-grant schemaGrant CRUD operations\n default-privilege defaultPrivilege CRUD operations\n enum enum CRUD operations\n api-schema apiSchema CRUD operations\n api-module apiModule CRUD operations\n domain domain CRUD operations\n site-metadatum siteMetadatum CRUD operations\n site-module siteModule CRUD operations\n site-theme siteTheme CRUD operations\n trigger-function triggerFunction CRUD operations\n database-transfer databaseTransfer CRUD operations\n api api CRUD operations\n site site CRUD operations\n app app CRUD operations\n connected-accounts-module connectedAccountsModule CRUD operations\n crypto-addresses-module cryptoAddressesModule CRUD operations\n crypto-auth-module cryptoAuthModule CRUD operations\n default-ids-module defaultIdsModule CRUD operations\n denormalized-table-field denormalizedTableField CRUD operations\n emails-module emailsModule CRUD operations\n encrypted-secrets-module encryptedSecretsModule CRUD operations\n field-module fieldModule CRUD operations\n invites-module invitesModule CRUD operations\n levels-module levelsModule CRUD operations\n limits-module limitsModule CRUD operations\n membership-types-module membershipTypesModule CRUD operations\n memberships-module membershipsModule CRUD operations\n permissions-module permissionsModule CRUD operations\n phone-numbers-module phoneNumbersModule CRUD operations\n profiles-module profilesModule CRUD operations\n secrets-module secretsModule CRUD operations\n sessions-module sessionsModule CRUD operations\n user-auth-module userAuthModule CRUD operations\n users-module usersModule CRUD operations\n blueprint blueprint CRUD operations\n blueprint-template blueprintTemplate CRUD operations\n database-provision-module databaseProvisionModule CRUD operations\n app-admin-grant appAdminGrant CRUD operations\n app-owner-grant appOwnerGrant CRUD operations\n app-grant appGrant CRUD operations\n org-membership orgMembership CRUD operations\n org-member orgMember CRUD operations\n org-admin-grant orgAdminGrant CRUD operations\n org-owner-grant orgOwnerGrant CRUD operations\n org-grant orgGrant CRUD operations\n org-chart-edge orgChartEdge CRUD operations\n org-chart-edge-grant orgChartEdgeGrant CRUD operations\n org-permission-default orgPermissionDefault CRUD operations\n app-limit appLimit CRUD operations\n org-limit orgLimit CRUD operations\n app-step appStep CRUD operations\n app-achievement appAchievement CRUD operations\n app-level appLevel CRUD operations\n email email CRUD operations\n phone-number phoneNumber CRUD operations\n crypto-address cryptoAddress CRUD operations\n connected-account connectedAccount CRUD operations\n invite invite CRUD operations\n claimed-invite claimedInvite CRUD operations\n org-invite orgInvite CRUD operations\n org-claimed-invite orgClaimedInvite CRUD operations\n audit-log auditLog CRUD operations\n ref ref CRUD operations\n store store CRUD operations\n app-permission-default appPermissionDefault CRUD operations\n role-type roleType CRUD operations\n app-limit-default appLimitDefault CRUD operations\n org-limit-default orgLimitDefault CRUD operations\n node-type-registry nodeTypeRegistry CRUD operations\n membership-type membershipType CRUD operations\n commit commit CRUD operations\n app-membership-default appMembershipDefault CRUD operations\n rls-module rlsModule CRUD operations\n org-membership-default orgMembershipDefault CRUD operations\n sql-migration sqlMigration CRUD operations\n user user CRUD operations\n ast-migration astMigration CRUD operations\n app-membership appMembership CRUD operations\n hierarchy-module hierarchyModule CRUD operations\n current-user-id currentUserId\n current-ip-address currentIpAddress\n current-user-agent currentUserAgent\n app-permissions-get-padded-mask appPermissionsGetPaddedMask\n org-permissions-get-padded-mask orgPermissionsGetPaddedMask\n steps-achieved stepsAchieved\n rev-parse revParse\n org-is-manager-of orgIsManagerOf\n app-permissions-get-mask appPermissionsGetMask\n org-permissions-get-mask orgPermissionsGetMask\n app-permissions-get-mask-by-names appPermissionsGetMaskByNames\n org-permissions-get-mask-by-names orgPermissionsGetMaskByNames\n get-all-objects-from-root Reads and enables pagination through a set of `Object`.\n get-path-objects-from-root Reads and enables pagination through a set of `Object`.\n get-object-at-path getObjectAtPath\n app-permissions-get-by-mask Reads and enables pagination through a set of `AppPermission`.\n org-permissions-get-by-mask Reads and enables pagination through a set of `OrgPermission`.\n steps-required Reads and enables pagination through a set of `AppLevelRequirement`.\n current-user currentUser\n send-account-deletion-email sendAccountDeletionEmail\n sign-out signOut\n accept-database-transfer acceptDatabaseTransfer\n cancel-database-transfer cancelDatabaseTransfer\n reject-database-transfer rejectDatabaseTransfer\n submit-invite-code submitInviteCode\n submit-org-invite-code submitOrgInviteCode\n check-password checkPassword\n confirm-delete-account confirmDeleteAccount\n set-password setPassword\n verify-email verifyEmail\n freeze-objects freezeObjects\n init-empty-repo initEmptyRepo\n construct-blueprint Executes a draft blueprint definition. Four phases: (1) create tables with nodes[], fields, and policies[], (2) create relations between tables, (3) create indexes on table fields (supports BTREE, HNSW, GIN, GIST, BM25, etc.), (4) create full-text search configurations with weighted multi-field TSVector support. nodes[] entries can be strings or {$type, data} objects. Relations use $type for relation_type with junction config in data. Indexes reference table_ref + column name(s) and are resolved to field_ids. Full-text searches reference table_ref + tsvector field + source fields with weights/langs. Builds a ref_map of local ref names to created table UUIDs. Updates blueprint status to constructed (or failed with error_details). Returns the ref_map.\n reset-password resetPassword\n remove-node-at-path removeNodeAtPath\n set-data-at-path setDataAtPath\n set-props-and-commit setPropsAndCommit\n copy-template-to-blueprint Creates a new blueprint by copying a template definition. Checks visibility: owners can always copy their own templates, others require public visibility. Increments the template copy_count. Returns the new blueprint ID.\n provision-database-with-user provisionDatabaseWithUser\n bootstrap-user bootstrapUser\n set-field-order setFieldOrder\n insert-node-at-path insertNodeAtPath\n update-node-at-path updateNodeAtPath\n set-and-commit setAndCommit\n apply-rls applyRls\n sign-in-one-time-token signInOneTimeToken\n create-user-database Creates a new user database with all required modules, permissions, and RLS policies.\n\nParameters:\n - database_name: Name for the new database (required)\n - owner_id: UUID of the owner user (required)\n - include_invites: Include invite system (default: true)\n - include_groups: Include group-level memberships (default: false)\n - include_levels: Include levels/achievements (default: false)\n - bitlen: Bit length for permission masks (default: 64)\n - tokens_expiration: Token expiration interval (default: 30 days)\n\nReturns the database_id UUID of the newly created database.\n\nExample usage:\n SELECT metaschema_public.create_user_database('my_app', 'a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11'::uuid);\n SELECT metaschema_public.create_user_database('my_app', 'a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11'::uuid, true, true); -- with invites and groups\n\n extend-token-expires extendTokenExpires\n sign-in signIn\n sign-up signUp\n one-time-token oneTimeToken\n send-verification-email sendVerificationEmail\n forgot-password forgotPassword\n verify-password verifyPassword\n verify-totp verifyTotp\n\n --help, -h Show this help message\n --version, -v Show version\n";
|
|
343
|
+
const usage = "\ncsdk <command>\n\nCommands:\n context Manage API contexts\n auth Manage authentication\n get-all-record getAllRecord CRUD operations\n org-get-managers-record orgGetManagersRecord CRUD operations\n org-get-subordinates-record orgGetSubordinatesRecord CRUD operations\n object object CRUD operations\n app-permission appPermission CRUD operations\n org-permission orgPermission CRUD operations\n app-level-requirement appLevelRequirement CRUD operations\n database database CRUD operations\n schema schema CRUD operations\n table table CRUD operations\n check-constraint checkConstraint CRUD operations\n field field CRUD operations\n foreign-key-constraint foreignKeyConstraint CRUD operations\n full-text-search fullTextSearch CRUD operations\n index index CRUD operations\n policy policy CRUD operations\n primary-key-constraint primaryKeyConstraint CRUD operations\n table-grant tableGrant CRUD operations\n trigger trigger CRUD operations\n unique-constraint uniqueConstraint CRUD operations\n view view CRUD operations\n view-table viewTable CRUD operations\n view-grant viewGrant CRUD operations\n view-rule viewRule CRUD operations\n embedding-chunk embeddingChunk CRUD operations\n table-template-module tableTemplateModule CRUD operations\n secure-table-provision secureTableProvision CRUD operations\n relation-provision relationProvision CRUD operations\n schema-grant schemaGrant CRUD operations\n default-privilege defaultPrivilege CRUD operations\n enum enum CRUD operations\n api-schema apiSchema CRUD operations\n api-module apiModule CRUD operations\n domain domain CRUD operations\n site-metadatum siteMetadatum CRUD operations\n site-module siteModule CRUD operations\n site-theme siteTheme CRUD operations\n trigger-function triggerFunction CRUD operations\n database-transfer databaseTransfer CRUD operations\n api api CRUD operations\n site site CRUD operations\n app app CRUD operations\n connected-accounts-module connectedAccountsModule CRUD operations\n crypto-addresses-module cryptoAddressesModule CRUD operations\n crypto-auth-module cryptoAuthModule CRUD operations\n default-ids-module defaultIdsModule CRUD operations\n denormalized-table-field denormalizedTableField CRUD operations\n emails-module emailsModule CRUD operations\n encrypted-secrets-module encryptedSecretsModule CRUD operations\n invites-module invitesModule CRUD operations\n levels-module levelsModule CRUD operations\n limits-module limitsModule CRUD operations\n membership-types-module membershipTypesModule CRUD operations\n memberships-module membershipsModule CRUD operations\n permissions-module permissionsModule CRUD operations\n phone-numbers-module phoneNumbersModule CRUD operations\n profiles-module profilesModule CRUD operations\n secrets-module secretsModule CRUD operations\n sessions-module sessionsModule CRUD operations\n user-auth-module userAuthModule CRUD operations\n users-module usersModule CRUD operations\n blueprint blueprint CRUD operations\n blueprint-template blueprintTemplate CRUD operations\n database-provision-module databaseProvisionModule CRUD operations\n app-admin-grant appAdminGrant CRUD operations\n app-owner-grant appOwnerGrant CRUD operations\n app-grant appGrant CRUD operations\n org-membership orgMembership CRUD operations\n org-member orgMember CRUD operations\n org-admin-grant orgAdminGrant CRUD operations\n org-owner-grant orgOwnerGrant CRUD operations\n org-grant orgGrant CRUD operations\n org-chart-edge orgChartEdge CRUD operations\n org-chart-edge-grant orgChartEdgeGrant CRUD operations\n org-permission-default orgPermissionDefault CRUD operations\n app-limit appLimit CRUD operations\n org-limit orgLimit CRUD operations\n app-step appStep CRUD operations\n app-achievement appAchievement CRUD operations\n app-level appLevel CRUD operations\n email email CRUD operations\n phone-number phoneNumber CRUD operations\n crypto-address cryptoAddress CRUD operations\n connected-account connectedAccount CRUD operations\n invite invite CRUD operations\n claimed-invite claimedInvite CRUD operations\n org-invite orgInvite CRUD operations\n org-claimed-invite orgClaimedInvite CRUD operations\n audit-log auditLog CRUD operations\n ref ref CRUD operations\n store store CRUD operations\n app-permission-default appPermissionDefault CRUD operations\n role-type roleType CRUD operations\n migrate-file migrateFile CRUD operations\n app-limit-default appLimitDefault CRUD operations\n org-limit-default orgLimitDefault CRUD operations\n node-type-registry nodeTypeRegistry CRUD operations\n membership-type membershipType CRUD operations\n commit commit CRUD operations\n app-membership-default appMembershipDefault CRUD operations\n rls-module rlsModule CRUD operations\n org-membership-default orgMembershipDefault CRUD operations\n sql-action sqlAction CRUD operations\n user user CRUD operations\n ast-migration astMigration CRUD operations\n app-membership appMembership CRUD operations\n hierarchy-module hierarchyModule CRUD operations\n current-user-id currentUserId\n current-ip-address currentIpAddress\n current-user-agent currentUserAgent\n app-permissions-get-padded-mask appPermissionsGetPaddedMask\n org-permissions-get-padded-mask orgPermissionsGetPaddedMask\n steps-achieved stepsAchieved\n rev-parse revParse\n org-is-manager-of orgIsManagerOf\n app-permissions-get-mask appPermissionsGetMask\n org-permissions-get-mask orgPermissionsGetMask\n app-permissions-get-mask-by-names appPermissionsGetMaskByNames\n org-permissions-get-mask-by-names orgPermissionsGetMaskByNames\n get-all-objects-from-root Reads and enables pagination through a set of `Object`.\n get-path-objects-from-root Reads and enables pagination through a set of `Object`.\n get-object-at-path getObjectAtPath\n app-permissions-get-by-mask Reads and enables pagination through a set of `AppPermission`.\n org-permissions-get-by-mask Reads and enables pagination through a set of `OrgPermission`.\n steps-required Reads and enables pagination through a set of `AppLevelRequirement`.\n current-user currentUser\n send-account-deletion-email sendAccountDeletionEmail\n sign-out signOut\n accept-database-transfer acceptDatabaseTransfer\n cancel-database-transfer cancelDatabaseTransfer\n reject-database-transfer rejectDatabaseTransfer\n submit-invite-code submitInviteCode\n submit-org-invite-code submitOrgInviteCode\n check-password checkPassword\n confirm-delete-account confirmDeleteAccount\n set-password setPassword\n verify-email verifyEmail\n freeze-objects freezeObjects\n init-empty-repo initEmptyRepo\n construct-blueprint Executes a draft blueprint definition. Four phases: (1) create tables with nodes[], fields, and policies[], (2) create relations between tables, (3) create indexes on table fields (supports BTREE, HNSW, GIN, GIST, BM25, etc.), (4) create full-text search configurations with weighted multi-field TSVector support. nodes[] entries can be strings or {$type, data} objects. Relations use $type for relation_type with junction config in data. Indexes reference table_ref + column name(s) and are resolved to field_ids. Full-text searches reference table_ref + tsvector field + source fields with weights/langs. Builds a ref_map of local ref names to created table UUIDs. Updates blueprint status to constructed (or failed with error_details). Returns the ref_map.\n reset-password resetPassword\n remove-node-at-path removeNodeAtPath\n set-data-at-path setDataAtPath\n set-props-and-commit setPropsAndCommit\n copy-template-to-blueprint Creates a new blueprint by copying a template definition. Checks visibility: owners can always copy their own templates, others require public visibility. Increments the template copy_count. Returns the new blueprint ID.\n provision-database-with-user provisionDatabaseWithUser\n bootstrap-user bootstrapUser\n set-field-order setFieldOrder\n insert-node-at-path insertNodeAtPath\n update-node-at-path updateNodeAtPath\n set-and-commit setAndCommit\n apply-rls applyRls\n sign-in-one-time-token signInOneTimeToken\n create-user-database Creates a new user database with all required modules, permissions, and RLS policies.\n\nParameters:\n - database_name: Name for the new database (required)\n - owner_id: UUID of the owner user (required)\n - include_invites: Include invite system (default: true)\n - include_groups: Include group-level memberships (default: false)\n - include_levels: Include levels/achievements (default: false)\n - bitlen: Bit length for permission masks (default: 64)\n - tokens_expiration: Token expiration interval (default: 30 days)\n\nReturns the database_id UUID of the newly created database.\n\nExample usage:\n SELECT metaschema_public.create_user_database('my_app', 'a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11'::uuid);\n SELECT metaschema_public.create_user_database('my_app', 'a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11'::uuid, true, true); -- with invites and groups\n\n extend-token-expires extendTokenExpires\n sign-in signIn\n sign-up signUp\n one-time-token oneTimeToken\n send-verification-email sendVerificationEmail\n forgot-password forgotPassword\n verify-password verifyPassword\n verify-totp verifyTotp\n\n --help, -h Show this help message\n --version, -v Show version\n";
|
|
344
344
|
const commands = async (argv, prompter, options) => {
|
|
345
345
|
if (argv.help || argv.h) {
|
|
346
346
|
console.log(usage);
|
package/public/cli/executor.d.ts
CHANGED
|
@@ -49,7 +49,6 @@ export declare function getClient(contextName?: string): {
|
|
|
49
49
|
denormalizedTableField: import("../orm").DenormalizedTableFieldModel;
|
|
50
50
|
emailsModule: import("../orm").EmailsModuleModel;
|
|
51
51
|
encryptedSecretsModule: import("../orm").EncryptedSecretsModuleModel;
|
|
52
|
-
fieldModule: import("../orm").FieldModuleModel;
|
|
53
52
|
invitesModule: import("../orm").InvitesModuleModel;
|
|
54
53
|
levelsModule: import("../orm").LevelsModuleModel;
|
|
55
54
|
limitsModule: import("../orm").LimitsModuleModel;
|
|
@@ -94,6 +93,7 @@ export declare function getClient(contextName?: string): {
|
|
|
94
93
|
store: import("../orm").StoreModel;
|
|
95
94
|
appPermissionDefault: import("../orm").AppPermissionDefaultModel;
|
|
96
95
|
roleType: import("../orm").RoleTypeModel;
|
|
96
|
+
migrateFile: import("../orm").MigrateFileModel;
|
|
97
97
|
appLimitDefault: import("../orm").AppLimitDefaultModel;
|
|
98
98
|
orgLimitDefault: import("../orm").OrgLimitDefaultModel;
|
|
99
99
|
nodeTypeRegistry: import("../orm").NodeTypeRegistryModel;
|
|
@@ -102,7 +102,7 @@ export declare function getClient(contextName?: string): {
|
|
|
102
102
|
appMembershipDefault: import("../orm").AppMembershipDefaultModel;
|
|
103
103
|
rlsModule: import("../orm").RlsModuleModel;
|
|
104
104
|
orgMembershipDefault: import("../orm").OrgMembershipDefaultModel;
|
|
105
|
-
|
|
105
|
+
sqlAction: import("../orm").SqlActionModel;
|
|
106
106
|
user: import("../orm").UserModel;
|
|
107
107
|
astMigration: import("../orm").AstMigrationModel;
|
|
108
108
|
appMembership: import("../orm").AppMembershipModel;
|
package/public/orm/index.d.ts
CHANGED
|
@@ -48,7 +48,6 @@ import { DefaultIdsModuleModel } from './models/defaultIdsModule';
|
|
|
48
48
|
import { DenormalizedTableFieldModel } from './models/denormalizedTableField';
|
|
49
49
|
import { EmailsModuleModel } from './models/emailsModule';
|
|
50
50
|
import { EncryptedSecretsModuleModel } from './models/encryptedSecretsModule';
|
|
51
|
-
import { FieldModuleModel } from './models/fieldModule';
|
|
52
51
|
import { InvitesModuleModel } from './models/invitesModule';
|
|
53
52
|
import { LevelsModuleModel } from './models/levelsModule';
|
|
54
53
|
import { LimitsModuleModel } from './models/limitsModule';
|
|
@@ -93,6 +92,7 @@ import { RefModel } from './models/ref';
|
|
|
93
92
|
import { StoreModel } from './models/store';
|
|
94
93
|
import { AppPermissionDefaultModel } from './models/appPermissionDefault';
|
|
95
94
|
import { RoleTypeModel } from './models/roleType';
|
|
95
|
+
import { MigrateFileModel } from './models/migrateFile';
|
|
96
96
|
import { AppLimitDefaultModel } from './models/appLimitDefault';
|
|
97
97
|
import { OrgLimitDefaultModel } from './models/orgLimitDefault';
|
|
98
98
|
import { NodeTypeRegistryModel } from './models/nodeTypeRegistry';
|
|
@@ -101,7 +101,7 @@ import { CommitModel } from './models/commit';
|
|
|
101
101
|
import { AppMembershipDefaultModel } from './models/appMembershipDefault';
|
|
102
102
|
import { RlsModuleModel } from './models/rlsModule';
|
|
103
103
|
import { OrgMembershipDefaultModel } from './models/orgMembershipDefault';
|
|
104
|
-
import {
|
|
104
|
+
import { SqlActionModel } from './models/sqlAction';
|
|
105
105
|
import { UserModel } from './models/user';
|
|
106
106
|
import { AstMigrationModel } from './models/astMigration';
|
|
107
107
|
import { AppMembershipModel } from './models/appMembership';
|
|
@@ -187,7 +187,6 @@ export declare function createClient(config: OrmClientConfig): {
|
|
|
187
187
|
denormalizedTableField: DenormalizedTableFieldModel;
|
|
188
188
|
emailsModule: EmailsModuleModel;
|
|
189
189
|
encryptedSecretsModule: EncryptedSecretsModuleModel;
|
|
190
|
-
fieldModule: FieldModuleModel;
|
|
191
190
|
invitesModule: InvitesModuleModel;
|
|
192
191
|
levelsModule: LevelsModuleModel;
|
|
193
192
|
limitsModule: LimitsModuleModel;
|
|
@@ -232,6 +231,7 @@ export declare function createClient(config: OrmClientConfig): {
|
|
|
232
231
|
store: StoreModel;
|
|
233
232
|
appPermissionDefault: AppPermissionDefaultModel;
|
|
234
233
|
roleType: RoleTypeModel;
|
|
234
|
+
migrateFile: MigrateFileModel;
|
|
235
235
|
appLimitDefault: AppLimitDefaultModel;
|
|
236
236
|
orgLimitDefault: OrgLimitDefaultModel;
|
|
237
237
|
nodeTypeRegistry: NodeTypeRegistryModel;
|
|
@@ -240,7 +240,7 @@ export declare function createClient(config: OrmClientConfig): {
|
|
|
240
240
|
appMembershipDefault: AppMembershipDefaultModel;
|
|
241
241
|
rlsModule: RlsModuleModel;
|
|
242
242
|
orgMembershipDefault: OrgMembershipDefaultModel;
|
|
243
|
-
|
|
243
|
+
sqlAction: SqlActionModel;
|
|
244
244
|
user: UserModel;
|
|
245
245
|
astMigration: AstMigrationModel;
|
|
246
246
|
appMembership: AppMembershipModel;
|