@wix/auto_sdk_payments_psp-callbacks 1.0.9 → 1.0.10

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 (132) hide show
  1. package/build/cjs/index.d.ts +1 -0
  2. package/build/cjs/index.js +18 -0
  3. package/build/cjs/index.js.map +1 -0
  4. package/build/cjs/index.typings.d.ts +1 -0
  5. package/build/cjs/index.typings.js +18 -0
  6. package/build/cjs/index.typings.js.map +1 -0
  7. package/build/cjs/meta.d.ts +1 -0
  8. package/build/cjs/meta.js +18 -0
  9. package/build/cjs/meta.js.map +1 -0
  10. package/build/cjs/src/payments-psp-v1-provider-platform-event-psp-callbacks.context.d.ts +4 -0
  11. package/build/cjs/src/payments-psp-v1-provider-platform-event-psp-callbacks.context.js +7 -0
  12. package/build/cjs/src/payments-psp-v1-provider-platform-event-psp-callbacks.context.js.map +1 -0
  13. package/build/cjs/src/payments-psp-v1-provider-platform-event-psp-callbacks.http.d.ts +12 -0
  14. package/build/cjs/src/payments-psp-v1-provider-platform-event-psp-callbacks.http.js +350 -0
  15. package/build/cjs/src/payments-psp-v1-provider-platform-event-psp-callbacks.http.js.map +1 -0
  16. package/build/cjs/src/payments-psp-v1-provider-platform-event-psp-callbacks.meta.d.ts +13 -0
  17. package/build/cjs/src/payments-psp-v1-provider-platform-event-psp-callbacks.meta.js +47 -0
  18. package/build/cjs/src/payments-psp-v1-provider-platform-event-psp-callbacks.meta.js.map +1 -0
  19. package/build/cjs/src/payments-psp-v1-provider-platform-event-psp-callbacks.public.d.ts +22 -0
  20. package/build/cjs/src/payments-psp-v1-provider-platform-event-psp-callbacks.public.js +12 -0
  21. package/build/cjs/src/payments-psp-v1-provider-platform-event-psp-callbacks.public.js.map +1 -0
  22. package/build/{internal/payments-psp-v1-provider-platform-event-psp-callbacks.universal-CEQHoEoO.d.mts → cjs/src/payments-psp-v1-provider-platform-event-psp-callbacks.types.d.ts} +13 -15
  23. package/build/cjs/src/payments-psp-v1-provider-platform-event-psp-callbacks.types.js +3 -0
  24. package/build/cjs/src/payments-psp-v1-provider-platform-event-psp-callbacks.types.js.map +1 -0
  25. package/build/{internal/meta.d.mts → cjs/src/payments-psp-v1-provider-platform-event-psp-callbacks.universal.d.ts} +30 -29
  26. package/build/cjs/src/payments-psp-v1-provider-platform-event-psp-callbacks.universal.js +67 -0
  27. package/build/cjs/src/payments-psp-v1-provider-platform-event-psp-callbacks.universal.js.map +1 -0
  28. package/build/es/index.d.ts +1 -0
  29. package/build/es/index.js +2 -0
  30. package/build/es/index.js.map +1 -0
  31. package/build/es/index.typings.d.ts +1 -0
  32. package/build/es/index.typings.js +2 -0
  33. package/build/es/index.typings.js.map +1 -0
  34. package/build/es/meta.d.ts +1 -0
  35. package/build/es/meta.js +2 -0
  36. package/build/es/meta.js.map +1 -0
  37. package/build/es/package.json +3 -0
  38. package/build/es/src/payments-psp-v1-provider-platform-event-psp-callbacks.context.d.ts +4 -0
  39. package/build/es/src/payments-psp-v1-provider-platform-event-psp-callbacks.context.js +4 -0
  40. package/build/es/src/payments-psp-v1-provider-platform-event-psp-callbacks.context.js.map +1 -0
  41. package/build/es/src/payments-psp-v1-provider-platform-event-psp-callbacks.http.d.ts +12 -0
  42. package/build/es/src/payments-psp-v1-provider-platform-event-psp-callbacks.http.js +346 -0
  43. package/build/es/src/payments-psp-v1-provider-platform-event-psp-callbacks.http.js.map +1 -0
  44. package/build/es/src/payments-psp-v1-provider-platform-event-psp-callbacks.meta.d.ts +13 -0
  45. package/build/es/src/payments-psp-v1-provider-platform-event-psp-callbacks.meta.js +20 -0
  46. package/build/es/src/payments-psp-v1-provider-platform-event-psp-callbacks.meta.js.map +1 -0
  47. package/build/es/src/payments-psp-v1-provider-platform-event-psp-callbacks.public.d.ts +22 -0
  48. package/build/es/src/payments-psp-v1-provider-platform-event-psp-callbacks.public.js +8 -0
  49. package/build/es/src/payments-psp-v1-provider-platform-event-psp-callbacks.public.js.map +1 -0
  50. package/build/{internal/payments-psp-v1-provider-platform-event-psp-callbacks.universal-CEQHoEoO.d.ts → es/src/payments-psp-v1-provider-platform-event-psp-callbacks.types.d.ts} +13 -15
  51. package/build/es/src/payments-psp-v1-provider-platform-event-psp-callbacks.types.js +2 -0
  52. package/build/es/src/payments-psp-v1-provider-platform-event-psp-callbacks.types.js.map +1 -0
  53. package/build/{internal/meta.d.ts → es/src/payments-psp-v1-provider-platform-event-psp-callbacks.universal.d.ts} +30 -29
  54. package/build/es/src/payments-psp-v1-provider-platform-event-psp-callbacks.universal.js +40 -0
  55. package/build/es/src/payments-psp-v1-provider-platform-event-psp-callbacks.universal.js.map +1 -0
  56. package/build/internal/cjs/index.d.ts +1 -0
  57. package/build/internal/cjs/index.js +18 -0
  58. package/build/internal/cjs/index.js.map +1 -0
  59. package/build/internal/cjs/index.typings.d.ts +1 -0
  60. package/build/internal/cjs/index.typings.js +18 -0
  61. package/build/internal/cjs/index.typings.js.map +1 -0
  62. package/build/internal/cjs/meta.d.ts +1 -0
  63. package/build/internal/cjs/meta.js +18 -0
  64. package/build/internal/cjs/meta.js.map +1 -0
  65. package/build/internal/cjs/src/payments-psp-v1-provider-platform-event-psp-callbacks.context.d.ts +4 -0
  66. package/build/internal/cjs/src/payments-psp-v1-provider-platform-event-psp-callbacks.context.js +7 -0
  67. package/build/internal/cjs/src/payments-psp-v1-provider-platform-event-psp-callbacks.context.js.map +1 -0
  68. package/build/internal/cjs/src/payments-psp-v1-provider-platform-event-psp-callbacks.http.d.ts +12 -0
  69. package/build/internal/cjs/src/payments-psp-v1-provider-platform-event-psp-callbacks.http.js +350 -0
  70. package/build/internal/cjs/src/payments-psp-v1-provider-platform-event-psp-callbacks.http.js.map +1 -0
  71. package/build/internal/cjs/src/payments-psp-v1-provider-platform-event-psp-callbacks.meta.d.ts +13 -0
  72. package/build/internal/cjs/src/payments-psp-v1-provider-platform-event-psp-callbacks.meta.js +47 -0
  73. package/build/internal/cjs/src/payments-psp-v1-provider-platform-event-psp-callbacks.meta.js.map +1 -0
  74. package/build/internal/cjs/src/payments-psp-v1-provider-platform-event-psp-callbacks.public.d.ts +22 -0
  75. package/build/internal/cjs/src/payments-psp-v1-provider-platform-event-psp-callbacks.public.js +12 -0
  76. package/build/internal/cjs/src/payments-psp-v1-provider-platform-event-psp-callbacks.public.js.map +1 -0
  77. package/build/{payments-psp-v1-provider-platform-event-psp-callbacks.universal-CEQHoEoO.d.mts → internal/cjs/src/payments-psp-v1-provider-platform-event-psp-callbacks.types.d.ts} +13 -15
  78. package/build/internal/cjs/src/payments-psp-v1-provider-platform-event-psp-callbacks.types.js +3 -0
  79. package/build/internal/cjs/src/payments-psp-v1-provider-platform-event-psp-callbacks.types.js.map +1 -0
  80. package/build/internal/cjs/src/payments-psp-v1-provider-platform-event-psp-callbacks.universal.d.ts +169 -0
  81. package/build/internal/cjs/src/payments-psp-v1-provider-platform-event-psp-callbacks.universal.js +67 -0
  82. package/build/internal/cjs/src/payments-psp-v1-provider-platform-event-psp-callbacks.universal.js.map +1 -0
  83. package/build/internal/es/index.d.ts +1 -0
  84. package/build/internal/es/index.js +2 -0
  85. package/build/internal/es/index.js.map +1 -0
  86. package/build/internal/es/index.typings.d.ts +1 -0
  87. package/build/internal/es/index.typings.js +2 -0
  88. package/build/internal/es/index.typings.js.map +1 -0
  89. package/build/internal/es/meta.d.ts +1 -0
  90. package/build/internal/es/meta.js +2 -0
  91. package/build/internal/es/meta.js.map +1 -0
  92. package/build/internal/es/src/payments-psp-v1-provider-platform-event-psp-callbacks.context.d.ts +4 -0
  93. package/build/internal/es/src/payments-psp-v1-provider-platform-event-psp-callbacks.context.js +4 -0
  94. package/build/internal/es/src/payments-psp-v1-provider-platform-event-psp-callbacks.context.js.map +1 -0
  95. package/build/internal/es/src/payments-psp-v1-provider-platform-event-psp-callbacks.http.d.ts +12 -0
  96. package/build/internal/es/src/payments-psp-v1-provider-platform-event-psp-callbacks.http.js +346 -0
  97. package/build/internal/es/src/payments-psp-v1-provider-platform-event-psp-callbacks.http.js.map +1 -0
  98. package/build/internal/es/src/payments-psp-v1-provider-platform-event-psp-callbacks.meta.d.ts +13 -0
  99. package/build/internal/es/src/payments-psp-v1-provider-platform-event-psp-callbacks.meta.js +20 -0
  100. package/build/internal/es/src/payments-psp-v1-provider-platform-event-psp-callbacks.meta.js.map +1 -0
  101. package/build/internal/es/src/payments-psp-v1-provider-platform-event-psp-callbacks.public.d.ts +22 -0
  102. package/build/internal/es/src/payments-psp-v1-provider-platform-event-psp-callbacks.public.js +8 -0
  103. package/build/internal/es/src/payments-psp-v1-provider-platform-event-psp-callbacks.public.js.map +1 -0
  104. package/build/{payments-psp-v1-provider-platform-event-psp-callbacks.universal-CEQHoEoO.d.ts → internal/es/src/payments-psp-v1-provider-platform-event-psp-callbacks.types.d.ts} +13 -15
  105. package/build/internal/es/src/payments-psp-v1-provider-platform-event-psp-callbacks.types.js +2 -0
  106. package/build/internal/es/src/payments-psp-v1-provider-platform-event-psp-callbacks.types.js.map +1 -0
  107. package/build/internal/es/src/payments-psp-v1-provider-platform-event-psp-callbacks.universal.d.ts +169 -0
  108. package/build/internal/es/src/payments-psp-v1-provider-platform-event-psp-callbacks.universal.js +40 -0
  109. package/build/internal/es/src/payments-psp-v1-provider-platform-event-psp-callbacks.universal.js.map +1 -0
  110. package/package.json +11 -12
  111. package/build/index.d.mts +0 -24
  112. package/build/index.d.ts +0 -24
  113. package/build/index.js +0 -410
  114. package/build/index.js.map +0 -1
  115. package/build/index.mjs +0 -383
  116. package/build/index.mjs.map +0 -1
  117. package/build/internal/index.d.mts +0 -24
  118. package/build/internal/index.d.ts +0 -24
  119. package/build/internal/index.js +0 -410
  120. package/build/internal/index.js.map +0 -1
  121. package/build/internal/index.mjs +0 -383
  122. package/build/internal/index.mjs.map +0 -1
  123. package/build/internal/meta.js +0 -389
  124. package/build/internal/meta.js.map +0 -1
  125. package/build/internal/meta.mjs +0 -362
  126. package/build/internal/meta.mjs.map +0 -1
  127. package/build/meta.d.mts +0 -168
  128. package/build/meta.d.ts +0 -168
  129. package/build/meta.js +0 -389
  130. package/build/meta.js.map +0 -1
  131. package/build/meta.mjs +0 -362
  132. package/build/meta.mjs.map +0 -1
