@forgecart/sdk 1.202608221935.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 +21 -2
- package/dist/admin-client.generated.js +62 -2
- package/dist/admin-types.generated.d.ts +5485 -379
- package/dist/admin.d.ts +18 -2
- package/dist/admin.generated.d.ts +255 -12
- package/dist/admin.generated.js +570 -18
- package/dist/admin.js +91 -59
- package/dist/client.generated.d.ts +82 -1
- package/dist/client.generated.js +294 -14
- package/dist/documents.generated.d.ts +229 -104
- package/dist/documents.generated.js +7531 -2210
- package/dist/hook-event-map.generated.d.ts +25 -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 +5 -1
- package/dist/shop-client.generated.js +14 -0
- package/dist/shop-types.generated.d.ts +1701 -76
- package/dist/shop.d.ts +2 -1
- package/dist/shop.generated.d.ts +15 -1
- package/dist/shop.generated.js +30 -3
- package/dist/shop.js +5 -3
- package/dist/unified-client.generated.d.ts +2 -0
- package/dist/unified-client.generated.js +10 -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 +66 -3
- package/src/admin-types.generated.d.ts +4295 -189
- package/src/admin-types.generated.ts +16541 -3445
- package/src/admin.d.ts +22 -0
- package/src/admin.generated.d.ts +228 -3
- package/src/admin.generated.ts +565 -18
- package/src/admin.ts +18 -2
- package/src/client.generated.d.ts +51 -147
- package/src/client.generated.ts +348 -16
- package/src/documents.generated.d.ts +203 -87
- package/src/documents.generated.ts +8598 -3154
- package/src/hook-event-map.generated.d.ts +24 -3
- package/src/hook-event-map.generated.ts +25 -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 +18 -1
- package/src/shop-types.generated.d.ts +1423 -53
- package/src/shop-types.generated.ts +3340 -110
- package/src/shop.d.ts +8 -0
- package/src/shop.generated.d.ts +22 -2
- package/src/shop.generated.ts +31 -3
- package/src/shop.ts +2 -1
- package/src/unified-client.generated.d.ts +26 -0
- package/src/unified-client.generated.ts +12 -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, analyticsGateway, asset, audienceMembership, audienceSegment, auth, automation, settings, channel, chat, collection, country, address, group, customerAnalytics, customer, deployment,
|
|
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';
|
|
@@ -29,9 +29,12 @@ export declare class ForgeCartAdminClient {
|
|
|
29
29
|
clearCurrencyCode(): void;
|
|
30
30
|
setLanguageCode(languageCode: string): void;
|
|
31
31
|
clearLanguageCode(): void;
|
|
32
|
+
setVisitorId(visitorId: string): void;
|
|
33
|
+
clearVisitorId(): void;
|
|
32
34
|
setTransactionToken(token: string): void;
|
|
33
35
|
clearTransactionToken(): void;
|
|
34
36
|
setErrorHandler(handler: ErrorHandler): void;
|
|
37
|
+
onConnectionEvent(listener: WsConnectionListener): () => void;
|
|
35
38
|
dispose(): void;
|
|
36
39
|
query<T>(document: string, variables?: Record<string, unknown>): QueryObservable<T>;
|
|
37
40
|
mutate<T>(document: string, variables?: Record<string, unknown>): QueryObservable<T>;
|
|
@@ -47,6 +50,11 @@ export declare class ForgeCartAdminClient {
|
|
|
47
50
|
get acf(): Admin.AcfCategory;
|
|
48
51
|
get acfSchema(): Admin.AcfSchemaCategory;
|
|
49
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;
|
|
57
|
+
get agentRun(): Admin.AgentRunCategory;
|
|
50
58
|
get analyticsGateway(): Admin.AnalyticsGatewayCategory;
|
|
51
59
|
get asset(): Admin.AssetCategory;
|
|
52
60
|
get audienceMembership(): Admin.AudienceMembershipCategory;
|
|
@@ -60,23 +68,30 @@ export declare class ForgeCartAdminClient {
|
|
|
60
68
|
get customer(): Admin.CustomerCategory;
|
|
61
69
|
get customerAnalytics(): Admin.CustomerAnalyticsCategory;
|
|
62
70
|
get deployment(): Admin.DeploymentCategory;
|
|
63
|
-
get
|
|
71
|
+
get ecom(): Admin.EcomCategory;
|
|
72
|
+
get emailLayout(): Admin.EmailLayoutCategory;
|
|
73
|
+
get emailTemplate(): Admin.EmailTemplateCategory;
|
|
64
74
|
get experiment(): Admin.ExperimentCategory;
|
|
65
75
|
get facet(): Admin.FacetCategory;
|
|
66
76
|
get fulfillment(): Admin.FulfillmentCategory;
|
|
67
77
|
get fulfillmentRequest(): Admin.FulfillmentRequestCategory;
|
|
78
|
+
get googleAds(): Admin.GoogleAdsCategory;
|
|
68
79
|
get hook(): Admin.HookCategory;
|
|
69
80
|
get hookDispatch(): Admin.HookDispatchCategory;
|
|
70
81
|
get market(): Admin.MarketCategory;
|
|
71
82
|
get marketingAttribution(): Admin.MarketingAttributionCategory;
|
|
83
|
+
get marketingCampaign(): Admin.MarketingCampaignCategory;
|
|
72
84
|
get marketingEvent(): Admin.MarketingEventCategory;
|
|
73
85
|
get marketingIdentity(): Admin.MarketingIdentityCategory;
|
|
86
|
+
get metaAds(): Admin.MetaAdsCategory;
|
|
74
87
|
get mission(): Admin.MissionCategory;
|
|
75
88
|
get onboarding(): Admin.OnboardingCategory;
|
|
89
|
+
get orchestration(): Admin.OrchestrationCategory;
|
|
76
90
|
get order(): Admin.OrderCategory;
|
|
77
91
|
get orderAnalytics(): Admin.OrderAnalyticsCategory;
|
|
78
92
|
get payment(): Admin.PaymentCategory;
|
|
79
93
|
get plugin(): Admin.PluginCategory;
|
|
94
|
+
get pluginConnection(): Admin.PluginConnectionCategory;
|
|
80
95
|
get product(): Admin.ProductCategory;
|
|
81
96
|
get productVariant(): Admin.ProductVariantCategory;
|
|
82
97
|
get promotion(): Admin.PromotionCategory;
|
|
@@ -85,6 +100,7 @@ export declare class ForgeCartAdminClient {
|
|
|
85
100
|
get search(): Admin.SearchCategory;
|
|
86
101
|
get seller(): Admin.SellerCategory;
|
|
87
102
|
get sellingPlan(): Admin.SellingPlanCategory;
|
|
103
|
+
get seo(): Admin.SeoCategory;
|
|
88
104
|
get shipping(): Admin.ShippingCategory;
|
|
89
105
|
get stock(): Admin.StockCategory;
|
|
90
106
|
get stockAnalytics(): Admin.StockAnalyticsCategory;
|
|
@@ -92,6 +108,9 @@ export declare class ForgeCartAdminClient {
|
|
|
92
108
|
get subscription(): Admin.SubscriptionCategory;
|
|
93
109
|
get subscriptionAnalytics(): Admin.SubscriptionAnalyticsCategory;
|
|
94
110
|
get tax(): Admin.TaxCategory;
|
|
111
|
+
get tiktokAds(): Admin.TiktokAdsCategory;
|
|
95
112
|
get transaction(): Admin.TransactionCategory;
|
|
113
|
+
get workspacePreempt(): Admin.WorkspacePreemptCategory;
|
|
114
|
+
get workspaceTemplate(): Admin.WorkspaceTemplateCategory;
|
|
96
115
|
get zone(): Admin.ZoneCategory;
|
|
97
116
|
}
|
|
@@ -40,8 +40,10 @@ 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,
|
|
46
|
+
visitorId: config.visitorId,
|
|
45
47
|
});
|
|
46
48
|
this._namespace = new admin_generated_1.AdminNamespace(this.client);
|
|
47
49
|
}
|
|
@@ -66,6 +68,12 @@ class ForgeCartAdminClient {
|
|
|
66
68
|
clearLanguageCode() {
|
|
67
69
|
this.client.clearLanguageCode();
|
|
68
70
|
}
|
|
71
|
+
setVisitorId(visitorId) {
|
|
72
|
+
this.client.setVisitorId(visitorId);
|
|
73
|
+
}
|
|
74
|
+
clearVisitorId() {
|
|
75
|
+
this.client.clearVisitorId();
|
|
76
|
+
}
|
|
69
77
|
setTransactionToken(token) {
|
|
70
78
|
this.client.setTransactionToken(token);
|
|
71
79
|
}
|
|
@@ -75,7 +83,11 @@ class ForgeCartAdminClient {
|
|
|
75
83
|
setErrorHandler(handler) {
|
|
76
84
|
this.client.setErrorHandler(handler);
|
|
77
85
|
}
|
|
86
|
+
onConnectionEvent(listener) {
|
|
87
|
+
return this.client.onConnectionEvent(listener);
|
|
88
|
+
}
|
|
78
89
|
dispose() {
|
|
90
|
+
this.hookManager?.dispose();
|
|
79
91
|
this.client.dispose();
|
|
80
92
|
}
|
|
81
93
|
query(document, variables) {
|
|
@@ -150,6 +162,21 @@ class ForgeCartAdminClient {
|
|
|
150
162
|
get administrator() {
|
|
151
163
|
return this._namespace.administrator;
|
|
152
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
|
+
}
|
|
177
|
+
get agentRun() {
|
|
178
|
+
return this._namespace.agentRun;
|
|
179
|
+
}
|
|
153
180
|
get analyticsGateway() {
|
|
154
181
|
return this._namespace.analyticsGateway;
|
|
155
182
|
}
|
|
@@ -189,8 +216,14 @@ class ForgeCartAdminClient {
|
|
|
189
216
|
get deployment() {
|
|
190
217
|
return this._namespace.deployment;
|
|
191
218
|
}
|
|
192
|
-
get
|
|
193
|
-
return this._namespace.
|
|
219
|
+
get ecom() {
|
|
220
|
+
return this._namespace.ecom;
|
|
221
|
+
}
|
|
222
|
+
get emailLayout() {
|
|
223
|
+
return this._namespace.emailLayout;
|
|
224
|
+
}
|
|
225
|
+
get emailTemplate() {
|
|
226
|
+
return this._namespace.emailTemplate;
|
|
194
227
|
}
|
|
195
228
|
get experiment() {
|
|
196
229
|
return this._namespace.experiment;
|
|
@@ -204,6 +237,9 @@ class ForgeCartAdminClient {
|
|
|
204
237
|
get fulfillmentRequest() {
|
|
205
238
|
return this._namespace.fulfillmentRequest;
|
|
206
239
|
}
|
|
240
|
+
get googleAds() {
|
|
241
|
+
return this._namespace.googleAds;
|
|
242
|
+
}
|
|
207
243
|
get hook() {
|
|
208
244
|
return this._namespace.hook;
|
|
209
245
|
}
|
|
@@ -216,18 +252,27 @@ class ForgeCartAdminClient {
|
|
|
216
252
|
get marketingAttribution() {
|
|
217
253
|
return this._namespace.marketingAttribution;
|
|
218
254
|
}
|
|
255
|
+
get marketingCampaign() {
|
|
256
|
+
return this._namespace.marketingCampaign;
|
|
257
|
+
}
|
|
219
258
|
get marketingEvent() {
|
|
220
259
|
return this._namespace.marketingEvent;
|
|
221
260
|
}
|
|
222
261
|
get marketingIdentity() {
|
|
223
262
|
return this._namespace.marketingIdentity;
|
|
224
263
|
}
|
|
264
|
+
get metaAds() {
|
|
265
|
+
return this._namespace.metaAds;
|
|
266
|
+
}
|
|
225
267
|
get mission() {
|
|
226
268
|
return this._namespace.mission;
|
|
227
269
|
}
|
|
228
270
|
get onboarding() {
|
|
229
271
|
return this._namespace.onboarding;
|
|
230
272
|
}
|
|
273
|
+
get orchestration() {
|
|
274
|
+
return this._namespace.orchestration;
|
|
275
|
+
}
|
|
231
276
|
get order() {
|
|
232
277
|
return this._namespace.order;
|
|
233
278
|
}
|
|
@@ -240,6 +285,9 @@ class ForgeCartAdminClient {
|
|
|
240
285
|
get plugin() {
|
|
241
286
|
return this._namespace.plugin;
|
|
242
287
|
}
|
|
288
|
+
get pluginConnection() {
|
|
289
|
+
return this._namespace.pluginConnection;
|
|
290
|
+
}
|
|
243
291
|
get product() {
|
|
244
292
|
return this._namespace.product;
|
|
245
293
|
}
|
|
@@ -264,6 +312,9 @@ class ForgeCartAdminClient {
|
|
|
264
312
|
get sellingPlan() {
|
|
265
313
|
return this._namespace.sellingPlan;
|
|
266
314
|
}
|
|
315
|
+
get seo() {
|
|
316
|
+
return this._namespace.seo;
|
|
317
|
+
}
|
|
267
318
|
get shipping() {
|
|
268
319
|
return this._namespace.shipping;
|
|
269
320
|
}
|
|
@@ -285,9 +336,18 @@ class ForgeCartAdminClient {
|
|
|
285
336
|
get tax() {
|
|
286
337
|
return this._namespace.tax;
|
|
287
338
|
}
|
|
339
|
+
get tiktokAds() {
|
|
340
|
+
return this._namespace.tiktokAds;
|
|
341
|
+
}
|
|
288
342
|
get transaction() {
|
|
289
343
|
return this._namespace.transaction;
|
|
290
344
|
}
|
|
345
|
+
get workspacePreempt() {
|
|
346
|
+
return this._namespace.workspacePreempt;
|
|
347
|
+
}
|
|
348
|
+
get workspaceTemplate() {
|
|
349
|
+
return this._namespace.workspaceTemplate;
|
|
350
|
+
}
|
|
291
351
|
get zone() {
|
|
292
352
|
return this._namespace.zone;
|
|
293
353
|
}
|