@soltech/fluid-common 1.4.2 → 1.4.4
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/AGENTS.md +18 -1
- package/lib/index.d.ts +11 -3
- package/lib/index.js +7 -0
- package/package.json +1 -1
- package/src/index.ts +13 -3
- package/.claude/settings.local.json +0 -7
package/AGENTS.md
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
Read this entire file before every task.
|
|
4
4
|
|
|
5
5
|
## Agent Rules & Safety
|
|
6
|
+
- Never edit any files when the current git branch is `main` — always work on a feature branch. Run `git branch --show-current` to confirm before making any changes.
|
|
6
7
|
- Never touch `.env*`, `certs/` or any file containing secrets/credentials.
|
|
7
8
|
- Never introduce new dependencies without asking first.
|
|
8
9
|
- Never rewrite large parts of the codebase unless explicitly requested.
|
|
@@ -17,7 +18,18 @@ Read this entire file before every task.
|
|
|
17
18
|
## Build, Dev & Validation
|
|
18
19
|
- Build: `npm run build`
|
|
19
20
|
- Lint: `npm run lint`
|
|
20
|
-
- Publish:
|
|
21
|
+
- Publish: see Publishing Flow below
|
|
22
|
+
|
|
23
|
+
### Publishing Flow
|
|
24
|
+
The correct sequence before publishing a new version:
|
|
25
|
+
1. Make all code changes to `src/index.ts`.
|
|
26
|
+
2. Bump `version` in `package.json`.
|
|
27
|
+
3. Run `npm i` (updates `package-lock.json`).
|
|
28
|
+
4. Commit all changes (`src/index.ts`, `package.json`, `package-lock.json`).
|
|
29
|
+
5. Push the commit: `git push`.
|
|
30
|
+
6. Publish to npm: `npm publish` (this runs `npm run build` first via the `pub` script, or run `npm run build && npm publish` directly).
|
|
31
|
+
|
|
32
|
+
Do **not** use `npm run pub` as a single command — it pushes *after* publishing, which means npm gets the package before git has a clean commit.
|
|
21
33
|
|
|
22
34
|
Before final proposal on code changes:
|
|
23
35
|
1. Run `npm run lint`.
|
|
@@ -41,3 +53,8 @@ When creating PRs, always include a Shortcut ticket reference in the PR body usi
|
|
|
41
53
|
```
|
|
42
54
|
[sc-17649](https://app.shortcut.com/soltech/story/17649/ticket-title-slug)
|
|
43
55
|
```
|
|
56
|
+
|
|
57
|
+
### PR description scope
|
|
58
|
+
|
|
59
|
+
- The PR description must reflect **all changes in the branch**, not just the most recent commit. Run `git log main..HEAD` and review the full diff before writing or updating the description.
|
|
60
|
+
- When a ticket spans multiple repos (e.g. a type/enum change here in `fluid-common` that also requires updates in `fluid-api`, `fluid-widget`, or `fluid-payments`), list the related repos and their PRs in the description so reviewers have the full picture. Name each repo, briefly describe what changed, and cross-link the corresponding PRs.
|
package/lib/index.d.ts
CHANGED
|
@@ -18,7 +18,13 @@ export declare enum PaymentType {
|
|
|
18
18
|
BANK_TRANSFER = "BankTransfer",
|
|
19
19
|
CREDIT_CARD = "CreditCard",
|
|
20
20
|
CRYPTO = "Crypto",
|
|
21
|
-
EWALLET = "EWallet"
|
|
21
|
+
EWALLET = "EWallet",
|
|
22
|
+
VOUCHER = "Voucher"
|
|
23
|
+
}
|
|
24
|
+
export declare enum WindowRedirectType {
|
|
25
|
+
POPUP_WINDOW = "popupWindow",
|
|
26
|
+
BROWSER_TAB = "browserTab",
|
|
27
|
+
NONE = "none"
|
|
22
28
|
}
|
|
23
29
|
export interface WalletRequestBody {
|
|
24
30
|
payload?: object | string;
|
|
@@ -68,7 +74,6 @@ export interface WalletConfig {
|
|
|
68
74
|
};
|
|
69
75
|
withdrawalInFiatCurrency: boolean;
|
|
70
76
|
banner?: Banner;
|
|
71
|
-
manualBonusCodesEnabled: boolean;
|
|
72
77
|
}
|
|
73
78
|
export interface Promotion {
|
|
74
79
|
title: string;
|
|
@@ -115,7 +120,7 @@ export interface PaymentMethod {
|
|
|
115
120
|
bonusCodes?: string[];
|
|
116
121
|
instructions?: string;
|
|
117
122
|
fees?: PaymentMethodFees;
|
|
118
|
-
|
|
123
|
+
windowRedirectType?: WindowRedirectType;
|
|
119
124
|
voucherAmounts?: number[];
|
|
120
125
|
depositHandledByHostSite?: boolean;
|
|
121
126
|
withdrawalHandledByHostSite?: boolean;
|
|
@@ -231,6 +236,9 @@ export interface EWalletTransactionParams extends TransactionParams {
|
|
|
231
236
|
beneficiaryName?: string;
|
|
232
237
|
userAccountId?: string;
|
|
233
238
|
}
|
|
239
|
+
export interface VoucherTransactionParams extends TransactionParams {
|
|
240
|
+
[key: string]: string | number | undefined;
|
|
241
|
+
}
|
|
234
242
|
export interface TransactionOptions {
|
|
235
243
|
bonusCode?: string;
|
|
236
244
|
activityId?: string;
|
package/lib/index.js
CHANGED
|
@@ -23,7 +23,14 @@ export var PaymentType;
|
|
|
23
23
|
PaymentType["CREDIT_CARD"] = "CreditCard";
|
|
24
24
|
PaymentType["CRYPTO"] = "Crypto";
|
|
25
25
|
PaymentType["EWALLET"] = "EWallet";
|
|
26
|
+
PaymentType["VOUCHER"] = "Voucher";
|
|
26
27
|
})(PaymentType || (PaymentType = {}));
|
|
28
|
+
export var WindowRedirectType;
|
|
29
|
+
(function (WindowRedirectType) {
|
|
30
|
+
WindowRedirectType["POPUP_WINDOW"] = "popupWindow";
|
|
31
|
+
WindowRedirectType["BROWSER_TAB"] = "browserTab";
|
|
32
|
+
WindowRedirectType["NONE"] = "none";
|
|
33
|
+
})(WindowRedirectType || (WindowRedirectType = {}));
|
|
27
34
|
export var EncryptionType;
|
|
28
35
|
(function (EncryptionType) {
|
|
29
36
|
EncryptionType["NO_ENCRYPTION"] = "NO_ENCRYPTION";
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -21,7 +21,14 @@ export enum PaymentType {
|
|
|
21
21
|
BANK_TRANSFER = 'BankTransfer',
|
|
22
22
|
CREDIT_CARD = 'CreditCard',
|
|
23
23
|
CRYPTO = 'Crypto',
|
|
24
|
-
EWALLET = 'EWallet'
|
|
24
|
+
EWALLET = 'EWallet',
|
|
25
|
+
VOUCHER = 'Voucher'
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export enum WindowRedirectType {
|
|
29
|
+
POPUP_WINDOW = 'popupWindow',
|
|
30
|
+
BROWSER_TAB = 'browserTab',
|
|
31
|
+
NONE = 'none'
|
|
25
32
|
}
|
|
26
33
|
|
|
27
34
|
export interface WalletRequestBody {
|
|
@@ -75,7 +82,6 @@ export interface WalletConfig {
|
|
|
75
82
|
},
|
|
76
83
|
withdrawalInFiatCurrency: boolean;
|
|
77
84
|
banner?: Banner;
|
|
78
|
-
manualBonusCodesEnabled: boolean;
|
|
79
85
|
}
|
|
80
86
|
|
|
81
87
|
export interface Promotion {
|
|
@@ -129,7 +135,7 @@ export interface PaymentMethod {
|
|
|
129
135
|
bonusCodes?: string[];
|
|
130
136
|
instructions?: string;
|
|
131
137
|
fees?: PaymentMethodFees;
|
|
132
|
-
|
|
138
|
+
windowRedirectType?: WindowRedirectType;
|
|
133
139
|
voucherAmounts?: number[];
|
|
134
140
|
depositHandledByHostSite?: boolean;
|
|
135
141
|
withdrawalHandledByHostSite?: boolean;
|
|
@@ -260,6 +266,10 @@ export interface EWalletTransactionParams extends TransactionParams {
|
|
|
260
266
|
userAccountId?: string;
|
|
261
267
|
}
|
|
262
268
|
|
|
269
|
+
export interface VoucherTransactionParams extends TransactionParams {
|
|
270
|
+
[key: string]: string | number | undefined;
|
|
271
|
+
}
|
|
272
|
+
|
|
263
273
|
export interface TransactionOptions {
|
|
264
274
|
bonusCode?: string;
|
|
265
275
|
activityId?: string;
|