@paydock/client-sdk 1.139.0 → 1.140.0-beta

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 (73) hide show
  1. package/README.md +2573 -0
  2. package/bundles/index.cjs +1296 -508
  3. package/bundles/index.cjs.d.ts +1377 -200
  4. package/bundles/index.mjs +1295 -509
  5. package/bundles/index.mjs.d.ts +1377 -200
  6. package/bundles/types/checkout/checkout.d.ts.map +1 -1
  7. package/bundles/types/checkout/v1/instructions/instruction.card_form.show.d.ts.map +1 -1
  8. package/bundles/types/checkout/v3/instructions/instruction.card_form.show.d.ts.map +1 -1
  9. package/bundles/types/checkout/v3/instructions/instruction.payment_methods.show.d.ts.map +1 -1
  10. package/bundles/types/checkout-button/zipmoney/zipmoney-contextual.runner.d.ts +1 -2
  11. package/bundles/types/checkout-button/zipmoney/zipmoney-contextual.runner.d.ts.map +1 -1
  12. package/bundles/types/open-wallets/apple-pay-open-wallet-button.d.ts +70 -0
  13. package/bundles/types/open-wallets/apple-pay-open-wallet-button.d.ts.map +1 -0
  14. package/bundles/types/open-wallets/base/open-wallet-buttons.d.ts +242 -74
  15. package/bundles/types/open-wallets/base/open-wallet-buttons.d.ts.map +1 -1
  16. package/bundles/types/open-wallets/base/open-wallet.service.d.ts +62 -4
  17. package/bundles/types/open-wallets/base/open-wallet.service.d.ts.map +1 -1
  18. package/bundles/types/open-wallets/enum/error-operation.enum.d.ts +15 -0
  19. package/bundles/types/open-wallets/enum/error-operation.enum.d.ts.map +1 -0
  20. package/bundles/types/open-wallets/enum/event.enum.d.ts +11 -3
  21. package/bundles/types/open-wallets/enum/event.enum.d.ts.map +1 -1
  22. package/bundles/types/open-wallets/enum/token-type.enum.d.ts +10 -0
  23. package/bundles/types/open-wallets/enum/token-type.enum.d.ts.map +1 -0
  24. package/bundles/types/open-wallets/google-pay-open-wallet-button.d.ts +65 -0
  25. package/bundles/types/open-wallets/google-pay-open-wallet-button.d.ts.map +1 -0
  26. package/bundles/types/open-wallets/index.d.ts +293 -0
  27. package/bundles/types/open-wallets/index.d.ts.map +1 -1
  28. package/bundles/types/open-wallets/interfaces/events.interface.d.ts +87 -14
  29. package/bundles/types/open-wallets/interfaces/events.interface.d.ts.map +1 -1
  30. package/bundles/types/open-wallets/interfaces/google-pay/google-pay-meta.interface.d.ts +6 -0
  31. package/bundles/types/open-wallets/interfaces/google-pay/google-pay-meta.interface.d.ts.map +1 -1
  32. package/bundles/types/open-wallets/interfaces/index.d.ts +2 -2
  33. package/bundles/types/open-wallets/interfaces/index.d.ts.map +1 -1
  34. package/bundles/types/open-wallets/interfaces/open-wallet-meta.interface.d.ts +12 -0
  35. package/bundles/types/open-wallets/interfaces/open-wallet-meta.interface.d.ts.map +1 -1
  36. package/bundles/types/open-wallets/interfaces/payment-source.interface.d.ts +28 -2
  37. package/bundles/types/open-wallets/interfaces/payment-source.interface.d.ts.map +1 -1
  38. package/bundles/types/open-wallets/services/apple-pay/apple-pay.open-wallet.service.d.ts +27 -2
  39. package/bundles/types/open-wallets/services/apple-pay/apple-pay.open-wallet.service.d.ts.map +1 -1
  40. package/bundles/types/open-wallets/services/google-pay/constants/google-pay.constants.d.ts +9 -0
  41. package/bundles/types/open-wallets/services/google-pay/constants/google-pay.constants.d.ts.map +1 -1
  42. package/bundles/types/open-wallets/services/google-pay/google-pay.open-wallet.service.d.ts +20 -9
  43. package/bundles/types/open-wallets/services/google-pay/google-pay.open-wallet.service.d.ts.map +1 -1
  44. package/bundles/types/open-wallets/services/google-pay/utils/google-pay.utils.d.ts +45 -0
  45. package/bundles/types/open-wallets/services/google-pay/utils/google-pay.utils.d.ts.map +1 -1
  46. package/bundles/types/open-wallets/services/google-pay/utils/index.d.ts +1 -1
  47. package/bundles/types/open-wallets/services/google-pay/utils/index.d.ts.map +1 -1
  48. package/bundles/types/open-wallets/services/google-pay/validation/google-pay.validation.d.ts +13 -0
  49. package/bundles/types/open-wallets/services/google-pay/validation/google-pay.validation.d.ts.map +1 -1
  50. package/bundles/types/open-wallets/types/base-event-data.interface.d.ts +24 -2
  51. package/bundles/types/open-wallets/types/base-event-data.interface.d.ts.map +1 -1
  52. package/bundles/types/open-wallets/types/index.d.ts +2 -1
  53. package/bundles/types/open-wallets/types/index.d.ts.map +1 -1
  54. package/bundles/types/open-wallets/types/on-shipping-address-change-event-data.interface.d.ts +16 -2
  55. package/bundles/types/open-wallets/types/on-shipping-address-change-event-data.interface.d.ts.map +1 -1
  56. package/bundles/types/open-wallets/types/on-shipping-address-change-event-response.interface.d.ts +20 -2
  57. package/bundles/types/open-wallets/types/on-shipping-address-change-event-response.interface.d.ts.map +1 -1
  58. package/bundles/types/open-wallets/types/on-shipping-option-change-event-data.interface.d.ts +13 -2
  59. package/bundles/types/open-wallets/types/on-shipping-option-change-event-data.interface.d.ts.map +1 -1
  60. package/bundles/types/open-wallets/types/on-shipping-option-change-event-response.interface.d.ts +12 -0
  61. package/bundles/types/open-wallets/types/on-shipping-option-change-event-response.interface.d.ts.map +1 -1
  62. package/bundles/types/open-wallets/types/payment-source.type.d.ts +3 -2
  63. package/bundles/types/open-wallets/types/payment-source.type.d.ts.map +1 -1
  64. package/bundles/types/open-wallets/types/shipping-event-to-response.type.d.ts +8 -0
  65. package/bundles/types/open-wallets/types/shipping-event-to-response.type.d.ts.map +1 -1
  66. package/bundles/widget.umd.js +1296 -508
  67. package/bundles/widget.umd.js.d.ts +1377 -200
  68. package/bundles/widget.umd.js.min.d.ts +1377 -200
  69. package/bundles/widget.umd.min.js +1 -1
  70. package/docs/open-wallet-buttons-examples.md +561 -830
  71. package/docs/open-wallet-buttons.md +1652 -0
  72. package/package.json +1 -1
  73. package/slate.md +1673 -0
