@forgecart/sdk 1.202606151453.0 → 1.202607070306.0

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
@@ -56,8 +56,8 @@ const order = await client.shop.cart.addItemToOrder({ variantId, quantity: 1 });
56
56
 
57
57
  ## Namespaces
58
58
 
59
- - `client.admin` — entry, fieldDefinition, publish, acfSchema, acf, administrator, analyticsGateway, asset, audienceMembership, audienceSegment, auth, settings, channel, chat, collection, country, address, group, customerGroup, customer, deployment, facet, fulfillmentRequest, fulfillment, hookDispatch, hook, market, marketingAttribution, marketingEvent, marketingIdentity, mission, onboarding, coupon, draft, modification, note, orderModification, order, payment, manageable, plugin, optionGroup, option, productOption, productVariant, product, promotion, role, scheduledJob, search, seller, shipping, stock, subscription, tax, transaction, zone
60
- - `client.shop` — acf, auth, cart, channel, checkout, collection, customer, facet, hookDispatch, hook, marketingEvent, marketingIdentity, order, payment, product, search, shipping, subscription
59
+ - `client.admin` — entry, fieldDefinition, publish, acfSchema, acf, administrator, analyticsGateway, asset, audienceMembership, audienceSegment, auth, settings, channel, chat, collection, country, address, group, customerGroup, customer, deployment, facet, fulfillmentRequest, fulfillment, hookDispatch, hook, market, marketingAttribution, marketingEvent, marketingIdentity, mission, onboarding, coupon, draft, modification, note, orderModification, order, payment, manageable, plugin, optionGroup, option, productOption, productVariant, product, promotion, role, scheduledJob, search, seller, sellingPlan, shipping, stock, subscriptionAnalytics, subscription, tax, transaction, zone
60
+ - `client.shop` — acf, auth, cart, channel, checkout, collection, customer, facet, hookDispatch, hook, marketingEvent, marketingIdentity, order, payment, product, search, sellingPlan, shipping, subscription
61
61
 
62
62
  ## NestJS Integration
63
63
 
@@ -587,6 +587,11 @@ export type ChannelSettings = {
587
587
  shopName?: Maybe<Scalars['String']['output']>;
588
588
  taxOriginScope: Scalars['String']['output'];
589
589
  };
