@forgecart/sdk 1.2.7 → 1.202607061936.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.
Files changed (39) hide show
  1. package/README.md +2 -2
  2. package/dist/admin-types.generated.d.ts +481 -33
  3. package/dist/admin.d.ts +2 -0
  4. package/dist/admin.generated.d.ts +67 -27
  5. package/dist/admin.generated.js +88 -4
  6. package/dist/admin.js +35 -31
  7. package/dist/client.generated.d.ts +40 -1
  8. package/dist/client.generated.js +152 -6
  9. package/dist/documents.generated.d.ts +28 -6
  10. package/dist/documents.generated.js +517 -41
  11. package/dist/index.d.ts +1 -0
  12. package/dist/shop-types.generated.d.ts +205 -13
  13. package/dist/shop.d.ts +1 -0
  14. package/dist/shop.generated.d.ts +13 -4
  15. package/dist/shop.generated.js +19 -1
  16. package/dist/shop.js +17 -15
  17. package/package.json +8 -4
  18. package/src/admin-types.generated.d.ts +10013 -0
  19. package/src/admin-types.generated.ts +1019 -96
  20. package/src/admin.generated.d.ts +806 -0
  21. package/src/admin.generated.ts +117 -29
  22. package/src/admin.ts +2 -0
  23. package/src/client.generated.d.ts +249 -0
  24. package/src/client.generated.ts +185 -5
  25. package/src/documents.generated.d.ts +473 -0
  26. package/src/documents.generated.ts +530 -32
  27. package/src/error-utils.d.ts +25 -0
  28. package/src/hook-event-map.generated.d.ts +243 -0
  29. package/src/index.d.ts +22 -0
  30. package/src/index.ts +1 -0
  31. package/src/sdk-hook-subscription.generated.d.ts +29 -0
  32. package/src/sdk-plugin.generated.d.ts +38 -0
  33. package/src/sdk-types.generated.d.ts +56 -0
  34. package/src/shop-types.generated.d.ts +4786 -0
  35. package/src/shop-types.generated.ts +275 -13
  36. package/src/shop.generated.d.ts +213 -0
  37. package/src/shop.generated.ts +22 -5
  38. package/src/shop.ts +1 -0
  39. package/src/upload.d.ts +14 -0
