@odus/checkout 1.8.2 → 1.9.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.
Files changed (26) hide show
  1. package/dist/checkout.es.js +74 -58
  2. package/dist/components/checkout/form/Form.d.ts +10 -1
  3. package/dist/components/checkout/form/Form.d.ts.map +1 -1
  4. package/dist/components/checkout/form/FormComponentManager.d.ts +6 -2
  5. package/dist/components/checkout/form/FormComponentManager.d.ts.map +1 -1
  6. package/dist/components/checkout/form/PaymentMethods.d.ts +5 -1
  7. package/dist/components/checkout/form/PaymentMethods.d.ts.map +1 -1
  8. package/dist/components/payment-methods/applePay/ApplePayButton.d.ts +9 -1
  9. package/dist/components/payment-methods/applePay/ApplePayButton.d.ts.map +1 -1
  10. package/dist/core/api/CheckoutAPI.service.d.ts.map +1 -1
  11. package/dist/elements/ApplePayElement.d.ts +5 -1
  12. package/dist/elements/ApplePayElement.d.ts.map +1 -1
  13. package/dist/elements/OdusElements.d.ts +26 -0
  14. package/dist/elements/OdusElements.d.ts.map +1 -1
  15. package/dist/elements/PhoneElement.d.ts.map +1 -1
  16. package/dist/elements.es.js +240 -198
  17. package/dist/services/checkout/Checkout.service.d.ts +12 -0
  18. package/dist/services/checkout/Checkout.service.d.ts.map +1 -1
  19. package/dist/services/checkout/CheckoutForm.service.d.ts +1 -1
  20. package/dist/services/checkout/CheckoutForm.service.d.ts.map +1 -1
  21. package/dist/shared.js +516 -511
  22. package/dist/types/telemetry/TelemetryEvents.type.d.ts +5 -0
  23. package/dist/types/telemetry/TelemetryEvents.type.d.ts.map +1 -1
  24. package/dist/utils/helpers/readApiMessage.util.d.ts +7 -0
  25. package/dist/utils/helpers/readApiMessage.util.d.ts.map +1 -0
  26. package/package.json +8 -4
@@ -1,6 +1,7 @@
1
1
  export declare const CheckoutEvents: {
2
2
  readonly CHECKOUT_INITIALIZED: "checkout.initialized";
3
3
  readonly CHECKOUT_MOUNTED: "checkout.mounted";
4
+ readonly CHECKOUT_MOUNT_FAILED: "checkout.mount.failed";
4
5
  readonly CHECKOUT_UNMOUNTED: "checkout.unmounted";
5
6
  readonly PAYMENT_ASSOCIATED: "payment.associated";
6
7
  readonly PAYMENT_ASSOCIATION_FAILED: "payment.association.failed";
@@ -31,6 +32,10 @@ export type CheckoutInitializedAttributes = {
31
32
  export type CheckoutMountedAttributes = {
32
33
  container_id: string;
33
34
  };
35
+ export type CheckoutMountFailedAttributes = {
36
+ container_id: string;
37
+ error_message: string;
38
+ };
34
39
  export type PaymentAssociatedAttributes = {
35
40
  payment_id: string;
36
41
  currency: string;
@@ -1 +1 @@
1
- {"version":3,"file":"TelemetryEvents.type.d.ts","sourceRoot":"","sources":["../../../src/types/telemetry/TelemetryEvents.type.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;CA4BjB,CAAC;AAEX,MAAM,MAAM,iBAAiB,GAC3B,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,OAAO,cAAc,CAAC,CAAC;AAMvD,eAAO,MAAM,oBAAoB;;;;;;CAMvB,CAAC;AAEX,MAAM,MAAM,uBAAuB,GACjC,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,OAAO,oBAAoB,CAAC,CAAC;AAMnE,MAAM,MAAM,6BAA6B,GAAG;IAC1C,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,yBAAyB,GAAG;IACtC,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,2BAA2B,GAAG;IACxC,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG;IACpC,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG;IACpC,UAAU,EAAE,MAAM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,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG;IACpC,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG;IACpC,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF,MAAM,MAAM,+BAA+B,GAAG;IAC5C,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,yBAAyB,GAAG;IACtC,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,yBAAyB,GAAG;IACtC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B,CAAC"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Reads the readable text out of an API error body. The API declares `message`
3
+ * as a string, but a validation failure answers with an array of them, so both
4
+ * shapes reach here and neither may be indexed blindly.
5
+ */
6
+ export declare const readApiMessage: (body: unknown) => string | undefined;
7
+ //# sourceMappingURL=readApiMessage.util.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"readApiMessage.util.d.ts","sourceRoot":"","sources":["../../../src/utils/helpers/readApiMessage.util.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,eAAO,MAAM,cAAc,GAAI,MAAM,OAAO,KAAG,MAAM,GAAG,SAYvD,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@odus/checkout",
3
- "version": "1.8.2",
3
+ "version": "1.9.1",
4
4
  "displayName": "Odus Checkout SDK",
5
5
  "keywords": [
6
6
  "odus",
@@ -43,6 +43,7 @@
43
43
  },
44
44
  "test": {
45
45
  "cache": true,
46
+ "// inputs": "`GITHUB_ACTIONS` is an input because vitest.config.ts enables coverage only when it is set. Without it a local run and a CI run hash identically, so Nx could replay a cached result carrying no coverage report and the ratchet in ci.yaml would find no coverage-summary.json — see #4390.",
46
47
  "inputs": [
47
48
  "default",
48
49
  "^production",
@@ -50,16 +51,19 @@
50
51
  "externalDependencies": [
51
52
  "vitest"
52
53
  ]
54
+ },
55
+ {
56
+ "env": "GITHUB_ACTIONS"
53
57
  }
54
58
  ],
55
59
  "outputs": [
56
- "{projectRoot}/coverage"
60
+ "{projectRoot}/test-output/vitest/coverage"
57
61
  ],
58
62
  "executor": "@nx/vitest:test",
63
+ "// options": "Do not add a `reportsDirectory` option here: the executor would override the one in vitest.config.ts, so a direct vitest run and an Nx run would write two different directories and an Nx cache replay would delete a directory a live run is using — see #4387.",
59
64
  "options": {
60
65
  "passWithNoTests": false,
61
- "reportsDirectory": "{workspaceRoot}/coverage/{projectRoot}",
62
- "config": "{projectRoot}/vitest.config.ts"
66
+ "configFile": "{projectRoot}/vitest.config.ts"
63
67
  }
64
68
  },
65
69
  "build": {