@soltech/fluid-common 1.3.6 → 1.4.1

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 CHANGED
@@ -18,7 +18,18 @@ Read this entire file before every task.
18
18
  ## Build, Dev & Validation
19
19
  - Build: `npm run build`
20
20
  - Lint: `npm run lint`
21
- - Publish: `npm run pub` (build + publish + push)
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.
22
33
 
23
34
  Before final proposal on code changes:
24
35
  1. Run `npm run lint`.
package/lib/index.d.ts CHANGED
@@ -20,6 +20,11 @@ export declare enum PaymentType {
20
20
  CRYPTO = "Crypto",
21
21
  EWALLET = "EWallet"
22
22
  }
23
+ export declare enum WindowRedirectType {
24
+ POPUP_WINDOW = "popupWindow",
25
+ BROWSER_TAB = "browserTab",
26
+ NONE = "none"
27
+ }
23
28
  export interface WalletRequestBody {
24
29
  payload?: object | string;
25
30
  payloadOptions?: TransactionOptions;
@@ -114,8 +119,7 @@ export interface PaymentMethod {
114
119
  bonusCodes?: string[];
115
120
  instructions?: string;
116
121
  fees?: PaymentMethodFees;
117
- popupWindowRedirect: boolean;
118
- windowRedirect: boolean;
122
+ windowRedirectType?: WindowRedirectType;
119
123
  voucherAmounts?: number[];
120
124
  depositHandledByHostSite?: boolean;
121
125
  withdrawalHandledByHostSite?: boolean;
package/lib/index.js CHANGED
@@ -24,6 +24,12 @@ export var PaymentType;
24
24
  PaymentType["CRYPTO"] = "Crypto";
25
25
  PaymentType["EWALLET"] = "EWallet";
26
26
  })(PaymentType || (PaymentType = {}));
27
+ export var WindowRedirectType;
28
+ (function (WindowRedirectType) {
29
+ WindowRedirectType["POPUP_WINDOW"] = "popupWindow";
30
+ WindowRedirectType["BROWSER_TAB"] = "browserTab";
31
+ WindowRedirectType["NONE"] = "none";
32
+ })(WindowRedirectType || (WindowRedirectType = {}));
27
33
  export var EncryptionType;
28
34
  (function (EncryptionType) {
29
35
  EncryptionType["NO_ENCRYPTION"] = "NO_ENCRYPTION";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@soltech/fluid-common",
3
- "version": "1.3.6",
3
+ "version": "1.4.1",
4
4
  "type": "module",
5
5
  "description": "Fluid frontend, API and AI common interfaces & enums",
6
6
  "main": "lib/index.js",
package/src/index.ts CHANGED
@@ -24,6 +24,12 @@ export enum PaymentType {
24
24
  EWALLET = 'EWallet'
25
25
  }
26
26
 
27
+ export enum WindowRedirectType {
28
+ POPUP_WINDOW = 'popupWindow',
29
+ BROWSER_TAB = 'browserTab',
30
+ NONE = 'none'
31
+ }
32
+
27
33
  export interface WalletRequestBody {
28
34
  payload?: object | string;
29
35
  payloadOptions?: TransactionOptions;
@@ -128,8 +134,7 @@ export interface PaymentMethod {
128
134
  bonusCodes?: string[];
129
135
  instructions?: string;
130
136
  fees?: PaymentMethodFees;
131
- popupWindowRedirect: boolean;
132
- windowRedirect: boolean;
137
+ windowRedirectType?: WindowRedirectType;
133
138
  voucherAmounts?: number[];
134
139
  depositHandledByHostSite?: boolean;
135
140
  withdrawalHandledByHostSite?: boolean;