@forgecart/sdk 1.202608300703.0 → 1.202609190800.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/admin-client.generated.d.ts +15 -1
- package/dist/admin-client.generated.js +44 -0
- package/dist/admin-types.generated.d.ts +3835 -419
- package/dist/admin.d.ts +14 -1
- package/dist/admin.generated.d.ts +206 -3
- package/dist/admin.generated.js +466 -4
- package/dist/admin.js +88 -62
- package/dist/client.generated.d.ts +74 -1
- package/dist/client.generated.js +266 -14
- package/dist/documents.generated.d.ts +210 -104
- package/dist/documents.generated.js +4724 -1166
- package/dist/hook-event-map.generated.d.ts +4 -4
- package/dist/index.d.ts +1 -1
- package/dist/sdk-hook-subscription.generated.d.ts +27 -0
- package/dist/sdk-hook-subscription.generated.js +57 -20
- package/dist/sdk-types.generated.d.ts +4 -2
- package/dist/shop-client.generated.d.ts +3 -1
- package/dist/shop-client.generated.js +7 -0
- package/dist/shop-types.generated.d.ts +1044 -96
- package/dist/shop.d.ts +2 -1
- package/dist/shop.generated.d.ts +12 -1
- package/dist/shop.generated.js +27 -3
- package/dist/shop.js +5 -3
- package/dist/unified-client.generated.js +2 -2
- package/dist/upload.d.ts +21 -0
- package/dist/upload.js +36 -1
- package/package.json +1 -1
- package/src/admin-client.generated.d.ts +115 -0
- package/src/admin-client.generated.ts +46 -1
- package/src/admin-types.generated.d.ts +4295 -189
- package/src/admin-types.generated.ts +8389 -615
- package/src/admin.d.ts +22 -0
- package/src/admin.generated.d.ts +228 -3
- package/src/admin.generated.ts +464 -5
- package/src/admin.ts +14 -1
- package/src/client.generated.d.ts +51 -147
- package/src/client.generated.ts +301 -16
- package/src/documents.generated.d.ts +203 -87
- package/src/documents.generated.ts +4628 -966
- package/src/hook-event-map.generated.d.ts +24 -3
- package/src/hook-event-map.generated.ts +4 -4
- package/src/index.d.ts +6 -5
- package/src/index.ts +1 -1
- package/src/sdk-hook-subscription.generated.d.ts +27 -0
- package/src/sdk-hook-subscription.generated.ts +73 -31
- package/src/sdk-types.generated.d.ts +4 -2
- package/src/sdk-types.generated.ts +4 -2
- package/src/shop-client.generated.d.ts +57 -0
- package/src/shop-client.generated.ts +9 -1
- package/src/shop-types.generated.d.ts +1423 -53
- package/src/shop-types.generated.ts +1651 -71
- package/src/shop.d.ts +8 -0
- package/src/shop.generated.d.ts +22 -2
- package/src/shop.generated.ts +26 -3
- package/src/shop.ts +2 -1
- package/src/unified-client.generated.d.ts +26 -0
- package/src/unified-client.generated.ts +2 -2
- package/src/upload.d.ts +21 -0
- package/src/upload.ts +48 -1
package/README.md
CHANGED
|
@@ -56,8 +56,8 @@ const order = await client.shop.cart.addItemToOrder({ variantId, quantity: 1 });
|
|
|
56
56
|
|
|
57
57
|
## Namespaces
|
|
58
58
|
|
|
59
|
-
- `client.admin` — entry, fieldDefinition, publish, acfSchema, acf, administrator, agentRun, analyticsGateway, asset, audienceMembership, audienceSegment, auth, automation, settings, channel, chat, collection, country, address, group, customerAnalytics, customer, deployment, emailLayout, emailTemplate, experiment, facet, fulfillmentRequest, fulfillment, hookDispatch, hook, market, marketingAttribution, marketingEvent, marketingIdentity, mission, onboarding, coupon, draft, modification, note, orderAnalytics, order, payment, manageable, plugin, optionGroup, option, productVariant, product, promotion, role, scheduledJob, search, seller, sellingPlan, shipping, stockAnalytics, stock, storefrontRouteTree, subscriptionAnalytics, subscription, tax, transaction, workspaceTemplate, zone
|
|
60
|
-
- `client.shop` — acf, address, auth, cart, channel, checkout, collection, country, customer, experiment, facet, hookDispatch, hook, marketingEvent, marketingIdentity, order, payment, product, search, sellingPlan, shipping, subscription
|
|
59
|
+
- `client.admin` — entry, fieldDefinition, publish, acfSchema, acf, administrator, adsAudienceSync, adsCampaignManagement, adsGateway, adsRoas, agentRun, analyticsGateway, asset, audienceMembership, audienceSegment, auth, automation, settings, channel, chat, collection, country, address, group, customerAnalytics, customer, deployment, ecom, emailLayout, emailTemplate, experiment, facet, fulfillmentRequest, fulfillment, googleAds, hookDispatch, hook, market, marketingAttribution, marketingCampaign, marketingEvent, marketingIdentity, metaAds, mission, onboarding, orchestration, coupon, draft, modification, note, orderAnalytics, order, payment, manageable, pluginConnection, plugin, optionGroup, option, productVariant, product, promotion, role, scheduledJob, search, seller, sellingPlan, seo, shipping, stockAnalytics, stock, storefrontRouteTree, subscriptionAnalytics, subscription, tax, tiktokAds, transaction, workspacePreempt, workspaceTemplate, zone
|
|
60
|
+
- `client.shop` — acf, address, auth, cart, channel, checkout, collection, country, customer, experiment, facet, hookDispatch, hook, marketingEvent, marketingIdentity, order, payment, product, search, sellingPlan, seo, shipping, subscription
|
|
61
61
|
|
|
62
62
|
## NestJS Integration
|
|
63
63
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import { AdminNamespace } from './admin.generated';
|
|
8
8
|
import type * as Admin from './admin.generated';
|
|
9
|
-
import type { AdminExternalAuthResult, ErrorHandler, ForgeCartAdminClientConfig, LoginSession, QueryObservable } from './client.generated';
|
|
9
|
+
import type { AdminExternalAuthResult, ErrorHandler, ForgeCartAdminClientConfig, LoginSession, QueryObservable, WsConnectionListener } from './client.generated';
|
|
10
10
|
import type { HookSubscription } from './sdk-hook-subscription.generated';
|
|
11
11
|
import type { AdminHookPoint, AdminHookHandler } from './hook-event-map.generated';
|
|
12
12
|
import type { ShopNamespace } from './shop.generated';
|
|
@@ -34,6 +34,7 @@ export declare class ForgeCartAdminClient {
|
|
|
34
34
|
setTransactionToken(token: string): void;
|
|
35
35
|
clearTransactionToken(): void;
|
|
36
36
|
setErrorHandler(handler: ErrorHandler): void;
|
|
37
|
+
onConnectionEvent(listener: WsConnectionListener): () => void;
|
|
37
38
|
dispose(): void;
|
|
38
39
|
query<T>(document: string, variables?: Record<string, unknown>): QueryObservable<T>;
|
|
39
40
|
mutate<T>(document: string, variables?: Record<string, unknown>): QueryObservable<T>;
|
|
@@ -49,6 +50,10 @@ export declare class ForgeCartAdminClient {
|
|
|
49
50
|
get acf(): Admin.AcfCategory;
|
|
50
51
|
get acfSchema(): Admin.AcfSchemaCategory;
|
|
51
52
|
get administrator(): Admin.AdministratorCategory;
|
|
53
|
+
get adsAudienceSync(): Admin.AdsAudienceSyncCategory;
|
|
54
|
+
get adsCampaignManagement(): Admin.AdsCampaignManagementCategory;
|
|
55
|
+
get adsGateway(): Admin.AdsGatewayCategory;
|
|
56
|
+
get adsRoas(): Admin.AdsRoasCategory;
|
|
52
57
|
get agentRun(): Admin.AgentRunCategory;
|
|
53
58
|
get analyticsGateway(): Admin.AnalyticsGatewayCategory;
|
|
54
59
|
get asset(): Admin.AssetCategory;
|
|
@@ -63,24 +68,30 @@ export declare class ForgeCartAdminClient {
|
|
|
63
68
|
get customer(): Admin.CustomerCategory;
|
|
64
69
|
get customerAnalytics(): Admin.CustomerAnalyticsCategory;
|
|
65
70
|
get deployment(): Admin.DeploymentCategory;
|
|
71
|
+
get ecom(): Admin.EcomCategory;
|
|
66
72
|
get emailLayout(): Admin.EmailLayoutCategory;
|
|
67
73
|
get emailTemplate(): Admin.EmailTemplateCategory;
|
|
68
74
|
get experiment(): Admin.ExperimentCategory;
|
|
69
75
|
get facet(): Admin.FacetCategory;
|
|
70
76
|
get fulfillment(): Admin.FulfillmentCategory;
|
|
71
77
|
get fulfillmentRequest(): Admin.FulfillmentRequestCategory;
|
|
78
|
+
get googleAds(): Admin.GoogleAdsCategory;
|
|
72
79
|
get hook(): Admin.HookCategory;
|
|
73
80
|
get hookDispatch(): Admin.HookDispatchCategory;
|
|
74
81
|
get market(): Admin.MarketCategory;
|
|
75
82
|
get marketingAttribution(): Admin.MarketingAttributionCategory;
|
|
83
|
+
get marketingCampaign(): Admin.MarketingCampaignCategory;
|
|
76
84
|
get marketingEvent(): Admin.MarketingEventCategory;
|
|
77
85
|
get marketingIdentity(): Admin.MarketingIdentityCategory;
|
|
86
|
+
get metaAds(): Admin.MetaAdsCategory;
|
|
78
87
|
get mission(): Admin.MissionCategory;
|
|
79
88
|
get onboarding(): Admin.OnboardingCategory;
|
|
89
|
+
get orchestration(): Admin.OrchestrationCategory;
|
|
80
90
|
get order(): Admin.OrderCategory;
|
|
81
91
|
get orderAnalytics(): Admin.OrderAnalyticsCategory;
|
|
82
92
|
get payment(): Admin.PaymentCategory;
|
|
83
93
|
get plugin(): Admin.PluginCategory;
|
|
94
|
+
get pluginConnection(): Admin.PluginConnectionCategory;
|
|
84
95
|
get product(): Admin.ProductCategory;
|
|
85
96
|
get productVariant(): Admin.ProductVariantCategory;
|
|
86
97
|
get promotion(): Admin.PromotionCategory;
|
|
@@ -89,6 +100,7 @@ export declare class ForgeCartAdminClient {
|
|
|
89
100
|
get search(): Admin.SearchCategory;
|
|
90
101
|
get seller(): Admin.SellerCategory;
|
|
91
102
|
get sellingPlan(): Admin.SellingPlanCategory;
|
|
103
|
+
get seo(): Admin.SeoCategory;
|
|
92
104
|
get shipping(): Admin.ShippingCategory;
|
|
93
105
|
get stock(): Admin.StockCategory;
|
|
94
106
|
get stockAnalytics(): Admin.StockAnalyticsCategory;
|
|
@@ -96,7 +108,9 @@ export declare class ForgeCartAdminClient {
|
|
|
96
108
|
get subscription(): Admin.SubscriptionCategory;
|
|
97
109
|
get subscriptionAnalytics(): Admin.SubscriptionAnalyticsCategory;
|
|
98
110
|
get tax(): Admin.TaxCategory;
|
|
111
|
+
get tiktokAds(): Admin.TiktokAdsCategory;
|
|
99
112
|
get transaction(): Admin.TransactionCategory;
|
|
113
|
+
get workspacePreempt(): Admin.WorkspacePreemptCategory;
|
|
100
114
|
get workspaceTemplate(): Admin.WorkspaceTemplateCategory;
|
|
101
115
|
get zone(): Admin.ZoneCategory;
|
|
102
116
|
}
|
|
@@ -40,6 +40,7 @@ class ForgeCartAdminClient {
|
|
|
40
40
|
}
|
|
41
41
|
this.client = new client_generated_1.BaseGraphQLClient(config.endpoint, headers, config.uploadEndpoint, {
|
|
42
42
|
wsEndpoint: config.wsEndpoint,
|
|
43
|
+
connectionTimeout: config.connectionTimeout,
|
|
43
44
|
currencyCode: config.currencyCode,
|
|
44
45
|
languageCode: config.languageCode,
|
|
45
46
|
visitorId: config.visitorId,
|
|
@@ -82,7 +83,11 @@ class ForgeCartAdminClient {
|
|
|
82
83
|
setErrorHandler(handler) {
|
|
83
84
|
this.client.setErrorHandler(handler);
|
|
84
85
|
}
|
|
86
|
+
onConnectionEvent(listener) {
|
|
87
|
+
return this.client.onConnectionEvent(listener);
|
|
88
|
+
}
|
|
85
89
|
dispose() {
|
|
90
|
+
this.hookManager?.dispose();
|
|
86
91
|
this.client.dispose();
|
|
87
92
|
}
|
|
88
93
|
query(document, variables) {
|
|
@@ -157,6 +162,18 @@ class ForgeCartAdminClient {
|
|
|
157
162
|
get administrator() {
|
|
158
163
|
return this._namespace.administrator;
|
|
159
164
|
}
|
|
165
|
+
get adsAudienceSync() {
|
|
166
|
+
return this._namespace.adsAudienceSync;
|
|
167
|
+
}
|
|
168
|
+
get adsCampaignManagement() {
|
|
169
|
+
return this._namespace.adsCampaignManagement;
|
|
170
|
+
}
|
|
171
|
+
get adsGateway() {
|
|
172
|
+
return this._namespace.adsGateway;
|
|
173
|
+
}
|
|
174
|
+
get adsRoas() {
|
|
175
|
+
return this._namespace.adsRoas;
|
|
176
|
+
}
|
|
160
177
|
get agentRun() {
|
|
161
178
|
return this._namespace.agentRun;
|
|
162
179
|
}
|
|
@@ -199,6 +216,9 @@ class ForgeCartAdminClient {
|
|
|
199
216
|
get deployment() {
|
|
200
217
|
return this._namespace.deployment;
|
|
201
218
|
}
|
|
219
|
+
get ecom() {
|
|
220
|
+
return this._namespace.ecom;
|
|
221
|
+
}
|
|
202
222
|
get emailLayout() {
|
|
203
223
|
return this._namespace.emailLayout;
|
|
204
224
|
}
|
|
@@ -217,6 +237,9 @@ class ForgeCartAdminClient {
|
|
|
217
237
|
get fulfillmentRequest() {
|
|
218
238
|
return this._namespace.fulfillmentRequest;
|
|
219
239
|
}
|
|
240
|
+
get googleAds() {
|
|
241
|
+
return this._namespace.googleAds;
|
|
242
|
+
}
|
|
220
243
|
get hook() {
|
|
221
244
|
return this._namespace.hook;
|
|
222
245
|
}
|
|
@@ -229,18 +252,27 @@ class ForgeCartAdminClient {
|
|
|
229
252
|
get marketingAttribution() {
|
|
230
253
|
return this._namespace.marketingAttribution;
|
|
231
254
|
}
|
|
255
|
+
get marketingCampaign() {
|
|
256
|
+
return this._namespace.marketingCampaign;
|
|
257
|
+
}
|
|
232
258
|
get marketingEvent() {
|
|
233
259
|
return this._namespace.marketingEvent;
|
|
234
260
|
}
|
|
235
261
|
get marketingIdentity() {
|
|
236
262
|
return this._namespace.marketingIdentity;
|
|
237
263
|
}
|
|
264
|
+
get metaAds() {
|
|
265
|
+
return this._namespace.metaAds;
|
|
266
|
+
}
|
|
238
267
|
get mission() {
|
|
239
268
|
return this._namespace.mission;
|
|
240
269
|
}
|
|
241
270
|
get onboarding() {
|
|
242
271
|
return this._namespace.onboarding;
|
|
243
272
|
}
|
|
273
|
+
get orchestration() {
|
|
274
|
+
return this._namespace.orchestration;
|
|
275
|
+
}
|
|
244
276
|
get order() {
|
|
245
277
|
return this._namespace.order;
|
|
246
278
|
}
|
|
@@ -253,6 +285,9 @@ class ForgeCartAdminClient {
|
|
|
253
285
|
get plugin() {
|
|
254
286
|
return this._namespace.plugin;
|
|
255
287
|
}
|
|
288
|
+
get pluginConnection() {
|
|
289
|
+
return this._namespace.pluginConnection;
|
|
290
|
+
}
|
|
256
291
|
get product() {
|
|
257
292
|
return this._namespace.product;
|
|
258
293
|
}
|
|
@@ -277,6 +312,9 @@ class ForgeCartAdminClient {
|
|
|
277
312
|
get sellingPlan() {
|
|
278
313
|
return this._namespace.sellingPlan;
|
|
279
314
|
}
|
|
315
|
+
get seo() {
|
|
316
|
+
return this._namespace.seo;
|
|
317
|
+
}
|
|
280
318
|
get shipping() {
|
|
281
319
|
return this._namespace.shipping;
|
|
282
320
|
}
|
|
@@ -298,9 +336,15 @@ class ForgeCartAdminClient {
|
|
|
298
336
|
get tax() {
|
|
299
337
|
return this._namespace.tax;
|
|
300
338
|
}
|
|
339
|
+
get tiktokAds() {
|
|
340
|
+
return this._namespace.tiktokAds;
|
|
341
|
+
}
|
|
301
342
|
get transaction() {
|
|
302
343
|
return this._namespace.transaction;
|
|
303
344
|
}
|
|
345
|
+
get workspacePreempt() {
|
|
346
|
+
return this._namespace.workspacePreempt;
|
|
347
|
+
}
|
|
304
348
|
get workspaceTemplate() {
|
|
305
349
|
return this._namespace.workspaceTemplate;
|
|
306
350
|
}
|