@hexclave/next 1.0.45 → 1.0.46

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 (99) hide show
  1. package/dist/{admin-app-impl-rh6q_LBv.d.ts → admin-app-impl-CGC-p1vR.d.ts} +8 -7
  2. package/dist/{admin-app-impl-rh6q_LBv.d.ts.map → admin-app-impl-CGC-p1vR.d.ts.map} +1 -1
  3. package/dist/clickmap/clickmap-core.js +2 -2
  4. package/dist/clickmap/index.js +2 -2
  5. package/dist/components/api-key-dialogs.js +2 -2
  6. package/dist/components/credential-sign-in.js +1 -1
  7. package/dist/components/credential-sign-up.js +1 -1
  8. package/dist/components/magic-link-sign-in.js +1 -1
  9. package/dist/components/team-switcher.js +1 -1
  10. package/dist/components-page/account-settings/active-sessions/active-sessions-page.js +2 -2
  11. package/dist/components-page/account-settings/api-keys/api-keys-page.js +2 -2
  12. package/dist/components-page/account-settings/email-and-auth/emails-section.js +1 -1
  13. package/dist/components-page/account-settings/email-and-auth/mfa-section.js +1 -1
  14. package/dist/components-page/account-settings/email-and-auth/password-section.js +1 -1
  15. package/dist/components-page/account-settings/teams/team-api-keys-section.js +2 -2
  16. package/dist/components-page/account-settings/teams/team-creation-page.js +1 -1
  17. package/dist/components-page/account-settings/teams/team-member-invitation-section.js +1 -1
  18. package/dist/components-page/auth-page.js +1 -1
  19. package/dist/components-page/cli-auth-confirm.js +1 -1
  20. package/dist/components-page/cli-auth-confirm.test.js +1 -1
  21. package/dist/components-page/forgot-password.js +1 -1
  22. package/dist/components-page/oauth-callback.js +2 -2
  23. package/dist/components-page/oauth-callback.test.js +1 -1
  24. package/dist/components-page/onboarding.js +1 -1
  25. package/dist/components-page/password-reset.js +1 -1
  26. package/dist/components-page/team-creation.js +1 -1
  27. package/dist/dev-tool/dev-tool-core.js +2 -2
  28. package/dist/dev-tool/index.js +2 -2
  29. package/dist/esm/clickmap/clickmap-core.js +2 -2
  30. package/dist/esm/clickmap/index.js +2 -2
  31. package/dist/esm/components/api-key-dialogs.js +2 -2
  32. package/dist/esm/components/credential-sign-in.js +1 -1
  33. package/dist/esm/components/credential-sign-up.js +1 -1
  34. package/dist/esm/components/magic-link-sign-in.js +1 -1
  35. package/dist/esm/components/team-switcher.js +1 -1
  36. package/dist/esm/components-page/account-settings/active-sessions/active-sessions-page.js +2 -2
  37. package/dist/esm/components-page/account-settings/api-keys/api-keys-page.js +2 -2
  38. package/dist/esm/components-page/account-settings/email-and-auth/emails-section.js +1 -1
  39. package/dist/esm/components-page/account-settings/email-and-auth/mfa-section.js +1 -1
  40. package/dist/esm/components-page/account-settings/email-and-auth/password-section.js +1 -1
  41. package/dist/esm/components-page/account-settings/teams/team-api-keys-section.js +2 -2
  42. package/dist/esm/components-page/account-settings/teams/team-creation-page.js +1 -1
  43. package/dist/esm/components-page/account-settings/teams/team-member-invitation-section.js +1 -1
  44. package/dist/esm/components-page/auth-page.js +1 -1
  45. package/dist/esm/components-page/cli-auth-confirm.js +1 -1
  46. package/dist/esm/components-page/cli-auth-confirm.test.js +1 -1
  47. package/dist/esm/components-page/forgot-password.js +1 -1
  48. package/dist/esm/components-page/oauth-callback.js +2 -2
  49. package/dist/esm/components-page/oauth-callback.test.js +1 -1
  50. package/dist/esm/components-page/onboarding.js +1 -1
  51. package/dist/esm/components-page/password-reset.js +1 -1
  52. package/dist/esm/components-page/team-creation.js +1 -1
  53. package/dist/esm/dev-tool/dev-tool-core.js +2 -2
  54. package/dist/esm/dev-tool/index.js +2 -2
  55. package/dist/esm/generated/quetzal-translations.d.ts +2 -2
  56. package/dist/esm/lib/auth.js +1 -1
  57. package/dist/esm/lib/hexclave-app/apps/implementations/admin-app-impl.d.ts +5 -5
  58. package/dist/esm/lib/hexclave-app/apps/implementations/admin-app-impl.d.ts.map +1 -1
  59. package/dist/esm/lib/hexclave-app/apps/implementations/admin-app-impl.js +8 -1
  60. package/dist/esm/lib/hexclave-app/apps/implementations/admin-app-impl.js.map +1 -1
  61. package/dist/esm/lib/hexclave-app/apps/implementations/client-app-impl.d.ts +2 -2
  62. package/dist/esm/lib/hexclave-app/apps/implementations/client-app-impl.js +2 -2
  63. package/dist/esm/lib/hexclave-app/apps/implementations/common.js +3 -3
  64. package/dist/esm/lib/hexclave-app/apps/implementations/event-tracker.js +1 -1
  65. package/dist/esm/lib/hexclave-app/apps/implementations/server-app-impl.d.ts +1 -0
  66. package/dist/esm/lib/hexclave-app/apps/implementations/server-app-impl.d.ts.map +1 -1
  67. package/dist/esm/lib/hexclave-app/apps/implementations/server-app-impl.js +6 -1
  68. package/dist/esm/lib/hexclave-app/apps/implementations/server-app-impl.js.map +1 -1
  69. package/dist/esm/lib/hexclave-app/apps/implementations/session-replay.js +1 -1
  70. package/dist/esm/providers/theme-provider.js +1 -1
  71. package/dist/esm/pushed-config-error-overlay/index.js +2 -2
  72. package/dist/generated/quetzal-translations.d.ts +1 -1
  73. package/dist/{hexclave-provider-M0b2de8H.d.ts → hexclave-provider-pFFvRW6F.d.ts} +2 -2
  74. package/dist/{hexclave-provider-M0b2de8H.d.ts.map → hexclave-provider-pFFvRW6F.d.ts.map} +1 -1
  75. package/dist/index.d.ts +1 -1
  76. package/dist/lib/auth.js +1 -1
  77. package/dist/lib/hexclave-app/apps/implementations/admin-app-impl.d.ts +1 -1
  78. package/dist/lib/hexclave-app/apps/implementations/admin-app-impl.js +7 -0
  79. package/dist/lib/hexclave-app/apps/implementations/admin-app-impl.js.map +1 -1
  80. package/dist/lib/hexclave-app/apps/implementations/client-app-impl.d.ts +1 -1
  81. package/dist/lib/hexclave-app/apps/implementations/client-app-impl.js +2 -2
  82. package/dist/lib/hexclave-app/apps/implementations/common.js +3 -3
  83. package/dist/lib/hexclave-app/apps/implementations/event-tracker.js +1 -1
  84. package/dist/lib/hexclave-app/apps/implementations/index.d.ts +1 -1
  85. package/dist/lib/hexclave-app/apps/implementations/server-app-impl.d.ts +1 -1
  86. package/dist/lib/hexclave-app/apps/implementations/server-app-impl.js +6 -1
  87. package/dist/lib/hexclave-app/apps/implementations/server-app-impl.js.map +1 -1
  88. package/dist/lib/hexclave-app/apps/implementations/session-replay.js +1 -1
  89. package/dist/providers/hexclave-provider.d.ts +1 -1
  90. package/dist/providers/theme-provider.js +1 -1
  91. package/dist/providers/translation-provider.d.ts +1 -1
  92. package/dist/pushed-config-error-overlay/index.js +2 -2
  93. package/dist/{quetzal-translations-XeH3zQ9l.d.ts → quetzal-translations-DVNj-zsr.d.ts} +3 -3
  94. package/dist/{quetzal-translations-XeH3zQ9l.d.ts.map → quetzal-translations-DVNj-zsr.d.ts.map} +1 -1
  95. package/dist/{translation-provider-WOaZXqAz.d.ts → translation-provider-DPFkLbrw.d.ts} +2 -2
  96. package/dist/{translation-provider-WOaZXqAz.d.ts.map → translation-provider-DPFkLbrw.d.ts.map} +1 -1
  97. package/package.json +4 -4
  98. package/src/lib/hexclave-app/apps/implementations/admin-app-impl.ts +15 -1
  99. package/src/lib/hexclave-app/apps/implementations/server-app-impl.ts +10 -0