@@ -1,5 +1,5 @@
1
1
  /** Provider platform event */
2
- interface ProviderPlatformEvent extends ProviderPlatformEventResourceOneOf {
2
+ export interface ProviderPlatformEvent extends ProviderPlatformEventResourceOneOf {
3
3
  /** Refund event data. */
4
4
  refund?: RefundEvent;
5
5
  /** Transaction event data. */
@@ -15,7 +15,7 @@ interface ProviderPlatformEvent extends ProviderPlatformEventResourceOneOf {
15
15
  pluginId?: string;
16
16
  }
17
17
  /** @oneof */
18
- interface ProviderPlatformEventResourceOneOf {
18
+ export interface ProviderPlatformEventResourceOneOf {
19
19
  /** Refund event data. */
20
20
  refund?: RefundEvent;
21
21
  /** Transaction event data. */
@@ -25,7 +25,7 @@ interface ProviderPlatformEventResourceOneOf {
25
25
  /** Void event data. */
26
26
  void?: VoidEvent;
27
27
  }
28
- interface RefundEvent {
28
+ export interface RefundEvent {
29
29
  /** Wix transaction ID. */
30
30
  wixTransactionId?: string;
31
31
  /** PSP refund ID. */
@@ -41,7 +41,7 @@ interface RefundEvent {
41
41
  /** PSP-specific error message. */
42
42
  errorMessage?: string | null;
43
43
  }
44
- interface TransactionEvent {
44
+ export interface TransactionEvent {
45
45
  /** Wix transaction ID. */
46
46
  wixTransactionId?: string;
47
47
  /** PSP transaction ID. */
@@ -57,30 +57,30 @@ interface TransactionEvent {
57
57
  /** Details of actual customer's card, obtained from a Funding PAN as opposed to a Device PAN. */
58
58
  cardDetails?: CardDetails;
59
59
  }
60
- interface CredentialsOnFile extends CredentialsOnFileInfoOneOf {
60
+ export interface CredentialsOnFile extends CredentialsOnFileInfoOneOf {
61
61
  /** Network token data. */
62
62
  cardReference?: CardReference;
63
63
  /** Provider generated token data. */
64
64
  paymentMethodReference?: PaymentMethodReference;
65
65
  }
66
66
  /** @oneof */
67
- interface CredentialsOnFileInfoOneOf {
67
+ export interface CredentialsOnFileInfoOneOf {
68
68
  /** Network token data. */
69
69
  cardReference?: CardReference;
70
70
  /** Provider generated token data. */
71
71
  paymentMethodReference?: PaymentMethodReference;
72
72
  }
73
- interface CardReference {
73
+ export interface CardReference {
74
74
  /** Network token. */
75
75
  networkTransactionId?: string;
76
76
  /** Directory Server transaction ID */
77
77
  dsTransactionId?: string | null;
78
78
  }
79
- interface PaymentMethodReference {
79
+ export interface PaymentMethodReference {
80
80
  /** Payment method token created by the PSP. */
81
81
  token?: string;
82
82
  }
83
- interface CardDetails {
83
+ export interface CardDetails {
84
84
  /**
85
85
  * Issuer (business) identification number. First 6 or 8 digits of the card's number.
86
86
  * @minLength 6
@@ -94,7 +94,7 @@ interface CardDetails {
94
94
  */
95
95
  lastFour?: string | null;
96
96
  }
97
- interface CaptureEvent {
97
+ export interface CaptureEvent {
98
98
  /**
99
99
  * Wix transaction ID.
100
100
  * @format GUID
@@ -118,7 +118,7 @@ interface CaptureEvent {
118
118
  */
119
119
  errorMessage?: string | null;
120
120
  }
121
- interface VoidEvent {
121
+ export interface VoidEvent {
122
122
  /**
123
123
  * Wix transaction ID.
124
124
  * @format GUID
@@ -143,12 +143,10 @@ interface VoidEvent {
143
143
  errorMessage?: string | null;
144
144
  }
145
145
  /** Submit event request */
146
- interface SubmitEventRequest {
146
+ export interface SubmitEventRequest {
147
147
  /** Event data. */
148
148
  event: ProviderPlatformEvent;
149
149
  }
150
150
  /** Submit event response */
151
- interface SubmitEventResponse {
151
+ export interface SubmitEventResponse {
152
152
  }
153
-
154
- export type { CredentialsOnFile as C, ProviderPlatformEvent as P, RefundEvent as R, SubmitEventRequest as S, TransactionEvent as T, VoidEvent as V, ProviderPlatformEventResourceOneOf as a, CredentialsOnFileInfoOneOf as b, CardReference as c, PaymentMethodReference as d, CardDetails as e, CaptureEvent as f, SubmitEventResponse as g };
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=payments-psp-v1-provider-platform-event-psp-callbacks.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"payments-psp-v1-provider-platform-event-psp-callbacks.types.js","sourceRoot":"","sources":["../../../src/payments-psp-v1-provider-platform-event-psp-callbacks.types.ts"],"names":[],"mappings":""}
@@ -1,7 +1,5 @@
1
- import { S as SubmitEventRequest$1, g as SubmitEventResponse$1 } from './payments-psp-v1-provider-platform-event-psp-callbacks.universal-CEQHoEoO.mjs';
2
-
3
1
  /** Provider platform event */
4
- interface ProviderPlatformEvent extends ProviderPlatformEventResourceOneOf {
2
+ export interface ProviderPlatformEvent extends ProviderPlatformEventResourceOneOf {
5
3
  /** Refund event data. */
6
4
  refund?: RefundEvent;
7
5
  /** Transaction event data. */
@@ -17,7 +15,7 @@ interface ProviderPlatformEvent extends ProviderPlatformEventResourceOneOf {
17
15
  pluginId?: string;
18
16
  }
19
17
  /** @oneof */
20
- interface ProviderPlatformEventResourceOneOf {
18
+ export interface ProviderPlatformEventResourceOneOf {
21
19
  /** Refund event data. */
22
20
  refund?: RefundEvent;
23
21
  /** Transaction event data. */
@@ -27,7 +25,7 @@ interface ProviderPlatformEventResourceOneOf {
27
25
  /** Void event data. */
28
26
  void?: VoidEvent;
29
27
  }
30
- interface RefundEvent {
28
+ export interface RefundEvent {
31
29
  /** Wix transaction ID. */
32
30
  wixTransactionId?: string;
33
31
  /** PSP refund ID. */
@@ -43,7 +41,7 @@ interface RefundEvent {
43
41
  /** PSP-specific error message. */
44
42
  errorMessage?: string | null;
45
43
  }
46
- interface TransactionEvent {
44
+ export interface TransactionEvent {
47
45
  /** Wix transaction ID. */
48
46
  wixTransactionId?: string;
49
47
  /** PSP transaction ID. */
@@ -59,30 +57,30 @@ interface TransactionEvent {
59
57
  /** Details of actual customer's card, obtained from a Funding PAN as opposed to a Device PAN. */
60
58
  cardDetails?: CardDetails;
61
59
  }
62
- interface CredentialsOnFile extends CredentialsOnFileInfoOneOf {
60
+ export interface CredentialsOnFile extends CredentialsOnFileInfoOneOf {
63
61
  /** Network token data. */
64
62
  cardReference?: CardReference;
65
63
  /** Provider generated token data. */
66
64
  paymentMethodReference?: PaymentMethodReference;
67
65
  }
68
66
  /** @oneof */
69
- interface CredentialsOnFileInfoOneOf {
67
+ export interface CredentialsOnFileInfoOneOf {
70
68
  /** Network token data. */
71
69
  cardReference?: CardReference;
72
70
  /** Provider generated token data. */
73
71
  paymentMethodReference?: PaymentMethodReference;
74
72
  }
75
- interface CardReference {
73
+ export interface CardReference {
76
74
  /** Network token. */
77
75
  networkTransactionId?: string;
78
76
  /** Directory Server transaction ID */
79
77
  dsTransactionId?: string | null;
80
78
  }
81
- interface PaymentMethodReference {
79
+ export interface PaymentMethodReference {
82
80
  /** Payment method token created by the PSP. */
83
81
  token?: string;
84
82
  }
85
- interface CardDetails {
83
+ export interface CardDetails {
86
84
  /**
87
85
  * Issuer (business) identification number. First 6 or 8 digits of the card's number.
88
86
  * @minLength 6
@@ -96,7 +94,7 @@ interface CardDetails {
96
94
  */
97
95
  lastFour?: string | null;
98
96
  }
99
- interface CaptureEvent {
97
+ export interface CaptureEvent {
100
98
  /**
101
99
  * Wix transaction ID.
102
100
  * @format GUID
@@ -120,7 +118,7 @@ interface CaptureEvent {
120
118
  */
121
119
  errorMessage?: string | null;
122
120
  }
123
- interface VoidEvent {
121
+ export interface VoidEvent {
124
122
  /**
125
123
  * Wix transaction ID.
126
124
  * @format GUID
@@ -145,24 +143,27 @@ interface VoidEvent {
145
143
  errorMessage?: string | null;
146
144
  }
147
145
  /** Submit event request */
148
- interface SubmitEventRequest {
146
+ export interface SubmitEventRequest {
149
147
  /** Event data. */
150
148
  event: ProviderPlatformEvent;
151
149
  }
152
150
  /** Submit event response */
153
- interface SubmitEventResponse {
151
+ export interface SubmitEventResponse {
154
152
  }
155
-
156
- type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
157
- getUrl: (context: any) => string;
158
- httpMethod: K;
159
- path: string;
160
- pathParams: M;
161
- __requestType: T;
162
- __originalRequestType: S;
163
- __responseType: Q;
164
- __originalResponseType: R;
165
- };
166
- declare function submitEvent(): __PublicMethodMetaInfo<'POST', {}, SubmitEventRequest$1, SubmitEventRequest, SubmitEventResponse$1, SubmitEventResponse>;
167
-
168
- export { type __PublicMethodMetaInfo, submitEvent };
153
+ /**
154
+ * This Wix API is used by a Payment Service Provider (PSP) to send webhooks about payment and refund states to Wix.
155
+ *
156
+ * Calls to this endpoint must include a `User-Agent` header with the name of the PSP and the integration version in this format: `{PSP}/{version}`.
157
+ * PSP's create their own version numbers.
158
+ *
159
+ * > You cannot try out this endpoint because an `Authorization` header value has to be obtained
160
+ * > with the OAuth 2.0 client credentials flow for a specific scope.
161
+ * > So please ignore the **Authorization** section below as well as the **Try It Out** button.
162
+ * @param event - Event data.
163
+ * @public
164
+ * @requiredField event
165
+ * @permissionId CASHIER.GET_ACCESS
166
+ * @returns Submit event response
167
+ * @fqn wix.payments.v1.provider_platform_events.ProviderPlatformEventsService.SubmitEvent
168
+ */
169
+ export declare function submitEvent(event: ProviderPlatformEvent): Promise<void>;
@@ -0,0 +1,67 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ Object.defineProperty(exports, "__esModule", { value: true });
26
+ exports.submitEvent = void 0;
27
+ const transform_error_1 = require("@wix/sdk-runtime/transform-error");
28
+ const rename_all_nested_keys_1 = require("@wix/sdk-runtime/rename-all-nested-keys");
29
+ const ambassadorWixPaymentsPspV1ProviderPlatformEvent = __importStar(require("./payments-psp-v1-provider-platform-event-psp-callbacks.http.js"));
30
+ /**
31
+ * This Wix API is used by a Payment Service Provider (PSP) to send webhooks about payment and refund states to Wix.
32
+ *
33
+ * Calls to this endpoint must include a `User-Agent` header with the name of the PSP and the integration version in this format: `{PSP}/{version}`.
34
+ * PSP's create their own version numbers.
35
+ *
36
+ * > You cannot try out this endpoint because an `Authorization` header value has to be obtained
37
+ * > with the OAuth 2.0 client credentials flow for a specific scope.
38
+ * > So please ignore the **Authorization** section below as well as the **Try It Out** button.
39
+ * @param event - Event data.
40
+ * @public
41
+ * @requiredField event
42
+ * @permissionId CASHIER.GET_ACCESS
43
+ * @returns Submit event response
44
+ * @fqn wix.payments.v1.provider_platform_events.ProviderPlatformEventsService.SubmitEvent
45
+ */
46
+ async function submitEvent(event) {
47
+ // @ts-ignore
48
+ const { httpClient, sideEffects } = arguments[1];
49
+ const payload = (0, rename_all_nested_keys_1.renameKeysFromSDKRequestToRESTRequest)({ event: event });
50
+ const reqOpts = ambassadorWixPaymentsPspV1ProviderPlatformEvent.submitEvent(payload);
51
+ sideEffects?.onSiteCall?.();
52
+ try {
53
+ const result = await httpClient.request(reqOpts);
54
+ sideEffects?.onSuccess?.(result);
55
+ }
56
+ catch (err) {
57
+ const transformedError = (0, transform_error_1.transformError)(err, {
58
+ spreadPathsToArguments: {},
59
+ explicitPathsToArguments: { event: '$[0]' },
60
+ singleArgumentUnchanged: false,
61
+ }, ['event']);
62
+ sideEffects?.onError?.(err);
63
+ throw transformedError;
64
+ }
65
+ }
66
+ exports.submitEvent = submitEvent;
67
+ //# sourceMappingURL=payments-psp-v1-provider-platform-event-psp-callbacks.universal.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"payments-psp-v1-provider-platform-event-psp-callbacks.universal.js","sourceRoot":"","sources":["../../../src/payments-psp-v1-provider-platform-event-psp-callbacks.universal.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,sEAAuF;AACvF,oFAAgG;AAEhG,iJAAmI;AAuKnI;;;;;;;;;;;;;;;GAeG;AACI,KAAK,UAAU,WAAW,CAAC,KAA4B;IAC5D,aAAa;IACb,MAAM,EAAE,UAAU,EAAE,WAAW,EAAE,GAAG,SAAS,CAAC,CAAC,CAG9C,CAAC;IAEF,MAAM,OAAO,GAAG,IAAA,8DAAqC,EAAC,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC;IAExE,MAAM,OAAO,GACX,+CAA+C,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;IAEvE,WAAW,EAAE,UAAU,EAAE,EAAE,CAAC;IAC5B,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,MAAM,UAAU,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QACjD,WAAW,EAAE,SAAS,EAAE,CAAC,MAAM,CAAC,CAAC;IACnC,CAAC;IAAC,OAAO,GAAQ,EAAE,CAAC;QAClB,MAAM,gBAAgB,GAAG,IAAA,gCAAiB,EACxC,GAAG,EACH;YACE,sBAAsB,EAAE,EAAE;YAC1B,wBAAwB,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE;YAC3C,uBAAuB,EAAE,KAAK;SAC/B,EACD,CAAC,OAAO,CAAC,CACV,CAAC;QACF,WAAW,EAAE,OAAO,EAAE,CAAC,GAAG,CAAC,CAAC;QAE5B,MAAM,gBAAgB,CAAC;IACzB,CAAC;AACH,CAAC;AA9BD,kCA8BC"}
@@ -0,0 +1 @@
1
+ export * from './src/payments-psp-v1-provider-platform-event-psp-callbacks.context.js';
@@ -0,0 +1,2 @@
1
+ export * from './src/payments-psp-v1-provider-platform-event-psp-callbacks.context.js';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":"AAAA,cAAc,wEAAwE,CAAC"}
@@ -0,0 +1 @@
1
+ export * from './src/payments-psp-v1-provider-platform-event-psp-callbacks.universal.js';
@@ -0,0 +1,2 @@
1
+ export * from './src/payments-psp-v1-provider-platform-event-psp-callbacks.universal.js';
2
+ //# sourceMappingURL=index.typings.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.typings.js","sourceRoot":"","sources":["../../index.typings.ts"],"names":[],"mappings":"AAAA,cAAc,0EAA0E,CAAC"}
@@ -0,0 +1 @@
1
+ export * from './src/payments-psp-v1-provider-platform-event-psp-callbacks.meta.js';
@@ -0,0 +1,2 @@
1
+ export * from './src/payments-psp-v1-provider-platform-event-psp-callbacks.meta.js';
2
+ //# sourceMappingURL=meta.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"meta.js","sourceRoot":"","sources":["../../meta.ts"],"names":[],"mappings":"AAAA,cAAc,qEAAqE,CAAC"}
@@ -0,0 +1,3 @@
1
+ {
2
+ "type": "module"
3
+ }
@@ -0,0 +1,4 @@
1
+ import { submitEvent as publicSubmitEvent } from './payments-psp-v1-provider-platform-event-psp-callbacks.public.js';
2
+ import { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';
3
+ export declare const submitEvent: MaybeContext<BuildRESTFunction<typeof publicSubmitEvent> & typeof publicSubmitEvent>;
4
+ export { ProviderPlatformEvent, ProviderPlatformEventResourceOneOf, RefundEvent, TransactionEvent, CredentialsOnFile, CredentialsOnFileInfoOneOf, CardReference, PaymentMethodReference, CardDetails, CaptureEvent, VoidEvent, SubmitEventRequest, SubmitEventResponse, } from './payments-psp-v1-provider-platform-event-psp-callbacks.universal.js';
@@ -0,0 +1,4 @@
1
+ import { submitEvent as publicSubmitEvent } from './payments-psp-v1-provider-platform-event-psp-callbacks.public.js';
2
+ import { createRESTModule } from '@wix/sdk-runtime/rest-modules';
3
+ export const submitEvent = /*#__PURE__*/ createRESTModule(publicSubmitEvent);
4
+ //# sourceMappingURL=payments-psp-v1-provider-platform-event-psp-callbacks.context.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"payments-psp-v1-provider-platform-event-psp-callbacks.context.js","sourceRoot":"","sources":["../../../src/payments-psp-v1-provider-platform-event-psp-callbacks.context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,IAAI,iBAAiB,EAAE,MAAM,mEAAmE,CAAC;AACrH,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAGjE,MAAM,CAAC,MAAM,WAAW,GAEpB,aAAa,CAAC,gBAAgB,CAAC,iBAAiB,CAAC,CAAC"}
@@ -0,0 +1,12 @@
1
+ import { RequestOptionsFactory } from '@wix/sdk-types';
2
+ /**
3
+ * This Wix API is used by a Payment Service Provider (PSP) to send webhooks about payment and refund states to Wix.
4
+ *
5
+ * Calls to this endpoint must include a `User-Agent` header with the name of the PSP and the integration version in this format: `{PSP}/{version}`.
6
+ * PSP's create their own version numbers.
7
+ *
8
+ * > You cannot try out this endpoint because an `Authorization` header value has to be obtained
9
+ * > with the OAuth 2.0 client credentials flow for a specific scope.
10
+ * > So please ignore the **Authorization** section below as well as the **Try It Out** button.
11
+ */
12
+ export declare function submitEvent(payload: object): RequestOptionsFactory<any>;