@carlonicora/nextjs-jsonapi 3.3.1 → 3.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. package/dist/{BlockNoteEditor-G5A34EXN.mjs → BlockNoteEditor-SDVXTZRC.mjs} +5 -5
  2. package/dist/{BlockNoteEditor-JLMXCPGB.js → BlockNoteEditor-VV6DRWSA.js} +20 -20
  3. package/dist/{BlockNoteEditor-JLMXCPGB.js.map → BlockNoteEditor-VV6DRWSA.js.map} +1 -1
  4. package/dist/{JsonApiRequest-2OQCZAK6.mjs → JsonApiRequest-ADNIGXTP.mjs} +2 -2
  5. package/dist/JsonApiRequest-WWGSGV2I.js +26 -0
  6. package/dist/{JsonApiRequest-6TYNBVUL.js.map → JsonApiRequest-WWGSGV2I.js.map} +1 -1
  7. package/dist/billing/index.js +399 -399
  8. package/dist/billing/index.mjs +4 -4
  9. package/dist/{chunk-5AKDE5UW.js → chunk-4I3UORNT.js} +941 -938
  10. package/dist/chunk-4I3UORNT.js.map +1 -0
  11. package/dist/{chunk-PGARO3JT.mjs → chunk-KW6LYVFJ.mjs} +8 -7
  12. package/dist/chunk-KW6LYVFJ.mjs.map +1 -0
  13. package/dist/{chunk-UYENG3GT.js → chunk-OHG2YWNA.js} +22 -27
  14. package/dist/chunk-OHG2YWNA.js.map +1 -0
  15. package/dist/{chunk-LCMVARSP.mjs → chunk-RUEY6XSS.mjs} +8 -13
  16. package/dist/chunk-RUEY6XSS.mjs.map +1 -0
  17. package/dist/{chunk-CMGXH5SA.mjs → chunk-RVASYIQG.mjs} +47 -3
  18. package/dist/chunk-RVASYIQG.mjs.map +1 -0
  19. package/dist/{chunk-YKFXQOQA.js → chunk-S2C5V2XZ.js} +33 -32
  20. package/dist/chunk-S2C5V2XZ.js.map +1 -0
  21. package/dist/{chunk-PFAZPP54.js → chunk-W42MYR3Y.js} +59 -15
  22. package/dist/chunk-W42MYR3Y.js.map +1 -0
  23. package/dist/{chunk-O4LTJAAM.mjs → chunk-WPF4NFVV.mjs} +15 -12
  24. package/dist/{chunk-O4LTJAAM.mjs.map → chunk-WPF4NFVV.mjs.map} +1 -1
  25. package/dist/client/index.js +5 -5
  26. package/dist/client/index.mjs +4 -4
  27. package/dist/components/index.js +5 -5
  28. package/dist/components/index.mjs +4 -4
  29. package/dist/contexts/index.js +5 -5
  30. package/dist/contexts/index.mjs +4 -4
  31. package/dist/core/index.d.mts +59 -1
  32. package/dist/core/index.d.ts +59 -1
  33. package/dist/core/index.js +5 -3
  34. package/dist/core/index.js.map +1 -1
  35. package/dist/core/index.mjs +4 -2
  36. package/dist/features/help/index.js +38 -38
  37. package/dist/features/help/index.mjs +4 -4
  38. package/dist/features/tokenusage/index.js +102 -102
  39. package/dist/features/tokenusage/index.mjs +4 -4
  40. package/dist/index.d.mts +1 -1
  41. package/dist/index.d.ts +1 -1
  42. package/dist/index.js +6 -4
  43. package/dist/index.js.map +1 -1
  44. package/dist/index.mjs +5 -3
  45. package/dist/server/index.js +15 -14
  46. package/dist/server/index.js.map +1 -1
  47. package/dist/server/index.mjs +5 -4
  48. package/dist/server/index.mjs.map +1 -1
  49. package/package.json +1 -1
  50. package/src/client/JsonApiClient.ts +3 -2
  51. package/src/client/config.ts +5 -10
  52. package/src/components/forms/FormPlaceAutocomplete.tsx +2 -1
  53. package/src/core/env.ts +73 -0
  54. package/src/core/index.ts +1 -0
  55. package/src/features/auth/utils/AuthCookies.ts +2 -1
  56. package/src/features/company/components/forms/CompanyEditor.tsx +2 -1
  57. package/src/hooks/usePushNotifications.ts +2 -1
  58. package/src/hooks/useSocket.ts +4 -3
  59. package/src/server/JsonApiServer.ts +3 -2
  60. package/src/unified/JsonApiRequest.ts +3 -2
  61. package/dist/JsonApiRequest-6TYNBVUL.js +0 -26
  62. package/dist/chunk-5AKDE5UW.js.map +0 -1
  63. package/dist/chunk-CMGXH5SA.mjs.map +0 -1
  64. package/dist/chunk-LCMVARSP.mjs.map +0 -1
  65. package/dist/chunk-PFAZPP54.js.map +0 -1
  66. package/dist/chunk-PGARO3JT.mjs.map +0 -1
  67. package/dist/chunk-UYENG3GT.js.map +0 -1
  68. package/dist/chunk-YKFXQOQA.js.map +0 -1
  69. /package/dist/{BlockNoteEditor-G5A34EXN.mjs.map → BlockNoteEditor-SDVXTZRC.mjs.map} +0 -0
  70. /package/dist/{JsonApiRequest-2OQCZAK6.mjs.map → JsonApiRequest-ADNIGXTP.mjs.map} +0 -0
