fastapi-rtk 1.0.10 → 1.0.12

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 (27) hide show
  1. package/dist/.bundled/jsonforms/cjs/_virtual/index10.cjs +2 -2
  2. package/dist/.bundled/jsonforms/cjs/_virtual/index6.cjs +2 -2
  3. package/dist/.bundled/jsonforms/cjs/_virtual/index7.cjs +2 -2
  4. package/dist/.bundled/jsonforms/cjs/_virtual/index8.cjs +2 -2
  5. package/dist/.bundled/jsonforms/cjs/_virtual/index9.cjs +2 -2
  6. package/dist/.bundled/jsonforms/esm/_virtual/index10.mjs +2 -2
  7. package/dist/.bundled/jsonforms/esm/_virtual/index6.mjs +2 -2
  8. package/dist/.bundled/jsonforms/esm/_virtual/index7.mjs +2 -2
  9. package/dist/.bundled/jsonforms/esm/_virtual/index8.mjs +2 -2
  10. package/dist/.bundled/jsonforms/esm/_virtual/index9.mjs +2 -2
  11. package/dist/.external/cjs/ajv@8.17.1/ajv/dist/compile/index.cjs +1 -1
  12. package/dist/.external/cjs/ajv@8.17.1/ajv/dist/vocabularies/applicator/index.cjs +1 -1
  13. package/dist/.external/cjs/ajv@8.17.1/ajv/dist/vocabularies/core/index.cjs +1 -1
  14. package/dist/.external/cjs/ajv@8.17.1/ajv/dist/vocabularies/format/index.cjs +1 -1
  15. package/dist/.external/cjs/ajv@8.17.1/ajv/dist/vocabularies/validation/index.cjs +1 -1
  16. package/dist/.external/esm/ajv@8.17.1/ajv/dist/compile/index.mjs +1 -1
  17. package/dist/.external/esm/ajv@8.17.1/ajv/dist/vocabularies/applicator/index.mjs +1 -1
  18. package/dist/.external/esm/ajv@8.17.1/ajv/dist/vocabularies/core/index.mjs +1 -1
  19. package/dist/.external/esm/ajv@8.17.1/ajv/dist/vocabularies/format/index.mjs +1 -1
  20. package/dist/.external/esm/ajv@8.17.1/ajv/dist/vocabularies/validation/index.mjs +1 -1
  21. package/dist/core/cjs/Wrappers/ApiProvider/utils/createQueryParams.cjs +3 -3
  22. package/dist/core/esm/Wrappers/ApiProvider/utils/createQueryParams.mjs +3 -3
  23. package/dist/core/lib/Wrappers/ApiProvider/hooks/useProvideApi.d.ts +1 -1
  24. package/dist/core/lib/Wrappers/ApiProvider/utils/createQueryParams.d.ts +2 -2
  25. package/dist/core/lib/hooks/api/useApi.d.ts +27 -9
  26. package/dist/core/lib/hooks/auth/useAuth.d.ts +46 -6
  27. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- var compile = {};
4
- exports.__exports = compile;
3
+ var format = {};
4
+ exports.__exports = format;
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- var core = {};
4
- exports.__exports = core;
3
+ var compile = {};
4
+ exports.__exports = compile;
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- var validation = {};
4
- exports.__exports = validation;
3
+ var core = {};
4
+ exports.__exports = core;
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- var applicator = {};
4
- exports.__exports = applicator;
3
+ var validation = {};
4
+ exports.__exports = validation;
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- var format = {};
4
- exports.__exports = format;
3
+ var applicator = {};
4
+ exports.__exports = applicator;
@@ -1,4 +1,4 @@
1
- var compile = {};
1
+ var format = {};
2
2
  export {
3
- compile as __exports
3
+ format as __exports
4
4
  };
@@ -1,4 +1,4 @@
1
- var core = {};
1
+ var compile = {};
2
2
  export {
3
- core as __exports
3
+ compile as __exports
4
4
  };
