@mpgd/game-services 0.34.0 → 0.35.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/dist/notifications/ait-functional-delivery.d.ts +65 -1
- package/dist/notifications/ait-functional-delivery.js +239 -5
- package/dist/notifications/bulk.d.ts +158 -0
- package/dist/notifications/bulk.js +229 -0
- package/dist/notifications/copy.d.ts +87 -0
- package/dist/notifications/copy.js +70 -0
- package/dist/notifications/delivery-provider.d.ts +79 -0
- package/dist/notifications/index.d.ts +4 -1
- package/dist/notifications/index.js +4 -1
- package/dist/notifications/registry.js +8 -0
- package/dist/notifications/service.d.ts +32 -0
- package/dist/notifications/service.js +1017 -59
- package/dist/notifications/store.d.ts +6 -0
- package/dist/notifications/store.js +5 -3
- package/package.json +5 -5
|
@@ -126,6 +126,12 @@ export interface NotificationSendRow {
|
|
|
126
126
|
readonly firstAttemptedAt?: string;
|
|
127
127
|
/** Ambiguous answers so far; each doubles the lease before the next replay. */
|
|
128
128
|
readonly ambiguousAttempts?: number;
|
|
129
|
+
/**
|
|
130
|
+
* The provider's bulk call reached some of its recipients without saying
|
|
131
|
+
* which (BK1): the row is not replayed, since a replay would reach them
|
|
132
|
+
* again, and stays in flight until its key's retention ends.
|
|
133
|
+
*/
|
|
134
|
+
readonly unattributed?: true;
|
|
129
135
|
}
|
|
130
136
|
/** A send key's stored state. */
|
|
131
137
|
export interface NotificationStoredSend {
|
|
@@ -13,7 +13,8 @@ export function notificationRowOutcome(row) {
|
|
|
13
13
|
/**
|
|
14
14
|
* How far a recipient's answer got, for a send's result across recipients:
|
|
15
15
|
* delivered, in flight, waiting, a provider's refusal, a policy refusal, and
|
|
16
|
-
* last a recipient that did not resolve.
|
|
16
|
+
* last a recipient that did not resolve. `copy-missing` ranks with a
|
|
17
|
+
* provider's refusal: it comes after every policy step.
|
|
17
18
|
*/
|
|
18
19
|
function outcomeRank(outcome) {
|
|
19
20
|
switch (outcome.status) {
|
|
@@ -64,8 +65,9 @@ function rowDueAt(row) {
|
|
|
64
65
|
return lease;
|
|
65
66
|
}
|
|
66
67
|
// The provider may have sent it every time: replays stop after a day, and
|
|
67
|
-
// the row stays in flight until its key's retention ends.
|
|
68
|
-
|
|
68
|
+
// the row stays in flight until its key's retention ends. A row a bulk
|
|
69
|
+
// call left unattributed is never replayed.
|
|
70
|
+
return row.unattributed === true || isNotificationRowAbandoned(row, lease) ? undefined : lease;
|
|
69
71
|
}
|
|
70
72
|
/**
|
|
71
73
|
* Whether an attempted row is past its replays: its lease would end a day
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mpgd/game-services",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.35.0",
|
|
4
4
|
"description": "Client, contract, server, store, and test helpers for authoritative mpgd game services.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -235,9 +235,9 @@
|
|
|
235
235
|
"@orpc/client": "2.0.0-beta.46",
|
|
236
236
|
"@orpc/contract": "2.0.0-beta.46",
|
|
237
237
|
"@orpc/server": "2.0.0-beta.46",
|
|
238
|
-
"@mpgd/analytics": "0.5.
|
|
239
|
-
"@mpgd/
|
|
240
|
-
"@mpgd/
|
|
238
|
+
"@mpgd/analytics": "0.5.10",
|
|
239
|
+
"@mpgd/platform": "0.36.0",
|
|
240
|
+
"@mpgd/catalog": "0.15.2"
|
|
241
241
|
},
|
|
242
242
|
"peerDependencies": {
|
|
243
243
|
"@apple/app-store-server-library": "^3.1.0"
|
|
@@ -266,7 +266,7 @@
|
|
|
266
266
|
"fix": "ttsc fix",
|
|
267
267
|
"build": "cd ../.. && node tools/run-ttsx.mjs tools/package/build-packages.ts @mpgd/game-services",
|
|
268
268
|
"test:packed-transport": "pnpm build && node test/runtime-transport-package-import.mjs && node test/reward-evidence-import.mjs",
|
|
269
|
-
"test:unit": "cd ../.. && node tools/run-ttsx.mjs packages/game-services/src/client.test.ts && node tools/run-ttsx.mjs packages/game-services/src/client-progress.test.ts && node tools/run-ttsx.mjs packages/game-services/src/runtime.test.ts && node tools/run-ttsx.mjs packages/game-services/src/runtime-session.test.ts && node tools/run-ttsx.mjs packages/game-services/src/types.test.ts && node tools/run-ttsx.mjs packages/game-services/src/server.test.ts && node tools/run-ttsx.mjs packages/game-services/src/orpc-error-compat.test.ts && node tools/run-ttsx.mjs packages/game-services/src/google-play-purchase.test.ts && node tools/run-ttsx.mjs packages/game-services/src/google-play-publisher-client.test.ts && node tools/run-ttsx.mjs packages/game-services/src/google-play-store-server.test.ts && node tools/run-ttsx.mjs packages/game-services/src/google-play-rtdn.test.ts && node tools/run-ttsx.mjs packages/game-services/src/base64.test.ts && node tools/run-ttsx.mjs packages/game-services/src/microsoft-store-purchase.test.ts && node tools/run-ttsx.mjs packages/game-services/src/microsoft-store-identity.test.ts && node tools/run-ttsx.mjs packages/game-services/src/platform-order.test.ts && node tools/run-ttsx.mjs packages/game-services/src/progress-link.test.ts && node tools/run-ttsx.mjs packages/game-services/src/notification-delivery.test.ts && node tools/run-ttsx.mjs packages/game-services/src/notifications/service.test.ts && node tools/run-ttsx.mjs packages/game-services/src/notifications/service-conformance.test.ts && node tools/run-ttsx.mjs packages/game-services/src/notifications/client.test.ts && node tools/run-ttsx.mjs packages/game-services/src/notifications/client-conformance.test.ts && node tools/run-ttsx.mjs packages/game-services/src/notifications/scheduler.test.ts && node tools/run-ttsx.mjs packages/game-services/src/notifications/fcm.test.ts && node tools/run-ttsx.mjs packages/game-services/src/notifications/store-conformance.test.ts && node tools/run-ttsx.mjs packages/game-services/src/notifications/ait-functional-delivery.test.ts && node tools/run-ttsx.mjs packages/game-services/src/admob-ssv.test.ts && node tools/run-ttsx.mjs packages/game-services/src/app-store-verifier.test.ts && node tools/run-ttsx.mjs packages/game-services/src/app-store-revocation-registry.test.ts && node tools/run-ttsx.mjs packages/game-services/src/app-store-server-notifications.test.ts && node tools/run-ttsx.mjs packages/game-services/src/apps-in-toss-evidence-verification-conformance.test.ts && node tools/run-ttsx.mjs packages/game-services/src/apps-in-toss-partner-api.test.ts && node tools/run-ttsx.mjs packages/game-services/src/verified-leaderboard.test.ts && node tools/run-ttsx.mjs packages/game-services/src/verified-leaderboard-conformance.test.ts && node tools/run-ttsx.mjs packages/game-services/src/verified-leaderboard-durability-conformance.test.ts && node tools/run-ttsx.mjs packages/game-services/src/verified-leaderboard-transport.test.ts && node tools/run-ttsx.mjs packages/game-services/src/guest-session.test.ts && node tools/run-ttsx.mjs packages/game-services/src/development-session.test.ts && node tools/run-ttsx.mjs packages/game-services/src/client-reward-evidence.test.ts && node tools/run-ttsx.mjs packages/game-services/src/ad-reward-verifier-registry.test.ts && node tools/run-ttsx.mjs packages/game-services/src/oneplay-reward.test.ts && node tools/run-ttsx.mjs packages/game-services/src/oneplay-purchase.test.ts && node tools/run-ttsx.mjs packages/game-services/src/commerce-registry-routing.test.ts && node tools/run-ttsx.mjs packages/game-services/src/commerce-registry-server.test.ts && node tools/run-ttsx.mjs packages/game-services/src/commerce-ledger-revocation.test.ts && node tools/run-ttsx.mjs packages/game-services/src/purchase-sharing.test.ts && node tools/run-ttsx.mjs packages/game-services/src/apps-in-toss-anonymous-auth.test.ts && node tools/run-ttsx.mjs packages/game-services/src/account-deletion.test.ts",
|
|
269
|
+
"test:unit": "cd ../.. && node tools/run-ttsx.mjs packages/game-services/src/client.test.ts && node tools/run-ttsx.mjs packages/game-services/src/client-progress.test.ts && node tools/run-ttsx.mjs packages/game-services/src/runtime.test.ts && node tools/run-ttsx.mjs packages/game-services/src/runtime-session.test.ts && node tools/run-ttsx.mjs packages/game-services/src/types.test.ts && node tools/run-ttsx.mjs packages/game-services/src/server.test.ts && node tools/run-ttsx.mjs packages/game-services/src/orpc-error-compat.test.ts && node tools/run-ttsx.mjs packages/game-services/src/google-play-purchase.test.ts && node tools/run-ttsx.mjs packages/game-services/src/google-play-publisher-client.test.ts && node tools/run-ttsx.mjs packages/game-services/src/google-play-store-server.test.ts && node tools/run-ttsx.mjs packages/game-services/src/google-play-rtdn.test.ts && node tools/run-ttsx.mjs packages/game-services/src/base64.test.ts && node tools/run-ttsx.mjs packages/game-services/src/microsoft-store-purchase.test.ts && node tools/run-ttsx.mjs packages/game-services/src/microsoft-store-identity.test.ts && node tools/run-ttsx.mjs packages/game-services/src/platform-order.test.ts && node tools/run-ttsx.mjs packages/game-services/src/progress-link.test.ts && node tools/run-ttsx.mjs packages/game-services/src/notification-delivery.test.ts && node tools/run-ttsx.mjs packages/game-services/src/notifications/service.test.ts && node tools/run-ttsx.mjs packages/game-services/src/notifications/service-conformance.test.ts && node tools/run-ttsx.mjs packages/game-services/src/notifications/client.test.ts && node tools/run-ttsx.mjs packages/game-services/src/notifications/client-conformance.test.ts && node tools/run-ttsx.mjs packages/game-services/src/notifications/scheduler.test.ts && node tools/run-ttsx.mjs packages/game-services/src/notifications/fcm.test.ts && node tools/run-ttsx.mjs packages/game-services/src/notifications/store-conformance.test.ts && node tools/run-ttsx.mjs packages/game-services/src/notifications/ait-functional-delivery.test.ts && node tools/run-ttsx.mjs packages/game-services/src/notifications/copy.test.ts && node tools/run-ttsx.mjs packages/game-services/src/notifications/bulk.test.ts && node tools/run-ttsx.mjs packages/game-services/src/admob-ssv.test.ts && node tools/run-ttsx.mjs packages/game-services/src/app-store-verifier.test.ts && node tools/run-ttsx.mjs packages/game-services/src/app-store-revocation-registry.test.ts && node tools/run-ttsx.mjs packages/game-services/src/app-store-server-notifications.test.ts && node tools/run-ttsx.mjs packages/game-services/src/apps-in-toss-evidence-verification-conformance.test.ts && node tools/run-ttsx.mjs packages/game-services/src/apps-in-toss-partner-api.test.ts && node tools/run-ttsx.mjs packages/game-services/src/verified-leaderboard.test.ts && node tools/run-ttsx.mjs packages/game-services/src/verified-leaderboard-conformance.test.ts && node tools/run-ttsx.mjs packages/game-services/src/verified-leaderboard-durability-conformance.test.ts && node tools/run-ttsx.mjs packages/game-services/src/verified-leaderboard-transport.test.ts && node tools/run-ttsx.mjs packages/game-services/src/guest-session.test.ts && node tools/run-ttsx.mjs packages/game-services/src/development-session.test.ts && node tools/run-ttsx.mjs packages/game-services/src/client-reward-evidence.test.ts && node tools/run-ttsx.mjs packages/game-services/src/ad-reward-verifier-registry.test.ts && node tools/run-ttsx.mjs packages/game-services/src/oneplay-reward.test.ts && node tools/run-ttsx.mjs packages/game-services/src/oneplay-purchase.test.ts && node tools/run-ttsx.mjs packages/game-services/src/commerce-registry-routing.test.ts && node tools/run-ttsx.mjs packages/game-services/src/commerce-registry-server.test.ts && node tools/run-ttsx.mjs packages/game-services/src/commerce-ledger-revocation.test.ts && node tools/run-ttsx.mjs packages/game-services/src/purchase-sharing.test.ts && node tools/run-ttsx.mjs packages/game-services/src/apps-in-toss-anonymous-auth.test.ts && node tools/run-ttsx.mjs packages/game-services/src/account-deletion.test.ts",
|
|
270
270
|
"test:recovery": "cd ../.. && node tools/run-ttsx.mjs packages/game-services/src/monetization-recovery.test.ts && node tools/run-ttsx.mjs packages/game-services/src/app-store-recovery.test.ts && node tools/run-ttsx.mjs packages/game-services/src/commerce-reconciler.test.ts && node tools/run-ttsx.mjs packages/game-services/src/commerce-reconciler-conformance.test.ts",
|
|
271
271
|
"test": "pnpm test:unit && pnpm test:app-store-server && pnpm test:recovery && pnpm test:packed-transport",
|
|
272
272
|
"test:app-store-server": "vitest run"
|