590
+ export type ChannelSubscriptionSettings = {
591
+ channelId: Scalars['ID']['output'];
592
+ couponInteraction: SubscriptionCouponInteraction;
593
+ id: Scalars['ID']['output'];
594
+ };
590
595
  export type ChatHistoryInput = {
591
596
  sessionId: Scalars['String']['input'];
592
597
  skip?: InputMaybe<Scalars['Int']['input']>;
@@ -996,6 +1001,25 @@ export type CreateScheduledJobInput = {
996
1001
  export type CreateSellerInput = {
997
1002
  name: Scalars['String']['input'];
998
1003
  };
1004
+ export type CreateSellingPlanGroupInput = {
1005
+ appliesTo?: InputMaybe<SellingPlanAppliesTo>;
1006
+ code: Scalars['String']['input'];
1007
+ couponInteraction?: InputMaybe<SubscriptionCouponInteraction>;
1008
+ description?: InputMaybe<Scalars['String']['input']>;
1009
+ name: Scalars['String']['input'];
1010
+ oneTimePurchaseAllowed?: InputMaybe<Scalars['Boolean']['input']>;
1011
+ variantIds?: InputMaybe<Array<Scalars['ID']['input']>>;
1012
+ };
1013
+ export type CreateSellingPlanInput = {
1014
+ adjustmentValue?: InputMaybe<Scalars['Int']['input']>;
1015
+ anchorDay?: InputMaybe<Scalars['Int']['input']>;
1016
+ billingInterval: BillingInterval;
1017
+ groupId: Scalars['ID']['input'];
1018
+ intervalCount?: InputMaybe<Scalars['Int']['input']>;
1019
+ name: Scalars['String']['input'];
1020
+ pricingPolicy?: InputMaybe<PricingPolicy>;
1021
+ trialDays?: InputMaybe<Scalars['Int']['input']>;
1022
+ };
999
1023
  export type CreateSessionInput = {
1000
1024
  extTokenId?: InputMaybe<Scalars['ID']['input']>;
1001
1025
  orderId: Scalars['ID']['input'];
@@ -1129,6 +1153,20 @@ export type DeleteAssetsInput = {
1129
1153
  force?: InputMaybe<Scalars['Boolean']['input']>;
1130
1154
  ids: Array<Scalars['ID']['input']>;
1131
1155
  };
1156
+ export type DeleteChannelInput = {
1157
+ collections?: InputMaybe<Scalars['Boolean']['input']>;
1158
+ customers?: InputMaybe<Scalars['Boolean']['input']>;
1159
+ facets?: InputMaybe<Scalars['Boolean']['input']>;
1160
+ id: Scalars['ID']['input'];
1161
+ orders?: InputMaybe<Scalars['Boolean']['input']>;
1162
+ products?: InputMaybe<Scalars['Boolean']['input']>;
1163
+ promotions?: InputMaybe<Scalars['Boolean']['input']>;
1164
+ sellers?: InputMaybe<Scalars['Boolean']['input']>;
1165
+ stockLocations?: InputMaybe<Scalars['Boolean']['input']>;
1166
+ subscriptions?: InputMaybe<Scalars['Boolean']['input']>;
1167
+ taxRates?: InputMaybe<Scalars['Boolean']['input']>;
1168
+ usageMetrics?: InputMaybe<Scalars['Boolean']['input']>;
1169
+ };
1132
1170
  export type DeleteFacetInput = {
1133
1171
  force?: InputMaybe<Scalars['Boolean']['input']>;
1134
1172
  id: Scalars['ID']['input'];
@@ -1805,6 +1843,8 @@ export type Mutation = {
1805
1843
  createRole: Role;
1806
1844
  createScheduledJob: ScheduledJob;
1807
1845
  createSeller: Seller;
1846
+ createSellingPlan: SellingPlan;
1847
+ createSellingPlanGroup: SellingPlanGroup;
1808
1848
  createShippingGatewayRoutingRule: ShippingGatewayRoutingRule;
1809
1849
  createShippingLabel: ShippingGatewayLabel;
1810
1850
  createStockLocation: StockLocation;
@@ -1817,7 +1857,7 @@ export type Mutation = {
1817
1857
  deleteAssets: DeletionResponse;
1818
1858
  deleteAudienceSegment: AudienceSegment;
1819
1859
  deleteCarrier: Scalars['Boolean']['output'];
1820
- deleteChannel?: Maybe<Scalars['Boolean']['output']>;
1860
+ deleteChannel: Channel;
1821
1861
  deleteChannelPlugin?: Maybe<Scalars['Boolean']['output']>;
1822
1862
  deleteCollection: DeletionResponse;
1823
1863
  deleteCountry: DeletionResponse;
@@ -1842,6 +1882,8 @@ export type Mutation = {
1842
1882
  deleteRole: DeletionResponse;
1843
1883
  deleteScheduledJob: ScheduledJob;
1844
1884
  deleteSeller: Seller;
1885
+ deleteSellingPlan: SellingPlan;
1886
+ deleteSellingPlanGroup: SellingPlanGroup;
1845
1887
  deleteShippingGatewayRoutingRule: Scalars['Boolean']['output'];
1846
1888
  deleteStockLocation: DeletionResponse;
1847
1889
  deleteSubscriptionVariantConfig: SubscriptionVariantConfig;
@@ -1932,6 +1974,7 @@ export type Mutation = {
1932
1974
  updateCarrier: ShippingGatewayCarrier;
1933
1975
  updateChannel: Channel;
1934
1976
  updateChannelSettings: ChannelSettings;
1977
+ updateChannelSubscriptionSettings: ChannelSubscriptionSettings;
1935
1978
  updateCollection: Collection;
1936
1979
  updateCountry: Country;
1937
1980
  updateCustomer: Customer;
@@ -1954,6 +1997,8 @@ export type Mutation = {
1954
1997
  updateRole: Role;
1955
1998
  updateScheduledJob: ScheduledJob;
1956
1999
  updateSeller: Seller;
2000
+ updateSellingPlan: SellingPlan;
2001
+ updateSellingPlanGroup: SellingPlanGroup;
1957
2002
  updateShippingGatewayRoutingRule: ShippingGatewayRoutingRule;
1958
2003
  updateShippingLabel: ShippingGatewayLabel;
1959
2004
  updateStockLocation: StockLocation;
@@ -2162,6 +2207,12 @@ export type MutationcreateScheduledJobArgs = {
2162
2207
  export type MutationcreateSellerArgs = {
2163
2208
  input: CreateSellerInput;
2164
2209
  };
2210
+ export type MutationcreateSellingPlanArgs = {
2211
+ input: CreateSellingPlanInput;
2212
+ };
2213
+ export type MutationcreateSellingPlanGroupArgs = {
2214
+ input: CreateSellingPlanGroupInput;
2215
+ };
2165
2216
  export type MutationcreateShippingGatewayRoutingRuleArgs = {
2166
2217
  input: CreateShippingGatewayRoutingRuleInput;
2167
2218
  };
@@ -2199,7 +2250,7 @@ export type MutationdeleteCarrierArgs = {
2199
2250
  id: Scalars['ID']['input'];
2200
2251
  };
2201
2252
  export type MutationdeleteChannelArgs = {
2202
- id: Scalars['ID']['input'];
2253
+ input: DeleteChannelInput;
2203
2254
  };
2204
2255
  export type MutationdeleteChannelPluginArgs = {
2205
2256
  id: Scalars['ID']['input'];
@@ -2274,6 +2325,12 @@ export type MutationdeleteScheduledJobArgs = {
2274
2325
  export type MutationdeleteSellerArgs = {
2275
2326
  id: Scalars['ID']['input'];
2276
2327
  };
2328
+ export type MutationdeleteSellingPlanArgs = {
2329
+ id: Scalars['ID']['input'];
2330
+ };
2331
+ export type MutationdeleteSellingPlanGroupArgs = {
2332
+ id: Scalars['ID']['input'];
2333
+ };
2277
2334
  export type MutationdeleteShippingGatewayRoutingRuleArgs = {
2278
2335
  id: Scalars['ID']['input'];
2279
2336
  };
@@ -2538,6 +2595,9 @@ export type MutationupdateChannelArgs = {
2538
2595
  export type MutationupdateChannelSettingsArgs = {
2539
2596
  input: UpdateChannelSettingsInput;
2540
2597
  };
2598
+ export type MutationupdateChannelSubscriptionSettingsArgs = {
2599
+ input: UpdateChannelSubscriptionSettingsInput;
2600
+ };
2541
2601
  export type MutationupdateCollectionArgs = {
2542
2602
  input: UpdateCollectionInput;
2543
2603
  };
@@ -2606,6 +2666,12 @@ export type MutationupdateScheduledJobArgs = {
2606
2666
  export type MutationupdateSellerArgs = {
2607
2667
  input: UpdateSellerInput;
2608
2668
  };
2669
+ export type MutationupdateSellingPlanArgs = {
2670
+ input: UpdateSellingPlanInput;
2671
+ };
2672
+ export type MutationupdateSellingPlanGroupArgs = {
2673
+ input: UpdateSellingPlanGroupInput;
2674
+ };
2609
2675
  export type MutationupdateShippingGatewayRoutingRuleArgs = {
2610
2676
  input: UpdateShippingGatewayRoutingRuleInput;
2611
2677
  };
@@ -2693,6 +2759,7 @@ export type Order = {
2693
2759
  promotions: Array<Promotion>;
2694
2760
  recentShippingMethod?: Maybe<ShippingGatewayRate>;
2695
2761
  recentToken?: Maybe<PaymentGatewayToken>;
2762
+ sellingPlanId?: Maybe<Scalars['ID']['output']>;
2696
2763
  shipping: Scalars['Int']['output'];
2697
2764
  shippingAddress?: Maybe<OrderAddress>;
2698
2765
  shippingLines: Array<ShippingLine>;
@@ -2750,6 +2817,7 @@ export type OrderLine = {
2750
2817
  productVariant: ProductVariant;
2751
2818
  productVariantId: Scalars['ID']['output'];
2752
2819
  quantity: Scalars['Int']['output'];
2820
+ sellingPlanId?: Maybe<Scalars['ID']['output']>;
2753
2821
  shippingLine?: Maybe<ShippingLine>;
2754
2822
  snapshot?: Maybe<ProductVariantSnapshot>;
2755
2823
  taxCategory?: Maybe<TaxCategory>;
@@ -2865,6 +2933,7 @@ export type PaymentProviderQuote = {
2865
2933
  providerName: Scalars['String']['output'];
2866
2934
  };
2867
2935
  export type PluginStatus = 'DISABLED' | 'ENABLED' | 'INPROGRESS';
2936
+ export type PricingPolicy = 'fixed_amount' | 'none' | 'percentage';
2868
2937
  export type Product = {
2869
2938
  assets: Array<Asset>;
2870
2939
  channels: Array<Channel>;
@@ -3015,6 +3084,7 @@ export type ProvisionChannelInput = {
3015
3084
  defaultCurrencyCode?: InputMaybe<Scalars['String']['input']>;
3016
3085
  defaultLanguageCode?: InputMaybe<Scalars['String']['input']>;
3017
3086
  description?: InputMaybe<Scalars['String']['input']>;
3087
+ provisionWorkspace?: InputMaybe<Scalars['Boolean']['input']>;
3018
3088
  userId: Scalars['ID']['input'];
3019
3089
  };
3020
3090
  export type ProvisionChannelResult = {
@@ -3054,6 +3124,7 @@ export type Query = {
3054
3124
  channelDeploymentInfo: ChannelDeploymentInfo;
3055
3125
  channelPlugins: Array<ChannelPlugin>;
3056
3126
  channelSettings: ChannelSettings;
3127
+ channelSubscriptionSettings: ChannelSubscriptionSettings;
3057
3128
  channels: ChannelList;
3058
3129
  chatHistory: Array<ChatHistoryMessage>;
3059
3130
  chatQueue: Array<ChatQueueItem>;
@@ -3133,6 +3204,8 @@ export type Query = {
3133
3204
  search: SearchResult;
3134
3205
  seller?: Maybe<Seller>;
3135
3206
  sellers: SellerList;
3207
+ sellingPlanGroup?: Maybe<SellingPlanGroup>;
3208
+ sellingPlanGroups: SellingPlanGroupList;
3136
3209
  shippingGatewayRoutingRules: Array<ShippingGatewayRoutingRule>;
3137
3210
  shippingLabels: Array<ShippingGatewayLabel>;
3138
3211
  shippingRateGroups: Array<ShippingGatewayRateGroup>;
@@ -3140,6 +3213,7 @@ export type Query = {
3140
3213
  stockLocations: StockLocationList;
3141
3214
  stockMovements: StockMovementList;
3142
3215
  subscription?: Maybe<BillingSubscription>;
3216
+ subscriptionAnalytics: SubscriptionAnalytics;
3143
3217
  subscriptionVariantConfigs: Array<SubscriptionVariantConfig>;
3144
3218
  subscriptions: BillingSubscriptionList;
3145
3219
  taxCategories: TaxCategoryList;
@@ -3412,6 +3486,12 @@ export type QuerysellerArgs = {
3412
3486
  export type QuerysellersArgs = {
3413
3487
  options?: InputMaybe<ListQueryOptions>;
3414
3488
  };
3489
+ export type QuerysellingPlanGroupArgs = {
3490
+ id: Scalars['ID']['input'];
3491
+ };
3492
+ export type QuerysellingPlanGroupsArgs = {
3493
+ options?: InputMaybe<SellingPlanGroupListOptions>;
3494
+ };
3415
3495
  export type QueryshippingGatewayRoutingRulesArgs = {
3416
3496
  stockLocationId: Scalars['ID']['input'];
3417
3497
  };
@@ -3433,6 +3513,9 @@ export type QuerystockMovementsArgs = {
3433
3513
  export type QuerysubscriptionArgs = {
3434
3514
  id: Scalars['ID']['input'];
3435
3515
  };
3516
+ export type QuerysubscriptionAnalyticsArgs = {
3517
+ input: SubscriptionAnalyticsInput;
3518
+ };
3436
3519
  export type QuerysubscriptionsArgs = {
3437
3520
  options?: InputMaybe<SubscriptionListOptions>;
3438
3521
  };
@@ -3789,6 +3872,40 @@ export type SellerList = {
3789
3872
  items: Array<Seller>;
3790
3873
  totalItems: Scalars['Int']['output'];
3791
3874
  };
3875
+ export type SellingPlan = {
3876
+ adjustmentValue?: Maybe<Scalars['Int']['output']>;
3877
+ anchorDay?: Maybe<Scalars['Int']['output']>;
3878
+ billingInterval: BillingInterval;
3879
+ createdAt: Scalars['DateTime']['output'];
3880
+ enabled: Scalars['Boolean']['output'];
3881
+ id: Scalars['ID']['output'];
3882
+ intervalCount: Scalars['Int']['output'];
3883
+ name: Scalars['String']['output'];
3884
+ pricingPolicy: PricingPolicy;
3885
+ trialDays: Scalars['Int']['output'];
3886
+ updatedAt: Scalars['DateTime']['output'];
3887
+ };
3888
+ export type SellingPlanAppliesTo = 'channel' | 'variant';
3889
+ export type SellingPlanGroup = {
3890
+ appliesTo: SellingPlanAppliesTo;
3891
+ code: Scalars['String']['output'];
3892
+ couponInteraction?: Maybe<SubscriptionCouponInteraction>;
3893
+ createdAt: Scalars['DateTime']['output'];
3894
+ description?: Maybe<Scalars['String']['output']>;
3895
+ id: Scalars['ID']['output'];
3896
+ name: Scalars['String']['output'];
3897
+ oneTimePurchaseAllowed: Scalars['Boolean']['output'];
3898
+ plans: Array<SellingPlan>;
3899
+ updatedAt: Scalars['DateTime']['output'];
3900
+ };
3901
+ export type SellingPlanGroupList = {
3902
+ items: Array<SellingPlanGroup>;
3903
+ totalItems: Scalars['Int']['output'];
3904
+ };
3905
+ export type SellingPlanGroupListOptions = {
3906
+ skip?: InputMaybe<Scalars['Int']['input']>;
3907
+ take?: InputMaybe<Scalars['Int']['input']>;
3908
+ };
3792
3909
  export type SendChatMessageInput = {
3793
3910
  message: Scalars['String']['input'];
3794
3911
  sessionId: Scalars['String']['input'];
@@ -3844,6 +3961,9 @@ export type SetMarketingIdentifiersResult = {
3844
3961
  identityId: Scalars['ID']['output'];
3845
3962
  rejected: Array<Scalars['String']['output']>;
3846
3963
  };
3964
+ export type SetOrderSellingPlanInput = {
3965
+ sellingPlanId?: InputMaybe<Scalars['ID']['input']>;
3966
+ };
3847
3967
  export type SetPriceInput = {
3848
3968
  currencyCode: Scalars['String']['input'];
3849
3969
  price: Scalars['Int']['input'];
@@ -3961,6 +4081,7 @@ export type ShippingRoutingFulfillmentType = 'MANUAL' | 'PROVIDER';
3961
4081
  export type ShippingRoutingScopeType = 'COUNTRIES' | 'DOMESTIC' | 'INTERNATIONAL';
3962
4082
  export type ShopAddItemToOrderInput = {
3963
4083
  quantity: Scalars['Int']['input'];
4084
+ sellingPlanId?: InputMaybe<Scalars['ID']['input']>;
3964
4085
  variantId: Scalars['ID']['input'];
3965
4086
  };
3966
4087
  export type ShopAdjustOrderLineInput = {
@@ -4069,11 +4190,28 @@ export type SubscriptionhookDispatchedArgs = {
4069
4190
  export type SubscriptionresumeChatSessionArgs = {
4070
4191
  input: ResumeChatSessionInput;
4071
4192
  };
4193
+ export type SubscriptionAnalytics = {
4194
+ arpu: Scalars['Int']['output'];
4195
+ churnRate: Scalars['Float']['output'];
4196
+ movementByDay: Array<SubscriptionMovementPoint>;
4197
+ mrr: Scalars['Int']['output'];
4198
+ pastDueAmountAtRisk: Scalars['Int']['output'];
4199
+ pastDueCount: Scalars['Int']['output'];
4200
+ revenueByDay: Array<SubscriptionRevenuePoint>;
4201
+ statusCounts: SubscriptionStatusCounts;
4202
+ trialsEndingSoonCount: Scalars['Int']['output'];
4203
+ };
4204
+ export type SubscriptionAnalyticsInput = {
4205
+ from: Scalars['DateTime']['input'];
4206
+ to: Scalars['DateTime']['input'];
4207
+ trialsEndingWithinDays?: InputMaybe<Scalars['Int']['input']>;
4208
+ };
4209
+ export type SubscriptionCouponInteraction = 'exclude_subscriptions' | 'off_original_price' | 'stack_on_discounted';
4072
4210
  export type SubscriptionCreditBalance = {
4073
4211
  amountCents: Scalars['Int']['output'];
4074
4212
  appliedCents: Scalars['Int']['output'];
4075
4213
  id: Scalars['ID']['output'];
4076
- reason: CreditBalanceReason;
4214
+ reason: Scalars['String']['output'];
4077
4215
  sourceOrderId?: Maybe<Scalars['ID']['output']>;
4078
4216
  };
4079
4217
  export type SubscriptionFilterParameter = {
@@ -4100,6 +4238,18 @@ export type SubscriptionMetricAllowance = {
4100
4238
  includedQuantity: Scalars['Int']['output'];
4101
4239
  metric: UsageMetric;
4102
4240
  };
4241
+ export type SubscriptionMovementPoint = {
4242
+ churnedCount: Scalars['Int']['output'];
4243
+ churnedMrr: Scalars['Int']['output'];
4244
+ date: Scalars['String']['output'];
4245
+ newCount: Scalars['Int']['output'];
4246
+ newMrr: Scalars['Int']['output'];
4247
+ };
4248
+ export type SubscriptionRevenuePoint = {
4249
+ amount: Scalars['Int']['output'];
4250
+ date: Scalars['String']['output'];
4251
+ orderCount: Scalars['Int']['output'];
4252
+ };
4103
4253
  export type SubscriptionSortParameter = {
4104
4254
  code?: InputMaybe<SortOrder>;
4105
4255
  createdAt?: InputMaybe<SortOrder>;
@@ -4108,6 +4258,13 @@ export type SubscriptionSortParameter = {
4108
4258
  state?: InputMaybe<SortOrder>;
4109
4259
  };
4110
4260
  export type SubscriptionState = 'active' | 'cancelled' | 'created' | 'pastDue' | 'paused' | 'suspended' | 'trialing';
4261
+ export type SubscriptionStatusCounts = {
4262
+ active: Scalars['Int']['output'];
4263
+ cancelled: Scalars['Int']['output'];
4264
+ pastDue: Scalars['Int']['output'];
4265
+ paused: Scalars['Int']['output'];
4266
+ trialing: Scalars['Int']['output'];
4267
+ };
4111
4268
  export type SubscriptionVariantConfig = {
4112
4269
  billingInterval: BillingInterval;
4113
4270
  enabled: Scalars['Boolean']['output'];
@@ -4286,6 +4443,9 @@ export type UpdateChannelSettingsInput = {
4286
4443
  shopName?: InputMaybe<Scalars['String']['input']>;
4287
4444
  taxOriginScope?: InputMaybe<Scalars['String']['input']>;
4288
4445
  };
4446
+ export type UpdateChannelSubscriptionSettingsInput = {
4447
+ couponInteraction?: InputMaybe<SubscriptionCouponInteraction>;
4448
+ };
4289
4449
  export type UpdateCollectionInput = {
4290
4450
  featuredAssetId?: InputMaybe<Scalars['ID']['input']>;
4291
4451
  filters?: InputMaybe<Array<CollectionFilterDefinitionInput>>;
@@ -4490,6 +4650,25 @@ export type UpdateSellerInput = {
4490
4650
  id: Scalars['ID']['input'];
4491
4651
  name?: InputMaybe<Scalars['String']['input']>;
4492
4652
  };
4653
+ export type UpdateSellingPlanGroupInput = {
4654
+ couponInteraction?: InputMaybe<SubscriptionCouponInteraction>;
4655
+ description?: InputMaybe<Scalars['String']['input']>;
4656
+ id: Scalars['ID']['input'];
4657
+ name?: InputMaybe<Scalars['String']['input']>;
4658
+ oneTimePurchaseAllowed?: InputMaybe<Scalars['Boolean']['input']>;
4659
+ variantIds?: InputMaybe<Array<Scalars['ID']['input']>>;
4660
+ };
4661
+ export type UpdateSellingPlanInput = {
4662
+ adjustmentValue?: InputMaybe<Scalars['Int']['input']>;
4663
+ anchorDay?: InputMaybe<Scalars['Int']['input']>;
4664
+ billingInterval?: InputMaybe<BillingInterval>;
4665
+ enabled?: InputMaybe<Scalars['Boolean']['input']>;
4666
+ id: Scalars['ID']['input'];
4667
+ intervalCount?: InputMaybe<Scalars['Int']['input']>;
4668
+ name?: InputMaybe<Scalars['String']['input']>;
4669
+ pricingPolicy?: InputMaybe<PricingPolicy>;
4670
+ trialDays?: InputMaybe<Scalars['Int']['input']>;
4671
+ };
4493
4672
  export type UpdateShippingGatewayRoutingRuleInput = {
4494
4673
  countryCodes?: InputMaybe<Array<Scalars['String']['input']>>;
4495
4674
  enabled?: InputMaybe<Scalars['Boolean']['input']>;
@@ -5490,9 +5669,11 @@ export type UpdateChannelMutation = {
5490
5669
  updateChannel: Pick<Channel, 'id' | 'createdAt' | 'updatedAt' | 'code' | 'token' | 'secret' | 'previewUrl' | 'defaultLanguageCode' | 'defaultCurrencyCode' | 'availableLanguageCodes' | 'availableCurrencyCodes' | 'description' | 'pricesIncludeTax' | 'taxProviderCode' | 'trackInventory' | 'outOfStockThreshold' | 'sellerId' | 'defaultTaxZoneId'>;
5491
5670
  };
5492
5671
  export type DeleteChannelMutationVariables = Exact<{
5493
- id: Scalars['ID']['input'];
5672
+ input: DeleteChannelInput;
5494
5673
  }>;
5495
- export type DeleteChannelMutation = Pick<Mutation, 'deleteChannel'>;
5674
+ export type DeleteChannelMutation = {
5675
+ deleteChannel: Pick<Channel, 'id' | 'createdAt' | 'updatedAt' | 'code' | 'token' | 'secret' | 'previewUrl' | 'defaultLanguageCode' | 'defaultCurrencyCode' | 'availableLanguageCodes' | 'availableCurrencyCodes' | 'description' | 'pricesIncludeTax' | 'taxProviderCode' | 'trackInventory' | 'outOfStockThreshold' | 'sellerId' | 'defaultTaxZoneId'>;
5676
+ };
5496
5677
  export type UpdateChannelSettingsMutationVariables = Exact<{
5497
5678
  input: UpdateChannelSettingsInput;
5498
5679
  }>;
@@ -5522,6 +5703,19 @@ export type ChannelUpdateSettingsMutationVariables = Exact<{
5522
5703
  export type ChannelUpdateSettingsMutation = {
5523
5704
  updateChannelSettings: Pick<ChannelSettings, 'id' | 'channelId' | 'shopName' | 'requiresShippingAddressValidation' | 'requireCustomerForCheckout' | 'defaultFulfillmentHandlerCode' | 'defaultPaymentProviderCode' | 'defaultWeightUnit' | 'defaultDimensionUnit' | 'autoCurrencyExchange' | 'fxRoundingRule' | 'fxMarkupPercent'>;
5524
5705
  };
5706
+ export type ChannelSubscriptionSettingsFieldFragment = Pick<ChannelSubscriptionSettings, 'id' | 'channelId' | 'couponInteraction'>;
5707
+ export type ChannelSubscriptionSettingsQueryVariables = Exact<{
5708
+ [key: string]: never;
5709
+ }>;
5710
+ export type ChannelSubscriptionSettingsQuery = {
5711
+ channelSubscriptionSettings: Pick<ChannelSubscriptionSettings, 'id' | 'channelId' | 'couponInteraction'>;
5712
+ };
5713
+ export type ChannelUpdateSubscriptionSettingsMutationVariables = Exact<{
5714
+ input: UpdateChannelSubscriptionSettingsInput;
5715
+ }>;
5716
+ export type ChannelUpdateSubscriptionSettingsMutation = {
5717
+ updateChannelSubscriptionSettings: Pick<ChannelSubscriptionSettings, 'id' | 'channelId' | 'couponInteraction'>;
5718
+ };
5525
5719
  export type ChatSessionFieldFragment = Pick<ChatSession, 'sessionId' | 'channelToken' | 'userId' | 'createdAt' | 'lastActivity' | 'messageCount' | 'status'>;
5526
5720
  export type ChatMessageFieldFragment = (Pick<ChatMessage, 'type' | 'content' | 'timestamp' | 'isFinal' | 'eventId'> & {
5527
5721
  toolUse?: Maybe<Pick<ToolUseDetail, 'toolId' | 'toolName' | 'input'>>;
@@ -9669,6 +9863,70 @@ export type DeleteSellerMutationVariables = Exact<{
9669
9863
  export type DeleteSellerMutation = {
9670
9864
  deleteSeller: Pick<Seller, 'id' | 'createdAt' | 'updatedAt' | 'name'>;
9671
9865
  };
9866
+ export type SellingPlanFieldFragment = Pick<SellingPlan, 'id' | 'createdAt' | 'updatedAt' | 'name' | 'billingInterval' | 'intervalCount' | 'trialDays' | 'pricingPolicy' | 'adjustmentValue' | 'anchorDay' | 'enabled'>;
9867
+ export type SellingPlanGroupFieldFragment = (Pick<SellingPlanGroup, 'id' | 'createdAt' | 'updatedAt' | 'code' | 'name' | 'description' | 'appliesTo' | 'oneTimePurchaseAllowed' | 'couponInteraction'> & {
9868
+ plans: Array<Pick<SellingPlan, 'id' | 'createdAt' | 'updatedAt' | 'name' | 'billingInterval' | 'intervalCount' | 'trialDays' | 'pricingPolicy' | 'adjustmentValue' | 'anchorDay' | 'enabled'>>;
9869
+ });
9870
+ export type SellingPlanGroupQueryVariables = Exact<{
9871
+ id: Scalars['ID']['input'];
9872
+ }>;
9873
+ export type SellingPlanGroupQuery = {
9874
+ sellingPlanGroup?: Maybe<(Pick<SellingPlanGroup, 'id' | 'createdAt' | 'updatedAt' | 'code' | 'name' | 'description' | 'appliesTo' | 'oneTimePurchaseAllowed' | 'couponInteraction'> & {
9875
+ plans: Array<Pick<SellingPlan, 'id' | 'createdAt' | 'updatedAt' | 'name' | 'billingInterval' | 'intervalCount' | 'trialDays' | 'pricingPolicy' | 'adjustmentValue' | 'anchorDay' | 'enabled'>>;
9876
+ })>;
9877
+ };
9878
+ export type SellingPlanGroupsQueryVariables = Exact<{
9879
+ options?: InputMaybe<SellingPlanGroupListOptions>;
9880
+ }>;
9881
+ export type SellingPlanGroupsQuery = {
9882
+ sellingPlanGroups: (Pick<SellingPlanGroupList, 'totalItems'> & {
9883
+ items: Array<(Pick<SellingPlanGroup, 'id' | 'createdAt' | 'updatedAt' | 'code' | 'name' | 'description' | 'appliesTo' | 'oneTimePurchaseAllowed' | 'couponInteraction'> & {
9884
+ plans: Array<Pick<SellingPlan, 'id' | 'createdAt' | 'updatedAt' | 'name' | 'billingInterval' | 'intervalCount' | 'trialDays' | 'pricingPolicy' | 'adjustmentValue' | 'anchorDay' | 'enabled'>>;
9885
+ })>;
9886
+ });
9887
+ };
9888
+ export type CreateSellingPlanGroupMutationVariables = Exact<{
9889
+ input: CreateSellingPlanGroupInput;
9890
+ }>;
9891
+ export type CreateSellingPlanGroupMutation = {
9892
+ createSellingPlanGroup: (Pick<SellingPlanGroup, 'id' | 'createdAt' | 'updatedAt' | 'code' | 'name' | 'description' | 'appliesTo' | 'oneTimePurchaseAllowed' | 'couponInteraction'> & {
9893
+ plans: Array<Pick<SellingPlan, 'id' | 'createdAt' | 'updatedAt' | 'name' | 'billingInterval' | 'intervalCount' | 'trialDays' | 'pricingPolicy' | 'adjustmentValue' | 'anchorDay' | 'enabled'>>;
9894
+ });
9895
+ };
9896
+ export type UpdateSellingPlanGroupMutationVariables = Exact<{
9897
+ input: UpdateSellingPlanGroupInput;
9898
+ }>;
9899
+ export type UpdateSellingPlanGroupMutation = {
9900
+ updateSellingPlanGroup: (Pick<SellingPlanGroup, 'id' | 'createdAt' | 'updatedAt' | 'code' | 'name' | 'description' | 'appliesTo' | 'oneTimePurchaseAllowed' | 'couponInteraction'> & {
9901
+ plans: Array<Pick<SellingPlan, 'id' | 'createdAt' | 'updatedAt' | 'name' | 'billingInterval' | 'intervalCount' | 'trialDays' | 'pricingPolicy' | 'adjustmentValue' | 'anchorDay' | 'enabled'>>;
9902
+ });
9903
+ };
9904
+ export type DeleteSellingPlanGroupMutationVariables = Exact<{
9905
+ id: Scalars['ID']['input'];
9906
+ }>;
9907
+ export type DeleteSellingPlanGroupMutation = {
9908
+ deleteSellingPlanGroup: (Pick<SellingPlanGroup, 'id' | 'createdAt' | 'updatedAt' | 'code' | 'name' | 'description' | 'appliesTo' | 'oneTimePurchaseAllowed' | 'couponInteraction'> & {
9909
+ plans: Array<Pick<SellingPlan, 'id' | 'createdAt' | 'updatedAt' | 'name' | 'billingInterval' | 'intervalCount' | 'trialDays' | 'pricingPolicy' | 'adjustmentValue' | 'anchorDay' | 'enabled'>>;
9910
+ });
9911
+ };
9912
+ export type CreateSellingPlanMutationVariables = Exact<{
9913
+ input: CreateSellingPlanInput;
9914
+ }>;
9915
+ export type CreateSellingPlanMutation = {
9916
+ createSellingPlan: Pick<SellingPlan, 'id' | 'createdAt' | 'updatedAt' | 'name' | 'billingInterval' | 'intervalCount' | 'trialDays' | 'pricingPolicy' | 'adjustmentValue' | 'anchorDay' | 'enabled'>;
9917
+ };
9918
+ export type UpdateSellingPlanMutationVariables = Exact<{
9919
+ input: UpdateSellingPlanInput;
9920
+ }>;
9921
+ export type UpdateSellingPlanMutation = {
9922
+ updateSellingPlan: Pick<SellingPlan, 'id' | 'createdAt' | 'updatedAt' | 'name' | 'billingInterval' | 'intervalCount' | 'trialDays' | 'pricingPolicy' | 'adjustmentValue' | 'anchorDay' | 'enabled'>;
9923
+ };
9924
+ export type DeleteSellingPlanMutationVariables = Exact<{
9925
+ id: Scalars['ID']['input'];
9926
+ }>;
9927
+ export type DeleteSellingPlanMutation = {
9928
+ deleteSellingPlan: Pick<SellingPlan, 'id' | 'createdAt' | 'updatedAt' | 'name' | 'billingInterval' | 'intervalCount' | 'trialDays' | 'pricingPolicy' | 'adjustmentValue' | 'anchorDay' | 'enabled'>;
9929
+ };
9672
9930
  export type ShippingRateGroupFieldFragment = (Pick<ShippingGatewayRateGroup, 'id' | 'orderId' | 'stockLocationId' | 'stockLocationName'> & {
9673
9931
  orderLines: Array<Pick<ShippingGatewayRateGroupLine, 'orderLineId' | 'productName' | 'variantName' | 'quantity' | 'weight' | 'weightUnit' | 'length' | 'width' | 'height' | 'dimensionUnit'>>;
9674
9932
  rates: Array<Pick<ShippingGatewayRate, 'id' | 'extRateId' | 'carrier' | 'service' | 'amount' | 'currency' | 'estimatedDays' | 'selected' | 'providerCode'>>;
@@ -10072,6 +10330,21 @@ export type SetSafetyStockMutationVariables = Exact<{
10072
10330
  export type SetSafetyStockMutation = {
10073
10331
  setSafetyStock: Pick<StockLevel, 'id' | 'variantId' | 'stockLocationId' | 'stockOnHand' | 'stockAllocated' | 'stockReserved' | 'stockDamaged' | 'safetyStock' | 'stockInQualityControl' | 'stockIncoming'>;
10074
10332
  };
10333
+ export type SubscriptionAnalyticsFieldFragment = (Pick<SubscriptionAnalytics, 'mrr' | 'arpu' | 'churnRate' | 'pastDueAmountAtRisk' | 'pastDueCount' | 'trialsEndingSoonCount'> & {
10334
+ statusCounts: Pick<SubscriptionStatusCounts, 'active' | 'trialing' | 'pastDue' | 'paused' | 'cancelled'>;
10335
+ revenueByDay: Array<Pick<SubscriptionRevenuePoint, 'date' | 'amount' | 'orderCount'>>;
10336
+ movementByDay: Array<Pick<SubscriptionMovementPoint, 'date' | 'newCount' | 'newMrr' | 'churnedCount' | 'churnedMrr'>>;
10337
+ });
10338
+ export type SubscriptionAnalyticsQueryVariables = Exact<{
10339
+ input: SubscriptionAnalyticsInput;
10340
+ }>;
10341
+ export type SubscriptionAnalyticsQuery = {
10342
+ subscriptionAnalytics: (Pick<SubscriptionAnalytics, 'mrr' | 'arpu' | 'churnRate' | 'pastDueAmountAtRisk' | 'pastDueCount' | 'trialsEndingSoonCount'> & {
10343
+ statusCounts: Pick<SubscriptionStatusCounts, 'active' | 'trialing' | 'pastDue' | 'paused' | 'cancelled'>;
10344
+ revenueByDay: Array<Pick<SubscriptionRevenuePoint, 'date' | 'amount' | 'orderCount'>>;
10345
+ movementByDay: Array<Pick<SubscriptionMovementPoint, 'date' | 'newCount' | 'newMrr' | 'churnedCount' | 'churnedMrr'>>;
10346
+ });
10347
+ };
10075
10348
  export type BillingSubscriptionFieldFragment = (Pick<BillingSubscription, 'id' | 'createdAt' | 'updatedAt' | 'code' | 'state' | 'billingInterval' | 'currencyCode' | 'anchorDate' | 'currentPeriodStart' | 'currentPeriodEnd' | 'trialEnd' | 'cancelledAt' | 'cancellationReason' | 'cancelAtPeriodEnd' | 'pausedAt' | 'resumeAt' | 'dunningAttemptCount'> & {
10076
10349
  customer: Pick<Customer, 'id' | 'firstName' | 'lastName' | 'emailAddress'>;
10077
10350
  items: Array<(Pick<SubscriptionItem, 'id' | 'quantity' | 'unitPrice' | 'isDigital'> & {
package/dist/admin.d.ts CHANGED
@@ -50,8 +50,10 @@ export { RoleCategory } from './admin.generated';
50
50
  export { ScheduledJobCategory } from './admin.generated';
51
51
  export { SearchCategory } from './admin.generated';
52
52
  export { SellerCategory } from './admin.generated';
53
+ export { SellingPlanCategory } from './admin.generated';
53
54
  export { ShippingCategory } from './admin.generated';
54
55
  export { StockCategory } from './admin.generated';
56
+ export { SubscriptionAnalyticsCategory } from './admin.generated';
55
57
  export { SubscriptionCategory } from './admin.generated';
56
58
  export { TaxCategory } from './admin.generated';
57
59
  export { TransactionCategory } from './admin.generated';
@@ -128,6 +128,8 @@ export declare class SettingsCategory {
128
128
  constructor(client: BaseGraphQLClient);
129
129
  channelSettings(): QueryObservable<Types.ChannelSettingsQuery>;
130
130
  channelUpdateSettings(variables: Types.ChannelUpdateSettingsMutationVariables): QueryObservable<Types.ChannelUpdateSettingsMutation>;
131
+ channelSubscriptionSettings(): QueryObservable<Types.ChannelSubscriptionSettingsQuery>;
132
+ channelUpdateSubscriptionSettings(variables: Types.ChannelUpdateSubscriptionSettingsMutationVariables): QueryObservable<Types.ChannelUpdateSubscriptionSettingsMutation>;
131
133
  }
132
134
  export declare class ChatCategory {
133
135
  private readonly client;
@@ -539,6 +541,18 @@ export declare class SellerCategory {
539
541
  updateSeller(variables: Types.UpdateSellerMutationVariables): QueryObservable<Types.UpdateSellerMutation>;
540
542
  deleteSeller(variables: Types.DeleteSellerMutationVariables): QueryObservable<Types.DeleteSellerMutation>;
541
543
  }
544
+ export declare class SellingPlanCategory {
545
+ private readonly client;
546
+ constructor(client: BaseGraphQLClient);
547
+ sellingPlanGroup(variables: Types.SellingPlanGroupQueryVariables): QueryObservable<Types.SellingPlanGroupQuery>;
548
+ sellingPlanGroups(variables?: Types.SellingPlanGroupsQueryVariables): QueryObservable<Types.SellingPlanGroupsQuery>;
549
+ createSellingPlanGroup(variables: Types.CreateSellingPlanGroupMutationVariables): QueryObservable<Types.CreateSellingPlanGroupMutation>;
550
+ updateSellingPlanGroup(variables: Types.UpdateSellingPlanGroupMutationVariables): QueryObservable<Types.UpdateSellingPlanGroupMutation>;
551
+ deleteSellingPlanGroup(variables: Types.DeleteSellingPlanGroupMutationVariables): QueryObservable<Types.DeleteSellingPlanGroupMutation>;
552
+ createSellingPlan(variables: Types.CreateSellingPlanMutationVariables): QueryObservable<Types.CreateSellingPlanMutation>;
553
+ updateSellingPlan(variables: Types.UpdateSellingPlanMutationVariables): QueryObservable<Types.UpdateSellingPlanMutation>;
554
+ deleteSellingPlan(variables: Types.DeleteSellingPlanMutationVariables): QueryObservable<Types.DeleteSellingPlanMutation>;
555
+ }
542
556
  export declare class ShippingCategory {
543
557
  private readonly client;
544
558
  constructor(client: BaseGraphQLClient);
@@ -587,6 +601,11 @@ export declare class StockCategory {
587
601
  receiveIncomingStock(variables: Types.ReceiveIncomingStockMutationVariables): QueryObservable<Types.ReceiveIncomingStockMutation>;
588
602
  setSafetyStock(variables: Types.SetSafetyStockMutationVariables): QueryObservable<Types.SetSafetyStockMutation>;
589
603
  }
604
+ export declare class SubscriptionAnalyticsCategory {
605
+ private readonly client;
606
+ constructor(client: BaseGraphQLClient);
607
+ subscriptionAnalytics(variables: Types.SubscriptionAnalyticsQueryVariables): QueryObservable<Types.SubscriptionAnalyticsQuery>;
608
+ }
590
609
  export declare class SubscriptionCategory {
591
610
  private readonly client;
592
611
  constructor(client: BaseGraphQLClient);
@@ -695,8 +714,10 @@ export declare class AdminNamespace {
695
714
  private readonly _scheduledJob;
696
715
  private readonly _search;
697
716
  private readonly _seller;
717
+ private readonly _sellingPlan;
698
718
  private readonly _shipping;
699
719
  private readonly _stock;
720
+ private readonly _subscriptionAnalytics;
700
721
  private readonly _subscription;
701
722
  private readonly _tax;
702
723
  private readonly _transaction;
@@ -753,8 +774,10 @@ export declare class AdminNamespace {
753
774
  get scheduledJob(): ScheduledJobCategory;
754
775
  get search(): SearchCategory;
755
776
  get seller(): SellerCategory;
777
+ get sellingPlan(): SellingPlanCategory;
756
778
  get shipping(): ShippingCategory;
757
779
  get stock(): StockCategory;
780
+ get subscriptionAnalytics(): SubscriptionAnalyticsCategory;
758
781
  get subscription(): SubscriptionCategory;
759
782
  get tax(): TaxCategory;
760
783
  get transaction(): TransactionCategory;
@@ -773,6 +796,7 @@ export type BillingSubscription = Types.BillingSubscriptionFieldFragment;
773
796
  export type Channel = Types.ChannelFieldFragment;
774
797
  export type ChannelPlugin = Types.ChannelPluginFieldsFragment;
775
798
  export type ChannelSettings = Types.ChannelSettingsFieldFragment;
799
+ export type ChannelSubscriptionSettings = Types.ChannelSubscriptionSettingsFieldFragment;
776
800
  export type ChatHistoryMessage = Types.ChatHistoryMessageFieldFragment;
777
801
  export type ChatMessage = Types.ChatMessageFieldFragment;
778
802
  export type ChatSession = Types.ChatSessionFieldFragment;
@@ -829,6 +853,8 @@ export type Role = Types.RoleFieldFragment;
829
853
  export type ScheduledJob = Types.AdminScheduledJobFieldsFragment;
830
854
  export type ScheduledJobRun = Types.AdminScheduledJobRunFieldsFragment;
831
855
  export type Seller = Types.SellerFieldFragment;
856
+ export type SellingPlan = Types.SellingPlanFieldFragment;
857
+ export type SellingPlanGroup = Types.SellingPlanGroupFieldFragment;
832
858
  export type ShippingGatewayCarrier = Types.ShippingCarrierFieldFragment;
833
859
  export type ShippingGatewayLabel = Types.ShippingLabelFieldFragment;
834
860
  export type ShippingGatewayRateGroup = Types.ShippingRateGroupFieldFragment;
@@ -837,6 +863,7 @@ export type ShippingLine = Types.ShippingLineFieldFragment;
837
863
  export type StockLevel = Types.StockLevelFieldFragment;
838
864
  export type StockLocation = Types.StockLocationFieldFragment;
839
865
  export type StockMovement = Types.StockMovementFieldFragment;
866
+ export type SubscriptionAnalytics = Types.SubscriptionAnalyticsFieldFragment;
840
867
  export type SubscriptionCreditBalance = Types.SubscriptionCreditBalanceFieldFragment;
841
868
  export type SubscriptionVariantConfig = Types.SubscriptionVariantConfigFieldFragment;
842
869
  export type Surcharge = Types.SurchargeFieldFragment;