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