@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
package/admin/hooks/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* GraphQL SDK
|
|
3
3
|
* @generated by @constructive-io/graphql-codegen
|
|
4
4
|
*
|
|
5
|
-
* Tables: OrgGetManagersRecord, OrgGetSubordinatesRecord, AppPermission, OrgPermission, AppLevelRequirement, AppLimitCreditRedemption, AppLimitCreditCodeItem, AppLimitCredit, OrgMember, AppPermissionDefault, AppLimitCreditCode, OrgPermissionDefault, AppAdminGrant, AppOwnerGrant, AppAchievement, AppStep, AppLimitCapsDefault, OrgLimitCapsDefault, AppLimitCap, OrgLimitCap, OrgAdminGrant, OrgOwnerGrant, MembershipType, AppLimitDefault, OrgLimitDefault, OrgLimitCredit, OrgChartEdgeGrant, AppClaimedInvite, AppGrant, AppMembershipDefault, OrgMembershipDefault, OrgClaimedInvite, AppLimitEvent, OrgLimitEvent, OrgGrant, OrgChartEdge, OrgMemberProfile, AppLevel, AppLimit, AppInvite, OrgMembershipSetting, OrgLimitAggregate, OrgLimit, OrgInvite, AppMembership, OrgMembership
|
|
5
|
+
* Tables: OrgGetManagersRecord, OrgGetSubordinatesRecord, AppPermission, OrgPermission, AppLevelRequirement, AppLimitCreditRedemption, AppLimitCreditCodeItem, AppLimitCredit, OrgMember, AppPermissionDefault, AppLimitCreditCode, OrgPermissionDefault, AppAdminGrant, AppOwnerGrant, AppAchievement, AppStep, AppLimitCapsDefault, OrgLimitCapsDefault, AppLimitCap, OrgLimitCap, OrgAdminGrant, OrgOwnerGrant, MembershipType, AppLimitDefault, OrgLimitDefault, OrgLimitCredit, OrgChartEdgeGrant, AppClaimedInvite, AppGrant, AppMembershipDefault, OrgMembershipDefault, OrgClaimedInvite, AppLimitEvent, OrgLimitEvent, OrgGrant, OrgChartEdge, UsageSnapshot, OrgMemberProfile, AppLevel, AppLimit, AppInvite, OrgMembershipSetting, OrgLimitAggregate, OrgLimit, OrgInvite, AppMembership, OrgMembership
|
|
6
6
|
*
|
|
7
7
|
* Usage:
|
|
8
8
|
*
|
package/admin/hooks/index.js
CHANGED
|
@@ -18,7 +18,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
18
18
|
* GraphQL SDK
|
|
19
19
|
* @generated by @constructive-io/graphql-codegen
|
|
20
20
|
*
|
|
21
|
-
* Tables: OrgGetManagersRecord, OrgGetSubordinatesRecord, AppPermission, OrgPermission, AppLevelRequirement, AppLimitCreditRedemption, AppLimitCreditCodeItem, AppLimitCredit, OrgMember, AppPermissionDefault, AppLimitCreditCode, OrgPermissionDefault, AppAdminGrant, AppOwnerGrant, AppAchievement, AppStep, AppLimitCapsDefault, OrgLimitCapsDefault, AppLimitCap, OrgLimitCap, OrgAdminGrant, OrgOwnerGrant, MembershipType, AppLimitDefault, OrgLimitDefault, OrgLimitCredit, OrgChartEdgeGrant, AppClaimedInvite, AppGrant, AppMembershipDefault, OrgMembershipDefault, OrgClaimedInvite, AppLimitEvent, OrgLimitEvent, OrgGrant, OrgChartEdge, OrgMemberProfile, AppLevel, AppLimit, AppInvite, OrgMembershipSetting, OrgLimitAggregate, OrgLimit, OrgInvite, AppMembership, OrgMembership
|
|
21
|
+
* Tables: OrgGetManagersRecord, OrgGetSubordinatesRecord, AppPermission, OrgPermission, AppLevelRequirement, AppLimitCreditRedemption, AppLimitCreditCodeItem, AppLimitCredit, OrgMember, AppPermissionDefault, AppLimitCreditCode, OrgPermissionDefault, AppAdminGrant, AppOwnerGrant, AppAchievement, AppStep, AppLimitCapsDefault, OrgLimitCapsDefault, AppLimitCap, OrgLimitCap, OrgAdminGrant, OrgOwnerGrant, MembershipType, AppLimitDefault, OrgLimitDefault, OrgLimitCredit, OrgChartEdgeGrant, AppClaimedInvite, AppGrant, AppMembershipDefault, OrgMembershipDefault, OrgClaimedInvite, AppLimitEvent, OrgLimitEvent, OrgGrant, OrgChartEdge, UsageSnapshot, OrgMemberProfile, AppLevel, AppLimit, AppInvite, OrgMembershipSetting, OrgLimitAggregate, OrgLimit, OrgInvite, AppMembership, OrgMembership
|
|
22
22
|
*
|
|
23
23
|
* Usage:
|
|
24
24
|
*
|
|
@@ -204,6 +204,11 @@ export declare const invalidate: {
|
|
|
204
204
|
/** Invalidate orgChartEdge list queries */ readonly lists: (queryClient: QueryClient) => Promise<void>;
|
|
205
205
|
/** Invalidate a specific orgChartEdge */ readonly detail: (queryClient: QueryClient, id: string | number) => Promise<void>;
|
|
206
206
|
};
|
|
207
|
+
/** Invalidate usageSnapshot queries */ readonly usageSnapshot: {
|
|
208
|
+
/** Invalidate all usageSnapshot queries */ readonly all: (queryClient: QueryClient) => Promise<void>;
|
|
209
|
+
/** Invalidate usageSnapshot list queries */ readonly lists: (queryClient: QueryClient) => Promise<void>;
|
|
210
|
+
/** Invalidate a specific usageSnapshot */ readonly detail: (queryClient: QueryClient, id: string | number) => Promise<void>;
|
|
211
|
+
};
|
|
207
212
|
/** Invalidate orgMemberProfile queries */ readonly orgMemberProfile: {
|
|
208
213
|
/** Invalidate all orgMemberProfile queries */ readonly all: (queryClient: QueryClient) => Promise<void>;
|
|
209
214
|
/** Invalidate orgMemberProfile list queries */ readonly lists: (queryClient: QueryClient) => Promise<void>;
|
|
@@ -303,6 +308,7 @@ export declare const remove: {
|
|
|
303
308
|
/** Remove orgLimitEvent from cache */ readonly orgLimitEvent: (queryClient: QueryClient, id: string | number) => void;
|
|
304
309
|
/** Remove orgGrant from cache */ readonly orgGrant: (queryClient: QueryClient, id: string | number) => void;
|
|
305
310
|
/** Remove orgChartEdge from cache */ readonly orgChartEdge: (queryClient: QueryClient, id: string | number) => void;
|
|
311
|
+
/** Remove usageSnapshot from cache */ readonly usageSnapshot: (queryClient: QueryClient, id: string | number) => void;
|
|
306
312
|
/** Remove orgMemberProfile from cache */ readonly orgMemberProfile: (queryClient: QueryClient, id: string | number) => void;
|
|
307
313
|
/** Remove appLevel from cache */ readonly appLevel: (queryClient: QueryClient, id: string | number) => void;
|
|
308
314
|
/** Remove appLimit from cache */ readonly appLimit: (queryClient: QueryClient, id: string | number) => void;
|
|
@@ -423,6 +423,17 @@ exports.invalidate = {
|
|
|
423
423
|
queryKey: query_keys_1.orgChartEdgeKeys.detail(id),
|
|
424
424
|
}),
|
|
425
425
|
},
|
|
426
|
+
/** Invalidate usageSnapshot queries */ usageSnapshot: {
|
|
427
|
+
/** Invalidate all usageSnapshot queries */ all: (queryClient) => queryClient.invalidateQueries({
|
|
428
|
+
queryKey: query_keys_1.usageSnapshotKeys.all,
|
|
429
|
+
}),
|
|
430
|
+
/** Invalidate usageSnapshot list queries */ lists: (queryClient) => queryClient.invalidateQueries({
|
|
431
|
+
queryKey: query_keys_1.usageSnapshotKeys.lists(),
|
|
432
|
+
}),
|
|
433
|
+
/** Invalidate a specific usageSnapshot */ detail: (queryClient, id) => queryClient.invalidateQueries({
|
|
434
|
+
queryKey: query_keys_1.usageSnapshotKeys.detail(id),
|
|
435
|
+
}),
|
|
436
|
+
},
|
|
426
437
|
/** Invalidate orgMemberProfile queries */ orgMemberProfile: {
|
|
427
438
|
/** Invalidate all orgMemberProfile queries */ all: (queryClient) => queryClient.invalidateQueries({
|
|
428
439
|
queryKey: query_keys_1.orgMemberProfileKeys.all,
|
|
@@ -726,6 +737,11 @@ exports.remove = {
|
|
|
726
737
|
queryKey: query_keys_1.orgChartEdgeKeys.detail(id),
|
|
727
738
|
});
|
|
728
739
|
},
|
|
740
|
+
/** Remove usageSnapshot from cache */ usageSnapshot: (queryClient, id) => {
|
|
741
|
+
queryClient.removeQueries({
|
|
742
|
+
queryKey: query_keys_1.usageSnapshotKeys.detail(id),
|
|
743
|
+
});
|
|
744
|
+
},
|
|
729
745
|
/** Remove orgMemberProfile from cache */ orgMemberProfile: (queryClient, id) => {
|
|
730
746
|
queryClient.removeQueries({
|
|
731
747
|
queryKey: query_keys_1.orgMemberProfileKeys.detail(id),
|
|
@@ -219,6 +219,12 @@ export declare const orgChartEdgeMutationKeys: {
|
|
|
219
219
|
/** Update orgChartEdge mutation key */ readonly update: (id: string | number) => readonly ["mutation", "orgchartedge", "update", string | number];
|
|
220
220
|
/** Delete orgChartEdge mutation key */ readonly delete: (id: string | number) => readonly ["mutation", "orgchartedge", "delete", string | number];
|
|
221
221
|
};
|
|
222
|
+
export declare const usageSnapshotMutationKeys: {
|
|
223
|
+
/** All usageSnapshot mutation keys */ readonly all: readonly ["mutation", "usagesnapshot"];
|
|
224
|
+
/** Create usageSnapshot mutation key */ readonly create: () => readonly ["mutation", "usagesnapshot", "create"];
|
|
225
|
+
/** Update usageSnapshot mutation key */ readonly update: (id: string | number) => readonly ["mutation", "usagesnapshot", "update", string | number];
|
|
226
|
+
/** Delete usageSnapshot mutation key */ readonly delete: (id: string | number) => readonly ["mutation", "usagesnapshot", "delete", string | number];
|
|
227
|
+
};
|
|
222
228
|
export declare const orgMemberProfileMutationKeys: {
|
|
223
229
|
/** All orgMemberProfile mutation keys */ readonly all: readonly ["mutation", "orgmemberprofile"];
|
|
224
230
|
/** Create orgMemberProfile mutation key */ readonly create: () => readonly ["mutation", "orgmemberprofile", "create"];
|
|
@@ -523,6 +529,12 @@ export declare const mutationKeys: {
|
|
|
523
529
|
/** Update orgChartEdge mutation key */ readonly update: (id: string | number) => readonly ["mutation", "orgchartedge", "update", string | number];
|
|
524
530
|
/** Delete orgChartEdge mutation key */ readonly delete: (id: string | number) => readonly ["mutation", "orgchartedge", "delete", string | number];
|
|
525
531
|
};
|
|
532
|
+
readonly usageSnapshot: {
|
|
533
|
+
/** All usageSnapshot mutation keys */ readonly all: readonly ["mutation", "usagesnapshot"];
|
|
534
|
+
/** Create usageSnapshot mutation key */ readonly create: () => readonly ["mutation", "usagesnapshot", "create"];
|
|
535
|
+
/** Update usageSnapshot mutation key */ readonly update: (id: string | number) => readonly ["mutation", "usagesnapshot", "update", string | number];
|
|
536
|
+
/** Delete usageSnapshot mutation key */ readonly delete: (id: string | number) => readonly ["mutation", "usagesnapshot", "delete", string | number];
|
|
537
|
+
};
|
|
526
538
|
readonly orgMemberProfile: {
|
|
527
539
|
/** All orgMemberProfile mutation keys */ readonly all: readonly ["mutation", "orgmemberprofile"];
|
|
528
540
|
/** Create orgMemberProfile mutation key */ readonly create: () => readonly ["mutation", "orgmemberprofile", "create"];
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* DO NOT EDIT - changes will be overwritten
|
|
6
6
|
*/
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
exports.mutationKeys = exports.customMutationKeys = exports.orgMembershipMutationKeys = exports.appMembershipMutationKeys = exports.orgInviteMutationKeys = exports.orgLimitMutationKeys = exports.orgLimitAggregateMutationKeys = exports.orgMembershipSettingMutationKeys = exports.appInviteMutationKeys = exports.appLimitMutationKeys = exports.appLevelMutationKeys = exports.orgMemberProfileMutationKeys = exports.orgChartEdgeMutationKeys = exports.orgGrantMutationKeys = exports.orgLimitEventMutationKeys = exports.appLimitEventMutationKeys = exports.orgClaimedInviteMutationKeys = exports.orgMembershipDefaultMutationKeys = exports.appMembershipDefaultMutationKeys = exports.appGrantMutationKeys = exports.appClaimedInviteMutationKeys = exports.orgChartEdgeGrantMutationKeys = exports.orgLimitCreditMutationKeys = exports.orgLimitDefaultMutationKeys = exports.appLimitDefaultMutationKeys = exports.membershipTypeMutationKeys = exports.orgOwnerGrantMutationKeys = exports.orgAdminGrantMutationKeys = exports.orgLimitCapMutationKeys = exports.appLimitCapMutationKeys = exports.orgLimitCapsDefaultMutationKeys = exports.appLimitCapsDefaultMutationKeys = exports.appStepMutationKeys = exports.appAchievementMutationKeys = exports.appOwnerGrantMutationKeys = exports.appAdminGrantMutationKeys = exports.orgPermissionDefaultMutationKeys = exports.appLimitCreditCodeMutationKeys = exports.appPermissionDefaultMutationKeys = exports.orgMemberMutationKeys = exports.appLimitCreditMutationKeys = exports.appLimitCreditCodeItemMutationKeys = exports.appLimitCreditRedemptionMutationKeys = exports.appLevelRequirementMutationKeys = exports.orgPermissionMutationKeys = exports.appPermissionMutationKeys = exports.orgGetSubordinatesRecordMutationKeys = exports.orgGetManagersRecordMutationKeys = void 0;
|
|
8
|
+
exports.mutationKeys = exports.customMutationKeys = exports.orgMembershipMutationKeys = exports.appMembershipMutationKeys = exports.orgInviteMutationKeys = exports.orgLimitMutationKeys = exports.orgLimitAggregateMutationKeys = exports.orgMembershipSettingMutationKeys = exports.appInviteMutationKeys = exports.appLimitMutationKeys = exports.appLevelMutationKeys = exports.orgMemberProfileMutationKeys = exports.usageSnapshotMutationKeys = exports.orgChartEdgeMutationKeys = exports.orgGrantMutationKeys = exports.orgLimitEventMutationKeys = exports.appLimitEventMutationKeys = exports.orgClaimedInviteMutationKeys = exports.orgMembershipDefaultMutationKeys = exports.appMembershipDefaultMutationKeys = exports.appGrantMutationKeys = exports.appClaimedInviteMutationKeys = exports.orgChartEdgeGrantMutationKeys = exports.orgLimitCreditMutationKeys = exports.orgLimitDefaultMutationKeys = exports.appLimitDefaultMutationKeys = exports.membershipTypeMutationKeys = exports.orgOwnerGrantMutationKeys = exports.orgAdminGrantMutationKeys = exports.orgLimitCapMutationKeys = exports.appLimitCapMutationKeys = exports.orgLimitCapsDefaultMutationKeys = exports.appLimitCapsDefaultMutationKeys = exports.appStepMutationKeys = exports.appAchievementMutationKeys = exports.appOwnerGrantMutationKeys = exports.appAdminGrantMutationKeys = exports.orgPermissionDefaultMutationKeys = exports.appLimitCreditCodeMutationKeys = exports.appPermissionDefaultMutationKeys = exports.orgMemberMutationKeys = exports.appLimitCreditMutationKeys = exports.appLimitCreditCodeItemMutationKeys = exports.appLimitCreditRedemptionMutationKeys = exports.appLevelRequirementMutationKeys = exports.orgPermissionMutationKeys = exports.appPermissionMutationKeys = exports.orgGetSubordinatesRecordMutationKeys = exports.orgGetManagersRecordMutationKeys = void 0;
|
|
9
9
|
// ============================================================================
|
|
10
10
|
// Mutation keys for tracking in-flight mutations
|
|
11
11
|
//
|
|
@@ -243,6 +243,12 @@ exports.orgChartEdgeMutationKeys = {
|
|
|
243
243
|
/** Update orgChartEdge mutation key */ update: (id) => ['mutation', 'orgchartedge', 'update', id],
|
|
244
244
|
/** Delete orgChartEdge mutation key */ delete: (id) => ['mutation', 'orgchartedge', 'delete', id],
|
|
245
245
|
};
|
|
246
|
+
exports.usageSnapshotMutationKeys = {
|
|
247
|
+
/** All usageSnapshot mutation keys */ all: ['mutation', 'usagesnapshot'],
|
|
248
|
+
/** Create usageSnapshot mutation key */ create: () => ['mutation', 'usagesnapshot', 'create'],
|
|
249
|
+
/** Update usageSnapshot mutation key */ update: (id) => ['mutation', 'usagesnapshot', 'update', id],
|
|
250
|
+
/** Delete usageSnapshot mutation key */ delete: (id) => ['mutation', 'usagesnapshot', 'delete', id],
|
|
251
|
+
};
|
|
246
252
|
exports.orgMemberProfileMutationKeys = {
|
|
247
253
|
/** All orgMemberProfile mutation keys */ all: ['mutation', 'orgmemberprofile'],
|
|
248
254
|
/** Create orgMemberProfile mutation key */ create: () => ['mutation', 'orgmemberprofile', 'create'],
|
|
@@ -376,6 +382,7 @@ exports.mutationKeys = {
|
|
|
376
382
|
orgLimitEvent: exports.orgLimitEventMutationKeys,
|
|
377
383
|
orgGrant: exports.orgGrantMutationKeys,
|
|
378
384
|
orgChartEdge: exports.orgChartEdgeMutationKeys,
|
|
385
|
+
usageSnapshot: exports.usageSnapshotMutationKeys,
|
|
379
386
|
orgMemberProfile: exports.orgMemberProfileMutationKeys,
|
|
380
387
|
appLevel: exports.appLevelMutationKeys,
|
|
381
388
|
appLimit: exports.appLimitMutationKeys,
|
|
@@ -103,6 +103,9 @@ export * from './useDeleteOrgGrantMutation';
|
|
|
103
103
|
export * from './useCreateOrgChartEdgeMutation';
|
|
104
104
|
export * from './useUpdateOrgChartEdgeMutation';
|
|
105
105
|
export * from './useDeleteOrgChartEdgeMutation';
|
|
106
|
+
export * from './useCreateUsageSnapshotMutation';
|
|
107
|
+
export * from './useUpdateUsageSnapshotMutation';
|
|
108
|
+
export * from './useDeleteUsageSnapshotMutation';
|
|
106
109
|
export * from './useCreateOrgMemberProfileMutation';
|
|
107
110
|
export * from './useUpdateOrgMemberProfileMutation';
|
|
108
111
|
export * from './useDeleteOrgMemberProfileMutation';
|
|
@@ -119,6 +119,9 @@ __exportStar(require("./useDeleteOrgGrantMutation"), exports);
|
|
|
119
119
|
__exportStar(require("./useCreateOrgChartEdgeMutation"), exports);
|
|
120
120
|
__exportStar(require("./useUpdateOrgChartEdgeMutation"), exports);
|
|
121
121
|
__exportStar(require("./useDeleteOrgChartEdgeMutation"), exports);
|
|
122
|
+
__exportStar(require("./useCreateUsageSnapshotMutation"), exports);
|
|
123
|
+
__exportStar(require("./useUpdateUsageSnapshotMutation"), exports);
|
|
124
|
+
__exportStar(require("./useDeleteUsageSnapshotMutation"), exports);
|
|
122
125
|
__exportStar(require("./useCreateOrgMemberProfileMutation"), exports);
|
|
123
126
|
__exportStar(require("./useUpdateOrgMemberProfileMutation"), exports);
|
|
124
127
|
__exportStar(require("./useDeleteOrgMemberProfileMutation"), exports);
|
|
@@ -0,0 +1,34 @@
|
|
|
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 type { UseMutationOptions, UseMutationResult } from '@tanstack/react-query';
|
|
7
|
+
import type { UsageSnapshotSelect, UsageSnapshotWithRelations, CreateUsageSnapshotInput } from '../../orm/input-types';
|
|
8
|
+
import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types';
|
|
9
|
+
export type { UsageSnapshotSelect, UsageSnapshotWithRelations, CreateUsageSnapshotInput, } from '../../orm/input-types';
|
|
10
|
+
/**
|
|
11
|
+
* 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.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```tsx
|
|
15
|
+
* const { mutate, isPending } = useCreateUsageSnapshotMutation({
|
|
16
|
+
* selection: { fields: { id: true, name: true } },
|
|
17
|
+
* });
|
|
18
|
+
*
|
|
19
|
+
* mutate({ name: 'New item' });
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
export declare function useCreateUsageSnapshotMutation<S extends UsageSnapshotSelect>(params: {
|
|
23
|
+
selection: {
|
|
24
|
+
fields: S & UsageSnapshotSelect;
|
|
25
|
+
} & HookStrictSelect<NoInfer<S>, UsageSnapshotSelect>;
|
|
26
|
+
} & Omit<UseMutationOptions<{
|
|
27
|
+
createUsageSnapshot: {
|
|
28
|
+
usageSnapshot: InferSelectResult<UsageSnapshotWithRelations, S>;
|
|
29
|
+
};
|
|
30
|
+
}, Error, CreateUsageSnapshotInput['usageSnapshot']>, 'mutationFn'>): UseMutationResult<{
|
|
31
|
+
createUsageSnapshot: {
|
|
32
|
+
usageSnapshot: InferSelectResult<UsageSnapshotWithRelations, S>;
|
|
33
|
+
};
|
|
34
|
+
}, Error, CreateUsageSnapshotInput['usageSnapshot']>;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* 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.
|
|
4
|
+
* @generated by @constructive-io/graphql-codegen
|
|
5
|
+
* DO NOT EDIT - changes will be overwritten
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.useCreateUsageSnapshotMutation = useCreateUsageSnapshotMutation;
|
|
9
|
+
const react_query_1 = require("@tanstack/react-query");
|
|
10
|
+
const client_1 = require("../client");
|
|
11
|
+
const selection_1 = require("../selection");
|
|
12
|
+
const query_keys_1 = require("../query-keys");
|
|
13
|
+
const mutation_keys_1 = require("../mutation-keys");
|
|
14
|
+
function useCreateUsageSnapshotMutation(params) {
|
|
15
|
+
const args = (0, selection_1.buildSelectionArgs)(params.selection);
|
|
16
|
+
const { selection: _selection, ...mutationOptions } = params ?? {};
|
|
17
|
+
void _selection;
|
|
18
|
+
const queryClient = (0, react_query_1.useQueryClient)();
|
|
19
|
+
return (0, react_query_1.useMutation)({
|
|
20
|
+
mutationKey: mutation_keys_1.usageSnapshotMutationKeys.create(),
|
|
21
|
+
mutationFn: (data) => (0, client_1.getClient)()
|
|
22
|
+
.usageSnapshot.create({
|
|
23
|
+
data,
|
|
24
|
+
select: args.select,
|
|
25
|
+
})
|
|
26
|
+
.unwrap(),
|
|
27
|
+
onSuccess: () => {
|
|
28
|
+
queryClient.invalidateQueries({
|
|
29
|
+
queryKey: query_keys_1.usageSnapshotKeys.lists(),
|
|
30
|
+
});
|
|
31
|
+
},
|
|
32
|
+
...mutationOptions,
|
|
33
|
+
});
|
|
34
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
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 type { UseMutationOptions, UseMutationResult } from '@tanstack/react-query';
|
|
7
|
+
import type { UsageSnapshotSelect, UsageSnapshotWithRelations } from '../../orm/input-types';
|
|
8
|
+
import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types';
|
|
9
|
+
export type { UsageSnapshotSelect, UsageSnapshotWithRelations } from '../../orm/input-types';
|
|
10
|
+
/**
|
|
11
|
+
* 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.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```tsx
|
|
15
|
+
* const { mutate, isPending } = useDeleteUsageSnapshotMutation({
|
|
16
|
+
* selection: { fields: { id: true } },
|
|
17
|
+
* });
|
|
18
|
+
*
|
|
19
|
+
* mutate({ id: 'value-to-delete' });
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
export declare function useDeleteUsageSnapshotMutation<S extends UsageSnapshotSelect>(params: {
|
|
23
|
+
selection: {
|
|
24
|
+
fields: S & UsageSnapshotSelect;
|
|
25
|
+
} & HookStrictSelect<NoInfer<S>, UsageSnapshotSelect>;
|
|
26
|
+
} & Omit<UseMutationOptions<{
|
|
27
|
+
deleteUsageSnapshot: {
|
|
28
|
+
usageSnapshot: InferSelectResult<UsageSnapshotWithRelations, S>;
|
|
29
|
+
};
|
|
30
|
+
}, Error, {
|
|
31
|
+
id: string;
|
|
32
|
+
}>, 'mutationFn'>): UseMutationResult<{
|
|
33
|
+
deleteUsageSnapshot: {
|
|
34
|
+
usageSnapshot: InferSelectResult<UsageSnapshotWithRelations, S>;
|
|
35
|
+
};
|
|
36
|
+
}, Error, {
|
|
37
|
+
id: string;
|
|
38
|
+
}>;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* 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.
|
|
4
|
+
* @generated by @constructive-io/graphql-codegen
|
|
5
|
+
* DO NOT EDIT - changes will be overwritten
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.useDeleteUsageSnapshotMutation = useDeleteUsageSnapshotMutation;
|
|
9
|
+
const react_query_1 = require("@tanstack/react-query");
|
|
10
|
+
const client_1 = require("../client");
|
|
11
|
+
const selection_1 = require("../selection");
|
|
12
|
+
const query_keys_1 = require("../query-keys");
|
|
13
|
+
const mutation_keys_1 = require("../mutation-keys");
|
|
14
|
+
function useDeleteUsageSnapshotMutation(params) {
|
|
15
|
+
const args = (0, selection_1.buildSelectionArgs)(params.selection);
|
|
16
|
+
const { selection: _selection, ...mutationOptions } = params ?? {};
|
|
17
|
+
void _selection;
|
|
18
|
+
const queryClient = (0, react_query_1.useQueryClient)();
|
|
19
|
+
return (0, react_query_1.useMutation)({
|
|
20
|
+
mutationKey: mutation_keys_1.usageSnapshotMutationKeys.all,
|
|
21
|
+
mutationFn: ({ id }) => (0, client_1.getClient)()
|
|
22
|
+
.usageSnapshot.delete({
|
|
23
|
+
where: {
|
|
24
|
+
id,
|
|
25
|
+
},
|
|
26
|
+
select: args.select,
|
|
27
|
+
})
|
|
28
|
+
.unwrap(),
|
|
29
|
+
onSuccess: (_, variables) => {
|
|
30
|
+
queryClient.removeQueries({
|
|
31
|
+
queryKey: query_keys_1.usageSnapshotKeys.detail(variables.id),
|
|
32
|
+
});
|
|
33
|
+
queryClient.invalidateQueries({
|
|
34
|
+
queryKey: query_keys_1.usageSnapshotKeys.lists(),
|
|
35
|
+
});
|
|
36
|
+
},
|
|
37
|
+
...mutationOptions,
|
|
38
|
+
});
|
|
39
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
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 type { UseMutationOptions, UseMutationResult } from '@tanstack/react-query';
|
|
7
|
+
import type { UsageSnapshotSelect, UsageSnapshotWithRelations, UsageSnapshotPatch } from '../../orm/input-types';
|
|
8
|
+
import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types';
|
|
9
|
+
export type { UsageSnapshotSelect, UsageSnapshotWithRelations, UsageSnapshotPatch, } from '../../orm/input-types';
|
|
10
|
+
/**
|
|
11
|
+
* 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.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```tsx
|
|
15
|
+
* const { mutate, isPending } = useUpdateUsageSnapshotMutation({
|
|
16
|
+
* selection: { fields: { id: true, name: true } },
|
|
17
|
+
* });
|
|
18
|
+
*
|
|
19
|
+
* mutate({ id: 'value-here', usageSnapshotPatch: { name: 'Updated' } });
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
export declare function useUpdateUsageSnapshotMutation<S extends UsageSnapshotSelect>(params: {
|
|
23
|
+
selection: {
|
|
24
|
+
fields: S & UsageSnapshotSelect;
|
|
25
|
+
} & HookStrictSelect<NoInfer<S>, UsageSnapshotSelect>;
|
|
26
|
+
} & Omit<UseMutationOptions<{
|
|
27
|
+
updateUsageSnapshot: {
|
|
28
|
+
usageSnapshot: InferSelectResult<UsageSnapshotWithRelations, S>;
|
|
29
|
+
};
|
|
30
|
+
}, Error, {
|
|
31
|
+
id: string;
|
|
32
|
+
usageSnapshotPatch: UsageSnapshotPatch;
|
|
33
|
+
}>, 'mutationFn'>): UseMutationResult<{
|
|
34
|
+
updateUsageSnapshot: {
|
|
35
|
+
usageSnapshot: InferSelectResult<UsageSnapshotWithRelations, S>;
|
|
36
|
+
};
|
|
37
|
+
}, Error, {
|
|
38
|
+
id: string;
|
|
39
|
+
usageSnapshotPatch: UsageSnapshotPatch;
|
|
40
|
+
}>;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* 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.
|
|
4
|
+
* @generated by @constructive-io/graphql-codegen
|
|
5
|
+
* DO NOT EDIT - changes will be overwritten
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.useUpdateUsageSnapshotMutation = useUpdateUsageSnapshotMutation;
|
|
9
|
+
const react_query_1 = require("@tanstack/react-query");
|
|
10
|
+
const client_1 = require("../client");
|
|
11
|
+
const selection_1 = require("../selection");
|
|
12
|
+
const query_keys_1 = require("../query-keys");
|
|
13
|
+
const mutation_keys_1 = require("../mutation-keys");
|
|
14
|
+
function useUpdateUsageSnapshotMutation(params) {
|
|
15
|
+
const args = (0, selection_1.buildSelectionArgs)(params.selection);
|
|
16
|
+
const { selection: _selection, ...mutationOptions } = params ?? {};
|
|
17
|
+
void _selection;
|
|
18
|
+
const queryClient = (0, react_query_1.useQueryClient)();
|
|
19
|
+
return (0, react_query_1.useMutation)({
|
|
20
|
+
mutationKey: mutation_keys_1.usageSnapshotMutationKeys.all,
|
|
21
|
+
mutationFn: ({ id, usageSnapshotPatch, }) => (0, client_1.getClient)()
|
|
22
|
+
.usageSnapshot.update({
|
|
23
|
+
where: {
|
|
24
|
+
id,
|
|
25
|
+
},
|
|
26
|
+
data: usageSnapshotPatch,
|
|
27
|
+
select: args.select,
|
|
28
|
+
})
|
|
29
|
+
.unwrap(),
|
|
30
|
+
onSuccess: (_, variables) => {
|
|
31
|
+
queryClient.invalidateQueries({
|
|
32
|
+
queryKey: query_keys_1.usageSnapshotKeys.detail(variables.id),
|
|
33
|
+
});
|
|
34
|
+
queryClient.invalidateQueries({
|
|
35
|
+
queryKey: query_keys_1.usageSnapshotKeys.lists(),
|
|
36
|
+
});
|
|
37
|
+
},
|
|
38
|
+
...mutationOptions,
|
|
39
|
+
});
|
|
40
|
+
}
|
|
@@ -71,6 +71,8 @@ export * from './useOrgGrantsQuery';
|
|
|
71
71
|
export * from './useOrgGrantQuery';
|
|
72
72
|
export * from './useOrgChartEdgesQuery';
|
|
73
73
|
export * from './useOrgChartEdgeQuery';
|
|
74
|
+
export * from './useUsageSnapshotsQuery';
|
|
75
|
+
export * from './useUsageSnapshotQuery';
|
|
74
76
|
export * from './useOrgMemberProfilesQuery';
|
|
75
77
|
export * from './useOrgMemberProfileQuery';
|
|
76
78
|
export * from './useAppLevelsQuery';
|
|
@@ -87,6 +87,8 @@ __exportStar(require("./useOrgGrantsQuery"), exports);
|
|
|
87
87
|
__exportStar(require("./useOrgGrantQuery"), exports);
|
|
88
88
|
__exportStar(require("./useOrgChartEdgesQuery"), exports);
|
|
89
89
|
__exportStar(require("./useOrgChartEdgeQuery"), exports);
|
|
90
|
+
__exportStar(require("./useUsageSnapshotsQuery"), exports);
|
|
91
|
+
__exportStar(require("./useUsageSnapshotQuery"), exports);
|
|
90
92
|
__exportStar(require("./useOrgMemberProfilesQuery"), exports);
|
|
91
93
|
__exportStar(require("./useOrgMemberProfileQuery"), exports);
|
|
92
94
|
__exportStar(require("./useAppLevelsQuery"), exports);
|
|
@@ -0,0 +1,65 @@
|
|
|
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 type { UseQueryOptions, UseQueryResult, QueryClient } from '@tanstack/react-query';
|
|
7
|
+
import type { UsageSnapshotSelect, UsageSnapshotWithRelations } from '../../orm/input-types';
|
|
8
|
+
import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types';
|
|
9
|
+
export type { UsageSnapshotSelect, UsageSnapshotWithRelations } from '../../orm/input-types';
|
|
10
|
+
/** Query key factory - re-exported from query-keys.ts */
|
|
11
|
+
export declare const usageSnapshotQueryKey: (id: string | number) => readonly ["usagesnapshot", "detail", string | number];
|
|
12
|
+
/**
|
|
13
|
+
* 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.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```tsx
|
|
17
|
+
* const { data, isLoading } = useUsageSnapshotQuery({
|
|
18
|
+
* id: 'some-id',
|
|
19
|
+
* selection: { fields: { id: true, name: true } },
|
|
20
|
+
* });
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
export declare function useUsageSnapshotQuery<S extends UsageSnapshotSelect, TData = {
|
|
24
|
+
usageSnapshot: InferSelectResult<UsageSnapshotWithRelations, S> | null;
|
|
25
|
+
}>(params: {
|
|
26
|
+
id: string;
|
|
27
|
+
selection: {
|
|
28
|
+
fields: S;
|
|
29
|
+
} & HookStrictSelect<NoInfer<S>, UsageSnapshotSelect>;
|
|
30
|
+
} & Omit<UseQueryOptions<{
|
|
31
|
+
usageSnapshot: InferSelectResult<UsageSnapshotWithRelations, S> | null;
|
|
32
|
+
}, Error, TData>, 'queryKey' | 'queryFn'>): UseQueryResult<TData>;
|
|
33
|
+
/**
|
|
34
|
+
* 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.
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* ```ts
|
|
38
|
+
* const data = await fetchUsageSnapshotQuery({
|
|
39
|
+
* id: 'some-id',
|
|
40
|
+
* selection: { fields: { id: true } },
|
|
41
|
+
* });
|
|
42
|
+
* ```
|
|
43
|
+
*/
|
|
44
|
+
export declare function fetchUsageSnapshotQuery<S extends UsageSnapshotSelect>(params: {
|
|
45
|
+
id: string;
|
|
46
|
+
selection: {
|
|
47
|
+
fields: S;
|
|
48
|
+
} & HookStrictSelect<NoInfer<S>, UsageSnapshotSelect>;
|
|
49
|
+
}): Promise<{
|
|
50
|
+
usageSnapshot: InferSelectResult<UsageSnapshotWithRelations, S> | null;
|
|
51
|
+
}>;
|
|
52
|
+
/**
|
|
53
|
+
* 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.
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
* ```ts
|
|
57
|
+
* await prefetchUsageSnapshotQuery(queryClient, { id: 'some-id', selection: { fields: { id: true } } });
|
|
58
|
+
* ```
|
|
59
|
+
*/
|
|
60
|
+
export declare function prefetchUsageSnapshotQuery<S extends UsageSnapshotSelect>(queryClient: QueryClient, params: {
|
|
61
|
+
id: string;
|
|
62
|
+
selection: {
|
|
63
|
+
fields: S;
|
|
64
|
+
} & HookStrictSelect<NoInfer<S>, UsageSnapshotSelect>;
|
|
65
|
+
}): Promise<void>;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* 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.
|
|
4
|
+
* @generated by @constructive-io/graphql-codegen
|
|
5
|
+
* DO NOT EDIT - changes will be overwritten
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.usageSnapshotQueryKey = void 0;
|
|
9
|
+
exports.useUsageSnapshotQuery = useUsageSnapshotQuery;
|
|
10
|
+
exports.fetchUsageSnapshotQuery = fetchUsageSnapshotQuery;
|
|
11
|
+
exports.prefetchUsageSnapshotQuery = prefetchUsageSnapshotQuery;
|
|
12
|
+
const react_query_1 = require("@tanstack/react-query");
|
|
13
|
+
const client_1 = require("../client");
|
|
14
|
+
const selection_1 = require("../selection");
|
|
15
|
+
const query_keys_1 = require("../query-keys");
|
|
16
|
+
/** Query key factory - re-exported from query-keys.ts */
|
|
17
|
+
exports.usageSnapshotQueryKey = query_keys_1.usageSnapshotKeys.detail;
|
|
18
|
+
function useUsageSnapshotQuery(params) {
|
|
19
|
+
const args = (0, selection_1.buildSelectionArgs)(params.selection);
|
|
20
|
+
const { selection: _selection, ...queryOptions } = params ?? {};
|
|
21
|
+
void _selection;
|
|
22
|
+
return (0, react_query_1.useQuery)({
|
|
23
|
+
queryKey: query_keys_1.usageSnapshotKeys.detail(params.id),
|
|
24
|
+
queryFn: () => (0, client_1.getClient)()
|
|
25
|
+
.usageSnapshot.findOne({
|
|
26
|
+
id: params.id,
|
|
27
|
+
select: args.select,
|
|
28
|
+
})
|
|
29
|
+
.unwrap(),
|
|
30
|
+
...queryOptions,
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
async function fetchUsageSnapshotQuery(params) {
|
|
34
|
+
const args = (0, selection_1.buildSelectionArgs)(params.selection);
|
|
35
|
+
return (0, client_1.getClient)()
|
|
36
|
+
.usageSnapshot.findOne({
|
|
37
|
+
id: params.id,
|
|
38
|
+
select: args.select,
|
|
39
|
+
})
|
|
40
|
+
.unwrap();
|
|
41
|
+
}
|
|
42
|
+
async function prefetchUsageSnapshotQuery(queryClient, params) {
|
|
43
|
+
const args = (0, selection_1.buildSelectionArgs)(params.selection);
|
|
44
|
+
await queryClient.prefetchQuery({
|
|
45
|
+
queryKey: query_keys_1.usageSnapshotKeys.detail(params.id),
|
|
46
|
+
queryFn: () => (0, client_1.getClient)()
|
|
47
|
+
.usageSnapshot.findOne({
|
|
48
|
+
id: params.id,
|
|
49
|
+
select: args.select,
|
|
50
|
+
})
|
|
51
|
+
.unwrap(),
|
|
52
|
+
});
|
|
53
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
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 type { UseQueryOptions, UseQueryResult, QueryClient } from '@tanstack/react-query';
|
|
7
|
+
import type { ListSelectionConfig } from '../selection';
|
|
8
|
+
import type { UsageSnapshotSelect, UsageSnapshotWithRelations, UsageSnapshotFilter, UsageSnapshotOrderBy } from '../../orm/input-types';
|
|
9
|
+
import type { InferSelectResult, ConnectionResult, HookStrictSelect } from '../../orm/select-types';
|
|
10
|
+
export type { UsageSnapshotSelect, UsageSnapshotWithRelations, UsageSnapshotFilter, UsageSnapshotOrderBy, } from '../../orm/input-types';
|
|
11
|
+
/** Query key factory - re-exported from query-keys.ts */
|
|
12
|
+
export declare const usageSnapshotsQueryKey: (variables?: object) => readonly ["usagesnapshot", "list", object];
|
|
13
|
+
/**
|
|
14
|
+
* 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.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```tsx
|
|
18
|
+
* const { data, isLoading } = useUsageSnapshotsQuery({
|
|
19
|
+
* selection: {
|
|
20
|
+
* fields: { id: true, name: true },
|
|
21
|
+
* where: { name: { equalTo: "example" } },
|
|
22
|
+
* orderBy: ['CREATED_AT_DESC'],
|
|
23
|
+
* first: 10,
|
|
24
|
+
* },
|
|
25
|
+
* });
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
export declare function useUsageSnapshotsQuery<S extends UsageSnapshotSelect, TData = {
|
|
29
|
+
usageSnapshots: ConnectionResult<InferSelectResult<UsageSnapshotWithRelations, S>>;
|
|
30
|
+
}>(params: {
|
|
31
|
+
selection: {
|
|
32
|
+
fields: S;
|
|
33
|
+
} & Omit<ListSelectionConfig<S, UsageSnapshotFilter, UsageSnapshotOrderBy>, 'fields'> & HookStrictSelect<NoInfer<S>, UsageSnapshotSelect>;
|
|
34
|
+
} & Omit<UseQueryOptions<{
|
|
35
|
+
usageSnapshots: ConnectionResult<InferSelectResult<UsageSnapshotWithRelations, S>>;
|
|
36
|
+
}, Error, TData>, 'queryKey' | 'queryFn'>): UseQueryResult<TData>;
|
|
37
|
+
/**
|
|
38
|
+
* 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.
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* ```ts
|
|
42
|
+
* const data = await fetchUsageSnapshotsQuery({
|
|
43
|
+
* selection: {
|
|
44
|
+
* fields: { id: true },
|
|
45
|
+
* first: 10,
|
|
46
|
+
* },
|
|
47
|
+
* });
|
|
48
|
+
* ```
|
|
49
|
+
*/
|
|
50
|
+
export declare function fetchUsageSnapshotsQuery<S extends UsageSnapshotSelect>(params: {
|
|
51
|
+
selection: {
|
|
52
|
+
fields: S;
|
|
53
|
+
} & Omit<ListSelectionConfig<S, UsageSnapshotFilter, UsageSnapshotOrderBy>, 'fields'> & HookStrictSelect<NoInfer<S>, UsageSnapshotSelect>;
|
|
54
|
+
}): Promise<{
|
|
55
|
+
usageSnapshots: ConnectionResult<InferSelectResult<UsageSnapshotWithRelations, S>>;
|
|
56
|
+
}>;
|
|
57
|
+
/**
|
|
58
|
+
* 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.
|
|
59
|
+
*
|
|
60
|
+
* @example
|
|
61
|
+
* ```ts
|
|
62
|
+
* await prefetchUsageSnapshotsQuery(queryClient, { selection: { fields: { id: true }, first: 10 } });
|
|
63
|
+
* ```
|
|
64
|
+
*/
|
|
65
|
+
export declare function prefetchUsageSnapshotsQuery<S extends UsageSnapshotSelect>(queryClient: QueryClient, params: {
|
|
66
|
+
selection: {
|
|
67
|
+
fields: S;
|
|
68
|
+
} & Omit<ListSelectionConfig<S, UsageSnapshotFilter, UsageSnapshotOrderBy>, 'fields'> & HookStrictSelect<NoInfer<S>, UsageSnapshotSelect>;
|
|
69
|
+
}): Promise<void>;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* 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.
|
|
4
|
+
* @generated by @constructive-io/graphql-codegen
|
|
5
|
+
* DO NOT EDIT - changes will be overwritten
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.usageSnapshotsQueryKey = void 0;
|
|
9
|
+
exports.useUsageSnapshotsQuery = useUsageSnapshotsQuery;
|
|
10
|
+
exports.fetchUsageSnapshotsQuery = fetchUsageSnapshotsQuery;
|
|
11
|
+
exports.prefetchUsageSnapshotsQuery = prefetchUsageSnapshotsQuery;
|
|
12
|
+
const react_query_1 = require("@tanstack/react-query");
|
|
13
|
+
const client_1 = require("../client");
|
|
14
|
+
const selection_1 = require("../selection");
|
|
15
|
+
const query_keys_1 = require("../query-keys");
|
|
16
|
+
/** Query key factory - re-exported from query-keys.ts */
|
|
17
|
+
exports.usageSnapshotsQueryKey = query_keys_1.usageSnapshotKeys.list;
|
|
18
|
+
function useUsageSnapshotsQuery(params) {
|
|
19
|
+
const args = (0, selection_1.buildListSelectionArgs)(params.selection);
|
|
20
|
+
const { selection: _selection, ...queryOptions } = params ?? {};
|
|
21
|
+
void _selection;
|
|
22
|
+
return (0, react_query_1.useQuery)({
|
|
23
|
+
queryKey: query_keys_1.usageSnapshotKeys.list(args),
|
|
24
|
+
queryFn: () => (0, client_1.getClient)().usageSnapshot.findMany(args).unwrap(),
|
|
25
|
+
...queryOptions,
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
async function fetchUsageSnapshotsQuery(params) {
|
|
29
|
+
const args = (0, selection_1.buildListSelectionArgs)(params.selection);
|
|
30
|
+
return (0, client_1.getClient)().usageSnapshot.findMany(args).unwrap();
|
|
31
|
+
}
|
|
32
|
+
async function prefetchUsageSnapshotsQuery(queryClient, params) {
|
|
33
|
+
const args = (0, selection_1.buildListSelectionArgs)(params.selection);
|
|
34
|
+
await queryClient.prefetchQuery({
|
|
35
|
+
queryKey: query_keys_1.usageSnapshotKeys.list(args),
|
|
36
|
+
queryFn: () => (0, client_1.getClient)().usageSnapshot.findMany(args).unwrap(),
|
|
37
|
+
});
|
|
38
|
+
}
|