@pgpmjs/migrate-client 0.22.1 → 0.22.2
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/migrate/orm/index.d.ts +2 -12
- package/esm/migrate/orm/index.js +2 -2
- package/esm/migrate/orm/input-types.d.ts +94 -238
- package/esm/migrate/orm/models/astMigration.d.ts +36 -0
- package/esm/migrate/orm/models/astMigration.js +76 -0
- package/esm/migrate/orm/models/index.d.ts +1 -1
- package/esm/migrate/orm/models/index.js +1 -1
- package/esm/migrate/orm/models/sqlAction.d.ts +2 -20
- package/esm/migrate/orm/models/sqlAction.js +1 -25
- package/esm/migrate/orm/mutation/index.d.ts +1 -17
- package/esm/migrate/orm/mutation/index.js +0 -24
- package/migrate/orm/index.d.ts +2 -12
- package/migrate/orm/index.js +2 -2
- package/migrate/orm/input-types.d.ts +94 -238
- package/migrate/orm/models/astMigration.d.ts +36 -0
- package/migrate/orm/models/astMigration.js +80 -0
- package/migrate/orm/models/index.d.ts +1 -1
- package/migrate/orm/models/index.js +3 -3
- package/migrate/orm/models/sqlAction.d.ts +2 -20
- package/migrate/orm/models/sqlAction.js +0 -24
- package/migrate/orm/mutation/index.d.ts +1 -17
- package/migrate/orm/mutation/index.js +0 -24
- package/package.json +2 -2
- package/esm/migrate/orm/models/migrateFile.d.ts +0 -54
- package/esm/migrate/orm/models/migrateFile.js +0 -100
- package/migrate/orm/models/migrateFile.d.ts +0 -54
- package/migrate/orm/models/migrateFile.js +0 -104
|
@@ -6,10 +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 {
|
|
10
|
-
export interface ExecuteSqlVariables {
|
|
11
|
-
input: ExecuteSqlInput;
|
|
12
|
-
}
|
|
9
|
+
import type { ProvisionBucketInput, ProvisionBucketPayload, ProvisionBucketPayloadSelect } from '../input-types';
|
|
13
10
|
/**
|
|
14
11
|
* Variables for provisionBucket
|
|
15
12
|
* Provision an S3 bucket for a logical bucket in the database.
|
|
@@ -20,23 +17,10 @@ and lifecycle settings.
|
|
|
20
17
|
export interface ProvisionBucketVariables {
|
|
21
18
|
input: ProvisionBucketInput;
|
|
22
19
|
}
|
|
23
|
-
export interface RunMigrationVariables {
|
|
24
|
-
input: RunMigrationInput;
|
|
25
|
-
}
|
|
26
20
|
export declare function createMutationOperations(client: OrmClient): {
|
|
27
|
-
executeSql: <S extends ExecuteSqlPayloadSelect>(args: ExecuteSqlVariables, options: {
|
|
28
|
-
select: S;
|
|
29
|
-
} & StrictSelect<S, ExecuteSqlPayloadSelect>) => QueryBuilder<{
|
|
30
|
-
executeSql: InferSelectResult<ExecuteSqlPayload, S> | null;
|
|
31
|
-
}>;
|
|
32
21
|
provisionBucket: <S extends ProvisionBucketPayloadSelect>(args: ProvisionBucketVariables, options: {
|
|
33
22
|
select: S;
|
|
34
23
|
} & StrictSelect<S, ProvisionBucketPayloadSelect>) => QueryBuilder<{
|
|
35
24
|
provisionBucket: InferSelectResult<ProvisionBucketPayload, S> | null;
|
|
36
25
|
}>;
|
|
37
|
-
runMigration: <S extends RunMigrationPayloadSelect>(args: RunMigrationVariables, options: {
|
|
38
|
-
select: S;
|
|
39
|
-
} & StrictSelect<S, RunMigrationPayloadSelect>) => QueryBuilder<{
|
|
40
|
-
runMigration: InferSelectResult<RunMigrationPayload, S> | null;
|
|
41
|
-
}>;
|
|
42
26
|
};
|
|
@@ -2,18 +2,6 @@ import { QueryBuilder, buildCustomDocument } from '../query-builder';
|
|
|
2
2
|
import { connectionFieldsMap } from '../input-types';
|
|
3
3
|
export function createMutationOperations(client) {
|
|
4
4
|
return {
|
|
5
|
-
executeSql: (args, options) => new QueryBuilder({
|
|
6
|
-
client,
|
|
7
|
-
operation: 'mutation',
|
|
8
|
-
operationName: 'ExecuteSql',
|
|
9
|
-
fieldName: 'executeSql',
|
|
10
|
-
...buildCustomDocument('mutation', 'ExecuteSql', 'executeSql', options.select, args, [
|
|
11
|
-
{
|
|
12
|
-
name: 'input',
|
|
13
|
-
type: 'ExecuteSqlInput!',
|
|
14
|
-
},
|
|
15
|
-
], connectionFieldsMap, 'ExecuteSqlPayload'),
|
|
16
|
-
}),
|
|
17
5
|
provisionBucket: (args, options) => new QueryBuilder({
|
|
18
6
|
client,
|
|
19
7
|
operation: 'mutation',
|
|
@@ -26,17 +14,5 @@ export function createMutationOperations(client) {
|
|
|
26
14
|
},
|
|
27
15
|
], connectionFieldsMap, 'ProvisionBucketPayload'),
|
|
28
16
|
}),
|
|
29
|
-
runMigration: (args, options) => new QueryBuilder({
|
|
30
|
-
client,
|
|
31
|
-
operation: 'mutation',
|
|
32
|
-
operationName: 'RunMigration',
|
|
33
|
-
fieldName: 'runMigration',
|
|
34
|
-
...buildCustomDocument('mutation', 'RunMigration', 'runMigration', options.select, args, [
|
|
35
|
-
{
|
|
36
|
-
name: 'input',
|
|
37
|
-
type: 'RunMigrationInput!',
|
|
38
|
-
},
|
|
39
|
-
], connectionFieldsMap, 'RunMigrationPayload'),
|
|
40
|
-
}),
|
|
41
17
|
};
|
|
42
18
|
}
|
package/migrate/orm/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { OrmClientConfig } from './client';
|
|
2
|
-
import {
|
|
2
|
+
import { AstMigrationModel } from './models/astMigration';
|
|
3
3
|
import { SqlActionModel } from './models/sqlAction';
|
|
4
4
|
export type { OrmClientConfig, QueryResult, GraphQLError, GraphQLAdapter } from './client';
|
|
5
5
|
export { GraphQLRequestError, FetchAdapter } from './client';
|
|
@@ -31,23 +31,13 @@ export { createMutationOperations } from './mutation';
|
|
|
31
31
|
* ```
|
|
32
32
|
*/
|
|
33
33
|
export declare function createClient(config: OrmClientConfig): {
|
|
34
|
-
|
|
34
|
+
astMigration: AstMigrationModel;
|
|
35
35
|
sqlAction: SqlActionModel;
|
|
36
36
|
mutation: {
|
|
37
|
-
executeSql: <S extends import("./input-types").ExecuteSqlPayloadSelect>(args: import("./mutation").ExecuteSqlVariables, options: {
|
|
38
|
-
select: S;
|
|
39
|
-
} & import("./select-types").StrictSelect<S, import("./input-types").ExecuteSqlPayloadSelect>) => import("./query-builder").QueryBuilder<{
|
|
40
|
-
executeSql: import("./select-types").InferSelectResult<import("./input-types").ExecuteSqlPayload, S> | null;
|
|
41
|
-
}>;
|
|
42
37
|
provisionBucket: <S extends import("./input-types").ProvisionBucketPayloadSelect>(args: import("./mutation").ProvisionBucketVariables, options: {
|
|
43
38
|
select: S;
|
|
44
39
|
} & import("./select-types").StrictSelect<S, import("./input-types").ProvisionBucketPayloadSelect>) => import("./query-builder").QueryBuilder<{
|
|
45
40
|
provisionBucket: import("./select-types").InferSelectResult<import("./input-types").ProvisionBucketPayload, S> | null;
|
|
46
41
|
}>;
|
|
47
|
-
runMigration: <S extends import("./input-types").RunMigrationPayloadSelect>(args: import("./mutation").RunMigrationVariables, options: {
|
|
48
|
-
select: S;
|
|
49
|
-
} & import("./select-types").StrictSelect<S, import("./input-types").RunMigrationPayloadSelect>) => import("./query-builder").QueryBuilder<{
|
|
50
|
-
runMigration: import("./select-types").InferSelectResult<import("./input-types").RunMigrationPayload, S> | null;
|
|
51
|
-
}>;
|
|
52
42
|
};
|
|
53
43
|
};
|
package/migrate/orm/index.js
CHANGED
|
@@ -22,7 +22,7 @@ exports.createClient = createClient;
|
|
|
22
22
|
* DO NOT EDIT - changes will be overwritten
|
|
23
23
|
*/
|
|
24
24
|
const client_1 = require("./client");
|
|
25
|
-
const
|
|
25
|
+
const astMigration_1 = require("./models/astMigration");
|
|
26
26
|
const sqlAction_1 = require("./models/sqlAction");
|
|
27
27
|
const mutation_1 = require("./mutation");
|
|
28
28
|
var client_2 = require("./client");
|
|
@@ -60,7 +60,7 @@ Object.defineProperty(exports, "createMutationOperations", { enumerable: true, g
|
|
|
60
60
|
function createClient(config) {
|
|
61
61
|
const client = new client_1.OrmClient(config);
|
|
62
62
|
return {
|
|
63
|
-
|
|
63
|
+
astMigration: new astMigration_1.AstMigrationModel(client),
|
|
64
64
|
sqlAction: new sqlAction_1.SqlActionModel(client),
|
|
65
65
|
mutation: (0, mutation_1.createMutationOperations)(client),
|
|
66
66
|
};
|
|
@@ -229,17 +229,25 @@ export interface UUIDListFilter {
|
|
|
229
229
|
anyGreaterThan?: string;
|
|
230
230
|
anyGreaterThanOrEqualTo?: string;
|
|
231
231
|
}
|
|
232
|
-
export
|
|
233
|
-
|
|
232
|
+
export interface AstMigration {
|
|
233
|
+
actionId?: string | null;
|
|
234
|
+
actionName?: string | null;
|
|
235
|
+
actorId?: string | null;
|
|
236
|
+
createdAt?: string | null;
|
|
234
237
|
databaseId?: string | null;
|
|
235
|
-
|
|
236
|
-
|
|
238
|
+
deploy?: Record<string, unknown> | null;
|
|
239
|
+
deploys?: string | null;
|
|
240
|
+
id: number;
|
|
241
|
+
name?: string | null;
|
|
242
|
+
payload?: Record<string, unknown> | null;
|
|
243
|
+
requires?: string[] | null;
|
|
244
|
+
revert?: Record<string, unknown> | null;
|
|
245
|
+
verify?: Record<string, unknown> | null;
|
|
237
246
|
}
|
|
238
247
|
export interface SqlAction {
|
|
239
|
-
action?: string | null;
|
|
240
248
|
actionId?: string | null;
|
|
249
|
+
actionName?: string | null;
|
|
241
250
|
actorId?: string | null;
|
|
242
|
-
category?: string | null;
|
|
243
251
|
content?: string | null;
|
|
244
252
|
createdAt?: string | null;
|
|
245
253
|
databaseId?: string | null;
|
|
@@ -262,22 +270,31 @@ export interface PageInfo {
|
|
|
262
270
|
startCursor?: string | null;
|
|
263
271
|
endCursor?: string | null;
|
|
264
272
|
}
|
|
265
|
-
export interface
|
|
273
|
+
export interface AstMigrationRelations {
|
|
266
274
|
}
|
|
267
275
|
export interface SqlActionRelations {
|
|
268
276
|
}
|
|
269
|
-
export type
|
|
277
|
+
export type AstMigrationWithRelations = AstMigration & AstMigrationRelations;
|
|
270
278
|
export type SqlActionWithRelations = SqlAction & SqlActionRelations;
|
|
271
|
-
export type
|
|
279
|
+
export type AstMigrationSelect = {
|
|
280
|
+
actionId?: boolean;
|
|
281
|
+
actionName?: boolean;
|
|
282
|
+
actorId?: boolean;
|
|
283
|
+
createdAt?: boolean;
|
|
272
284
|
databaseId?: boolean;
|
|
285
|
+
deploy?: boolean;
|
|
286
|
+
deploys?: boolean;
|
|
273
287
|
id?: boolean;
|
|
274
|
-
|
|
288
|
+
name?: boolean;
|
|
289
|
+
payload?: boolean;
|
|
290
|
+
requires?: boolean;
|
|
291
|
+
revert?: boolean;
|
|
292
|
+
verify?: boolean;
|
|
275
293
|
};
|
|
276
294
|
export type SqlActionSelect = {
|
|
277
|
-
action?: boolean;
|
|
278
295
|
actionId?: boolean;
|
|
296
|
+
actionName?: boolean;
|
|
279
297
|
actorId?: boolean;
|
|
280
|
-
category?: boolean;
|
|
281
298
|
content?: boolean;
|
|
282
299
|
createdAt?: boolean;
|
|
283
300
|
databaseId?: boolean;
|
|
@@ -289,31 +306,49 @@ export type SqlActionSelect = {
|
|
|
289
306
|
revert?: boolean;
|
|
290
307
|
verify?: boolean;
|
|
291
308
|
};
|
|
292
|
-
export interface
|
|
309
|
+
export interface AstMigrationFilter {
|
|
310
|
+
/** Filter by the object’s `actionId` field. */
|
|
311
|
+
actionId?: UUIDFilter;
|
|
312
|
+
/** Filter by the object’s `actionName` field. */
|
|
313
|
+
actionName?: StringFilter;
|
|
314
|
+
/** Filter by the object’s `actorId` field. */
|
|
315
|
+
actorId?: UUIDFilter;
|
|
293
316
|
/** Checks for all expressions in this list. */
|
|
294
|
-
and?:
|
|
317
|
+
and?: AstMigrationFilter[];
|
|
318
|
+
/** Filter by the object’s `createdAt` field. */
|
|
319
|
+
createdAt?: DatetimeFilter;
|
|
295
320
|
/** Filter by the object’s `databaseId` field. */
|
|
296
321
|
databaseId?: UUIDFilter;
|
|
322
|
+
/** Filter by the object’s `deploy` field. */
|
|
323
|
+
deploy?: JSONFilter;
|
|
324
|
+
/** Filter by the object’s `deploys` field. */
|
|
325
|
+
deploys?: StringFilter;
|
|
297
326
|
/** Filter by the object’s `id` field. */
|
|
298
|
-
id?:
|
|
327
|
+
id?: IntFilter;
|
|
328
|
+
/** Filter by the object’s `name` field. */
|
|
329
|
+
name?: StringFilter;
|
|
299
330
|
/** Negates the expression. */
|
|
300
|
-
not?:
|
|
331
|
+
not?: AstMigrationFilter;
|
|
301
332
|
/** Checks for any expressions in this list. */
|
|
302
|
-
or?:
|
|
303
|
-
/** Filter by the object’s `
|
|
304
|
-
|
|
333
|
+
or?: AstMigrationFilter[];
|
|
334
|
+
/** Filter by the object’s `payload` field. */
|
|
335
|
+
payload?: JSONFilter;
|
|
336
|
+
/** Filter by the object’s `requires` field. */
|
|
337
|
+
requires?: StringListFilter;
|
|
338
|
+
/** Filter by the object’s `revert` field. */
|
|
339
|
+
revert?: JSONFilter;
|
|
340
|
+
/** Filter by the object’s `verify` field. */
|
|
341
|
+
verify?: JSONFilter;
|
|
305
342
|
}
|
|
306
343
|
export interface SqlActionFilter {
|
|
307
|
-
/** Filter by the object’s `action` field. */
|
|
308
|
-
action?: StringFilter;
|
|
309
344
|
/** Filter by the object’s `actionId` field. */
|
|
310
345
|
actionId?: UUIDFilter;
|
|
346
|
+
/** Filter by the object’s `actionName` field. */
|
|
347
|
+
actionName?: StringFilter;
|
|
311
348
|
/** Filter by the object’s `actorId` field. */
|
|
312
349
|
actorId?: UUIDFilter;
|
|
313
350
|
/** Checks for all expressions in this list. */
|
|
314
351
|
and?: SqlActionFilter[];
|
|
315
|
-
/** Filter by the object’s `category` field. */
|
|
316
|
-
category?: StringFilter;
|
|
317
352
|
/** Filter by the object’s `content` field. */
|
|
318
353
|
content?: StringFilter;
|
|
319
354
|
/** Filter by the object’s `createdAt` field. */
|
|
@@ -337,38 +372,54 @@ export interface SqlActionFilter {
|
|
|
337
372
|
/** Filter by the object’s `verify` field. */
|
|
338
373
|
verify?: StringFilter;
|
|
339
374
|
}
|
|
340
|
-
export type
|
|
341
|
-
export type SqlActionOrderBy = '
|
|
342
|
-
export interface
|
|
375
|
+
export type AstMigrationOrderBy = 'ACTION_ID_ASC' | 'ACTION_ID_DESC' | 'ACTION_NAME_ASC' | 'ACTION_NAME_DESC' | 'ACTOR_ID_ASC' | 'ACTOR_ID_DESC' | 'CREATED_AT_ASC' | 'CREATED_AT_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' | 'DEPLOYS_ASC' | 'DEPLOYS_DESC' | 'DEPLOY_ASC' | 'DEPLOY_DESC' | 'ID_ASC' | 'ID_DESC' | 'NAME_ASC' | 'NAME_DESC' | 'NATURAL' | 'PAYLOAD_ASC' | 'PAYLOAD_DESC' | 'REQUIRES_ASC' | 'REQUIRES_DESC' | 'REVERT_ASC' | 'REVERT_DESC' | 'VERIFY_ASC' | 'VERIFY_DESC';
|
|
376
|
+
export type SqlActionOrderBy = 'ACTION_ID_ASC' | 'ACTION_ID_DESC' | 'ACTION_NAME_ASC' | 'ACTION_NAME_DESC' | 'ACTOR_ID_ASC' | 'ACTOR_ID_DESC' | 'CONTENT_ASC' | 'CONTENT_DESC' | 'CREATED_AT_ASC' | 'CREATED_AT_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' | 'DEPLOY_ASC' | 'DEPLOY_DESC' | 'DEPS_ASC' | 'DEPS_DESC' | 'ID_ASC' | 'ID_DESC' | 'NAME_ASC' | 'NAME_DESC' | 'NATURAL' | 'PAYLOAD_ASC' | 'PAYLOAD_DESC' | 'REVERT_ASC' | 'REVERT_DESC' | 'VERIFY_ASC' | 'VERIFY_DESC';
|
|
377
|
+
export interface CreateAstMigrationInput {
|
|
343
378
|
clientMutationId?: string;
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
379
|
+
astMigration: {
|
|
380
|
+
actionId: string;
|
|
381
|
+
actionName?: string;
|
|
382
|
+
actorId: string;
|
|
383
|
+
databaseId: string;
|
|
384
|
+
deploy?: Record<string, unknown>;
|
|
385
|
+
deploys?: string;
|
|
386
|
+
name?: string;
|
|
387
|
+
payload?: Record<string, unknown>;
|
|
388
|
+
requires?: string[];
|
|
389
|
+
revert?: Record<string, unknown>;
|
|
390
|
+
verify?: Record<string, unknown>;
|
|
347
391
|
};
|
|
348
392
|
}
|
|
349
|
-
export interface
|
|
393
|
+
export interface AstMigrationPatch {
|
|
394
|
+
actionId?: string | null;
|
|
395
|
+
actionName?: string | null;
|
|
396
|
+
actorId?: string | null;
|
|
350
397
|
databaseId?: string | null;
|
|
351
|
-
|
|
352
|
-
|
|
398
|
+
deploy?: Record<string, unknown> | null;
|
|
399
|
+
deploys?: string | null;
|
|
400
|
+
name?: string | null;
|
|
401
|
+
payload?: Record<string, unknown> | null;
|
|
402
|
+
requires?: string[] | null;
|
|
403
|
+
revert?: Record<string, unknown> | null;
|
|
404
|
+
verify?: Record<string, unknown> | null;
|
|
353
405
|
}
|
|
354
|
-
export interface
|
|
406
|
+
export interface UpdateAstMigrationInput {
|
|
355
407
|
clientMutationId?: string;
|
|
356
|
-
id:
|
|
357
|
-
|
|
408
|
+
id: number;
|
|
409
|
+
astMigrationPatch: AstMigrationPatch;
|
|
358
410
|
}
|
|
359
|
-
export interface
|
|
411
|
+
export interface DeleteAstMigrationInput {
|
|
360
412
|
clientMutationId?: string;
|
|
361
|
-
id:
|
|
413
|
+
id: number;
|
|
362
414
|
}
|
|
363
415
|
export interface CreateSqlActionInput {
|
|
364
416
|
clientMutationId?: string;
|
|
365
417
|
sqlAction: {
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
actorId
|
|
369
|
-
category?: string;
|
|
418
|
+
actionId: string;
|
|
419
|
+
actionName?: string;
|
|
420
|
+
actorId: string;
|
|
370
421
|
content?: string;
|
|
371
|
-
databaseId
|
|
422
|
+
databaseId: string;
|
|
372
423
|
deploy?: string;
|
|
373
424
|
deps?: string[];
|
|
374
425
|
name?: string;
|
|
@@ -378,10 +429,9 @@ export interface CreateSqlActionInput {
|
|
|
378
429
|
};
|
|
379
430
|
}
|
|
380
431
|
export interface SqlActionPatch {
|
|
381
|
-
action?: string | null;
|
|
382
432
|
actionId?: string | null;
|
|
433
|
+
actionName?: string | null;
|
|
383
434
|
actorId?: string | null;
|
|
384
|
-
category?: string | null;
|
|
385
435
|
content?: string | null;
|
|
386
436
|
databaseId?: string | null;
|
|
387
437
|
deploy?: string | null;
|
|
@@ -401,10 +451,6 @@ export interface DeleteSqlActionInput {
|
|
|
401
451
|
id: number;
|
|
402
452
|
}
|
|
403
453
|
export declare const connectionFieldsMap: Record<string, Record<string, string>>;
|
|
404
|
-
export interface ExecuteSqlInput {
|
|
405
|
-
clientMutationId?: string;
|
|
406
|
-
stmt?: string;
|
|
407
|
-
}
|
|
408
454
|
export interface ProvisionBucketInput {
|
|
409
455
|
/** The logical bucket key (e.g., "public", "private") */
|
|
410
456
|
bucketKey: string;
|
|
@@ -414,76 +460,6 @@ export interface ProvisionBucketInput {
|
|
|
414
460
|
*/
|
|
415
461
|
ownerId?: string;
|
|
416
462
|
}
|
|
417
|
-
export interface RunMigrationInput {
|
|
418
|
-
clientMutationId?: string;
|
|
419
|
-
databaseId?: string;
|
|
420
|
-
kind?: string;
|
|
421
|
-
migration?: number;
|
|
422
|
-
}
|
|
423
|
-
/** A filter to be used against ConstructiveInternalTypeUpload fields. All fields are combined with a logical ‘and.’ */
|
|
424
|
-
export interface ConstructiveInternalTypeUploadFilter {
|
|
425
|
-
/** Contained by the specified JSON. */
|
|
426
|
-
containedBy?: ConstructiveInternalTypeUpload;
|
|
427
|
-
/** Contains the specified JSON. */
|
|
428
|
-
contains?: ConstructiveInternalTypeUpload;
|
|
429
|
-
/** Contains all of the specified keys. */
|
|
430
|
-
containsAllKeys?: string[];
|
|
431
|
-
/** Contains any of the specified keys. */
|
|
432
|
-
containsAnyKeys?: string[];
|
|
433
|
-
/** Contains the specified key. */
|
|
434
|
-
containsKey?: string;
|
|
435
|
-
/** Not equal to the specified value, treating null like an ordinary value. */
|
|
436
|
-
distinctFrom?: ConstructiveInternalTypeUpload;
|
|
437
|
-
/** Equal to the specified value. */
|
|
438
|
-
equalTo?: ConstructiveInternalTypeUpload;
|
|
439
|
-
/** Greater than the specified value. */
|
|
440
|
-
greaterThan?: ConstructiveInternalTypeUpload;
|
|
441
|
-
/** Greater than or equal to the specified value. */
|
|
442
|
-
greaterThanOrEqualTo?: ConstructiveInternalTypeUpload;
|
|
443
|
-
/** Included in the specified list. */
|
|
444
|
-
in?: ConstructiveInternalTypeUpload[];
|
|
445
|
-
/** Is null (if `true` is specified) or is not null (if `false` is specified). */
|
|
446
|
-
isNull?: boolean;
|
|
447
|
-
/** Less than the specified value. */
|
|
448
|
-
lessThan?: ConstructiveInternalTypeUpload;
|
|
449
|
-
/** Less than or equal to the specified value. */
|
|
450
|
-
lessThanOrEqualTo?: ConstructiveInternalTypeUpload;
|
|
451
|
-
/** Equal to the specified value, treating null like an ordinary value. */
|
|
452
|
-
notDistinctFrom?: ConstructiveInternalTypeUpload;
|
|
453
|
-
/** Not equal to the specified value. */
|
|
454
|
-
notEqualTo?: ConstructiveInternalTypeUpload;
|
|
455
|
-
/** Not included in the specified list. */
|
|
456
|
-
notIn?: ConstructiveInternalTypeUpload[];
|
|
457
|
-
}
|
|
458
|
-
/** An input for mutations affecting `MigrateFile` */
|
|
459
|
-
export interface MigrateFileInput {
|
|
460
|
-
databaseId?: string;
|
|
461
|
-
id?: string;
|
|
462
|
-
upload?: ConstructiveInternalTypeUpload;
|
|
463
|
-
}
|
|
464
|
-
/** An input for mutations affecting `SqlAction` */
|
|
465
|
-
export interface SqlActionInput {
|
|
466
|
-
action?: string;
|
|
467
|
-
actionId?: string;
|
|
468
|
-
actorId?: string;
|
|
469
|
-
category?: string;
|
|
470
|
-
content?: string;
|
|
471
|
-
createdAt?: string;
|
|
472
|
-
databaseId?: string;
|
|
473
|
-
deploy?: string;
|
|
474
|
-
deps?: string[];
|
|
475
|
-
id?: number;
|
|
476
|
-
name?: string;
|
|
477
|
-
payload?: Record<string, unknown>;
|
|
478
|
-
revert?: string;
|
|
479
|
-
verify?: string;
|
|
480
|
-
}
|
|
481
|
-
export interface ExecuteSqlPayload {
|
|
482
|
-
clientMutationId?: string | null;
|
|
483
|
-
}
|
|
484
|
-
export type ExecuteSqlPayloadSelect = {
|
|
485
|
-
clientMutationId?: boolean;
|
|
486
|
-
};
|
|
487
463
|
export interface ProvisionBucketPayload {
|
|
488
464
|
/** The access type applied */
|
|
489
465
|
accessType: string;
|
|
@@ -506,123 +482,3 @@ export type ProvisionBucketPayloadSelect = {
|
|
|
506
482
|
provider?: boolean;
|
|
507
483
|
success?: boolean;
|
|
508
484
|
};
|
|
509
|
-
export interface RunMigrationPayload {
|
|
510
|
-
clientMutationId?: string | null;
|
|
511
|
-
}
|
|
512
|
-
export type RunMigrationPayloadSelect = {
|
|
513
|
-
clientMutationId?: boolean;
|
|
514
|
-
};
|
|
515
|
-
export interface CreateMigrateFilePayload {
|
|
516
|
-
clientMutationId?: string | null;
|
|
517
|
-
/** The `MigrateFile` that was created by this mutation. */
|
|
518
|
-
migrateFile?: MigrateFile | null;
|
|
519
|
-
migrateFileEdge?: MigrateFileEdge | null;
|
|
520
|
-
}
|
|
521
|
-
export type CreateMigrateFilePayloadSelect = {
|
|
522
|
-
clientMutationId?: boolean;
|
|
523
|
-
migrateFile?: {
|
|
524
|
-
select: MigrateFileSelect;
|
|
525
|
-
};
|
|
526
|
-
migrateFileEdge?: {
|
|
527
|
-
select: MigrateFileEdgeSelect;
|
|
528
|
-
};
|
|
529
|
-
};
|
|
530
|
-
export interface UpdateMigrateFilePayload {
|
|
531
|
-
clientMutationId?: string | null;
|
|
532
|
-
/** The `MigrateFile` that was updated by this mutation. */
|
|
533
|
-
migrateFile?: MigrateFile | null;
|
|
534
|
-
migrateFileEdge?: MigrateFileEdge | null;
|
|
535
|
-
}
|
|
536
|
-
export type UpdateMigrateFilePayloadSelect = {
|
|
537
|
-
clientMutationId?: boolean;
|
|
538
|
-
migrateFile?: {
|
|
539
|
-
select: MigrateFileSelect;
|
|
540
|
-
};
|
|
541
|
-
migrateFileEdge?: {
|
|
542
|
-
select: MigrateFileEdgeSelect;
|
|
543
|
-
};
|
|
544
|
-
};
|
|
545
|
-
export interface DeleteMigrateFilePayload {
|
|
546
|
-
clientMutationId?: string | null;
|
|
547
|
-
/** The `MigrateFile` that was deleted by this mutation. */
|
|
548
|
-
migrateFile?: MigrateFile | null;
|
|
549
|
-
migrateFileEdge?: MigrateFileEdge | null;
|
|
550
|
-
}
|
|
551
|
-
export type DeleteMigrateFilePayloadSelect = {
|
|
552
|
-
clientMutationId?: boolean;
|
|
553
|
-
migrateFile?: {
|
|
554
|
-
select: MigrateFileSelect;
|
|
555
|
-
};
|
|
556
|
-
migrateFileEdge?: {
|
|
557
|
-
select: MigrateFileEdgeSelect;
|
|
558
|
-
};
|
|
559
|
-
};
|
|
560
|
-
export interface CreateSqlActionPayload {
|
|
561
|
-
clientMutationId?: string | null;
|
|
562
|
-
/** The `SqlAction` that was created by this mutation. */
|
|
563
|
-
sqlAction?: SqlAction | null;
|
|
564
|
-
sqlActionEdge?: SqlActionEdge | null;
|
|
565
|
-
}
|
|
566
|
-
export type CreateSqlActionPayloadSelect = {
|
|
567
|
-
clientMutationId?: boolean;
|
|
568
|
-
sqlAction?: {
|
|
569
|
-
select: SqlActionSelect;
|
|
570
|
-
};
|
|
571
|
-
sqlActionEdge?: {
|
|
572
|
-
select: SqlActionEdgeSelect;
|
|
573
|
-
};
|
|
574
|
-
};
|
|
575
|
-
export interface UpdateSqlActionPayload {
|
|
576
|
-
clientMutationId?: string | null;
|
|
577
|
-
/** The `SqlAction` that was updated by this mutation. */
|
|
578
|
-
sqlAction?: SqlAction | null;
|
|
579
|
-
sqlActionEdge?: SqlActionEdge | null;
|
|
580
|
-
}
|
|
581
|
-
export type UpdateSqlActionPayloadSelect = {
|
|
582
|
-
clientMutationId?: boolean;
|
|
583
|
-
sqlAction?: {
|
|
584
|
-
select: SqlActionSelect;
|
|
585
|
-
};
|
|
586
|
-
sqlActionEdge?: {
|
|
587
|
-
select: SqlActionEdgeSelect;
|
|
588
|
-
};
|
|
589
|
-
};
|
|
590
|
-
export interface DeleteSqlActionPayload {
|
|
591
|
-
clientMutationId?: string | null;
|
|
592
|
-
/** The `SqlAction` that was deleted by this mutation. */
|
|
593
|
-
sqlAction?: SqlAction | null;
|
|
594
|
-
sqlActionEdge?: SqlActionEdge | null;
|
|
595
|
-
}
|
|
596
|
-
export type DeleteSqlActionPayloadSelect = {
|
|
597
|
-
clientMutationId?: boolean;
|
|
598
|
-
sqlAction?: {
|
|
599
|
-
select: SqlActionSelect;
|
|
600
|
-
};
|
|
601
|
-
sqlActionEdge?: {
|
|
602
|
-
select: SqlActionEdgeSelect;
|
|
603
|
-
};
|
|
604
|
-
};
|
|
605
|
-
/** A `MigrateFile` edge in the connection. */
|
|
606
|
-
export interface MigrateFileEdge {
|
|
607
|
-
cursor?: string | null;
|
|
608
|
-
/** The `MigrateFile` at the end of the edge. */
|
|
609
|
-
node?: MigrateFile | null;
|
|
610
|
-
}
|
|
611
|
-
export type MigrateFileEdgeSelect = {
|
|
612
|
-
cursor?: boolean;
|
|
613
|
-
node?: {
|
|
614
|
-
select: MigrateFileSelect;
|
|
615
|
-
};
|
|
616
|
-
};
|
|
617
|
-
/** A `SqlAction` edge in the connection. */
|
|
618
|
-
export interface SqlActionEdge {
|
|
619
|
-
cursor?: string | null;
|
|
620
|
-
/** The `SqlAction` at the end of the edge. */
|
|
621
|
-
node?: SqlAction | null;
|
|
622
|
-
}
|
|
623
|
-
export type SqlActionEdgeSelect = {
|
|
624
|
-
cursor?: boolean;
|
|
625
|
-
node?: {
|
|
626
|
-
select: SqlActionSelect;
|
|
627
|
-
};
|
|
628
|
-
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AstMigration 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 { AstMigrationWithRelations, AstMigrationSelect, AstMigrationFilter, AstMigrationOrderBy, CreateAstMigrationInput } from '../input-types';
|
|
10
|
+
export declare class AstMigrationModel {
|
|
11
|
+
private client;
|
|
12
|
+
constructor(client: OrmClient);
|
|
13
|
+
findMany<S extends AstMigrationSelect>(args: FindManyArgs<S, AstMigrationFilter, AstMigrationOrderBy> & {
|
|
14
|
+
select: S;
|
|
15
|
+
} & StrictSelect<S, AstMigrationSelect>): QueryBuilder<{
|
|
16
|
+
astMigrations: ConnectionResult<InferSelectResult<AstMigrationWithRelations, S>>;
|
|
17
|
+
}>;
|
|
18
|
+
findFirst<S extends AstMigrationSelect>(args: FindFirstArgs<S, AstMigrationFilter, AstMigrationOrderBy> & {
|
|
19
|
+
select: S;
|
|
20
|
+
} & StrictSelect<S, AstMigrationSelect>): QueryBuilder<{
|
|
21
|
+
astMigration: InferSelectResult<AstMigrationWithRelations, S> | null;
|
|
22
|
+
}>;
|
|
23
|
+
findOne<S extends AstMigrationSelect>(args: {
|
|
24
|
+
id: number;
|
|
25
|
+
select: S;
|
|
26
|
+
} & StrictSelect<S, AstMigrationSelect>): QueryBuilder<{
|
|
27
|
+
astMigration: InferSelectResult<AstMigrationWithRelations, S> | null;
|
|
28
|
+
}>;
|
|
29
|
+
create<S extends AstMigrationSelect>(args: CreateArgs<S, CreateAstMigrationInput['astMigration']> & {
|
|
30
|
+
select: S;
|
|
31
|
+
} & StrictSelect<S, AstMigrationSelect>): QueryBuilder<{
|
|
32
|
+
createAstMigration: {
|
|
33
|
+
astMigration: InferSelectResult<AstMigrationWithRelations, S>;
|
|
34
|
+
};
|
|
35
|
+
}>;
|
|
36
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AstMigrationModel = void 0;
|
|
4
|
+
const query_builder_1 = require("../query-builder");
|
|
5
|
+
const input_types_1 = require("../input-types");
|
|
6
|
+
class AstMigrationModel {
|
|
7
|
+
client;
|
|
8
|
+
constructor(client) {
|
|
9
|
+
this.client = client;
|
|
10
|
+
}
|
|
11
|
+
findMany(args) {
|
|
12
|
+
const { document, variables } = (0, query_builder_1.buildFindManyDocument)('AstMigration', 'astMigrations', args.select, {
|
|
13
|
+
where: args?.where,
|
|
14
|
+
orderBy: args?.orderBy,
|
|
15
|
+
first: args?.first,
|
|
16
|
+
last: args?.last,
|
|
17
|
+
after: args?.after,
|
|
18
|
+
before: args?.before,
|
|
19
|
+
offset: args?.offset,
|
|
20
|
+
}, 'AstMigrationFilter', 'AstMigrationOrderBy', input_types_1.connectionFieldsMap);
|
|
21
|
+
return new query_builder_1.QueryBuilder({
|
|
22
|
+
client: this.client,
|
|
23
|
+
operation: 'query',
|
|
24
|
+
operationName: 'AstMigration',
|
|
25
|
+
fieldName: 'astMigrations',
|
|
26
|
+
document,
|
|
27
|
+
variables,
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
findFirst(args) {
|
|
31
|
+
const { document, variables } = (0, query_builder_1.buildFindFirstDocument)('AstMigration', 'astMigrations', args.select, {
|
|
32
|
+
where: args?.where,
|
|
33
|
+
orderBy: args?.orderBy,
|
|
34
|
+
}, 'AstMigrationFilter', 'AstMigrationOrderBy', input_types_1.connectionFieldsMap);
|
|
35
|
+
return new query_builder_1.QueryBuilder({
|
|
36
|
+
client: this.client,
|
|
37
|
+
operation: 'query',
|
|
38
|
+
operationName: 'AstMigration',
|
|
39
|
+
fieldName: 'astMigration',
|
|
40
|
+
document,
|
|
41
|
+
variables,
|
|
42
|
+
transform: (data) => ({
|
|
43
|
+
astMigration: data.astMigrations?.nodes?.[0] ?? null,
|
|
44
|
+
}),
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
findOne(args) {
|
|
48
|
+
const { document, variables } = (0, query_builder_1.buildFindManyDocument)('AstMigration', 'astMigrations', args.select, {
|
|
49
|
+
where: {
|
|
50
|
+
id: {
|
|
51
|
+
equalTo: args.id,
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
first: 1,
|
|
55
|
+
}, 'AstMigrationFilter', 'AstMigrationOrderBy', input_types_1.connectionFieldsMap);
|
|
56
|
+
return new query_builder_1.QueryBuilder({
|
|
57
|
+
client: this.client,
|
|
58
|
+
operation: 'query',
|
|
59
|
+
operationName: 'AstMigration',
|
|
60
|
+
fieldName: 'astMigration',
|
|
61
|
+
document,
|
|
62
|
+
variables,
|
|
63
|
+
transform: (data) => ({
|
|
64
|
+
astMigration: data.astMigrations?.nodes?.[0] ?? null,
|
|
65
|
+
}),
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
create(args) {
|
|
69
|
+
const { document, variables } = (0, query_builder_1.buildCreateDocument)('AstMigration', 'createAstMigration', 'astMigration', args.select, args.data, 'CreateAstMigrationInput', input_types_1.connectionFieldsMap);
|
|
70
|
+
return new query_builder_1.QueryBuilder({
|
|
71
|
+
client: this.client,
|
|
72
|
+
operation: 'mutation',
|
|
73
|
+
operationName: 'AstMigration',
|
|
74
|
+
fieldName: 'createAstMigration',
|
|
75
|
+
document,
|
|
76
|
+
variables,
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
exports.AstMigrationModel = AstMigrationModel;
|