@downcity/services 0.1.60 → 0.1.62

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.
Files changed (66) hide show
  1. package/LICENSE +183 -0
  2. package/bin/balance/amount.d.ts +51 -0
  3. package/bin/balance/amount.d.ts.map +1 -0
  4. package/bin/balance/amount.js +101 -0
  5. package/bin/balance/amount.js.map +1 -0
  6. package/bin/balance/index.d.ts +2 -0
  7. package/bin/balance/index.d.ts.map +1 -1
  8. package/bin/balance/index.js +1 -0
  9. package/bin/balance/index.js.map +1 -1
  10. package/bin/balance/routes.d.ts.map +1 -1
  11. package/bin/balance/routes.js +1 -0
  12. package/bin/balance/routes.js.map +1 -1
  13. package/bin/balance/service.d.ts +13 -1
  14. package/bin/balance/service.d.ts.map +1 -1
  15. package/bin/balance/service.js +54 -25
  16. package/bin/balance/service.js.map +1 -1
  17. package/bin/balance/types.d.ts +44 -9
  18. package/bin/balance/types.d.ts.map +1 -1
  19. package/bin/balance/types.js +2 -1
  20. package/bin/balance/types.js.map +1 -1
  21. package/bin/balance/utils.d.ts.map +1 -1
  22. package/bin/balance/utils.js +17 -5
  23. package/bin/balance/utils.js.map +1 -1
  24. package/bin/billing/index.d.ts +7 -0
  25. package/bin/billing/index.d.ts.map +1 -0
  26. package/bin/billing/index.js +6 -0
  27. package/bin/billing/index.js.map +1 -0
  28. package/bin/billing/routes.d.ts +14 -0
  29. package/bin/billing/routes.d.ts.map +1 -0
  30. package/bin/billing/routes.js +61 -0
  31. package/bin/billing/routes.js.map +1 -0
  32. package/bin/billing/schema.d.ts +582 -0
  33. package/bin/billing/schema.d.ts.map +1 -0
  34. package/bin/billing/schema.js +81 -0
  35. package/bin/billing/schema.js.map +1 -0
  36. package/bin/billing/service.d.ts +619 -0
  37. package/bin/billing/service.d.ts.map +1 -0
  38. package/bin/billing/service.js +457 -0
  39. package/bin/billing/service.js.map +1 -0
  40. package/bin/billing/types.d.ts +205 -0
  41. package/bin/billing/types.d.ts.map +1 -0
  42. package/bin/billing/types.js +10 -0
  43. package/bin/billing/types.js.map +1 -0
  44. package/bin/index.d.ts +5 -1
  45. package/bin/index.d.ts.map +1 -1
  46. package/bin/index.js +3 -1
  47. package/bin/index.js.map +1 -1
  48. package/bin/payment/types.d.ts +5 -1
  49. package/bin/payment/types.d.ts.map +1 -1
  50. package/bin/payment-creem/creem.d.ts.map +1 -1
  51. package/bin/payment-creem/creem.js +15 -0
  52. package/bin/payment-creem/creem.js.map +1 -1
  53. package/bin/payment-dodo/dodo.d.ts.map +1 -1
  54. package/bin/payment-dodo/dodo.js +16 -1
  55. package/bin/payment-dodo/dodo.js.map +1 -1
  56. package/bin/payment-stripe/stripe.d.ts.map +1 -1
  57. package/bin/payment-stripe/stripe.js +14 -1
  58. package/bin/payment-stripe/stripe.js.map +1 -1
  59. package/bin/payment-waffo/waffo.d.ts.map +1 -1
  60. package/bin/payment-waffo/waffo.js +15 -0
  61. package/bin/payment-waffo/waffo.js.map +1 -1
  62. package/bin/types/Amount.d.ts +25 -0
  63. package/bin/types/Amount.d.ts.map +1 -0
  64. package/bin/types/Amount.js +17 -0
  65. package/bin/types/Amount.js.map +1 -0
  66. package/package.json +2 -2
