@clikgate/node 0.0.0-stage → 2.0.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 (119) hide show
  1. package/CHANGELOG.md +136 -0
  2. package/LICENSE +21 -0
  3. package/README.md +311 -2
  4. package/SECURITY.md +34 -0
  5. package/dist/cjs/ads-hashing.d.ts +37 -0
  6. package/dist/cjs/ads-hashing.js +67 -0
  7. package/dist/cjs/click-ids.d.ts +184 -0
  8. package/dist/cjs/click-ids.js +535 -0
  9. package/dist/cjs/client.d.ts +191 -0
  10. package/dist/cjs/client.js +291 -0
  11. package/dist/cjs/config.d.ts +12 -0
  12. package/dist/cjs/config.js +87 -0
  13. package/dist/cjs/core.d.ts +15 -0
  14. package/dist/cjs/core.js +100 -0
  15. package/dist/cjs/customer-id.d.ts +26 -0
  16. package/dist/cjs/customer-id.js +52 -0
  17. package/dist/cjs/enums.d.ts +48 -0
  18. package/dist/cjs/enums.js +47 -0
  19. package/dist/cjs/errors.d.ts +117 -0
  20. package/dist/cjs/errors.js +257 -0
  21. package/dist/cjs/express.d.ts +49 -0
  22. package/dist/cjs/express.js +44 -0
  23. package/dist/cjs/fastify.d.ts +47 -0
  24. package/dist/cjs/fastify.js +35 -0
  25. package/dist/cjs/generated/index.d.ts +17793 -0
  26. package/dist/cjs/generated/index.js +8896 -0
  27. package/dist/cjs/goals.d.ts +116 -0
  28. package/dist/cjs/goals.js +381 -0
  29. package/dist/cjs/guard.d.ts +17 -0
  30. package/dist/cjs/guard.js +40 -0
  31. package/dist/cjs/http.d.ts +16 -0
  32. package/dist/cjs/http.js +148 -0
  33. package/dist/cjs/identity.d.ts +42 -0
  34. package/dist/cjs/identity.js +133 -0
  35. package/dist/cjs/index.d.ts +34 -0
  36. package/dist/cjs/index.js +70 -0
  37. package/dist/cjs/known-customers.d.ts +45 -0
  38. package/dist/cjs/known-customers.js +95 -0
  39. package/dist/cjs/logger.d.ts +9 -0
  40. package/dist/cjs/logger.js +8 -0
  41. package/dist/cjs/money.d.ts +16 -0
  42. package/dist/cjs/money.js +51 -0
  43. package/dist/cjs/next.d.ts +81 -0
  44. package/dist/cjs/next.js +103 -0
  45. package/dist/cjs/package.json +1 -0
  46. package/dist/cjs/payments.d.ts +174 -0
  47. package/dist/cjs/payments.js +485 -0
  48. package/dist/cjs/resources.d.ts +109 -0
  49. package/dist/cjs/resources.js +189 -0
  50. package/dist/cjs/shutdown.d.ts +2 -0
  51. package/dist/cjs/shutdown.js +51 -0
  52. package/dist/cjs/transport.d.ts +14 -0
  53. package/dist/cjs/transport.js +204 -0
  54. package/dist/cjs/types.d.ts +218 -0
  55. package/dist/cjs/types.js +2 -0
  56. package/dist/cjs/user-agent.d.ts +1 -0
  57. package/dist/cjs/user-agent.js +53 -0
  58. package/dist/cjs/version.d.ts +2 -0
  59. package/dist/cjs/version.js +5 -0
  60. package/dist/cjs/webhooks.d.ts +36 -0
  61. package/dist/cjs/webhooks.js +108 -0
  62. package/dist/esm/ads-hashing.d.ts +37 -0
  63. package/dist/esm/ads-hashing.js +62 -0
  64. package/dist/esm/click-ids.d.ts +184 -0
  65. package/dist/esm/click-ids.js +526 -0
  66. package/dist/esm/client.d.ts +191 -0
  67. package/dist/esm/client.js +287 -0
  68. package/dist/esm/config.d.ts +12 -0
  69. package/dist/esm/config.js +82 -0
  70. package/dist/esm/core.d.ts +15 -0
  71. package/dist/esm/core.js +96 -0
  72. package/dist/esm/customer-id.d.ts +26 -0
  73. package/dist/esm/customer-id.js +47 -0
  74. package/dist/esm/enums.d.ts +48 -0
  75. package/dist/esm/enums.js +44 -0
  76. package/dist/esm/errors.d.ts +117 -0
  77. package/dist/esm/errors.js +234 -0
  78. package/dist/esm/express.d.ts +49 -0
  79. package/dist/esm/express.js +40 -0
  80. package/dist/esm/fastify.d.ts +47 -0
  81. package/dist/esm/fastify.js +32 -0
  82. package/dist/esm/generated/index.d.ts +17793 -0
  83. package/dist/esm/generated/index.js +8833 -0
  84. package/dist/esm/goals.d.ts +116 -0
  85. package/dist/esm/goals.js +371 -0
  86. package/dist/esm/guard.d.ts +17 -0
  87. package/dist/esm/guard.js +36 -0
  88. package/dist/esm/http.d.ts +16 -0
  89. package/dist/esm/http.js +138 -0
  90. package/dist/esm/identity.d.ts +42 -0
  91. package/dist/esm/identity.js +125 -0
  92. package/dist/esm/index.d.ts +34 -0
  93. package/dist/esm/index.js +23 -0
  94. package/dist/esm/known-customers.d.ts +45 -0
  95. package/dist/esm/known-customers.js +90 -0
  96. package/dist/esm/logger.d.ts +9 -0
  97. package/dist/esm/logger.js +5 -0
  98. package/dist/esm/money.d.ts +16 -0
  99. package/dist/esm/money.js +48 -0
  100. package/dist/esm/next.d.ts +81 -0
  101. package/dist/esm/next.js +96 -0
  102. package/dist/esm/package.json +1 -0
  103. package/dist/esm/payments.d.ts +174 -0
  104. package/dist/esm/payments.js +476 -0
  105. package/dist/esm/resources.d.ts +109 -0
  106. package/dist/esm/resources.js +183 -0
  107. package/dist/esm/shutdown.d.ts +2 -0
  108. package/dist/esm/shutdown.js +47 -0
  109. package/dist/esm/transport.d.ts +14 -0
  110. package/dist/esm/transport.js +166 -0
  111. package/dist/esm/types.d.ts +218 -0
  112. package/dist/esm/types.js +1 -0
  113. package/dist/esm/user-agent.d.ts +1 -0
  114. package/dist/esm/user-agent.js +16 -0
  115. package/dist/esm/version.d.ts +2 -0
  116. package/dist/esm/version.js +2 -0
  117. package/dist/esm/webhooks.d.ts +36 -0
  118. package/dist/esm/webhooks.js +105 -0
  119. package/package.json +128 -4
