@forgecart/sdk 1.2.3 → 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 -2664
  48. package/dist/admin-namespace.js +0 -9638
  49. package/dist/admin-types.d.ts +0 -16191
  50. package/dist/shop-namespace.d.ts +0 -694
  51. package/dist/shop-namespace.js +0 -3071
  52. package/dist/shop-types.d.ts +0 -6310
  53. package/src/admin-namespace.ts +0 -11372
  54. package/src/admin-types.ts +0 -10804
  55. package/src/shop-namespace.ts +0 -3491
  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
@@ -1,694 +0,0 @@
1
- /**
2
- * @forgecart/sdk - Auto-generated TypeScript SDK
3
- *
4
- * This file was automatically generated and should not be manually edited.
5
- * To regenerate, run: npm run codegen:ts
6
- *
7
- * Generated at: 2025-12-15T13:49:08.152Z
8
- * Generator version: 1.0.0
9
- *
10
- * 🤖 Generated with ForgeCart SDK Generator
11
- */
12
- import * as Types from './shop-types.js';
13
- import { RequestDocument, Variables } from 'graphql-request';
14
- /**
15
- * SDK Configuration
16
- */
17
- export interface SDKConfig {
18
- /** GraphQL HTTP endpoint */
19
- endpoint?: string;
20
- /** WebSocket endpoint for subscriptions */
21
- wsEndpoint?: string;
22
- /** Custom HTTP headers */
23
- headers?: Record<string, string>;
24
- /** Custom WebSocket implementation (optional, auto-detected if not provided) */
25
- webSocketImpl?: unknown;
26
- /** Use HTTP only, skip WebSocket initialization (default: false) */
27
- httpOnly?: boolean;
28
- /** Enable debug logging with request timing (default: false) */
29
- debug?: boolean;
30
- }
31
- export type AssetQueryVariables = Types.AssetQueryVariables;
32
- export type AssetQuery = Types.AssetQuery;
33
- export type AssetQueryResult = Types.AssetQuery;
34
- export type AssetsQueryVariables = Types.AssetsQueryVariables;
35
- export type AssetsQuery = Types.AssetsQuery;
36
- export type AssetsQueryResult = Types.AssetsQuery;
37
- export type MeQueryVariables = Types.MeQueryVariables;
38
- export type MeQuery = Types.MeQuery;
39
- export type MeQueryResult = Types.MeQuery;
40
- export type AuthenticateMutationVariables = Types.AuthenticateMutationVariables;
41
- export type AuthenticateMutation = Types.AuthenticateMutation;
42
- export type AuthenticateMutationResult = Types.AuthenticateMutation;
43
- export type GenerateOtpMutationVariables = Types.GenerateOtpMutationVariables;
44
- export type GenerateOtpMutation = Types.GenerateOtpMutation;
45
- export type GenerateOtpMutationResult = Types.GenerateOtpMutation;
46
- export type VerifyOtpMutationVariables = Types.VerifyOtpMutationVariables;
47
- export type VerifyOtpMutation = Types.VerifyOtpMutation;
48
- export type VerifyOtpMutationResult = Types.VerifyOtpMutation;
49
- export type RegisterCustomerAccountMutationVariables = Types.RegisterCustomerAccountMutationVariables;
50
- export type RegisterCustomerAccountMutation = Types.RegisterCustomerAccountMutation;
51
- export type RegisterCustomerAccountMutationResult = Types.RegisterCustomerAccountMutation;
52
- export type VerifyCustomerAccountMutationVariables = Types.VerifyCustomerAccountMutationVariables;
53
- export type VerifyCustomerAccountMutation = Types.VerifyCustomerAccountMutation;
54
- export type VerifyCustomerAccountMutationResult = Types.VerifyCustomerAccountMutation;
55
- export type RefreshCustomerVerificationMutationVariables = Types.RefreshCustomerVerificationMutationVariables;
56
- export type RefreshCustomerVerificationMutation = Types.RefreshCustomerVerificationMutation;
57
- export type RefreshCustomerVerificationMutationResult = Types.RefreshCustomerVerificationMutation;
58
- export type UpdateCustomerMutationVariables = Types.UpdateCustomerMutationVariables;
59
- export type UpdateCustomerMutation = Types.UpdateCustomerMutation;
60
- export type UpdateCustomerMutationResult = Types.UpdateCustomerMutation;
61
- export type UpdateCustomerPasswordMutationVariables = Types.UpdateCustomerPasswordMutationVariables;
62
- export type UpdateCustomerPasswordMutation = Types.UpdateCustomerPasswordMutation;
63
- export type UpdateCustomerPasswordMutationResult = Types.UpdateCustomerPasswordMutation;
64
- export type UpdateCustomerEmailAddressMutationVariables = Types.UpdateCustomerEmailAddressMutationVariables;
65
- export type UpdateCustomerEmailAddressMutation = Types.UpdateCustomerEmailAddressMutation;
66
- export type UpdateCustomerEmailAddressMutationResult = Types.UpdateCustomerEmailAddressMutation;
67
- export type RequestUpdateCustomerEmailAddressMutationVariables = Types.RequestUpdateCustomerEmailAddressMutationVariables;
68
- export type RequestUpdateCustomerEmailAddressMutation = Types.RequestUpdateCustomerEmailAddressMutation;
69
- export type RequestUpdateCustomerEmailAddressMutationResult = Types.RequestUpdateCustomerEmailAddressMutation;
70
- export type RequestPasswordResetMutationVariables = Types.RequestPasswordResetMutationVariables;
71
- export type RequestPasswordResetMutation = Types.RequestPasswordResetMutation;
72
- export type RequestPasswordResetMutationResult = Types.RequestPasswordResetMutation;
73
- export type BlogPostQueryVariables = Types.BlogPostQueryVariables;
74
- export type BlogPostQuery = Types.BlogPostQuery;
75
- export type BlogPostQueryResult = Types.BlogPostQuery;
76
- export type BlogPostsQueryVariables = Types.BlogPostsQueryVariables;
77
- export type BlogPostsQuery = Types.BlogPostsQuery;
78
- export type BlogPostsQueryResult = Types.BlogPostsQuery;
79
- export type BlogPostsByFacetsQueryVariables = Types.BlogPostsByFacetsQueryVariables;
80
- export type BlogPostsByFacetsQuery = Types.BlogPostsByFacetsQuery;
81
- export type BlogPostsByFacetsQueryResult = Types.BlogPostsByFacetsQuery;
82
- export type ActiveChannelQueryVariables = Types.ActiveChannelQueryVariables;
83
- export type ActiveChannelQuery = Types.ActiveChannelQuery;
84
- export type ActiveChannelQueryResult = Types.ActiveChannelQuery;
85
- export type CollectionQueryVariables = Types.CollectionQueryVariables;
86
- export type CollectionQuery = Types.CollectionQuery;
87
- export type CollectionQueryResult = Types.CollectionQuery;
88
- export type CollectionsQueryVariables = Types.CollectionsQueryVariables;
89
- export type CollectionsQuery = Types.CollectionsQuery;
90
- export type CollectionsQueryResult = Types.CollectionsQuery;
91
- export type AvailableCountriesQueryVariables = Types.AvailableCountriesQueryVariables;
92
- export type AvailableCountriesQuery = Types.AvailableCountriesQuery;
93
- export type AvailableCountriesQueryResult = Types.AvailableCountriesQuery;
94
- export type GetAllFieldsQueryVariables = Types.GetAllFieldsQueryVariables;
95
- export type GetAllFieldsQuery = Types.GetAllFieldsQuery;
96
- export type GetAllFieldsQueryResult = Types.GetAllFieldsQuery;
97
- export type GetAllValuesQueryVariables = Types.GetAllValuesQueryVariables;
98
- export type GetAllValuesQuery = Types.GetAllValuesQuery;
99
- export type GetAllValuesQueryResult = Types.GetAllValuesQuery;
100
- export type GetBooleanValueQueryVariables = Types.GetBooleanValueQueryVariables;
101
- export type GetBooleanValueQuery = Types.GetBooleanValueQuery;
102
- export type GetBooleanValueQueryResult = Types.GetBooleanValueQuery;
103
- export type GetDateValueQueryVariables = Types.GetDateValueQueryVariables;
104
- export type GetDateValueQuery = Types.GetDateValueQuery;
105
- export type GetDateValueQueryResult = Types.GetDateValueQuery;
106
- export type GetFloatValueQueryVariables = Types.GetFloatValueQueryVariables;
107
- export type GetFloatValueQuery = Types.GetFloatValueQuery;
108
- export type GetFloatValueQueryResult = Types.GetFloatValueQuery;
109
- export type GetGroupFieldDefinitionByIdQueryVariables = Types.GetGroupFieldDefinitionByIdQueryVariables;
110
- export type GetGroupFieldDefinitionByIdQuery = Types.GetGroupFieldDefinitionByIdQuery;
111
- export type GetGroupFieldDefinitionByIdQueryResult = Types.GetGroupFieldDefinitionByIdQuery;
112
- export type GetGroupValueQueryVariables = Types.GetGroupValueQueryVariables;
113
- export type GetGroupValueQuery = Types.GetGroupValueQuery;
114
- export type GetGroupValueQueryResult = Types.GetGroupValueQuery;
115
- export type GetIntegerValueQueryVariables = Types.GetIntegerValueQueryVariables;
116
- export type GetIntegerValueQuery = Types.GetIntegerValueQuery;
117
- export type GetIntegerValueQueryResult = Types.GetIntegerValueQuery;
118
- export type GetRelationValueQueryVariables = Types.GetRelationValueQueryVariables;
119
- export type GetRelationValueQuery = Types.GetRelationValueQuery;
120
- export type GetRelationValueQueryResult = Types.GetRelationValueQuery;
121
- export type GetRichTextValueQueryVariables = Types.GetRichTextValueQueryVariables;
122
- export type GetRichTextValueQuery = Types.GetRichTextValueQuery;
123
- export type GetRichTextValueQueryResult = Types.GetRichTextValueQuery;
124
- export type GetStringValueQueryVariables = Types.GetStringValueQueryVariables;
125
- export type GetStringValueQuery = Types.GetStringValueQuery;
126
- export type GetStringValueQueryResult = Types.GetStringValueQuery;
127
- export type GetTemplatesByEntityIdQueryVariables = Types.GetTemplatesByEntityIdQueryVariables;
128
- export type GetTemplatesByEntityIdQuery = Types.GetTemplatesByEntityIdQuery;
129
- export type GetTemplatesByEntityIdQueryResult = Types.GetTemplatesByEntityIdQuery;
130
- export type GetUniqueTemplatesQueryVariables = Types.GetUniqueTemplatesQueryVariables;
131
- export type GetUniqueTemplatesQuery = Types.GetUniqueTemplatesQuery;
132
- export type GetUniqueTemplatesQueryResult = Types.GetUniqueTemplatesQuery;
133
- export type CreateCustomerAddressMutationVariables = Types.CreateCustomerAddressMutationVariables;
134
- export type CreateCustomerAddressMutation = Types.CreateCustomerAddressMutation;
135
- export type CreateCustomerAddressMutationResult = Types.CreateCustomerAddressMutation;
136
- export type UpdateCustomerAddressMutationVariables = Types.UpdateCustomerAddressMutationVariables;
137
- export type UpdateCustomerAddressMutation = Types.UpdateCustomerAddressMutation;
138
- export type UpdateCustomerAddressMutationResult = Types.UpdateCustomerAddressMutation;
139
- export type DeleteCustomerAddressMutationVariables = Types.DeleteCustomerAddressMutationVariables;
140
- export type DeleteCustomerAddressMutation = Types.DeleteCustomerAddressMutation;
141
- export type DeleteCustomerAddressMutationResult = Types.DeleteCustomerAddressMutation;
142
- export type FacetQueryVariables = Types.FacetQueryVariables;
143
- export type FacetQuery = Types.FacetQuery;
144
- export type FacetQueryResult = Types.FacetQuery;
145
- export type FacetsQueryVariables = Types.FacetsQueryVariables;
146
- export type FacetsQuery = Types.FacetsQuery;
147
- export type FacetsQueryResult = Types.FacetsQuery;
148
- export type GetOnboardingQueryVariables = Types.GetOnboardingQueryVariables;
149
- export type GetOnboardingQuery = Types.GetOnboardingQuery;
150
- export type GetOnboardingQueryResult = Types.GetOnboardingQuery;
151
- export type CreateOnboardingMutationVariables = Types.CreateOnboardingMutationVariables;
152
- export type CreateOnboardingMutation = Types.CreateOnboardingMutation;
153
- export type CreateOnboardingMutationResult = Types.CreateOnboardingMutation;
154
- export type UpdateOnboardingMutationVariables = Types.UpdateOnboardingMutationVariables;
155
- export type UpdateOnboardingMutation = Types.UpdateOnboardingMutation;
156
- export type UpdateOnboardingMutationResult = Types.UpdateOnboardingMutation;
157
- export type ActiveOrderQueryVariables = Types.ActiveOrderQueryVariables;
158
- export type ActiveOrderQuery = Types.ActiveOrderQuery;
159
- export type ActiveOrderQueryResult = Types.ActiveOrderQuery;
160
- export type OrderQueryVariables = Types.OrderQueryVariables;
161
- export type OrderQuery = Types.OrderQuery;
162
- export type OrderQueryResult = Types.OrderQuery;
163
- export type OrderByCodeQueryVariables = Types.OrderByCodeQueryVariables;
164
- export type OrderByCodeQuery = Types.OrderByCodeQuery;
165
- export type OrderByCodeQueryResult = Types.OrderByCodeQuery;
166
- export type NextOrderStatesQueryVariables = Types.NextOrderStatesQueryVariables;
167
- export type NextOrderStatesQuery = Types.NextOrderStatesQuery;
168
- export type NextOrderStatesQueryResult = Types.NextOrderStatesQuery;
169
- export type AddItemToOrderMutationVariables = Types.AddItemToOrderMutationVariables;
170
- export type AddItemToOrderMutation = Types.AddItemToOrderMutation;
171
- export type AddItemToOrderMutationResult = Types.AddItemToOrderMutation;
172
- export type AdjustOrderLineMutationVariables = Types.AdjustOrderLineMutationVariables;
173
- export type AdjustOrderLineMutation = Types.AdjustOrderLineMutation;
174
- export type AdjustOrderLineMutationResult = Types.AdjustOrderLineMutation;
175
- export type RemoveOrderLineMutationVariables = Types.RemoveOrderLineMutationVariables;
176
- export type RemoveOrderLineMutation = Types.RemoveOrderLineMutation;
177
- export type RemoveOrderLineMutationResult = Types.RemoveOrderLineMutation;
178
- export type RemoveAllOrderLinesMutationVariables = Types.RemoveAllOrderLinesMutationVariables;
179
- export type RemoveAllOrderLinesMutation = Types.RemoveAllOrderLinesMutation;
180
- export type RemoveAllOrderLinesMutationResult = Types.RemoveAllOrderLinesMutation;
181
- export type ApplyCouponCodeMutationVariables = Types.ApplyCouponCodeMutationVariables;
182
- export type ApplyCouponCodeMutation = Types.ApplyCouponCodeMutation;
183
- export type ApplyCouponCodeMutationResult = Types.ApplyCouponCodeMutation;
184
- export type RemoveCouponCodeMutationVariables = Types.RemoveCouponCodeMutationVariables;
185
- export type RemoveCouponCodeMutation = Types.RemoveCouponCodeMutation;
186
- export type RemoveCouponCodeMutationResult = Types.RemoveCouponCodeMutation;
187
- export type SetOrderShippingAddressMutationVariables = Types.SetOrderShippingAddressMutationVariables;
188
- export type SetOrderShippingAddressMutation = Types.SetOrderShippingAddressMutation;
189
- export type SetOrderShippingAddressMutationResult = Types.SetOrderShippingAddressMutation;
190
- export type UnsetOrderShippingAddressMutationVariables = Types.UnsetOrderShippingAddressMutationVariables;
191
- export type UnsetOrderShippingAddressMutation = Types.UnsetOrderShippingAddressMutation;
192
- export type UnsetOrderShippingAddressMutationResult = Types.UnsetOrderShippingAddressMutation;
193
- export type SetOrderBillingAddressMutationVariables = Types.SetOrderBillingAddressMutationVariables;
194
- export type SetOrderBillingAddressMutation = Types.SetOrderBillingAddressMutation;
195
- export type SetOrderBillingAddressMutationResult = Types.SetOrderBillingAddressMutation;
196
- export type UnsetOrderBillingAddressMutationVariables = Types.UnsetOrderBillingAddressMutationVariables;
197
- export type UnsetOrderBillingAddressMutation = Types.UnsetOrderBillingAddressMutation;
198
- export type UnsetOrderBillingAddressMutationResult = Types.UnsetOrderBillingAddressMutation;
199
- export type EligibleShippingMethodsQueryVariables = Types.EligibleShippingMethodsQueryVariables;
200
- export type EligibleShippingMethodsQuery = Types.EligibleShippingMethodsQuery;
201
- export type EligibleShippingMethodsQueryResult = Types.EligibleShippingMethodsQuery;
202
- export type ActiveShippingMethodsQueryVariables = Types.ActiveShippingMethodsQueryVariables;
203
- export type ActiveShippingMethodsQuery = Types.ActiveShippingMethodsQuery;
204
- export type ActiveShippingMethodsQueryResult = Types.ActiveShippingMethodsQuery;
205
- export type SetOrderShippingMethodMutationVariables = Types.SetOrderShippingMethodMutationVariables;
206
- export type SetOrderShippingMethodMutation = Types.SetOrderShippingMethodMutation;
207
- export type SetOrderShippingMethodMutationResult = Types.SetOrderShippingMethodMutation;
208
- export type EligiblePaymentMethodsQueryVariables = Types.EligiblePaymentMethodsQueryVariables;
209
- export type EligiblePaymentMethodsQuery = Types.EligiblePaymentMethodsQuery;
210
- export type EligiblePaymentMethodsQueryResult = Types.EligiblePaymentMethodsQuery;
211
- export type ActivePaymentMethodsQueryVariables = Types.ActivePaymentMethodsQueryVariables;
212
- export type ActivePaymentMethodsQuery = Types.ActivePaymentMethodsQuery;
213
- export type ActivePaymentMethodsQueryResult = Types.ActivePaymentMethodsQuery;
214
- export type AddPaymentToOrderMutationVariables = Types.AddPaymentToOrderMutationVariables;
215
- export type AddPaymentToOrderMutation = Types.AddPaymentToOrderMutation;
216
- export type AddPaymentToOrderMutationResult = Types.AddPaymentToOrderMutation;
217
- export type TransitionOrderToStateMutationVariables = Types.TransitionOrderToStateMutationVariables;
218
- export type TransitionOrderToStateMutation = Types.TransitionOrderToStateMutation;
219
- export type TransitionOrderToStateMutationResult = Types.TransitionOrderToStateMutation;
220
- export type SetCustomerForOrderMutationVariables = Types.SetCustomerForOrderMutationVariables;
221
- export type SetCustomerForOrderMutation = Types.SetCustomerForOrderMutation;
222
- export type SetCustomerForOrderMutationResult = Types.SetCustomerForOrderMutation;
223
- export type SetOrderCustomFieldsMutationVariables = Types.SetOrderCustomFieldsMutationVariables;
224
- export type SetOrderCustomFieldsMutation = Types.SetOrderCustomFieldsMutation;
225
- export type SetOrderCustomFieldsMutationResult = Types.SetOrderCustomFieldsMutation;
226
- export type ProductsQueryVariables = Types.ProductsQueryVariables;
227
- export type ProductsQuery = Types.ProductsQuery;
228
- export type ProductsQueryResult = Types.ProductsQuery;
229
- export type ProductQueryVariables = Types.ProductQueryVariables;
230
- export type ProductQuery = Types.ProductQuery;
231
- export type ProductQueryResult = Types.ProductQuery;
232
- export type SearchQueryVariables = Types.SearchQueryVariables;
233
- export type SearchQuery = Types.SearchQuery;
234
- export type SearchQueryResult = Types.SearchQuery;
235
- /**
236
- * Base GraphQL Client
237
- * Uses WebSocket as primary layer with HTTP fallback
238
- * Handles queries, mutations, and subscriptions over WebSocket when available
239
- */
240
- declare class BaseGraphQLClient {
241
- private httpClient;
242
- private wsClient;
243
- private wsConnected;
244
- private wsInitializing;
245
- private isDisposing;
246
- private authToken;
247
- private endpoint;
248
- private wsEndpoint;
249
- private config;
250
- constructor(config: SDKConfig);
251
- /**
252
- * Extract operation name from GraphQL document
253
- */
254
- private getOperationName;
255
- /**
256
- * Execute a GraphQL query or mutation
257
- * Uses WebSocket if available, falls back to HTTP
258
- */
259
- request<T = unknown, V extends Variables = Variables>(document: RequestDocument, variables?: V): Promise<T>;
260
- /**
261
- * Execute request via WebSocket
262
- * @private
263
- */
264
- private requestViaWebSocket;
265
- /**
266
- * Handle GraphQL errors
267
- */
268
- private handleError;
269
- /**
270
- * Get WebSocket implementation for current environment
271
- */
272
- private getWebSocketImpl;
273
- /**
274
- * Initialize WebSocket client
275
- * Connects immediately and tracks connection state
276
- */
277
- private initializeWebSocket;
278
- /**
279
- * Subscribe to a GraphQL subscription
280
- */
281
- subscribe<T = unknown>(document: RequestDocument, variables?: Variables): AsyncIterableIterator<T>;
282
- /**
283
- * Set authentication token
284
- * Updates both HTTP and WebSocket connections
285
- */
286
- setAuthToken(token: string): void;
287
- /**
288
- * Clear authentication token
289
- * Updates both HTTP and WebSocket connections
290
- */
291
- clearAuthToken(): void;
292
- /**
293
- * Dispose of the client and close all connections
294
- */
295
- dispose(): void;
296
- }
297
- /**
298
- * Asset operations
299
- */
300
- declare class AssetOperations {
301
- private client;
302
- constructor(client: BaseGraphQLClient);
303
- /**
304
- * asset query
305
- */
306
- asset(variables: Types.AssetQueryVariables): Promise<Types.AssetQuery>;
307
- /**
308
- * assets query
309
- */
310
- assets(variables: Types.AssetsQueryVariables): Promise<Types.AssetsQuery>;
311
- }
312
- /**
313
- * Auth operations
314
- */
315
- declare class AuthOperations {
316
- private client;
317
- constructor(client: BaseGraphQLClient);
318
- /**
319
- * me query
320
- */
321
- me(): Promise<Types.MeQuery>;
322
- /**
323
- * authenticate mutation
324
- */
325
- authenticate(variables: Types.AuthenticateMutationVariables): Promise<Types.AuthenticateMutation>;
326
- /**
327
- * generateOtp mutation
328
- */
329
- generateOtp(variables: Types.GenerateOtpMutationVariables): Promise<Types.GenerateOtpMutation>;
330
- /**
331
- * verifyOtp mutation
332
- */
333
- verifyOtp(variables: Types.VerifyOtpMutationVariables): Promise<Types.VerifyOtpMutation>;
334
- /**
335
- * registerCustomerAccount mutation
336
- */
337
- registerCustomerAccount(variables: Types.RegisterCustomerAccountMutationVariables): Promise<Types.RegisterCustomerAccountMutation>;
338
- /**
339
- * verifyCustomerAccount mutation
340
- */
341
- verifyCustomerAccount(variables: Types.VerifyCustomerAccountMutationVariables): Promise<Types.VerifyCustomerAccountMutation>;
342
- /**
343
- * refreshCustomerVerification mutation
344
- */
345
- refreshCustomerVerification(variables: Types.RefreshCustomerVerificationMutationVariables): Promise<Types.RefreshCustomerVerificationMutation>;
346
- /**
347
- * updateCustomer mutation
348
- */
349
- updateCustomer(variables: Types.UpdateCustomerMutationVariables): Promise<Types.UpdateCustomerMutation>;
350
- /**
351
- * updateCustomerPassword mutation
352
- */
353
- updateCustomerPassword(variables: Types.UpdateCustomerPasswordMutationVariables): Promise<Types.UpdateCustomerPasswordMutation>;
354
- /**
355
- * updateCustomerEmailAddress mutation
356
- */
357
- updateCustomerEmailAddress(variables: Types.UpdateCustomerEmailAddressMutationVariables): Promise<Types.UpdateCustomerEmailAddressMutation>;
358
- /**
359
- * requestUpdateCustomerEmailAddress mutation
360
- */
361
- requestUpdateCustomerEmailAddress(variables: Types.RequestUpdateCustomerEmailAddressMutationVariables): Promise<Types.RequestUpdateCustomerEmailAddressMutation>;
362
- /**
363
- * requestPasswordReset mutation
364
- */
365
- requestPasswordReset(variables: Types.RequestPasswordResetMutationVariables): Promise<Types.RequestPasswordResetMutation>;
366
- }
367
- /**
368
- * Blog operations
369
- */
370
- declare class BlogOperations {
371
- private client;
372
- constructor(client: BaseGraphQLClient);
373
- /**
374
- * blogPost query
375
- */
376
- blogPost(variables: Types.BlogPostQueryVariables): Promise<Types.BlogPostQuery>;
377
- /**
378
- * blogPosts query
379
- */
380
- blogPosts(variables: Types.BlogPostsQueryVariables): Promise<Types.BlogPostsQuery>;
381
- /**
382
- * blogPostsByFacets query
383
- */
384
- blogPostsByFacets(variables: Types.BlogPostsByFacetsQueryVariables): Promise<Types.BlogPostsByFacetsQuery>;
385
- }
386
- /**
387
- * Channel operations
388
- */
389
- declare class ChannelOperations {
390
- private client;
391
- constructor(client: BaseGraphQLClient);
392
- /**
393
- * activeChannel query
394
- */
395
- activeChannel(): Promise<Types.ActiveChannelQuery>;
396
- }
397
- /**
398
- * Collection operations
399
- */
400
- declare class CollectionOperations {
401
- private client;
402
- constructor(client: BaseGraphQLClient);
403
- /**
404
- * collection query
405
- */
406
- collection(variables: Types.CollectionQueryVariables): Promise<Types.CollectionQuery>;
407
- /**
408
- * collections query
409
- */
410
- collections(variables: Types.CollectionsQueryVariables): Promise<Types.CollectionsQuery>;
411
- }
412
- /**
413
- * Country operations
414
- */
415
- declare class CountryOperations {
416
- private client;
417
- constructor(client: BaseGraphQLClient);
418
- /**
419
- * availableCountries query
420
- */
421
- availableCountries(): Promise<Types.AvailableCountriesQuery>;
422
- }
423
- /**
424
- * CustomFields operations
425
- */
426
- declare class CustomFieldsOperations {
427
- private client;
428
- constructor(client: BaseGraphQLClient);
429
- /**
430
- * getAllFields query
431
- */
432
- getAllFields(variables: Types.GetAllFieldsQueryVariables): Promise<Types.GetAllFieldsQuery>;
433
- /**
434
- * getAllValues query
435
- */
436
- getAllValues(variables: Types.GetAllValuesQueryVariables): Promise<Types.GetAllValuesQuery>;
437
- /**
438
- * getBooleanValue query
439
- */
440
- getBooleanValue(variables: Types.GetBooleanValueQueryVariables): Promise<Types.GetBooleanValueQuery>;
441
- /**
442
- * getDateValue query
443
- */
444
- getDateValue(variables: Types.GetDateValueQueryVariables): Promise<Types.GetDateValueQuery>;
445
- /**
446
- * getFloatValue query
447
- */
448
- getFloatValue(variables: Types.GetFloatValueQueryVariables): Promise<Types.GetFloatValueQuery>;
449
- /**
450
- * getGroupFieldDefinitionById query
451
- */
452
- getGroupFieldDefinitionById(variables: Types.GetGroupFieldDefinitionByIdQueryVariables): Promise<Types.GetGroupFieldDefinitionByIdQuery>;
453
- /**
454
- * getGroupValue query
455
- */
456
- getGroupValue(variables: Types.GetGroupValueQueryVariables): Promise<Types.GetGroupValueQuery>;
457
- /**
458
- * getIntegerValue query
459
- */
460
- getIntegerValue(variables: Types.GetIntegerValueQueryVariables): Promise<Types.GetIntegerValueQuery>;
461
- /**
462
- * getRelationValue query
463
- */
464
- getRelationValue(variables: Types.GetRelationValueQueryVariables): Promise<Types.GetRelationValueQuery>;
465
- /**
466
- * getRichTextValue query
467
- */
468
- getRichTextValue(variables: Types.GetRichTextValueQueryVariables): Promise<Types.GetRichTextValueQuery>;
469
- /**
470
- * getStringValue query
471
- */
472
- getStringValue(variables: Types.GetStringValueQueryVariables): Promise<Types.GetStringValueQuery>;
473
- /**
474
- * getTemplatesByEntityId query
475
- */
476
- getTemplatesByEntityId(variables: Types.GetTemplatesByEntityIdQueryVariables): Promise<Types.GetTemplatesByEntityIdQuery>;
477
- /**
478
- * getUniqueTemplates query
479
- */
480
- getUniqueTemplates(variables: Types.GetUniqueTemplatesQueryVariables): Promise<Types.GetUniqueTemplatesQuery>;
481
- }
482
- /**
483
- * Customer operations
484
- */
485
- declare class CustomerOperations {
486
- private client;
487
- constructor(client: BaseGraphQLClient);
488
- /**
489
- * createCustomerAddress mutation
490
- */
491
- createCustomerAddress(variables: Types.CreateCustomerAddressMutationVariables): Promise<Types.CreateCustomerAddressMutation>;
492
- /**
493
- * updateCustomerAddress mutation
494
- */
495
- updateCustomerAddress(variables: Types.UpdateCustomerAddressMutationVariables): Promise<Types.UpdateCustomerAddressMutation>;
496
- /**
497
- * deleteCustomerAddress mutation
498
- */
499
- deleteCustomerAddress(variables: Types.DeleteCustomerAddressMutationVariables): Promise<Types.DeleteCustomerAddressMutation>;
500
- }
501
- /**
502
- * Facet operations
503
- */
504
- declare class FacetOperations {
505
- private client;
506
- constructor(client: BaseGraphQLClient);
507
- /**
508
- * facet query
509
- */
510
- facet(variables: Types.FacetQueryVariables): Promise<Types.FacetQuery>;
511
- /**
512
- * facets query
513
- */
514
- facets(variables: Types.FacetsQueryVariables): Promise<Types.FacetsQuery>;
515
- }
516
- /**
517
- * Onboarding operations
518
- */
519
- declare class OnboardingOperations {
520
- private client;
521
- constructor(client: BaseGraphQLClient);
522
- /**
523
- * getOnboarding query
524
- */
525
- getOnboarding(variables: Types.GetOnboardingQueryVariables): Promise<Types.GetOnboardingQuery>;
526
- /**
527
- * createOnboarding mutation
528
- */
529
- createOnboarding(variables: Types.CreateOnboardingMutationVariables): Promise<Types.CreateOnboardingMutation>;
530
- /**
531
- * updateOnboarding mutation
532
- */
533
- updateOnboarding(variables: Types.UpdateOnboardingMutationVariables): Promise<Types.UpdateOnboardingMutation>;
534
- }
535
- /**
536
- * Order operations
537
- */
538
- declare class OrderOperations {
539
- private client;
540
- constructor(client: BaseGraphQLClient);
541
- /**
542
- * activeOrder query
543
- */
544
- activeOrder(): Promise<Types.ActiveOrderQuery>;
545
- /**
546
- * order query
547
- */
548
- order(variables: Types.OrderQueryVariables): Promise<Types.OrderQuery>;
549
- /**
550
- * orderByCode query
551
- */
552
- orderByCode(variables: Types.OrderByCodeQueryVariables): Promise<Types.OrderByCodeQuery>;
553
- /**
554
- * nextOrderStates query
555
- */
556
- nextOrderStates(): Promise<Types.NextOrderStatesQuery>;
557
- /**
558
- * addItemToOrder mutation
559
- */
560
- addItemToOrder(variables: Types.AddItemToOrderMutationVariables): Promise<Types.AddItemToOrderMutation>;
561
- /**
562
- * adjustOrderLine mutation
563
- */
564
- adjustOrderLine(variables: Types.AdjustOrderLineMutationVariables): Promise<Types.AdjustOrderLineMutation>;
565
- /**
566
- * removeOrderLine mutation
567
- */
568
- removeOrderLine(variables: Types.RemoveOrderLineMutationVariables): Promise<Types.RemoveOrderLineMutation>;
569
- /**
570
- * removeAllOrderLines mutation
571
- */
572
- removeAllOrderLines(): Promise<Types.RemoveAllOrderLinesMutation>;
573
- /**
574
- * applyCouponCode mutation
575
- */
576
- applyCouponCode(variables: Types.ApplyCouponCodeMutationVariables): Promise<Types.ApplyCouponCodeMutation>;
577
- /**
578
- * removeCouponCode mutation
579
- */
580
- removeCouponCode(variables: Types.RemoveCouponCodeMutationVariables): Promise<Types.RemoveCouponCodeMutation>;
581
- /**
582
- * setOrderShippingAddress mutation
583
- */
584
- setOrderShippingAddress(variables: Types.SetOrderShippingAddressMutationVariables): Promise<Types.SetOrderShippingAddressMutation>;
585
- /**
586
- * unsetOrderShippingAddress mutation
587
- */
588
- unsetOrderShippingAddress(): Promise<Types.UnsetOrderShippingAddressMutation>;
589
- /**
590
- * setOrderBillingAddress mutation
591
- */
592
- setOrderBillingAddress(variables: Types.SetOrderBillingAddressMutationVariables): Promise<Types.SetOrderBillingAddressMutation>;
593
- /**
594
- * unsetOrderBillingAddress mutation
595
- */
596
- unsetOrderBillingAddress(): Promise<Types.UnsetOrderBillingAddressMutation>;
597
- /**
598
- * eligibleShippingMethods query
599
- */
600
- eligibleShippingMethods(): Promise<Types.EligibleShippingMethodsQuery>;
601
- /**
602
- * activeShippingMethods query
603
- */
604
- activeShippingMethods(): Promise<Types.ActiveShippingMethodsQuery>;
605
- /**
606
- * setOrderShippingMethod mutation
607
- */
608
- setOrderShippingMethod(variables: Types.SetOrderShippingMethodMutationVariables): Promise<Types.SetOrderShippingMethodMutation>;
609
- /**
610
- * eligiblePaymentMethods query
611
- */
612
- eligiblePaymentMethods(): Promise<Types.EligiblePaymentMethodsQuery>;
613
- /**
614
- * activePaymentMethods query
615
- */
616
- activePaymentMethods(): Promise<Types.ActivePaymentMethodsQuery>;
617
- /**
618
- * addPaymentToOrder mutation
619
- */
620
- addPaymentToOrder(variables: Types.AddPaymentToOrderMutationVariables): Promise<Types.AddPaymentToOrderMutation>;
621
- /**
622
- * transitionOrderToState mutation
623
- */
624
- transitionOrderToState(variables: Types.TransitionOrderToStateMutationVariables): Promise<Types.TransitionOrderToStateMutation>;
625
- /**
626
- * setCustomerForOrder mutation
627
- */
628
- setCustomerForOrder(variables: Types.SetCustomerForOrderMutationVariables): Promise<Types.SetCustomerForOrderMutation>;
629
- /**
630
- * setOrderCustomFields mutation
631
- */
632
- setOrderCustomFields(variables: Types.SetOrderCustomFieldsMutationVariables): Promise<Types.SetOrderCustomFieldsMutation>;
633
- }
634
- /**
635
- * Products operations
636
- */
637
- declare class ProductsOperations {
638
- private client;
639
- constructor(client: BaseGraphQLClient);
640
- /**
641
- * products query
642
- */
643
- products(variables: Types.ProductsQueryVariables): Promise<Types.ProductsQuery>;
644
- /**
645
- * product query
646
- */
647
- product(variables: Types.ProductQueryVariables): Promise<Types.ProductQuery>;
648
- }
649
- /**
650
- * Search operations
651
- */
652
- declare class SearchOperations {
653
- private client;
654
- constructor(client: BaseGraphQLClient);
655
- /**
656
- * search query
657
- */
658
- search(variables: Types.SearchQueryVariables): Promise<Types.SearchQuery>;
659
- }
660
- /**
661
- * Shop namespace
662
- * Contains categorized operations for shop API
663
- */
664
- export declare class ShopNamespace {
665
- private client;
666
- readonly asset: AssetOperations;
667
- readonly auth: AuthOperations;
668
- readonly blog: BlogOperations;
669
- readonly channel: ChannelOperations;
670
- readonly collection: CollectionOperations;
671
- readonly country: CountryOperations;
672
- readonly customFields: CustomFieldsOperations;
673
- readonly customer: CustomerOperations;
674
- readonly facet: FacetOperations;
675
- readonly onboarding: OnboardingOperations;
676
- readonly order: OrderOperations;
677
- readonly products: ProductsOperations;
678
- readonly search: SearchOperations;
679
- constructor(config: SDKConfig);
680
- /**
681
- * Set authentication token
682
- * Updates the client with the new token
683
- */
684
- setAuthToken(token: string): void;
685
- /**
686
- * Clear authentication token
687
- */
688
- clearAuthToken(): void;
689
- /**
690
- * Dispose of the namespace and close all connections
691
- */
692
- dispose(): void;
693
- }
694
- export {};