@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.
- package/README.md +2 -87
- package/dist/admin-types.generated.d.ts +9884 -0
- package/dist/admin.d.ts +55 -8
- package/dist/admin.generated.d.ts +790 -0
- package/dist/admin.generated.js +1801 -0
- package/dist/admin.js +112 -23
- package/dist/client.generated.d.ts +251 -0
- package/dist/client.generated.js +757 -0
- package/dist/documents.generated.d.ts +465 -0
- package/dist/documents.generated.js +24283 -0
- package/dist/error-utils.d.ts +25 -0
- package/dist/error-utils.js +59 -0
- package/dist/hook-event-map.generated.d.ts +243 -0
- package/dist/hook-event-map.generated.js +9 -0
- package/dist/index.d.ts +23 -59
- package/dist/index.js +35 -83
- package/dist/sdk-hook-subscription.generated.d.ts +29 -0
- package/dist/sdk-hook-subscription.generated.js +73 -0
- package/dist/sdk-plugin.generated.d.ts +38 -0
- package/dist/sdk-plugin.generated.js +31 -0
- package/dist/sdk-types.generated.d.ts +56 -0
- package/dist/sdk-types.generated.js +28 -0
- package/dist/shop-types.generated.d.ts +4776 -0
- package/dist/shop.d.ts +18 -8
- package/dist/shop.generated.d.ts +213 -0
- package/dist/shop.generated.js +465 -0
- package/dist/shop.js +37 -23
- package/dist/upload.d.ts +14 -0
- package/dist/upload.js +163 -0
- package/package.json +10 -25
- package/src/admin-types.generated.ts +28377 -0
- package/src/admin.generated.ts +1771 -0
- package/src/admin.ts +55 -9
- package/src/client.generated.ts +845 -0
- package/src/documents.generated.ts +24730 -0
- package/src/error-utils.ts +74 -0
- package/src/hook-event-map.generated.ts +252 -0
- package/src/index.ts +23 -115
- package/src/sdk-hook-subscription.generated.ts +93 -0
- package/src/sdk-plugin.generated.ts +59 -0
- package/src/sdk-types.generated.ts +79 -0
- package/src/shop-types.generated.ts +10400 -0
- package/src/shop.generated.ts +452 -0
- package/src/shop.ts +18 -9
- package/src/upload.ts +211 -0
- package/LICENSE +0 -21
- package/dist/admin-namespace.d.ts +0 -2688
- package/dist/admin-namespace.js +0 -9691
- package/dist/admin-types.d.ts +0 -16195
- package/dist/shop-namespace.d.ts +0 -718
- package/dist/shop-namespace.js +0 -3124
- package/dist/shop-types.d.ts +0 -6310
- package/src/admin-namespace.ts +0 -11428
- package/src/admin-types.ts +0 -10809
- package/src/shop-namespace.ts +0 -3547
- package/src/shop-types.ts +0 -4684
- /package/dist/{admin-types.js → admin-types.generated.js} +0 -0
- /package/dist/{shop-types.js → shop-types.generated.js} +0 -0
|
@@ -0,0 +1,465 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* AUTO-GENERATED FILE — DO NOT EDIT
|
|
5
|
+
*
|
|
6
|
+
* This file was generated by @forgecart/client-sdk-generators.
|
|
7
|
+
* Any manual changes will be overwritten on the next generation run.
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.ShopNamespace = exports.SubscriptionCategory = exports.ShippingCategory = exports.SearchCategory = exports.ProductCategory = exports.PaymentCategory = exports.OrderCategory = exports.MarketingIdentityCategory = exports.MarketingEventCategory = exports.HookCategory = exports.HookDispatchCategory = exports.FacetCategory = exports.CustomerCategory = exports.CollectionCategory = exports.CheckoutCategory = exports.CartCategory = exports.AuthCategory = exports.AcfCategory = void 0;
|
|
11
|
+
const documents_generated_1 = require("./documents.generated");
|
|
12
|
+
class AcfCategory {
|
|
13
|
+
client;
|
|
14
|
+
constructor(client) {
|
|
15
|
+
this.client = client;
|
|
16
|
+
}
|
|
17
|
+
shopFieldDefinition(variables) {
|
|
18
|
+
return this.client.query(documents_generated_1.shopShopFieldDefinitionDocument, variables);
|
|
19
|
+
}
|
|
20
|
+
shopEntry(variables) {
|
|
21
|
+
return this.client.query(documents_generated_1.shopShopEntryDocument, variables);
|
|
22
|
+
}
|
|
23
|
+
shopEntries(variables) {
|
|
24
|
+
return this.client.query(documents_generated_1.shopShopEntriesDocument, variables);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
exports.AcfCategory = AcfCategory;
|
|
28
|
+
class AuthCategory {
|
|
29
|
+
client;
|
|
30
|
+
constructor(client) {
|
|
31
|
+
this.client = client;
|
|
32
|
+
}
|
|
33
|
+
externalAuthenticationMethods() {
|
|
34
|
+
return this.client.query(documents_generated_1.shopExternalAuthenticationMethodsDocument);
|
|
35
|
+
}
|
|
36
|
+
login(variables) {
|
|
37
|
+
return this.client.mutate(documents_generated_1.shopLoginDocument, variables);
|
|
38
|
+
}
|
|
39
|
+
logout() {
|
|
40
|
+
return this.client.mutate(documents_generated_1.shopLogoutDocument);
|
|
41
|
+
}
|
|
42
|
+
authenticateWithExternalStrategy(variables) {
|
|
43
|
+
return this.client.mutate(documents_generated_1.shopAuthenticateWithExternalStrategyDocument, variables);
|
|
44
|
+
}
|
|
45
|
+
unlinkExternalAuthenticationMethod(variables) {
|
|
46
|
+
return this.client.mutate(documents_generated_1.shopUnlinkExternalAuthenticationMethodDocument, variables);
|
|
47
|
+
}
|
|
48
|
+
updateUserPreferences(variables) {
|
|
49
|
+
return this.client.mutate(documents_generated_1.shopUpdateUserPreferencesDocument, variables);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
exports.AuthCategory = AuthCategory;
|
|
53
|
+
class CartCategory {
|
|
54
|
+
client;
|
|
55
|
+
constructor(client) {
|
|
56
|
+
this.client = client;
|
|
57
|
+
}
|
|
58
|
+
addItemToOrder(variables) {
|
|
59
|
+
return this.client.mutate(documents_generated_1.shopAddItemToOrderDocument, variables);
|
|
60
|
+
}
|
|
61
|
+
adjustOrderLine(variables) {
|
|
62
|
+
return this.client.mutate(documents_generated_1.shopAdjustOrderLineDocument, variables);
|
|
63
|
+
}
|
|
64
|
+
removeOrderLine(variables) {
|
|
65
|
+
return this.client.mutate(documents_generated_1.shopRemoveOrderLineDocument, variables);
|
|
66
|
+
}
|
|
67
|
+
removeAllOrderLines() {
|
|
68
|
+
return this.client.mutate(documents_generated_1.shopRemoveAllOrderLinesDocument);
|
|
69
|
+
}
|
|
70
|
+
applyCouponCode(variables) {
|
|
71
|
+
return this.client.mutate(documents_generated_1.shopApplyCouponCodeDocument, variables);
|
|
72
|
+
}
|
|
73
|
+
removeCouponCode(variables) {
|
|
74
|
+
return this.client.mutate(documents_generated_1.shopRemoveCouponCodeDocument, variables);
|
|
75
|
+
}
|
|
76
|
+
setCustomerForOrder(variables) {
|
|
77
|
+
return this.client.mutate(documents_generated_1.shopSetCustomerForOrderDocument, variables);
|
|
78
|
+
}
|
|
79
|
+
addItemsToOrder(variables) {
|
|
80
|
+
return this.client.mutate(documents_generated_1.shopAddItemsToOrderDocument, variables);
|
|
81
|
+
}
|
|
82
|
+
adjustOrderLines(variables) {
|
|
83
|
+
return this.client.mutate(documents_generated_1.shopAdjustOrderLinesDocument, variables);
|
|
84
|
+
}
|
|
85
|
+
removeItemsFromOrder(variables) {
|
|
86
|
+
return this.client.mutate(documents_generated_1.shopRemoveItemsFromOrderDocument, variables);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
exports.CartCategory = CartCategory;
|
|
90
|
+
class CheckoutCategory {
|
|
91
|
+
client;
|
|
92
|
+
constructor(client) {
|
|
93
|
+
this.client = client;
|
|
94
|
+
}
|
|
95
|
+
setOrderShippingAddress(variables) {
|
|
96
|
+
return this.client.mutate(documents_generated_1.shopSetOrderShippingAddressDocument, variables);
|
|
97
|
+
}
|
|
98
|
+
setOrderBillingAddress(variables) {
|
|
99
|
+
return this.client.mutate(documents_generated_1.shopSetOrderBillingAddressDocument, variables);
|
|
100
|
+
}
|
|
101
|
+
transitionOrderToState(variables) {
|
|
102
|
+
return this.client.mutate(documents_generated_1.shopTransitionOrderToStateDocument, variables);
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
exports.CheckoutCategory = CheckoutCategory;
|
|
106
|
+
class CollectionCategory {
|
|
107
|
+
client;
|
|
108
|
+
constructor(client) {
|
|
109
|
+
this.client = client;
|
|
110
|
+
}
|
|
111
|
+
shopCollection(variables) {
|
|
112
|
+
return this.client.query(documents_generated_1.shopShopCollectionDocument, variables);
|
|
113
|
+
}
|
|
114
|
+
shopCollections(variables) {
|
|
115
|
+
return this.client.query(documents_generated_1.shopShopCollectionsDocument, variables);
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
exports.CollectionCategory = CollectionCategory;
|
|
119
|
+
class CustomerCategory {
|
|
120
|
+
client;
|
|
121
|
+
constructor(client) {
|
|
122
|
+
this.client = client;
|
|
123
|
+
}
|
|
124
|
+
activeCustomer() {
|
|
125
|
+
return this.client.query(documents_generated_1.shopActiveCustomerDocument);
|
|
126
|
+
}
|
|
127
|
+
activeCustomerAddresses() {
|
|
128
|
+
return this.client.query(documents_generated_1.shopActiveCustomerAddressesDocument);
|
|
129
|
+
}
|
|
130
|
+
shopUpdateCustomer(variables) {
|
|
131
|
+
return this.client.mutate(documents_generated_1.shopShopUpdateCustomerDocument, variables);
|
|
132
|
+
}
|
|
133
|
+
registerCustomerAccount(variables) {
|
|
134
|
+
return this.client.mutate(documents_generated_1.shopRegisterCustomerAccountDocument, variables);
|
|
135
|
+
}
|
|
136
|
+
verifyCustomerAccount(variables) {
|
|
137
|
+
return this.client.mutate(documents_generated_1.shopVerifyCustomerAccountDocument, variables);
|
|
138
|
+
}
|
|
139
|
+
requestPasswordReset(variables) {
|
|
140
|
+
return this.client.mutate(documents_generated_1.shopRequestPasswordResetDocument, variables);
|
|
141
|
+
}
|
|
142
|
+
resetPassword(variables) {
|
|
143
|
+
return this.client.mutate(documents_generated_1.shopResetPasswordDocument, variables);
|
|
144
|
+
}
|
|
145
|
+
createCustomerAddress(variables) {
|
|
146
|
+
return this.client.mutate(documents_generated_1.shopCreateCustomerAddressDocument, variables);
|
|
147
|
+
}
|
|
148
|
+
updateCustomerAddress(variables) {
|
|
149
|
+
return this.client.mutate(documents_generated_1.shopUpdateCustomerAddressDocument, variables);
|
|
150
|
+
}
|
|
151
|
+
deleteCustomerAddress(variables) {
|
|
152
|
+
return this.client.mutate(documents_generated_1.shopDeleteCustomerAddressDocument, variables);
|
|
153
|
+
}
|
|
154
|
+
updateCustomerPassword(variables) {
|
|
155
|
+
return this.client.mutate(documents_generated_1.shopUpdateCustomerPasswordDocument, variables);
|
|
156
|
+
}
|
|
157
|
+
requestUpdateCustomerEmailAddress(variables) {
|
|
158
|
+
return this.client.mutate(documents_generated_1.shopRequestUpdateCustomerEmailAddressDocument, variables);
|
|
159
|
+
}
|
|
160
|
+
updateCustomerEmailAddress(variables) {
|
|
161
|
+
return this.client.mutate(documents_generated_1.shopUpdateCustomerEmailAddressDocument, variables);
|
|
162
|
+
}
|
|
163
|
+
requestCustomerReVerification() {
|
|
164
|
+
return this.client.mutate(documents_generated_1.shopRequestCustomerReVerificationDocument);
|
|
165
|
+
}
|
|
166
|
+
verifyCustomerAccountWithPassword(variables) {
|
|
167
|
+
return this.client.mutate(documents_generated_1.shopVerifyCustomerAccountWithPasswordDocument, variables);
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
exports.CustomerCategory = CustomerCategory;
|
|
171
|
+
class FacetCategory {
|
|
172
|
+
client;
|
|
173
|
+
constructor(client) {
|
|
174
|
+
this.client = client;
|
|
175
|
+
}
|
|
176
|
+
shopFacet(variables) {
|
|
177
|
+
return this.client.query(documents_generated_1.shopShopFacetDocument, variables);
|
|
178
|
+
}
|
|
179
|
+
shopFacets(variables) {
|
|
180
|
+
return this.client.query(documents_generated_1.shopShopFacetsDocument, variables);
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
exports.FacetCategory = FacetCategory;
|
|
184
|
+
class HookDispatchCategory {
|
|
185
|
+
client;
|
|
186
|
+
constructor(client) {
|
|
187
|
+
this.client = client;
|
|
188
|
+
}
|
|
189
|
+
shopHookDispatched(variables) {
|
|
190
|
+
return this.client.subscribe(documents_generated_1.shopShopHookDispatchedDocument, variables);
|
|
191
|
+
}
|
|
192
|
+
respondToHookDispatch(variables) {
|
|
193
|
+
return this.client.mutate(documents_generated_1.shopRespondToHookDispatchDocument, variables);
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
exports.HookDispatchCategory = HookDispatchCategory;
|
|
197
|
+
class HookCategory {
|
|
198
|
+
client;
|
|
199
|
+
constructor(client) {
|
|
200
|
+
this.client = client;
|
|
201
|
+
}
|
|
202
|
+
hookListen(variables) {
|
|
203
|
+
return this.client.subscribe(documents_generated_1.shopHookListenDocument, variables);
|
|
204
|
+
}
|
|
205
|
+
hookRespond(variables) {
|
|
206
|
+
return this.client.mutate(documents_generated_1.shopHookRespondDocument, variables);
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
exports.HookCategory = HookCategory;
|
|
210
|
+
class MarketingEventCategory {
|
|
211
|
+
client;
|
|
212
|
+
constructor(client) {
|
|
213
|
+
this.client = client;
|
|
214
|
+
}
|
|
215
|
+
shopTrackEvent(variables) {
|
|
216
|
+
return this.client.mutate(documents_generated_1.shopShopTrackEventDocument, variables);
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
exports.MarketingEventCategory = MarketingEventCategory;
|
|
220
|
+
class MarketingIdentityCategory {
|
|
221
|
+
client;
|
|
222
|
+
constructor(client) {
|
|
223
|
+
this.client = client;
|
|
224
|
+
}
|
|
225
|
+
shopResolveMarketingIdentity() {
|
|
226
|
+
return this.client.mutate(documents_generated_1.shopShopResolveMarketingIdentityDocument);
|
|
227
|
+
}
|
|
228
|
+
shopSetMarketingIdentifiers(variables) {
|
|
229
|
+
return this.client.mutate(documents_generated_1.shopShopSetMarketingIdentifiersDocument, variables);
|
|
230
|
+
}
|
|
231
|
+
shopLinkMarketingEmail(variables) {
|
|
232
|
+
return this.client.mutate(documents_generated_1.shopShopLinkMarketingEmailDocument, variables);
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
exports.MarketingIdentityCategory = MarketingIdentityCategory;
|
|
236
|
+
class OrderCategory {
|
|
237
|
+
client;
|
|
238
|
+
constructor(client) {
|
|
239
|
+
this.client = client;
|
|
240
|
+
}
|
|
241
|
+
activeOrder() {
|
|
242
|
+
return this.client.query(documents_generated_1.shopActiveOrderDocument);
|
|
243
|
+
}
|
|
244
|
+
shopOrderByCode(variables) {
|
|
245
|
+
return this.client.query(documents_generated_1.shopShopOrderByCodeDocument, variables);
|
|
246
|
+
}
|
|
247
|
+
nextOrderStates() {
|
|
248
|
+
return this.client.query(documents_generated_1.shopNextOrderStatesDocument);
|
|
249
|
+
}
|
|
250
|
+
shopOrderNotes(variables) {
|
|
251
|
+
return this.client.query(documents_generated_1.shopShopOrderNotesDocument, variables);
|
|
252
|
+
}
|
|
253
|
+
shopActiveOrderUpdated() {
|
|
254
|
+
return this.client.subscribe(documents_generated_1.shopShopActiveOrderUpdatedDocument);
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
exports.OrderCategory = OrderCategory;
|
|
258
|
+
class PaymentCategory {
|
|
259
|
+
client;
|
|
260
|
+
constructor(client) {
|
|
261
|
+
this.client = client;
|
|
262
|
+
}
|
|
263
|
+
shopEligiblePaymentProviders(variables) {
|
|
264
|
+
return this.client.query(documents_generated_1.shopShopEligiblePaymentProvidersDocument, variables);
|
|
265
|
+
}
|
|
266
|
+
getTokens() {
|
|
267
|
+
return this.client.query(documents_generated_1.shopGetTokensDocument);
|
|
268
|
+
}
|
|
269
|
+
createPaymentSession(variables) {
|
|
270
|
+
return this.client.mutate(documents_generated_1.shopCreatePaymentSessionDocument, variables);
|
|
271
|
+
}
|
|
272
|
+
confirmPaymentSession(variables) {
|
|
273
|
+
return this.client.mutate(documents_generated_1.shopConfirmPaymentSessionDocument, variables);
|
|
274
|
+
}
|
|
275
|
+
cancelPaymentSession(variables) {
|
|
276
|
+
return this.client.mutate(documents_generated_1.shopCancelPaymentSessionDocument, variables);
|
|
277
|
+
}
|
|
278
|
+
deleteToken(variables) {
|
|
279
|
+
return this.client.mutate(documents_generated_1.shopDeleteTokenDocument, variables);
|
|
280
|
+
}
|
|
281
|
+
setDefaultToken(variables) {
|
|
282
|
+
return this.client.mutate(documents_generated_1.shopSetDefaultTokenDocument, variables);
|
|
283
|
+
}
|
|
284
|
+
saveToken(variables) {
|
|
285
|
+
return this.client.mutate(documents_generated_1.shopSaveTokenDocument, variables);
|
|
286
|
+
}
|
|
287
|
+
getTokenTemplate() {
|
|
288
|
+
return this.client.query(documents_generated_1.shopGetTokenTemplateDocument);
|
|
289
|
+
}
|
|
290
|
+
getSessionTemplate(variables) {
|
|
291
|
+
return this.client.query(documents_generated_1.shopGetSessionTemplateDocument, variables);
|
|
292
|
+
}
|
|
293
|
+
getSessionVariables(variables) {
|
|
294
|
+
return this.client.query(documents_generated_1.shopGetSessionVariablesDocument, variables);
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
exports.PaymentCategory = PaymentCategory;
|
|
298
|
+
class ProductCategory {
|
|
299
|
+
client;
|
|
300
|
+
constructor(client) {
|
|
301
|
+
this.client = client;
|
|
302
|
+
}
|
|
303
|
+
shopProduct(variables) {
|
|
304
|
+
return this.client.query(documents_generated_1.shopShopProductDocument, variables);
|
|
305
|
+
}
|
|
306
|
+
shopProducts(variables) {
|
|
307
|
+
return this.client.query(documents_generated_1.shopShopProductsDocument, variables);
|
|
308
|
+
}
|
|
309
|
+
shopProductOptionGroups(variables) {
|
|
310
|
+
return this.client.query(documents_generated_1.shopShopProductOptionGroupsDocument, variables);
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
exports.ProductCategory = ProductCategory;
|
|
314
|
+
class SearchCategory {
|
|
315
|
+
client;
|
|
316
|
+
constructor(client) {
|
|
317
|
+
this.client = client;
|
|
318
|
+
}
|
|
319
|
+
shopSearch(variables) {
|
|
320
|
+
return this.client.query(documents_generated_1.shopShopSearchDocument, variables);
|
|
321
|
+
}
|
|
322
|
+
suggest(variables) {
|
|
323
|
+
return this.client.query(documents_generated_1.shopSuggestDocument, variables);
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
exports.SearchCategory = SearchCategory;
|
|
327
|
+
class ShippingCategory {
|
|
328
|
+
client;
|
|
329
|
+
constructor(client) {
|
|
330
|
+
this.client = client;
|
|
331
|
+
}
|
|
332
|
+
shippingRateGroups() {
|
|
333
|
+
return this.client.query(documents_generated_1.shopShippingRateGroupsDocument);
|
|
334
|
+
}
|
|
335
|
+
selectShippingRate(variables) {
|
|
336
|
+
return this.client.mutate(documents_generated_1.shopSelectShippingRateDocument, variables);
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
exports.ShippingCategory = ShippingCategory;
|
|
340
|
+
class SubscriptionCategory {
|
|
341
|
+
client;
|
|
342
|
+
constructor(client) {
|
|
343
|
+
this.client = client;
|
|
344
|
+
}
|
|
345
|
+
mySubscriptions() {
|
|
346
|
+
return this.client.query(documents_generated_1.shopMySubscriptionsDocument);
|
|
347
|
+
}
|
|
348
|
+
mySubscription(variables) {
|
|
349
|
+
return this.client.query(documents_generated_1.shopMySubscriptionDocument, variables);
|
|
350
|
+
}
|
|
351
|
+
shopCreateSubscription(variables) {
|
|
352
|
+
return this.client.mutate(documents_generated_1.shopShopCreateSubscriptionDocument, variables);
|
|
353
|
+
}
|
|
354
|
+
shopCancelSubscription(variables) {
|
|
355
|
+
return this.client.mutate(documents_generated_1.shopShopCancelSubscriptionDocument, variables);
|
|
356
|
+
}
|
|
357
|
+
shopPauseSubscription(variables) {
|
|
358
|
+
return this.client.mutate(documents_generated_1.shopShopPauseSubscriptionDocument, variables);
|
|
359
|
+
}
|
|
360
|
+
shopResumeSubscription(variables) {
|
|
361
|
+
return this.client.mutate(documents_generated_1.shopShopResumeSubscriptionDocument, variables);
|
|
362
|
+
}
|
|
363
|
+
shopChangeSubscriptionPlan(variables) {
|
|
364
|
+
return this.client.mutate(documents_generated_1.shopShopChangeSubscriptionPlanDocument, variables);
|
|
365
|
+
}
|
|
366
|
+
shopChangeSubscriptionQuantity(variables) {
|
|
367
|
+
return this.client.mutate(documents_generated_1.shopShopChangeSubscriptionQuantityDocument, variables);
|
|
368
|
+
}
|
|
369
|
+
reportUsage(variables) {
|
|
370
|
+
return this.client.mutate(documents_generated_1.shopReportUsageDocument, variables);
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
exports.SubscriptionCategory = SubscriptionCategory;
|
|
374
|
+
class ShopNamespace {
|
|
375
|
+
client;
|
|
376
|
+
_acf;
|
|
377
|
+
_auth;
|
|
378
|
+
_cart;
|
|
379
|
+
_checkout;
|
|
380
|
+
_collection;
|
|
381
|
+
_customer;
|
|
382
|
+
_facet;
|
|
383
|
+
_hookDispatch;
|
|
384
|
+
_hook;
|
|
385
|
+
_marketingEvent;
|
|
386
|
+
_marketingIdentity;
|
|
387
|
+
_order;
|
|
388
|
+
_payment;
|
|
389
|
+
_product;
|
|
390
|
+
_search;
|
|
391
|
+
_shipping;
|
|
392
|
+
_subscription;
|
|
393
|
+
constructor(client) {
|
|
394
|
+
this.client = client;
|
|
395
|
+
this._acf = new AcfCategory(client);
|
|
396
|
+
this._auth = new AuthCategory(client);
|
|
397
|
+
this._cart = new CartCategory(client);
|
|
398
|
+
this._checkout = new CheckoutCategory(client);
|
|
399
|
+
this._collection = new CollectionCategory(client);
|
|
400
|
+
this._customer = new CustomerCategory(client);
|
|
401
|
+
this._facet = new FacetCategory(client);
|
|
402
|
+
this._hookDispatch = new HookDispatchCategory(client);
|
|
403
|
+
this._hook = new HookCategory(client);
|
|
404
|
+
this._marketingEvent = new MarketingEventCategory(client);
|
|
405
|
+
this._marketingIdentity = new MarketingIdentityCategory(client);
|
|
406
|
+
this._order = new OrderCategory(client);
|
|
407
|
+
this._payment = new PaymentCategory(client);
|
|
408
|
+
this._product = new ProductCategory(client);
|
|
409
|
+
this._search = new SearchCategory(client);
|
|
410
|
+
this._shipping = new ShippingCategory(client);
|
|
411
|
+
this._subscription = new SubscriptionCategory(client);
|
|
412
|
+
}
|
|
413
|
+
get acf() {
|
|
414
|
+
return this._acf;
|
|
415
|
+
}
|
|
416
|
+
get auth() {
|
|
417
|
+
return this._auth;
|
|
418
|
+
}
|
|
419
|
+
get cart() {
|
|
420
|
+
return this._cart;
|
|
421
|
+
}
|
|
422
|
+
get checkout() {
|
|
423
|
+
return this._checkout;
|
|
424
|
+
}
|
|
425
|
+
get collection() {
|
|
426
|
+
return this._collection;
|
|
427
|
+
}
|
|
428
|
+
get customer() {
|
|
429
|
+
return this._customer;
|
|
430
|
+
}
|
|
431
|
+
get facet() {
|
|
432
|
+
return this._facet;
|
|
433
|
+
}
|
|
434
|
+
get hookDispatch() {
|
|
435
|
+
return this._hookDispatch;
|
|
436
|
+
}
|
|
437
|
+
get hook() {
|
|
438
|
+
return this._hook;
|
|
439
|
+
}
|
|
440
|
+
get marketingEvent() {
|
|
441
|
+
return this._marketingEvent;
|
|
442
|
+
}
|
|
443
|
+
get marketingIdentity() {
|
|
444
|
+
return this._marketingIdentity;
|
|
445
|
+
}
|
|
446
|
+
get order() {
|
|
447
|
+
return this._order;
|
|
448
|
+
}
|
|
449
|
+
get payment() {
|
|
450
|
+
return this._payment;
|
|
451
|
+
}
|
|
452
|
+
get product() {
|
|
453
|
+
return this._product;
|
|
454
|
+
}
|
|
455
|
+
get search() {
|
|
456
|
+
return this._search;
|
|
457
|
+
}
|
|
458
|
+
get shipping() {
|
|
459
|
+
return this._shipping;
|
|
460
|
+
}
|
|
461
|
+
get subscription() {
|
|
462
|
+
return this._subscription;
|
|
463
|
+
}
|
|
464
|
+
}
|
|
465
|
+
exports.ShopNamespace = ShopNamespace;
|
package/dist/shop.js
CHANGED
|
@@ -1,25 +1,39 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* @forgecart/sdk - Shop API
|
|
4
|
-
*
|
|
5
|
-
* Shop namespace and types
|
|
6
|
-
*/
|
|
7
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
8
|
-
if (k2 === undefined) k2 = k;
|
|
9
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
10
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
11
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
12
|
-
}
|
|
13
|
-
Object.defineProperty(o, k2, desc);
|
|
14
|
-
}) : (function(o, m, k, k2) {
|
|
15
|
-
if (k2 === undefined) k2 = k;
|
|
16
|
-
o[k2] = m[k];
|
|
17
|
-
}));
|
|
18
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
19
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
20
|
-
};
|
|
21
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
exports.ShopNamespace = void 0;
|
|
23
|
-
var
|
|
24
|
-
Object.defineProperty(exports, "ShopNamespace", { enumerable: true, get: function () { return
|
|
25
|
-
|
|
3
|
+
exports.SubscriptionCategory = exports.ShippingCategory = exports.SearchCategory = exports.ProductCategory = exports.PaymentCategory = exports.OrderCategory = exports.MarketingIdentityCategory = exports.MarketingEventCategory = exports.HookCategory = exports.HookDispatchCategory = exports.FacetCategory = exports.CustomerCategory = exports.CollectionCategory = exports.CheckoutCategory = exports.CartCategory = exports.AuthCategory = exports.AcfCategory = exports.ShopNamespace = void 0;
|
|
4
|
+
var shop_generated_1 = require("./shop.generated");
|
|
5
|
+
Object.defineProperty(exports, "ShopNamespace", { enumerable: true, get: function () { return shop_generated_1.ShopNamespace; } });
|
|
6
|
+
var shop_generated_2 = require("./shop.generated");
|
|
7
|
+
Object.defineProperty(exports, "AcfCategory", { enumerable: true, get: function () { return shop_generated_2.AcfCategory; } });
|
|
8
|
+
var shop_generated_3 = require("./shop.generated");
|
|
9
|
+
Object.defineProperty(exports, "AuthCategory", { enumerable: true, get: function () { return shop_generated_3.AuthCategory; } });
|
|
10
|
+
var shop_generated_4 = require("./shop.generated");
|
|
11
|
+
Object.defineProperty(exports, "CartCategory", { enumerable: true, get: function () { return shop_generated_4.CartCategory; } });
|
|
12
|
+
var shop_generated_5 = require("./shop.generated");
|
|
13
|
+
Object.defineProperty(exports, "CheckoutCategory", { enumerable: true, get: function () { return shop_generated_5.CheckoutCategory; } });
|
|
14
|
+
var shop_generated_6 = require("./shop.generated");
|
|
15
|
+
Object.defineProperty(exports, "CollectionCategory", { enumerable: true, get: function () { return shop_generated_6.CollectionCategory; } });
|
|
16
|
+
var shop_generated_7 = require("./shop.generated");
|
|
17
|
+
Object.defineProperty(exports, "CustomerCategory", { enumerable: true, get: function () { return shop_generated_7.CustomerCategory; } });
|
|
18
|
+
var shop_generated_8 = require("./shop.generated");
|
|
19
|
+
Object.defineProperty(exports, "FacetCategory", { enumerable: true, get: function () { return shop_generated_8.FacetCategory; } });
|
|
20
|
+
var shop_generated_9 = require("./shop.generated");
|
|
21
|
+
Object.defineProperty(exports, "HookDispatchCategory", { enumerable: true, get: function () { return shop_generated_9.HookDispatchCategory; } });
|
|
22
|
+
var shop_generated_10 = require("./shop.generated");
|
|
23
|
+
Object.defineProperty(exports, "HookCategory", { enumerable: true, get: function () { return shop_generated_10.HookCategory; } });
|
|
24
|
+
var shop_generated_11 = require("./shop.generated");
|
|
25
|
+
Object.defineProperty(exports, "MarketingEventCategory", { enumerable: true, get: function () { return shop_generated_11.MarketingEventCategory; } });
|
|
26
|
+
var shop_generated_12 = require("./shop.generated");
|
|
27
|
+
Object.defineProperty(exports, "MarketingIdentityCategory", { enumerable: true, get: function () { return shop_generated_12.MarketingIdentityCategory; } });
|
|
28
|
+
var shop_generated_13 = require("./shop.generated");
|
|
29
|
+
Object.defineProperty(exports, "OrderCategory", { enumerable: true, get: function () { return shop_generated_13.OrderCategory; } });
|
|
30
|
+
var shop_generated_14 = require("./shop.generated");
|
|
31
|
+
Object.defineProperty(exports, "PaymentCategory", { enumerable: true, get: function () { return shop_generated_14.PaymentCategory; } });
|
|
32
|
+
var shop_generated_15 = require("./shop.generated");
|
|
33
|
+
Object.defineProperty(exports, "ProductCategory", { enumerable: true, get: function () { return shop_generated_15.ProductCategory; } });
|
|
34
|
+
var shop_generated_16 = require("./shop.generated");
|
|
35
|
+
Object.defineProperty(exports, "SearchCategory", { enumerable: true, get: function () { return shop_generated_16.SearchCategory; } });
|
|
36
|
+
var shop_generated_17 = require("./shop.generated");
|
|
37
|
+
Object.defineProperty(exports, "ShippingCategory", { enumerable: true, get: function () { return shop_generated_17.ShippingCategory; } });
|
|
38
|
+
var shop_generated_18 = require("./shop.generated");
|
|
39
|
+
Object.defineProperty(exports, "SubscriptionCategory", { enumerable: true, get: function () { return shop_generated_18.SubscriptionCategory; } });
|
package/dist/upload.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Standalone fetch-based multipart upload function for ForgeCart SDK.
|
|
3
|
+
* Zero Apollo dependency — works in both Node.js (18+) and browser.
|
|
4
|
+
* Implements the GraphQL multipart request spec.
|
|
5
|
+
*/
|
|
6
|
+
export interface UploadResult<T> {
|
|
7
|
+
data: T;
|
|
8
|
+
extensions?: Record<string, unknown>;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Performs a GraphQL mutation with file upload support via the multipart request spec.
|
|
12
|
+
* Falls back to standard JSON POST when no files are detected in variables.
|
|
13
|
+
*/
|
|
14
|
+
export declare function uploadViaFetch<T>(endpoint: string, document: string, variables: Record<string, unknown>, headers: Record<string, string>): Promise<UploadResult<T>>;
|