@wirexapp/card-sdk-web 0.1.0-beta.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/CHANGELOG.md ADDED
@@ -0,0 +1,19 @@
1
+ # @wirexapp/card-sdk-web
2
+
3
+ ## 0.1.0-beta.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 1ff075a: Initial public beta of the Wirex PCI card SDK family: collect (top-up + OCT
8
+ destination), own-card reveal, 3DS step-up, React bindings, and the umbrella
9
+ package — all versioned in lockstep. Card data renders only inside
10
+ Wirex-served iframes; the packages are CHD-free loaders.
11
+
12
+ ### Patch Changes
13
+
14
+ - Updated dependencies [1ff075a]
15
+ - @wirexapp/card-sdk-core@0.1.0-beta.0
16
+ - @wirexapp/card-topup-web@0.1.0-beta.0
17
+ - @wirexapp/card-oct-web@0.1.0-beta.0
18
+ - @wirexapp/card-reveal-web@0.1.0-beta.0
19
+ - @wirexapp/card-3ds-web@0.1.0-beta.0
package/README.md ADDED
@@ -0,0 +1,26 @@
1
+ # @wirexapp/card-sdk-web (umbrella)
2
+
3
+ Everything in one install: re-exports the full API of the capability packages —
4
+ `@wirexapp/card-topup-web`, `@wirexapp/card-oct-web`, `@wirexapp/card-reveal-web`,
5
+ `@wirexapp/card-3ds-web`, `@wirexapp/card-sdk-core` — plus the original
6
+ `createPciSdk(config)` factory that binds `frameOrigin` / `clientId` once and hands
7
+ out element creators.
8
+
9
+ The npm package is a thin, CHD-free loader (mirrors `@stripe/stripe-js`): it mounts
10
+ iframes served by the PCI frame service (`sdk-service/` in this repo) and speaks the
11
+ postMessage protocol. Cardholder data exists only inside those frames.
12
+
13
+ - Choose the **umbrella** when your app uses several capabilities and prefers one
14
+ dependency.
15
+ - Choose the **capability packages** when you want the dependency tree to state
16
+ exactly which card capabilities your app ships (their profile-bound creators also
17
+ make the unused tokenizer unrepresentable in types).
18
+
19
+ Documentation:
20
+
21
+ - Partner integration docs: `partner-docs/` (VitePress site) — umbrella page covers
22
+ `createPciSdk` and the factory↔creator equivalence table.
23
+ - Architecture: `docs/DESIGN.md` (target, bilingual) and `docs/IMPLEMENTATION.md`
24
+ (as built).
25
+ - Running the frame origin locally: `sdk-service/README.md`, or `yarn dev` at the
26
+ repo root (frames on `http://localhost:4114`).
@@ -0,0 +1,26 @@
1
+ /**
2
+ * `@wirexapp/card-sdk-web` — umbrella over the capability packages. Re-exports
3
+ * everything and keeps the original `createPciSdk` factory, so existing
4
+ * integrations (and the PCI frames' type imports) keep working unchanged.
5
+ * New integrations that only need one capability should install
6
+ * `@wirexapp/card-topup-web`, `@wirexapp/card-oct-web` or
7
+ * `@wirexapp/card-reveal-web` directly.
8
+ */
9
+ import { PciCollectElement, PciCollectGroup, type PciCollectElementConfig, type PciCollectGroupConfig, type PciSdkConfig } from '@wirexapp/card-sdk-core';
10
+ import { PciRevealElement, type PciRevealElementConfig } from '@wirexapp/card-reveal-web';
11
+ export * from '@wirexapp/card-3ds-web';
12
+ export * from '@wirexapp/card-sdk-core';
13
+ export * from '@wirexapp/card-oct-web';
14
+ export * from '@wirexapp/card-reveal-web';
15
+ export * from '@wirexapp/card-topup-web';
16
+ export interface PciSdk {
17
+ /** Single-form (combined) Collect element — all fields in one iframe. */
18
+ createCollectElement: (config: PciCollectElementConfig) => PciCollectElement;
19
+ /** Per-field (split) Collect group — one iframe per field, host-arranged. */
20
+ createCollectGroup: (config: PciCollectGroupConfig) => PciCollectGroup;
21
+ createRevealElement: (config: PciRevealElementConfig) => PciRevealElement;
22
+ }
23
+ /** Entry point. Mirrors the vendor pattern (Stripe/VGS): the npm package is a
24
+ * thin, CHD-free loader; everything sensitive lives in the frames. */
25
+ export declare const createPciSdk: (config: PciSdkConfig) => PciSdk;
26
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAGL,iBAAiB,EACjB,eAAe,EACf,KAAK,uBAAuB,EAC5B,KAAK,qBAAqB,EAC1B,KAAK,YAAY,EAClB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,gBAAgB,EAAE,KAAK,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AAE1F,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC;AACvC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,0BAA0B,CAAC;AAEzC,MAAM,WAAW,MAAM;IACrB,yEAAyE;IACzE,oBAAoB,EAAE,CAAC,MAAM,EAAE,uBAAuB,KAAK,iBAAiB,CAAC;IAC7E,6EAA6E;IAC7E,kBAAkB,EAAE,CAAC,MAAM,EAAE,qBAAqB,KAAK,eAAe,CAAC;IACvE,mBAAmB,EAAE,CAAC,MAAM,EAAE,sBAAsB,KAAK,gBAAgB,CAAC;CAC3E;AAED;uEACuE;AACvE,eAAO,MAAM,YAAY,GAAI,QAAQ,YAAY,KAAG,MAUnD,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,26 @@
1
+ /**
2
+ * `@wirexapp/card-sdk-web` — umbrella over the capability packages. Re-exports
3
+ * everything and keeps the original `createPciSdk` factory, so existing
4
+ * integrations (and the PCI frames' type imports) keep working unchanged.
5
+ * New integrations that only need one capability should install
6
+ * `@wirexapp/card-topup-web`, `@wirexapp/card-oct-web` or
7
+ * `@wirexapp/card-reveal-web` directly.
8
+ */
9
+ import { assertFrameOrigin, buildFrameUrl, PciCollectElement, PciCollectGroup, } from '@wirexapp/card-sdk-core';
10
+ import { PciRevealElement } from '@wirexapp/card-reveal-web';
11
+ export * from '@wirexapp/card-3ds-web';
12
+ export * from '@wirexapp/card-sdk-core';
13
+ export * from '@wirexapp/card-oct-web';
14
+ export * from '@wirexapp/card-reveal-web';
15
+ export * from '@wirexapp/card-topup-web';
16
+ /** Entry point. Mirrors the vendor pattern (Stripe/VGS): the npm package is a
17
+ * thin, CHD-free loader; everything sensitive lives in the frames. */
18
+ export const createPciSdk = (config) => {
19
+ assertFrameOrigin(config);
20
+ return {
21
+ createCollectElement: elementConfig => new PciCollectElement(buildFrameUrl(config, 'collect'), elementConfig),
22
+ createCollectGroup: groupConfig => new PciCollectGroup(buildFrameUrl(config, 'collect-field'), groupConfig),
23
+ createRevealElement: elementConfig => new PciRevealElement(buildFrameUrl(config, 'reveal'), elementConfig),
24
+ };
25
+ };
26
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EACL,iBAAiB,EACjB,aAAa,EACb,iBAAiB,EACjB,eAAe,GAIhB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,gBAAgB,EAA+B,MAAM,2BAA2B,CAAC;AAE1F,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC;AACvC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,0BAA0B,CAAC;AAUzC;uEACuE;AACvE,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,MAAoB,EAAU,EAAE;IAC3D,iBAAiB,CAAC,MAAM,CAAC,CAAC;IAC1B,OAAO;QACL,oBAAoB,EAAE,aAAa,CAAC,EAAE,CACpC,IAAI,iBAAiB,CAAC,aAAa,CAAC,MAAM,EAAE,SAAS,CAAC,EAAE,aAAa,CAAC;QACxE,kBAAkB,EAAE,WAAW,CAAC,EAAE,CAChC,IAAI,eAAe,CAAC,aAAa,CAAC,MAAM,EAAE,eAAe,CAAC,EAAE,WAAW,CAAC;QAC1E,mBAAmB,EAAE,aAAa,CAAC,EAAE,CACnC,IAAI,gBAAgB,CAAC,aAAa,CAAC,MAAM,EAAE,QAAQ,CAAC,EAAE,aAAa,CAAC;KACvE,CAAC;AACJ,CAAC,CAAC"}
package/package.json ADDED
@@ -0,0 +1,46 @@
1
+ {
2
+ "name": "@wirexapp/card-sdk-web",
3
+ "version": "0.1.0-beta.0",
4
+ "type": "module",
5
+ "description": "Umbrella over the Wirex PCI card SDK capability packages (topup, oct, reveal) with the createPciSdk factory. CHD-free loader.",
6
+ "license": "UNLICENSED",
7
+ "main": "./dist/index.js",
8
+ "module": "./dist/index.js",
9
+ "types": "./dist/index.d.ts",
10
+ "exports": {
11
+ ".": {
12
+ "types": "./dist/index.d.ts",
13
+ "import": "./dist/index.js"
14
+ }
15
+ },
16
+ "publishConfig": {
17
+ "access": "public",
18
+ "main": "./dist/index.js",
19
+ "module": "./dist/index.js",
20
+ "types": "./dist/index.d.ts",
21
+ "exports": {
22
+ ".": {
23
+ "types": "./dist/index.d.ts",
24
+ "import": "./dist/index.js"
25
+ }
26
+ }
27
+ },
28
+ "files": [
29
+ "dist",
30
+ "README.md"
31
+ ],
32
+ "scripts": {
33
+ "build": "tsc -p tsconfig.build.json",
34
+ "dev": "tsc -p tsconfig.build.json --watch",
35
+ "clean": "rm -rf dist",
36
+ "typecheck": "yarn run -T tsc --noEmit",
37
+ "prepublishOnly": "yarn clean && yarn build"
38
+ },
39
+ "dependencies": {
40
+ "@wirexapp/card-3ds-web": "0.1.0-beta.0",
41
+ "@wirexapp/card-oct-web": "0.1.0-beta.0",
42
+ "@wirexapp/card-reveal-web": "0.1.0-beta.0",
43
+ "@wirexapp/card-sdk-core": "0.1.0-beta.0",
44
+ "@wirexapp/card-topup-web": "0.1.0-beta.0"
45
+ }
46
+ }