@@ -1607,13 +1607,9 @@ fragment ChannelSettingsField on ChannelSettings {
1607
1607
  defaultPaymentProviderCode
1608
1608
  defaultWeightUnit
1609
1609
  defaultDimensionUnit
1610
- manualShippingRates {
1611
- code
1612
- name
1613
- amount
1614
- currency
1615
- estimatedDays
1616
- }
1610
+ autoCurrencyExchange
1611
+ fxRoundingRule
1612
+ fxMarkupPercent
1617
1613
  }`;
1618
1614
 
1619
1615
  export const adminChannelUpdateSettingsDocument = `mutation ChannelUpdateSettings($input: UpdateChannelSettingsInput!) {
@@ -1632,13 +1628,9 @@ fragment ChannelSettingsField on ChannelSettings {
1632
1628
  defaultPaymentProviderCode
1633
1629
  defaultWeightUnit
1634
1630
  defaultDimensionUnit
1635
- manualShippingRates {
1636
- code
1637
- name
1638
- amount
1639
- currency
1640
- estimatedDays
1641
- }
1631
+ autoCurrencyExchange
1632
+ fxRoundingRule
1633
+ fxMarkupPercent
1642
1634
  }`;
1643
1635
 
1644
1636
  export const adminChannelDocument = `query Channel($id: ID!) {
@@ -1752,8 +1744,31 @@ fragment ChannelField on Channel {
1752
1744
  defaultTaxZoneId
1753
1745
  }`;
1754
1746
 
1755
- export const adminDeleteChannelDocument = `mutation DeleteChannel($id: ID!) {
1756
- deleteChannel(id: $id)
1747
+ export const adminDeleteChannelDocument = `mutation DeleteChannel($input: DeleteChannelInput!) {
1748
+ deleteChannel(input: $input) {
1749
+ ...ChannelField
1750
+ }
1751
+ }
1752
+
1753
+ fragment ChannelField on Channel {
1754
+ id
1755
+ createdAt
1756
+ updatedAt
1757
+ code
1758
+ token
1759
+ secret
1760
+ previewUrl
1761
+ defaultLanguageCode
1762
+ defaultCurrencyCode
1763
+ availableLanguageCodes
1764
+ availableCurrencyCodes
1765
+ description
1766
+ pricesIncludeTax
1767
+ taxProviderCode
1768
+ trackInventory
1769
+ outOfStockThreshold
1770
+ sellerId
1771
+ defaultTaxZoneId
1757
1772
  }`;
1758
1773
 
1759
1774
  export const adminUpdateChannelSettingsDocument = `mutation UpdateChannelSettings($input: UpdateChannelSettingsInput!) {
@@ -1772,13 +1787,9 @@ fragment ChannelSettingsField on ChannelSettings {
1772
1787
  defaultPaymentProviderCode
1773
1788
  defaultWeightUnit
1774
1789
  defaultDimensionUnit
1775
- manualShippingRates {
1776
- code
1777
- name
1778
- amount
1779
- currency
1780
- estimatedDays
1781
- }
1790
+ autoCurrencyExchange
1791
+ fxRoundingRule
1792
+ fxMarkupPercent
1782
1793
  }`;
1783
1794
 
1784
1795
  export const adminProvisionChannelDocument = `mutation ProvisionChannel($input: ProvisionChannelInput!) {
@@ -1830,17 +1841,13 @@ fragment ChannelSettingsField on ChannelSettings {
1830
1841
  defaultPaymentProviderCode
1831
1842
  defaultWeightUnit
1832
1843
  defaultDimensionUnit
1833
- manualShippingRates {
1834
- code
1835
- name
1836
- amount
1837
- currency
1838
- estimatedDays
1839
- }
1844
+ autoCurrencyExchange
1845
+ fxRoundingRule
1846
+ fxMarkupPercent
1840
1847
  }`;
1841
1848
 
1842
- export const adminStartChatSessionDocument = `mutation StartChatSession {
1843
- startChatSession {
1849
+ export const adminStartChatSessionDocument = `mutation StartChatSession($input: StartChatSessionInput) {
1850
+ startChatSession(input: $input) {
1844
1851
  ...ChatSessionField
1845
1852
  }
1846
1853
  }
@@ -1947,6 +1954,62 @@ export const adminChatQueueDocument = `query ChatQueue($sessionId: ID!) {
1947
1954
  }
1948
1955
  }`;
1949
1956
 
1957
+ export const adminChatHistoryDocument = `query ChatHistory($input: ChatHistoryInput!) {
1958
+ chatHistory(input: $input) {
1959
+ ...ChatHistoryMessageField
1960
+ }
1961
+ }
1962
+
1963
+ fragment ChatHistoryMessageField on ChatHistoryMessage {
1964
+ id
1965
+ role
1966
+ content
1967
+ toolUse
1968
+ toolResult
1969
+ seq
1970
+ eventId
1971
+ timestamp
1972
+ }`;
1973
+
1974
+ export const adminChatSessionsDocument = `query ChatSessions($input: ChatSessionsInput) {
1975
+ chatSessions(input: $input) {
1976
+ items {
1977
+ ...ChatSessionSummaryField
1978
+ }
1979
+ totalItems
1980
+ }
1981
+ }
1982
+
1983
+ fragment ChatSessionSummaryField on ChatSessionSummary {
1984
+ id
1985
+ agentSessionId
1986
+ title
1987
+ status
1988
+ origin
1989
+ messageCount
1990
+ lastActivityAt
1991
+ createdAt
1992
+ workspaceId
1993
+ }`;
1994
+
1995
+ export const adminArchiveChatSessionDocument = `mutation ArchiveChatSession($sessionId: ID!) {
1996
+ archiveChatSession(sessionId: $sessionId)
1997
+ }`;
1998
+
1999
+ export const adminWorkspaceReadinessDocument = `subscription WorkspaceReadiness {
2000
+ workspaceReadiness {
2001
+ ...WorkspaceReadinessField
2002
+ }
2003
+ }
2004
+
2005
+ fragment WorkspaceReadinessField on WorkspaceReadiness {
2006
+ workspaceId
2007
+ podState
2008
+ serverState
2009
+ chatBindingState
2010
+ endpoint
2011
+ }`;
2012
+
1950
2013
  export const adminAdminCollectionDocument = `query AdminCollection($id: ID!) {
1951
2014
  collection(id: $id) {
1952
2015
  ...CollectionField
@@ -3949,6 +4012,85 @@ export const adminEmitDocument = `mutation Emit($input: EmitCustomEventInput!) {
3949
4012
  emit(input: $input)
3950
4013
  }`;
3951
4014
 
4015
+ export const adminMarketsDocument = `query Markets($options: ListQueryOptions) {
4016
+ markets(options: $options) {
4017
+ items {
4018
+ ...MarketField
4019
+ }
4020
+ totalItems
4021
+ }
4022
+ }
4023
+
4024
+ fragment MarketField on Market {
4025
+ id
4026
+ createdAt
4027
+ updatedAt
4028
+ name
4029
+ enabled
4030
+ currencyCode
4031
+ languageCode
4032
+ channelId
4033
+ countries {
4034
+ id
4035
+ code
4036
+ name
4037
+ enabled
4038
+ }
4039
+ }`;
4040
+
4041
+ export const adminCreateMarketDocument = `mutation CreateMarket($input: CreateMarketInput!) {
4042
+ createMarket(input: $input) {
4043
+ ...MarketField
4044
+ }
4045
+ }
4046
+
4047
+ fragment MarketField on Market {
4048
+ id
4049
+ createdAt
4050
+ updatedAt
4051
+ name
4052
+ enabled
4053
+ currencyCode
4054
+ languageCode
4055
+ channelId
4056
+ countries {
4057
+ id
4058
+ code
4059
+ name
4060
+ enabled
4061
+ }
4062
+ }`;
4063
+
4064
+ export const adminUpdateMarketDocument = `mutation UpdateMarket($input: UpdateMarketInput!) {
4065
+ updateMarket(input: $input) {
4066
+ ...MarketField
4067
+ }
4068
+ }
4069
+
4070
+ fragment MarketField on Market {
4071
+ id
4072
+ createdAt
4073
+ updatedAt
4074
+ name
4075
+ enabled
4076
+ currencyCode
4077
+ languageCode
4078
+ channelId
4079
+ countries {
4080
+ id
4081
+ code
4082
+ name
4083
+ enabled
4084
+ }
4085
+ }`;
4086
+
4087
+ export const adminDeleteMarketDocument = `mutation DeleteMarket($id: ID!) {
4088
+ deleteMarket(id: $id) {
4089
+ result
4090
+ message
4091
+ }
4092
+ }`;
4093
+
3952
4094
  export const adminAdminAttributionByOrderDocument = `query AdminAttributionByOrder($input: AttributionByOrderInput!) {
3953
4095
  attributionByOrder(input: $input) {
3954
4096
  id
@@ -4128,6 +4270,195 @@ fragment AdminMarketingIdentityIdentifierFields on MarketingIdentityIdentifier {
4128
4270
  position
4129
4271
  }`;
4130
4272
 
4273
+ export const adminAdminMissionsDocument = `query AdminMissions($options: MissionListOptions) {
4274
+ missions(options: $options) {
4275
+ items {
4276
+ ...MissionField
4277
+ }
4278
+ totalItems
4279
+ }
4280
+ }
4281
+
4282
+ fragment MissionField on Mission {
4283
+ id
4284
+ status
4285
+ title
4286
+ model
4287
+ repos {
4288
+ ...MissionRepoRefField
4289
+ }
4290
+ branch
4291
+ prUrl
4292
+ podRef
4293
+ costCents
4294
+ channelId
4295
+ administratorId
4296
+ workspaceId
4297
+ createdAt
4298
+ updatedAt
4299
+ }
4300
+
4301
+ fragment MissionRepoRefField on MissionRepoRef {
4302
+ owner
4303
+ name
4304
+ branch
4305
+ }`;
4306
+
4307
+ export const adminAdminMissionDocument = `query AdminMission($id: ID!) {
4308
+ mission(id: $id) {
4309
+ ...MissionField
4310
+ }
4311
+ }
4312
+
4313
+ fragment MissionField on Mission {
4314
+ id
4315
+ status
4316
+ title
4317
+ model
4318
+ repos {
4319
+ ...MissionRepoRefField
4320
+ }
4321
+ branch
4322
+ prUrl
4323
+ podRef
4324
+ costCents
4325
+ channelId
4326
+ administratorId
4327
+ workspaceId
4328
+ createdAt
4329
+ updatedAt
4330
+ }
4331
+
4332
+ fragment MissionRepoRefField on MissionRepoRef {
4333
+ owner
4334
+ name
4335
+ branch
4336
+ }`;
4337
+
4338
+ export const adminAdminCreateMissionDocument = `mutation AdminCreateMission($input: CreateMissionInput!) {
4339
+ createMission(input: $input) {
4340
+ ...MissionField
4341
+ }
4342
+ }
4343
+
4344
+ fragment MissionField on Mission {
4345
+ id
4346
+ status
4347
+ title
4348
+ model
4349
+ repos {
4350
+ ...MissionRepoRefField
4351
+ }
4352
+ branch
4353
+ prUrl
4354
+ podRef
4355
+ costCents
4356
+ channelId
4357
+ administratorId
4358
+ workspaceId
4359
+ createdAt
4360
+ updatedAt
4361
+ }
4362
+
4363
+ fragment MissionRepoRefField on MissionRepoRef {
4364
+ owner
4365
+ name
4366
+ branch
4367
+ }`;
4368
+
4369
+ export const adminAdminCancelMissionDocument = `mutation AdminCancelMission($id: ID!) {
4370
+ cancelMission(id: $id) {
4371
+ ...MissionField
4372
+ }
4373
+ }
4374
+
4375
+ fragment MissionField on Mission {
4376
+ id
4377
+ status
4378
+ title
4379
+ model
4380
+ repos {
4381
+ ...MissionRepoRefField
4382
+ }
4383
+ branch
4384
+ prUrl
4385
+ podRef
4386
+ costCents
4387
+ channelId
4388
+ administratorId
4389
+ workspaceId
4390
+ createdAt
4391
+ updatedAt
4392
+ }
4393
+
4394
+ fragment MissionRepoRefField on MissionRepoRef {
4395
+ owner
4396
+ name
4397
+ branch
4398
+ }`;
4399
+
4400
+ export const adminAdminDeleteMissionDocument = `mutation AdminDeleteMission($id: ID!) {
4401
+ deleteMission(id: $id) {
4402
+ ...MissionField
4403
+ }
4404
+ }
4405
+
4406
+ fragment MissionField on Mission {
4407
+ id
4408
+ status
4409
+ title
4410
+ model
4411
+ repos {
4412
+ ...MissionRepoRefField
4413
+ }
4414
+ branch
4415
+ prUrl
4416
+ podRef
4417
+ costCents
4418
+ channelId
4419
+ administratorId
4420
+ workspaceId
4421
+ createdAt
4422
+ updatedAt
4423
+ }
4424
+
4425
+ fragment MissionRepoRefField on MissionRepoRef {
4426
+ owner
4427
+ name
4428
+ branch
4429
+ }`;
4430
+
4431
+ export const adminAdminSendMissionMessageDocument = `mutation AdminSendMissionMessage($input: SendMissionMessageInput!) {
4432
+ sendMissionMessage(input: $input) {
4433
+ ...MissionField
4434
+ }
4435
+ }
4436
+
4437
+ fragment MissionField on Mission {
4438
+ id
4439
+ status
4440
+ title
4441
+ model
4442
+ repos {
4443
+ ...MissionRepoRefField
4444
+ }
4445
+ branch
4446
+ prUrl
4447
+ podRef
4448
+ costCents
4449
+ channelId
4450
+ administratorId
4451
+ workspaceId
4452
+ createdAt
4453
+ updatedAt
4454
+ }
4455
+
4456
+ fragment MissionRepoRefField on MissionRepoRef {
4457
+ owner
4458
+ name
4459
+ branch
4460
+ }`;
4461
+
4131
4462
  export const adminActiveOnboardingDocument = `query ActiveOnboarding {
4132
4463
  activeOnboarding {
4133
4464
  onboarding {
@@ -15373,6 +15704,21 @@ export const adminDeleteProductVariantsDocument = `mutation DeleteProductVariant
15373
15704
  }
15374
15705
  }`;
15375
15706
 
15707
+ export const adminSetProductVariantPriceDocument = `mutation SetProductVariantPrice($input: SetPriceInput!) {
15708
+ setProductVariantPrice(input: $input) {
15709
+ ...ProductVariantPriceField
15710
+ }
15711
+ }
15712
+
15713
+ fragment ProductVariantPriceField on ProductVariantPrice {
15714
+ id
15715
+ createdAt
15716
+ updatedAt
15717
+ price
15718
+ currencyCode
15719
+ variantId
15720
+ }`;
15721
+
15376
15722
  export const adminAdminProductDocument = `query AdminProduct($id: ID!) {
15377
15723
  product(id: $id) {
15378
15724
  ...ProductField
@@ -17704,6 +18050,126 @@ export const adminAvailableShippingProvidersDocument = `query AvailableShippingP
17704
18050
  }
17705
18051
  }`;
17706
18052
 
18053
+ export const adminShippingGatewayRoutingRulesDocument = `query ShippingGatewayRoutingRules($stockLocationId: ID!) {
18054
+ shippingGatewayRoutingRules(stockLocationId: $stockLocationId) {
18055
+ ...ShippingGatewayRoutingRuleField
18056
+ }
18057
+ }
18058
+
18059
+ fragment ShippingGatewayRoutingRuleField on ShippingGatewayRoutingRule {
18060
+ id
18061
+ stockLocationId
18062
+ scopeType
18063
+ fulfillmentType
18064
+ providerCode
18065
+ priority
18066
+ enabled
18067
+ countries {
18068
+ id
18069
+ code
18070
+ name
18071
+ }
18072
+ flatRates {
18073
+ id
18074
+ code
18075
+ name
18076
+ amount
18077
+ currencyCode
18078
+ estimatedDays
18079
+ }
18080
+ }`;
18081
+
18082
+ export const adminCreateShippingGatewayRoutingRuleDocument = `mutation CreateShippingGatewayRoutingRule($input: CreateShippingGatewayRoutingRuleInput!) {
18083
+ createShippingGatewayRoutingRule(input: $input) {
18084
+ ...ShippingGatewayRoutingRuleField
18085
+ }
18086
+ }
18087
+
18088
+ fragment ShippingGatewayRoutingRuleField on ShippingGatewayRoutingRule {
18089
+ id
18090
+ stockLocationId
18091
+ scopeType
18092
+ fulfillmentType
18093
+ providerCode
18094
+ priority
18095
+ enabled
18096
+ countries {
18097
+ id
18098
+ code
18099
+ name
18100
+ }
18101
+ flatRates {
18102
+ id
18103
+ code
18104
+ name
18105
+ amount
18106
+ currencyCode
18107
+ estimatedDays
18108
+ }
18109
+ }`;
18110
+
18111
+ export const adminUpdateShippingGatewayRoutingRuleDocument = `mutation UpdateShippingGatewayRoutingRule($input: UpdateShippingGatewayRoutingRuleInput!) {
18112
+ updateShippingGatewayRoutingRule(input: $input) {
18113
+ ...ShippingGatewayRoutingRuleField
18114
+ }
18115
+ }
18116
+
18117
+ fragment ShippingGatewayRoutingRuleField on ShippingGatewayRoutingRule {
18118
+ id
18119
+ stockLocationId
18120
+ scopeType
18121
+ fulfillmentType
18122
+ providerCode
18123
+ priority
18124
+ enabled
18125
+ countries {
18126
+ id
18127
+ code
18128
+ name
18129
+ }
18130
+ flatRates {
18131
+ id
18132
+ code
18133
+ name
18134
+ amount
18135
+ currencyCode
18136
+ estimatedDays
18137
+ }
18138
+ }`;
18139
+
18140
+ export const adminDeleteShippingGatewayRoutingRuleDocument = `mutation DeleteShippingGatewayRoutingRule($id: ID!) {
18141
+ deleteShippingGatewayRoutingRule(id: $id)
18142
+ }`;
18143
+
18144
+ export const adminReorderShippingGatewayRoutingRulesDocument = `mutation ReorderShippingGatewayRoutingRules($input: ReorderShippingGatewayRoutingRulesInput!) {
18145
+ reorderShippingGatewayRoutingRules(input: $input) {
18146
+ ...ShippingGatewayRoutingRuleField
18147
+ }
18148
+ }
18149
+
18150
+ fragment ShippingGatewayRoutingRuleField on ShippingGatewayRoutingRule {
18151
+ id
18152
+ stockLocationId
18153
+ scopeType
18154
+ fulfillmentType
18155
+ providerCode
18156
+ priority
18157
+ enabled
18158
+ countries {
18159
+ id
18160
+ code
18161
+ name
18162
+ }
18163
+ flatRates {
18164
+ id
18165
+ code
18166
+ name
18167
+ amount
18168
+ currencyCode
18169
+ estimatedDays
18170
+ }
18171
+ }`;
18172
+
17707
18173
  export const adminStockLocationDocument = `query StockLocation($id: ID!) {
17708
18174
  stockLocation(id: $id) {
17709
18175
  ...StockLocationField
@@ -21998,6 +22464,38 @@ fragment ShopPaymentTokenField on PaymentGatewayToken {
21998
22464
  updatedAt
21999
22465
  }`;
22000
22466
 
22467
+ export const shopSetCurrencyDocument = `mutation SetCurrency($currencyCode: String!) {
22468
+ setCurrency(currencyCode: $currencyCode) {
22469
+ ...ShopChannelField
22470
+ }
22471
+ }
22472
+
22473
+ fragment ShopChannelField on Channel {
22474
+ id
22475
+ code
22476
+ defaultLanguageCode
22477
+ defaultCurrencyCode
22478
+ availableLanguageCodes
22479
+ availableCurrencyCodes
22480
+ pricesIncludeTax
22481
+ }`;
22482
+
22483
+ export const shopSetLanguageDocument = `mutation SetLanguage($languageCode: String!) {
22484
+ setLanguage(languageCode: $languageCode) {
22485
+ ...ShopChannelField
22486
+ }
22487
+ }
22488
+
22489
+ fragment ShopChannelField on Channel {
22490
+ id
22491
+ code
22492
+ defaultLanguageCode
22493
+ defaultCurrencyCode
22494
+ availableLanguageCodes
22495
+ availableCurrencyCodes
22496
+ pricesIncludeTax
22497
+ }`;
22498
+
22001
22499
  export const shopSetOrderShippingAddressDocument = `mutation SetOrderShippingAddress($input: CreateAddressInput!) {
22002
22500
  setOrderShippingAddress(input: $input) {
22003
22501
  ...ShopOrderField
@@ -0,0 +1,25 @@
1
+ export interface ExtractedError {
2
+ code: string;
3
+ variables: Record<string, string>;
4
+ classification: string;
5
+ message?: string;
6
+ }
7
+ /**
8
+ * Extract the structured error code from a ClientError.
9
+ * Returns null if the error has no GraphQL error code.
10
+ */
11
+ export declare function extractErrorCode(error: unknown): string | null;
12
+ /**
13
+ * Extract full structured error info from a ClientError.
14
+ * Returns null if the error has no GraphQL extensions.
15
+ */
16
+ export declare function extractError(error: unknown): ExtractedError | null;
17
+ /**
18
+ * Extract the localized error message from a ClientError.
19
+ * Returns null if the error has no localized message.
20
+ */
21
+ export declare function extractErrorMessage(error: unknown): string | null;
22
+ /**
23
+ * Check if an error has a specific error code.
24
+ */
25
+ export declare function isErrorCode(error: unknown, code: string): boolean;