@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.
Files changed (137) hide show
  1. package/admin/hooks/index.d.ts +1 -1
  2. package/admin/hooks/index.js +1 -1
  3. package/admin/hooks/invalidation.d.ts +6 -0
  4. package/admin/hooks/invalidation.js +16 -0
  5. package/admin/hooks/mutation-keys.d.ts +12 -0
  6. package/admin/hooks/mutation-keys.js +8 -1
  7. package/admin/hooks/mutations/index.d.ts +3 -0
  8. package/admin/hooks/mutations/index.js +3 -0
  9. package/admin/hooks/mutations/useCreateUsageSnapshotMutation.d.ts +34 -0
  10. package/admin/hooks/mutations/useCreateUsageSnapshotMutation.js +34 -0
  11. package/admin/hooks/mutations/useDeleteUsageSnapshotMutation.d.ts +38 -0
  12. package/admin/hooks/mutations/useDeleteUsageSnapshotMutation.js +39 -0
  13. package/admin/hooks/mutations/useUpdateUsageSnapshotMutation.d.ts +40 -0
  14. package/admin/hooks/mutations/useUpdateUsageSnapshotMutation.js +40 -0
  15. package/admin/hooks/queries/index.d.ts +2 -0
  16. package/admin/hooks/queries/index.js +2 -0
  17. package/admin/hooks/queries/useUsageSnapshotQuery.d.ts +65 -0
  18. package/admin/hooks/queries/useUsageSnapshotQuery.js +53 -0
  19. package/admin/hooks/queries/useUsageSnapshotsQuery.d.ts +69 -0
  20. package/admin/hooks/queries/useUsageSnapshotsQuery.js +38 -0
  21. package/admin/hooks/query-keys.d.ts +14 -0
  22. package/admin/hooks/query-keys.js +9 -1
  23. package/admin/orm/index.d.ts +2 -0
  24. package/admin/orm/index.js +2 -0
  25. package/admin/orm/input-types.d.ts +129 -0
  26. package/admin/orm/models/index.d.ts +1 -0
  27. package/admin/orm/models/index.js +3 -1
  28. package/admin/orm/models/usageSnapshot.d.ts +56 -0
  29. package/admin/orm/models/usageSnapshot.js +100 -0
  30. package/admin/schema-types.d.ts +98 -1
  31. package/admin/types.d.ts +8 -0
  32. package/esm/admin/hooks/index.d.ts +1 -1
  33. package/esm/admin/hooks/index.js +1 -1
  34. package/esm/admin/hooks/invalidation.d.ts +6 -0
  35. package/esm/admin/hooks/invalidation.js +17 -1
  36. package/esm/admin/hooks/mutation-keys.d.ts +12 -0
  37. package/esm/admin/hooks/mutation-keys.js +7 -0
  38. package/esm/admin/hooks/mutations/index.d.ts +3 -0
  39. package/esm/admin/hooks/mutations/index.js +3 -0
  40. package/esm/admin/hooks/mutations/useCreateUsageSnapshotMutation.d.ts +34 -0
  41. package/esm/admin/hooks/mutations/useCreateUsageSnapshotMutation.js +31 -0
  42. package/esm/admin/hooks/mutations/useDeleteUsageSnapshotMutation.d.ts +38 -0
  43. package/esm/admin/hooks/mutations/useDeleteUsageSnapshotMutation.js +36 -0
  44. package/esm/admin/hooks/mutations/useUpdateUsageSnapshotMutation.d.ts +40 -0
  45. package/esm/admin/hooks/mutations/useUpdateUsageSnapshotMutation.js +37 -0
  46. package/esm/admin/hooks/queries/index.d.ts +2 -0
  47. package/esm/admin/hooks/queries/index.js +2 -0
  48. package/esm/admin/hooks/queries/useUsageSnapshotQuery.d.ts +65 -0
  49. package/esm/admin/hooks/queries/useUsageSnapshotQuery.js +47 -0
  50. package/esm/admin/hooks/queries/useUsageSnapshotsQuery.d.ts +69 -0
  51. package/esm/admin/hooks/queries/useUsageSnapshotsQuery.js +32 -0
  52. package/esm/admin/hooks/query-keys.d.ts +14 -0
  53. package/esm/admin/hooks/query-keys.js +8 -0
  54. package/esm/admin/orm/index.d.ts +2 -0
  55. package/esm/admin/orm/index.js +2 -0
  56. package/esm/admin/orm/input-types.d.ts +129 -0
  57. package/esm/admin/orm/models/index.d.ts +1 -0
  58. package/esm/admin/orm/models/index.js +1 -0
  59. package/esm/admin/orm/models/usageSnapshot.d.ts +56 -0
  60. package/esm/admin/orm/models/usageSnapshot.js +96 -0
  61. package/esm/admin/schema-types.d.ts +98 -1
  62. package/esm/admin/types.d.ts +8 -0
  63. package/esm/public/hooks/index.d.ts +1 -1
  64. package/esm/public/hooks/index.js +1 -1
  65. package/esm/public/hooks/invalidation.d.ts +6 -0
  66. package/esm/public/hooks/invalidation.js +17 -1
  67. package/esm/public/hooks/mutation-keys.d.ts +12 -4
  68. package/esm/public/hooks/mutation-keys.js +7 -6
  69. package/esm/public/hooks/mutations/index.d.ts +3 -2
  70. package/esm/public/hooks/mutations/index.js +3 -2
  71. package/esm/public/hooks/mutations/useCreateUsageSnapshotMutation.d.ts +34 -0
  72. package/esm/public/hooks/mutations/useCreateUsageSnapshotMutation.js +31 -0
  73. package/esm/public/hooks/mutations/useDeleteUsageSnapshotMutation.d.ts +38 -0
  74. package/esm/public/hooks/mutations/useDeleteUsageSnapshotMutation.js +36 -0
  75. package/esm/public/hooks/mutations/useUpdateUsageSnapshotMutation.d.ts +40 -0
  76. package/esm/public/hooks/mutations/useUpdateUsageSnapshotMutation.js +37 -0
  77. package/esm/public/hooks/queries/index.d.ts +2 -0
  78. package/esm/public/hooks/queries/index.js +2 -0
  79. package/esm/public/hooks/queries/useUsageSnapshotQuery.d.ts +65 -0
  80. package/esm/public/hooks/queries/useUsageSnapshotQuery.js +47 -0
  81. package/esm/public/hooks/queries/useUsageSnapshotsQuery.d.ts +69 -0
  82. package/esm/public/hooks/queries/useUsageSnapshotsQuery.js +32 -0
  83. package/esm/public/hooks/query-keys.d.ts +14 -0
  84. package/esm/public/hooks/query-keys.js +8 -0
  85. package/esm/public/orm/index.d.ts +2 -10
  86. package/esm/public/orm/index.js +2 -0
  87. package/esm/public/orm/input-types.d.ts +129 -22
  88. package/esm/public/orm/models/index.d.ts +1 -0
  89. package/esm/public/orm/models/index.js +1 -0
  90. package/esm/public/orm/models/usageSnapshot.d.ts +56 -0
  91. package/esm/public/orm/models/usageSnapshot.js +96 -0
  92. package/esm/public/orm/mutation/index.d.ts +1 -17
  93. package/esm/public/orm/mutation/index.js +0 -24
  94. package/esm/public/schema-types.d.ts +367 -286
  95. package/esm/public/types.d.ts +8 -0
  96. package/package.json +6 -6
  97. package/public/hooks/index.d.ts +1 -1
  98. package/public/hooks/index.js +1 -1
  99. package/public/hooks/invalidation.d.ts +6 -0
  100. package/public/hooks/invalidation.js +16 -0
  101. package/public/hooks/mutation-keys.d.ts +12 -4
  102. package/public/hooks/mutation-keys.js +9 -7
  103. package/public/hooks/mutations/index.d.ts +3 -2
  104. package/public/hooks/mutations/index.js +3 -2
  105. package/public/hooks/mutations/useCreateUsageSnapshotMutation.d.ts +34 -0
  106. package/public/hooks/mutations/useCreateUsageSnapshotMutation.js +34 -0
  107. package/public/hooks/mutations/useDeleteUsageSnapshotMutation.d.ts +38 -0
  108. package/public/hooks/mutations/useDeleteUsageSnapshotMutation.js +39 -0
  109. package/public/hooks/mutations/useUpdateUsageSnapshotMutation.d.ts +40 -0
  110. package/public/hooks/mutations/useUpdateUsageSnapshotMutation.js +40 -0
  111. package/public/hooks/queries/index.d.ts +2 -0
  112. package/public/hooks/queries/index.js +2 -0
  113. package/public/hooks/queries/useUsageSnapshotQuery.d.ts +65 -0
  114. package/public/hooks/queries/useUsageSnapshotQuery.js +53 -0
  115. package/public/hooks/queries/useUsageSnapshotsQuery.d.ts +69 -0
  116. package/public/hooks/queries/useUsageSnapshotsQuery.js +38 -0
  117. package/public/hooks/query-keys.d.ts +14 -0
  118. package/public/hooks/query-keys.js +10 -1
  119. package/public/orm/index.d.ts +2 -10
  120. package/public/orm/index.js +2 -0
  121. package/public/orm/input-types.d.ts +129 -22
  122. package/public/orm/models/index.d.ts +1 -0
  123. package/public/orm/models/index.js +3 -1
  124. package/public/orm/models/usageSnapshot.d.ts +56 -0
  125. package/public/orm/models/usageSnapshot.js +100 -0
  126. package/public/orm/mutation/index.d.ts +1 -17
  127. package/public/orm/mutation/index.js +0 -24
  128. package/public/schema-types.d.ts +367 -286
  129. package/public/types.d.ts +8 -0
  130. package/esm/public/hooks/mutations/useAppendFieldSmartTagsMutation.d.ts +0 -20
  131. package/esm/public/hooks/mutations/useAppendFieldSmartTagsMutation.js +0 -23
  132. package/esm/public/hooks/mutations/useAppendTableSmartTagsMutation.d.ts +0 -20
  133. package/esm/public/hooks/mutations/useAppendTableSmartTagsMutation.js +0 -23
  134. package/public/hooks/mutations/useAppendFieldSmartTagsMutation.d.ts +0 -20
  135. package/public/hooks/mutations/useAppendFieldSmartTagsMutation.js +0 -26
  136. package/public/hooks/mutations/useAppendTableSmartTagsMutation.d.ts +0 -20
  137. package/public/hooks/mutations/useAppendTableSmartTagsMutation.js +0 -26