@@ -0,0 +1,81 @@
1
+ /**
2
+ * Next.js add-on: keeps the click ID (SPEC section 17). Next.js 16 calls request middleware a
3
+ * "proxy" (`proxy.ts`, exporting `proxy`); `middleware.ts` still works but is deprecated.
4
+ *
5
+ * @example
6
+ * // proxy.ts (Next.js 16+)
7
+ * export { clikgateProxy as proxy } from '@clikgate/node/next';
8
+ * export const config = { matcher: ['/((?!_next/|api/webhooks/).*)'] };
9
+ *
10
+ * // app/signup/route.ts
11
+ * import { cookies } from 'next/headers';
12
+ * import { getClickId } from '@clikgate/node/next';
13
+ * const clickId = getClickId(await cookies());
14
+ *
15
+ * @packageDocumentation
16
+ */
17
+ import { NextResponse, type NextRequest } from 'next/server.js';
18
+ import { type KeepRoute, type KeepRouteOptions, type PersistOptions } from './click-ids.js';
19
+ /** A cookie store: `request.cookies` or the awaited `cookies()` from `next/headers`. */
20
+ export interface CookieStoreLike {
21
+ get(name: string): {
22
+ value: string;
23
+ } | undefined;
24
+ }
25
+ /** Options for {@link createClikgateProxy}. */
26
+ export interface ClikgateProxyOptions extends PersistOptions {
27
+ /** The click-ID parameter (default `process.env.CLIKGATE_CLICK_ID_PARAM`, else `cgid`). */
28
+ clickIdParam?: string;
29
+ }
30
+ /**
31
+ * Add the click-ID cookie to an existing response when the request's query string carries a click ID.
32
+ * Use it inside your own proxy.
33
+ *
34
+ * @example
35
+ * export function proxy(request: NextRequest) {
36
+ * const response = NextResponse.next();
37
+ * applyClikgate(request, response);
38
+ * return response;
39
+ * }
40
+ */
41
+ export declare function applyClikgate(request: NextRequest, response: NextResponse, options?: ClikgateProxyOptions): string | null;
42
+ /**
43
+ * Build a proxy (or legacy middleware) function with options.
44
+ *
45
+ * @example
46
+ * export const proxy = createClikgateProxy({ days: 30, clickIdParam: 'ref' });
47
+ */
48
+ export declare function createClikgateProxy(options?: ClikgateProxyOptions): (request: NextRequest) => NextResponse;
49
+ /**
50
+ * The ready-made proxy for `proxy.ts`: stores a click ID from the query string in the `_cg_<param>` cookie.
51
+ *
52
+ * @example
53
+ * export { clikgateProxy as proxy } from '@clikgate/node/next';
54
+ */
55
+ export declare const clikgateProxy: (request: NextRequest) => NextResponse;
56
+ /**
57
+ * The same function for the deprecated `middleware.ts` (`export { clikgateMiddleware as middleware }`).
58
+ */
59
+ export declare const clikgateMiddleware: (request: NextRequest) => NextResponse;
60
+ /**
61
+ * Read the kept click ID from a cookie store, e.g. `getClickId(await cookies())` in a route handler or
62
+ * server action, or `getClickId(request.cookies)`.
63
+ *
64
+ * @example
65
+ * import { cookies } from 'next/headers';
66
+ * const clickId = getClickId(await cookies());
67
+ */
68
+ export declare function getClickId(store: CookieStoreLike, clickIdParam?: string): string | null;
69
+ /**
70
+ * The `/cg/keep` route handler without a client, using the same click-ID parameter as the proxy
71
+ * (`clickIdParam`, else `process.env.CLIKGATE_CLICK_ID_PARAM`, else `cgid`). With a client, use
72
+ * `clikgate.clickIds.keepRoute()` instead.
73
+ *
74
+ * @example
75
+ * // app/cg/keep/route.ts
76
+ * import { keepRoute } from '@clikgate/node/next';
77
+ * export const POST = keepRoute({ days: 90 });
78
+ */
79
+ export declare function keepRoute(options?: KeepRouteOptions & {
80
+ clickIdParam?: string;
81
+ }): KeepRoute;
@@ -0,0 +1,96 @@
1
+ /**
2
+ * Next.js add-on: keeps the click ID (SPEC section 17). Next.js 16 calls request middleware a
3
+ * "proxy" (`proxy.ts`, exporting `proxy`); `middleware.ts` still works but is deprecated.
4
+ *
5
+ * @example
6
+ * // proxy.ts (Next.js 16+)
7
+ * export { clikgateProxy as proxy } from '@clikgate/node/next';
8
+ * export const config = { matcher: ['/((?!_next/|api/webhooks/).*)'] };
9
+ *
10
+ * // app/signup/route.ts
11
+ * import { cookies } from 'next/headers';
12
+ * import { getClickId } from '@clikgate/node/next';
13
+ * const clickId = getClickId(await cookies());
14
+ *
15
+ * @packageDocumentation
16
+ */
17
+ import { NextResponse } from 'next/server.js';
18
+ import { ClickIds, keptMarkerHeader } from './click-ids.js';
19
+ function helpersFor(param) {
20
+ const name = param ?? (typeof process !== 'undefined' ? process.env.CLIKGATE_CLICK_ID_PARAM : undefined) ?? 'cgid';
21
+ return new ClickIds(() => name);
22
+ }
23
+ /**
24
+ * Add the click-ID cookie to an existing response when the request's query string carries a click ID.
25
+ * Use it inside your own proxy.
26
+ *
27
+ * @example
28
+ * export function proxy(request: NextRequest) {
29
+ * const response = NextResponse.next();
30
+ * applyClikgate(request, response);
31
+ * return response;
32
+ * }
33
+ */
34
+ export function applyClikgate(request, response, options = {}) {
35
+ const { clickIdParam, ...cookie } = options;
36
+ const helpers = helpersFor(clickIdParam);
37
+ const fromQuery = request.nextUrl.searchParams.getAll(helpers.paramName).find((v) => helpers.isValid(v)) ?? null;
38
+ if (fromQuery) {
39
+ const secure = cookie.secure ?? request.nextUrl.protocol === 'https:';
40
+ response.headers.append('set-cookie', helpers.cookieHeader(fromQuery, { ...cookie, secure }));
41
+ response.headers.append('set-cookie', keptMarkerHeader({ ...cookie, secure }));
42
+ return fromQuery;
43
+ }
44
+ return helpers.fromRequest({ url: request.nextUrl.href, headers: request.headers });
45
+ }
46
+ /**
47
+ * Build a proxy (or legacy middleware) function with options.
48
+ *
49
+ * @example
50
+ * export const proxy = createClikgateProxy({ days: 30, clickIdParam: 'ref' });
51
+ */
52
+ export function createClikgateProxy(options = {}) {
53
+ return (request) => {
54
+ const response = NextResponse.next();
55
+ applyClikgate(request, response, options);
56
+ return response;
57
+ };
58
+ }
59
+ /**
60
+ * The ready-made proxy for `proxy.ts`: stores a click ID from the query string in the `_cg_<param>` cookie.
61
+ *
62
+ * @example
63
+ * export { clikgateProxy as proxy } from '@clikgate/node/next';
64
+ */
65
+ export const clikgateProxy = createClikgateProxy();
66
+ /**
67
+ * The same function for the deprecated `middleware.ts` (`export { clikgateMiddleware as middleware }`).
68
+ */
69
+ export const clikgateMiddleware = clikgateProxy;
70
+ /**
71
+ * Read the kept click ID from a cookie store, e.g. `getClickId(await cookies())` in a route handler or
72
+ * server action, or `getClickId(request.cookies)`.
73
+ *
74
+ * @example
75
+ * import { cookies } from 'next/headers';
76
+ * const clickId = getClickId(await cookies());
77
+ */
78
+ export function getClickId(store, clickIdParam) {
79
+ const helpers = helpersFor(clickIdParam);
80
+ const value = store.get(helpers.cookieName)?.value;
81
+ return helpers.isValid(value) ? value : null;
82
+ }
83
+ /**
84
+ * The `/cg/keep` route handler without a client, using the same click-ID parameter as the proxy
85
+ * (`clickIdParam`, else `process.env.CLIKGATE_CLICK_ID_PARAM`, else `cgid`). With a client, use
86
+ * `clikgate.clickIds.keepRoute()` instead.
87
+ *
88
+ * @example
89
+ * // app/cg/keep/route.ts
90
+ * import { keepRoute } from '@clikgate/node/next';
91
+ * export const POST = keepRoute({ days: 90 });
92
+ */
93
+ export function keepRoute(options = {}) {
94
+ const { clickIdParam, ...rest } = options;
95
+ return helpersFor(clickIdParam).keepRoute(rest);
96
+ }
@@ -0,0 +1 @@
1
+ {"type":"module"}
@@ -0,0 +1,174 @@
1
+ import { Provider } from './enums.js';
2
+ import { type RequestOptions } from './http.js';
3
+ import { type MoneyInput } from './money.js';
4
+ /** Normalised payment statuses. */
5
+ export type PaymentStatus = 'success' | 'partial' | 'pending' | 'failed' | 'refunded' | 'reversed';
6
+ /** Parameters of `payments.confirm` (SPEC 22.2): the result of your own server's verification with the gateway. */
7
+ export interface PaymentConfirmParams {
8
+ /**
9
+ * The payment provider, e.g. `Provider.Paystack` (every gateway in `GET /v1/payment-gateways`). A provider key
10
+ * string works too, for a gateway added after this SDK release; the API checks it.
11
+ */
12
+ provider: Provider | (string & {});
13
+ /** The gateway's canonical payment reference, 1-128 characters. */
14
+ reference: string;
15
+ /** The gateway's verified status, normalised. */
16
+ status: PaymentStatus;
17
+ /** Amount in normal units (`'7500.00'` is ₦7,500). Prefer a decimal string. Not together with `amountMinor`. */
18
+ amount?: MoneyInput | null;
19
+ /** Amount in ISO 4217 minor units, instead of `amount`. */
20
+ amountMinor?: number | bigint | null;
21
+ /** ISO 4217 code (`NGN`, `usd`). */
22
+ currency?: string | null;
23
+ /** When the payment happened (default: now, on the server). */
24
+ occurredAt?: Date | string | null;
25
+ /** Up to 5 other references of the same payment (Stripe `cs_...`, Flutterwave transaction id). */
26
+ aliases?: string[] | null;
27
+ /** The click ID you stored in the gateway metadata (`cg_click_id`), used when no report arrives. */
28
+ clickId?: string | null;
29
+ /** A payment goal key (else the report's goal, else your default payment goal). */
30
+ goal?: string | null;
31
+ /** `true` for a gateway test payment; must match the API key's mode. */
32
+ test?: boolean | null;
33
+ /** Additional wire fields, merged last (forward compatibility). Refused in private mode. */
34
+ extra?: Record<string, unknown>;
35
+ }
36
+ /** Options of the gateway helpers. */
37
+ export interface PaymentHelperOptions {
38
+ /** A payment goal key. */
39
+ goal?: string | null;
40
+ /** A click ID you have yourself; wins over the `cg_click_id` in the gateway metadata. */
41
+ clickId?: string | null;
42
+ }
43
+ /** The wire body of `POST /v1/payments/confirmations`, as the builders return it. */
44
+ export interface PaymentConfirmationBody {
45
+ provider: Provider | (string & {});
46
+ reference: string;
47
+ status: PaymentStatus;
48
+ aliases?: string[];
49
+ amount?: string;
50
+ amount_minor?: number | bigint;
51
+ currency?: string;
52
+ occurred_at?: string;
53
+ test?: boolean;
54
+ click_id?: string;
55
+ goal?: string;
56
+ [key: string]: unknown;
57
+ }
58
+ /** The `payment_confirmation` object. */
59
+ export interface PaymentConfirmation {
60
+ object: 'payment_confirmation';
61
+ id: string;
62
+ /** A `Provider` value (or a newer gateway's key). */
63
+ provider: Provider | (string & {});
64
+ reference: string;
65
+ status: PaymentStatus;
66
+ amount: string | null;
67
+ amount_minor: number | null;
68
+ currency: string | null;
69
+ occurred_at: string;
70
+ route: string;
71
+ match_status: string;
72
+ report_id: string | null;
73
+ goal_event_id: string | null;
74
+ test: boolean;
75
+ duplicate: boolean | null;
76
+ [key: string]: unknown;
77
+ }
78
+ /**
79
+ * Build the confirmation body from a Paystack `GET /transaction/verify/{reference}` response (or its `data`),
80
+ * without sending it. Returns null when there is nothing to send. Reads only the reference, status, amount,
81
+ * currency, time, `domain` and `metadata.cg_click_id`.
82
+ *
83
+ * @example
84
+ * const body = buildFromPaystack(verifyResponse); // { provider: 'paystack', reference, status: 'success', amount: '7500', ... }
85
+ */
86
+ export declare function buildFromPaystack(response: unknown, options?: PaymentHelperOptions): PaymentConfirmationBody | null;
87
+ /**
88
+ * Build the confirmation body from a Flutterwave v3 verify response (`GET /v3/transactions/{id}/verify` or
89
+ * `verify_by_reference`, or its `data`), without sending it. Returns null when there is nothing to send.
90
+ *
91
+ * @example
92
+ * const body = buildFromFlutterwave(verifyResponse);
93
+ */
94
+ export declare function buildFromFlutterwave(response: unknown, options?: PaymentHelperOptions): PaymentConfirmationBody | null;
95
+ /**
96
+ * Build the confirmation body from a Monnify transaction status response (`GET /api/v2/transactions/{ref}` or
97
+ * the `query?paymentReference=` call, or its `responseBody`; a webhook's `eventData` works too), without sending it.
98
+ * Returns null when there is nothing to send.
99
+ *
100
+ * @example
101
+ * const body = buildFromMonnify(statusResponse);
102
+ */
103
+ export declare function buildFromMonnify(response: unknown, options?: PaymentHelperOptions): PaymentConfirmationBody | null;
104
+ /**
105
+ * Build the confirmation body from a Stripe PaymentIntent (`pi_...`) or Checkout Session (`cs_...`) object,
106
+ * without sending it. Returns null when there is nothing to send (for example a session with
107
+ * `payment_status: 'no_payment_required'`).
108
+ *
109
+ * @example
110
+ * const body = buildFromStripe(paymentIntent);
111
+ */
112
+ export declare function buildFromStripe(object: unknown, options?: PaymentHelperOptions): PaymentConfirmationBody | null;
113
+ /**
114
+ * Payments confirmed by your server. Call these **right after your own server has verified the payment with the
115
+ * gateway**, never with data from the browser or the app. Clikgate matches the confirmation with the Payment goal
116
+ * your website or app reported (`clikgate.goal('order_paid', { provider, reference })`) and counts it with the
117
+ * confirmed amount. Never pass a gateway key: these methods only talk to Clikgate.
118
+ */
119
+ export declare class Payments {
120
+ private readonly core;
121
+ /**
122
+ * Confirm a payment your server has verified (`POST /v1/payments/confirmations`). Also for refunds
123
+ * (`status: 'refunded'`, `amount` = the refunded amount).
124
+ *
125
+ * @example
126
+ * // after your own verification with the gateway:
127
+ * await clikgate.payments.confirm({ provider: Provider.Paystack, reference: 'T_ref_001', status: 'success', amount: '7500.00', currency: 'NGN' });
128
+ */
129
+ confirm(params: PaymentConfirmParams, requestOptions?: RequestOptions): Promise<PaymentConfirmation>;
130
+ private send;
131
+ /**
132
+ * Send a Paystack verify response, right after your own `GET /transaction/verify/{reference}` call.
133
+ * Only the reference, status, amount (÷ 100), currency, time, test flag and `metadata.cg_click_id` are sent.
134
+ * Returns null when there is nothing to send.
135
+ *
136
+ * @example
137
+ * const verify = await paystack.get(`/transaction/verify/${reference}`); // your own call, with your key
138
+ * await clikgate.payments.fromPaystack(verify, { goal: 'order_paid' });
139
+ */
140
+ fromPaystack(response: unknown, options?: PaymentHelperOptions, requestOptions?: RequestOptions): Promise<PaymentConfirmation | null>;
141
+ /**
142
+ * Send a Flutterwave verify response, right after your own `GET /v3/transactions/{id}/verify` call.
143
+ *
144
+ * @example
145
+ * const verify = await flutterwave.get(`/v3/transactions/${id}/verify`);
146
+ * await clikgate.payments.fromFlutterwave(verify);
147
+ */
148
+ fromFlutterwave(response: unknown, options?: PaymentHelperOptions, requestOptions?: RequestOptions): Promise<PaymentConfirmation | null>;
149
+ /**
150
+ * Send a Monnify transaction status response, right after your own `GET /api/v2/transactions/{ref}` call.
151
+ *
152
+ * @example
153
+ * const status = await monnify.get(`/api/v2/transactions/${encodeURIComponent(transactionReference)}`);
154
+ * await clikgate.payments.fromMonnify(status);
155
+ */
156
+ fromMonnify(response: unknown, options?: PaymentHelperOptions, requestOptions?: RequestOptions): Promise<PaymentConfirmation | null>;
157
+ /**
158
+ * Send a Stripe PaymentIntent or Checkout Session you have retrieved or received in a webhook you verified.
159
+ * A session with `no_payment_required` sends nothing and returns null.
160
+ *
161
+ * @example
162
+ * const intent = await stripe.paymentIntents.retrieve(id);
163
+ * await clikgate.payments.fromStripe(intent);
164
+ */
165
+ fromStripe(object: unknown, options?: PaymentHelperOptions, requestOptions?: RequestOptions): Promise<PaymentConfirmation | null>;
166
+ /** {@inheritDoc buildFromPaystack} */
167
+ buildFromPaystack(response: unknown, options?: PaymentHelperOptions): PaymentConfirmationBody | null;
168
+ /** {@inheritDoc buildFromFlutterwave} */
169
+ buildFromFlutterwave(response: unknown, options?: PaymentHelperOptions): PaymentConfirmationBody | null;
170
+ /** {@inheritDoc buildFromMonnify} */
171
+ buildFromMonnify(response: unknown, options?: PaymentHelperOptions): PaymentConfirmationBody | null;
172
+ /** {@inheritDoc buildFromStripe} */
173
+ buildFromStripe(object: unknown, options?: PaymentHelperOptions): PaymentConfirmationBody | null;
174
+ }