@@ -1,4 +1,4 @@
1
- var validation = {};
1
+ var core = {};
2
2
  export {
3
- validation as __exports
3
+ core as __exports
4
4
  };
@@ -1,4 +1,4 @@
1
- var applicator = {};
1
+ var validation = {};
2
2
  export {
3
- applicator as __exports
3
+ validation as __exports
4
4
  };
@@ -1,4 +1,4 @@
1
- var format = {};
1
+ var applicator = {};
2
2
  export {
3
- format as __exports
3
+ applicator as __exports
4
4
  };
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const index = require("../../../../../../.bundled/jsonforms/cjs/_virtual/index10.cjs");
3
+ const index = require("../../../../../../.bundled/jsonforms/cjs/_virtual/index6.cjs");
4
4
  const index$1 = require("./codegen/index.cjs");
5
5
  const validation_error = require("../runtime/validation_error.cjs");
6
6
  const names = require("./names.cjs");
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const index = require("../../../../../../../.bundled/jsonforms/cjs/_virtual/index8.cjs");
3
+ const index = require("../../../../../../../.bundled/jsonforms/cjs/_virtual/index9.cjs");
4
4
  const additionalItems = require("./additionalItems.cjs");
5
5
  const prefixItems = require("./prefixItems.cjs");
6
6
  const items = require("./items.cjs");
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const index = require("../../../../../../../.bundled/jsonforms/cjs/_virtual/index6.cjs");
3
+ const index = require("../../../../../../../.bundled/jsonforms/cjs/_virtual/index7.cjs");
4
4
  const id = require("./id.cjs");
5
5
  const ref = require("./ref.cjs");
6
6
  var hasRequiredCore;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const index = require("../../../../../../../.bundled/jsonforms/cjs/_virtual/index9.cjs");
3
+ const index = require("../../../../../../../.bundled/jsonforms/cjs/_virtual/index10.cjs");
4
4
  const format = require("./format.cjs");
5
5
  var hasRequiredFormat;
