@constructive-io/react 0.18.8 → 0.19.0
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/hooks/index.d.ts +1 -1
- package/admin/hooks/index.js +1 -1
- package/admin/hooks/invalidation.d.ts +6 -0
- package/admin/hooks/invalidation.js +16 -0
- package/admin/hooks/mutation-keys.d.ts +12 -0
- package/admin/hooks/mutation-keys.js +8 -1
- package/admin/hooks/mutations/index.d.ts +3 -0
- package/admin/hooks/mutations/index.js +3 -0
- package/admin/hooks/mutations/useCreateUsageSnapshotMutation.d.ts +34 -0
- package/admin/hooks/mutations/useCreateUsageSnapshotMutation.js +34 -0
- package/admin/hooks/mutations/useDeleteUsageSnapshotMutation.d.ts +38 -0
- package/admin/hooks/mutations/useDeleteUsageSnapshotMutation.js +39 -0
- package/admin/hooks/mutations/useUpdateUsageSnapshotMutation.d.ts +40 -0
- package/admin/hooks/mutations/useUpdateUsageSnapshotMutation.js +40 -0
- package/admin/hooks/queries/index.d.ts +2 -0
- package/admin/hooks/queries/index.js +2 -0
- package/admin/hooks/queries/useUsageSnapshotQuery.d.ts +65 -0
- package/admin/hooks/queries/useUsageSnapshotQuery.js +53 -0
- package/admin/hooks/queries/useUsageSnapshotsQuery.d.ts +69 -0
- package/admin/hooks/queries/useUsageSnapshotsQuery.js +38 -0
- package/admin/hooks/query-keys.d.ts +14 -0
- package/admin/hooks/query-keys.js +9 -1
- package/admin/orm/index.d.ts +2 -0
- package/admin/orm/index.js +2 -0
- package/admin/orm/input-types.d.ts +129 -0
- package/admin/orm/models/index.d.ts +1 -0
- package/admin/orm/models/index.js +3 -1
- package/admin/orm/models/usageSnapshot.d.ts +56 -0
- package/admin/orm/models/usageSnapshot.js +100 -0
- package/admin/schema-types.d.ts +98 -1
- package/admin/types.d.ts +8 -0
- package/esm/admin/hooks/index.d.ts +1 -1
- package/esm/admin/hooks/index.js +1 -1
- package/esm/admin/hooks/invalidation.d.ts +6 -0
- package/esm/admin/hooks/invalidation.js +17 -1
- package/esm/admin/hooks/mutation-keys.d.ts +12 -0
- package/esm/admin/hooks/mutation-keys.js +7 -0
- package/esm/admin/hooks/mutations/index.d.ts +3 -0
- package/esm/admin/hooks/mutations/index.js +3 -0
- package/esm/admin/hooks/mutations/useCreateUsageSnapshotMutation.d.ts +34 -0
- package/esm/admin/hooks/mutations/useCreateUsageSnapshotMutation.js +31 -0
- package/esm/admin/hooks/mutations/useDeleteUsageSnapshotMutation.d.ts +38 -0
- package/esm/admin/hooks/mutations/useDeleteUsageSnapshotMutation.js +36 -0
- package/esm/admin/hooks/mutations/useUpdateUsageSnapshotMutation.d.ts +40 -0
- package/esm/admin/hooks/mutations/useUpdateUsageSnapshotMutation.js +37 -0
- package/esm/admin/hooks/queries/index.d.ts +2 -0
- package/esm/admin/hooks/queries/index.js +2 -0
- package/esm/admin/hooks/queries/useUsageSnapshotQuery.d.ts +65 -0
- package/esm/admin/hooks/queries/useUsageSnapshotQuery.js +47 -0
- package/esm/admin/hooks/queries/useUsageSnapshotsQuery.d.ts +69 -0
- package/esm/admin/hooks/queries/useUsageSnapshotsQuery.js +32 -0
- package/esm/admin/hooks/query-keys.d.ts +14 -0
- package/esm/admin/hooks/query-keys.js +8 -0
- package/esm/admin/orm/index.d.ts +2 -0
- package/esm/admin/orm/index.js +2 -0
- package/esm/admin/orm/input-types.d.ts +129 -0
- package/esm/admin/orm/models/index.d.ts +1 -0
- package/esm/admin/orm/models/index.js +1 -0
- package/esm/admin/orm/models/usageSnapshot.d.ts +56 -0
- package/esm/admin/orm/models/usageSnapshot.js +96 -0
- package/esm/admin/schema-types.d.ts +98 -1
- package/esm/admin/types.d.ts +8 -0
- package/esm/public/hooks/index.d.ts +1 -1
- package/esm/public/hooks/index.js +1 -1
- package/esm/public/hooks/invalidation.d.ts +6 -0
- package/esm/public/hooks/invalidation.js +17 -1
- package/esm/public/hooks/mutation-keys.d.ts +12 -4
- package/esm/public/hooks/mutation-keys.js +7 -6
- package/esm/public/hooks/mutations/index.d.ts +3 -2
- package/esm/public/hooks/mutations/index.js +3 -2
- package/esm/public/hooks/mutations/useCreateUsageSnapshotMutation.d.ts +34 -0
- package/esm/public/hooks/mutations/useCreateUsageSnapshotMutation.js +31 -0
- package/esm/public/hooks/mutations/useDeleteUsageSnapshotMutation.d.ts +38 -0
- package/esm/public/hooks/mutations/useDeleteUsageSnapshotMutation.js +36 -0
- package/esm/public/hooks/mutations/useUpdateUsageSnapshotMutation.d.ts +40 -0
- package/esm/public/hooks/mutations/useUpdateUsageSnapshotMutation.js +37 -0
- package/esm/public/hooks/queries/index.d.ts +2 -0
- package/esm/public/hooks/queries/index.js +2 -0
- package/esm/public/hooks/queries/useUsageSnapshotQuery.d.ts +65 -0
- package/esm/public/hooks/queries/useUsageSnapshotQuery.js +47 -0
- package/esm/public/hooks/queries/useUsageSnapshotsQuery.d.ts +69 -0
- package/esm/public/hooks/queries/useUsageSnapshotsQuery.js +32 -0
- package/esm/public/hooks/query-keys.d.ts +14 -0
- package/esm/public/hooks/query-keys.js +8 -0
- package/esm/public/orm/index.d.ts +2 -10
- package/esm/public/orm/index.js +2 -0
- package/esm/public/orm/input-types.d.ts +129 -22
- package/esm/public/orm/models/index.d.ts +1 -0
- package/esm/public/orm/models/index.js +1 -0
- package/esm/public/orm/models/usageSnapshot.d.ts +56 -0
- package/esm/public/orm/models/usageSnapshot.js +96 -0
- package/esm/public/orm/mutation/index.d.ts +1 -17
- package/esm/public/orm/mutation/index.js +0 -24
- package/esm/public/schema-types.d.ts +367 -286
- package/esm/public/types.d.ts +8 -0
- package/package.json +6 -6
- package/public/hooks/index.d.ts +1 -1
- package/public/hooks/index.js +1 -1
- package/public/hooks/invalidation.d.ts +6 -0
- package/public/hooks/invalidation.js +16 -0
- package/public/hooks/mutation-keys.d.ts +12 -4
- package/public/hooks/mutation-keys.js +9 -7
- package/public/hooks/mutations/index.d.ts +3 -2
- package/public/hooks/mutations/index.js +3 -2
- package/public/hooks/mutations/useCreateUsageSnapshotMutation.d.ts +34 -0
- package/public/hooks/mutations/useCreateUsageSnapshotMutation.js +34 -0
- package/public/hooks/mutations/useDeleteUsageSnapshotMutation.d.ts +38 -0
- package/public/hooks/mutations/useDeleteUsageSnapshotMutation.js +39 -0
- package/public/hooks/mutations/useUpdateUsageSnapshotMutation.d.ts +40 -0
- package/public/hooks/mutations/useUpdateUsageSnapshotMutation.js +40 -0
- package/public/hooks/queries/index.d.ts +2 -0
- package/public/hooks/queries/index.js +2 -0
- package/public/hooks/queries/useUsageSnapshotQuery.d.ts +65 -0
- package/public/hooks/queries/useUsageSnapshotQuery.js +53 -0
- package/public/hooks/queries/useUsageSnapshotsQuery.d.ts +69 -0
- package/public/hooks/queries/useUsageSnapshotsQuery.js +38 -0
- package/public/hooks/query-keys.d.ts +14 -0
- package/public/hooks/query-keys.js +10 -1
- package/public/orm/index.d.ts +2 -10
- package/public/orm/index.js +2 -0
- package/public/orm/input-types.d.ts +129 -22
- package/public/orm/models/index.d.ts +1 -0
- package/public/orm/models/index.js +3 -1
- package/public/orm/models/usageSnapshot.d.ts +56 -0
- package/public/orm/models/usageSnapshot.js +100 -0
- package/public/orm/mutation/index.d.ts +1 -17
- package/public/orm/mutation/index.js +0 -24
- package/public/schema-types.d.ts +367 -286
- package/public/types.d.ts +8 -0
- package/esm/public/hooks/mutations/useAppendFieldSmartTagsMutation.d.ts +0 -20
- package/esm/public/hooks/mutations/useAppendFieldSmartTagsMutation.js +0 -23
- package/esm/public/hooks/mutations/useAppendTableSmartTagsMutation.d.ts +0 -20
- package/esm/public/hooks/mutations/useAppendTableSmartTagsMutation.js +0 -23
- package/public/hooks/mutations/useAppendFieldSmartTagsMutation.d.ts +0 -20
- package/public/hooks/mutations/useAppendFieldSmartTagsMutation.js +0 -26
- package/public/hooks/mutations/useAppendTableSmartTagsMutation.d.ts +0 -20
- package/public/hooks/mutations/useAppendTableSmartTagsMutation.js +0 -26
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Periodic snapshot of a single metric for a database. Collected by the snapshot_usage() cron job in constructive-limits. Each row records one metric measurement (e.g. reads, writes, storage_bytes) at a point in time, with optional dimensions for sub-metric breakdowns.
|
|
3
|
+
* @generated by @constructive-io/graphql-codegen
|
|
4
|
+
* DO NOT EDIT - changes will be overwritten
|
|
5
|
+
*/
|
|
6
|
+
import { useQuery } from '@tanstack/react-query';
|
|
7
|
+
import { getClient } from '../client';
|
|
8
|
+
import { buildListSelectionArgs } from '../selection';
|
|
9
|
+
import { usageSnapshotKeys } from '../query-keys';
|
|
10
|
+
/** Query key factory - re-exported from query-keys.ts */
|
|
11
|
+
export const usageSnapshotsQueryKey = usageSnapshotKeys.list;
|
|
12
|
+
export function useUsageSnapshotsQuery(params) {
|
|
13
|
+
const args = buildListSelectionArgs(params.selection);
|
|
14
|
+
const { selection: _selection, ...queryOptions } = params ?? {};
|
|
15
|
+
void _selection;
|
|
16
|
+
return useQuery({
|
|
17
|
+
queryKey: usageSnapshotKeys.list(args),
|
|
18
|
+
queryFn: () => getClient().usageSnapshot.findMany(args).unwrap(),
|
|
19
|
+
...queryOptions,
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
export async function fetchUsageSnapshotsQuery(params) {
|
|
23
|
+
const args = buildListSelectionArgs(params.selection);
|
|
24
|
+
return getClient().usageSnapshot.findMany(args).unwrap();
|
|
25
|
+
}
|
|
26
|
+
export async function prefetchUsageSnapshotsQuery(queryClient, params) {
|
|
27
|
+
const args = buildListSelectionArgs(params.selection);
|
|
28
|
+
await queryClient.prefetchQuery({
|
|
29
|
+
queryKey: usageSnapshotKeys.list(args),
|
|
30
|
+
queryFn: () => getClient().usageSnapshot.findMany(args).unwrap(),
|
|
31
|
+
});
|
|
32
|
+
}
|
|
@@ -920,6 +920,13 @@ export declare const rateLimitsModuleKeys: {
|
|
|
920
920
|
/** Detail query keys */ readonly details: () => readonly ["ratelimitsmodule", "detail"];
|
|
921
921
|
/** Detail query key for specific item */ readonly detail: (id: string | number) => readonly ["ratelimitsmodule", "detail", string | number];
|
|
922
922
|
};
|
|
923
|
+
export declare const usageSnapshotKeys: {
|
|
924
|
+
/** All usageSnapshot queries */ readonly all: readonly ["usagesnapshot"];
|
|
925
|
+
/** List query keys */ readonly lists: () => readonly ["usagesnapshot", "list"];
|
|
926
|
+
/** List query key with variables */ readonly list: (variables?: object) => readonly ["usagesnapshot", "list", object];
|
|
927
|
+
/** Detail query keys */ readonly details: () => readonly ["usagesnapshot", "detail"];
|
|
928
|
+
/** Detail query key for specific item */ readonly detail: (id: string | number) => readonly ["usagesnapshot", "detail", string | number];
|
|
929
|
+
};
|
|
923
930
|
export declare const appMembershipDefaultKeys: {
|
|
924
931
|
/** All appMembershipDefault queries */ readonly all: readonly ["appmembershipdefault"];
|
|
925
932
|
/** List query keys */ readonly lists: () => readonly ["appmembershipdefault", "list"];
|
|
@@ -2003,6 +2010,13 @@ export declare const queryKeys: {
|
|
|
2003
2010
|
/** Detail query keys */ readonly details: () => readonly ["ratelimitsmodule", "detail"];
|
|
2004
2011
|
/** Detail query key for specific item */ readonly detail: (id: string | number) => readonly ["ratelimitsmodule", "detail", string | number];
|
|
2005
2012
|
};
|
|
2013
|
+
readonly usageSnapshot: {
|
|
2014
|
+
/** All usageSnapshot queries */ readonly all: readonly ["usagesnapshot"];
|
|
2015
|
+
/** List query keys */ readonly lists: () => readonly ["usagesnapshot", "list"];
|
|
2016
|
+
/** List query key with variables */ readonly list: (variables?: object) => readonly ["usagesnapshot", "list", object];
|
|
2017
|
+
/** Detail query keys */ readonly details: () => readonly ["usagesnapshot", "detail"];
|
|
2018
|
+
/** Detail query key for specific item */ readonly detail: (id: string | number) => readonly ["usagesnapshot", "detail", string | number];
|
|
2019
|
+
};
|
|
2006
2020
|
readonly appMembershipDefault: {
|
|
2007
2021
|
/** All appMembershipDefault queries */ readonly all: readonly ["appmembershipdefault"];
|
|
2008
2022
|
/** List query keys */ readonly lists: () => readonly ["appmembershipdefault", "list"];
|
|
@@ -933,6 +933,13 @@ export const rateLimitsModuleKeys = {
|
|
|
933
933
|
/** Detail query keys */ details: () => [...rateLimitsModuleKeys.all, 'detail'],
|
|
934
934
|
/** Detail query key for specific item */ detail: (id) => [...rateLimitsModuleKeys.details(), id],
|
|
935
935
|
};
|
|
936
|
+
export const usageSnapshotKeys = {
|
|
937
|
+
/** All usageSnapshot queries */ all: ['usagesnapshot'],
|
|
938
|
+
/** List query keys */ lists: () => [...usageSnapshotKeys.all, 'list'],
|
|
939
|
+
/** List query key with variables */ list: (variables) => [...usageSnapshotKeys.lists(), variables],
|
|
940
|
+
/** Detail query keys */ details: () => [...usageSnapshotKeys.all, 'detail'],
|
|
941
|
+
/** Detail query key for specific item */ detail: (id) => [...usageSnapshotKeys.details(), id],
|
|
942
|
+
};
|
|
936
943
|
export const appMembershipDefaultKeys = {
|
|
937
944
|
/** All appMembershipDefault queries */ all: ['appmembershipdefault'],
|
|
938
945
|
/** List query keys */ lists: () => [...appMembershipDefaultKeys.all, 'list'],
|
|
@@ -1233,6 +1240,7 @@ export const queryKeys = {
|
|
|
1233
1240
|
commit: commitKeys,
|
|
1234
1241
|
pubkeySetting: pubkeySettingKeys,
|
|
1235
1242
|
rateLimitsModule: rateLimitsModuleKeys,
|
|
1243
|
+
usageSnapshot: usageSnapshotKeys,
|
|
1236
1244
|
appMembershipDefault: appMembershipDefaultKeys,
|
|
1237
1245
|
orgMembershipDefault: orgMembershipDefaultKeys,
|
|
1238
1246
|
rlsSetting: rlsSettingKeys,
|
|
@@ -130,6 +130,7 @@ import { UserConnectedAccountModel } from './models/userConnectedAccount';
|
|
|
130
130
|
import { CommitModel } from './models/commit';
|
|
131
131
|
import { PubkeySettingModel } from './models/pubkeySetting';
|
|
132
132
|
import { RateLimitsModuleModel } from './models/rateLimitsModule';
|
|
133
|
+
import { UsageSnapshotModel } from './models/usageSnapshot';
|
|
133
134
|
import { AppMembershipDefaultModel } from './models/appMembershipDefault';
|
|
134
135
|
import { OrgMembershipDefaultModel } from './models/orgMembershipDefault';
|
|
135
136
|
import { RlsSettingModel } from './models/rlsSetting';
|
|
@@ -309,6 +310,7 @@ export declare function createClient(config: OrmClientConfig): {
|
|
|
309
310
|
commit: CommitModel;
|
|
310
311
|
pubkeySetting: PubkeySettingModel;
|
|
311
312
|
rateLimitsModule: RateLimitsModuleModel;
|
|
313
|
+
usageSnapshot: UsageSnapshotModel;
|
|
312
314
|
appMembershipDefault: AppMembershipDefaultModel;
|
|
313
315
|
orgMembershipDefault: OrgMembershipDefaultModel;
|
|
314
316
|
rlsSetting: RlsSettingModel;
|
|
@@ -569,16 +571,6 @@ export declare function createClient(config: OrmClientConfig): {
|
|
|
569
571
|
} & import("./select-types").StrictSelect<S, import("./input-types").SetFieldOrderPayloadSelect>) => import("./query-builder").QueryBuilder<{
|
|
570
572
|
setFieldOrder: import("./select-types").InferSelectResult<import("./input-types").SetFieldOrderPayload, S> | null;
|
|
571
573
|
}>;
|
|
572
|
-
appendFieldSmartTags: <S extends import("./input-types").AppendFieldSmartTagsPayloadSelect>(args: import("./mutation").AppendFieldSmartTagsVariables, options: {
|
|
573
|
-
select: S;
|
|
574
|
-
} & import("./select-types").StrictSelect<S, import("./input-types").AppendFieldSmartTagsPayloadSelect>) => import("./query-builder").QueryBuilder<{
|
|
575
|
-
appendFieldSmartTags: import("./select-types").InferSelectResult<import("./input-types").AppendFieldSmartTagsPayload, S> | null;
|
|
576
|
-
}>;
|
|
577
|
-
appendTableSmartTags: <S extends import("./input-types").AppendTableSmartTagsPayloadSelect>(args: import("./mutation").AppendTableSmartTagsVariables, options: {
|
|
578
|
-
select: S;
|
|
579
|
-
} & import("./select-types").StrictSelect<S, import("./input-types").AppendTableSmartTagsPayloadSelect>) => import("./query-builder").QueryBuilder<{
|
|
580
|
-
appendTableSmartTags: import("./select-types").InferSelectResult<import("./input-types").AppendTableSmartTagsPayload, S> | null;
|
|
581
|
-
}>;
|
|
582
574
|
provisionUniqueConstraint: <S extends import("./input-types").ProvisionUniqueConstraintPayloadSelect>(args: import("./mutation").ProvisionUniqueConstraintVariables, options: {
|
|
583
575
|
select: S;
|
|
584
576
|
} & import("./select-types").StrictSelect<S, import("./input-types").ProvisionUniqueConstraintPayloadSelect>) => import("./query-builder").QueryBuilder<{
|
package/esm/public/orm/index.js
CHANGED
|
@@ -135,6 +135,7 @@ import { UserConnectedAccountModel } from './models/userConnectedAccount';
|
|
|
135
135
|
import { CommitModel } from './models/commit';
|
|
136
136
|
import { PubkeySettingModel } from './models/pubkeySetting';
|
|
137
137
|
import { RateLimitsModuleModel } from './models/rateLimitsModule';
|
|
138
|
+
import { UsageSnapshotModel } from './models/usageSnapshot';
|
|
138
139
|
import { AppMembershipDefaultModel } from './models/appMembershipDefault';
|
|
139
140
|
import { OrgMembershipDefaultModel } from './models/orgMembershipDefault';
|
|
140
141
|
import { RlsSettingModel } from './models/rlsSetting';
|
|
@@ -317,6 +318,7 @@ export function createClient(config) {
|
|
|
317
318
|
commit: new CommitModel(client),
|
|
318
319
|
pubkeySetting: new PubkeySettingModel(client),
|
|
319
320
|
rateLimitsModule: new RateLimitsModuleModel(client),
|
|
321
|
+
usageSnapshot: new UsageSnapshotModel(client),
|
|
320
322
|
appMembershipDefault: new AppMembershipDefaultModel(client),
|
|
321
323
|
orgMembershipDefault: new OrgMembershipDefaultModel(client),
|
|
322
324
|
rlsSetting: new RlsSettingModel(client),
|
|
@@ -2521,6 +2521,20 @@ export interface RateLimitsModule {
|
|
|
2521
2521
|
ipRateLimitsTable?: string | null;
|
|
2522
2522
|
rateLimitsTable?: string | null;
|
|
2523
2523
|
}
|
|
2524
|
+
/** Periodic snapshot of a single metric for a database. Collected by the snapshot_usage() cron job in constructive-limits. Each row records one metric measurement (e.g. reads, writes, storage_bytes) at a point in time, with optional dimensions for sub-metric breakdowns. */
|
|
2525
|
+
export interface UsageSnapshot {
|
|
2526
|
+
/** The database this snapshot belongs to. References metaschema_public.database.id but declared without an FK constraint — the snapshot collector runs in a platform context where the FK would add overhead without value. */
|
|
2527
|
+
databaseId?: string | null;
|
|
2528
|
+
/** Identifier for the metric being measured (e.g. 'reads', 'writes', 'storage_bytes', 'compute_time_ms'). */
|
|
2529
|
+
metricName?: string | null;
|
|
2530
|
+
/** The measured value at the time of capture. Interpretation depends on metric_name (count, bytes, milliseconds, etc.). */
|
|
2531
|
+
metricValue?: string | null;
|
|
2532
|
+
/** Optional sub-metric breakdowns as key-value pairs (e.g. {"query_type": "select"} for reads). Empty object when no breakdown is needed. */
|
|
2533
|
+
dimensions?: Record<string, unknown> | null;
|
|
2534
|
+
/** When this snapshot was taken. Defaults to the current timestamp; the snapshot collector may override this for backdated imports. */
|
|
2535
|
+
capturedAt?: string | null;
|
|
2536
|
+
id: string;
|
|
2537
|
+
}
|
|
2524
2538
|
/** Default membership settings per entity, controlling initial approval and verification state for new members */
|
|
2525
2539
|
export interface AppMembershipDefault {
|
|
2526
2540
|
id: string;
|
|
@@ -3628,6 +3642,8 @@ export interface RateLimitsModuleRelations {
|
|
|
3628
3642
|
rateLimitsTableByRateLimitsTableId?: Table | null;
|
|
3629
3643
|
schema?: Schema | null;
|
|
3630
3644
|
}
|
|
3645
|
+
export interface UsageSnapshotRelations {
|
|
3646
|
+
}
|
|
3631
3647
|
export interface AppMembershipDefaultRelations {
|
|
3632
3648
|
}
|
|
3633
3649
|
export interface OrgMembershipDefaultRelations {
|
|
@@ -3917,6 +3933,7 @@ export type UserConnectedAccountWithRelations = UserConnectedAccount & UserConne
|
|
|
3917
3933
|
export type CommitWithRelations = Commit & CommitRelations;
|
|
3918
3934
|
export type PubkeySettingWithRelations = PubkeySetting & PubkeySettingRelations;
|
|
3919
3935
|
export type RateLimitsModuleWithRelations = RateLimitsModule & RateLimitsModuleRelations;
|
|
3936
|
+
export type UsageSnapshotWithRelations = UsageSnapshot & UsageSnapshotRelations;
|
|
3920
3937
|
export type AppMembershipDefaultWithRelations = AppMembershipDefault & AppMembershipDefaultRelations;
|
|
3921
3938
|
export type OrgMembershipDefaultWithRelations = OrgMembershipDefault & OrgMembershipDefaultRelations;
|
|
3922
3939
|
export type RlsSettingWithRelations = RlsSetting & RlsSettingRelations;
|
|
@@ -7330,6 +7347,14 @@ export type RateLimitsModuleSelect = {
|
|
|
7330
7347
|
select: SchemaSelect;
|
|
7331
7348
|
};
|
|
7332
7349
|
};
|
|
7350
|
+
export type UsageSnapshotSelect = {
|
|
7351
|
+
databaseId?: boolean;
|
|
7352
|
+
metricName?: boolean;
|
|
7353
|
+
metricValue?: boolean;
|
|
7354
|
+
dimensions?: boolean;
|
|
7355
|
+
capturedAt?: boolean;
|
|
7356
|
+
id?: boolean;
|
|
7357
|
+
};
|
|
7333
7358
|
export type AppMembershipDefaultSelect = {
|
|
7334
7359
|
id?: boolean;
|
|
7335
7360
|
createdAt?: boolean;
|
|
@@ -13088,6 +13113,26 @@ export interface RateLimitsModuleFilter {
|
|
|
13088
13113
|
/** Filter by the object’s `schema` relation. */
|
|
13089
13114
|
schema?: SchemaFilter;
|
|
13090
13115
|
}
|
|
13116
|
+
export interface UsageSnapshotFilter {
|
|
13117
|
+
/** Filter by the object’s `databaseId` field. */
|
|
13118
|
+
databaseId?: UUIDFilter;
|
|
13119
|
+
/** Filter by the object’s `metricName` field. */
|
|
13120
|
+
metricName?: StringFilter;
|
|
13121
|
+
/** Filter by the object’s `metricValue` field. */
|
|
13122
|
+
metricValue?: BigIntFilter;
|
|
13123
|
+
/** Filter by the object’s `dimensions` field. */
|
|
13124
|
+
dimensions?: JSONFilter;
|
|
13125
|
+
/** Filter by the object’s `capturedAt` field. */
|
|
13126
|
+
capturedAt?: DatetimeFilter;
|
|
13127
|
+
/** Filter by the object’s `id` field. */
|
|
13128
|
+
id?: UUIDFilter;
|
|
13129
|
+
/** Checks for all expressions in this list. */
|
|
13130
|
+
and?: UsageSnapshotFilter[];
|
|
13131
|
+
/** Checks for any expressions in this list. */
|
|
13132
|
+
or?: UsageSnapshotFilter[];
|
|
13133
|
+
/** Negates the expression. */
|
|
13134
|
+
not?: UsageSnapshotFilter;
|
|
13135
|
+
}
|
|
13091
13136
|
export interface AppMembershipDefaultFilter {
|
|
13092
13137
|
/** Filter by the object’s `id` field. */
|
|
13093
13138
|
id?: UUIDFilter;
|
|
@@ -14206,6 +14251,7 @@ export type UserConnectedAccountOrderBy = 'NATURAL' | 'ID_ASC' | 'ID_DESC' | 'OW
|
|
|
14206
14251
|
export type CommitOrderBy = 'NATURAL' | 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' | 'ID_ASC' | 'ID_DESC' | 'MESSAGE_ASC' | 'MESSAGE_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' | 'STORE_ID_ASC' | 'STORE_ID_DESC' | 'PARENT_IDS_ASC' | 'PARENT_IDS_DESC' | 'AUTHOR_ID_ASC' | 'AUTHOR_ID_DESC' | 'COMMITTER_ID_ASC' | 'COMMITTER_ID_DESC' | 'TREE_ID_ASC' | 'TREE_ID_DESC' | 'DATE_ASC' | 'DATE_DESC';
|
|
14207
14252
|
export type PubkeySettingOrderBy = 'NATURAL' | 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' | 'ID_ASC' | 'ID_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' | 'SCHEMA_ID_ASC' | 'SCHEMA_ID_DESC' | 'CRYPTO_NETWORK_ASC' | 'CRYPTO_NETWORK_DESC' | 'USER_FIELD_ASC' | 'USER_FIELD_DESC' | 'SIGN_UP_WITH_KEY_FUNCTION_ID_ASC' | 'SIGN_UP_WITH_KEY_FUNCTION_ID_DESC' | 'SIGN_IN_REQUEST_CHALLENGE_FUNCTION_ID_ASC' | 'SIGN_IN_REQUEST_CHALLENGE_FUNCTION_ID_DESC' | 'SIGN_IN_RECORD_FAILURE_FUNCTION_ID_ASC' | 'SIGN_IN_RECORD_FAILURE_FUNCTION_ID_DESC' | 'SIGN_IN_WITH_CHALLENGE_FUNCTION_ID_ASC' | 'SIGN_IN_WITH_CHALLENGE_FUNCTION_ID_DESC';
|
|
14208
14253
|
export type RateLimitsModuleOrderBy = 'NATURAL' | 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' | 'ID_ASC' | 'ID_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' | 'SCHEMA_ID_ASC' | 'SCHEMA_ID_DESC' | 'RATE_LIMIT_SETTINGS_TABLE_ID_ASC' | 'RATE_LIMIT_SETTINGS_TABLE_ID_DESC' | 'IP_RATE_LIMITS_TABLE_ID_ASC' | 'IP_RATE_LIMITS_TABLE_ID_DESC' | 'RATE_LIMITS_TABLE_ID_ASC' | 'RATE_LIMITS_TABLE_ID_DESC' | 'RATE_LIMIT_SETTINGS_TABLE_ASC' | 'RATE_LIMIT_SETTINGS_TABLE_DESC' | 'IP_RATE_LIMITS_TABLE_ASC' | 'IP_RATE_LIMITS_TABLE_DESC' | 'RATE_LIMITS_TABLE_ASC' | 'RATE_LIMITS_TABLE_DESC';
|
|
14254
|
+
export type UsageSnapshotOrderBy = 'NATURAL' | 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' | 'METRIC_NAME_ASC' | 'METRIC_NAME_DESC' | 'METRIC_VALUE_ASC' | 'METRIC_VALUE_DESC' | 'DIMENSIONS_ASC' | 'DIMENSIONS_DESC' | 'CAPTURED_AT_ASC' | 'CAPTURED_AT_DESC' | 'ID_ASC' | 'ID_DESC';
|
|
14209
14255
|
export type AppMembershipDefaultOrderBy = 'NATURAL' | 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' | 'ID_ASC' | 'ID_DESC' | 'CREATED_AT_ASC' | 'CREATED_AT_DESC' | 'UPDATED_AT_ASC' | 'UPDATED_AT_DESC' | 'CREATED_BY_ASC' | 'CREATED_BY_DESC' | 'UPDATED_BY_ASC' | 'UPDATED_BY_DESC' | 'IS_APPROVED_ASC' | 'IS_APPROVED_DESC' | 'IS_VERIFIED_ASC' | 'IS_VERIFIED_DESC';
|
|
14210
14256
|
export type OrgMembershipDefaultOrderBy = 'NATURAL' | 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' | 'ID_ASC' | 'ID_DESC' | 'CREATED_AT_ASC' | 'CREATED_AT_DESC' | 'UPDATED_AT_ASC' | 'UPDATED_AT_DESC' | 'CREATED_BY_ASC' | 'CREATED_BY_DESC' | 'UPDATED_BY_ASC' | 'UPDATED_BY_DESC' | 'IS_APPROVED_ASC' | 'IS_APPROVED_DESC' | 'ENTITY_ID_ASC' | 'ENTITY_ID_DESC';
|
|
14211
14257
|
export type RlsSettingOrderBy = 'NATURAL' | 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' | 'ID_ASC' | 'ID_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' | 'AUTHENTICATE_SCHEMA_ID_ASC' | 'AUTHENTICATE_SCHEMA_ID_DESC' | 'ROLE_SCHEMA_ID_ASC' | 'ROLE_SCHEMA_ID_DESC' | 'AUTHENTICATE_FUNCTION_ID_ASC' | 'AUTHENTICATE_FUNCTION_ID_DESC' | 'AUTHENTICATE_STRICT_FUNCTION_ID_ASC' | 'AUTHENTICATE_STRICT_FUNCTION_ID_DESC' | 'CURRENT_ROLE_FUNCTION_ID_ASC' | 'CURRENT_ROLE_FUNCTION_ID_DESC' | 'CURRENT_ROLE_ID_FUNCTION_ID_ASC' | 'CURRENT_ROLE_ID_FUNCTION_ID_DESC' | 'CURRENT_USER_AGENT_FUNCTION_ID_ASC' | 'CURRENT_USER_AGENT_FUNCTION_ID_DESC' | 'CURRENT_IP_ADDRESS_FUNCTION_ID_ASC' | 'CURRENT_IP_ADDRESS_FUNCTION_ID_DESC';
|
|
@@ -18427,6 +18473,32 @@ export interface DeleteRateLimitsModuleInput {
|
|
|
18427
18473
|
clientMutationId?: string;
|
|
18428
18474
|
id: string;
|
|
18429
18475
|
}
|
|
18476
|
+
export interface CreateUsageSnapshotInput {
|
|
18477
|
+
clientMutationId?: string;
|
|
18478
|
+
usageSnapshot: {
|
|
18479
|
+
databaseId: string;
|
|
18480
|
+
metricName: string;
|
|
18481
|
+
metricValue?: string;
|
|
18482
|
+
dimensions?: Record<string, unknown>;
|
|
18483
|
+
capturedAt?: string;
|
|
18484
|
+
};
|
|
18485
|
+
}
|
|
18486
|
+
export interface UsageSnapshotPatch {
|
|
18487
|
+
databaseId?: string | null;
|
|
18488
|
+
metricName?: string | null;
|
|
18489
|
+
metricValue?: string | null;
|
|
18490
|
+
dimensions?: Record<string, unknown> | null;
|
|
18491
|
+
capturedAt?: string | null;
|
|
18492
|
+
}
|
|
18493
|
+
export interface UpdateUsageSnapshotInput {
|
|
18494
|
+
clientMutationId?: string;
|
|
18495
|
+
id: string;
|
|
18496
|
+
usageSnapshotPatch: UsageSnapshotPatch;
|
|
18497
|
+
}
|
|
18498
|
+
export interface DeleteUsageSnapshotInput {
|
|
18499
|
+
clientMutationId?: string;
|
|
18500
|
+
id: string;
|
|
18501
|
+
}
|
|
18430
18502
|
export interface CreateAppMembershipDefaultInput {
|
|
18431
18503
|
clientMutationId?: string;
|
|
18432
18504
|
appMembershipDefault: {
|
|
@@ -19201,16 +19273,6 @@ export interface SetFieldOrderInput {
|
|
|
19201
19273
|
clientMutationId?: string;
|
|
19202
19274
|
fieldIds?: string[];
|
|
19203
19275
|
}
|
|
19204
|
-
export interface AppendFieldSmartTagsInput {
|
|
19205
|
-
clientMutationId?: string;
|
|
19206
|
-
pFieldId?: string;
|
|
19207
|
-
pTags?: Record<string, unknown>;
|
|
19208
|
-
}
|
|
19209
|
-
export interface AppendTableSmartTagsInput {
|
|
19210
|
-
clientMutationId?: string;
|
|
19211
|
-
pTableId?: string;
|
|
19212
|
-
pTags?: Record<string, unknown>;
|
|
19213
|
-
}
|
|
19214
19276
|
export interface ProvisionUniqueConstraintInput {
|
|
19215
19277
|
clientMutationId?: string;
|
|
19216
19278
|
databaseId?: string;
|
|
@@ -27722,18 +27784,6 @@ export interface SetFieldOrderPayload {
|
|
|
27722
27784
|
export type SetFieldOrderPayloadSelect = {
|
|
27723
27785
|
clientMutationId?: boolean;
|
|
27724
27786
|
};
|
|
27725
|
-
export interface AppendFieldSmartTagsPayload {
|
|
27726
|
-
clientMutationId?: string | null;
|
|
27727
|
-
}
|
|
27728
|
-
export type AppendFieldSmartTagsPayloadSelect = {
|
|
27729
|
-
clientMutationId?: boolean;
|
|
27730
|
-
};
|
|
27731
|
-
export interface AppendTableSmartTagsPayload {
|
|
27732
|
-
clientMutationId?: string | null;
|
|
27733
|
-
}
|
|
27734
|
-
export type AppendTableSmartTagsPayloadSelect = {
|
|
27735
|
-
clientMutationId?: boolean;
|
|
27736
|
-
};
|
|
27737
27787
|
export interface ProvisionUniqueConstraintPayload {
|
|
27738
27788
|
clientMutationId?: string | null;
|
|
27739
27789
|
}
|
|
@@ -33592,6 +33642,51 @@ export type DeleteRateLimitsModulePayloadSelect = {
|
|
|
33592
33642
|
select: RateLimitsModuleEdgeSelect;
|
|
33593
33643
|
};
|
|
33594
33644
|
};
|
|
33645
|
+
export interface CreateUsageSnapshotPayload {
|
|
33646
|
+
clientMutationId?: string | null;
|
|
33647
|
+
/** The `UsageSnapshot` that was created by this mutation. */
|
|
33648
|
+
usageSnapshot?: UsageSnapshot | null;
|
|
33649
|
+
usageSnapshotEdge?: UsageSnapshotEdge | null;
|
|
33650
|
+
}
|
|
33651
|
+
export type CreateUsageSnapshotPayloadSelect = {
|
|
33652
|
+
clientMutationId?: boolean;
|
|
33653
|
+
usageSnapshot?: {
|
|
33654
|
+
select: UsageSnapshotSelect;
|
|
33655
|
+
};
|
|
33656
|
+
usageSnapshotEdge?: {
|
|
33657
|
+
select: UsageSnapshotEdgeSelect;
|
|
33658
|
+
};
|
|
33659
|
+
};
|
|
33660
|
+
export interface UpdateUsageSnapshotPayload {
|
|
33661
|
+
clientMutationId?: string | null;
|
|
33662
|
+
/** The `UsageSnapshot` that was updated by this mutation. */
|
|
33663
|
+
usageSnapshot?: UsageSnapshot | null;
|
|
33664
|
+
usageSnapshotEdge?: UsageSnapshotEdge | null;
|
|
33665
|
+
}
|
|
33666
|
+
export type UpdateUsageSnapshotPayloadSelect = {
|
|
33667
|
+
clientMutationId?: boolean;
|
|
33668
|
+
usageSnapshot?: {
|
|
33669
|
+
select: UsageSnapshotSelect;
|
|
33670
|
+
};
|
|
33671
|
+
usageSnapshotEdge?: {
|
|
33672
|
+
select: UsageSnapshotEdgeSelect;
|
|
33673
|
+
};
|
|
33674
|
+
};
|
|
33675
|
+
export interface DeleteUsageSnapshotPayload {
|
|
33676
|
+
clientMutationId?: string | null;
|
|
33677
|
+
/** The `UsageSnapshot` that was deleted by this mutation. */
|
|
33678
|
+
usageSnapshot?: UsageSnapshot | null;
|
|
33679
|
+
usageSnapshotEdge?: UsageSnapshotEdge | null;
|
|
33680
|
+
}
|
|
33681
|
+
export type DeleteUsageSnapshotPayloadSelect = {
|
|
33682
|
+
clientMutationId?: boolean;
|
|
33683
|
+
usageSnapshot?: {
|
|
33684
|
+
select: UsageSnapshotSelect;
|
|
33685
|
+
};
|
|
33686
|
+
usageSnapshotEdge?: {
|
|
33687
|
+
select: UsageSnapshotEdgeSelect;
|
|
33688
|
+
};
|
|
33689
|
+
};
|
|
33595
33690
|
export interface CreateAppMembershipDefaultPayload {
|
|
33596
33691
|
clientMutationId?: string | null;
|
|
33597
33692
|
/** The `AppMembershipDefault` that was created by this mutation. */
|
|
@@ -35858,6 +35953,18 @@ export type RateLimitsModuleEdgeSelect = {
|
|
|
35858
35953
|
select: RateLimitsModuleSelect;
|
|
35859
35954
|
};
|
|
35860
35955
|
};
|
|
35956
|
+
/** A `UsageSnapshot` edge in the connection. */
|
|
35957
|
+
export interface UsageSnapshotEdge {
|
|
35958
|
+
cursor?: string | null;
|
|
35959
|
+
/** The `UsageSnapshot` at the end of the edge. */
|
|
35960
|
+
node?: UsageSnapshot | null;
|
|
35961
|
+
}
|
|
35962
|
+
export type UsageSnapshotEdgeSelect = {
|
|
35963
|
+
cursor?: boolean;
|
|
35964
|
+
node?: {
|
|
35965
|
+
select: UsageSnapshotSelect;
|
|
35966
|
+
};
|
|
35967
|
+
};
|
|
35861
35968
|
/** A `AppMembershipDefault` edge in the connection. */
|
|
35862
35969
|
export interface AppMembershipDefaultEdge {
|
|
35863
35970
|
cursor?: string | null;
|
|
@@ -134,6 +134,7 @@ export { UserConnectedAccountModel } from './userConnectedAccount';
|
|
|
134
134
|
export { CommitModel } from './commit';
|
|
135
135
|
export { PubkeySettingModel } from './pubkeySetting';
|
|
136
136
|
export { RateLimitsModuleModel } from './rateLimitsModule';
|
|
137
|
+
export { UsageSnapshotModel } from './usageSnapshot';
|
|
137
138
|
export { AppMembershipDefaultModel } from './appMembershipDefault';
|
|
138
139
|
export { OrgMembershipDefaultModel } from './orgMembershipDefault';
|
|
139
140
|
export { RlsSettingModel } from './rlsSetting';
|
|
@@ -134,6 +134,7 @@ export { UserConnectedAccountModel } from './userConnectedAccount';
|
|
|
134
134
|
export { CommitModel } from './commit';
|
|
135
135
|
export { PubkeySettingModel } from './pubkeySetting';
|
|
136
136
|
export { RateLimitsModuleModel } from './rateLimitsModule';
|
|
137
|
+
export { UsageSnapshotModel } from './usageSnapshot';
|
|
137
138
|
export { AppMembershipDefaultModel } from './appMembershipDefault';
|
|
138
139
|
export { OrgMembershipDefaultModel } from './orgMembershipDefault';
|
|
139
140
|
export { RlsSettingModel } from './rlsSetting';
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* UsageSnapshot 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, UpdateArgs, DeleteArgs, InferSelectResult, StrictSelect } from '../select-types';
|
|
9
|
+
import type { UsageSnapshotWithRelations, UsageSnapshotSelect, UsageSnapshotFilter, UsageSnapshotOrderBy, CreateUsageSnapshotInput, UsageSnapshotPatch } from '../input-types';
|
|
10
|
+
export declare class UsageSnapshotModel {
|
|
11
|
+
private client;
|
|
12
|
+
constructor(client: OrmClient);
|
|
13
|
+
findMany<S extends UsageSnapshotSelect>(args: FindManyArgs<S, UsageSnapshotFilter, UsageSnapshotOrderBy> & {
|
|
14
|
+
select: S;
|
|
15
|
+
} & StrictSelect<S, UsageSnapshotSelect>): QueryBuilder<{
|
|
16
|
+
usageSnapshots: ConnectionResult<InferSelectResult<UsageSnapshotWithRelations, S>>;
|
|
17
|
+
}>;
|
|
18
|
+
findFirst<S extends UsageSnapshotSelect>(args: FindFirstArgs<S, UsageSnapshotFilter> & {
|
|
19
|
+
select: S;
|
|
20
|
+
} & StrictSelect<S, UsageSnapshotSelect>): QueryBuilder<{
|
|
21
|
+
usageSnapshots: {
|
|
22
|
+
nodes: InferSelectResult<UsageSnapshotWithRelations, S>[];
|
|
23
|
+
};
|
|
24
|
+
}>;
|
|
25
|
+
findOne<S extends UsageSnapshotSelect>(args: {
|
|
26
|
+
id: string;
|
|
27
|
+
select: S;
|
|
28
|
+
} & StrictSelect<S, UsageSnapshotSelect>): QueryBuilder<{
|
|
29
|
+
usageSnapshot: InferSelectResult<UsageSnapshotWithRelations, S> | null;
|
|
30
|
+
}>;
|
|
31
|
+
create<S extends UsageSnapshotSelect>(args: CreateArgs<S, CreateUsageSnapshotInput['usageSnapshot']> & {
|
|
32
|
+
select: S;
|
|
33
|
+
} & StrictSelect<S, UsageSnapshotSelect>): QueryBuilder<{
|
|
34
|
+
createUsageSnapshot: {
|
|
35
|
+
usageSnapshot: InferSelectResult<UsageSnapshotWithRelations, S>;
|
|
36
|
+
};
|
|
37
|
+
}>;
|
|
38
|
+
update<S extends UsageSnapshotSelect>(args: UpdateArgs<S, {
|
|
39
|
+
id: string;
|
|
40
|
+
}, UsageSnapshotPatch> & {
|
|
41
|
+
select: S;
|
|
42
|
+
} & StrictSelect<S, UsageSnapshotSelect>): QueryBuilder<{
|
|
43
|
+
updateUsageSnapshot: {
|
|
44
|
+
usageSnapshot: InferSelectResult<UsageSnapshotWithRelations, S>;
|
|
45
|
+
};
|
|
46
|
+
}>;
|
|
47
|
+
delete<S extends UsageSnapshotSelect>(args: DeleteArgs<{
|
|
48
|
+
id: string;
|
|
49
|
+
}, S> & {
|
|
50
|
+
select: S;
|
|
51
|
+
} & StrictSelect<S, UsageSnapshotSelect>): QueryBuilder<{
|
|
52
|
+
deleteUsageSnapshot: {
|
|
53
|
+
usageSnapshot: InferSelectResult<UsageSnapshotWithRelations, S>;
|
|
54
|
+
};
|
|
55
|
+
}>;
|
|
56
|
+
}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { QueryBuilder, buildFindManyDocument, buildFindFirstDocument, buildCreateDocument, buildUpdateByPkDocument, buildDeleteByPkDocument, } from '../query-builder';
|
|
2
|
+
import { connectionFieldsMap } from '../input-types';
|
|
3
|
+
export class UsageSnapshotModel {
|
|
4
|
+
client;
|
|
5
|
+
constructor(client) {
|
|
6
|
+
this.client = client;
|
|
7
|
+
}
|
|
8
|
+
findMany(args) {
|
|
9
|
+
const { document, variables } = buildFindManyDocument('UsageSnapshot', 'usageSnapshots', 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
|
+
}, 'UsageSnapshotFilter', 'UsageSnapshotOrderBy', connectionFieldsMap);
|
|
18
|
+
return new QueryBuilder({
|
|
19
|
+
client: this.client,
|
|
20
|
+
operation: 'query',
|
|
21
|
+
operationName: 'UsageSnapshot',
|
|
22
|
+
fieldName: 'usageSnapshots',
|
|
23
|
+
document,
|
|
24
|
+
variables,
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
findFirst(args) {
|
|
28
|
+
const { document, variables } = buildFindFirstDocument('UsageSnapshot', 'usageSnapshots', args.select, {
|
|
29
|
+
where: args?.where,
|
|
30
|
+
}, 'UsageSnapshotFilter', connectionFieldsMap);
|
|
31
|
+
return new QueryBuilder({
|
|
32
|
+
client: this.client,
|
|
33
|
+
operation: 'query',
|
|
34
|
+
operationName: 'UsageSnapshot',
|
|
35
|
+
fieldName: 'usageSnapshots',
|
|
36
|
+
document,
|
|
37
|
+
variables,
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
findOne(args) {
|
|
41
|
+
const { document, variables } = buildFindManyDocument('UsageSnapshot', 'usageSnapshots', args.select, {
|
|
42
|
+
where: {
|
|
43
|
+
id: {
|
|
44
|
+
equalTo: args.id,
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
first: 1,
|
|
48
|
+
}, 'UsageSnapshotFilter', 'UsageSnapshotOrderBy', connectionFieldsMap);
|
|
49
|
+
return new QueryBuilder({
|
|
50
|
+
client: this.client,
|
|
51
|
+
operation: 'query',
|
|
52
|
+
operationName: 'UsageSnapshot',
|
|
53
|
+
fieldName: 'usageSnapshot',
|
|
54
|
+
document,
|
|
55
|
+
variables,
|
|
56
|
+
transform: (data) => ({
|
|
57
|
+
usageSnapshot: data.usageSnapshots?.nodes?.[0] ?? null,
|
|
58
|
+
}),
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
create(args) {
|
|
62
|
+
const { document, variables } = buildCreateDocument('UsageSnapshot', 'createUsageSnapshot', 'usageSnapshot', args.select, args.data, 'CreateUsageSnapshotInput', connectionFieldsMap);
|
|
63
|
+
return new QueryBuilder({
|
|
64
|
+
client: this.client,
|
|
65
|
+
operation: 'mutation',
|
|
66
|
+
operationName: 'UsageSnapshot',
|
|
67
|
+
fieldName: 'createUsageSnapshot',
|
|
68
|
+
document,
|
|
69
|
+
variables,
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
update(args) {
|
|
73
|
+
const { document, variables } = buildUpdateByPkDocument('UsageSnapshot', 'updateUsageSnapshot', 'usageSnapshot', args.select, args.where.id, args.data, 'UpdateUsageSnapshotInput', 'id', 'usageSnapshotPatch', connectionFieldsMap);
|
|
74
|
+
return new QueryBuilder({
|
|
75
|
+
client: this.client,
|
|
76
|
+
operation: 'mutation',
|
|
77
|
+
operationName: 'UsageSnapshot',
|
|
78
|
+
fieldName: 'updateUsageSnapshot',
|
|
79
|
+
document,
|
|
80
|
+
variables,
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
delete(args) {
|
|
84
|
+
const { document, variables } = buildDeleteByPkDocument('UsageSnapshot', 'deleteUsageSnapshot', 'usageSnapshot', {
|
|
85
|
+
id: args.where.id,
|
|
86
|
+
}, 'DeleteUsageSnapshotInput', args.select, connectionFieldsMap);
|
|
87
|
+
return new QueryBuilder({
|
|
88
|
+
client: this.client,
|
|
89
|
+
operation: 'mutation',
|
|
90
|
+
operationName: 'UsageSnapshot',
|
|
91
|
+
fieldName: 'deleteUsageSnapshot',
|
|
92
|
+
document,
|
|
93
|
+
variables,
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
import { OrmClient } from '../client';
|
|
7
7
|
import { QueryBuilder } from '../query-builder';
|
|
8
8
|
import type { InferSelectResult, StrictSelect } from '../select-types';
|
|
9
|
-
import type { SendAccountDeletionEmailInput, SignOutInput, AcceptDatabaseTransferInput, CancelDatabaseTransferInput, RejectDatabaseTransferInput, DisconnectAccountInput, RevokeApiKeyInput, RevokeSessionInput, VerifyPasswordInput, VerifyTotpInput, SubmitAppInviteCodeInput, SubmitOrgInviteCodeInput, CheckPasswordInput, ConfirmDeleteAccountInput, SetPasswordInput, VerifyEmailInput, FreezeObjectsInput, InitEmptyRepoInput, ConstructBlueprintInput, ProvisionNewUserInput, ResetPasswordInput, RemoveNodeAtPathInput, CopyTemplateToBlueprintInput, ProvisionSpatialRelationInput, BootstrapUserInput, SetFieldOrderInput,
|
|
9
|
+
import type { SendAccountDeletionEmailInput, SignOutInput, AcceptDatabaseTransferInput, CancelDatabaseTransferInput, RejectDatabaseTransferInput, DisconnectAccountInput, RevokeApiKeyInput, RevokeSessionInput, VerifyPasswordInput, VerifyTotpInput, SubmitAppInviteCodeInput, SubmitOrgInviteCodeInput, CheckPasswordInput, ConfirmDeleteAccountInput, SetPasswordInput, VerifyEmailInput, FreezeObjectsInput, InitEmptyRepoInput, ConstructBlueprintInput, ProvisionNewUserInput, ResetPasswordInput, RemoveNodeAtPathInput, CopyTemplateToBlueprintInput, ProvisionSpatialRelationInput, BootstrapUserInput, SetFieldOrderInput, ProvisionUniqueConstraintInput, ProvisionFullTextSearchInput, ProvisionIndexInput, SetDataAtPathInput, SetPropsAndCommitInput, ProvisionDatabaseWithUserInput, InsertNodeAtPathInput, UpdateNodeAtPathInput, SetAndCommitInput, ProvisionRelationInput, ApplyRlsInput, SignInCrossOriginInput, CreateUserDatabaseInput, ExtendTokenExpiresInput, CreateApiKeyInput, SendVerificationEmailInput, ForgotPasswordInput, SignUpInput, RequestCrossOriginTokenInput, SignInInput, ProvisionTableInput, ProvisionBucketInput, SendAccountDeletionEmailPayload, SignOutPayload, AcceptDatabaseTransferPayload, CancelDatabaseTransferPayload, RejectDatabaseTransferPayload, DisconnectAccountPayload, RevokeApiKeyPayload, RevokeSessionPayload, VerifyPasswordPayload, VerifyTotpPayload, SubmitAppInviteCodePayload, SubmitOrgInviteCodePayload, CheckPasswordPayload, ConfirmDeleteAccountPayload, SetPasswordPayload, VerifyEmailPayload, FreezeObjectsPayload, InitEmptyRepoPayload, ConstructBlueprintPayload, ProvisionNewUserPayload, ResetPasswordPayload, RemoveNodeAtPathPayload, CopyTemplateToBlueprintPayload, ProvisionSpatialRelationPayload, BootstrapUserPayload, SetFieldOrderPayload, ProvisionUniqueConstraintPayload, ProvisionFullTextSearchPayload, ProvisionIndexPayload, SetDataAtPathPayload, SetPropsAndCommitPayload, ProvisionDatabaseWithUserPayload, InsertNodeAtPathPayload, UpdateNodeAtPathPayload, SetAndCommitPayload, ProvisionRelationPayload, ApplyRlsPayload, SignInCrossOriginPayload, CreateUserDatabasePayload, ExtendTokenExpiresPayload, CreateApiKeyPayload, SendVerificationEmailPayload, ForgotPasswordPayload, SignUpPayload, RequestCrossOriginTokenPayload, SignInPayload, ProvisionTablePayload, ProvisionBucketPayload, SendAccountDeletionEmailPayloadSelect, SignOutPayloadSelect, AcceptDatabaseTransferPayloadSelect, CancelDatabaseTransferPayloadSelect, RejectDatabaseTransferPayloadSelect, DisconnectAccountPayloadSelect, RevokeApiKeyPayloadSelect, RevokeSessionPayloadSelect, VerifyPasswordPayloadSelect, VerifyTotpPayloadSelect, SubmitAppInviteCodePayloadSelect, SubmitOrgInviteCodePayloadSelect, CheckPasswordPayloadSelect, ConfirmDeleteAccountPayloadSelect, SetPasswordPayloadSelect, VerifyEmailPayloadSelect, FreezeObjectsPayloadSelect, InitEmptyRepoPayloadSelect, ConstructBlueprintPayloadSelect, ProvisionNewUserPayloadSelect, ResetPasswordPayloadSelect, RemoveNodeAtPathPayloadSelect, CopyTemplateToBlueprintPayloadSelect, ProvisionSpatialRelationPayloadSelect, BootstrapUserPayloadSelect, SetFieldOrderPayloadSelect, ProvisionUniqueConstraintPayloadSelect, ProvisionFullTextSearchPayloadSelect, ProvisionIndexPayloadSelect, SetDataAtPathPayloadSelect, SetPropsAndCommitPayloadSelect, ProvisionDatabaseWithUserPayloadSelect, InsertNodeAtPathPayloadSelect, UpdateNodeAtPathPayloadSelect, SetAndCommitPayloadSelect, ProvisionRelationPayloadSelect, ApplyRlsPayloadSelect, SignInCrossOriginPayloadSelect, CreateUserDatabasePayloadSelect, ExtendTokenExpiresPayloadSelect, CreateApiKeyPayloadSelect, SendVerificationEmailPayloadSelect, ForgotPasswordPayloadSelect, SignUpPayloadSelect, RequestCrossOriginTokenPayloadSelect, SignInPayloadSelect, ProvisionTablePayloadSelect, ProvisionBucketPayloadSelect } from '../input-types';
|
|
10
10
|
export interface SendAccountDeletionEmailVariables {
|
|
11
11
|
input: SendAccountDeletionEmailInput;
|
|
12
12
|
}
|
|
@@ -97,12 +97,6 @@ export interface BootstrapUserVariables {
|
|
|
97
97
|
export interface SetFieldOrderVariables {
|
|
98
98
|
input: SetFieldOrderInput;
|
|
99
99
|
}
|
|
100
|
-
export interface AppendFieldSmartTagsVariables {
|
|
101
|
-
input: AppendFieldSmartTagsInput;
|
|
102
|
-
}
|
|
103
|
-
export interface AppendTableSmartTagsVariables {
|
|
104
|
-
input: AppendTableSmartTagsInput;
|
|
105
|
-
}
|
|
106
100
|
/**
|
|
107
101
|
* Variables for provisionUniqueConstraint
|
|
108
102
|
* Creates a unique constraint on a table. Accepts a jsonb definition with columns (array of field names). Graceful: skips if the exact same unique constraint already exists.
|
|
@@ -346,16 +340,6 @@ export declare function createMutationOperations(client: OrmClient): {
|
|
|
346
340
|
} & StrictSelect<S, SetFieldOrderPayloadSelect>) => QueryBuilder<{
|
|
347
341
|
setFieldOrder: InferSelectResult<SetFieldOrderPayload, S> | null;
|
|
348
342
|
}>;
|
|
349
|
-
appendFieldSmartTags: <S extends AppendFieldSmartTagsPayloadSelect>(args: AppendFieldSmartTagsVariables, options: {
|
|
350
|
-
select: S;
|
|
351
|
-
} & StrictSelect<S, AppendFieldSmartTagsPayloadSelect>) => QueryBuilder<{
|
|
352
|
-
appendFieldSmartTags: InferSelectResult<AppendFieldSmartTagsPayload, S> | null;
|
|
353
|
-
}>;
|
|
354
|
-
appendTableSmartTags: <S extends AppendTableSmartTagsPayloadSelect>(args: AppendTableSmartTagsVariables, options: {
|
|
355
|
-
select: S;
|
|
356
|
-
} & StrictSelect<S, AppendTableSmartTagsPayloadSelect>) => QueryBuilder<{
|
|
357
|
-
appendTableSmartTags: InferSelectResult<AppendTableSmartTagsPayload, S> | null;
|
|
358
|
-
}>;
|
|
359
343
|
provisionUniqueConstraint: <S extends ProvisionUniqueConstraintPayloadSelect>(args: ProvisionUniqueConstraintVariables, options: {
|
|
360
344
|
select: S;
|
|
361
345
|
} & StrictSelect<S, ProvisionUniqueConstraintPayloadSelect>) => QueryBuilder<{
|
|
@@ -314,30 +314,6 @@ export function createMutationOperations(client) {
|
|
|
314
314
|
},
|
|
315
315
|
], connectionFieldsMap, 'SetFieldOrderPayload'),
|
|
316
316
|
}),
|
|
317
|
-
appendFieldSmartTags: (args, options) => new QueryBuilder({
|
|
318
|
-
client,
|
|
319
|
-
operation: 'mutation',
|
|
320
|
-
operationName: 'AppendFieldSmartTags',
|
|
321
|
-
fieldName: 'appendFieldSmartTags',
|
|
322
|
-
...buildCustomDocument('mutation', 'AppendFieldSmartTags', 'appendFieldSmartTags', options.select, args, [
|
|
323
|
-
{
|
|
324
|
-
name: 'input',
|
|
325
|
-
type: 'AppendFieldSmartTagsInput!',
|
|
326
|
-
},
|
|
327
|
-
], connectionFieldsMap, 'AppendFieldSmartTagsPayload'),
|
|
328
|
-
}),
|
|
329
|
-
appendTableSmartTags: (args, options) => new QueryBuilder({
|
|
330
|
-
client,
|
|
331
|
-
operation: 'mutation',
|
|
332
|
-
operationName: 'AppendTableSmartTags',
|
|
333
|
-
fieldName: 'appendTableSmartTags',
|
|
334
|
-
...buildCustomDocument('mutation', 'AppendTableSmartTags', 'appendTableSmartTags', options.select, args, [
|
|
335
|
-
{
|
|
336
|
-
name: 'input',
|
|
337
|
-
type: 'AppendTableSmartTagsInput!',
|
|
338
|
-
},
|
|
339
|
-
], connectionFieldsMap, 'AppendTableSmartTagsPayload'),
|
|
340
|
-
}),
|
|
341
317
|
provisionUniqueConstraint: (args, options) => new QueryBuilder({
|
|
342
318
|
client,
|
|
343
319
|
operation: 'mutation',
|