@@ -1 +1 @@
1
- {"version":3,"file":"quetzal-translations-XeH3zQ9l.d.ts","names":[],"sources":["../src/generated/quetzal-translations.ts"],"mappings":";cAUa,WAAA,EAAW,GAAA;AAAA,cAqTX,cAAA,EAAc,GAAA,mIAAA,GAAA,66qBAAA,GAAA,usnBAAA,GAAA,iyrBAAA,GAAA,g+qBAAA,GAAA,8srBAAA,GAAA,2trBAAA,GAAA,41pBAAA,GAAA,m3eAAA,GAAA,oreAAA,GAAA,swpBAAA,GAAA,+0qBAAA,GAAA,8wbAAA,GAAA"}
1
+ {"version":3,"file":"quetzal-translations-DVNj-zsr.d.ts","names":[],"sources":["../src/generated/quetzal-translations.ts"],"mappings":";cAUa,WAAA,EAAW,GAAA;AAAA,cAqTX,cAAA,EAAc,GAAA,mIAAA,GAAA,66qBAAA,GAAA,usnBAAA,GAAA,iyrBAAA,GAAA,g+qBAAA,GAAA,8srBAAA,GAAA,2trBAAA,GAAA,41pBAAA,GAAA,m3eAAA,GAAA,oreAAA,GAAA,swpBAAA,GAAA,+0qBAAA,GAAA,8wbAAA,GAAA"}
@@ -1,4 +1,4 @@
1
- import { n as quetzalLocales } from "./quetzal-translations-XeH3zQ9l.js";
1
+ import { n as quetzalLocales } from "./quetzal-translations-DVNj-zsr.js";
2
2
 
