@proxy-checkout/server-js 0.0.8-prx-109.82.1 → 0.0.8-prx-120.90.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.
package/README.md CHANGED
@@ -114,6 +114,10 @@ if (event.type === "subscription.renewed") {
114
114
  }
115
115
  ```
116
116
 
117
+ `PROXY_WEBHOOK_EVENT_TYPES` and the `isProxy*Event` predicates also cover initial payment refunds
118
+ and observation-only Shopify reconciliation/renewal/refund/fulfillment events. Shopify observation events do not
119
+ initiate a commerce mutation or imply provisioning; inspect their verified `event.data` payload.
120
+
117
121
  Production calls default to `https://api.proxycheckout.com`. Tests, local
118
122
  development, and previews can pass `apiHost`.
119
123
 
@@ -8,6 +8,6 @@ export { type CreateProxySessionHandoffInput, type CreateProxySessionInput, type
8
8
  export { type MerchantProxySubscription, ProxySubscriptionsResource, type ProxySubscriptionWithSession, type ProxySubscriptionWithUntypedSession, proxyCheckoutSubscriptionEndpoints, } from "./subscriptions.js";
9
9
  export type { JsonObject, JsonPrimitive, JsonValue, ProxyCheckoutFetch, ProxyCheckoutServerClientOptions, ProxyCheckoutServerRequestOptions, } from "./types.js";
10
10
  export { proxyCheckoutServerSdkName, proxyCheckoutServerSdkUserAgent, proxyCheckoutServerSdkVersion, } from "./version.js";
11
- export { isProxyPaymentAttemptEvent, isProxySessionEvent, isProxySubscriptionEvent, PROXY_WEBHOOK_EVENT_TYPES, type ProxyWebhookEventType, } from "./webhook-events.js";
11
+ export { isProxyPaymentAttemptEvent, isProxySessionEvent, isProxyShopifyEvent, isProxySubscriptionEvent, PROXY_WEBHOOK_EVENT_TYPES, type ProxyWebhookEventType, } from "./webhook-events.js";
12
12
  export { PROXY_WEBHOOK_RETRY_AFTER_SECONDS, type ProxyWebhookClaimResult, type ProxyWebhookHandlerOptions, type ProxyWebhookOutcome, type ProxyWebhookPayloadInput, type ProxyWebhookProcessRecord, type ProxyWebhookProcessResult, type ProxyWebhookProvisioningFailure, type ProxyWebhookProvisioningSuccess, type ProxyWebhookProvisioningSuccessResult, type ProxyWebhookRequestInput, type ProxyWebhookStore, ProxyWebhooksResource, } from "./webhook-handler.js";
13
13
  export { type ConstructProxyWebhookEventInput, type CreateWebhookEndpointInput, constructProxyWebhookEvent, PROXY_SIGNATURE_HEADER, ProxyWebhookEndpointsResource, type ProxyWebhookEvent, ProxyWebhookSignatureVerificationError, proxyCheckoutWebhookEndpointEndpoints, type RotateWebhookEndpointSecretInput, type UpdateWebhookEndpointInput, type VerifyProxyWebhookSignatureInput, verifyProxyWebhookSignature, type WebhookEndpoint, type WebhookEndpointSecretResult, } from "./webhooks.js";
@@ -8,6 +8,6 @@ export { type CreateProxySessionHandoffInput, type CreateProxySessionInput, type
8
8
  export { type MerchantProxySubscription, ProxySubscriptionsResource, type ProxySubscriptionWithSession, type ProxySubscriptionWithUntypedSession, proxyCheckoutSubscriptionEndpoints, } from "./subscriptions.js";
9
9
  export type { JsonObject, JsonPrimitive, JsonValue, ProxyCheckoutFetch, ProxyCheckoutServerClientOptions, ProxyCheckoutServerRequestOptions, } from "./types.js";
10
10
  export { proxyCheckoutServerSdkName, proxyCheckoutServerSdkUserAgent, proxyCheckoutServerSdkVersion, } from "./version.js";
11
- export { isProxyPaymentAttemptEvent, isProxySessionEvent, isProxySubscriptionEvent, PROXY_WEBHOOK_EVENT_TYPES, type ProxyWebhookEventType, } from "./webhook-events.js";
11
+ export { isProxyPaymentAttemptEvent, isProxySessionEvent, isProxyShopifyEvent, isProxySubscriptionEvent, PROXY_WEBHOOK_EVENT_TYPES, type ProxyWebhookEventType, } from "./webhook-events.js";
12
12
  export { PROXY_WEBHOOK_RETRY_AFTER_SECONDS, type ProxyWebhookClaimResult, type ProxyWebhookHandlerOptions, type ProxyWebhookOutcome, type ProxyWebhookPayloadInput, type ProxyWebhookProcessRecord, type ProxyWebhookProcessResult, type ProxyWebhookProvisioningFailure, type ProxyWebhookProvisioningSuccess, type ProxyWebhookProvisioningSuccessResult, type ProxyWebhookRequestInput, type ProxyWebhookStore, ProxyWebhooksResource, } from "./webhook-handler.js";
13
13
  export { type ConstructProxyWebhookEventInput, type CreateWebhookEndpointInput, constructProxyWebhookEvent, PROXY_SIGNATURE_HEADER, ProxyWebhookEndpointsResource, type ProxyWebhookEvent, ProxyWebhookSignatureVerificationError, proxyCheckoutWebhookEndpointEndpoints, type RotateWebhookEndpointSecretInput, type UpdateWebhookEndpointInput, type VerifyProxyWebhookSignatureInput, verifyProxyWebhookSignature, type WebhookEndpoint, type WebhookEndpointSecretResult, } from "./webhooks.js";
package/dist/cjs/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.verifyProxyWebhookSignature = exports.proxyCheckoutWebhookEndpointEndpoints = exports.ProxyWebhookSignatureVerificationError = exports.ProxyWebhookEndpointsResource = exports.PROXY_SIGNATURE_HEADER = exports.constructProxyWebhookEvent = exports.ProxyWebhooksResource = exports.PROXY_WEBHOOK_RETRY_AFTER_SECONDS = exports.PROXY_WEBHOOK_EVENT_TYPES = exports.isProxySubscriptionEvent = exports.isProxySessionEvent = exports.isProxyPaymentAttemptEvent = exports.proxyCheckoutServerSdkVersion = exports.proxyCheckoutServerSdkUserAgent = exports.proxyCheckoutServerSdkName = exports.proxyCheckoutSubscriptionEndpoints = exports.ProxySubscriptionsResource = exports.proxyCheckoutServerEndpoints = exports.ProxySessionsResource = exports.ProxySessionCartResource = exports.TERMINAL_SESSION_STATUSES = exports.subscriptionWillRenew = exports.subscriptionAccessEndsAt = exports.requireProxyDate = exports.parseOptionalProxyDate = exports.PROVISIONABLE_SESSION_STATUSES = exports.isSubscriptionPaymentAtRisk = exports.isSubscriptionEnded = exports.isSessionTerminal = exports.isSessionProvisionable = exports.ENDED_SUBSCRIPTION_STATUSES = exports.AT_RISK_SUBSCRIPTION_STATUSES = exports.ProxyEventsResource = exports.ProxyCheckoutValidationError = exports.ProxyCheckoutApiError = exports.PROXY_SESSION_NOT_FOUND_ERROR_CODE = exports.isProxySessionNotFoundError = exports.assertSubscriptionMatchesSession = exports.assertCartBuyerReference = exports.ProxyCheckoutServerClient = exports.createProxyCheckoutServerClient = exports.parseProxyCart = void 0;
3
+ exports.verifyProxyWebhookSignature = exports.proxyCheckoutWebhookEndpointEndpoints = exports.ProxyWebhookSignatureVerificationError = exports.ProxyWebhookEndpointsResource = exports.PROXY_SIGNATURE_HEADER = exports.constructProxyWebhookEvent = exports.ProxyWebhooksResource = exports.PROXY_WEBHOOK_RETRY_AFTER_SECONDS = exports.PROXY_WEBHOOK_EVENT_TYPES = exports.isProxySubscriptionEvent = exports.isProxyShopifyEvent = exports.isProxySessionEvent = exports.isProxyPaymentAttemptEvent = exports.proxyCheckoutServerSdkVersion = exports.proxyCheckoutServerSdkUserAgent = exports.proxyCheckoutServerSdkName = exports.proxyCheckoutSubscriptionEndpoints = exports.ProxySubscriptionsResource = exports.proxyCheckoutServerEndpoints = exports.ProxySessionsResource = exports.ProxySessionCartResource = exports.TERMINAL_SESSION_STATUSES = exports.subscriptionWillRenew = exports.subscriptionAccessEndsAt = exports.requireProxyDate = exports.parseOptionalProxyDate = exports.PROVISIONABLE_SESSION_STATUSES = exports.isSubscriptionPaymentAtRisk = exports.isSubscriptionEnded = exports.isSessionTerminal = exports.isSessionProvisionable = exports.ENDED_SUBSCRIPTION_STATUSES = exports.AT_RISK_SUBSCRIPTION_STATUSES = exports.ProxyEventsResource = exports.ProxyCheckoutValidationError = exports.ProxyCheckoutApiError = exports.PROXY_SESSION_NOT_FOUND_ERROR_CODE = exports.isProxySessionNotFoundError = exports.assertSubscriptionMatchesSession = exports.assertCartBuyerReference = exports.ProxyCheckoutServerClient = exports.createProxyCheckoutServerClient = exports.parseProxyCart = void 0;
4
4
  var cart_js_1 = require("./cart.js");
5
5
  Object.defineProperty(exports, "parseProxyCart", { enumerable: true, get: function () { return cart_js_1.parseProxyCart; } });
6
6
  var client_js_1 = require("./client.js");
@@ -43,6 +43,7 @@ Object.defineProperty(exports, "proxyCheckoutServerSdkVersion", { enumerable: tr
43
43
  var webhook_events_js_1 = require("./webhook-events.js");
44
44
  Object.defineProperty(exports, "isProxyPaymentAttemptEvent", { enumerable: true, get: function () { return webhook_events_js_1.isProxyPaymentAttemptEvent; } });
45
45
  Object.defineProperty(exports, "isProxySessionEvent", { enumerable: true, get: function () { return webhook_events_js_1.isProxySessionEvent; } });
46
+ Object.defineProperty(exports, "isProxyShopifyEvent", { enumerable: true, get: function () { return webhook_events_js_1.isProxyShopifyEvent; } });
46
47
  Object.defineProperty(exports, "isProxySubscriptionEvent", { enumerable: true, get: function () { return webhook_events_js_1.isProxySubscriptionEvent; } });
47
48
  Object.defineProperty(exports, "PROXY_WEBHOOK_EVENT_TYPES", { enumerable: true, get: function () { return webhook_events_js_1.PROXY_WEBHOOK_EVENT_TYPES; } });
48
49
  var webhook_handler_js_1 = require("./webhook-handler.js");
@@ -1,3 +1,3 @@
1
1
  export declare const proxyCheckoutServerSdkName = "@proxy-checkout/server-js";
2
- export declare const proxyCheckoutServerSdkVersion = "0.0.8-prx-109.82.1";
3
- export declare const proxyCheckoutServerSdkUserAgent = "@proxy-checkout/server-js/0.0.8-prx-109.82.1";
2
+ export declare const proxyCheckoutServerSdkVersion = "0.0.8-prx-120.90.1";
3
+ export declare const proxyCheckoutServerSdkUserAgent = "@proxy-checkout/server-js/0.0.8-prx-120.90.1";
@@ -1,3 +1,3 @@
1
1
  export declare const proxyCheckoutServerSdkName = "@proxy-checkout/server-js";
2
- export declare const proxyCheckoutServerSdkVersion = "0.0.8-prx-109.82.1";
3
- export declare const proxyCheckoutServerSdkUserAgent = "@proxy-checkout/server-js/0.0.8-prx-109.82.1";
2
+ export declare const proxyCheckoutServerSdkVersion = "0.0.8-prx-120.90.1";
3
+ export declare const proxyCheckoutServerSdkUserAgent = "@proxy-checkout/server-js/0.0.8-prx-120.90.1";
@@ -2,5 +2,5 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.proxyCheckoutServerSdkUserAgent = exports.proxyCheckoutServerSdkVersion = exports.proxyCheckoutServerSdkName = void 0;
4
4
  exports.proxyCheckoutServerSdkName = "@proxy-checkout/server-js";
5
- exports.proxyCheckoutServerSdkVersion = "0.0.8-prx-109.82.1";
5
+ exports.proxyCheckoutServerSdkVersion = "0.0.8-prx-120.90.1";
6
6
  exports.proxyCheckoutServerSdkUserAgent = `${exports.proxyCheckoutServerSdkName}/${exports.proxyCheckoutServerSdkVersion}`;
@@ -8,6 +8,8 @@
8
8
  export declare const PROXY_WEBHOOK_EVENT_TYPES: {
9
9
  readonly paymentAttemptCancelled: "payment_attempt.cancelled";
10
10
  readonly paymentAttemptFailed: "payment_attempt.failed";
11
+ readonly paymentAttemptPartiallyRefunded: "payment_attempt.partially_refunded";
12
+ readonly paymentAttemptRefunded: "payment_attempt.refunded";
11
13
  readonly paymentAttemptSucceeded: "payment_attempt.succeeded";
12
14
  readonly sessionCancelled: "proxy_session.cancelled";
13
15
  readonly sessionExpired: "proxy_session.expired";
@@ -15,6 +17,10 @@ export declare const PROXY_WEBHOOK_EVENT_TYPES: {
15
17
  readonly sessionMerchantActionRequired: "proxy_session.merchant_action_required";
16
18
  readonly sessionPaid: "proxy_session.paid";
17
19
  readonly sessionProvisionable: "proxy_session.provisionable";
20
+ readonly shopifyFulfillmentObserved: "shopify.fulfillment_observed";
21
+ readonly shopifyRefundObserved: "shopify.refund_observed";
22
+ readonly shopifySubscriptionPaymentObserved: "shopify.subscription_payment_observed";
23
+ readonly shopifySubscriptionRefundObserved: "shopify.subscription_refund_observed";
18
24
  readonly subscriptionCancelled: "subscription.cancelled";
19
25
  readonly subscriptionCancelScheduled: "subscription.cancel_scheduled";
20
26
  readonly subscriptionPaymentFailed: "subscription.payment_failed";
@@ -27,3 +33,5 @@ export declare function isProxySessionEvent(eventType: string): boolean;
27
33
  export declare function isProxySubscriptionEvent(eventType: string): boolean;
28
34
  /** True for `payment_attempt.*` events. */
29
35
  export declare function isProxyPaymentAttemptEvent(eventType: string): boolean;
36
+ /** True for observation-only `shopify.*` commerce events. */
37
+ export declare function isProxyShopifyEvent(eventType: string): boolean;
@@ -8,6 +8,8 @@
8
8
  export declare const PROXY_WEBHOOK_EVENT_TYPES: {
9
9
  readonly paymentAttemptCancelled: "payment_attempt.cancelled";
10
10
  readonly paymentAttemptFailed: "payment_attempt.failed";
11
+ readonly paymentAttemptPartiallyRefunded: "payment_attempt.partially_refunded";
12
+ readonly paymentAttemptRefunded: "payment_attempt.refunded";
11
13
  readonly paymentAttemptSucceeded: "payment_attempt.succeeded";
12
14
  readonly sessionCancelled: "proxy_session.cancelled";
13
15
  readonly sessionExpired: "proxy_session.expired";
@@ -15,6 +17,10 @@ export declare const PROXY_WEBHOOK_EVENT_TYPES: {
15
17
  readonly sessionMerchantActionRequired: "proxy_session.merchant_action_required";
16
18
  readonly sessionPaid: "proxy_session.paid";
17
19
  readonly sessionProvisionable: "proxy_session.provisionable";
20
+ readonly shopifyFulfillmentObserved: "shopify.fulfillment_observed";
21
+ readonly shopifyRefundObserved: "shopify.refund_observed";
22
+ readonly shopifySubscriptionPaymentObserved: "shopify.subscription_payment_observed";
23
+ readonly shopifySubscriptionRefundObserved: "shopify.subscription_refund_observed";
18
24
  readonly subscriptionCancelled: "subscription.cancelled";
19
25
  readonly subscriptionCancelScheduled: "subscription.cancel_scheduled";
20
26
  readonly subscriptionPaymentFailed: "subscription.payment_failed";
@@ -27,3 +33,5 @@ export declare function isProxySessionEvent(eventType: string): boolean;
27
33
  export declare function isProxySubscriptionEvent(eventType: string): boolean;
28
34
  /** True for `payment_attempt.*` events. */
29
35
  export declare function isProxyPaymentAttemptEvent(eventType: string): boolean;
36
+ /** True for observation-only `shopify.*` commerce events. */
37
+ export declare function isProxyShopifyEvent(eventType: string): boolean;
@@ -11,9 +11,12 @@ exports.PROXY_WEBHOOK_EVENT_TYPES = void 0;
11
11
  exports.isProxySessionEvent = isProxySessionEvent;
12
12
  exports.isProxySubscriptionEvent = isProxySubscriptionEvent;
13
13
  exports.isProxyPaymentAttemptEvent = isProxyPaymentAttemptEvent;
14
+ exports.isProxyShopifyEvent = isProxyShopifyEvent;
14
15
  exports.PROXY_WEBHOOK_EVENT_TYPES = {
15
16
  paymentAttemptCancelled: "payment_attempt.cancelled",
16
17
  paymentAttemptFailed: "payment_attempt.failed",
18
+ paymentAttemptPartiallyRefunded: "payment_attempt.partially_refunded",
19
+ paymentAttemptRefunded: "payment_attempt.refunded",
17
20
  paymentAttemptSucceeded: "payment_attempt.succeeded",
18
21
  sessionCancelled: "proxy_session.cancelled",
19
22
  sessionExpired: "proxy_session.expired",
@@ -21,6 +24,10 @@ exports.PROXY_WEBHOOK_EVENT_TYPES = {
21
24
  sessionMerchantActionRequired: "proxy_session.merchant_action_required",
22
25
  sessionPaid: "proxy_session.paid",
23
26
  sessionProvisionable: "proxy_session.provisionable",
27
+ shopifyFulfillmentObserved: "shopify.fulfillment_observed",
28
+ shopifyRefundObserved: "shopify.refund_observed",
29
+ shopifySubscriptionPaymentObserved: "shopify.subscription_payment_observed",
30
+ shopifySubscriptionRefundObserved: "shopify.subscription_refund_observed",
24
31
  subscriptionCancelled: "subscription.cancelled",
25
32
  subscriptionCancelScheduled: "subscription.cancel_scheduled",
26
33
  subscriptionPaymentFailed: "subscription.payment_failed",
@@ -43,8 +50,16 @@ const SUBSCRIPTION_EVENT_TYPES = new Set([
43
50
  const PAYMENT_ATTEMPT_EVENT_TYPES = new Set([
44
51
  exports.PROXY_WEBHOOK_EVENT_TYPES.paymentAttemptCancelled,
45
52
  exports.PROXY_WEBHOOK_EVENT_TYPES.paymentAttemptFailed,
53
+ exports.PROXY_WEBHOOK_EVENT_TYPES.paymentAttemptPartiallyRefunded,
54
+ exports.PROXY_WEBHOOK_EVENT_TYPES.paymentAttemptRefunded,
46
55
  exports.PROXY_WEBHOOK_EVENT_TYPES.paymentAttemptSucceeded,
47
56
  ]);
57
+ const SHOPIFY_EVENT_TYPES = new Set([
58
+ exports.PROXY_WEBHOOK_EVENT_TYPES.shopifyFulfillmentObserved,
59
+ exports.PROXY_WEBHOOK_EVENT_TYPES.shopifyRefundObserved,
60
+ exports.PROXY_WEBHOOK_EVENT_TYPES.shopifySubscriptionPaymentObserved,
61
+ exports.PROXY_WEBHOOK_EVENT_TYPES.shopifySubscriptionRefundObserved,
62
+ ]);
48
63
  /** True for `proxy_session.*` events. */
49
64
  function isProxySessionEvent(eventType) {
50
65
  return SESSION_EVENT_TYPES.has(eventType);
@@ -57,3 +72,7 @@ function isProxySubscriptionEvent(eventType) {
57
72
  function isProxyPaymentAttemptEvent(eventType) {
58
73
  return PAYMENT_ATTEMPT_EVENT_TYPES.has(eventType);
59
74
  }
75
+ /** True for observation-only `shopify.*` commerce events. */
76
+ function isProxyShopifyEvent(eventType) {
77
+ return SHOPIFY_EVENT_TYPES.has(eventType);
78
+ }
@@ -8,6 +8,6 @@ export { type CreateProxySessionHandoffInput, type CreateProxySessionInput, type
8
8
  export { type MerchantProxySubscription, ProxySubscriptionsResource, type ProxySubscriptionWithSession, type ProxySubscriptionWithUntypedSession, proxyCheckoutSubscriptionEndpoints, } from "./subscriptions.js";
9
9
  export type { JsonObject, JsonPrimitive, JsonValue, ProxyCheckoutFetch, ProxyCheckoutServerClientOptions, ProxyCheckoutServerRequestOptions, } from "./types.js";
10
10
  export { proxyCheckoutServerSdkName, proxyCheckoutServerSdkUserAgent, proxyCheckoutServerSdkVersion, } from "./version.js";
11
- export { isProxyPaymentAttemptEvent, isProxySessionEvent, isProxySubscriptionEvent, PROXY_WEBHOOK_EVENT_TYPES, type ProxyWebhookEventType, } from "./webhook-events.js";
11
+ export { isProxyPaymentAttemptEvent, isProxySessionEvent, isProxyShopifyEvent, isProxySubscriptionEvent, PROXY_WEBHOOK_EVENT_TYPES, type ProxyWebhookEventType, } from "./webhook-events.js";
12
12
  export { PROXY_WEBHOOK_RETRY_AFTER_SECONDS, type ProxyWebhookClaimResult, type ProxyWebhookHandlerOptions, type ProxyWebhookOutcome, type ProxyWebhookPayloadInput, type ProxyWebhookProcessRecord, type ProxyWebhookProcessResult, type ProxyWebhookProvisioningFailure, type ProxyWebhookProvisioningSuccess, type ProxyWebhookProvisioningSuccessResult, type ProxyWebhookRequestInput, type ProxyWebhookStore, ProxyWebhooksResource, } from "./webhook-handler.js";
13
13
  export { type ConstructProxyWebhookEventInput, type CreateWebhookEndpointInput, constructProxyWebhookEvent, PROXY_SIGNATURE_HEADER, ProxyWebhookEndpointsResource, type ProxyWebhookEvent, ProxyWebhookSignatureVerificationError, proxyCheckoutWebhookEndpointEndpoints, type RotateWebhookEndpointSecretInput, type UpdateWebhookEndpointInput, type VerifyProxyWebhookSignatureInput, verifyProxyWebhookSignature, type WebhookEndpoint, type WebhookEndpointSecretResult, } from "./webhooks.js";
package/dist/esm/index.js CHANGED
@@ -7,6 +7,6 @@ export { AT_RISK_SUBSCRIPTION_STATUSES, ENDED_SUBSCRIPTION_STATUSES, isSessionPr
7
7
  export { ProxySessionCartResource, ProxySessionsResource, proxyCheckoutServerEndpoints, } from "./sessions.js";
8
8
  export { ProxySubscriptionsResource, proxyCheckoutSubscriptionEndpoints, } from "./subscriptions.js";
9
9
  export { proxyCheckoutServerSdkName, proxyCheckoutServerSdkUserAgent, proxyCheckoutServerSdkVersion, } from "./version.js";
10
- export { isProxyPaymentAttemptEvent, isProxySessionEvent, isProxySubscriptionEvent, PROXY_WEBHOOK_EVENT_TYPES, } from "./webhook-events.js";
10
+ export { isProxyPaymentAttemptEvent, isProxySessionEvent, isProxyShopifyEvent, isProxySubscriptionEvent, PROXY_WEBHOOK_EVENT_TYPES, } from "./webhook-events.js";
11
11
  export { PROXY_WEBHOOK_RETRY_AFTER_SECONDS, ProxyWebhooksResource, } from "./webhook-handler.js";
12
12
  export { constructProxyWebhookEvent, PROXY_SIGNATURE_HEADER, ProxyWebhookEndpointsResource, ProxyWebhookSignatureVerificationError, proxyCheckoutWebhookEndpointEndpoints, verifyProxyWebhookSignature, } from "./webhooks.js";
@@ -1,3 +1,3 @@
1
1
  export declare const proxyCheckoutServerSdkName = "@proxy-checkout/server-js";
2
- export declare const proxyCheckoutServerSdkVersion = "0.0.8-prx-109.82.1";
3
- export declare const proxyCheckoutServerSdkUserAgent = "@proxy-checkout/server-js/0.0.8-prx-109.82.1";
2
+ export declare const proxyCheckoutServerSdkVersion = "0.0.8-prx-120.90.1";
3
+ export declare const proxyCheckoutServerSdkUserAgent = "@proxy-checkout/server-js/0.0.8-prx-120.90.1";
@@ -1,3 +1,3 @@
1
1
  export const proxyCheckoutServerSdkName = "@proxy-checkout/server-js";
2
- export const proxyCheckoutServerSdkVersion = "0.0.8-prx-109.82.1";
2
+ export const proxyCheckoutServerSdkVersion = "0.0.8-prx-120.90.1";
3
3
  export const proxyCheckoutServerSdkUserAgent = `${proxyCheckoutServerSdkName}/${proxyCheckoutServerSdkVersion}`;
@@ -8,6 +8,8 @@
8
8
  export declare const PROXY_WEBHOOK_EVENT_TYPES: {
9
9
  readonly paymentAttemptCancelled: "payment_attempt.cancelled";
10
10
  readonly paymentAttemptFailed: "payment_attempt.failed";
11
+ readonly paymentAttemptPartiallyRefunded: "payment_attempt.partially_refunded";
12
+ readonly paymentAttemptRefunded: "payment_attempt.refunded";
11
13
  readonly paymentAttemptSucceeded: "payment_attempt.succeeded";
12
14
  readonly sessionCancelled: "proxy_session.cancelled";
13
15
  readonly sessionExpired: "proxy_session.expired";
@@ -15,6 +17,10 @@ export declare const PROXY_WEBHOOK_EVENT_TYPES: {
15
17
  readonly sessionMerchantActionRequired: "proxy_session.merchant_action_required";
16
18
  readonly sessionPaid: "proxy_session.paid";
17
19
  readonly sessionProvisionable: "proxy_session.provisionable";
20
+ readonly shopifyFulfillmentObserved: "shopify.fulfillment_observed";
21
+ readonly shopifyRefundObserved: "shopify.refund_observed";
22
+ readonly shopifySubscriptionPaymentObserved: "shopify.subscription_payment_observed";
23
+ readonly shopifySubscriptionRefundObserved: "shopify.subscription_refund_observed";
18
24
  readonly subscriptionCancelled: "subscription.cancelled";
19
25
  readonly subscriptionCancelScheduled: "subscription.cancel_scheduled";
20
26
  readonly subscriptionPaymentFailed: "subscription.payment_failed";
@@ -27,3 +33,5 @@ export declare function isProxySessionEvent(eventType: string): boolean;
27
33
  export declare function isProxySubscriptionEvent(eventType: string): boolean;
28
34
  /** True for `payment_attempt.*` events. */
29
35
  export declare function isProxyPaymentAttemptEvent(eventType: string): boolean;
36
+ /** True for observation-only `shopify.*` commerce events. */
37
+ export declare function isProxyShopifyEvent(eventType: string): boolean;
@@ -8,6 +8,8 @@
8
8
  export const PROXY_WEBHOOK_EVENT_TYPES = {
9
9
  paymentAttemptCancelled: "payment_attempt.cancelled",
10
10
  paymentAttemptFailed: "payment_attempt.failed",
11
+ paymentAttemptPartiallyRefunded: "payment_attempt.partially_refunded",
12
+ paymentAttemptRefunded: "payment_attempt.refunded",
11
13
  paymentAttemptSucceeded: "payment_attempt.succeeded",
12
14
  sessionCancelled: "proxy_session.cancelled",
13
15
  sessionExpired: "proxy_session.expired",
@@ -15,6 +17,10 @@ export const PROXY_WEBHOOK_EVENT_TYPES = {
15
17
  sessionMerchantActionRequired: "proxy_session.merchant_action_required",
16
18
  sessionPaid: "proxy_session.paid",
17
19
  sessionProvisionable: "proxy_session.provisionable",
20
+ shopifyFulfillmentObserved: "shopify.fulfillment_observed",
21
+ shopifyRefundObserved: "shopify.refund_observed",
22
+ shopifySubscriptionPaymentObserved: "shopify.subscription_payment_observed",
23
+ shopifySubscriptionRefundObserved: "shopify.subscription_refund_observed",
18
24
  subscriptionCancelled: "subscription.cancelled",
19
25
  subscriptionCancelScheduled: "subscription.cancel_scheduled",
20
26
  subscriptionPaymentFailed: "subscription.payment_failed",
@@ -37,8 +43,16 @@ const SUBSCRIPTION_EVENT_TYPES = new Set([
37
43
  const PAYMENT_ATTEMPT_EVENT_TYPES = new Set([
38
44
  PROXY_WEBHOOK_EVENT_TYPES.paymentAttemptCancelled,
39
45
  PROXY_WEBHOOK_EVENT_TYPES.paymentAttemptFailed,
46
+ PROXY_WEBHOOK_EVENT_TYPES.paymentAttemptPartiallyRefunded,
47
+ PROXY_WEBHOOK_EVENT_TYPES.paymentAttemptRefunded,
40
48
  PROXY_WEBHOOK_EVENT_TYPES.paymentAttemptSucceeded,
41
49
  ]);
50
+ const SHOPIFY_EVENT_TYPES = new Set([
51
+ PROXY_WEBHOOK_EVENT_TYPES.shopifyFulfillmentObserved,
52
+ PROXY_WEBHOOK_EVENT_TYPES.shopifyRefundObserved,
53
+ PROXY_WEBHOOK_EVENT_TYPES.shopifySubscriptionPaymentObserved,
54
+ PROXY_WEBHOOK_EVENT_TYPES.shopifySubscriptionRefundObserved,
55
+ ]);
42
56
  /** True for `proxy_session.*` events. */
43
57
  export function isProxySessionEvent(eventType) {
44
58
  return SESSION_EVENT_TYPES.has(eventType);
@@ -51,3 +65,7 @@ export function isProxySubscriptionEvent(eventType) {
51
65
  export function isProxyPaymentAttemptEvent(eventType) {
52
66
  return PAYMENT_ATTEMPT_EVENT_TYPES.has(eventType);
53
67
  }
68
+ /** True for observation-only `shopify.*` commerce events. */
69
+ export function isProxyShopifyEvent(eventType) {
70
+ return SHOPIFY_EVENT_TYPES.has(eventType);
71
+ }
package/package.json CHANGED
@@ -7,7 +7,7 @@
7
7
  "sideEffects": false,
8
8
  "type": "module",
9
9
  "types": "./dist/esm/index.d.ts",
10
- "version": "0.0.8-prx-109.82.1",
10
+ "version": "0.0.8-prx-120.90.1",
11
11
  "devDependencies": {
12
12
  "@types/node": "^24.12.4",
13
13
  "@vitest/coverage-v8": "4.1.7",