@kard-financial/sdk 3.1.0 → 3.2.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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kard-financial/sdk",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.2.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"repository": "github:KardFinancial/kard-node-sdk",
|
|
6
6
|
"type": "commonjs",
|
|
@@ -20,7 +20,19 @@
|
|
|
20
20
|
},
|
|
21
21
|
"default": "./dist/cjs/index.js"
|
|
22
22
|
},
|
|
23
|
-
"./package.json": "./package.json"
|
|
23
|
+
"./package.json": "./package.json",
|
|
24
|
+
"./helpers/hem": {
|
|
25
|
+
"types": "./dist/cjs/helpers/hem.d.ts",
|
|
26
|
+
"import": {
|
|
27
|
+
"types": "./dist/esm/helpers/hem.d.mts",
|
|
28
|
+
"default": "./dist/esm/helpers/hem.mjs"
|
|
29
|
+
},
|
|
30
|
+
"require": {
|
|
31
|
+
"types": "./dist/cjs/helpers/hem.d.ts",
|
|
32
|
+
"default": "./dist/cjs/helpers/hem.js"
|
|
33
|
+
},
|
|
34
|
+
"default": "./dist/cjs/helpers/hem.js"
|
|
35
|
+
}
|
|
24
36
|
},
|
|
25
37
|
"files": [
|
|
26
38
|
"dist",
|
package/reference.md
CHANGED
|
@@ -1884,3 +1884,79 @@ 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 { normalizeEmail, generateHEM } from "@kard-financial/sdk/helpers/hem";`
|
|
1892
|
+
|
|
1893
|
+
<details><summary><code><a href="/src/helpers/hem.ts">normalizeEmail(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
|
+
</dd>
|
|
1910
|
+
</dl>
|
|
1911
|
+
|
|
1912
|
+
#### 🔌 Usage
|
|
1913
|
+
|
|
1914
|
+
<dl>
|
|
1915
|
+
<dd>
|
|
1916
|
+
|
|
1917
|
+
```typescript
|
|
1918
|
+
import { normalizeEmail } from "@kard-financial/sdk/helpers/hem";
|
|
1919
|
+
|
|
1920
|
+
const result = normalizeEmail(/* raw: string */);
|
|
1921
|
+
```
|
|
1922
|
+
|
|
1923
|
+
</dd>
|
|
1924
|
+
</dl>
|
|
1925
|
+
|
|
1926
|
+
</dd>
|
|
1927
|
+
</dl>
|
|
1928
|
+
</details>
|
|
1929
|
+
|
|
1930
|
+
<details><summary><code><a href="/src/helpers/hem.ts">generateHEM(raw: string): string</a></code></summary>
|
|
1931
|
+
<dl>
|
|
1932
|
+
<dd>
|
|
1933
|
+
|
|
1934
|
+
#### 📝 Description
|
|
1935
|
+
|
|
1936
|
+
<dl>
|
|
1937
|
+
<dd>
|
|
1938
|
+
|
|
1939
|
+
Generate a Hashed Email (HEM) from a raw email address.
|
|
1940
|
+
Returns the lowercase hex SHA-256 digest of the normalized, UTF-8-encoded email.
|
|
1941
|
+
|
|
1942
|
+
</dd>
|
|
1943
|
+
</dl>
|
|
1944
|
+
|
|
1945
|
+
#### 🔌 Usage
|
|
1946
|
+
|
|
1947
|
+
<dl>
|
|
1948
|
+
<dd>
|
|
1949
|
+
|
|
1950
|
+
```typescript
|
|
1951
|
+
import { generateHEM } from "@kard-financial/sdk/helpers/hem";
|
|
1952
|
+
|
|
1953
|
+
const result = generateHEM(/* raw: string */);
|
|
1954
|
+
```
|
|
1955
|
+
|
|
1956
|
+
</dd>
|
|
1957
|
+
</dl>
|
|
1958
|
+
|
|
1959
|
+
</dd>
|
|
1960
|
+
</dl>
|
|
1961
|
+
</details>
|
|
1962
|
+
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|