@forgecart/sdk 1.202607061936.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'];
@@ -1819,6 +1843,8 @@ export type Mutation = {
1819
1843
  createRole: Role;
1820
1844
  createScheduledJob: ScheduledJob;
1821
1845
  createSeller: Seller;
1846
+ createSellingPlan: SellingPlan;
1847
+ createSellingPlanGroup: SellingPlanGroup;
1822
1848
  createShippingGatewayRoutingRule: ShippingGatewayRoutingRule;
1823
1849
  createShippingLabel: ShippingGatewayLabel;
1824
1850
  createStockLocation: StockLocation;
@@ -1856,6 +1882,8 @@ export type Mutation = {
1856
1882
  deleteRole: DeletionResponse;
1857
1883
  deleteScheduledJob: ScheduledJob;
1858
1884
  deleteSeller: Seller;
1885
+ deleteSellingPlan: SellingPlan;
1886
+ deleteSellingPlanGroup: SellingPlanGroup;
1859
1887
  deleteShippingGatewayRoutingRule: Scalars['Boolean']['output'];
1860
1888
  deleteStockLocation: DeletionResponse;
1861
1889
  deleteSubscriptionVariantConfig: SubscriptionVariantConfig;
@@ -1946,6 +1974,7 @@ export type Mutation = {
1946
1974
  updateCarrier: ShippingGatewayCarrier;
1947
1975
  updateChannel: Channel;
1948
1976
  updateChannelSettings: ChannelSettings;
1977
+ updateChannelSubscriptionSettings: ChannelSubscriptionSettings;
1949
1978
  updateCollection: Collection;
1950
1979
  updateCountry: Country;
1951
1980
  updateCustomer: Customer;
@@ -1968,6 +1997,8 @@ export type Mutation = {
1968
1997
  updateRole: Role;
1969
1998
  updateScheduledJob: ScheduledJob;
1970
1999
  updateSeller: Seller;
2000
+ updateSellingPlan: SellingPlan;
2001
+ updateSellingPlanGroup: SellingPlanGroup;
1971
2002
  updateShippingGatewayRoutingRule: ShippingGatewayRoutingRule;
1972
2003
  updateShippingLabel: ShippingGatewayLabel;
1973
2004
  updateStockLocation: StockLocation;
@@ -2176,6 +2207,12 @@ export type MutationcreateScheduledJobArgs = {
2176
2207
  export type MutationcreateSellerArgs = {
2177
2208
  input: CreateSellerInput;
2178
2209
  };
2210
+ export type MutationcreateSellingPlanArgs = {
2211
+ input: CreateSellingPlanInput;
2212
+ };
2213
+ export type MutationcreateSellingPlanGroupArgs = {
2214
+ input: CreateSellingPlanGroupInput;
2215
+ };
2179
2216
  export type MutationcreateShippingGatewayRoutingRuleArgs = {
2180
2217
  input: CreateShippingGatewayRoutingRuleInput;
2181
2218
  };
@@ -2288,6 +2325,12 @@ export type MutationdeleteScheduledJobArgs = {
2288
2325
  export type MutationdeleteSellerArgs = {
2289
2326
  id: Scalars['ID']['input'];
2290
2327
  };
2328
+ export type MutationdeleteSellingPlanArgs = {
2329
+ id: Scalars['ID']['input'];
2330
+ };
2331
+ export type MutationdeleteSellingPlanGroupArgs = {
2332
+ id: Scalars['ID']['input'];
2333
+ };
2291
2334
  export type MutationdeleteShippingGatewayRoutingRuleArgs = {
2292
2335
  id: Scalars['ID']['input'];
2293
2336
  };
@@ -2552,6 +2595,9 @@ export type MutationupdateChannelArgs = {
2552
2595
  export type MutationupdateChannelSettingsArgs = {
2553
2596
  input: UpdateChannelSettingsInput;
2554
2597
  };
2598
+ export type MutationupdateChannelSubscriptionSettingsArgs = {
2599
+ input: UpdateChannelSubscriptionSettingsInput;
2600
+ };
2555
2601
  export type MutationupdateCollectionArgs = {
2556
2602
  input: UpdateCollectionInput;
2557
2603
  };
@@ -2620,6 +2666,12 @@ export type MutationupdateScheduledJobArgs = {
2620
2666
  export type MutationupdateSellerArgs = {
2621
2667
  input: UpdateSellerInput;
2622
2668
  };
2669
+ export type MutationupdateSellingPlanArgs = {
2670
+ input: UpdateSellingPlanInput;
2671
+ };
2672
+ export type MutationupdateSellingPlanGroupArgs = {
2673
+ input: UpdateSellingPlanGroupInput;
2674
+ };
2623
2675
  export type MutationupdateShippingGatewayRoutingRuleArgs = {
2624
2676
  input: UpdateShippingGatewayRoutingRuleInput;
2625
2677
  };
@@ -2707,6 +2759,7 @@ export type Order = {
2707
2759
  promotions: Array<Promotion>;
2708
2760
  recentShippingMethod?: Maybe<ShippingGatewayRate>;
2709
2761
  recentToken?: Maybe<PaymentGatewayToken>;
2762
+ sellingPlanId?: Maybe<Scalars['ID']['output']>;
2710
2763
  shipping: Scalars['Int']['output'];
2711
2764
  shippingAddress?: Maybe<OrderAddress>;
2712
2765
  shippingLines: Array<ShippingLine>;
@@ -2764,6 +2817,7 @@ export type OrderLine = {
2764
2817
  productVariant: ProductVariant;
2765
2818
  productVariantId: Scalars['ID']['output'];
2766
2819
  quantity: Scalars['Int']['output'];
2820
+ sellingPlanId?: Maybe<Scalars['ID']['output']>;
2767
2821
  shippingLine?: Maybe<ShippingLine>;
2768
2822
  snapshot?: Maybe<ProductVariantSnapshot>;
2769
2823
  taxCategory?: Maybe<TaxCategory>;
@@ -2879,6 +2933,7 @@ export type PaymentProviderQuote = {
2879
2933
  providerName: Scalars['String']['output'];
2880
2934
  };
2881
2935
  export type PluginStatus = 'DISABLED' | 'ENABLED' | 'INPROGRESS';
2936
+ export type PricingPolicy = 'fixed_amount' | 'none' | 'percentage';
2882
2937
  export type Product = {
2883
2938
  assets: Array<Asset>;
2884
2939
  channels: Array<Channel>;
@@ -3069,6 +3124,7 @@ export type Query = {
3069
3124
  channelDeploymentInfo: ChannelDeploymentInfo;
3070
3125
  channelPlugins: Array<ChannelPlugin>;
3071
3126
  channelSettings: ChannelSettings;
3127
+ channelSubscriptionSettings: ChannelSubscriptionSettings;
3072
3128
  channels: ChannelList;
3073
3129
  chatHistory: Array<ChatHistoryMessage>;
3074
3130
  chatQueue: Array<ChatQueueItem>;
@@ -3148,6 +3204,8 @@ export type Query = {
3148
3204
  search: SearchResult;
3149
3205
  seller?: Maybe<Seller>;
3150
3206
  sellers: SellerList;
3207
+ sellingPlanGroup?: Maybe<SellingPlanGroup>;
3208
+ sellingPlanGroups: SellingPlanGroupList;
3151
3209
  shippingGatewayRoutingRules: Array<ShippingGatewayRoutingRule>;
3152
3210
  shippingLabels: Array<ShippingGatewayLabel>;
3153
3211
  shippingRateGroups: Array<ShippingGatewayRateGroup>;
@@ -3155,6 +3213,7 @@ export type Query = {
3155
3213
  stockLocations: StockLocationList;
3156
3214
  stockMovements: StockMovementList;
3157
3215
  subscription?: Maybe<BillingSubscription>;
3216
+ subscriptionAnalytics: SubscriptionAnalytics;
3158
3217
  subscriptionVariantConfigs: Array<SubscriptionVariantConfig>;
3159
3218
  subscriptions: BillingSubscriptionList;
3160
3219
  taxCategories: TaxCategoryList;
@@ -3427,6 +3486,12 @@ export type QuerysellerArgs = {
3427
3486
  export type QuerysellersArgs = {
3428
3487
  options?: InputMaybe<ListQueryOptions>;
3429
3488
  };
3489
+ export type QuerysellingPlanGroupArgs = {
3490
+ id: Scalars['ID']['input'];
3491
+ };
3492
+ export type QuerysellingPlanGroupsArgs = {
3493
+ options?: InputMaybe<SellingPlanGroupListOptions>;
3494
+ };
3430
3495
  export type QueryshippingGatewayRoutingRulesArgs = {
3431
3496
  stockLocationId: Scalars['ID']['input'];
3432
3497
  };
@@ -3448,6 +3513,9 @@ export type QuerystockMovementsArgs = {
3448
3513
  export type QuerysubscriptionArgs = {
3449
3514
  id: Scalars['ID']['input'];
3450
3515
  };
3516
+ export type QuerysubscriptionAnalyticsArgs = {
3517
+ input: SubscriptionAnalyticsInput;
3518
+ };
3451
3519
  export type QuerysubscriptionsArgs = {
3452
3520
  options?: InputMaybe<SubscriptionListOptions>;
3453
3521
  };
@@ -3804,6 +3872,40 @@ export type SellerList = {
3804
3872
  items: Array<Seller>;
3805
3873
  totalItems: Scalars['Int']['output'];
3806
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
+ };
3807
3909
  export type SendChatMessageInput = {
3808
3910
  message: Scalars['String']['input'];
3809
3911
  sessionId: Scalars['String']['input'];
@@ -3859,6 +3961,9 @@ export type SetMarketingIdentifiersResult = {
3859
3961
  identityId: Scalars['ID']['output'];
3860
3962
  rejected: Array<Scalars['String']['output']>;
3861
3963
  };
3964
+ export type SetOrderSellingPlanInput = {
3965
+ sellingPlanId?: InputMaybe<Scalars['ID']['input']>;
3966
+ };
3862
3967
  export type SetPriceInput = {
3863
3968
  currencyCode: Scalars['String']['input'];
3864
3969
  price: Scalars['Int']['input'];
@@ -3976,6 +4081,7 @@ export type ShippingRoutingFulfillmentType = 'MANUAL' | 'PROVIDER';
3976
4081
  export type ShippingRoutingScopeType = 'COUNTRIES' | 'DOMESTIC' | 'INTERNATIONAL';
3977
4082
  export type ShopAddItemToOrderInput = {
3978
4083
  quantity: Scalars['Int']['input'];
4084
+ sellingPlanId?: InputMaybe<Scalars['ID']['input']>;
3979
4085
  variantId: Scalars['ID']['input'];
3980
4086
  };
3981
4087
  export type ShopAdjustOrderLineInput = {
@@ -4084,11 +4190,28 @@ export type SubscriptionhookDispatchedArgs = {
4084
4190
  export type SubscriptionresumeChatSessionArgs = {
4085
4191
  input: ResumeChatSessionInput;
4086
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';
4087
4210
  export type SubscriptionCreditBalance = {
4088
4211
  amountCents: Scalars['Int']['output'];
4089
4212
  appliedCents: Scalars['Int']['output'];
4090
4213
  id: Scalars['ID']['output'];
4091
- reason: CreditBalanceReason;
4214
+ reason: Scalars['String']['output'];
4092
4215
  sourceOrderId?: Maybe<Scalars['ID']['output']>;
4093
4216
  };
4094
4217
  export type SubscriptionFilterParameter = {
@@ -4115,6 +4238,18 @@ export type SubscriptionMetricAllowance = {
4115
4238
  includedQuantity: Scalars['Int']['output'];
4116
4239
  metric: UsageMetric;
4117
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
+ };
4118
4253
  export type SubscriptionSortParameter = {
4119
4254
  code?: InputMaybe<SortOrder>;
4120
4255
  createdAt?: InputMaybe<SortOrder>;
@@ -4123,6 +4258,13 @@ export type SubscriptionSortParameter = {
4123
4258
  state?: InputMaybe<SortOrder>;
4124
4259
  };
4125
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
+ };
4126
4268
  export type SubscriptionVariantConfig = {
4127
4269
  billingInterval: BillingInterval;
4128
4270
  enabled: Scalars['Boolean']['output'];
@@ -4301,6 +4443,9 @@ export type UpdateChannelSettingsInput = {
4301
4443
  shopName?: InputMaybe<Scalars['String']['input']>;
4302
4444
  taxOriginScope?: InputMaybe<Scalars['String']['input']>;
4303
4445
  };
4446
+ export type UpdateChannelSubscriptionSettingsInput = {
4447
+ couponInteraction?: InputMaybe<SubscriptionCouponInteraction>;
4448
+ };
4304
4449
  export type UpdateCollectionInput = {
4305
4450
  featuredAssetId?: InputMaybe<Scalars['ID']['input']>;
4306
4451
  filters?: InputMaybe<Array<CollectionFilterDefinitionInput>>;
@@ -4505,6 +4650,25 @@ export type UpdateSellerInput = {
4505
4650
  id: Scalars['ID']['input'];
4506
4651
  name?: InputMaybe<Scalars['String']['input']>;
4507
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
+ };
4508
4672
  export type UpdateShippingGatewayRoutingRuleInput = {
4509
4673
  countryCodes?: InputMaybe<Array<Scalars['String']['input']>>;
4510
4674
  enabled?: InputMaybe<Scalars['Boolean']['input']>;
@@ -5539,6 +5703,19 @@ export type ChannelUpdateSettingsMutationVariables = Exact<{
5539
5703
  export type ChannelUpdateSettingsMutation = {
5540
5704
  updateChannelSettings: Pick<ChannelSettings, 'id' | 'channelId' | 'shopName' | 'requiresShippingAddressValidation' | 'requireCustomerForCheckout' | 'defaultFulfillmentHandlerCode' | 'defaultPaymentProviderCode' | 'defaultWeightUnit' | 'defaultDimensionUnit' | 'autoCurrencyExchange' | 'fxRoundingRule' | 'fxMarkupPercent'>;
5541
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
+ };
5542
5719
  export type ChatSessionFieldFragment = Pick<ChatSession, 'sessionId' | 'channelToken' | 'userId' | 'createdAt' | 'lastActivity' | 'messageCount' | 'status'>;
5543
5720
  export type ChatMessageFieldFragment = (Pick<ChatMessage, 'type' | 'content' | 'timestamp' | 'isFinal' | 'eventId'> & {
5544
5721
  toolUse?: Maybe<Pick<ToolUseDetail, 'toolId' | 'toolName' | 'input'>>;
@@ -9686,6 +9863,70 @@ export type DeleteSellerMutationVariables = Exact<{
9686
9863
  export type DeleteSellerMutation = {
9687
9864
  deleteSeller: Pick<Seller, 'id' | 'createdAt' | 'updatedAt' | 'name'>;
9688
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
+ };
9689
9930
  export type ShippingRateGroupFieldFragment = (Pick<ShippingGatewayRateGroup, 'id' | 'orderId' | 'stockLocationId' | 'stockLocationName'> & {
9690
9931
  orderLines: Array<Pick<ShippingGatewayRateGroupLine, 'orderLineId' | 'productName' | 'variantName' | 'quantity' | 'weight' | 'weightUnit' | 'length' | 'width' | 'height' | 'dimensionUnit'>>;
9691
9932
  rates: Array<Pick<ShippingGatewayRate, 'id' | 'extRateId' | 'carrier' | 'service' | 'amount' | 'currency' | 'estimatedDays' | 'selected' | 'providerCode'>>;
@@ -10089,6 +10330,21 @@ export type SetSafetyStockMutationVariables = Exact<{
10089
10330
  export type SetSafetyStockMutation = {
10090
10331
  setSafetyStock: Pick<StockLevel, 'id' | 'variantId' | 'stockLocationId' | 'stockOnHand' | 'stockAllocated' | 'stockReserved' | 'stockDamaged' | 'safetyStock' | 'stockInQualityControl' | 'stockIncoming'>;
10091
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
+ };
10092
10348
  export type BillingSubscriptionFieldFragment = (Pick<BillingSubscription, 'id' | 'createdAt' | 'updatedAt' | 'code' | 'state' | 'billingInterval' | 'currencyCode' | 'anchorDate' | 'currentPeriodStart' | 'currentPeriodEnd' | 'trialEnd' | 'cancelledAt' | 'cancellationReason' | 'cancelAtPeriodEnd' | 'pausedAt' | 'resumeAt' | 'dunningAttemptCount'> & {
10093
10349
  customer: Pick<Customer, 'id' | 'firstName' | 'lastName' | 'emailAddress'>;
10094
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;