@forgecart/sdk 1.2.5 → 1.2.6

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 (58) hide show
  1. package/README.md +2 -87
  2. package/dist/admin-types.generated.d.ts +9884 -0
  3. package/dist/admin.d.ts +55 -8
  4. package/dist/admin.generated.d.ts +790 -0
  5. package/dist/admin.generated.js +1801 -0
  6. package/dist/admin.js +112 -23
  7. package/dist/client.generated.d.ts +251 -0
  8. package/dist/client.generated.js +757 -0
  9. package/dist/documents.generated.d.ts +465 -0
  10. package/dist/documents.generated.js +24283 -0
  11. package/dist/error-utils.d.ts +25 -0
  12. package/dist/error-utils.js +59 -0
  13. package/dist/hook-event-map.generated.d.ts +243 -0
  14. package/dist/hook-event-map.generated.js +9 -0
  15. package/dist/index.d.ts +23 -59
  16. package/dist/index.js +35 -83
  17. package/dist/sdk-hook-subscription.generated.d.ts +29 -0
  18. package/dist/sdk-hook-subscription.generated.js +73 -0
  19. package/dist/sdk-plugin.generated.d.ts +38 -0
  20. package/dist/sdk-plugin.generated.js +31 -0
  21. package/dist/sdk-types.generated.d.ts +56 -0
  22. package/dist/sdk-types.generated.js +28 -0
  23. package/dist/shop-types.generated.d.ts +4776 -0
  24. package/dist/shop.d.ts +18 -8
  25. package/dist/shop.generated.d.ts +213 -0
  26. package/dist/shop.generated.js +465 -0
  27. package/dist/shop.js +37 -23
  28. package/dist/upload.d.ts +14 -0
  29. package/dist/upload.js +163 -0
  30. package/package.json +10 -25
  31. package/src/admin-types.generated.ts +28377 -0
  32. package/src/admin.generated.ts +1771 -0
  33. package/src/admin.ts +55 -9
  34. package/src/client.generated.ts +845 -0
  35. package/src/documents.generated.ts +24730 -0
  36. package/src/error-utils.ts +74 -0
  37. package/src/hook-event-map.generated.ts +252 -0
  38. package/src/index.ts +23 -115
  39. package/src/sdk-hook-subscription.generated.ts +93 -0
  40. package/src/sdk-plugin.generated.ts +59 -0
  41. package/src/sdk-types.generated.ts +79 -0
  42. package/src/shop-types.generated.ts +10400 -0
  43. package/src/shop.generated.ts +452 -0
  44. package/src/shop.ts +18 -9
  45. package/src/upload.ts +211 -0
  46. package/LICENSE +0 -21
  47. package/dist/admin-namespace.d.ts +0 -2688
  48. package/dist/admin-namespace.js +0 -9691
  49. package/dist/admin-types.d.ts +0 -16195
  50. package/dist/shop-namespace.d.ts +0 -718
  51. package/dist/shop-namespace.js +0 -3124
  52. package/dist/shop-types.d.ts +0 -6310
  53. package/src/admin-namespace.ts +0 -11428
  54. package/src/admin-types.ts +0 -10809
  55. package/src/shop-namespace.ts +0 -3547
  56. package/src/shop-types.ts +0 -4684
  57. /package/dist/{admin-types.js → admin-types.generated.js} +0 -0
  58. /package/dist/{shop-types.js → shop-types.generated.js} +0 -0