package/LICENSE ADDED
@@ -0,0 +1,183 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ https://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction, and
10
+ distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by the copyright
13
+ owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all other entities
16
+ that control, are controlled by, or are under common control with that entity.
17
+ For the purposes of this definition, "control" means (i) the power, direct or
18
+ indirect, to cause the direction or management of such entity, whether by
19
+ contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the
20
+ outstanding shares, or (iii) beneficial ownership of such entity.
21
+
22
+ "You" (or "Your") shall mean an individual or Legal Entity exercising
23
+ permissions granted by this License.
24
+
25
+ "Source" form shall mean the preferred form for making modifications, including
26
+ but not limited to software source code, documentation source, and configuration
27
+ files.
28
+
29
+ "Object" form shall mean any form resulting from mechanical transformation or
30
+ translation of a Source form, including but not limited to compiled object code,
31
+ generated documentation, and conversions to other media types.
32
+
33
+ "Work" shall mean the work of authorship, whether in Source or Object form,
34
+ made available under the License, as indicated by a copyright notice that is
35
+ included in or attached to the work (an example is provided in the Appendix
36
+ below).
37
+
38
+ "Derivative Works" shall mean any work, whether in Source or Object form, that
39
+ is based on (or derived from) the Work and for which the editorial revisions,
40
+ annotations, elaborations, or other modifications represent, as a whole, an
41
+ original work of authorship. For the purposes of this License, Derivative Works
42
+ shall not include works that remain separable from, or merely link (or bind by
43
+ name) to the interfaces of, the Work and Derivative Works thereof.
44
+
45
+ "Contribution" shall mean any work of authorship, including the original version
46
+ of the Work and any modifications or additions to that Work or Derivative Works
47
+ thereof, that is intentionally submitted to Licensor for inclusion in the Work
48
+ by the copyright owner or by an individual or Legal Entity authorized to submit
49
+ on behalf of the copyright owner. For the purposes of this definition,
50
+ "submitted" means any form of electronic, verbal, or written communication sent
51
+ to the Licensor or its representatives, including but not limited to
52
+ communication on electronic mailing lists, source code control systems, and
53
+ issue tracking systems that are managed by, or on behalf of, the Licensor for
54
+ the purpose of discussing and improving the Work, but excluding communication
55
+ that is conspicuously marked or otherwise designated in writing by the copyright
56
+ owner as "Not a Contribution."
57
+
58
+ "Contributor" shall mean Licensor and any individual or Legal Entity on behalf
59
+ of whom a Contribution has been received by Licensor and subsequently
60
+ incorporated within the Work.
61
+
62
+ 2. Grant of Copyright License. Subject to the terms and conditions of this
63
+ License, each Contributor hereby grants to You a perpetual, worldwide,
64
+ non-exclusive, no-charge, royalty-free, irrevocable copyright license to
65
+ reproduce, prepare Derivative Works of, publicly display, publicly perform,
66
+ sublicense, and distribute the Work and such Derivative Works in Source or
67
+ Object form.
68
+
69
+ 3. Grant of Patent License. Subject to the terms and conditions of this License,
70
+ each Contributor hereby grants to You a perpetual, worldwide, non-exclusive,
71
+ no-charge, royalty-free, irrevocable (except as stated in this section) patent
72
+ license to make, have made, use, offer to sell, sell, import, and otherwise
73
+ transfer the Work, where such license applies only to those patent claims
74
+ licensable by such Contributor that are necessarily infringed by their
75
+ Contribution(s) alone or by combination of their Contribution(s) with the Work
76
+ to which such Contribution(s) was submitted. If You institute patent litigation
77
+ against any entity (including a cross-claim or counterclaim in a lawsuit)
78
+ alleging that the Work or a Contribution incorporated within the Work
79
+ constitutes direct or contributory patent infringement, then any patent licenses
80
+ granted to You under this License for that Work shall terminate as of the date
81
+ such litigation is filed.
82
+
83
+ 4. Redistribution. You may reproduce and distribute copies of the Work or
84
+ Derivative Works thereof in any medium, with or without modifications, and in
85
+ Source or Object form, provided that You meet the following conditions:
86
+
87
+ (a) You must give any other recipients of the Work or Derivative Works a copy of
88
+ this License; and
89
+
90
+ (b) You must cause any modified files to carry prominent notices stating that
91
+ You changed the files; and
92
+
93
+ (c) You must retain, in the Source form of any Derivative Works that You
94
+ distribute, all copyright, patent, trademark, and attribution notices from the
95
+ Source form of the Work, excluding those notices that do not pertain to any part
96
+ of the Derivative Works; and
97
+
98
+ (d) If the Work includes a "NOTICE" text file as part of its distribution, then
99
+ any Derivative Works that You distribute must include a readable copy of the
100
+ attribution notices contained within such NOTICE file, excluding those notices
101
+ that do not pertain to any part of the Derivative Works, in at least one of the
102
+ following places: within a NOTICE text file distributed as part of the
103
+ Derivative Works; within the Source form or documentation, if provided along
104
+ with the Derivative Works; or, within a display generated by the Derivative
105
+ Works, if and wherever such third-party notices normally appear. The contents of
106
+ the NOTICE file are for informational purposes only and do not modify the
107
+ License. You may add Your own attribution notices within Derivative Works that
108
+ You distribute, alongside or as an addendum to the NOTICE text from the Work,
109
+ provided that such additional attribution notices cannot be construed as
110
+ modifying the License.
111
+
112
+ You may add Your own copyright statement to Your modifications and may provide
113
+ additional or different license terms and conditions for use, reproduction, or
114
+ distribution of Your modifications, or for any such Derivative Works as a whole,
115
+ provided Your use, reproduction, and distribution of the Work otherwise complies
116
+ with the conditions stated in this License.
117
+
118
+ 5. Submission of Contributions. Unless You explicitly state otherwise, any
119
+ Contribution intentionally submitted for inclusion in the Work by You to the
120
+ Licensor shall be under the terms and conditions of this License, without any
121
+ additional terms or conditions. Notwithstanding the above, nothing herein shall
122
+ supersede or modify the terms of any separate license agreement you may have
123
+ executed with Licensor regarding such Contributions.
124
+
125
+ 6. Trademarks. This License does not grant permission to use the trade names,
126
+ trademarks, service marks, or product names of the Licensor, except as required
127
+ for reasonable and customary use in describing the origin of the Work and
128
+ reproducing the content of the NOTICE file.
129
+
130
+ 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in
131
+ writing, Licensor provides the Work (and each Contributor provides its
132
+ Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
133
+ KIND, either express or implied, including, without limitation, any warranties or
134
+ conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
135
+ PARTICULAR PURPOSE. You are solely responsible for determining the
136
+ appropriateness of using or redistributing the Work and assume any risks
137
+ associated with Your exercise of permissions under this License.
138
+
139
+ 8. Limitation of Liability. In no event and under no legal theory, whether in
140
+ tort (including negligence), contract, or otherwise, unless required by
141
+ applicable law (such as deliberate and grossly negligent acts) or agreed to in
142
+ writing, shall any Contributor be liable to You for damages, including any
143
+ direct, indirect, special, incidental, or consequential damages of any character
144
+ arising as a result of this License or out of the use or inability to use the
145
+ Work (including but not limited to damages for loss of goodwill, work stoppage,
146
+ computer failure or malfunction, or any and all other commercial damages or
147
+ losses), even if such Contributor has been advised of the possibility of such
148
+ damages.
149
+
150
+ 9. Accepting Warranty or Additional Liability. While redistributing the Work or
151
+ Derivative Works thereof, You may choose to offer, and charge a fee for,
152
+ acceptance of support, warranty, indemnity, or other liability obligations
153
+ and/or rights consistent with this License. However, in accepting such
154
+ obligations, You may act only on Your own behalf and on Your sole
155
+ responsibility, not on behalf of any other Contributor, and only if You agree to
156
+ indemnify, defend, and hold each Contributor harmless for any liability incurred
157
+ by, or claims asserted against, such Contributor by reason of your accepting any
158
+ such warranty or additional liability.
159
+
160
+ END OF TERMS AND CONDITIONS
161
+
162
+ APPENDIX: How to apply the Apache License to your work.
163
+
164
+ To apply the Apache License to your work, attach the following boilerplate
165
+ notice, with the fields enclosed by brackets "[]" replaced with your own
166
+ identifying information. (Do not include the brackets!) The text should be
167
+ enclosed in the appropriate comment syntax for the file format. We also
168
+ recommend that a file or class name and description of purpose be included on
169
+ the same "printed page" as the copyright notice for easier identification within
170
+ third-party archives.
171
+
172
+ Copyright [yyyy] [name of copyright owner]
173
+
174
+ Licensed under the Apache License, Version 2.0 (the "License");
175
+ you may not use this file except in compliance with the License.
176
+ You may obtain a copy of the License at
177
+
178
+ https://www.apache.org/licenses/LICENSE-2.0
179
+
180
+ Unless required by applicable law or agreed to in writing, software distributed
181
+ under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
182
+ CONDITIONS OF ANY KIND, either express or implied. See the License for the
183
+ specific language governing permissions and limitations under the License.
@@ -0,0 +1,51 @@
1
+ /**
2
+ * Balance 金额换算工具。
3
+ *
4
+ * 关键说明(中文)
5
+ * - 对外输入输出使用 credits
6
+ * - 存储与扣款使用 microcredits
7
+ * - 所有转换集中在这里,避免各模块重复处理精度
8
+ */
9
+ /**
10
+ * 将 credits 输入标准化为 microcredits。
11
+ */
12
+ export declare function normalizeCreditsToMicrocredits(value: unknown, label: string): number;
13
+ /**
14
+ * 将 credits 输入标准化为非负 microcredits。
15
+ */
16
+ export declare function normalizeNonNegativeCreditsToMicrocredits(value: unknown, label: string): number;
17
+ /**
18
+ * 标准化直接传入的 microcredits 整数。
19
+ */
20
+ export declare function normalizeMicrocredits(value: unknown, label: string): number;
21
+ /**
22
+ * 标准化非负 microcredits 整数。
23
+ */
24
+ export declare function normalizeNonNegativeMicrocredits(value: unknown, label: string): number;
25
+ /**
26
+ * 从请求体中读取金额,优先使用 amount_microcredits。
27
+ */
28
+ export declare function readAmountMicrocredits(input: {
29
+ amount?: unknown;
30
+ amount_microcredits?: unknown;
31
+ }, label?: string): number;
32
+ /**
33
+ * 从请求体中读取非负金额,优先使用 amount_microcredits。
34
+ */
35
+ export declare function readNonNegativeAmountMicrocredits(input: {
36
+ amount?: unknown;
37
+ amount_microcredits?: unknown;
38
+ }, label?: string): number;
39
+ /**
40
+ * 将 microcredits 转换成最多 6 位小数的 credits。
41
+ */
42
+ export declare function microcreditsToCredits(value: unknown): number;
43
+ /**
44
+ * 将 microcredits 转成 USD cents,供支付 provider 使用。
45
+ */
46
+ export declare function microcreditsToUsdCents(value: unknown): number;
47
+ /**
48
+ * 格式化 credits 展示文本。
49
+ */
50
+ export declare function formatCredits(value: unknown): string;
51
+ //# sourceMappingURL=amount.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"amount.d.ts","sourceRoot":"","sources":["../../src/balance/amount.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAOH;;GAEG;AACH,wBAAgB,8BAA8B,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAWpF;AAED;;GAEG;AACH,wBAAgB,yCAAyC,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAW/F;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAM3E;AAED;;GAEG;AACH,wBAAgB,gCAAgC,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAMtF;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE;IAC5C,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAC/B,EAAE,KAAK,SAAW,GAAG,MAAM,CAK3B;AAED;;GAEG;AACH,wBAAgB,iCAAiC,CAAC,KAAK,EAAE;IACvD,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAC/B,EAAE,KAAK,SAAW,GAAG,MAAM,CAK3B;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAG5D;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAO7D;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAGpD"}
@@ -0,0 +1,101 @@
1
+ /**
2
+ * Balance 金额换算工具。
3
+ *
4
+ * 关键说明(中文)
5
+ * - 对外输入输出使用 credits
6
+ * - 存储与扣款使用 microcredits
7
+ * - 所有转换集中在这里,避免各模块重复处理精度
8
+ */
9
+ import { CREDIT_DECIMAL_PLACES, MICROCREDITS_PER_CREDIT, } from "../types/Amount.js";
10
+ /**
11
+ * 将 credits 输入标准化为 microcredits。
12
+ */
13
+ export function normalizeCreditsToMicrocredits(value, label) {
14
+ const normalized = Number(value);
15
+ if (!Number.isFinite(normalized) || normalized <= 0) {
16
+ throw new TypeError(`${label} must be a positive credits amount`);
17
+ }
18
+ const microcredits = Math.round(normalized * MICROCREDITS_PER_CREDIT);
19
+ if (!Number.isSafeInteger(microcredits) || microcredits <= 0) {
20
+ throw new TypeError(`${label} is outside the supported credits range`);
21
+ }
22
+ return microcredits;
23
+ }
24
+ /**
25
+ * 将 credits 输入标准化为非负 microcredits。
26
+ */
27
+ export function normalizeNonNegativeCreditsToMicrocredits(value, label) {
28
+ const normalized = Number(value ?? 0);
29
+ if (!Number.isFinite(normalized) || normalized < 0) {
30
+ throw new TypeError(`${label} must be a non-negative credits amount`);
31
+ }
32
+ const microcredits = Math.round(normalized * MICROCREDITS_PER_CREDIT);
33
+ if (!Number.isSafeInteger(microcredits) || microcredits < 0) {
34
+ throw new TypeError(`${label} is outside the supported credits range`);
35
+ }
36
+ return microcredits;
37
+ }
38
+ /**
39
+ * 标准化直接传入的 microcredits 整数。
40
+ */
41
+ export function normalizeMicrocredits(value, label) {
42
+ const normalized = Number(value);
43
+ if (!Number.isSafeInteger(normalized) || normalized <= 0) {
44
+ throw new TypeError(`${label} must be a positive microcredits integer`);
45
+ }
46
+ return normalized;
47
+ }
48
+ /**
49
+ * 标准化非负 microcredits 整数。
50
+ */
51
+ export function normalizeNonNegativeMicrocredits(value, label) {
52
+ const normalized = Number(value ?? 0);
53
+ if (!Number.isSafeInteger(normalized) || normalized < 0) {
54
+ throw new TypeError(`${label} must be a non-negative microcredits integer`);
55
+ }
56
+ return normalized;
57
+ }
58
+ /**
59
+ * 从请求体中读取金额,优先使用 amount_microcredits。
60
+ */
61
+ export function readAmountMicrocredits(input, label = "amount") {
62
+ if (input.amount_microcredits !== undefined) {
63
+ return normalizeMicrocredits(input.amount_microcredits, `${label}_microcredits`);
64
+ }
65
+ return normalizeCreditsToMicrocredits(input.amount, label);
66
+ }
67
+ /**
68
+ * 从请求体中读取非负金额,优先使用 amount_microcredits。
69
+ */
70
+ export function readNonNegativeAmountMicrocredits(input, label = "amount") {
71
+ if (input.amount_microcredits !== undefined) {
72
+ return normalizeNonNegativeMicrocredits(input.amount_microcredits, `${label}_microcredits`);
73
+ }
74
+ return normalizeNonNegativeCreditsToMicrocredits(input.amount, label);
75
+ }
76
+ /**
77
+ * 将 microcredits 转换成最多 6 位小数的 credits。
78
+ */
79
+ export function microcreditsToCredits(value) {
80
+ const microcredits = Number(value ?? 0);
81
+ return Number((microcredits / MICROCREDITS_PER_CREDIT).toFixed(CREDIT_DECIMAL_PLACES));
82
+ }
83
+ /**
84
+ * 将 microcredits 转成 USD cents,供支付 provider 使用。
85
+ */
86
+ export function microcreditsToUsdCents(value) {
87
+ const microcredits = Number(value ?? 0);
88
+ const cents = Math.round((microcredits / MICROCREDITS_PER_CREDIT) * 100);
89
+ if (!Number.isSafeInteger(cents) || cents <= 0) {
90
+ throw new TypeError("amount_usd_cents must be a positive integer");
91
+ }
92
+ return cents;
93
+ }
94
+ /**
95
+ * 格式化 credits 展示文本。
96
+ */
97
+ export function formatCredits(value) {
98
+ const credits = microcreditsToCredits(value);
99
+ return credits.toFixed(CREDIT_DECIMAL_PLACES).replace(/\.?0+$/, "");
100
+ }
101
+ //# sourceMappingURL=amount.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"amount.js","sourceRoot":"","sources":["../../src/balance/amount.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EACL,qBAAqB,EACrB,uBAAuB,GACxB,MAAM,oBAAoB,CAAC;AAE5B;;GAEG;AACH,MAAM,UAAU,8BAA8B,CAAC,KAAc,EAAE,KAAa;IAC1E,MAAM,UAAU,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;IACjC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,UAAU,CAAC,IAAI,UAAU,IAAI,CAAC,EAAE,CAAC;QACpD,MAAM,IAAI,SAAS,CAAC,GAAG,KAAK,oCAAoC,CAAC,CAAC;IACpE,CAAC;IAED,MAAM,YAAY,GAAG,IAAI,CAAC,KAAK,CAAC,UAAU,GAAG,uBAAuB,CAAC,CAAC;IACtE,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,YAAY,CAAC,IAAI,YAAY,IAAI,CAAC,EAAE,CAAC;QAC7D,MAAM,IAAI,SAAS,CAAC,GAAG,KAAK,yCAAyC,CAAC,CAAC;IACzE,CAAC;IACD,OAAO,YAAY,CAAC;AACtB,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,yCAAyC,CAAC,KAAc,EAAE,KAAa;IACrF,MAAM,UAAU,GAAG,MAAM,CAAC,KAAK,IAAI,CAAC,CAAC,CAAC;IACtC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,UAAU,CAAC,IAAI,UAAU,GAAG,CAAC,EA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,CAAC;AACtE,CAAC"}
@@ -4,4 +4,6 @@
4
4
  export { BalanceService, balanceService } from "./service.js";
5
5
  export { balanceAccounts, balanceLedger, balanceRedeemCodes, balanceTopups, } from "./schema.js";
6
6
  export type { BalanceAccount, BalanceCreateRedeemCodeInput, BalanceExtra, BalanceHistoryQuery, BalanceLedgerEntry, BalanceLedgerKind, BalanceServiceOptions, BalanceRedeemCode, BalanceRedeemCodeIssueResult, BalanceRedeemCodeQuery, BalanceRedeemCodeRedeemResult, BalanceRedeemCodeStatus, BalanceTopup, BalanceTopupQuery, BalanceTopupStatus, } from "./types.js";
7
+ export { CREDIT_DECIMAL_PLACES, MICROCREDITS_PER_CREDIT, } from "../types/Amount.js";
8
+ export type { Credits, Microcredits, } from "../types/Amount.js";
7
9
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/balance/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9D,OAAO,EACL,eAAe,EACf,aAAa,EACb,kBAAkB,EAClB,aAAa,GACd,MAAM,aAAa,CAAC;AAErB,YAAY,EACV,cAAc,EACd,4BAA4B,EAC5B,YAAY,EACZ,mBAAmB,EACnB,kBAAkB,EAClB,iBAAiB,EACjB,qBAAqB,EACrB,iBAAiB,EACjB,4BAA4B,EAC5B,sBAAsB,EACtB,6BAA6B,EAC7B,uBAAuB,EACvB,YAAY,EACZ,iBAAiB,EACjB,kBAAkB,GACnB,MAAM,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/balance/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9D,OAAO,EACL,eAAe,EACf,aAAa,EACb,kBAAkB,EAClB,aAAa,GACd,MAAM,aAAa,CAAC;AAErB,YAAY,EACV,cAAc,EACd,4BAA4B,EAC5B,YAAY,EACZ,mBAAmB,EACnB,kBAAkB,EAClB,iBAAiB,EACjB,qBAAqB,EACrB,iBAAiB,EACjB,4BAA4B,EAC5B,sBAAsB,EACtB,6BAA6B,EAC7B,uBAAuB,EACvB,YAAY,EACZ,iBAAiB,EACjB,kBAAkB,GACnB,MAAM,YAAY,CAAC;AAEpB,OAAO,EACL,qBAAqB,EACrB,uBAAuB,GACxB,MAAM,oBAAoB,CAAC;AAC5B,YAAY,EACV,OAAO,EACP,YAAY,GACb,MAAM,oBAAoB,CAAC"}
@@ -3,4 +3,5 @@
3
3
  */
4
4
  export { BalanceService, balanceService } from "./service.js";
5
5
  export { balanceAccounts, balanceLedger, balanceRedeemCodes, balanceTopups, } from "./schema.js";
6
+ export { CREDIT_DECIMAL_PLACES, MICROCREDITS_PER_CREDIT, } from "../types/Amount.js";
6
7
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/balance/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9D,OAAO,EACL,eAAe,EACf,aAAa,EACb,kBAAkB,EAClB,aAAa,GACd,MAAM,aAAa,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/balance/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9D,OAAO,EACL,eAAe,EACf,aAAa,EACb,kBAAkB,EAClB,aAAa,GACd,MAAM,aAAa,CAAC;AAoBrB,OAAO,EACL,qBAAqB,EACrB,uBAAuB,GACxB,MAAM,oBAAoB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../src/balance/routes.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,qBAAqB,EAAuB,MAAM,gBAAgB,CAAC;AACjF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAkEnD;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,cAAc,EAAE,GAAG,EAAE,qBAAqB,GAAG,IAAI,CAoK/F"}
1
+ {"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../src/balance/routes.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,qBAAqB,EAAuB,MAAM,gBAAgB,CAAC;AACjF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AA4EnD;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,cAAc,EAAE,GAAG,EAAE,qBAAqB,GAAG,IAAI,CAqK/F"}
@@ -140,6 +140,7 @@ export function registerBalanceRoutes(service, ctx) {
140
140
  const body = await c.json();
141
141
  return c.jsonResponse(await service.createRedeemCode({
142
142
  amount: Number(body.amount),
143
+ amount_microcredits: body.amount_microcredits,
143
144
  code: body.code,
144
145
  note: body.note,
145
146
  ref: body.ref,
@@ -1 +1 @@
1
- {"version":3,"file":"routes.js","sourceRoot":"","sources":["../../src/balance/routes.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAKH,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAgE3D;;GAEG;AACH,MAAM,UAAU,qBAAqB,CAAC,OAAuB,EAAE,GAA0B;IACvF,GAAG,CAAC,KAAK,CAAC;QACR,MAAM,EAAE,KAAK;QACb,IAAI,EAAE,KAAK;QACX,IAAI,EAAE,CAAC,MAAM,CAAC;QACd,OAAO,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,YAAY,CAAC,MAAM,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;KACxE,CAAC,CAAC;IAEH,GAAG,CAAC,KAAK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C,CAAC;AACL,CAAC;AAED;;GAEG;AACH,SAAS,UAAU,CAAC,GAAwB;IAC1C,OAAO,eAAe,CAAC,GAAG,CAAC,IAAI,EAAE,OAAO,IAAI,EAAE,CAAC,CAAC;AAClD,CAAC"}
@@ -759,7 +759,7 @@ export declare class BalanceService extends InstallableService {
759
759
  dialect: "sqlite";
760
760
  }>;
761
761
  };
762
- private readonly initAmount;
762
+ private readonly initMicrocredits;
763
763
  private readonly unitName;
764
764
  constructor(options?: BalanceServiceOptions);
765
765
  install(ctx: ServiceInstallContext): void;
@@ -775,14 +775,26 @@ export declare class BalanceService extends InstallableService {
775
775
  * 余额不足时会抛出 `402 insufficient balance`。
776
776
  */
777
777
  require(user_id: string, amount: number): Promise<BalanceAccount>;
778
+ /**
779
+ * 检查用户余额是否足够,入参单位为 microcredits。
780
+ */
781
+ requireMicrocredits(user_id: string, amount_microcredits: number): Promise<BalanceAccount>;
778
782
  /**
779
783
  * 给用户加余额,并写入 `add` 流水。
780
784
  */
781
785
  add(user_id: string, amount: number, extra?: BalanceExtra): Promise<BalanceAccount>;
786
+ /**
787
+ * 给用户加余额,入参单位为 microcredits。
788
+ */
789
+ addMicrocredits(user_id: string, amount_microcredits: number, extra?: BalanceExtra): Promise<BalanceAccount>;
782
790
  /**
783
791
  * 给用户扣余额,并写入 `sub` 流水。
784
792
  */
785
793
  sub(user_id: string, amount: number, extra?: BalanceExtra): Promise<BalanceAccount>;
794
+ /**
795
+ * 给用户扣余额,入参单位为 microcredits。
796
+ */
797
+ subMicrocredits(user_id: string, amount_microcredits: number, extra?: BalanceExtra): Promise<BalanceAccount>;
786
798
  /**
787
799
  * 查询某个用户的流水。
788
800
  */
@@ -1 +1 @@
1
- {"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../../src/balance/service.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EACL,kBAAkB,EAElB,KAAK,qBAAqB,EAC3B,MAAM,gBAAgB,CAAC;AAaxB,OAAO,KA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