@quenty/receiptprocessing 7.18.3 → 7.18.4-canary.559.339cfa7.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 +16 -0
- package/package.json +10 -10
- package/src/Server/ReceiptProcessingService.lua +10 -6
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,22 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [7.18.4-canary.559.339cfa7.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/receiptprocessing@7.18.3...@quenty/receiptprocessing@7.18.4-canary.559.339cfa7.0) (2025-05-10)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* Additional type checking updates ([05ba29a](https://github.com/Quenty/NevermoreEngine/commit/05ba29a03efc9f3feed74b34f1d9dfb237496214))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### Features
|
|
15
|
+
|
|
16
|
+
* Add even more types ([b31717d](https://github.com/Quenty/NevermoreEngine/commit/b31717d8c9f7620c457f5018a2affa760a65334a))
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
6
22
|
## [7.18.3](https://github.com/Quenty/NevermoreEngine/compare/@quenty/receiptprocessing@7.18.2...@quenty/receiptprocessing@7.18.3) (2025-04-10)
|
|
7
23
|
|
|
8
24
|
**Note:** Version bump only for package @quenty/receiptprocessing
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quenty/receiptprocessing",
|
|
3
|
-
"version": "7.18.
|
|
3
|
+
"version": "7.18.4-canary.559.339cfa7.0",
|
|
4
4
|
"description": "Centralize receipt processing within games since this is a constrained resource.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Roblox",
|
|
@@ -25,17 +25,17 @@
|
|
|
25
25
|
"Quenty"
|
|
26
26
|
],
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@quenty/enumutils": "
|
|
29
|
-
"@quenty/loader": "
|
|
30
|
-
"@quenty/maid": "
|
|
31
|
-
"@quenty/promise": "
|
|
32
|
-
"@quenty/rx": "
|
|
33
|
-
"@quenty/servicebag": "
|
|
34
|
-
"@quenty/signal": "
|
|
35
|
-
"@quenty/valueobject": "
|
|
28
|
+
"@quenty/enumutils": "3.4.2",
|
|
29
|
+
"@quenty/loader": "10.8.4-canary.559.339cfa7.0",
|
|
30
|
+
"@quenty/maid": "3.4.4-canary.559.339cfa7.0",
|
|
31
|
+
"@quenty/promise": "10.10.5-canary.559.339cfa7.0",
|
|
32
|
+
"@quenty/rx": "13.17.4-canary.559.339cfa7.0",
|
|
33
|
+
"@quenty/servicebag": "11.11.5-canary.559.339cfa7.0",
|
|
34
|
+
"@quenty/signal": "7.10.4-canary.559.339cfa7.0",
|
|
35
|
+
"@quenty/valueobject": "13.17.4-canary.559.339cfa7.0"
|
|
36
36
|
},
|
|
37
37
|
"publishConfig": {
|
|
38
38
|
"access": "public"
|
|
39
39
|
},
|
|
40
|
-
"gitHead": "
|
|
40
|
+
"gitHead": "339cfa778736f08768ed7305041f6221faa35bfc"
|
|
41
41
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
--!strict
|
|
1
2
|
--[=[
|
|
2
3
|
Centralize receipt processing within games since this is a constrained resource.
|
|
3
4
|
|
|
@@ -11,12 +12,12 @@ local RunService = game:GetService("RunService")
|
|
|
11
12
|
|
|
12
13
|
local EnumUtils = require("EnumUtils")
|
|
13
14
|
local Maid = require("Maid")
|
|
15
|
+
local Observable = require("Observable")
|
|
14
16
|
local ObservableSubscriptionTable = require("ObservableSubscriptionTable")
|
|
15
17
|
local Promise = require("Promise")
|
|
18
|
+
local ServiceBag = require("ServiceBag")
|
|
16
19
|
local Signal = require("Signal")
|
|
17
20
|
local ValueObject = require("ValueObject")
|
|
18
|
-
local _ServiceBag = require("ServiceBag")
|
|
19
|
-
local _Observable = require("Observable")
|
|
20
21
|
|
|
21
22
|
export type ReceiptInfo = {
|
|
22
23
|
PurchaseId: number,
|
|
@@ -31,7 +32,7 @@ export type ReceiptInfo = {
|
|
|
31
32
|
local ReceiptProcessingService = {}
|
|
32
33
|
ReceiptProcessingService.ServiceName = "ReceiptProcessingService"
|
|
33
34
|
|
|
34
|
-
function ReceiptProcessingService:Init(serviceBag:
|
|
35
|
+
function ReceiptProcessingService:Init(serviceBag: ServiceBag.ServiceBag)
|
|
35
36
|
assert(not self._serviceBag, "Already initialized")
|
|
36
37
|
self._serviceBag = assert(serviceBag, "No serviceBag")
|
|
37
38
|
self._maid = Maid.new()
|
|
@@ -69,7 +70,7 @@ end
|
|
|
69
70
|
@param player Player
|
|
70
71
|
@return Observable<ReceiptInfo>
|
|
71
72
|
]=]
|
|
72
|
-
function ReceiptProcessingService:ObserveReceiptProcessedForPlayer(player: Player):
|
|
73
|
+
function ReceiptProcessingService:ObserveReceiptProcessedForPlayer(player: Player): Observable.Observable<ReceiptInfo>
|
|
73
74
|
assert(typeof(player) == "Instance" and player:IsA("Player"), "Bad player")
|
|
74
75
|
|
|
75
76
|
return self:ObserveReceiptProcessedForUserId(player.UserId)
|
|
@@ -80,7 +81,7 @@ end
|
|
|
80
81
|
@param userId number
|
|
81
82
|
@return Observable<ReceiptInfo>
|
|
82
83
|
]=]
|
|
83
|
-
function ReceiptProcessingService:ObserveReceiptProcessedForUserId(userId: number):
|
|
84
|
+
function ReceiptProcessingService:ObserveReceiptProcessedForUserId(userId: number): Observable.Observable<ReceiptInfo>
|
|
84
85
|
assert(type(userId) == "number", "Bad userId")
|
|
85
86
|
|
|
86
87
|
return self._receiptProcessedForUserId:Observe(userId)
|
|
@@ -180,7 +181,10 @@ function ReceiptProcessingService:_handleProcessReceiptAsync(receiptInfo: Receip
|
|
|
180
181
|
return self._defaultDecision.Value
|
|
181
182
|
end
|
|
182
183
|
|
|
183
|
-
function ReceiptProcessingService:_fireProcessed(
|
|
184
|
+
function ReceiptProcessingService:_fireProcessed(
|
|
185
|
+
receiptInfo: ReceiptInfo,
|
|
186
|
+
productPurchaseDecision: Enum.ProductPurchaseDecision
|
|
187
|
+
)
|
|
184
188
|
assert(EnumUtils.isOfType(Enum.ProductPurchaseDecision, productPurchaseDecision), "Bad productPurchaseDecision")
|
|
185
189
|
|
|
186
190
|
self.ReceiptProcessed:Fire(receiptInfo, productPurchaseDecision)
|