6
6
  function requireFormat() {
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const index = require("../../../../../../../.bundled/jsonforms/cjs/_virtual/index7.cjs");
3
+ const index = require("../../../../../../../.bundled/jsonforms/cjs/_virtual/index8.cjs");
4
4
  const limitNumber = require("./limitNumber.cjs");
5
5
  const multipleOf = require("./multipleOf.cjs");
6
6
  const limitLength = require("./limitLength.cjs");
@@ -1,4 +1,4 @@
1
- import { __exports as compile } from "../../../../../../.bundled/jsonforms/esm/_virtual/index10.mjs";
1
+ import { __exports as compile } from "../../../../../../.bundled/jsonforms/esm/_virtual/index6.mjs";
2
2
  import { __require as requireCodegen } from "./codegen/index.mjs";
3
3
  import { __require as requireValidation_error } from "../runtime/validation_error.mjs";
4
4
  import { __require as requireNames } from "./names.mjs";
@@ -1,4 +1,4 @@
1
- import { __exports as applicator } from "../../../../../../../.bundled/jsonforms/esm/_virtual/index8.mjs";
1
+ import { __exports as applicator } from "../../../../../../../.bundled/jsonforms/esm/_virtual/index9.mjs";
2
2
  import { __require as requireAdditionalItems } from "./additionalItems.mjs";
3
3
  import { __require as requirePrefixItems } from "./prefixItems.mjs";
4
4
  import { __require as requireItems } from "./items.mjs";
@@ -1,4 +1,4 @@
1
- import { __exports as core } from "../../../../../../../.bundled/jsonforms/esm/_virtual/index6.mjs";
1
+ import { __exports as core } from "../../../../../../../.bundled/jsonforms/esm/_virtual/index7.mjs";
2
2
  import { __require as requireId } from "./id.mjs";
3
3
  import { __require as requireRef } from "./ref.mjs";
4
4
  var hasRequiredCore;
@@ -1,4 +1,4 @@
1
- import { __exports as format } from "../../../../../../../.bundled/jsonforms/esm/_virtual/index9.mjs";
1
+ import { __exports as format } from "../../../../../../../.bundled/jsonforms/esm/_virtual/index10.mjs";
2
2
  import { __require as requireFormat$1 } from "./format.mjs";
3
3
  var hasRequiredFormat;
4
4
  function requireFormat() {
@@ -1,4 +1,4 @@
1
- import { __exports as validation } from "../../../../../../../.bundled/jsonforms/esm/_virtual/index7.mjs";
1
+ import { __exports as validation } from "../../../../../../../.bundled/jsonforms/esm/_virtual/index8.mjs";
2
2
  import { __require as requireLimitNumber } from "./limitNumber.mjs";
3
3
  import { __require as requireMultipleOf } from "./multipleOf.mjs";
4
4
  import { __require as requireLimitLength } from "./limitLength.mjs";
@@ -1,10 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const getInitialQueryParams = () => ({
4
- columns: [],
5
- filters: [],
6
4
  page: 0,
7
- page_size: 25
5
+ page_size: 25,
6
+ columns: [],
7
+ filters: []
8
8
  });
9
9
  const createQueryParams = (currentQueryParams, partialQueryParams = {}) => Object.entries(partialQueryParams).reduce(
10
10
  (acc, [key, value]) => {
@@ -1,8 +1,8 @@
1
1
  const getInitialQueryParams = () => ({
2
- columns: [],
3
- filters: [],
4
2
  page: 0,
5
- page_size: 25
3
+ page_size: 25,
4
+ columns: [],
5
+ filters: []
6
6
  });
7
7
  const createQueryParams = (currentQueryParams, partialQueryParams = {}) => Object.entries(partialQueryParams).reduce(
8
8
  (acc, [key, value]) => {
@@ -31,9 +31,9 @@ export function useProvideApi({ path, initialQueryParams, relation, fetchInfo, c
31
31
  filters?: any[];
32
32
  } | {
33
33
  filters: any[];
34
- columns: any[];
35
34
  page: number;
36
35
  page_size: number;
36
+ columns: any[];
37
37
  };
38
38
  loading: boolean;
39
39
  infoLoading: boolean;
@@ -1,8 +1,8 @@
1
1
  export function createQueryParams(currentQueryParams: Record<string, any> | null | undefined, partialQueryParams?: Record<string, any>): {
2
2
  [x: string]: any;
3
3
  } | {
4
- columns: any[];
5
- filters: any[];
6
4
  page: number;
7
5
  page_size: number;
6
+ columns: any[];
7
+ filters: any[];
8
8
  };
@@ -242,7 +242,7 @@ export type APIData = {
242
242
  /**
243
243
  * - The query parameters used in the API request.
244
244
  */
245
- queryParams: Record<string, any>;
245
+ queryParams: APIQueryParams;
246
246
  };
247
247
  export type APIQueryParamsFilter = {
248
248
  /**
@@ -258,6 +258,16 @@ export type APIQueryParamsFilter = {
258
258
  */
259
259
  value: any;
260
260
  };
261
+ export type APIQueryParamsOprFilter = {
262
+ /**
263
+ * - The operator to use for filtering (e.g., 'is_null', 'is_not_null').
264
+ */
265
+ opr: string;
266
+ /**
267
+ * - The value to filter by.
268
+ */
269
+ value: any;
270
+ };
261
271
  export type APISpecialKey = {
262
272
  /**
263
273
  * - The key to be used when retrieving general props for `NextGenDataGrid`. Typically `all`. but can be `_all` if `all` is in the list of columns.
@@ -270,13 +280,13 @@ export type APISpecialKey = {
270
280
  };
271
281
  export type APIQueryParams = {
272
282
  /**
273
- * - An array of column names to be included in the response.
283
+ * - The page number for pagination.
274
284
  */
275
- columns: string[];
285
+ page: number;
276
286
  /**
277
- * - An array of filters to apply to the query.
287
+ * - The number of items per page for pagination.
278
288
  */
279
- filters: APIQueryParamsFilter[];
289
+ page_size: number;
280
290
  /**
281
291
  * - The column name to order the results by.
282
292
  */
@@ -286,17 +296,25 @@ export type APIQueryParams = {
286
296
  */
287
297
  order_direction?: "asc" | "desc";
288
298
  /**
289
- * - The page number for pagination.
299
+ * - An array of column names to be included in the response.
290
300
  */
291
- page: number;
301
+ columns: string[];
292
302
  /**
293
- * - The number of items per page for pagination.
303
+ * - An array of filters to apply to the query.
294
304
  */
295
- page_size: number;
305
+ filters: APIQueryParamsFilter[];
306
+ /**
307
+ * - An array of opr filters to apply to the query.
308
+ */
309
+ opr_filters?: APIQueryParamsOprFilter[];
296
310
  /**
297
311
  * - A global filter string to apply to the query.
298
312
  */
299
313
  global_filter?: string;
314
+ /**
315
+ * - Whether to include the total count of items in the response.
316
+ */
317
+ with_count?: boolean;
300
318
  };
301
319
  export type APIStreaming = {
302
320
  /**
@@ -14,26 +14,66 @@ export type AuthUser = {
14
14
  * - The unique identifier of the authenticated user.
15
15
  */
16
16
  id: number;
17
- /**
18
- * - The username of the authenticated user.
19
- */
20
- username: string;
21
17
  /**
22
18
  * - The email of the authenticated user.
23
19
  */
24
20
  email: string;
21
+ /**
22
+ * - The username of the authenticated user.
23
+ */
24
+ username: string;
25
25
  /**
26
26
  * - The first name of the authenticated user.
27
27
  */
28
- first_name: string;
28
+ first_name?: string;
29
29
  /**
30
30
  * - The last name of the authenticated user.
31
31
  */
32
- last_name: string;
32
+ last_name?: string;
33
+ /**
34
+ * - Indicates whether the user account is active.
35
+ */
36
+ active: boolean;
37
+ /**
38
+ * - The timestamp of the user's last login.
39
+ */
40
+ last_login: string;
41
+ /**
42
+ * - The number of times the user has logged in.
43
+ */
44
+ login_count: number;
45
+ /**
46
+ * - The number of failed login attempts.
47
+ */
48
+ fail_login_count: number;
49
+ /**
50
+ * - The timestamp when the user account was created.
51
+ */
52
+ created_on: string;
53
+ /**
54
+ * - The timestamp when the user account was last changed.
55
+ */
56
+ changed_on: string;
57
+ /**
58
+ * - The full name of the authenticated user.
59
+ */
60
+ full_name: string;
33
61
  /**
34
62
  * - Indicates whether the user account is active.
35
63
  */
36
64
  is_active: boolean;
65
+ /**
66
+ * - Indicates whether the user's email is verified.
67
+ */
68
+ is_verified: boolean;
69
+ /**
70
+ * - Indicates whether the user has superuser privileges.
71
+ */
72
+ is_superuser: boolean;
73
+ /**
74
+ * - Indicates whether the user is anonymous.
75
+ */
76
+ is_anonymous: boolean;
37
77
  /**
38
78
  * - An array of permissions assigned to the user.
39
79
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fastapi-rtk",
3
- "version": "1.0.10",
3
+ "version": "1.0.12",
4
4
  "private": false,
5
5
  "description": "A React component library for FastAPI in combination with FastAPI React Toolkit backend, built with Mantine, JsonForms, and Zustand.",
6
6
  "license": "MIT",