shred-api-client 2.4.5 → 2.4.7

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/dist/index.d.ts CHANGED
@@ -582,7 +582,7 @@ interface IAPI$9 {
582
582
  pause: (ctx: Context) => Promise<boolean>;
583
583
  resume: (ctx: Context) => Promise<boolean>;
584
584
  updatePlan: (ctx: Context, planId: string) => Promise<boolean>;
585
- createCheckout: (planId: string | null, ctx: Context) => Promise<string>;
585
+ createCheckout: (planId: string | null, ctx: Context, callbackUrl?: string) => Promise<string>;
586
586
  getSubscriptionsSummary: (ctx: Context) => Promise<SubscriptionSummary[]>;
587
587
  }
588
588
  declare const Endpoints$8: {
package/dist/index.js CHANGED
@@ -469,7 +469,7 @@ var ZodError = class _ZodError extends Error {
469
469
  return this.issues.length === 0;
470
470
  }
471
471
  flatten(mapper = (issue) => issue.message) {
472
- const fieldErrors = {};
472
+ const fieldErrors = /* @__PURE__ */ Object.create(null);
473
473
  const formErrors = [];
474
474
  for (const sub of this.issues) {
475
475
  if (sub.path.length > 0) {
@@ -3962,7 +3962,7 @@ ZodNaN.create = (params) => {
3962
3962
  ...processCreateParams(params)
3963
3963
  });
3964
3964
  };
3965
- var BRAND = Symbol("zod_brand");
3965
+ var BRAND = /* @__PURE__ */ Symbol("zod_brand");
3966
3966
  var ZodBranded = class extends ZodType {
3967
3967
  _parse(input) {
3968
3968
  const { ctx } = this._processInputParams(input);
@@ -4166,14 +4166,14 @@ var ostring = () => stringType().optional();
4166
4166
  var onumber = () => numberType().optional();
4167
4167
  var oboolean = () => booleanType().optional();
4168
4168
  var coerce = {
4169
- string: (arg) => ZodString.create({ ...arg, coerce: true }),
4170
- number: (arg) => ZodNumber.create({ ...arg, coerce: true }),
4171
- boolean: (arg) => ZodBoolean.create({
4169
+ string: ((arg) => ZodString.create({ ...arg, coerce: true })),
4170
+ number: ((arg) => ZodNumber.create({ ...arg, coerce: true })),
4171
+ boolean: ((arg) => ZodBoolean.create({
4172
4172
  ...arg,
4173
4173
  coerce: true
4174
- }),
4175
- bigint: (arg) => ZodBigInt.create({ ...arg, coerce: true }),
4176
- date: (arg) => ZodDate.create({ ...arg, coerce: true })
4174
+ })),
4175
+ bigint: ((arg) => ZodBigInt.create({ ...arg, coerce: true })),
4176
+ date: ((arg) => ZodDate.create({ ...arg, coerce: true }))
4177
4177
  };
4178
4178
  var NEVER = INVALID;
4179
4179
 
@@ -4600,13 +4600,13 @@ var SubscriptionAPI = class {
4600
4600
  );
4601
4601
  return data;
4602
4602
  }
4603
- async createCheckout(planId, ctx) {
4603
+ async createCheckout(planId, ctx, callbackUrl) {
4604
4604
  const endpointInfo = subscription_exports.Endpoints.Checkout;
4605
4605
  const data = await this.clientHTTP.makeRequest(
4606
4606
  this.env,
4607
4607
  endpointInfo.uri,
4608
4608
  endpointInfo.method,
4609
- { planId },
4609
+ { planId, callbackUrl },
4610
4610
  ctx
4611
4611
  );
4612
4612
  return data.url;