@funnelsgrove/runtime 0.1.62 → 0.1.63

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.
@@ -74,6 +74,7 @@ export type OfferSetRuntimeDiscount = {
74
74
  readonly previousDiscountPercent: number;
75
75
  };
76
76
  export type OfferSetRuntimePlanOverrides = {
77
+ offerSetKey?: string;
77
78
  projectPlanId?: string;
78
79
  providerPlanId?: string;
79
80
  paymentMode?: 'one_time';
@@ -179,7 +179,7 @@ export const applyGeneratedOfferSetToPlanCatalog = (baseCatalog, mode, offerSet)
179
179
  if (!key) {
180
180
  continue;
181
181
  }
182
- nextCatalog[key] = Object.assign(Object.assign({}, ((_c = nextCatalog[key]) !== null && _c !== void 0 ? _c : {})), buildGeneratedPlanOverrides(item, mode, getOfferSetItemKind(item) === 'plan' && key === defaultPlanKey));
182
+ nextCatalog[key] = Object.assign(Object.assign(Object.assign({}, ((_c = nextCatalog[key]) !== null && _c !== void 0 ? _c : {})), { offerSetKey: offerSet.key }), buildGeneratedPlanOverrides(item, mode, getOfferSetItemKind(item) === 'plan' && key === defaultPlanKey));
183
183
  }
184
184
  return nextCatalog;
185
185
  };
@@ -72,6 +72,7 @@ export type FunnelSdkUploadPhotoInput = {
72
72
  };
73
73
  export type FunnelSdkCreateHostedCheckoutSessionInput = {
74
74
  planId: string;
75
+ offerSetKey?: string | null;
75
76
  amountCents: number;
76
77
  successUrl: string;
77
78
  cancelUrl: string;
@@ -94,6 +95,7 @@ export type FunnelSdkCreateHostedCheckoutSessionResponse = {
94
95
  };
95
96
  export type FunnelSdkCreateSubscriptionCheckoutInput = {
96
97
  planId: string;
98
+ offerSetKey?: string | null;
97
99
  amountCents: number;
98
100
  returnUrl: string;
99
101
  analyticsMetadata?: Record<string, unknown> | null;
@@ -122,6 +124,7 @@ export type FunnelSdkCreateSubscriptionCheckoutResponse = {
122
124
  };
123
125
  export type FunnelSdkCreateOneTimeCheckoutInput = {
124
126
  planId: string;
127
+ offerSetKey?: string | null;
125
128
  amountCents: number;
126
129
  returnUrl: string;
127
130
  analyticsMetadata?: Record<string, unknown> | null;
@@ -143,6 +146,7 @@ export type FunnelSdkCreateOneTimeCheckoutResponse = {
143
146
  export type FunnelSdkUpdateSubscriptionCheckoutPlanInput = {
144
147
  checkoutSessionId: string;
145
148
  planId: string;
149
+ offerSetKey?: string | null;
146
150
  amountCents: number;
147
151
  analyticsMetadata?: Record<string, unknown> | null;
148
152
  billingInterval?: string | null;
@@ -201,6 +201,7 @@ class FunnelSdkService {
201
201
  return this.postJson('/sdk/public/payments/checkout-session', {
202
202
  runtimeConfig: input.runtimeConfig,
203
203
  body: {
204
+ offerSetKey: input.offerSetKey,
204
205
  planId: input.planId,
205
206
  providerPlanId: input.providerPlanId,
206
207
  title: input.title,
@@ -223,6 +224,7 @@ class FunnelSdkService {
223
224
  return this.postJson('/sdk/public/payments/subscriptions', {
224
225
  runtimeConfig: input.runtimeConfig,
225
226
  body: {
227
+ offerSetKey: input.offerSetKey,
226
228
  planId: input.planId,
227
229
  providerPlanId: input.providerPlanId,
228
230
  title: input.title,
@@ -249,6 +251,7 @@ class FunnelSdkService {
249
251
  return this.postJson('/sdk/public/payments/one-time-checkout', {
250
252
  runtimeConfig: input.runtimeConfig,
251
253
  body: {
254
+ offerSetKey: input.offerSetKey,
252
255
  planId: input.planId,
253
256
  providerPlanId: input.providerPlanId,
254
257
  title: input.title,
@@ -269,6 +272,7 @@ class FunnelSdkService {
269
272
  runtimeConfig: input.runtimeConfig,
270
273
  body: {
271
274
  checkoutSessionId: input.checkoutSessionId,
275
+ offerSetKey: input.offerSetKey,
272
276
  planId: input.planId,
273
277
  providerPlanId: input.providerPlanId,
274
278
  title: input.title,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@funnelsgrove/runtime",
3
- "version": "0.1.62",
3
+ "version": "0.1.63",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/The-Solid-Grove/funnelsgrove.git",