autumn-js 0.0.46 → 0.0.47

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.
@@ -120,6 +120,7 @@ interface CreateEntityParams {
120
120
  id: string;
121
121
  name: string;
122
122
  feature_id: string;
123
+ customer_data?: CustomerData;
123
124
  }
124
125
  interface CreateEntityResult {
125
126
  success: boolean;
@@ -120,6 +120,7 @@ interface CreateEntityParams {
120
120
  id: string;
121
121
  name: string;
122
122
  feature_id: string;
123
+ customer_data?: CustomerData;
123
124
  }
124
125
  interface CreateEntityResult {
125
126
  success: boolean;
@@ -1,4 +1,4 @@
1
- import { A as Autumn } from './client-C4aZxBxK.mjs';
1
+ import { A as Autumn } from './client-nfo5MENW.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 './client-DJJAbrX7.js';
1
+ import { A as Autumn } from './client-W8zaXEoh.js';
2
2
  import { AuthResult } from './utils/AuthFunction.js';
3
3
  import './response-ByHPEnHs.js';
4
4
 
@@ -1,5 +1,5 @@
1
1
  import * as rou3 from 'rou3';
2
- import { A as Autumn } from '../client-C4aZxBxK.mjs';
2
+ import { A as Autumn } from '../client-nfo5MENW.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 '../client-DJJAbrX7.js';
2
+ import { A as Autumn } from '../client-W8zaXEoh.js';
3
3
  import '../response-ByHPEnHs.js';
4
4
 
5
5
  type RouteData = {
@@ -1,4 +1,4 @@
1
- import { A as Autumn, C as CustomerData } from '../client-C4aZxBxK.mjs';
1
+ import { A as Autumn, C as CustomerData } from '../client-nfo5MENW.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 '../client-DJJAbrX7.js';
1
+ import { A as Autumn, C as CustomerData } from '../client-W8zaXEoh.js';
2
2
  import { AuthResult } from './AuthFunction.js';
3
3
  import '../response-ByHPEnHs.js';
4
4
 
@@ -1,17 +1,18 @@
1
1
  import { UseCustomerParams } from './useCustomerProvider.mjs';
2
2
  import { A as AutumnError } from '../error-CG2LXoa7.mjs';
3
3
  import { b as Customer } from '../cusTypes-CrKQos3U.mjs';
4
+ import { E as Entity } from '../entTypes-D5hhz3BB.mjs';
5
+ import { A as AutumnPromise } from '../response-T-FFa-qt.mjs';
6
+ import { CreateEntityParams } from '../client/types/clientEntTypes.mjs';
4
7
  import '../ReactAutumnClient-b8N5xZyk.mjs';
5
- import '../client/types/clientEntTypes.mjs';
6
8
  import '../client/types/clientGenTypes.mjs';
7
- import '../response-T-FFa-qt.mjs';
8
- import '../entTypes-D5hhz3BB.mjs';
9
9
 
10
10
  interface UseCustomerResult {
11
11
  customer: Customer | null;
12
12
  isLoading: boolean;
13
13
  error: AutumnError | null;
14
14
  refetch: () => Promise<void>;
15
+ createEntity: (params: CreateEntityParams | CreateEntityParams[]) => AutumnPromise<Entity | Entity[]>;
15
16
  }
16
17
  declare const useCustomer: (params?: UseCustomerParams) => UseCustomerResult;
17
18
 
@@ -1,17 +1,18 @@
1
1
  import { UseCustomerParams } from './useCustomerProvider.js';
2
2
  import { A as AutumnError } from '../error-CG2LXoa7.js';
3
3
  import { b as Customer } from '../cusTypes-CrKQos3U.js';
4
+ import { E as Entity } from '../entTypes-Pu4KEgBU.js';
5
+ import { A as AutumnPromise } from '../response-muDt0SJZ.js';
6
+ import { CreateEntityParams } from '../client/types/clientEntTypes.js';
4
7
  import '../ReactAutumnClient-CXWgmZSf.js';
5
- import '../client/types/clientEntTypes.js';
6
8
  import '../client/types/clientGenTypes.js';
7
- import '../response-muDt0SJZ.js';
8
- import '../entTypes-Pu4KEgBU.js';
9
9
 
10
10
  interface UseCustomerResult {
11
11
  customer: Customer | null;
12
12
  isLoading: boolean;
13
13
  error: AutumnError | null;
14
14
  refetch: () => Promise<void>;
15
+ createEntity: (params: CreateEntityParams | CreateEntityParams[]) => AutumnPromise<Entity | Entity[]>;
15
16
  }
16
17
  declare const useCustomer: (params?: UseCustomerParams) => UseCustomerResult;
17
18
 
@@ -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 } from './genTypes-DNndDcib.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 } from './genTypes-D0BvK77f.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-BY1nr3mk.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 } from './genTypes-DaYkl9Ex.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 } from './genTypes-8tvMa4lq.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-BY1nr3mk.js';
4
4
 
@@ -1,4 +1,4 @@
1
- import { j as AttachFeatureOptions } from './genTypes-DNndDcib.mjs';
1
+ import { j as AttachFeatureOptions } from './genTypes-D0BvK77f.mjs';
2
2
  import { C as CustomerData, B as BillingPortalParams } from './cusTypes-BY1nr3mk.mjs';
3
3
 
4
4
  interface EntityDataParams {
@@ -1,4 +1,4 @@
1
- import { j as AttachFeatureOptions } from './genTypes-DaYkl9Ex.js';
1
+ import { j as AttachFeatureOptions } from './genTypes-8tvMa4lq.js';
2
2
  import { C as CustomerData, B as BillingPortalParams } from './cusTypes-BY1nr3mk.js';
3
3
 
4
4
  interface EntityDataParams {
@@ -1,4 +1,4 @@
1
- import { d as CustomerProduct, e as CustomerFeature, f as CustomerInvoice, A as AppEnv, I as Infinite, P as ProductItemIntervalType, g as UsageModel, F as FreeTrialDuration, h as UsageModelType, C as CustomerData } from './cusTypes-BY1nr3mk.mjs';
1
+ import { d as CustomerProduct, e as CustomerFeature, f as CustomerInvoice, C as CustomerData, A as AppEnv, I as Infinite, P as ProductItemIntervalType, g as UsageModel, F as FreeTrialDuration, h as UsageModelType } from './cusTypes-BY1nr3mk.js';
2
2
 
3
3
  type EntityExpandOption = "invoices";
4
4
 
@@ -6,6 +6,7 @@ interface CreateEntityParams {
6
6
  id: string;
7
7
  name: string;
8
8
  feature_id: string;
9
+ customer_data?: CustomerData;
9
10
  }
10
11
  interface CreateEntityResult {
11
12
  success: boolean;
@@ -1,4 +1,4 @@
1
- import { d as CustomerProduct, e as CustomerFeature, f as CustomerInvoice, A as AppEnv, I as Infinite, P as ProductItemIntervalType, g as UsageModel, F as FreeTrialDuration, h as UsageModelType, C as CustomerData } from './cusTypes-BY1nr3mk.js';
1
+ import { d as CustomerProduct, e as CustomerFeature, f as CustomerInvoice, C as CustomerData, A as AppEnv, I as Infinite, P as ProductItemIntervalType, g as UsageModel, F as FreeTrialDuration, h as UsageModelType } from './cusTypes-BY1nr3mk.mjs';
2
2
 
3
3
  type EntityExpandOption = "invoices";
4
4
 
@@ -6,6 +6,7 @@ interface CreateEntityParams {
6
6
  id: string;
7
7
  name: string;
8
8
  feature_id: string;
9
+ customer_data?: CustomerData;
9
10
  }
10
11
  interface CreateEntityResult {
11
12
  success: boolean;
@@ -1,4 +1,4 @@
1
- import { d as CustomerProduct, c as CustomerFeature, f as CustomerInvoice } from './cusTypes-Cw74Oy0H.js';
1
+ import { e as CustomerData, d as CustomerProduct, c as CustomerFeature, f as CustomerInvoice } from './cusTypes-pV7nKIcc.mjs';
2
2
 
3
3
  type EntityExpandOption = "invoices";
4
4
 
@@ -6,6 +6,7 @@ interface CreateEntityParams {
6
6
  id: string;
7
7
  name: string;
8
8
  feature_id: string;
9
+ customer_data?: CustomerData;
9
10
  }
10
11
  interface CreateEntityResult {
11
12
  success: boolean;
@@ -1,4 +1,4 @@
1
- import { d as CustomerProduct, c as CustomerFeature, f as CustomerInvoice } from './cusTypes-pV7nKIcc.mjs';
1
+ import { e as CustomerData, d as CustomerProduct, c as CustomerFeature, f as CustomerInvoice } from './cusTypes-Cw74Oy0H.js';
2
2
 
3
3
  type EntityExpandOption = "invoices";
4
4
 
@@ -6,6 +6,7 @@ interface CreateEntityParams {
6
6
  id: string;
7
7
  name: string;
8
8
  feature_id: string;
9
+ customer_data?: CustomerData;
9
10
  }
10
11
  interface CreateEntityResult {
11
12
  success: boolean;
@@ -1,3 +1,3 @@
1
1
  import './cusTypes-pV7nKIcc.mjs';
2
- export { C as CreateEntityParams, a as CreateEntityResult, D as DeleteEntityResult, E as Entity, b as EntityData, G as GetEntityParams } from './entTypes-DAoQnp8D.mjs';
2
+ export { C as CreateEntityParams, a as CreateEntityResult, D as DeleteEntityResult, E as Entity, b as EntityData, G as GetEntityParams } from './entTypes-CL-fMvnC.mjs';
3
3
  import './prodEnums-C1lccCWI.mjs';
@@ -1,3 +1,3 @@
1
1
  import './cusTypes-Cw74Oy0H.js';
2
- export { C as CreateEntityParams, a as CreateEntityResult, D as DeleteEntityResult, E as Entity, b as EntityData, G as GetEntityParams } from './entTypes-oQpX0x_Y.js';
2
+ export { C as CreateEntityParams, a as CreateEntityResult, D as DeleteEntityResult, E as Entity, b as EntityData, G as GetEntityParams } from './entTypes-DtPO-a4R.js';
3
3
  import './prodEnums-C1lccCWI.js';
@@ -1,5 +1,5 @@
1
1
  import { e as CustomerData } from './cusTypes-pV7nKIcc.mjs';
2
- import { b as EntityData } from './entTypes-DAoQnp8D.mjs';
2
+ import { b as EntityData } from './entTypes-CL-fMvnC.mjs';
3
3
  import { CheckProductFormattedPreview, CheckFeatureFormattedPreview } from './check.mjs';
4
4
  import './prodEnums-C1lccCWI.mjs';
5
5
  import './products.mjs';
@@ -1,5 +1,5 @@
1
1
  import { e as CustomerData } from './cusTypes-Cw74Oy0H.js';
2
- import { b as EntityData } from './entTypes-oQpX0x_Y.js';
2
+ import { b as EntityData } from './entTypes-DtPO-a4R.js';
3
3
  import { CheckProductFormattedPreview, CheckFeatureFormattedPreview } from './check.js';
4
4
  import './prodEnums-C1lccCWI.js';
5
5
  import './products.js';
@@ -4,8 +4,8 @@ import { Product, CreateProductParams, ListProductsParams } from './products.mjs
4
4
  export { FreeTrial, PriceTier, ProductItem } from './products.mjs';
5
5
  import { G as GetCustomerParams, C as Customer, a as CreateCustomerParams, U as UpdateCustomerParams, B as BillingPortalParams, b as BillingPortalResponse } from './cusTypes-pV7nKIcc.mjs';
6
6
  export { e as CustomerData, g as CustomerExpandOption, c as CustomerFeature, f as CustomerInvoice, d as CustomerProduct, P as ProductStatus } from './cusTypes-pV7nKIcc.mjs';
7
- import { G as GetEntityParams, E as Entity, C as CreateEntityParams, a as CreateEntityResult, D as DeleteEntityResult } from './entTypes-DAoQnp8D.mjs';
8
- export { b as EntityData, c as EntityExpandOption } from './entTypes-DAoQnp8D.mjs';
7
+ import { G as GetEntityParams, E as Entity, C as CreateEntityParams, a as CreateEntityResult, D as DeleteEntityResult } from './entTypes-CL-fMvnC.mjs';
8
+ export { b as EntityData, c as EntityExpandOption } from './entTypes-CL-fMvnC.mjs';
9
9
  export { CheckFeatureFormattedPreview, CheckFeatureScenario, CheckProductFormattedPreview, CheckProductScenario } from './check.mjs';
10
10
  export { A as AppEnv, F as FreeTrialDuration, I as Infinite, P as ProductItemInterval, b as ProductItemIntervalType, U as UsageModel, a as UsageModelType } from './prodEnums-C1lccCWI.mjs';
11
11
 
@@ -4,8 +4,8 @@ import { Product, CreateProductParams, ListProductsParams } from './products.js'
4
4
  export { FreeTrial, PriceTier, ProductItem } from './products.js';
5
5
  import { G as GetCustomerParams, C as Customer, a as CreateCustomerParams, U as UpdateCustomerParams, B as BillingPortalParams, b as BillingPortalResponse } from './cusTypes-Cw74Oy0H.js';
6
6
  export { e as CustomerData, g as CustomerExpandOption, c as CustomerFeature, f as CustomerInvoice, d as CustomerProduct, P as ProductStatus } from './cusTypes-Cw74Oy0H.js';
7
- import { G as GetEntityParams, E as Entity, C as CreateEntityParams, a as CreateEntityResult, D as DeleteEntityResult } from './entTypes-oQpX0x_Y.js';
8
- export { b as EntityData, c as EntityExpandOption } from './entTypes-oQpX0x_Y.js';
7
+ import { G as GetEntityParams, E as Entity, C as CreateEntityParams, a as CreateEntityResult, D as DeleteEntityResult } from './entTypes-DtPO-a4R.js';
8
+ export { b as EntityData, c as EntityExpandOption } from './entTypes-DtPO-a4R.js';
9
9
  export { CheckFeatureFormattedPreview, CheckFeatureScenario, CheckProductFormattedPreview, CheckProductScenario } from './check.js';
10
10
  export { A as AppEnv, F as FreeTrialDuration, I as Infinite, P as ProductItemInterval, b as ProductItemIntervalType, U as UsageModel, a as UsageModelType } from './prodEnums-C1lccCWI.js';
11
11
 
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.46",
4
+ "version": "0.0.47",
5
5
  "main": "./dist/index.js",
6
6
  "scripts": {
7
7
  "cli": "tsx src/cli/index.ts",