@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.
- package/dist/{admin-app-impl-rh6q_LBv.d.ts → admin-app-impl-CGC-p1vR.d.ts} +8 -7
- package/dist/{admin-app-impl-rh6q_LBv.d.ts.map → admin-app-impl-CGC-p1vR.d.ts.map} +1 -1
- package/dist/clickmap/clickmap-core.js +2 -2
- package/dist/clickmap/index.js +2 -2
- package/dist/components/api-key-dialogs.js +2 -2
- package/dist/components/credential-sign-in.js +1 -1
- package/dist/components/credential-sign-up.js +1 -1
- package/dist/components/magic-link-sign-in.js +1 -1
- package/dist/components/team-switcher.js +1 -1
- package/dist/components-page/account-settings/active-sessions/active-sessions-page.js +2 -2
- package/dist/components-page/account-settings/api-keys/api-keys-page.js +2 -2
- package/dist/components-page/account-settings/email-and-auth/emails-section.js +1 -1
- package/dist/components-page/account-settings/email-and-auth/mfa-section.js +1 -1
- package/dist/components-page/account-settings/email-and-auth/password-section.js +1 -1
- package/dist/components-page/account-settings/teams/team-api-keys-section.js +2 -2
- package/dist/components-page/account-settings/teams/team-creation-page.js +1 -1
- package/dist/components-page/account-settings/teams/team-member-invitation-section.js +1 -1
- package/dist/components-page/auth-page.js +1 -1
- package/dist/components-page/cli-auth-confirm.js +1 -1
- package/dist/components-page/cli-auth-confirm.test.js +1 -1
- package/dist/components-page/forgot-password.js +1 -1
- package/dist/components-page/oauth-callback.js +2 -2
- package/dist/components-page/oauth-callback.test.js +1 -1
- package/dist/components-page/onboarding.js +1 -1
- package/dist/components-page/password-reset.js +1 -1
- package/dist/components-page/team-creation.js +1 -1
- package/dist/dev-tool/dev-tool-core.js +2 -2
- package/dist/dev-tool/index.js +2 -2
- package/dist/esm/clickmap/clickmap-core.js +2 -2
- package/dist/esm/clickmap/index.js +2 -2
- package/dist/esm/components/api-key-dialogs.js +2 -2
- package/dist/esm/components/credential-sign-in.js +1 -1
- package/dist/esm/components/credential-sign-up.js +1 -1
- package/dist/esm/components/magic-link-sign-in.js +1 -1
- package/dist/esm/components/team-switcher.js +1 -1
- package/dist/esm/components-page/account-settings/active-sessions/active-sessions-page.js +2 -2
- package/dist/esm/components-page/account-settings/api-keys/api-keys-page.js +2 -2
- package/dist/esm/components-page/account-settings/email-and-auth/emails-section.js +1 -1
- package/dist/esm/components-page/account-settings/email-and-auth/mfa-section.js +1 -1
- package/dist/esm/components-page/account-settings/email-and-auth/password-section.js +1 -1
- package/dist/esm/components-page/account-settings/teams/team-api-keys-section.js +2 -2
- package/dist/esm/components-page/account-settings/teams/team-creation-page.js +1 -1
- package/dist/esm/components-page/account-settings/teams/team-member-invitation-section.js +1 -1
- package/dist/esm/components-page/auth-page.js +1 -1
- package/dist/esm/components-page/cli-auth-confirm.js +1 -1
- package/dist/esm/components-page/cli-auth-confirm.test.js +1 -1
- package/dist/esm/components-page/forgot-password.js +1 -1
- package/dist/esm/components-page/oauth-callback.js +2 -2
- package/dist/esm/components-page/oauth-callback.test.js +1 -1
- package/dist/esm/components-page/onboarding.js +1 -1
- package/dist/esm/components-page/password-reset.js +1 -1
- package/dist/esm/components-page/team-creation.js +1 -1
- package/dist/esm/dev-tool/dev-tool-core.js +2 -2
- package/dist/esm/dev-tool/index.js +2 -2
- package/dist/esm/generated/quetzal-translations.d.ts +2 -2
- package/dist/esm/lib/auth.js +1 -1
- package/dist/esm/lib/hexclave-app/apps/implementations/admin-app-impl.d.ts +5 -5
- package/dist/esm/lib/hexclave-app/apps/implementations/admin-app-impl.d.ts.map +1 -1
- package/dist/esm/lib/hexclave-app/apps/implementations/admin-app-impl.js +8 -1
- package/dist/esm/lib/hexclave-app/apps/implementations/admin-app-impl.js.map +1 -1
- package/dist/esm/lib/hexclave-app/apps/implementations/client-app-impl.d.ts +2 -2
- package/dist/esm/lib/hexclave-app/apps/implementations/client-app-impl.js +2 -2
- package/dist/esm/lib/hexclave-app/apps/implementations/common.js +3 -3
- package/dist/esm/lib/hexclave-app/apps/implementations/event-tracker.js +1 -1
- package/dist/esm/lib/hexclave-app/apps/implementations/server-app-impl.d.ts +1 -0
- package/dist/esm/lib/hexclave-app/apps/implementations/server-app-impl.d.ts.map +1 -1
- package/dist/esm/lib/hexclave-app/apps/implementations/server-app-impl.js +6 -1
- package/dist/esm/lib/hexclave-app/apps/implementations/server-app-impl.js.map +1 -1
- package/dist/esm/lib/hexclave-app/apps/implementations/session-replay.js +1 -1
- package/dist/esm/providers/theme-provider.js +1 -1
- package/dist/esm/pushed-config-error-overlay/index.js +2 -2
- package/dist/generated/quetzal-translations.d.ts +1 -1
- package/dist/{hexclave-provider-M0b2de8H.d.ts → hexclave-provider-pFFvRW6F.d.ts} +2 -2
- package/dist/{hexclave-provider-M0b2de8H.d.ts.map → hexclave-provider-pFFvRW6F.d.ts.map} +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/lib/auth.js +1 -1
- package/dist/lib/hexclave-app/apps/implementations/admin-app-impl.d.ts +1 -1
- package/dist/lib/hexclave-app/apps/implementations/admin-app-impl.js +7 -0
- package/dist/lib/hexclave-app/apps/implementations/admin-app-impl.js.map +1 -1
- package/dist/lib/hexclave-app/apps/implementations/client-app-impl.d.ts +1 -1
- package/dist/lib/hexclave-app/apps/implementations/client-app-impl.js +2 -2
- package/dist/lib/hexclave-app/apps/implementations/common.js +3 -3
- package/dist/lib/hexclave-app/apps/implementations/event-tracker.js +1 -1
- package/dist/lib/hexclave-app/apps/implementations/index.d.ts +1 -1
- package/dist/lib/hexclave-app/apps/implementations/server-app-impl.d.ts +1 -1
- package/dist/lib/hexclave-app/apps/implementations/server-app-impl.js +6 -1
- package/dist/lib/hexclave-app/apps/implementations/server-app-impl.js.map +1 -1
- package/dist/lib/hexclave-app/apps/implementations/session-replay.js +1 -1
- package/dist/providers/hexclave-provider.d.ts +1 -1
- package/dist/providers/theme-provider.js +1 -1
- package/dist/providers/translation-provider.d.ts +1 -1
- package/dist/pushed-config-error-overlay/index.js +2 -2
- package/dist/{quetzal-translations-XeH3zQ9l.d.ts → quetzal-translations-DVNj-zsr.d.ts} +3 -3
- package/dist/{quetzal-translations-XeH3zQ9l.d.ts.map → quetzal-translations-DVNj-zsr.d.ts.map} +1 -1
- package/dist/{translation-provider-WOaZXqAz.d.ts → translation-provider-DPFkLbrw.d.ts} +2 -2
- package/dist/{translation-provider-WOaZXqAz.d.ts.map → translation-provider-DPFkLbrw.d.ts.map} +1 -1
- package/package.json +4 -4
- package/src/lib/hexclave-app/apps/implementations/admin-app-impl.ts +15 -1
- package/src/lib/hexclave-app/apps/implementations/server-app-impl.ts +10 -0
package/dist/{quetzal-translations-XeH3zQ9l.d.ts.map → quetzal-translations-DVNj-zsr.d.ts.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"quetzal-translations-
|
|
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-
|
|
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-
|
|
15
|
+
//# sourceMappingURL=translation-provider-DPFkLbrw.d.ts.map
|
package/dist/{translation-provider-WOaZXqAz.d.ts.map → translation-provider-DPFkLbrw.d.ts.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"translation-provider-
|
|
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.
|
|
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/
|
|
78
|
-
"@hexclave/
|
|
79
|
-
"@hexclave/
|
|
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"));
|