@voltro/plugin-economy 0.87.0 → 0.88.0
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/CHANGELOG.md +169 -6
- package/THIRD-PARTY-NOTICES.md +741 -89
- package/dist/amount.js +1 -2
- package/dist/appleIap.server.js +1 -2
- package/dist/appleIapNotifications.server.js +1 -2
- package/dist/appleIapTrust.server.js +1 -2
- package/dist/bundleValue.server.js +1 -2
- package/dist/canonicalDataJson.js +1 -2
- package/dist/capture.js +1 -2
- package/dist/codePort.fixture.js +1 -2
- package/dist/codeStore.server.js +1 -2
- package/dist/codeTables.entity.js +1 -2
- package/dist/codes.js +1 -2
- package/dist/components.js +1 -2
- package/dist/consistency.server.js +1 -2
- package/dist/containerStore.server.js +1 -2
- package/dist/containerStore.testFixtures.js +1 -2
- package/dist/containerTables.entity.js +1 -2
- package/dist/containers.fixture.js +1 -2
- package/dist/containers.js +1 -2
- package/dist/containers.server.js +1 -2
- package/dist/containersPort.fixture.js +1 -2
- package/dist/currency.js +1 -2
- package/dist/declarationFixtures.js +1 -2
- package/dist/economyPort.fixture.js +1 -2
- package/dist/errors.js +1 -2
- package/dist/googleIap.server.js +1 -2
- package/dist/googleIapNotifications.server.js +1 -2
- package/dist/googleIapSubscription.server.js +1 -2
- package/dist/iap.js +1 -2
- package/dist/iap.testFixtures.js +1 -2
- package/dist/iapAccountTables.entity.js +1 -2
- package/dist/iapAccounts.server.js +1 -2
- package/dist/iapBinding.server.js +1 -2
- package/dist/iapCheckout.server.js +1 -2
- package/dist/iapCompletion.server.js +1 -2
- package/dist/iapCurrentState.server.js +1 -2
- package/dist/iapCurrentState.testFixtures.js +1 -2
- package/dist/iapCurrentStatePort.fixture.js +1 -2
- package/dist/iapEntitlements.js +1 -2
- package/dist/iapEntitlements.server.js +1 -2
- package/dist/iapEntitlementsBinding.server.js +1 -2
- package/dist/iapEntitlementsPort.fixture.js +1 -2
- package/dist/iapInstalledEntitlements.testFixtures.js +1 -2
- package/dist/iapInstalledNotifications.testFixtures.js +1 -2
- package/dist/iapInventoryRefunds.server.js +1 -2
- package/dist/iapNotificationCustodyPort.fixture.js +1 -2
- package/dist/iapNotificationPort.fixture.js +1 -2
- package/dist/iapNotificationProcessor.server.js +1 -2
- package/dist/iapNotificationProcessor.testFixtures.js +1 -2
- package/dist/iapNotificationProcessorPort.fixture.js +1 -2
- package/dist/iapNotificationSchedule.server.js +1 -2
- package/dist/iapNotificationStore.server.js +1 -2
- package/dist/iapNotificationStore.testFixtures.js +1 -2
- package/dist/iapNotificationTables.entity.js +1 -2
- package/dist/iapNotificationTarget.server.js +1 -2
- package/dist/iapNotificationTarget.testFixtures.js +1 -2
- package/dist/iapNotifications.server.js +1 -2
- package/dist/iapNotificationsBinding.server.js +1 -2
- package/dist/iapNotificationsSystemPort.fixture.js +1 -2
- package/dist/iapPlugin.testFixtures.js +1 -2
- package/dist/iapPort.fixture.js +1 -2
- package/dist/iapProviderCapture.server.js +1 -2
- package/dist/iapRecovery.js +1 -2
- package/dist/iapRefundEventDelivery.server.js +1 -2
- package/dist/iapRefundEvents.js +1 -2
- package/dist/iapRefundEventsPort.fixture.js +1 -2
- package/dist/iapRefundPort.fixture.js +1 -2
- package/dist/iapRefundTables.entity.js +1 -2
- package/dist/iapRefunds.server.js +1 -2
- package/dist/iapRefunds.testFixtures.js +1 -2
- package/dist/iapSpendAdmission.server.js +1 -2
- package/dist/iapStore.server.js +1 -2
- package/dist/iapStore.testFixtures.js +1 -2
- package/dist/iapTables.entity.js +1 -2
- package/dist/iapVerification.server.js +1 -2
- package/dist/intentionRecovery.js +1 -2
- package/dist/ledger.js +1 -2
- package/dist/loyalty.fixture.js +1 -2
- package/dist/loyalty.js +1 -2
- package/dist/loyaltyBinding.server.js +1 -2
- package/dist/loyaltyPort.fixture.js +1 -2
- package/dist/loyaltyShopSource.server.js +1 -2
- package/dist/loyaltyStore.server.js +1 -2
- package/dist/loyaltyStore.testFixtures.js +1 -2
- package/dist/loyaltyTables.entity.js +1 -2
- package/dist/offerMerchandising.fixture.js +1 -2
- package/dist/offerMerchandising.js +1 -2
- package/dist/offerPolicies.fixture.js +1 -2
- package/dist/offerPolicies.js +1 -2
- package/dist/piggyBanks.fixture.js +1 -2
- package/dist/piggyBanks.js +1 -2
- package/dist/piggyBinding.server.js +1 -2
- package/dist/piggyPort.fixture.js +1 -2
- package/dist/piggyStore.server.js +1 -2
- package/dist/piggyStore.testFixtures.js +1 -2
- package/dist/piggyTables.entity.js +1 -2
- package/dist/plugin.js +1 -2
- package/dist/port.js +1 -2
- package/dist/price.js +1 -2
- package/dist/purchaseRecovery.js +1 -2
- package/dist/reports.server.js +1 -2
- package/dist/rpc.js +1 -2
- package/dist/sanctionsTradeAuthority.server.js +1 -2
- package/dist/shop.js +1 -2
- package/dist/shop.testFixtures.js +1 -2
- package/dist/shopPort.fixture.js +1 -2
- package/dist/shopPresentation.js +1 -2
- package/dist/shopStore.server.js +1 -2
- package/dist/shopTables.entity.js +1 -2
- package/dist/shopUiCopy.js +1 -2
- package/dist/spendLimits.fixture.js +1 -2
- package/dist/spendLimits.js +1 -2
- package/dist/spendLimitsPort.fixture.js +1 -2
- package/dist/subscriptionBinding.server.js +1 -2
- package/dist/subscriptionStore.server.js +1 -2
- package/dist/subscriptionStore.testFixtures.js +1 -2
- package/dist/subscriptionTables.entity.js +1 -2
- package/dist/subscriptions.fixture.js +1 -2
- package/dist/subscriptions.js +1 -2
- package/dist/subscriptionsPort.fixture.js +1 -2
- package/dist/systemFixtures.js +1 -2
- package/dist/tables.entity.js +1 -2
- package/dist/tradeAuthority.server.js +1 -2
- package/dist/tradeBinding.server.js +1 -2
- package/dist/tradeComponents.js +1 -2
- package/dist/tradeEscrow.server.js +1 -2
- package/dist/tradeEscrow.testFixtures.js +1 -2
- package/dist/tradeExpiry.server.js +1 -2
- package/dist/tradeRecovery.js +1 -2
- package/dist/tradeStore.server.js +1 -2
- package/dist/tradeStore.testFixtures.js +1 -2
- package/dist/tradeTables.entity.js +1 -2
- package/dist/tradeUiCopy.js +1 -2
- package/dist/trades.fixture.js +1 -2
- package/dist/trades.js +1 -2
- package/dist/tradesPort.fixture.js +1 -2
- package/dist/walletEscrow.js +1 -2
- package/dist/walletEscrow.server.js +1 -2
- package/dist/walletKeys.server.js +1 -2
- package/dist/walletStore.js +1 -2
- package/dist/web.js +1 -2
- package/package.json +10 -10
|
@@ -5,7 +5,7 @@ import { inventoryIapRefundAssets as r } from "./iapInventoryRefunds.server.js";
|
|
|
5
5
|
import { iapInstalledNotificationsFixture as i } from "./iapInstalledNotifications.testFixtures.js";
|
|
6
6
|
import { Effect as a } from "effect";
|
|
7
7
|
import { dataStoreInventory as o } from "@voltro/plugin-inventory/server";
|
|
8
|
-
|
|
8
|
+
// src/iapInstalledEntitlements.testFixtures.ts
|
|
9
9
|
var s = async (s, c = "test.installed.entitlements") => {
|
|
10
10
|
let l = await i(s, c), u = l.base;
|
|
11
11
|
await a.runPromise(l.close());
|
|
@@ -72,5 +72,4 @@ var s = async (s, c = "test.installed.entitlements") => {
|
|
|
72
72
|
verifications: () => f
|
|
73
73
|
};
|
|
74
74
|
};
|
|
75
|
-
//#endregion
|
|
76
75
|
export { s as iapInstalledEntitlementsFixture };
|
|
@@ -10,7 +10,7 @@ import { Effect as l } from "effect";
|
|
|
10
10
|
import { randomBytes as u } from "node:crypto";
|
|
11
11
|
import { ensureTableRegistered as d } from "@voltro/database";
|
|
12
12
|
import { makeFieldCipher as f } from "@voltro/runtime";
|
|
13
|
-
|
|
13
|
+
// src/iapInstalledNotifications.testFixtures.ts
|
|
14
14
|
var p = async (p, m = "test.installed.notices", h) => {
|
|
15
15
|
let g = await o(p, void 0, m), _ = g.base;
|
|
16
16
|
await l.runPromise(g.close), [...t, ...r].forEach(d);
|
|
@@ -90,5 +90,4 @@ var p = async (p, m = "test.installed.notices", h) => {
|
|
|
90
90
|
}
|
|
91
91
|
};
|
|
92
92
|
};
|
|
93
|
-
//#endregion
|
|
94
93
|
export { p as iapInstalledNotificationsFixture };
|
|
@@ -8,7 +8,7 @@ import { createHash as d } from "node:crypto";
|
|
|
8
8
|
import { and as f, eq as p, queryFor as m } from "@voltro/database";
|
|
9
9
|
import { prepareSqlMutation as h, prepareSqlMutationGroup as g } from "@voltro/database/sql";
|
|
10
10
|
import { inventoryItemsTable as _, inventoryLedgerTable as v, inventoryOperationsTable as y, inventorySubjectsTable as b } from "@voltro/plugin-inventory/server";
|
|
11
|
-
|
|
11
|
+
// src/iapInventoryRefunds.server.ts
|
|
12
12
|
var x = (n) => n instanceof e ? n : t("unavailable"), S = async (e) => {
|
|
13
13
|
let n = await c.runPromise(e.pipe(c.result));
|
|
14
14
|
if (l.isFailure(n)) throw t(n.failure.code === "erased" ? "erased" : "unavailable");
|
|
@@ -258,5 +258,4 @@ var x = (n) => n instanceof e ? n : t("unavailable"), S = async (e) => {
|
|
|
258
258
|
}
|
|
259
259
|
});
|
|
260
260
|
};
|
|
261
|
-
//#endregion
|
|
262
261
|
export { E as inventoryIapRefundAssets };
|
|
@@ -5,7 +5,7 @@ import { iapNotificationStoreFixture as r } from "./iapNotificationStore.testFix
|
|
|
5
5
|
import { Effect as i, Layer as a } from "effect";
|
|
6
6
|
import { randomBytes as o } from "node:crypto";
|
|
7
7
|
import { InMemoryDataStore as s, makeFieldCipher as c } from "@voltro/runtime";
|
|
8
|
-
|
|
8
|
+
// src/iapNotificationCustodyPort.fixture.ts
|
|
9
9
|
var l = /* @__PURE__ */ new WeakMap(), u = i.tryPromise({
|
|
10
10
|
try: async () => {
|
|
11
11
|
let e = c(o(32).toString("base64url")), t = { value: !0 };
|
|
@@ -64,5 +64,4 @@ var l = /* @__PURE__ */ new WeakMap(), u = i.tryPromise({
|
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
66
|
});
|
|
67
|
-
//#endregion
|
|
68
67
|
export { d as iapNotificationCustodyFakeLayer, u as iapNotificationCustodyPortFixture, f as iapNotificationCustodyPortSystemFixture };
|
|
@@ -3,7 +3,7 @@ import { dataObject as n } from "./capture.js";
|
|
|
3
3
|
import { IapNotificationPort as r, captureNotificationInput as i, iapNotificationNotice as a, issueVerifiedIapNotification as o } from "./iapNotifications.server.js";
|
|
4
4
|
import { Effect as s, Layer as c } from "effect";
|
|
5
5
|
import { randomUUID as l } from "node:crypto";
|
|
6
|
-
|
|
6
|
+
// src/iapNotificationPort.fixture.ts
|
|
7
7
|
var u = s.sync(() => {
|
|
8
8
|
let r = l(), a = Date.now(), c = !1, u = !1, d = Object.freeze({
|
|
9
9
|
initialize: () => s.suspend(() => u ? s.fail(t("unavailable")) : s.sync(() => {
|
|
@@ -70,5 +70,4 @@ var u = s.sync(() => {
|
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
72
|
});
|
|
73
|
-
//#endregion
|
|
74
73
|
export { d as iapNotificationFakeLayer, u as iapNotificationPortFixture, f as iapNotificationPortSystemFixture };
|
|
@@ -8,7 +8,7 @@ import { captureIapRefundService as d } from "./iapRefunds.server.js";
|
|
|
8
8
|
import { captureIapNotificationCustodyService as f } from "./iapNotificationStore.server.js";
|
|
9
9
|
import { Context as p, Effect as m, Result as h } from "effect";
|
|
10
10
|
import { TextDecoder as g } from "node:util";
|
|
11
|
-
|
|
11
|
+
// src/iapNotificationProcessor.server.ts
|
|
12
12
|
var _ = class extends p.Service()("@voltro/IapNotificationProcessorPort") {}, v = (e) => n(e, [
|
|
13
13
|
"initialize",
|
|
14
14
|
"ingest",
|
|
@@ -131,5 +131,4 @@ var _ = class extends p.Service()("@voltro/IapNotificationProcessorPort") {}, v
|
|
|
131
131
|
}
|
|
132
132
|
});
|
|
133
133
|
};
|
|
134
|
-
//#endregion
|
|
135
134
|
export { _ as IapNotificationProcessorPort, v as captureIapNotificationProcessorService, b as iapNotificationHttpRoute, y as iapNotificationProcessor };
|
|
@@ -8,7 +8,7 @@ import { Effect as o } from "effect";
|
|
|
8
8
|
import { randomBytes as s } from "node:crypto";
|
|
9
9
|
import { ensureTableRegistered as c } from "@voltro/database";
|
|
10
10
|
import { makeFieldCipher as l } from "@voltro/runtime";
|
|
11
|
-
|
|
11
|
+
// src/iapNotificationProcessor.testFixtures.ts
|
|
12
12
|
var u = async (u, d = "test.notice.processor") => {
|
|
13
13
|
t.forEach(c);
|
|
14
14
|
let f = await a(u, d), p = l(s(32).toString("base64url")), m = f.f.at + 1, h = 0, g = !1, _ = r(u, {
|
|
@@ -60,5 +60,4 @@ var u = async (u, d = "test.notice.processor") => {
|
|
|
60
60
|
body: "authenticated-notice-fixture"
|
|
61
61
|
};
|
|
62
62
|
};
|
|
63
|
-
//#endregion
|
|
64
63
|
export { u as iapNotificationProcessorFixture };
|
|
@@ -3,7 +3,7 @@ import { IapNotificationProcessorPort as t } from "./iapNotificationProcessor.se
|
|
|
3
3
|
import { iapNotificationProcessorFixture as n } from "./iapNotificationProcessor.testFixtures.js";
|
|
4
4
|
import { Effect as r, Layer as i } from "effect";
|
|
5
5
|
import { InMemoryDataStore as a } from "@voltro/runtime";
|
|
6
|
-
|
|
6
|
+
// src/iapNotificationProcessorPort.fixture.ts
|
|
7
7
|
var o = /* @__PURE__ */ new WeakMap(), s = r.tryPromise({
|
|
8
8
|
try: () => n(new a()),
|
|
9
9
|
catch: () => e("unavailable")
|
|
@@ -52,5 +52,4 @@ var o = /* @__PURE__ */ new WeakMap(), s = r.tryPromise({
|
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
});
|
|
55
|
-
//#endregion
|
|
56
55
|
export { c as iapNotificationProcessorFakeLayer, s as iapNotificationProcessorPortFixture, l as iapNotificationProcessorPortSystemFixture };
|
|
@@ -5,7 +5,7 @@ import { iapChannel as a } from "./iap.js";
|
|
|
5
5
|
import { captureIapNotificationProcessorService as o } from "./iapNotificationProcessor.server.js";
|
|
6
6
|
import { Effect as s } from "effect";
|
|
7
7
|
import { defineSchedule as c } from "@voltro/runtime";
|
|
8
|
-
|
|
8
|
+
// src/iapNotificationSchedule.server.ts
|
|
9
9
|
var l = (t) => {
|
|
10
10
|
let r = n(t, ["processor", "maxNotices"]), a = o(r.processor), c = i(r.maxNotices ?? 1e3, 1, 1e5);
|
|
11
11
|
return s.gen(function* () {
|
|
@@ -66,5 +66,4 @@ var l = (t) => {
|
|
|
66
66
|
})), s.asVoid)
|
|
67
67
|
});
|
|
68
68
|
};
|
|
69
|
-
//#endregion
|
|
70
69
|
export { u as iapNotificationSchedule, d as installedIapNotificationSchedule, l as runIapNotificationWork };
|
|
@@ -13,7 +13,7 @@ import { createHash as b } from "node:crypto";
|
|
|
13
13
|
import { decodeFieldValue as x, encodeFieldValue as ee, eq as S, fieldBinding as C, queryFor as w } from "@voltro/database";
|
|
14
14
|
import { executeSqlMutations as T, prepareSqlMutation as E, prepareSqlMutationGroup as te } from "@voltro/database/sql";
|
|
15
15
|
import { getFieldCipher as ne } from "@voltro/runtime";
|
|
16
|
-
|
|
16
|
+
// src/iapNotificationStore.server.ts
|
|
17
17
|
var D = class extends g.Service()("@voltro/IapNotificationCustodyPort") {}, O = (e) => n(e, [
|
|
18
18
|
"initialize",
|
|
19
19
|
"retain",
|
|
@@ -349,5 +349,4 @@ var D = class extends g.Service()("@voltro/IapNotificationCustodyPort") {}, O =
|
|
|
349
349
|
eraseSubject: $
|
|
350
350
|
});
|
|
351
351
|
};
|
|
352
|
-
//#endregion
|
|
353
352
|
export { D as IapNotificationCustodyPort, O as captureIapNotificationCustodyService, I as dataStoreIapNotificationCustody };
|
|
@@ -4,7 +4,7 @@ import { iapStoreFixture as n } from "./iapStore.testFixtures.js";
|
|
|
4
4
|
import { iapSqlNoticeFixture as r } from "./iapNotificationTarget.testFixtures.js";
|
|
5
5
|
import { Effect as i } from "effect";
|
|
6
6
|
import { ensureTableRegistered as a } from "@voltro/database";
|
|
7
|
-
|
|
7
|
+
// src/iapNotificationStore.testFixtures.ts
|
|
8
8
|
var o = async (o, s = "test.tenant", c = {}) => {
|
|
9
9
|
e.forEach(a);
|
|
10
10
|
let l = await n(o, s), u = await i.runPromise(l.iap.redeem(l.user(), l.intent)), d = r(l), f = {
|
|
@@ -28,5 +28,4 @@ var o = async (o, s = "test.tenant", c = {}) => {
|
|
|
28
28
|
}
|
|
29
29
|
};
|
|
30
30
|
};
|
|
31
|
-
//#endregion
|
|
32
31
|
export { o as iapNotificationStoreFixture };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { boolean as e, id as t, integer as n, table as r, text as i, timestamp as a } from "@voltro/database";
|
|
2
|
-
|
|
2
|
+
// src/iapNotificationTables.entity.ts
|
|
3
3
|
var o = () => i().maxLength(120).serverOnly(), s = () => i().maxLength(120).externalId().sensitive("pii"), c = r("_voltro_eco_iap_notice_namespaces", {
|
|
4
4
|
id: t({ prefix: "enn" }),
|
|
5
5
|
namespace: o(),
|
|
@@ -45,5 +45,4 @@ var o = () => i().maxLength(120).serverOnly(), s = () => i().maxLength(120).exte
|
|
|
45
45
|
l,
|
|
46
46
|
u
|
|
47
47
|
];
|
|
48
|
-
//#endregion
|
|
49
48
|
export { c as iapNotificationNamespacesTable, l as iapNotificationSubjectsTable, d as iapNotificationTables, u as iapNotificationsTable };
|
|
@@ -3,7 +3,7 @@ import { dataObject as t, identifier as n } from "./capture.js";
|
|
|
3
3
|
import { iapEnvironment as r } from "./iap.js";
|
|
4
4
|
import { isIapRefundChannel as i } from "./iapNotifications.server.js";
|
|
5
5
|
import { Effect as a } from "effect";
|
|
6
|
-
|
|
6
|
+
// src/iapNotificationTarget.server.ts
|
|
7
7
|
var o = /* @__PURE__ */ new WeakMap(), s = (e, t, r) => {
|
|
8
8
|
let i = Object.freeze({
|
|
9
9
|
orderId: n(e),
|
|
@@ -33,5 +33,4 @@ var o = /* @__PURE__ */ new WeakMap(), s = (e, t, r) => {
|
|
|
33
33
|
environment: r(o.environment)
|
|
34
34
|
});
|
|
35
35
|
};
|
|
36
|
-
//#endregion
|
|
37
36
|
export { u as captureIapNotificationTargetOptions, s as issueAcceptedIapNotificationTarget, l as observeAcceptedIapNotificationTarget, c as readAcceptedIapNotificationTarget };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { issueVerifiedIapNotification as e } from "./iapNotifications.server.js";
|
|
2
2
|
import { randomUUID as t } from "node:crypto";
|
|
3
|
-
|
|
3
|
+
// src/iapNotificationTarget.testFixtures.ts
|
|
4
4
|
var n = (n, r = {}) => {
|
|
5
5
|
let i = {
|
|
6
6
|
channel: "ios",
|
|
@@ -26,5 +26,4 @@ var n = (n, r = {}) => {
|
|
|
26
26
|
evidence: e(i, { privateReceipt: n.receipt })
|
|
27
27
|
};
|
|
28
28
|
};
|
|
29
|
-
//#endregion
|
|
30
29
|
export { n as iapSqlNoticeFixture };
|
|
@@ -5,7 +5,7 @@ import { canonicalDataJson as o } from "./canonicalDataJson.js";
|
|
|
5
5
|
import { Context as s, Effect as c } from "effect";
|
|
6
6
|
import { Buffer as l } from "node:buffer";
|
|
7
7
|
import { createHash as u } from "node:crypto";
|
|
8
|
-
|
|
8
|
+
// src/iapNotifications.server.ts
|
|
9
9
|
var d = (e) => e === "ios" || e === "android" || e === "web", f = class extends s.Service()("@voltro/IapNotificationPort") {}, p = (e) => t(e, ["initialize", "verify"]), m = /* @__PURE__ */ new WeakMap(), h = (t) => {
|
|
10
10
|
let o = n(t, [
|
|
11
11
|
"channel",
|
|
@@ -92,5 +92,4 @@ var d = (e) => e === "ios" || e === "android" || e === "web", f = class extends
|
|
|
92
92
|
if (r > n + 6e4) throw e("invalid_record");
|
|
93
93
|
return r;
|
|
94
94
|
};
|
|
95
|
-
//#endregion
|
|
96
95
|
export { f as IapNotificationPort, h as captureIapNotificationNotice, p as captureIapNotificationService, x as captureNotificationInput, b as iapNotificationNotice, d as isIapRefundChannel, g as issueVerifiedIapNotification, S as notificationTime, y as prepareVerifiedIapNotification, _ as readVerifiedIapNotification, v as validateVerifiedIapNotification };
|
|
@@ -10,7 +10,7 @@ import { dataStoreIapRefunds as u } from "./iapRefunds.server.js";
|
|
|
10
10
|
import { dataStoreIapNotificationCustody as d } from "./iapNotificationStore.server.js";
|
|
11
11
|
import { captureIapNotificationProcessorService as f, iapNotificationHttpRoute as p, iapNotificationProcessor as m } from "./iapNotificationProcessor.server.js";
|
|
12
12
|
import { Context as h, Effect as g, Layer as _ } from "effect";
|
|
13
|
-
|
|
13
|
+
// src/iapNotificationsBinding.server.ts
|
|
14
14
|
var v = class extends h.Service()("@voltro/IapNotificationsSystemPort") {}, y = (e) => t(e, [
|
|
15
15
|
"initialize",
|
|
16
16
|
"processor",
|
|
@@ -229,5 +229,4 @@ var v = class extends h.Service()("@voltro/IapNotificationsSystemPort") {}, y =
|
|
|
229
229
|
}
|
|
230
230
|
});
|
|
231
231
|
};
|
|
232
|
-
//#endregion
|
|
233
232
|
export { v as IapNotificationsSystemPort, S as bindIapNotificationsSystem, y as captureIapNotificationsSystemService, x as unavailableIapNotifications };
|
|
@@ -3,7 +3,7 @@ import { IapNotificationsSystemPort as t } from "./iapNotificationsBinding.serve
|
|
|
3
3
|
import { iapInstalledNotificationsFixture as n } from "./iapInstalledNotifications.testFixtures.js";
|
|
4
4
|
import { Effect as r, Layer as i } from "effect";
|
|
5
5
|
import { InMemoryDataStore as a } from "@voltro/runtime";
|
|
6
|
-
|
|
6
|
+
// src/iapNotificationsSystemPort.fixture.ts
|
|
7
7
|
var o = /* @__PURE__ */ new WeakMap(), s = r.tryPromise({
|
|
8
8
|
try: () => n(new a(), "fixture.notifications.system"),
|
|
9
9
|
catch: () => e("unavailable")
|
|
@@ -47,5 +47,4 @@ var o = /* @__PURE__ */ new WeakMap(), s = r.tryPromise({
|
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
49
|
});
|
|
50
|
-
//#endregion
|
|
51
50
|
export { c as iapNotificationsSystemFakeLayer, s as iapNotificationsSystemPortFixture, l as iapNotificationsSystemPortSystemFixture };
|
|
@@ -3,7 +3,7 @@ import { iapCompletionPort as t } from "./iapCompletion.server.js";
|
|
|
3
3
|
import { economyPlugin as n } from "./plugin.js";
|
|
4
4
|
import { iapStoreFixture as r } from "./iapStore.testFixtures.js";
|
|
5
5
|
import { Effect as i } from "effect";
|
|
6
|
-
|
|
6
|
+
// src/iapPlugin.testFixtures.ts
|
|
7
7
|
var a = {
|
|
8
8
|
app: {
|
|
9
9
|
name: "iap-fixture",
|
|
@@ -56,5 +56,4 @@ var a = {
|
|
|
56
56
|
verifications: () => f
|
|
57
57
|
};
|
|
58
58
|
};
|
|
59
|
-
//#endregion
|
|
60
59
|
export { a as iapFixtureLifecycle, o as iapPluginFixture };
|
package/dist/iapPort.fixture.js
CHANGED
|
@@ -5,7 +5,7 @@ import { iapTestFixture as i } from "./iap.testFixtures.js";
|
|
|
5
5
|
import { iapPluginFixture as a } from "./iapPlugin.testFixtures.js";
|
|
6
6
|
import { Effect as o, Layer as s, Result as c } from "effect";
|
|
7
7
|
import { InMemoryDataStore as l } from "@voltro/runtime";
|
|
8
|
-
|
|
8
|
+
// src/iapPort.fixture.ts
|
|
9
9
|
var u = o.promise(() => a(new l(), void 0, "fixture", {
|
|
10
10
|
initialize: () => o.void,
|
|
11
11
|
complete: (e) => o.succeed({
|
|
@@ -71,5 +71,4 @@ var u = o.promise(() => a(new l(), void 0, "fixture", {
|
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
73
|
});
|
|
74
|
-
//#endregion
|
|
75
74
|
export { d as iapFakeLayer, u as iapPortFixture, f as iapPortSystemFixture, p as iapSystemPortSystemFixture };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { economyError as e } from "./errors.js";
|
|
2
2
|
import { dataObject as t } from "./capture.js";
|
|
3
3
|
import { iapTimestamp as n } from "./iap.js";
|
|
4
|
-
|
|
4
|
+
// src/iapProviderCapture.server.ts
|
|
5
5
|
var r = (n) => {
|
|
6
6
|
if (typeof n != "object" || !n || Array.isArray(n)) throw e("invalid_record");
|
|
7
7
|
let r = Object.keys(n);
|
|
@@ -14,5 +14,4 @@ var r = (n) => {
|
|
|
14
14
|
if (typeof t != "string" || t.length > 48 || !/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d{1,9})?(?:Z|[+-]\d{2}:\d{2})$/.test(t)) throw e("invalid_record");
|
|
15
15
|
return n(Date.parse(t));
|
|
16
16
|
};
|
|
17
|
-
//#endregion
|
|
18
17
|
export { r as iapProviderRecord, i as iapProviderText, a as iapProviderTimestamp };
|
package/dist/iapRecovery.js
CHANGED
|
@@ -2,7 +2,7 @@ import { economyError as e } from "./errors.js";
|
|
|
2
2
|
import { captureBoundMethods as t, dataObject as n, identifier as r } from "./capture.js";
|
|
3
3
|
import { captureIapCompletionReceipt as i, captureIapObservation as a, captureIapOrderReceipt as o, createIapReceiptReference as s, iapReceiptIntent as c, iapReceiptReference as l } from "./iap.js";
|
|
4
4
|
import { browserIntentionJournal as u, createIntentionRecovery as d } from "./intentionRecovery.js";
|
|
5
|
-
|
|
5
|
+
// src/iapRecovery.ts
|
|
6
6
|
var f = (t) => {
|
|
7
7
|
let s = n(t, [
|
|
8
8
|
"requestId",
|
|
@@ -86,5 +86,4 @@ var f = (t) => {
|
|
|
86
86
|
}
|
|
87
87
|
});
|
|
88
88
|
}, h = (e, t) => u(e, t, "voltro:iap-purchase:v1:", 2048, (e) => l(e));
|
|
89
|
-
//#endregion
|
|
90
89
|
export { h as browserIapPurchaseJournal, m as createIapPurchaseRecovery };
|
|
@@ -6,7 +6,7 @@ import { Effect as s } from "effect";
|
|
|
6
6
|
import { systemSubject as c } from "@voltro/protocol";
|
|
7
7
|
import { createHash as l } from "node:crypto";
|
|
8
8
|
import { defineSchedule as u, publishEvent as d } from "@voltro/runtime";
|
|
9
|
-
|
|
9
|
+
// src/iapRefundEventDelivery.server.ts
|
|
10
10
|
var f = () => null, p = (u) => {
|
|
11
11
|
let p = n(u, [
|
|
12
12
|
"events",
|
|
@@ -79,5 +79,4 @@ var f = () => null, p = (u) => {
|
|
|
79
79
|
handler: () => l.pipe(s.asVoid)
|
|
80
80
|
});
|
|
81
81
|
};
|
|
82
|
-
//#endregion
|
|
83
82
|
export { p as deliverIapRefundEvents, m as iapRefundEventSchedule, f as noRefundAbuseSignal };
|
package/dist/iapRefundEvents.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { economyError as e } from "./errors.js";
|
|
2
2
|
import { Context as t, Effect as n, Schema as r } from "effect";
|
|
3
3
|
import { defineEvent as i } from "@voltro/protocol";
|
|
4
|
-
|
|
4
|
+
// src/iapRefundEvents.ts
|
|
5
5
|
var a = r.String.pipe(r.check(r.makeFilter((e) => e.length <= 120 && /^[A-Za-z0-9][A-Za-z0-9._:-]*$/.test(e)))), o = r.Struct({
|
|
6
6
|
eventId: a,
|
|
7
7
|
orderId: a,
|
|
@@ -41,5 +41,4 @@ var a = r.String.pipe(r.check(r.makeFilter((e) => e.length <= 120 && /^[A-Za-z0-
|
|
|
41
41
|
read: u,
|
|
42
42
|
acknowledge: u
|
|
43
43
|
});
|
|
44
|
-
//#endregion
|
|
45
44
|
export { o as IapRefundEventPayloadSchema, l as IapRefundEventsPort, c as economyRefundReversed, s as economyRefunded, d as unavailableIapRefundEvents };
|
|
@@ -4,7 +4,7 @@ import { iapRefundsFixture as n } from "./iapRefunds.testFixtures.js";
|
|
|
4
4
|
import { Effect as r, Layer as i } from "effect";
|
|
5
5
|
import { systemSubject as a } from "@voltro/protocol";
|
|
6
6
|
import { InMemoryDataStore as o } from "@voltro/runtime";
|
|
7
|
-
|
|
7
|
+
// src/iapRefundEventsPort.fixture.ts
|
|
8
8
|
var s = /* @__PURE__ */ new WeakMap(), c = r.tryPromise({
|
|
9
9
|
try: () => n(new o(), "fixture.refund.events"),
|
|
10
10
|
catch: () => e("unavailable")
|
|
@@ -56,5 +56,4 @@ var s = /* @__PURE__ */ new WeakMap(), c = r.tryPromise({
|
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
58
|
});
|
|
59
|
-
//#endregion
|
|
60
59
|
export { l as iapRefundEventsFakeLayer, c as iapRefundEventsPortFixture, u as iapRefundEventsPortSystemFixture };
|
|
@@ -3,7 +3,7 @@ import { IapRefundPort as t } from "./iapRefunds.server.js";
|
|
|
3
3
|
import { iapRefundsFixture as n } from "./iapRefunds.testFixtures.js";
|
|
4
4
|
import { Effect as r, Layer as i } from "effect";
|
|
5
5
|
import { InMemoryDataStore as a } from "@voltro/runtime";
|
|
6
|
-
|
|
6
|
+
// src/iapRefundPort.fixture.ts
|
|
7
7
|
var o = /* @__PURE__ */ new WeakMap(), s = r.tryPromise({
|
|
8
8
|
try: () => n(new a()),
|
|
9
9
|
catch: () => e("unavailable")
|
|
@@ -51,5 +51,4 @@ var o = /* @__PURE__ */ new WeakMap(), s = r.tryPromise({
|
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
53
|
});
|
|
54
|
-
//#endregion
|
|
55
54
|
export { c as iapRefundFakeLayer, s as iapRefundPortFixture, l as iapRefundPortSystemFixture };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { boolean as e, id as t, integer as n, json as r, table as i, text as a, timestamp as o } from "@voltro/database";
|
|
2
|
-
|
|
2
|
+
// src/iapRefundTables.entity.ts
|
|
3
3
|
var s = () => a().maxLength(120).serverOnly(), c = () => a().maxLength(120).externalId().sensitive("pii"), l = i("_voltro_eco_iap_refund_namespaces", {
|
|
4
4
|
id: t({ prefix: "ifn" }),
|
|
5
5
|
namespace: s(),
|
|
@@ -52,5 +52,4 @@ var s = () => a().maxLength(120).serverOnly(), c = () => a().maxLength(120).exte
|
|
|
52
52
|
d,
|
|
53
53
|
f
|
|
54
54
|
];
|
|
55
|
-
//#endregion
|
|
56
55
|
export { f as iapRefundAdjustmentsTable, l as iapRefundNamespacesTable, d as iapRefundOrdersTable, u as iapRefundSubjectsTable, p as iapRefundTables };
|
|
@@ -13,7 +13,7 @@ import { systemSubject as C } from "@voltro/protocol";
|
|
|
13
13
|
import { createHash as w } from "node:crypto";
|
|
14
14
|
import { and as T, eq as E, queryFor as D } from "@voltro/database";
|
|
15
15
|
import { executeSqlMutations as O, prepareSqlMutation as k, prepareSqlMutationGroup as A } from "@voltro/database/sql";
|
|
16
|
-
|
|
16
|
+
// src/iapRefunds.server.ts
|
|
17
17
|
var j = class extends y.Service()("@voltro/IapRefundPort") {}, M = (e) => n(e, [
|
|
18
18
|
"reconcile",
|
|
19
19
|
"rebuild",
|
|
@@ -550,5 +550,4 @@ var j = class extends y.Service()("@voltro/IapRefundPort") {}, M = (e) => n(e, [
|
|
|
550
550
|
readDisposition: re
|
|
551
551
|
});
|
|
552
552
|
};
|
|
553
|
-
//#endregion
|
|
554
553
|
export { j as IapRefundPort, M as captureIapRefundService, H as dataStoreIapRefunds, z as readAcceptedIapRefund };
|
|
@@ -6,7 +6,7 @@ import { iapSqlNoticeFixture as i } from "./iapNotificationTarget.testFixtures.j
|
|
|
6
6
|
import { inventoryIapRefundAssets as a } from "./iapInventoryRefunds.server.js";
|
|
7
7
|
import { Effect as o } from "effect";
|
|
8
8
|
import { ensureTableRegistered as s } from "@voltro/database";
|
|
9
|
-
|
|
9
|
+
// src/iapRefunds.testFixtures.ts
|
|
10
10
|
var c = async (c, l = "test.tenant", u = {}) => {
|
|
11
11
|
t.forEach(s);
|
|
12
12
|
let d = await r(c, l), f = await o.runPromise(d.iap.redeem(d.user(), d.intent)), p = i(d), m = await o.runPromise(d.iap.prepareNotification(p.options, p.evidence)), h = d.at, g = a(c, {
|
|
@@ -61,5 +61,4 @@ var c = async (c, l = "test.tenant", u = {}) => {
|
|
|
61
61
|
}
|
|
62
62
|
};
|
|
63
63
|
};
|
|
64
|
-
//#endregion
|
|
65
64
|
export { c as iapRefundsFixture };
|
|
@@ -6,7 +6,7 @@ import { iapOrdersTable as o } from "./iapTables.entity.js";
|
|
|
6
6
|
import { Effect as s } from "effect";
|
|
7
7
|
import { and as c, eq as l } from "@voltro/database";
|
|
8
8
|
import { prepareSqlMutation as u } from "@voltro/database/sql";
|
|
9
|
-
|
|
9
|
+
// src/iapSpendAdmission.server.ts
|
|
10
10
|
var d = (e, t) => BigInt(e.units) * 10n ** BigInt(t - e.scale), f = (e) => new Intl.NumberFormat("en", {
|
|
11
11
|
style: "currency",
|
|
12
12
|
currency: e
|
|
@@ -95,5 +95,4 @@ var d = (e, t) => BigInt(e.units) * 10n ** BigInt(t - e.scale), f = (e) => new I
|
|
|
95
95
|
})
|
|
96
96
|
});
|
|
97
97
|
};
|
|
98
|
-
//#endregion
|
|
99
98
|
export { m as iapSpendAdmission };
|
package/dist/iapStore.server.js
CHANGED
|
@@ -17,7 +17,7 @@ import { createHash as M } from "node:crypto";
|
|
|
17
17
|
import { and as ne, eq as N, queryFor as P } from "@voltro/database";
|
|
18
18
|
import { executeSqlMutations as re, prepareSqlMutation as ie, prepareSqlMutationGroup as ae } from "@voltro/database/sql";
|
|
19
19
|
import { InventoryError as F } from "@voltro/plugin-inventory/errors";
|
|
20
|
-
|
|
20
|
+
// src/iapStore.server.ts
|
|
21
21
|
var I = (e) => {
|
|
22
22
|
let t = n(e, ["prepare"]), r = typeof e == "object" && e && "checkout" in e && e.checkout !== void 0 ? n(e, ["checkout"]).checkout : void 0;
|
|
23
23
|
return Object.freeze({
|
|
@@ -737,5 +737,4 @@ var I = (e) => {
|
|
|
737
737
|
}), A.catchDefect(() => A.fail(t("unavailable"))))
|
|
738
738
|
});
|
|
739
739
|
};
|
|
740
|
-
//#endregion
|
|
741
740
|
export { G as dataStoreIap, se as resolveIapStoreOptions };
|
|
@@ -14,7 +14,7 @@ import { boolean as p, ensureTableRegistered as m, eq as h, id as g, integer as
|
|
|
14
14
|
import { prepareSqlMutation as x } from "@voltro/database/sql";
|
|
15
15
|
import { dataStoreCatalog as S, dataStoreInventory as C, inventoryTables as w } from "@voltro/plugin-inventory/server";
|
|
16
16
|
import { inventoryFixture as T } from "@voltro/plugin-inventory/testing";
|
|
17
|
-
|
|
17
|
+
// src/iapStore.testFixtures.ts
|
|
18
18
|
var E = y("_voltro_test_iap_policy", {
|
|
19
19
|
id: g({ prefix: "tip" }),
|
|
20
20
|
tenantId: b().maxLength(120).externalId(),
|
|
@@ -124,5 +124,4 @@ var E = y("_voltro_test_iap_policy", {
|
|
|
124
124
|
verificationCalls: () => M
|
|
125
125
|
};
|
|
126
126
|
};
|
|
127
|
-
//#endregion
|
|
128
127
|
export { E as iapPolicyFixtureTable, O as iapStoreFixture, D as iapStoreFixtureTables };
|
package/dist/iapTables.entity.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { boolean as e, id as t, integer as n, json as r, table as i, text as a, timestamp as o } from "@voltro/database";
|
|
2
|
-
|
|
2
|
+
// src/iapTables.entity.ts
|
|
3
3
|
var s = () => a().maxLength(120).externalId().sensitive("pii"), c = () => a().maxLength(120).serverOnly(), l = i("_voltro_eco_iap_namespaces", {
|
|
4
4
|
id: t({ prefix: "ein" }),
|
|
5
5
|
namespace: c(),
|
|
@@ -77,5 +77,4 @@ var s = () => a().maxLength(120).externalId().sensitive("pii"), c = () => a().ma
|
|
|
77
77
|
d,
|
|
78
78
|
f
|
|
79
79
|
];
|
|
80
|
-
//#endregion
|
|
81
80
|
export { l as iapNamespacesTable, d as iapOrdersTable, f as iapReceiptsTable, u as iapSubjectsTable, p as iapTables };
|
|
@@ -5,7 +5,7 @@ import { shopInteger as o } from "./shop.js";
|
|
|
5
5
|
import { captureIapPaidAmount as s, captureIapScope as c, defineIapCatalog as l, iapChannel as u, iapEnvironment as d, iapProductKind as f, iapReceiptIntent as p, iapTimestamp as m } from "./iap.js";
|
|
6
6
|
import { Context as h, Effect as g } from "effect";
|
|
7
7
|
import { createHash as _ } from "node:crypto";
|
|
8
|
-
|
|
8
|
+
// src/iapVerification.server.ts
|
|
9
9
|
var v = class extends h.Service()("@voltro/IapVerificationPort") {}, y = /* @__PURE__ */ new WeakMap(), b = (e, n) => {
|
|
10
10
|
if (typeof e != "string" || e.length === 0 || e.length > n || /[\u0000-\u0020\u007f]/.test(e)) throw t("invalid_record");
|
|
11
11
|
return e;
|
|
@@ -117,5 +117,4 @@ var v = class extends h.Service()("@voltro/IapVerificationPort") {}, y = /* @__P
|
|
|
117
117
|
}
|
|
118
118
|
});
|
|
119
119
|
};
|
|
120
|
-
//#endregion
|
|
121
120
|
export { v as IapVerificationPort, x as captureIapTransactionFacts, C as iapVerificationPort, S as readVerifiedIapPurchase };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { economyError as e } from "./errors.js";
|
|
2
2
|
import { captureBoundMethods as t, dataObject as n, identifier as r } from "./capture.js";
|
|
3
|
-
|
|
3
|
+
// src/intentionRecovery.ts
|
|
4
4
|
var i = (t, i, a) => {
|
|
5
5
|
let o = n(t, [
|
|
6
6
|
"version",
|
|
@@ -130,5 +130,4 @@ var i = (t, i, a) => {
|
|
|
130
130
|
});
|
|
131
131
|
} });
|
|
132
132
|
};
|
|
133
|
-
//#endregion
|
|
134
133
|
export { s as browserIntentionJournal, o as createIntentionRecovery };
|
package/dist/ledger.js
CHANGED
|
@@ -2,7 +2,7 @@ import { economyError as e } from "./errors.js";
|
|
|
2
2
|
import { dataObject as t, identifier as n } from "./capture.js";
|
|
3
3
|
import { economyAmount as r, positiveAmount as i } from "./amount.js";
|
|
4
4
|
import { defineCurrency as a } from "./currency.js";
|
|
5
|
-
|
|
5
|
+
// src/ledger.ts
|
|
6
6
|
var o = (r) => {
|
|
7
7
|
let i = t(r, [
|
|
8
8
|
"kind",
|
|
@@ -74,5 +74,4 @@ var o = (r) => {
|
|
|
74
74
|
if (d > BigInt(s.cap)) throw e("currency_cap_reached");
|
|
75
75
|
return r(d).toString();
|
|
76
76
|
}, f = (e, t, n) => d(e, t, n, !1), p = (e, t, n) => d(e, t, n, !0);
|
|
77
|
-
//#endregion
|
|
78
77
|
export { f as applyWalletPosting, p as applyWalletRefundPosting, o as captureAccount, s as economyAccountKey, u as planEscrowLedgerTransfer, l as planLedgerTransfer };
|
package/dist/loyalty.fixture.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defaultLoyaltyPerks as e, defaultLoyaltyTier as t, defineLoyalty as n, resolveLoyaltyPerks as r, resolveLoyaltyTier as i } from "./loyalty.js";
|
|
2
2
|
import { Effect as a } from "effect";
|
|
3
|
-
|
|
3
|
+
// src/loyalty.fixture.ts
|
|
4
4
|
var o = () => {
|
|
5
5
|
let e = [{
|
|
6
6
|
id: "test.gold",
|
|
@@ -89,5 +89,4 @@ var o = () => {
|
|
|
89
89
|
expected: []
|
|
90
90
|
}
|
|
91
91
|
});
|
|
92
|
-
//#endregion
|
|
93
92
|
export { o as loyaltyFixture, l as loyaltyPerksSystemFixture, c as loyaltyTierSystemFixture };
|
package/dist/loyalty.js
CHANGED
|
@@ -4,7 +4,7 @@ import { economyAmount as a, nonNegativeAmount as o, positiveAmount as s } from
|
|
|
4
4
|
import { captureCurrencies as c } from "./currency.js";
|
|
5
5
|
import { defineShopOffer as l, shopInteger as u } from "./shop.js";
|
|
6
6
|
import { Context as d } from "effect";
|
|
7
|
-
|
|
7
|
+
// src/loyalty.ts
|
|
8
8
|
var f = (t, n) => {
|
|
9
9
|
let a = r(t, [
|
|
10
10
|
"id",
|
|
@@ -308,5 +308,4 @@ var f = (t, n) => {
|
|
|
308
308
|
loyaltyId: i(t.loyaltyId)
|
|
309
309
|
});
|
|
310
310
|
};
|
|
311
|
-
//#endregion
|
|
312
311
|
export { x as LoyaltyPort, S as captureLoyaltyService, v as defaultLoyaltyPerks, h as defaultLoyaltyTier, p as defineLoyalty, C as loyaltyCreditIntent, T as loyaltyMineIntent, m as loyaltyPointsForPurchase, D as loyaltyRebuildIntent, E as loyaltyReceiptIntent, w as loyaltyReverseIntent, b as projectLoyaltyPoints, y as resolveLoyaltyPerks, _ as resolveLoyaltyTier };
|
|
@@ -5,7 +5,7 @@ import { LoyaltyPort as d, captureLoyaltyService as f, defaultLoyaltyPerks as p,
|
|
|
5
5
|
import { loyaltyTables as x } from "./loyaltyTables.entity.js";
|
|
6
6
|
import { dataStoreLoyalty as S, resolveLoyaltyStoreOptions as C } from "./loyaltyStore.server.js";
|
|
7
7
|
import { Effect as w, Layer as T } from "effect";
|
|
8
|
-
|
|
8
|
+
// src/loyaltyBinding.server.ts
|
|
9
9
|
var E = () => w.fail(t("unavailable")), D = Object.freeze({
|
|
10
10
|
list: E,
|
|
11
11
|
mine: E,
|
|
@@ -200,5 +200,4 @@ var E = () => w.fail(t("unavailable")), D = Object.freeze({
|
|
|
200
200
|
}
|
|
201
201
|
});
|
|
202
202
|
};
|
|
203
|
-
//#endregion
|
|
204
203
|
export { O as bindLoyaltySystem, D as unavailableLoyalty };
|
|
@@ -4,7 +4,7 @@ import { shopMachine as n } from "./shop.testFixtures.js";
|
|
|
4
4
|
import { loyaltyStoreFixture as r } from "./loyaltyStore.testFixtures.js";
|
|
5
5
|
import { Effect as i, Layer as a } from "effect";
|
|
6
6
|
import { InMemoryDataStore as o } from "@voltro/runtime";
|
|
7
|
-
|
|
7
|
+
// src/loyaltyPort.fixture.ts
|
|
8
8
|
var s = {
|
|
9
9
|
app: {
|
|
10
10
|
name: "loyalty-fixture",
|
|
@@ -83,5 +83,4 @@ var s = {
|
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
85
|
});
|
|
86
|
-
//#endregion
|
|
87
86
|
export { l as loyaltyFakeLayer, c as loyaltyPortFixture, u as loyaltyPortSystemFixture };
|
|
@@ -4,7 +4,7 @@ import { shopBuyIntent as a } from "./shop.js";
|
|
|
4
4
|
import { shopOrdersTable as o } from "./shopTables.entity.js";
|
|
5
5
|
import { Effect as s, Result as c } from "effect";
|
|
6
6
|
import { eq as l, queryFor as u } from "@voltro/database";
|
|
7
|
-
|
|
7
|
+
// src/loyaltyShopSource.server.ts
|
|
8
8
|
var d = (d, f) => {
|
|
9
9
|
let p = r(f, ["shop", "refunds"]), m = n(p.shop, ["receipt"]), h = p.refunds === void 0 ? void 0 : n(p.refunds, ["read"]);
|
|
10
10
|
return Object.freeze({
|
|
@@ -87,5 +87,4 @@ var d = (d, f) => {
|
|
|
87
87
|
refund: (e) => h ? h.read(e) : s.fail(t("not_found"))
|
|
88
88
|
});
|
|
89
89
|
};
|
|
90
|
-
//#endregion
|
|
91
90
|
export { d as shopLoyaltyReceiptSource };
|