@hexclave/react 1.0.45 → 1.0.47
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-DKtMoehJ.d.ts → admin-app-impl-1tL1oumt.d.ts} +11 -10
- package/dist/{admin-app-impl-DKtMoehJ.d.ts.map → admin-app-impl-1tL1oumt.d.ts.map} +1 -1
- package/dist/clickmap/clickmap-core.d.ts +1 -1
- package/dist/clickmap/index.d.ts +1 -1
- package/dist/{client-app-mxsyAtl-.d.ts → client-app-O21Ylb76.d.ts} +2 -2
- package/dist/{client-app-mxsyAtl-.d.ts.map → client-app-O21Ylb76.d.ts.map} +1 -1
- package/dist/components/selected-team-switcher.d.ts +1 -1
- package/dist/components/team-icon.d.ts +1 -1
- package/dist/components/team-switcher.d.ts +1 -1
- package/dist/components-page/account-settings/payments/payments-page.d.ts +1 -1
- package/dist/components-page/account-settings/teams/leave-team-section.d.ts +1 -1
- package/dist/components-page/account-settings/teams/team-api-keys-section.d.ts +1 -1
- package/dist/components-page/account-settings/teams/team-display-name-section.d.ts +1 -1
- package/dist/components-page/account-settings/teams/team-member-invitation-section.d.ts +1 -1
- package/dist/components-page/account-settings/teams/team-member-list-section.d.ts +1 -1
- package/dist/components-page/account-settings/teams/team-page.d.ts +1 -1
- package/dist/components-page/account-settings/teams/team-profile-image-section.d.ts +1 -1
- package/dist/components-page/account-settings/teams/team-profile-user-section.d.ts +1 -1
- package/dist/components-page/hexclave-handler-client.d.ts +1 -1
- package/dist/components-page/hexclave-handler.d.ts +1 -1
- package/dist/dev-tool/dev-tool-core.d.ts +1 -1
- package/dist/dev-tool/index.d.ts +1 -1
- package/dist/esm/generated/quetzal-translations.d.ts +2 -2
- package/dist/esm/lib/hexclave-app/apps/implementations/admin-app-impl.d.ts +4 -4
- 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 +9 -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/common.js +2 -2
- package/dist/esm/lib/hexclave-app/apps/implementations/server-app-impl.d.ts +2 -1
- 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 +5 -0
- package/dist/esm/lib/hexclave-app/apps/implementations/server-app-impl.js.map +1 -1
- package/dist/esm/lib/hexclave-app/plan-usage/index.d.ts +1 -0
- package/dist/esm/lib/hexclave-app/plan-usage/index.d.ts.map +1 -1
- package/dist/generated/quetzal-translations.d.ts +1 -1
- package/dist/{hexclave-provider-BHgJzJWl.d.ts → hexclave-provider-DI1ZI7MQ.d.ts} +3 -3
- package/dist/{hexclave-provider-BHgJzJWl.d.ts.map → hexclave-provider-DI1ZI7MQ.d.ts.map} +1 -1
- package/dist/{hooks-UrxPrSEk.d.ts → hooks-UtbmjOdS.d.ts} +2 -2
- package/dist/{hooks-UrxPrSEk.d.ts.map → hooks-UtbmjOdS.d.ts.map} +1 -1
- package/dist/{index-D7Vdg30O.d.ts → index-B594jg4e.d.ts} +2 -1
- package/dist/{index-D7Vdg30O.d.ts.map → index-B594jg4e.d.ts.map} +1 -1
- package/dist/{index-DkfkBM_f.d.ts → index-C8Roh_o-.d.ts} +2 -2
- package/dist/{index-DkfkBM_f.d.ts.map → index-C8Roh_o-.d.ts.map} +1 -1
- package/dist/index.d.ts +5 -5
- 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 +8 -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/common.js +2 -2
- 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 +5 -0
- package/dist/lib/hexclave-app/apps/implementations/server-app-impl.js.map +1 -1
- package/dist/lib/hexclave-app/apps/index.d.ts +1 -1
- package/dist/lib/hexclave-app/apps/interfaces/admin-app.d.ts +1 -1
- package/dist/lib/hexclave-app/apps/interfaces/client-app.d.ts +1 -1
- package/dist/lib/hexclave-app/apps/interfaces/server-app.d.ts +1 -1
- package/dist/lib/hexclave-app/index.d.ts +2 -2
- package/dist/lib/hexclave-app/plan-usage/index.d.ts +1 -1
- package/dist/lib/hexclave-app/projects/index.d.ts +1 -1
- package/dist/lib/hexclave-app/teams/index.d.ts +1 -1
- package/dist/lib/hexclave-app/users/index.d.ts +1 -1
- package/dist/lib/hooks.d.ts +1 -1
- package/dist/providers/hexclave-context.d.ts +1 -1
- package/dist/providers/hexclave-provider-client.d.ts +1 -1
- package/dist/providers/hexclave-provider.d.ts +1 -1
- package/dist/providers/translation-provider.d.ts +1 -1
- package/dist/pushed-config-error-overlay/index.d.ts +1 -1
- package/dist/{quetzal-translations-XeH3zQ9l.d.ts → quetzal-translations-B2jT2SWm.d.ts} +3 -3
- package/dist/{quetzal-translations-XeH3zQ9l.d.ts.map → quetzal-translations-B2jT2SWm.d.ts.map} +1 -1
- package/dist/{translation-provider-WOaZXqAz.d.ts → translation-provider-6505O9P2.d.ts} +2 -2
- package/dist/{translation-provider-WOaZXqAz.d.ts.map → translation-provider-6505O9P2.d.ts.map} +1 -1
- package/package.json +3 -3
- package/src/lib/hexclave-app/apps/implementations/admin-app-impl.ts +17 -1
- package/src/lib/hexclave-app/apps/implementations/server-app-impl.ts +10 -0
- package/src/lib/hexclave-app/plan-usage/index.ts +1 -0
package/dist/{quetzal-translations-XeH3zQ9l.d.ts.map → quetzal-translations-B2jT2SWm.d.ts.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"quetzal-translations-
|
|
1
|
+
{"version":3,"file":"quetzal-translations-B2jT2SWm.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-B2jT2SWm.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-6505O9P2.d.ts.map
|
package/dist/{translation-provider-WOaZXqAz.d.ts.map → translation-provider-6505O9P2.d.ts.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"translation-provider-
|
|
1
|
+
{"version":3,"file":"translation-provider-6505O9P2.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/react",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.47",
|
|
5
5
|
"repository": "https://github.com/hexclave/hexclave",
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"main": "./dist/index.js",
|
|
@@ -74,8 +74,8 @@
|
|
|
74
74
|
"tailwindcss-animate": "^1.0.7",
|
|
75
75
|
"rrweb": "^1.1.3",
|
|
76
76
|
"yup": "^1.7.1",
|
|
77
|
-
"@hexclave/shared": "1.0.
|
|
78
|
-
"@hexclave/ui": "1.0.
|
|
77
|
+
"@hexclave/shared": "1.0.47",
|
|
78
|
+
"@hexclave/ui": "1.0.47"
|
|
79
79
|
},
|
|
80
80
|
"peerDependencies": {
|
|
81
81
|
"@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";
|
|
@@ -351,6 +351,8 @@ export class _HexclaveAdminAppImplIncomplete<HasTokenStore extends boolean, Proj
|
|
|
351
351
|
periodStart: new Date(data.period_start_millis),
|
|
352
352
|
periodEnd: new Date(data.period_end_millis),
|
|
353
353
|
nextPlanId: data.next_plan_id,
|
|
354
|
+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- getPlanUsage() returns raw JSON without yup validation, so this field can be undefined at runtime if the backend hasn't deployed the field yet
|
|
355
|
+
arePlanLimitsEnforced: data.are_plan_limits_enforced ?? true,
|
|
354
356
|
rows: data.rows.map((row) => ({
|
|
355
357
|
itemId: row.item_id,
|
|
356
358
|
displayName: row.display_name,
|
|
@@ -883,6 +885,20 @@ export class _HexclaveAdminAppImplIncomplete<HasTokenStore extends boolean, Proj
|
|
|
883
885
|
allow_negative: true,
|
|
884
886
|
}
|
|
885
887
|
);
|
|
888
|
+
const [customerType, customerId] = "userId" in options
|
|
889
|
+
? ["user", options.userId] as const
|
|
890
|
+
: "teamId" in options
|
|
891
|
+
? ["team", options.teamId] as const
|
|
892
|
+
: ["custom", options.customCustomerId] as const;
|
|
893
|
+
try {
|
|
894
|
+
// Best-effort: the quantity change is already persisted at this point, so
|
|
895
|
+
// a cache refresh failure must not make the mutation look failed (a retry
|
|
896
|
+
// would apply the delta twice).
|
|
897
|
+
await this._refreshItemCache(customerType, customerId, options.itemId);
|
|
898
|
+
await this._transactionsCache.invalidateWhere(() => true);
|
|
899
|
+
} catch (error) {
|
|
900
|
+
captureError("create-item-quantity-change-cache-refresh", error);
|
|
901
|
+
}
|
|
886
902
|
}
|
|
887
903
|
|
|
888
904
|
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"));
|