3
3
  //#region src/providers/translation-provider.d.ts
4
4
  declare function TranslationProvider({
@@ -12,4 +12,4 @@ declare function TranslationProvider({
12
12
  }): import("react/jsx-runtime").JSX.Element;
13
13
  //#endregion
14
14
  export { TranslationProvider as t };
15
- //# sourceMappingURL=translation-provider-WOaZXqAz.d.ts.map
15
+ //# sourceMappingURL=translation-provider-DPFkLbrw.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"translation-provider-WOaZXqAz.d.ts","names":[],"sources":["../src/providers/translation-provider.tsx"],"mappings":";;;iBAQgB,mBAAA;EAAsB,IAAA;EAAM,oBAAA;EAAsB;AAAA;EAChE,IAAA,EAAM,UAAA,QAAkB,cAAA,CAAe,GAAA;EACvC,oBAAA,GAAuB,MAAA;EACvB,QAAA,EAAU,KAAA,CAAM,SAAA;AAAA,gCACjB,GAAA,CAAA,OAAA"}
1
+ {"version":3,"file":"translation-provider-DPFkLbrw.d.ts","names":[],"sources":["../src/providers/translation-provider.tsx"],"mappings":";;;iBAQgB,mBAAA;EAAsB,IAAA;EAAM,oBAAA;EAAsB;AAAA;EAChE,IAAA,EAAM,UAAA,QAAkB,cAAA,CAAe,GAAA;EACvC,oBAAA,GAAuB,MAAA;EACvB,QAAA,EAAU,KAAA,CAAM,SAAA;AAAA,gCACjB,GAAA,CAAA,OAAA"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "//": "THIS FILE IS AUTO-GENERATED FROM TEMPLATE. DO NOT EDIT IT DIRECTLY UNLESS YOU ALSO EDIT THE CORRESPONDING FILE IN packages/template (FOR package.json FILES, PLEASE EDIT package-template.json)",
3
3
  "name": "@hexclave/next",
4
- "version": "1.0.45",
4
+ "version": "1.0.46",
5
5
  "repository": "https://github.com/hexclave/hexclave",
6
6
  "sideEffects": false,
7
7
  "main": "./dist/index.js",
@@ -74,9 +74,9 @@
74
74
  "tailwindcss-animate": "^1.0.7",
75
75
  "rrweb": "^1.1.3",
76
76
  "yup": "^1.7.1",
77
- "@hexclave/shared": "1.0.45",
78
- "@hexclave/sc": "1.0.45",
79
- "@hexclave/ui": "1.0.45"
77
+ "@hexclave/sc": "1.0.46",
78
+ "@hexclave/ui": "1.0.46",
79
+ "@hexclave/shared": "1.0.46"
80
80
  },
81
81
  "peerDependencies": {
82
82
  "@types/react": ">=18.0.0",
@@ -13,7 +13,7 @@ import type { AdminGetSessionReplayChunkEventsResponse } from "@hexclave/shared/
13
13
  import type { Transaction, TransactionType } from "@hexclave/shared/dist/interface/crud/transactions";
14
14
  import type { RestrictedReason } from "@hexclave/shared/dist/schema-fields";
15
15
  import type { MoneyAmount } from "@hexclave/shared/dist/utils/currency-constants";
16
- import { HexclaveAssertionError, throwErr } from "@hexclave/shared/dist/utils/errors";
16
+ import { HexclaveAssertionError, captureError, throwErr } from "@hexclave/shared/dist/utils/errors";
17
17
  import type { Json } from "@hexclave/shared/dist/utils/json";
18
18
  import { pick, typedEntries, typedValues } from "@hexclave/shared/dist/utils/objects";
19
19
  import { Result } from "@hexclave/shared/dist/utils/results";
@@ -883,6 +883,20 @@ export class _HexclaveAdminAppImplIncomplete<HasTokenStore extends boolean, Proj
883
883
  allow_negative: true,
884
884
  }
885
885
  );
886
+ const [customerType, customerId] = "userId" in options
887
+ ? ["user", options.userId] as const
888
+ : "teamId" in options
889
+ ? ["team", options.teamId] as const
890
+ : ["custom", options.customCustomerId] as const;
891
+ try {
892
+ // Best-effort: the quantity change is already persisted at this point, so
893
+ // a cache refresh failure must not make the mutation look failed (a retry
894
+ // would apply the delta twice).
895
+ await this._refreshItemCache(customerType, customerId, options.itemId);
896
+ await this._transactionsCache.invalidateWhere(() => true);
897
+ } catch (error) {
898
+ captureError("create-item-quantity-change-cache-refresh", error);
899
+ }
886
900
  }
887
901
 
888
902
  async refundTransaction(options: {
@@ -1396,6 +1396,16 @@ export class _HexclaveServerAppImplIncomplete<HasTokenStore extends boolean, Pro
1396
1396
  }
1397
1397
  }
1398
1398
 
1399
+ protected async _refreshItemCache(customerType: "user" | "team" | "custom", customerId: string, itemId: string): Promise<void> {
1400
+ if (customerType === "user") {
1401
+ await this._serverUserItemsCache.refresh([customerId, itemId]);
1402
+ } else if (customerType === "team") {
1403
+ await this._serverTeamItemsCache.refresh([customerId, itemId]);
1404
+ } else {
1405
+ await this._serverCustomItemsCache.refresh([customerId, itemId]);
1406
+ }
1407
+ }
1408
+
1399
1409
  async listProducts(options: CustomerProductsRequestOptions): Promise<CustomerProductsList> {
1400
1410
  if ("userId" in options) {
1401
1411
  const response = Result.orThrow(await this._serverUserProductsCache.getOrWait([options.userId, options.cursor ?? null, options.limit ?? null], "write-only"));