@@ -1,6 +1,24 @@
1
- import type { IApplePayShippingOption } from '../../components/param';
1
+ import type { IShippingOption } from '../../components/param';
2
+ /**
3
+ * Response object returned by the merchant's `onShippingAddressChange` handler.
4
+ * Used to update the wallet payment sheet with new amounts, shipping options, or errors.
5
+ */
2
6
  export interface OnShippingAddressChangeEventResponse {
7
+ /** The updated payment amount based on the new shipping address. */
3
8
  amount?: number;
4
- shipping_options?: IApplePayShippingOption[];
9
+ /**
10
+ * Updated list of available shipping options for the new address.
11
+ * The first item in the array is used as the default selected option.
12
+ */
13
+ shipping_options?: IShippingOption[];
14
+ /** Optional error to display in the wallet payment sheet if the address is invalid. */
15
+ error?: {
16
+ /** The error code identifying the type of address validation error. */
17
+ code: 'address_error' | 'country_error' | 'state_error' | 'zip_error' | 'shipping_contact_invalid' | 'billing_contact_invalid' | string;
18
+ /** The specific field that caused the error (for Apple Pay error display). */
19
+ field?: 'phone' | 'email' | 'name' | 'phonetic_name' | 'address_lines' | 'locality' | 'postal_code' | 'administrative_area' | 'country' | 'country_code';
20
+ /** A human-readable error message to display to the customer. */
21
+ message?: string;
22
+ };
5
23
  }
6
24
  //# sourceMappingURL=on-shipping-address-change-event-response.interface.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"on-shipping-address-change-event-response.interface.d.ts","sourceRoot":"","sources":["../../../src/open-wallets/types/on-shipping-address-change-event-response.interface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AAEtE,MAAM,WAAW,oCAAoC;IACnD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,gBAAgB,CAAC,EAAE,uBAAuB,EAAE,CAAC;CAC9C"}