@@ -6,6 +6,7 @@ import {
6
6
  } from "./chunk-C7C7VY4F.mjs";
7
7
  import {
8
8
  DataClassRegistry,
9
+ ENV,
9
10
  JsonApiDataFactory,
10
11
  JsonApiDelete,
11
12
  JsonApiGet,
@@ -14,7 +15,7 @@ import {
14
15
  setBootstrapper,
15
16
  translateResponse,
16
17
  tryBootstrap
17
- } from "./chunk-CMGXH5SA.mjs";
18
+ } from "./chunk-RVASYIQG.mjs";
18
19
  import {
19
20
  __name
20
21
  } from "./chunk-PAWJFY3S.mjs";
@@ -335,7 +336,7 @@ var AbstractService = class {
335
336
  * Make an API call with automatic environment detection and error handling.
336
337
  */
337
338
  static async callApi(params) {
338
- const { JsonApiGet: JsonApiGet2, JsonApiPost: JsonApiPost2, JsonApiPut, JsonApiPatch, JsonApiDelete: JsonApiDelete2 } = await import("./JsonApiRequest-2OQCZAK6.mjs");
339
+ const { JsonApiGet: JsonApiGet2, JsonApiPost: JsonApiPost2, JsonApiPut, JsonApiPatch, JsonApiDelete: JsonApiDelete2 } = await import("./JsonApiRequest-ADNIGXTP.mjs");
339
340
  let apiResponse;
340
341
  let language = "en";
341
342
  if (typeof window === "undefined") {
@@ -436,7 +437,7 @@ var AbstractService = class {
436
437
  * Make an API call and return both data and meta from the response.
437
438
  */
438
439
  static async callApiWithMeta(params) {
439
- const { JsonApiGet: JsonApiGet2, JsonApiPost: JsonApiPost2, JsonApiPut, JsonApiPatch, JsonApiDelete: JsonApiDelete2 } = await import("./JsonApiRequest-2OQCZAK6.mjs");
440
+ const { JsonApiGet: JsonApiGet2, JsonApiPost: JsonApiPost2, JsonApiPut, JsonApiPatch, JsonApiDelete: JsonApiDelete2 } = await import("./JsonApiRequest-ADNIGXTP.mjs");
440
441
  let apiResponse;
441
442
  let language = "en";
442
443
  if (typeof window === "undefined") {
@@ -522,7 +523,7 @@ var AbstractService = class {
522
523
  * Get raw JSON:API response data without deserialization.
523
524
  */
524
525
  static async getRawData(params) {
525
- const { JsonApiGet: JsonApiGet2 } = await import("./JsonApiRequest-2OQCZAK6.mjs");
526
+ const { JsonApiGet: JsonApiGet2 } = await import("./JsonApiRequest-ADNIGXTP.mjs");
526
527
  let language = "en";
527
528
  if (typeof window === "undefined") {
528
529
  const { getLocale } = await import("next-intl/server");
@@ -567,7 +568,7 @@ function getClientApiUrl() {
567
568
  if (_clientConfig?.apiUrl) {
568
569
  return _clientConfig.apiUrl;
569
570
  }
570
- const envUrl = process.env.NEXT_PUBLIC_API_URL;
571
+ const envUrl = ENV.API_URL;
571
572
  if (!envUrl) {
572
573
  throw new Error(
573
574
  "API URL not configured. Use configureClientJsonApi() or set NEXT_PUBLIC_API_URL environment variable."
@@ -580,7 +581,7 @@ function getClientAppUrl() {
580
581
  if (_clientConfig?.appUrl) {
581
582
  return _clientConfig.appUrl;
582
583
  }
583
- const envUrl = process.env.NEXT_PUBLIC_ADDRESS;
584
+ const envUrl = ENV.APP_URL;
584
585
  if (!envUrl) {
585
586
  throw new Error(
586
587
  "App URL not configured. Use configureClientJsonApi({ appUrl }) or set NEXT_PUBLIC_ADDRESS environment variable."
@@ -8968,4 +8969,4 @@ export {
8968
8969
  AuditLogService,
8969
8970
  AuditLogModule
8970
8971
  };
8971
- //# sourceMappingURL=chunk-PGARO3JT.mjs.map
8972
+ //# sourceMappingURL=chunk-KW6LYVFJ.mjs.map