@kard-financial/sdk 3.2.2 → 4.1.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.
@@ -43,8 +43,8 @@ function normalizeClientOptions(options) {
43
43
  const headers = (0, headers_js_1.mergeHeaders)({
44
44
  "X-Fern-Language": "JavaScript",
45
45
  "X-Fern-SDK-Name": "@kard-financial/sdk",
46
- "X-Fern-SDK-Version": "3.0.0",
47
- "User-Agent": "@kard-financial/sdk/3.0.0",
46
+ "X-Fern-SDK-Version": "4.1.0",
47
+ "User-Agent": "@kard-financial/sdk/4.1.0",
48
48
  "X-Fern-Runtime": core.RUNTIME.type,
49
49
  "X-Fern-Runtime-Version": core.RUNTIME.version,
50
50
  }, options === null || options === void 0 ? void 0 : options.headers);
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "3.0.0";
1
+ export declare const SDK_VERSION = "4.1.0";
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SDK_VERSION = void 0;
4
- exports.SDK_VERSION = "3.0.0";
4
+ exports.SDK_VERSION = "4.1.0";
@@ -6,8 +6,8 @@ export function normalizeClientOptions(options) {
6
6
  const headers = mergeHeaders({
7
7
  "X-Fern-Language": "JavaScript",
8
8
  "X-Fern-SDK-Name": "@kard-financial/sdk",
9
- "X-Fern-SDK-Version": "3.0.0",
10
- "User-Agent": "@kard-financial/sdk/3.0.0",
9
+ "X-Fern-SDK-Version": "4.1.0",
10
+ "User-Agent": "@kard-financial/sdk/4.1.0",
11
11
  "X-Fern-Runtime": core.RUNTIME.type,
12
12
  "X-Fern-Runtime-Version": core.RUNTIME.version,
13
13
  }, options === null || options === void 0 ? void 0 : options.headers);
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "3.0.0";
1
+ export declare const SDK_VERSION = "4.1.0";
@@ -1 +1 @@
1
- export const SDK_VERSION = "3.0.0";
1
+ export const SDK_VERSION = "4.1.0";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kard-financial/sdk",
3
- "version": "3.2.2",
3
+ "version": "4.1.0",
4
4
  "private": false,
5
5
  "repository": "github:KardFinancial/kard-node-sdk",
6
6
  "type": "commonjs",
@@ -21,7 +21,7 @@
21
21
  "default": "./dist/cjs/index.js"
22
22
  },
23
23
  "./package.json": "./package.json",
24
- "./helpers/hem": {
24
+ "./src/helpers/hem.ts": {
25
25
  "types": "./dist/cjs/helpers/hem.d.ts",
26
26
  "import": {
27
27
  "types": "./dist/esm/helpers/hem.d.mts",
@@ -30,8 +30,7 @@
30
30
  "require": {
31
31
  "types": "./dist/cjs/helpers/hem.d.ts",
32
32
  "default": "./dist/cjs/helpers/hem.js"
33
- },
34
- "default": "./dist/cjs/helpers/hem.js"
33
+ }
35
34
  }
36
35
  },
37
36
  "files": [
@@ -72,12 +71,5 @@
72
71
  "engines": {
73
72
  "node": ">=18.0.0"
74
73
  },
75
- "sideEffects": false,
76
- "typesVersions": {
77
- "*": {
78
- "helpers/hem": [
79
- "dist/cjs/helpers/hem.d.ts"
80
- ]
81
- }
82
- }
74
+ "sideEffects": false
83
75
  }
package/reference.md CHANGED
@@ -1884,64 +1884,3 @@ await client.users.uploads.update("organization-123", "user-123", "upload-123",
1884
1884
  </dd>
1885
1885
  </dl>
1886
1886
  </details>
1887
-
1888
- ## Custom Helper Functions
1889
- ### hem
1890
-
1891
- **Import:** `import { generateHEM } from "@kard-financial/sdk/helpers/hem";`
1892
-
1893
- <details><summary><code><a href="/src/helpers/hem.ts">generateHEM(raw: string): string</a></code></summary>
1894
- <dl>
1895
- <dd>
1896
-
1897
- #### 📝 Description
1898
-
1899
- <dl>
1900
- <dd>
1901
-
1902
- Normalize an email address for Hashed Email (HEM) generation.
1903
- Follows UID2/LiveRamp industry standards:
1904
- - Remove all whitespace
1905
- - Lowercase
1906
- - Gmail/Googlemail only: remove dots from local-part, strip '+' suffix
1907
- - Canonicalize googlemail.com → gmail.com
1908
- /
1909
- function normalizeEmail(raw: string): string {
1910
- const email = raw.replace(/\s/g, "").toLowerCase();
1911
- const atIndex = email.indexOf("@");
1912
- if (atIndex < 1 || atIndex !== email.lastIndexOf("@") || atIndex === email.length - 1) {
1913
- throw new TypeError(`Invalid email address: ${JSON.stringify(raw)}`);
1914
- }
1915
- const localPart = email.slice(0, atIndex);
1916
- const domain = email.slice(atIndex + 1);
1917
- if (GMAIL_DOMAINS.has(domain)) {
1918
- const base = localPart.split("+")[0].replace(/\./g, "");
1919
- return `${base}@gmail.com`;
1920
- }
1921
- return `${localPart}@${domain}`;
1922
- }
1923
- /**
1924
- Generate a Hashed Email (HEM) from a raw email address.
1925
- Returns the lowercase hex SHA-256 digest of the normalized, UTF-8-encoded email.
1926
-
1927
- </dd>
1928
- </dl>
1929
-
1930
- #### 🔌 Usage
1931
-
1932
- <dl>
1933
- <dd>
1934
-
1935
- ```typescript
1936
- import { generateHEM } from "@kard-financial/sdk/helpers/hem";
1937
-
1938
- const result = generateHEM(/* raw: string */);
1939
- ```
1940
-
1941
- </dd>
1942
- </dl>
1943
-
1944
- </dd>
1945
- </dl>
1946
- </details>
1947
-