package/public/types.d.ts CHANGED
@@ -1551,6 +1551,14 @@ export interface RateLimitsModule {
1551
1551
  ipRateLimitsTable: string | null;
1552
1552
  rateLimitsTable: string | null;
1553
1553
  }
1554
+ export interface UsageSnapshot {
1555
+ databaseId: string | null;
1556
+ metricName: string | null;
1557
+ metricValue: string | null;
1558
+ dimensions: unknown | null;
1559
+ capturedAt: string | null;
1560
+ id: string | null;
1561
+ }
1554
1562
  export interface AppMembershipDefault {
1555
1563
  id: string | null;
1556
1564
  createdAt: string | null;
@@ -1,20 +0,0 @@
1
- /**
2
- * Custom mutation hook for appendFieldSmartTags
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 { AppendFieldSmartTagsVariables } from '../../orm/mutation';
8
- import type { AppendFieldSmartTagsPayloadSelect, AppendFieldSmartTagsPayload } from '../../orm/input-types';
9
- import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types';
10
- export type { AppendFieldSmartTagsVariables } from '../../orm/mutation';
11
- export type { AppendFieldSmartTagsPayloadSelect } from '../../orm/input-types';
12
- export declare function useAppendFieldSmartTagsMutation<S extends AppendFieldSmartTagsPayloadSelect>(params: {
13
- selection: {
14
- fields: S & AppendFieldSmartTagsPayloadSelect;
15
- } & HookStrictSelect<NoInfer<S>, AppendFieldSmartTagsPayloadSelect>;
16
- } & Omit<UseMutationOptions<{
17
- appendFieldSmartTags: InferSelectResult<AppendFieldSmartTagsPayload, S> | null;
18
- }, Error, AppendFieldSmartTagsVariables>, 'mutationFn'>): UseMutationResult<{
19
- appendFieldSmartTags: InferSelectResult<AppendFieldSmartTagsPayload, S> | null;
20
- }, Error, AppendFieldSmartTagsVariables>;
@@ -1,23 +0,0 @@
1
- /**
2
- * Custom mutation hook for appendFieldSmartTags
3
- * @generated by @constructive-io/graphql-codegen
4
- * DO NOT EDIT - changes will be overwritten
5
- */
6
- import { useMutation } from '@tanstack/react-query';
7
- import { getClient } from '../client';
8
- import { buildSelectionArgs } from '../selection';
9
- import { customMutationKeys } from '../mutation-keys';
10
- export function useAppendFieldSmartTagsMutation(params) {
11
- const args = buildSelectionArgs(params.selection);
12
- const { selection: _selection, ...mutationOptions } = params ?? {};
13
- void _selection;
14
- return useMutation({
15
- mutationKey: customMutationKeys.appendFieldSmartTags(),
16
- mutationFn: (variables) => getClient()
17
- .mutation.appendFieldSmartTags(variables, {
18
- select: args.select,
19
- })
20
- .unwrap(),
21
- ...mutationOptions,
22
- });
23
- }
@@ -1,20 +0,0 @@
1
- /**
2
- * Custom mutation hook for appendTableSmartTags
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 { AppendTableSmartTagsVariables } from '../../orm/mutation';
8
- import type { AppendTableSmartTagsPayloadSelect, AppendTableSmartTagsPayload } from '../../orm/input-types';
9
- import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types';
10
- export type { AppendTableSmartTagsVariables } from '../../orm/mutation';
11
- export type { AppendTableSmartTagsPayloadSelect } from '../../orm/input-types';
12
- export declare function useAppendTableSmartTagsMutation<S extends AppendTableSmartTagsPayloadSelect>(params: {
13
- selection: {
14
- fields: S & AppendTableSmartTagsPayloadSelect;
15
- } & HookStrictSelect<NoInfer<S>, AppendTableSmartTagsPayloadSelect>;
16
- } & Omit<UseMutationOptions<{
17
- appendTableSmartTags: InferSelectResult<AppendTableSmartTagsPayload, S> | null;
18
- }, Error, AppendTableSmartTagsVariables>, 'mutationFn'>): UseMutationResult<{
19
- appendTableSmartTags: InferSelectResult<AppendTableSmartTagsPayload, S> | null;
20
- }, Error, AppendTableSmartTagsVariables>;
@@ -1,23 +0,0 @@
1
- /**
2
- * Custom mutation hook for appendTableSmartTags
3
- * @generated by @constructive-io/graphql-codegen
4
- * DO NOT EDIT - changes will be overwritten
5
- */
6
- import { useMutation } from '@tanstack/react-query';
7
- import { getClient } from '../client';
8
- import { buildSelectionArgs } from '../selection';
9
- import { customMutationKeys } from '../mutation-keys';
10
- export function useAppendTableSmartTagsMutation(params) {
11
- const args = buildSelectionArgs(params.selection);
12
- const { selection: _selection, ...mutationOptions } = params ?? {};
13
- void _selection;
14
- return useMutation({
15
- mutationKey: customMutationKeys.appendTableSmartTags(),
16
- mutationFn: (variables) => getClient()
17
- .mutation.appendTableSmartTags(variables, {
18
- select: args.select,
19
- })
20
- .unwrap(),
21
- ...mutationOptions,
22
- });
23
- }
@@ -1,20 +0,0 @@
1
- /**
2
- * Custom mutation hook for appendFieldSmartTags
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 { AppendFieldSmartTagsVariables } from '../../orm/mutation';
8
- import type { AppendFieldSmartTagsPayloadSelect, AppendFieldSmartTagsPayload } from '../../orm/input-types';
9
- import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types';
10
- export type { AppendFieldSmartTagsVariables } from '../../orm/mutation';
11
- export type { AppendFieldSmartTagsPayloadSelect } from '../../orm/input-types';
12
- export declare function useAppendFieldSmartTagsMutation<S extends AppendFieldSmartTagsPayloadSelect>(params: {
13
- selection: {
14
- fields: S & AppendFieldSmartTagsPayloadSelect;
15
- } & HookStrictSelect<NoInfer<S>, AppendFieldSmartTagsPayloadSelect>;
16
- } & Omit<UseMutationOptions<{
17
- appendFieldSmartTags: InferSelectResult<AppendFieldSmartTagsPayload, S> | null;
18
- }, Error, AppendFieldSmartTagsVariables>, 'mutationFn'>): UseMutationResult<{
19
- appendFieldSmartTags: InferSelectResult<AppendFieldSmartTagsPayload, S> | null;
20
- }, Error, AppendFieldSmartTagsVariables>;
@@ -1,26 +0,0 @@
1
- "use strict";
2
- /**
3
- * Custom mutation hook for appendFieldSmartTags
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.useAppendFieldSmartTagsMutation = useAppendFieldSmartTagsMutation;
9
- const react_query_1 = require("@tanstack/react-query");
10
- const client_1 = require("../client");
11
- const selection_1 = require("../selection");
12
- const mutation_keys_1 = require("../mutation-keys");
13
- function useAppendFieldSmartTagsMutation(params) {
14
- const args = (0, selection_1.buildSelectionArgs)(params.selection);
15
- const { selection: _selection, ...mutationOptions } = params ?? {};
16
- void _selection;
17
- return (0, react_query_1.useMutation)({
18
- mutationKey: mutation_keys_1.customMutationKeys.appendFieldSmartTags(),
19
- mutationFn: (variables) => (0, client_1.getClient)()
20
- .mutation.appendFieldSmartTags(variables, {
21
- select: args.select,
22
- })
23
- .unwrap(),
24
- ...mutationOptions,
25
- });
26
- }
@@ -1,20 +0,0 @@
1
- /**
2
- * Custom mutation hook for appendTableSmartTags
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 { AppendTableSmartTagsVariables } from '../../orm/mutation';
8
- import type { AppendTableSmartTagsPayloadSelect, AppendTableSmartTagsPayload } from '../../orm/input-types';
9
- import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types';
10
- export type { AppendTableSmartTagsVariables } from '../../orm/mutation';
11
- export type { AppendTableSmartTagsPayloadSelect } from '../../orm/input-types';
12
- export declare function useAppendTableSmartTagsMutation<S extends AppendTableSmartTagsPayloadSelect>(params: {
13
- selection: {
14
- fields: S & AppendTableSmartTagsPayloadSelect;
15
- } & HookStrictSelect<NoInfer<S>, AppendTableSmartTagsPayloadSelect>;
16
- } & Omit<UseMutationOptions<{
17
- appendTableSmartTags: InferSelectResult<AppendTableSmartTagsPayload, S> | null;
18
- }, Error, AppendTableSmartTagsVariables>, 'mutationFn'>): UseMutationResult<{
19
- appendTableSmartTags: InferSelectResult<AppendTableSmartTagsPayload, S> | null;
20
- }, Error, AppendTableSmartTagsVariables>;
@@ -1,26 +0,0 @@
1
- "use strict";
2
- /**
3
- * Custom mutation hook for appendTableSmartTags
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.useAppendTableSmartTagsMutation = useAppendTableSmartTagsMutation;
9
- const react_query_1 = require("@tanstack/react-query");
10
- const client_1 = require("../client");
11
- const selection_1 = require("../selection");
12
- const mutation_keys_1 = require("../mutation-keys");
13
- function useAppendTableSmartTagsMutation(params) {
14
- const args = (0, selection_1.buildSelectionArgs)(params.selection);
15
- const { selection: _selection, ...mutationOptions } = params ?? {};
16
- void _selection;
17
- return (0, react_query_1.useMutation)({
18
- mutationKey: mutation_keys_1.customMutationKeys.appendTableSmartTags(),
19
- mutationFn: (variables) => (0, client_1.getClient)()
20
- .mutation.appendTableSmartTags(variables, {
21
- select: args.select,
22
- })
23
- .unwrap(),
24
- ...mutationOptions,
25
- });
26
- }