package/dist/shop.d.ts CHANGED
@@ -1,8 +1,18 @@
1
- /**
2
- * @forgecart/sdk - Shop API
3
- *
4
- * Shop namespace and types
5
- */
6
- export { ShopNamespace } from './shop-namespace.js';
7
- export type { SDKConfig as ShopSDKConfig } from './shop-namespace.js';
8
- export * from './shop-types.js';
1
+ export { ShopNamespace } from './shop.generated';
2
+ export { AcfCategory } from './shop.generated';
3
+ export { AuthCategory } from './shop.generated';
4
+ export { CartCategory } from './shop.generated';
5
+ export { CheckoutCategory } from './shop.generated';
6
+ export { CollectionCategory } from './shop.generated';
7
+ export { CustomerCategory } from './shop.generated';
8
+ export { FacetCategory } from './shop.generated';
9
+ export { HookDispatchCategory } from './shop.generated';
10
+ export { HookCategory } from './shop.generated';
11
+ export { MarketingEventCategory } from './shop.generated';
12
+ export { MarketingIdentityCategory } from './shop.generated';
13
+ export { OrderCategory } from './shop.generated';
14
+ export { PaymentCategory } from './shop.generated';
15
+ export { ProductCategory } from './shop.generated';
16
+ export { SearchCategory } from './shop.generated';
17
+ export { ShippingCategory } from './shop.generated';
18
+ export { SubscriptionCategory } from './shop.generated';
@@ -0,0 +1,213 @@
1
+ /**
2
+ * AUTO-GENERATED FILE — DO NOT EDIT
3
+ *
4
+ * This file was generated by @forgecart/client-sdk-generators.
5
+ * Any manual changes will be overwritten on the next generation run.
6
+ */
7
+ import type { BaseGraphQLClient } from './client.generated';
8
+ import * as Types from './shop-types.generated';
9
+ import { Observable } from 'rxjs';
10
+ import { QueryObservable } from './client.generated';
11
+ export declare class AcfCategory {
12
+ private readonly client;
13
+ constructor(client: BaseGraphQLClient);
14
+ shopFieldDefinition(variables: Types.ShopFieldDefinitionQueryVariables): QueryObservable<Types.ShopFieldDefinitionQuery>;
15
+ shopEntry(variables: Types.ShopEntryQueryVariables): QueryObservable<Types.ShopEntryQuery>;
16
+ shopEntries(variables: Types.ShopEntriesQueryVariables): QueryObservable<Types.ShopEntriesQuery>;
17
+ }
18
+ export declare class AuthCategory {
19
+ private readonly client;
20
+ constructor(client: BaseGraphQLClient);
21
+ externalAuthenticationMethods(): QueryObservable<Types.ExternalAuthenticationMethodsQuery>;
22
+ login(variables: Types.LoginMutationVariables): QueryObservable<Types.LoginMutation>;
23
+ logout(): QueryObservable<Types.LogoutMutation>;
24
+ authenticateWithExternalStrategy(variables: Types.AuthenticateWithExternalStrategyMutationVariables): QueryObservable<Types.AuthenticateWithExternalStrategyMutation>;
25
+ unlinkExternalAuthenticationMethod(variables: Types.UnlinkExternalAuthenticationMethodMutationVariables): QueryObservable<Types.UnlinkExternalAuthenticationMethodMutation>;
26
+ updateUserPreferences(variables: Types.UpdateUserPreferencesMutationVariables): QueryObservable<Types.UpdateUserPreferencesMutation>;
27
+ }
28
+ export declare class CartCategory {
29
+ private readonly client;
30
+ constructor(client: BaseGraphQLClient);
31
+ addItemToOrder(variables: Types.AddItemToOrderMutationVariables): QueryObservable<Types.AddItemToOrderMutation>;
32
+ adjustOrderLine(variables: Types.AdjustOrderLineMutationVariables): QueryObservable<Types.AdjustOrderLineMutation>;
33
+ removeOrderLine(variables: Types.RemoveOrderLineMutationVariables): QueryObservable<Types.RemoveOrderLineMutation>;
34
+ removeAllOrderLines(): QueryObservable<Types.RemoveAllOrderLinesMutation>;
35
+ applyCouponCode(variables: Types.ApplyCouponCodeMutationVariables): QueryObservable<Types.ApplyCouponCodeMutation>;
36
+ removeCouponCode(variables: Types.RemoveCouponCodeMutationVariables): QueryObservable<Types.RemoveCouponCodeMutation>;
37
+ setCustomerForOrder(variables: Types.SetCustomerForOrderMutationVariables): QueryObservable<Types.SetCustomerForOrderMutation>;
38
+ addItemsToOrder(variables: Types.AddItemsToOrderMutationVariables): QueryObservable<Types.AddItemsToOrderMutation>;
39
+ adjustOrderLines(variables: Types.AdjustOrderLinesMutationVariables): QueryObservable<Types.AdjustOrderLinesMutation>;
40
+ removeItemsFromOrder(variables: Types.RemoveItemsFromOrderMutationVariables): QueryObservable<Types.RemoveItemsFromOrderMutation>;
41
+ }
42
+ export declare class CheckoutCategory {
43
+ private readonly client;
44
+ constructor(client: BaseGraphQLClient);
45
+ setOrderShippingAddress(variables: Types.SetOrderShippingAddressMutationVariables): QueryObservable<Types.SetOrderShippingAddressMutation>;
46
+ setOrderBillingAddress(variables: Types.SetOrderBillingAddressMutationVariables): QueryObservable<Types.SetOrderBillingAddressMutation>;
47
+ transitionOrderToState(variables: Types.TransitionOrderToStateMutationVariables): QueryObservable<Types.TransitionOrderToStateMutation>;
48
+ }
49
+ export declare class CollectionCategory {
50
+ private readonly client;
51
+ constructor(client: BaseGraphQLClient);
52
+ shopCollection(variables: Types.ShopCollectionQueryVariables): QueryObservable<Types.ShopCollectionQuery>;
53
+ shopCollections(variables: Types.ShopCollectionsQueryVariables): QueryObservable<Types.ShopCollectionsQuery>;
54
+ }
55
+ export declare class CustomerCategory {
56
+ private readonly client;
57
+ constructor(client: BaseGraphQLClient);
58
+ activeCustomer(): QueryObservable<Types.ActiveCustomerQuery>;
59
+ activeCustomerAddresses(): QueryObservable<Types.ActiveCustomerAddressesQuery>;
60
+ shopUpdateCustomer(variables: Types.ShopUpdateCustomerMutationVariables): QueryObservable<Types.ShopUpdateCustomerMutation>;
61
+ registerCustomerAccount(variables: Types.RegisterCustomerAccountMutationVariables): QueryObservable<Types.RegisterCustomerAccountMutation>;
62
+ verifyCustomerAccount(variables: Types.VerifyCustomerAccountMutationVariables): QueryObservable<Types.VerifyCustomerAccountMutation>;
63
+ requestPasswordReset(variables: Types.RequestPasswordResetMutationVariables): QueryObservable<Types.RequestPasswordResetMutation>;
64
+ resetPassword(variables: Types.ResetPasswordMutationVariables): QueryObservable<Types.ResetPasswordMutation>;
65
+ createCustomerAddress(variables: Types.CreateCustomerAddressMutationVariables): QueryObservable<Types.CreateCustomerAddressMutation>;
66
+ updateCustomerAddress(variables: Types.UpdateCustomerAddressMutationVariables): QueryObservable<Types.UpdateCustomerAddressMutation>;
67
+ deleteCustomerAddress(variables: Types.DeleteCustomerAddressMutationVariables): QueryObservable<Types.DeleteCustomerAddressMutation>;
68
+ updateCustomerPassword(variables: Types.UpdateCustomerPasswordMutationVariables): QueryObservable<Types.UpdateCustomerPasswordMutation>;
69
+ requestUpdateCustomerEmailAddress(variables: Types.RequestUpdateCustomerEmailAddressMutationVariables): QueryObservable<Types.RequestUpdateCustomerEmailAddressMutation>;
70
+ updateCustomerEmailAddress(variables: Types.UpdateCustomerEmailAddressMutationVariables): QueryObservable<Types.UpdateCustomerEmailAddressMutation>;
71
+ requestCustomerReVerification(): QueryObservable<Types.RequestCustomerReVerificationMutation>;
72
+ verifyCustomerAccountWithPassword(variables: Types.VerifyCustomerAccountWithPasswordMutationVariables): QueryObservable<Types.VerifyCustomerAccountWithPasswordMutation>;
73
+ }
74
+ export declare class FacetCategory {
75
+ private readonly client;
76
+ constructor(client: BaseGraphQLClient);
77
+ shopFacet(variables: Types.ShopFacetQueryVariables): QueryObservable<Types.ShopFacetQuery>;
78
+ shopFacets(variables: Types.ShopFacetsQueryVariables): QueryObservable<Types.ShopFacetsQuery>;
79
+ }
80
+ export declare class HookDispatchCategory {
81
+ private readonly client;
82
+ constructor(client: BaseGraphQLClient);
83
+ shopHookDispatched(variables: Types.ShopHookDispatchedSubscriptionVariables): Observable<Types.ShopHookDispatchedSubscription>;
84
+ respondToHookDispatch(variables: Types.RespondToHookDispatchMutationVariables): QueryObservable<Types.RespondToHookDispatchMutation>;
85
+ }
86
+ export declare class HookCategory {
87
+ private readonly client;
88
+ constructor(client: BaseGraphQLClient);
89
+ hookListen(variables: Types.HookListenSubscriptionVariables): Observable<Types.HookListenSubscription>;
90
+ hookRespond(variables: Types.HookRespondMutationVariables): QueryObservable<Types.HookRespondMutation>;
91
+ }
92
+ export declare class MarketingEventCategory {
93
+ private readonly client;
94
+ constructor(client: BaseGraphQLClient);
95
+ shopTrackEvent(variables: Types.ShopTrackEventMutationVariables): QueryObservable<Types.ShopTrackEventMutation>;
96
+ }
97
+ export declare class MarketingIdentityCategory {
98
+ private readonly client;
99
+ constructor(client: BaseGraphQLClient);
100
+ shopResolveMarketingIdentity(): QueryObservable<Types.ShopResolveMarketingIdentityMutation>;
101
+ shopSetMarketingIdentifiers(variables: Types.ShopSetMarketingIdentifiersMutationVariables): QueryObservable<Types.ShopSetMarketingIdentifiersMutation>;
102
+ shopLinkMarketingEmail(variables: Types.ShopLinkMarketingEmailMutationVariables): QueryObservable<Types.ShopLinkMarketingEmailMutation>;
103
+ }
104
+ export declare class OrderCategory {
105
+ private readonly client;
106
+ constructor(client: BaseGraphQLClient);
107
+ activeOrder(): QueryObservable<Types.ActiveOrderQuery>;
108
+ shopOrderByCode(variables: Types.ShopOrderByCodeQueryVariables): QueryObservable<Types.ShopOrderByCodeQuery>;
109
+ nextOrderStates(): QueryObservable<Types.NextOrderStatesQuery>;
110
+ shopOrderNotes(variables: Types.ShopOrderNotesQueryVariables): QueryObservable<Types.ShopOrderNotesQuery>;
111
+ shopActiveOrderUpdated(): Observable<Types.ShopActiveOrderUpdatedSubscription>;
112
+ }
113
+ export declare class PaymentCategory {
114
+ private readonly client;
115
+ constructor(client: BaseGraphQLClient);
116
+ shopEligiblePaymentProviders(variables: Types.ShopEligiblePaymentProvidersQueryVariables): QueryObservable<Types.ShopEligiblePaymentProvidersQuery>;
117
+ getTokens(): QueryObservable<Types.GetTokensQuery>;
118
+ createPaymentSession(variables: Types.CreatePaymentSessionMutationVariables): QueryObservable<Types.CreatePaymentSessionMutation>;
119
+ confirmPaymentSession(variables: Types.ConfirmPaymentSessionMutationVariables): QueryObservable<Types.ConfirmPaymentSessionMutation>;
120
+ cancelPaymentSession(variables: Types.CancelPaymentSessionMutationVariables): QueryObservable<Types.CancelPaymentSessionMutation>;
121
+ deleteToken(variables: Types.DeleteTokenMutationVariables): QueryObservable<Types.DeleteTokenMutation>;
122
+ setDefaultToken(variables: Types.SetDefaultTokenMutationVariables): QueryObservable<Types.SetDefaultTokenMutation>;
123
+ saveToken(variables: Types.SaveTokenMutationVariables): QueryObservable<Types.SaveTokenMutation>;
124
+ getTokenTemplate(): QueryObservable<Types.GetTokenTemplateQuery>;
125
+ getSessionTemplate(variables: Types.GetSessionTemplateQueryVariables): QueryObservable<Types.GetSessionTemplateQuery>;
126
+ getSessionVariables(variables: Types.GetSessionVariablesQueryVariables): QueryObservable<Types.GetSessionVariablesQuery>;
127
+ }
128
+ export declare class ProductCategory {
129
+ private readonly client;
130
+ constructor(client: BaseGraphQLClient);
131
+ shopProduct(variables: Types.ShopProductQueryVariables): QueryObservable<Types.ShopProductQuery>;
132
+ shopProducts(variables: Types.ShopProductsQueryVariables): QueryObservable<Types.ShopProductsQuery>;
133
+ shopProductOptionGroups(variables: Types.ShopProductOptionGroupsQueryVariables): QueryObservable<Types.ShopProductOptionGroupsQuery>;
134
+ }
135
+ export declare class SearchCategory {
136
+ private readonly client;
137
+ constructor(client: BaseGraphQLClient);
138
+ shopSearch(variables: Types.ShopSearchQueryVariables): QueryObservable<Types.ShopSearchQuery>;
139
+ suggest(variables: Types.SuggestQueryVariables): QueryObservable<Types.SuggestQuery>;
140
+ }
141
+ export declare class ShippingCategory {
142
+ private readonly client;
143
+ constructor(client: BaseGraphQLClient);
144
+ shippingRateGroups(): QueryObservable<Types.ShippingRateGroupsQuery>;
145
+ selectShippingRate(variables: Types.SelectShippingRateMutationVariables): QueryObservable<Types.SelectShippingRateMutation>;
146
+ }
147
+ export declare class SubscriptionCategory {
148
+ private readonly client;
149
+ constructor(client: BaseGraphQLClient);
150
+ mySubscriptions(): QueryObservable<Types.MySubscriptionsQuery>;
151
+ mySubscription(variables: Types.MySubscriptionQueryVariables): QueryObservable<Types.MySubscriptionQuery>;
152
+ shopCreateSubscription(variables: Types.ShopCreateSubscriptionMutationVariables): QueryObservable<Types.ShopCreateSubscriptionMutation>;
153
+ shopCancelSubscription(variables: Types.ShopCancelSubscriptionMutationVariables): QueryObservable<Types.ShopCancelSubscriptionMutation>;
154
+ shopPauseSubscription(variables: Types.ShopPauseSubscriptionMutationVariables): QueryObservable<Types.ShopPauseSubscriptionMutation>;
155
+ shopResumeSubscription(variables: Types.ShopResumeSubscriptionMutationVariables): QueryObservable<Types.ShopResumeSubscriptionMutation>;
156
+ shopChangeSubscriptionPlan(variables: Types.ShopChangeSubscriptionPlanMutationVariables): QueryObservable<Types.ShopChangeSubscriptionPlanMutation>;
157
+ shopChangeSubscriptionQuantity(variables: Types.ShopChangeSubscriptionQuantityMutationVariables): QueryObservable<Types.ShopChangeSubscriptionQuantityMutation>;
158
+ reportUsage(variables: Types.ReportUsageMutationVariables): QueryObservable<Types.ReportUsageMutation>;
159
+ }
160
+ export declare class ShopNamespace {
161
+ private readonly client;
162
+ private readonly _acf;
163
+ private readonly _auth;
164
+ private readonly _cart;
165
+ private readonly _checkout;
166
+ private readonly _collection;
167
+ private readonly _customer;
168
+ private readonly _facet;
169
+ private readonly _hookDispatch;
170
+ private readonly _hook;
171
+ private readonly _marketingEvent;
172
+ private readonly _marketingIdentity;
173
+ private readonly _order;
174
+ private readonly _payment;
175
+ private readonly _product;
176
+ private readonly _search;
177
+ private readonly _shipping;
178
+ private readonly _subscription;
179
+ constructor(client: BaseGraphQLClient);
180
+ get acf(): AcfCategory;
181
+ get auth(): AuthCategory;
182
+ get cart(): CartCategory;
183
+ get checkout(): CheckoutCategory;
184
+ get collection(): CollectionCategory;
185
+ get customer(): CustomerCategory;
186
+ get facet(): FacetCategory;
187
+ get hookDispatch(): HookDispatchCategory;
188
+ get hook(): HookCategory;
189
+ get marketingEvent(): MarketingEventCategory;
190
+ get marketingIdentity(): MarketingIdentityCategory;
191
+ get order(): OrderCategory;
192
+ get payment(): PaymentCategory;
193
+ get product(): ProductCategory;
194
+ get search(): SearchCategory;
195
+ get shipping(): ShippingCategory;
196
+ get subscription(): SubscriptionCategory;
197
+ }
198
+ export type Address = Types.ShopCustomerAddressFieldFragment;
199
+ export type Adjustment = Types.ShopAdjustmentFieldFragment;
200
+ export type BillingSubscription = Types.ShopBillingSubscriptionFieldsFragment;
201
+ export type Collection = Types.ShopCollectionFieldsFragment;
202
+ export type Customer = Types.ShopCustomerFieldFragment;
203
+ export type Facet = Types.ShopFacetFieldsFragment;
204
+ export type Order = Types.ShopOrderFieldFragment;
205
+ export type OrderAddress = Types.ShopOrderAddressFieldFragment;
206
+ export type OrderDiscount = Types.ShopDiscountFieldFragment;
207
+ export type OrderLine = Types.ShopOrderLineFieldFragment;
208
+ export type OrderTaxLine = Types.ShopTaxLineFieldFragment;
209
+ export type OrderTaxSummary = Types.ShopTaxSummaryFieldFragment;
210
+ export type PaymentGatewaySession = Types.ShopPaymentSessionFieldFragment;
211
+ export type PaymentGatewayToken = Types.ShopPaymentTokenFieldFragment;
212
+ export type ShippingLine = Types.ShopShippingLineFieldFragment;
213
+ export type Surcharge = Types.ShopSurchargeFieldFragment;