autumn-js 0.0.56 → 0.0.58

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 (41) hide show
  1. package/dist/libraries/backend/{chunk-AMBZYTL6.mjs → chunk-EJQ2IWD7.mjs} +0 -1
  2. package/dist/libraries/backend/express.d.mts +1 -1
  3. package/dist/libraries/backend/express.d.ts +1 -1
  4. package/dist/libraries/backend/express.js +0 -1
  5. package/dist/libraries/backend/express.mjs +1 -1
  6. package/dist/libraries/backend/fastify.js +0 -1
  7. package/dist/libraries/backend/fastify.mjs +1 -1
  8. package/dist/libraries/backend/hono.js +0 -1
  9. package/dist/libraries/backend/hono.mjs +1 -1
  10. package/dist/libraries/backend/next.js +0 -1
  11. package/dist/libraries/backend/next.mjs +1 -1
  12. package/dist/libraries/backend/{referralTypes-DDhcFskJ.d.ts → referralTypes-37gz0Ewe.d.ts} +1 -1
  13. package/dist/libraries/backend/{referralTypes-C613h45A.d.mts → referralTypes-D89v4Fvv.d.mts} +1 -1
  14. package/dist/libraries/backend/remix.js +0 -1
  15. package/dist/libraries/backend/remix.mjs +1 -1
  16. package/dist/libraries/backend/routes/backendRouter.d.mts +1 -1
  17. package/dist/libraries/backend/routes/backendRouter.d.ts +1 -1
  18. package/dist/libraries/backend/routes/backendRouter.js +0 -1
  19. package/dist/libraries/backend/routes/backendRouter.mjs +1 -1
  20. package/dist/libraries/backend/supabase.js +0 -1
  21. package/dist/libraries/backend/supabase.mjs +1 -1
  22. package/dist/libraries/backend/tanstack.js +0 -1
  23. package/dist/libraries/backend/tanstack.mjs +1 -1
  24. package/dist/libraries/backend/utils/withAuth.d.mts +1 -1
  25. package/dist/libraries/backend/utils/withAuth.d.ts +1 -1
  26. package/dist/libraries/react/{chunk-WCVQJZIX.mjs → chunk-5PFGJ7NT.mjs} +2 -23
  27. package/dist/libraries/react/client/types/clientGenTypes.d.mts +1 -1
  28. package/dist/libraries/react/client/types/clientGenTypes.d.ts +1 -1
  29. package/dist/libraries/react/hooks/useAutumn.js +2 -23
  30. package/dist/libraries/react/hooks/useAutumn.mjs +1 -1
  31. package/dist/libraries/react/index.js +2 -23
  32. package/dist/libraries/react/index.mjs +1 -1
  33. package/dist/next/server/{clientEntTypes-BEmFiKV7.d.mts → clientEntTypes-B4rt0N8N.d.mts} +1 -1
  34. package/dist/next/server/{clientEntTypes-DkbiSFnE.d.ts → clientEntTypes-CdnUUQbY.d.ts} +1 -1
  35. package/dist/next/server/cusActions.d.mts +1 -1
  36. package/dist/next/server/cusActions.d.ts +1 -1
  37. package/dist/next/server/genActions.d.mts +1 -1
  38. package/dist/next/server/genActions.d.ts +1 -1
  39. package/dist/sdk/general.d.mts +1 -1
  40. package/dist/sdk/general.d.ts +1 -1
  41. package/package.json +1 -1