1
+ {"version":3,"file":"on-shipping-address-change-event-response.interface.d.ts","sourceRoot":"","sources":["../../../src/open-wallets/types/on-shipping-address-change-event-response.interface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAE9D;;;GAGG;AACH,MAAM,WAAW,oCAAoC;IACnD,oEAAoE;IACpE,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,eAAe,EAAE,CAAC;IACrC,uFAAuF;IACvF,KAAK,CAAC,EAAE;QACN,uEAAuE;QACvE,IAAI,EACA,eAAe,GACf,eAAe,GACf,aAAa,GACb,WAAW,GACX,0BAA0B,GAC1B,yBAAyB,GACzB,MAAM,CAAC;QACX,8EAA8E;QAC9E,KAAK,CAAC,EACF,OAAO,GACP,OAAO,GACP,MAAM,GACN,eAAe,GACf,eAAe,GACf,UAAU,GACV,aAAa,GACb,qBAAqB,GACrB,SAAS,GACT,cAAc,CAAC;QACnB,iEAAiE;QACjE,OAAO,CAAC,EAAE,MAAM,CAAC;KAClB,CAAC;CACH"}
@@ -1,12 +1,23 @@
1
1
  import type { EVENT } from '../enum/event.enum';
2
- import type { BaseEventData } from './base-event-data.interface';
3
- export interface OnShippingOptionChangeEventData extends BaseEventData<ShippingOptionChangeEventData> {
2
+ import type { OpenWalletDataEvent } from './base-event-data.interface';
3
+ /**
4
+ * Event data emitted when the customer selects a shipping option
5
+ * in the wallet payment sheet.
6
+ */
7
+ export interface OnShippingOptionChangeEventData extends OpenWalletDataEvent<ShippingOptionChangeEventData> {
4
8
  event: EVENT.ON_SHIPPING_OPTIONS_CHANGE;
5
9
  }
10
+ /**
11
+ * The selected shipping option data provided by the wallet.
12
+ */
6
13
  interface ShippingOptionChangeEventData {
14
+ /** The unique identifier of the selected shipping option. */
7
15
  shipping_option_id?: string;
16
+ /** The amount associated with the selected shipping option. */
8
17
  amount?: string;
18
+ /** The display label of the selected shipping option. */
9
19
  label?: string;
20
+ /** Additional detail text for the selected shipping option. */
10
21
  detail?: string;
11
22
  }
12
23
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"on-shipping-option-change-event-data.interface.d.ts","sourceRoot":"","sources":["../../../src/open-wallets/types/on-shipping-option-change-event-data.interface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAEjE,MAAM,WAAW,+BACf,SAAQ,aAAa,CAAC,6BAA6B,CAAC;IACpD,KAAK,EAAE,KAAK,CAAC,0BAA0B,CAAC;CACzC;AAED,UAAU,6BAA6B;IACrC,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB"}
1
+ {"version":3,"file":"on-shipping-option-change-event-data.interface.d.ts","sourceRoot":"","sources":["../../../src/open-wallets/types/on-shipping-option-change-event-data.interface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAEvE;;;GAGG;AACH,MAAM,WAAW,+BACf,SAAQ,mBAAmB,CAAC,6BAA6B,CAAC;IAC1D,KAAK,EAAE,KAAK,CAAC,0BAA0B,CAAC;CACzC;AAED;;GAEG;AACH,UAAU,6BAA6B;IACrC,6DAA6D;IAC7D,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,+DAA+D;IAC/D,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,yDAAyD;IACzD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,+DAA+D;IAC/D,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB"}
@@ -1,4 +1,16 @@
1
+ /**
2
+ * Response object returned by the merchant's `onShippingOptionsChange` handler.
3
+ * Used to update the wallet payment sheet with a new total amount.
4
+ */
1
5
  export interface OnShippingOptionChangeEventResponse {
6
+ /** The updated total payment amount based on the selected shipping option. */
2
7
  amount?: number;
8
+ /** Optional error to display in the wallet payment sheet if the option is invalid. */
9
+ error?: {
10
+ /** The error code identifying the type of shipping option error. */
11
+ code: 'method_unavailable' | 'store_unavailable' | string;
12
+ /** A human-readable error message. */
13
+ message?: string;
14
+ };
3
15
  }
4
16
  //# sourceMappingURL=on-shipping-option-change-event-response.interface.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"on-shipping-option-change-event-response.interface.d.ts","sourceRoot":"","sources":["../../../src/open-wallets/types/on-shipping-option-change-event-response.interface.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,mCAAmC;IAClD,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB"}
1
+ {"version":3,"file":"on-shipping-option-change-event-response.interface.d.ts","sourceRoot":"","sources":["../../../src/open-wallets/types/on-shipping-option-change-event-response.interface.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,WAAW,mCAAmC;IAClD,8EAA8E;IAC9E,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,sFAAsF;IACtF,KAAK,CAAC,EAAE;QACN,oEAAoE;QACpE,IAAI,EAAE,oBAAoB,GAAG,mBAAmB,GAAG,MAAM,CAAC;QAC1D,sCAAsC;QACtC,OAAO,CAAC,EAAE,MAAM,CAAC;KAClB,CAAC;CACH"}
@@ -4,10 +4,11 @@ import type { SERVICE_TYPES } from '../../api/api-service-internal';
4
4
  import type { IShippingOption } from '../../components/param';
5
5
  import type { PAYLOAD_FORMAT } from '../enum/payload-format.enum';
6
6
  import type { SERVICE_GROUP } from '../enum/service-group.enum';
7
+ import type { TOKEN_TYPE } from '../enum/token-type.enum';
7
8
  import type { WalletType } from './wallet-type.type';
8
9
  export interface CreateOTTResponse {
9
10
  temp_token: string;
10
- token_type: string;
11
+ token_type: TOKEN_TYPE;
11
12
  }
12
13
  export interface Billing {
13
14
  address_line1: string;
@@ -39,7 +40,7 @@ export interface CreateSessionRequest {
39
40
  service_id: string;
40
41
  session_id: string;
41
42
  request_shipping?: boolean;
42
- store_name?: string;
43
+ store_name: string;
43
44
  }
44
45
  export interface CreateSessionResponse {
45
46
  id: string;
@@ -1 +1 @@
1
- {"version":3,"file":"payment-source.type.d.ts","sourceRoot":"","sources":["../../../src/open-wallets/types/payment-source.type.ts"],"names":[],"mappings":";;AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AACpE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ACnB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,MAAM,CAAC,EAAE,MAAM,CAAC;KACjB,CAAC;CACH"}
@@ -2,5 +2,13 @@ import type { OnShippingAddressChangeEventData } from './on-shipping-address-cha
2
2
  import type { OnShippingAddressChangeEventResponse } from './on-shipping-address-change-event-response.interface';
3
3
  import type { OnShippingOptionChangeEventData } from './on-shipping-option-change-event-data.interface';
4
4
  import type { OnShippingOptionChangeEventResponse } from './on-shipping-option-change-event-response.interface';
5
+ /**
6
+ * Conditional type that maps a shipping event data type to its corresponding response type.
7
+ *
8
+ * - `OnShippingAddressChangeEventData` maps to `OnShippingAddressChangeEventResponse`
9
+ * - `OnShippingOptionChangeEventData` maps to `OnShippingOptionChangeEventResponse`
10
+ *
11
+ * @template T - The shipping event data type.
12
+ */
5
13
  export type ShippingEventToResponse<T> = T extends OnShippingAddressChangeEventData ? OnShippingAddressChangeEventResponse : T extends OnShippingOptionChangeEventData ? OnShippingOptionChangeEventResponse : never;
6
14
  //# sourceMappingURL=shipping-event-to-response.type.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"shipping-event-to-response.type.d.ts","sourceRoot":"","sources":["../../../src/open-wallets/types/shipping-event-to-response.type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,mDAAmD,CAAC;AAC1G,OAAO,KAAK,EAAE,oCAAoC,EAAE,MAAM,uDAAuD,CAAC;AAClH,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,kDAAkD,CAAC;AACxG,OAAO,KAAK,EAAE,mCAAmC,EAAE,MAAM,sDAAsD,CAAC;AAEhH,MAAM,MAAM,uBAAuB,CAAC,CAAC,IAAI,CAAC,SAAS,gCAAgC,GAC/E,oCAAoC,GACpC,CAAC,SAAS,+BAA+B,GACvC,mCAAmC,GACnC,KAAK,CAAC"}
1
+ {"version":3,"file":"shipping-event-to-response.type.d.ts","sourceRoot":"","sources":["../../../src/open-wallets/types/shipping-event-to-response.type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,mDAAmD,CAAC;AAC1G,OAAO,KAAK,EAAE,oCAAoC,EAAE,MAAM,uDAAuD,CAAC;AAClH,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,kDAAkD,CAAC;AACxG,OAAO,KAAK,EAAE,mCAAmC,EAAE,MAAM,sDAAsD,CAAC;AAEhH;;;;;;;GAOG;AACH,MAAM,MAAM,uBAAuB,CAAC,CAAC,IAAI,CAAC,SAAS,gCAAgC,GAC/E,oCAAoC,GACpC,CAAC,SAAS,+BAA+B,GACvC,mCAAmC,GACnC,KAAK,CAAC"}