@@ -33,7 +33,6 @@ var createCustomerHandler = withAuth({
33
33
  customer_data = {},
34
34
  body
35
35
  }) => {
36
- console.log;
37
36
  let res = await autumn.customers.create({
38
37
  id: customer_id,
39
38
  ...customer_data,
@@ -1,4 +1,4 @@
1
- import { A as Autumn } from './referralTypes-C613h45A.mjs';
1
+ import { A as Autumn } from './referralTypes-D89v4Fvv.mjs';
2
2
  import { AuthResult } from './utils/AuthFunction.mjs';
3
3
  import './response-ByHPEnHs.mjs';
4
4
 
@@ -1,4 +1,4 @@
1
- import { A as Autumn } from './referralTypes-DDhcFskJ.js';
1
+ import { A as Autumn } from './referralTypes-37gz0Ewe.js';
2
2
  import { AuthResult } from './utils/AuthFunction.js';
3
3
  import './response-ByHPEnHs.js';
4
4
 
@@ -749,7 +749,6 @@ var createCustomerHandler = withAuth({
749
749
  customer_data = {},
750
750
  body
751
751
  }) => {
752
- console.log;
753
752
  let res = await autumn.customers.create({
754
753
  id: customer_id,
755
754
  ...customer_data,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  createRouterWithOptions
3
- } from "./chunk-AMBZYTL6.mjs";
3
+ } from "./chunk-EJQ2IWD7.mjs";
4
4
  import "./chunk-EWE7GADM.mjs";
5
5
  import "./chunk-I45FNCR5.mjs";
6
6
  import "./chunk-ONFOZVN3.mjs";
@@ -749,7 +749,6 @@ var createCustomerHandler = withAuth({
749
749
  customer_data = {},
750
750
  body
751
751
  }) => {
752
- console.log;
753
752
  let res = await autumn.customers.create({
754
753
  id: customer_id,
755
754
  ...customer_data,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  createRouterWithOptions
3
- } from "./chunk-AMBZYTL6.mjs";
3
+ } from "./chunk-EJQ2IWD7.mjs";
4
4
  import "./chunk-EWE7GADM.mjs";
5
5
  import "./chunk-I45FNCR5.mjs";
6
6
  import "./chunk-ONFOZVN3.mjs";
@@ -749,7 +749,6 @@ var createCustomerHandler = withAuth({
749
749
  customer_data = {},
750
750
  body
751
751
  }) => {
752
- console.log;
753
752
  let res = await autumn.customers.create({
754
753
  id: customer_id,
755
754
  ...customer_data,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  createRouterWithOptions
3
- } from "./chunk-AMBZYTL6.mjs";
3
+ } from "./chunk-EJQ2IWD7.mjs";
4
4
  import "./chunk-EWE7GADM.mjs";
5
5
  import "./chunk-I45FNCR5.mjs";
6
6
  import "./chunk-ONFOZVN3.mjs";
@@ -4259,7 +4259,6 @@ var createCustomerHandler = withAuth({
4259
4259
  customer_data = {},
4260
4260
  body
4261
4261
  }) => {
4262
- console.log;
4263
4262
  let res = await autumn.customers.create({
4264
4263
  id: customer_id,
4265
4264
  ...customer_data,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  createRouterWithOptions
3
- } from "./chunk-AMBZYTL6.mjs";
3
+ } from "./chunk-EJQ2IWD7.mjs";
4
4
  import "./chunk-EWE7GADM.mjs";
5
5
  import "./chunk-I45FNCR5.mjs";
6
6
  import "./chunk-ONFOZVN3.mjs";
@@ -236,7 +236,7 @@ interface AttachFeatureOptions {
236
236
  }
237
237
  interface AttachParams {
238
238
  customer_id: string;
239
- product_id: string;
239
+ product_id?: string;
240
240
  entity_id?: string;
241
241
  options?: AttachFeatureOptions[];
242
242
  product_ids?: string[];
@@ -236,7 +236,7 @@ interface AttachFeatureOptions {
236
236
  }
237
237
  interface AttachParams {
238
238
  customer_id: string;
239
- product_id: string;
239
+ product_id?: string;
240
240
  entity_id?: string;
241
241
  options?: AttachFeatureOptions[];
242
242
  product_ids?: string[];
@@ -748,7 +748,6 @@ var createCustomerHandler = withAuth({
748
748
  customer_data = {},
749
749
  body
750
750
  }) => {
751
- console.log;
752
751
  let res = await autumn.customers.create({
753
752
  id: customer_id,
754
753
  ...customer_data,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  createRouterWithOptions
3
- } from "./chunk-AMBZYTL6.mjs";
3
+ } from "./chunk-EJQ2IWD7.mjs";
4
4
  import "./chunk-EWE7GADM.mjs";
5
5
  import "./chunk-I45FNCR5.mjs";
6
6
  import "./chunk-ONFOZVN3.mjs";
@@ -1,5 +1,5 @@
1
1
  import * as rou3 from 'rou3';
2
- import { A as Autumn } from '../referralTypes-C613h45A.mjs';
2
+ import { A as Autumn } from '../referralTypes-D89v4Fvv.mjs';
3
3
  import '../response-ByHPEnHs.mjs';
4
4
 
5
5
  type RouteData = {
@@ -1,5 +1,5 @@
1
1
  import * as rou3 from 'rou3';
2
- import { A as Autumn } from '../referralTypes-DDhcFskJ.js';
2
+ import { A as Autumn } from '../referralTypes-37gz0Ewe.js';
3
3
  import '../response-ByHPEnHs.js';
4
4
 
5
5
  type RouteData = {
@@ -747,7 +747,6 @@ var createCustomerHandler = withAuth({
747
747
  customer_data = {},
748
748
  body
749
749
  }) => {
750
- console.log;
751
750
  let res = await autumn.customers.create({
752
751
  id: customer_id,
753
752
  ...customer_data,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  createRouterWithOptions
3
- } from "../chunk-AMBZYTL6.mjs";
3
+ } from "../chunk-EJQ2IWD7.mjs";
4
4
  import "../chunk-EWE7GADM.mjs";
5
5
  import "../chunk-I45FNCR5.mjs";
6
6
  import "../chunk-ONFOZVN3.mjs";
@@ -749,7 +749,6 @@ var createCustomerHandler = withAuth({
749
749
  customer_data = {},
750
750
  body
751
751
  }) => {
752
- console.log;
753
752
  let res = await autumn.customers.create({
754
753
  id: customer_id,
755
754
  ...customer_data,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  createRouterWithOptions
3
- } from "./chunk-AMBZYTL6.mjs";
3
+ } from "./chunk-EJQ2IWD7.mjs";
4
4
  import "./chunk-EWE7GADM.mjs";
5
5
  import "./chunk-I45FNCR5.mjs";
6
6
  import "./chunk-ONFOZVN3.mjs";
@@ -747,7 +747,6 @@ var createCustomerHandler = withAuth({
747
747
  customer_data = {},
748
748
  body
749
749
  }) => {
750
- console.log;
751
750
  let res = await autumn.customers.create({
752
751
  id: customer_id,
753
752
  ...customer_data,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  createRouterWithOptions
3
- } from "./chunk-AMBZYTL6.mjs";
3
+ } from "./chunk-EJQ2IWD7.mjs";
4
4
  import "./chunk-EWE7GADM.mjs";
5
5
  import "./chunk-I45FNCR5.mjs";
6
6
  import "./chunk-ONFOZVN3.mjs";
@@ -1,4 +1,4 @@
1
- import { A as Autumn, C as CustomerData } from '../referralTypes-C613h45A.mjs';
1
+ import { A as Autumn, C as CustomerData } from '../referralTypes-D89v4Fvv.mjs';
2
2
  import { AuthResult } from './AuthFunction.mjs';
3
3
  import '../response-ByHPEnHs.mjs';
4
4
 
@@ -1,4 +1,4 @@
1
- import { A as Autumn, C as CustomerData } from '../referralTypes-DDhcFskJ.js';
1
+ import { A as Autumn, C as CustomerData } from '../referralTypes-37gz0Ewe.js';
2
2
  import { AuthResult } from './AuthFunction.js';
3
3
  import '../response-ByHPEnHs.js';
4
4
 
@@ -50,33 +50,12 @@ var useAutumn = () => {
50
50
  return checkRes;
51
51
  };
52
52
  const attach = async (params) => {
53
- const {
54
- productId,
55
- entityId,
56
- options,
57
- successUrl,
58
- forceCheckout,
59
- metadata,
60
- dialog,
61
- callback,
62
- entityData,
63
- openInNewTab
64
- } = params;
53
+ const { dialog, callback, openInNewTab } = params;
65
54
  if (dialog) {
66
55
  setProdChangeComponent(dialog);
67
56
  return await attachWithDialog(params);
68
57
  }
69
- const result = await client.attach({
70
- productId,
71
- entityId,
72
- successUrl,
73
- forceCheckout,
74
- metadata,
75
- options,
76
- dialog,
77
- callback,
78
- entityData
79
- });
58
+ const result = await client.attach(params);
80
59
  if (result.error) {
81
60
  return result;
82
61
  }
@@ -5,7 +5,7 @@ interface AttachFeatureOptions {
5
5
  quantity: number;
6
6
  }
7
7
  interface AttachParams {
8
- productId: string;
8
+ productId?: string;
9
9
  entityId?: string;
10
10
  options?: AttachFeatureOptions[];
11
11
  productIds?: string[];
@@ -5,7 +5,7 @@ interface AttachFeatureOptions {
5
5
  quantity: number;
6
6
  }
7
7
  interface AttachParams {
8
- productId: string;
8
+ productId?: string;
9
9
  entityId?: string;
10
10
  options?: AttachFeatureOptions[];
11
11
  productIds?: string[];
@@ -716,33 +716,12 @@ var useAutumn = () => {
716
716
  return checkRes;
717
717
  };
718
718
  const attach = async (params) => {
719
- const {
720
- productId,
721
- entityId,
722
- options,
723
- successUrl,
724
- forceCheckout,
725
- metadata,
726
- dialog,
727
- callback,
728
- entityData,
729
- openInNewTab
730
- } = params;
719
+ const { dialog, callback, openInNewTab } = params;
731
720
  if (dialog) {
732
721
  setProdChangeComponent(dialog);
733
722
  return await attachWithDialog(params);
734
723
  }
735
- const result = await client.attach({
736
- productId,
737
- entityId,
738
- successUrl,
739
- forceCheckout,
740
- metadata,
741
- options,
742
- dialog,
743
- callback,
744
- entityData
745
- });
724
+ const result = await client.attach(params);
746
725
  if (result.error) {
747
726
  return result;
748
727
  }
@@ -2,7 +2,7 @@
2
2
 
3
3
  import {
4
4
  useAutumn
5
- } from "../chunk-WCVQJZIX.mjs";
5
+ } from "../chunk-5PFGJ7NT.mjs";
6
6
  import "../chunk-YOMNTOJZ.mjs";
7
7
  import "../chunk-XSMSOCIP.mjs";
8
8
  import "../chunk-LS3NB4DU.mjs";
@@ -1019,33 +1019,12 @@ var useAutumn = () => {
1019
1019
  return checkRes;
1020
1020
  };
1021
1021
  const attach = async (params) => {
1022
- const {
1023
- productId,
1024
- entityId,
1025
- options,
1026
- successUrl,
1027
- forceCheckout,
1028
- metadata,
1029
- dialog,
1030
- callback,
1031
- entityData,
1032
- openInNewTab
1033
- } = params;
1022
+ const { dialog, callback, openInNewTab } = params;
1034
1023
  if (dialog) {
1035
1024
  setProdChangeComponent(dialog);
1036
1025
  return await attachWithDialog(params);
1037
1026
  }
1038
- const result = await client.attach({
1039
- productId,
1040
- entityId,
1041
- successUrl,
1042
- forceCheckout,
1043
- metadata,
1044
- options,
1045
- dialog,
1046
- callback,
1047
- entityData
1048
- });
1027
+ const result = await client.attach(params);
1049
1028
  if (result.error) {
1050
1029
  return result;
1051
1030
  }
@@ -5,7 +5,7 @@ import {
5
5
  } from "./chunk-WFJJYHON.mjs";
6
6
  import {
7
7
  useAutumn
8
- } from "./chunk-WCVQJZIX.mjs";
8
+ } from "./chunk-5PFGJ7NT.mjs";
9
9
  import {
10
10
  useCustomer
11
11
  } from "./chunk-IHEJDHR2.mjs";
@@ -121,7 +121,7 @@ interface AttachFeatureOptions {
121
121
  }
122
122
  interface AttachParams {
123
123
  customer_id: string;
124
- product_id: string;
124
+ product_id?: string;
125
125
  entity_id?: string;
126
126
  options?: AttachFeatureOptions[];
127
127
  product_ids?: string[];
@@ -121,7 +121,7 @@ interface AttachFeatureOptions {
121
121
  }
122
122
  interface AttachParams {
123
123
  customer_id: string;
124
- product_id: string;
124
+ product_id?: string;
125
125
  entity_id?: string;
126
126
  options?: AttachFeatureOptions[];
127
127
  product_ids?: string[];
@@ -1,4 +1,4 @@
1
- import { P as Product, C as CreateProductParams, L as ListProductsParams, G as GetEntityParams, E as Entity, a as CreateEntityParams, b as CreateEntityResult, D as DeleteEntityResult, A as AttachParams, c as AttachResult, U as UsageParams, d as UsageResult, e as CancelParams, f as CancelResult, g as CheckParams, h as CheckResult, T as TrackParams, i as TrackResult, j as GetEntityParams$1 } from './clientEntTypes-BEmFiKV7.mjs';
1
+ import { P as Product, C as CreateProductParams, L as ListProductsParams, G as GetEntityParams, E as Entity, a as CreateEntityParams, b as CreateEntityResult, D as DeleteEntityResult, A as AttachParams, c as AttachResult, U as UsageParams, d as UsageResult, e as CancelParams, f as CancelResult, g as CheckParams, h as CheckResult, T as TrackParams, i as TrackResult, j as GetEntityParams$1 } from './clientEntTypes-B4rt0N8N.mjs';
2
2
  import { R as Result, A as AutumnError } from './response-BCg7kiiN.mjs';
3
3
  import { G as GetCustomerParams, a as Customer, b as CreateCustomerParams, U as UpdateCustomerParams, B as BillingPortalParams, c as BillingPortalResponse, C as CustomerData } from './cusTypes-H9vsIluW.mjs';
4
4
 
@@ -1,4 +1,4 @@
1
- import { P as Product, C as CreateProductParams, L as ListProductsParams, G as GetEntityParams, E as Entity, a as CreateEntityParams, b as CreateEntityResult, D as DeleteEntityResult, A as AttachParams, c as AttachResult, U as UsageParams, d as UsageResult, e as CancelParams, f as CancelResult, g as CheckParams, h as CheckResult, T as TrackParams, i as TrackResult, j as GetEntityParams$1 } from './clientEntTypes-DkbiSFnE.js';
1
+ import { P as Product, C as CreateProductParams, L as ListProductsParams, G as GetEntityParams, E as Entity, a as CreateEntityParams, b as CreateEntityResult, D as DeleteEntityResult, A as AttachParams, c as AttachResult, U as UsageParams, d as UsageResult, e as CancelParams, f as CancelResult, g as CheckParams, h as CheckResult, T as TrackParams, i as TrackResult, j as GetEntityParams$1 } from './clientEntTypes-CdnUUQbY.js';
2
2
  import { R as Result, A as AutumnError } from './response-BCg7kiiN.js';
3
3
  import { G as GetCustomerParams, a as Customer, b as CreateCustomerParams, U as UpdateCustomerParams, B as BillingPortalParams, c as BillingPortalResponse, C as CustomerData } from './cusTypes-H9vsIluW.js';
4
4
 
@@ -1,4 +1,4 @@
1
- import { k as AttachFeatureOptions, l as EntityDataParams } from './clientEntTypes-BEmFiKV7.mjs';
1
+ import { k as AttachFeatureOptions, l as EntityDataParams } from './clientEntTypes-B4rt0N8N.mjs';
2
2
  import { C as CustomerData, B as BillingPortalParams } from './cusTypes-H9vsIluW.mjs';
3
3
 
4
4
  declare const attachAction: (args: Omit<{
@@ -1,4 +1,4 @@
1
- import { k as AttachFeatureOptions, l as EntityDataParams } from './clientEntTypes-DkbiSFnE.js';
1
+ import { k as AttachFeatureOptions, l as EntityDataParams } from './clientEntTypes-CdnUUQbY.js';
2
2
  import { C as CustomerData, B as BillingPortalParams } from './cusTypes-H9vsIluW.js';
3
3
 
4
4
  declare const attachAction: (args: Omit<{
@@ -10,7 +10,7 @@ interface AttachFeatureOptions {
10
10
  }
11
11
  interface AttachParams {
12
12
  customer_id: string;
13
- product_id: string;
13
+ product_id?: string;
14
14
  entity_id?: string;
15
15
  options?: AttachFeatureOptions[];
16
16
  product_ids?: string[];
@@ -10,7 +10,7 @@ interface AttachFeatureOptions {
10
10
  }
11
11
  interface AttachParams {
12
12
  customer_id: string;
13
- product_id: string;
13
+ product_id?: string;
14
14
  entity_id?: string;
15
15
  options?: AttachFeatureOptions[];
16
16
  product_ids?: string[];
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "autumn-js",
3
3
  "description": "Autumn JS Library",
4
- "version": "0.0.56",
4
+ "version": "0.0.58",
5
5
  "main": "./dist/index.js",
6
6
  "scripts": {
7
7
  "cli": "tsx src/cli/index.ts",