@forgecart/sdk 1.2.6 → 1.2.7

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/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.lastValueFrom = exports.firstValueFrom = exports.Observable = exports.isErrorCode = exports.extractErrorMessage = exports.extractError = exports.extractErrorCode = exports.HookSubscriptionManager = exports.hookRespondDocument = exports.hookDispatchDocument = exports.ForgeCartPlugin = exports.SdkErrorCode = exports.SdkError = exports.ShopNamespace = exports.AdminNamespace = exports.ForgeCartGraphQLModule = exports.TransactionContext = exports.QueryObservable = exports.ClientError = exports.ForgeCartClient = exports.ForgeCartShopClient = exports.ForgeCartAdminClient = void 0;
3
+ exports.lastValueFrom = exports.firstValueFrom = exports.Observable = exports.isErrorCode = exports.extractErrorMessage = exports.extractError = exports.extractErrorCode = exports.HookSubscriptionManager = exports.hookRespondDocument = exports.hookDispatchDocument = exports.ForgeCartPlugin = exports.SdkErrorCode = exports.SdkError = exports.ShopNamespace = exports.AdminNamespace = exports.TransactionContext = exports.QueryObservable = exports.ClientError = exports.ForgeCartClient = exports.ForgeCartShopClient = exports.ForgeCartAdminClient = void 0;
4
4
  var client_generated_1 = require("./client.generated");
5
5
  Object.defineProperty(exports, "ForgeCartAdminClient", { enumerable: true, get: function () { return client_generated_1.ForgeCartAdminClient; } });
6
6
  var client_generated_2 = require("./client.generated");
@@ -11,8 +11,6 @@ Object.defineProperty(exports, "ClientError", { enumerable: true, get: function
11
11
  Object.defineProperty(exports, "QueryObservable", { enumerable: true, get: function () { return client_generated_3.QueryObservable; } });
12
12
  var client_generated_4 = require("./client.generated");
13
13
  Object.defineProperty(exports, "TransactionContext", { enumerable: true, get: function () { return client_generated_4.TransactionContext; } });
14
- var client_generated_5 = require("./client.generated");
15
- Object.defineProperty(exports, "ForgeCartGraphQLModule", { enumerable: true, get: function () { return client_generated_5.ForgeCartGraphQLModule; } });
16
14
  var admin_generated_1 = require("./admin.generated");
17
15
  Object.defineProperty(exports, "AdminNamespace", { enumerable: true, get: function () { return admin_generated_1.AdminNamespace; } });
18
16
  var shop_generated_1 = require("./shop.generated");
@@ -0,0 +1,13 @@
1
+ /**
2
+ * AUTO-GENERATED FILE — DO NOT EDIT
3
+ *
4
+ * This file was generated by @forgecart/client-sdk-generators.
5
+ * Any manual changes will be overwritten on the next generation run.
6
+ */
7
+ import { type DynamicModule } from '@nestjs/common';
8
+ import type { ForgeCartClientConfig, ForgeCartAdminClientConfig, ForgeCartShopClientConfig } from './client.generated';
9
+ export declare class ForgeCartGraphQLModule {
10
+ static forAdmin(config: ForgeCartAdminClientConfig): DynamicModule;
11
+ static forShop(config: ForgeCartShopClientConfig): DynamicModule;
12
+ static forRoot(config: ForgeCartClientConfig): DynamicModule;
13
+ }
@@ -0,0 +1,92 @@
1
+ "use strict";
2
+ /* eslint-disable */
3
+ /**
4
+ * AUTO-GENERATED FILE — DO NOT EDIT
5
+ *
6
+ * This file was generated by @forgecart/client-sdk-generators.
7
+ * Any manual changes will be overwritten on the next generation run.
8
+ */
9
+ var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
10
+ function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
11
+ var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
12
+ var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
13
+ var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
14
+ var _, done = false;
15
+ for (var i = decorators.length - 1; i >= 0; i--) {
16
+ var context = {};
17
+ for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
18
+ for (var p in contextIn.access) context.access[p] = contextIn.access[p];
19
+ context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
20
+ var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
21
+ if (kind === "accessor") {
22
+ if (result === void 0) continue;
23
+ if (result === null || typeof result !== "object") throw new TypeError("Object expected");
24
+ if (_ = accept(result.get)) descriptor.get = _;
25
+ if (_ = accept(result.set)) descriptor.set = _;
26
+ if (_ = accept(result.init)) initializers.unshift(_);
27
+ }
28
+ else if (_ = accept(result)) {
29
+ if (kind === "field") initializers.unshift(_);
30
+ else descriptor[key] = _;
31
+ }
32
+ }
33
+ if (target) Object.defineProperty(target, contextIn.name, descriptor);
34
+ done = true;
35
+ };
36
+ var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) {
37
+ var useValue = arguments.length > 2;
38
+ for (var i = 0; i < initializers.length; i++) {
39
+ value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
40
+ }
41
+ return useValue ? value : void 0;
42
+ };
43
+ Object.defineProperty(exports, "__esModule", { value: true });
44
+ exports.ForgeCartGraphQLModule = void 0;
45
+ const common_1 = require("@nestjs/common");
46
+ const client_generated_1 = require("./client.generated");
47
+ let ForgeCartGraphQLModule = (() => {
48
+ let _classDecorators = [(0, common_1.Module)({})];
49
+ let _classDescriptor;
50
+ let _classExtraInitializers = [];
51
+ let _classThis;
52
+ var ForgeCartGraphQLModule = class {
53
+ static { _classThis = this; }
54
+ static {
55
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0;
56
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
57
+ ForgeCartGraphQLModule = _classThis = _classDescriptor.value;
58
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
59
+ __runInitializers(_classThis, _classExtraInitializers);
60
+ }
61
+ static forAdmin(config) {
62
+ const client = new client_generated_1.ForgeCartAdminClient(config);
63
+ return {
64
+ module: ForgeCartGraphQLModule,
65
+ providers: [{ provide: client_generated_1.ForgeCartAdminClient, useValue: client }],
66
+ exports: [client_generated_1.ForgeCartAdminClient],
67
+ };
68
+ }
69
+ static forShop(config) {
70
+ const client = new client_generated_1.ForgeCartShopClient(config);
71
+ return {
72
+ module: ForgeCartGraphQLModule,
73
+ providers: [{ provide: client_generated_1.ForgeCartShopClient, useValue: client }],
74
+ exports: [client_generated_1.ForgeCartShopClient],
75
+ };
76
+ }
77
+ static forRoot(config) {
78
+ const client = new client_generated_1.ForgeCartClient(config);
79
+ return {
80
+ module: ForgeCartGraphQLModule,
81
+ providers: [
82
+ { provide: client_generated_1.ForgeCartClient, useValue: client },
83
+ { provide: client_generated_1.ForgeCartAdminClient, useValue: client.admin },
84
+ { provide: client_generated_1.ForgeCartShopClient, useValue: client.shop },
85
+ ],
86
+ exports: [client_generated_1.ForgeCartClient, client_generated_1.ForgeCartAdminClient, client_generated_1.ForgeCartShopClient],
87
+ };
88
+ }
89
+ };
90
+ return ForgeCartGraphQLModule = _classThis;
91
+ })();
92
+ exports.ForgeCartGraphQLModule = ForgeCartGraphQLModule;
@@ -538,6 +538,7 @@ export type Channel = {
538
538
  description: Scalars['String']['output'];
539
539
  id: Scalars['ID']['output'];
540
540
  outOfStockThreshold: Scalars['Int']['output'];
541
+ previewUrl: Scalars['String']['output'];
541
542
  pricesIncludeTax: Scalars['Boolean']['output'];
542
543
  secret?: Maybe<Scalars['String']['output']>;
543
544
  seller?: Maybe<Seller>;
@@ -1146,6 +1147,11 @@ export type EmitCustomEventInput = {
1146
1147
  hookPoint: Scalars['String']['input'];
1147
1148
  payload?: InputMaybe<Scalars['JSON']['input']>;
1148
1149
  };
1150
+ export type EnqueueChatMessageInput = {
1151
+ interrupt: Scalars['Boolean']['input'];
1152
+ message: Scalars['String']['input'];
1153
+ sessionId: Scalars['String']['input'];
1154
+ };
1149
1155
  export type Entry = {
1150
1156
  createdAt: Scalars['DateTime']['output'];
1151
1157
  fields: Array<AcfFieldValueUnion>;
@@ -2422,6 +2428,10 @@ export type RespondToHookDispatchInput = {
2422
2428
  id: Scalars['String']['input'];
2423
2429
  subscriberId: Scalars['String']['input'];
2424
2430
  };
2431
+ export type ResumeChatSessionInput = {
2432
+ afterEventId: Scalars['Int']['input'];
2433
+ sessionId: Scalars['String']['input'];
2434
+ };
2425
2435
  export type Role = {
2426
2436
  code: Scalars['String']['output'];
2427
2437
  createdAt: Scalars['DateTime']['output'];
package/dist/shop.d.ts CHANGED
@@ -16,3 +16,4 @@ export { ProductCategory } from './shop.generated';
16
16
  export { SearchCategory } from './shop.generated';
17
17
  export { ShippingCategory } from './shop.generated';
18
18
  export { SubscriptionCategory } from './shop.generated';
19
+ export type * from './shop-types.generated';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forgecart/sdk",
3
- "version": "1.2.6",
3
+ "version": "1.2.7",
4
4
  "description": "ForgeCart Client SDK",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -19,6 +19,11 @@
19
19
  "types": "./dist/shop.d.ts",
20
20
  "import": "./dist/shop.js",
21
21
  "require": "./dist/shop.js"
22
+ },
23
+ "./nest": {
24
+ "types": "./dist/nest.generated.d.ts",
25
+ "import": "./dist/nest.generated.js",
26
+ "require": "./dist/nest.generated.js"
22
27
  }
23
28
  },
24
29
  "files": [
@@ -32,6 +37,14 @@
32
37
  "rxjs": "^7.8.0",
33
38
  "ws": "^8.18.0"
34
39
  },
40
+ "peerDependencies": {
41
+ "@nestjs/common": ">=10.0.0"
42
+ },
43
+ "peerDependenciesMeta": {
44
+ "@nestjs/common": {
45
+ "optional": true
46
+ }
47
+ },
35
48
  "devDependencies": {
36
49
  "typescript": "^5.3.3"
37
50
  },
@@ -595,6 +595,7 @@ export type Channel = {
595
595
  description: Scalars['String']['output'];
596
596
  id: Scalars['ID']['output'];
597
597
  outOfStockThreshold: Scalars['Int']['output'];
598
+ previewUrl: Scalars['String']['output'];
598
599
  pricesIncludeTax: Scalars['Boolean']['output'];
599
600
  secret?: Maybe<Scalars['String']['output']>;
600
601
  seller?: Maybe<Seller>;
@@ -646,6 +647,40 @@ export type ChannelSettings = {
646
647
  taxOriginScope: Scalars['String']['output'];
647
648
  };
648
649
 
650
+ export type ChatMessage = {
651
+ content: Scalars['String']['output'];
652
+ eventId: Scalars['Int']['output'];
653
+ isFinal: Scalars['Boolean']['output'];
654
+ timestamp: Scalars['Int']['output'];
655
+ toolResult?: Maybe<ToolResultDetail>;
656
+ toolUse?: Maybe<ToolUseDetail>;
657
+ type: ChatMessageType;
658
+ };
659
+
660
+ export type ChatMessageType =
661
+ | 'COMPLETE'
662
+ | 'ERROR'
663
+ | 'TEXT'
664
+ | 'THINKING'
665
+ | 'TOOL_RESULT'
666
+ | 'TOOL_USE';
667
+
668
+ export type ChatQueueItem = {
669
+ content: Scalars['String']['output'];
670
+ id: Scalars['ID']['output'];
671
+ kind: Scalars['String']['output'];
672
+ };
673
+
674
+ export type ChatSession = {
675
+ channelToken: Scalars['String']['output'];
676
+ createdAt: Scalars['String']['output'];
677
+ lastActivity: Scalars['String']['output'];
678
+ messageCount: Scalars['Int']['output'];
679
+ sessionId: Scalars['String']['output'];
680
+ status: Scalars['String']['output'];
681
+ userId: Scalars['String']['output'];
682
+ };
683
+
649
684
  export type Collection = {
650
685
  createdAt: Scalars['DateTime']['output'];
651
686
  description?: Maybe<Scalars['String']['output']>;
@@ -1334,6 +1369,12 @@ export type EmitCustomEventInput = {
1334
1369
  payload?: InputMaybe<Scalars['JSON']['input']>;
1335
1370
  };
1336
1371
 
1372
+ export type EnqueueChatMessageInput = {
1373
+ interrupt: Scalars['Boolean']['input'];
1374
+ message: Scalars['String']['input'];
1375
+ sessionId: Scalars['String']['input'];
1376
+ };
1377
+
1337
1378
  export type Entry = {
1338
1379
  createdAt: Scalars['DateTime']['output'];
1339
1380
  fields: Array<AcfFieldValueUnion>;
@@ -1880,6 +1921,8 @@ export type Mutation = {
1880
1921
  changeFulfillmentRequestDeliveryMethod: FulfillmentRequest;
1881
1922
  changeSubscriptionPlan: BillingSubscription;
1882
1923
  changeSubscriptionQuantity: BillingSubscription;
1924
+ clearChatHistory: Scalars['Boolean']['output'];
1925
+ closeChatSession: Scalars['Boolean']['output'];
1883
1926
  commitTransaction: DeletionResponse;
1884
1927
  completeDraft: Order;
1885
1928
  completeOnboardingShop: CompleteOnboardingShopResult;
@@ -1959,6 +2002,7 @@ export type Mutation = {
1959
2002
  emit: Scalars['Boolean']['output'];
1960
2003
  enablePlugin: ChannelPlugin;
1961
2004
  enableScheduledJob: ScheduledJob;
2005
+ enqueueChatMessage: Scalars['Int']['output'];
1962
2006
  evaluateAudienceSegment: AudienceSegmentEvaluationResult;
1963
2007
  generateDeviceCode: DeviceCodeResponse;
1964
2008
  holdForQualityControl: StockMovement;
@@ -2006,6 +2050,7 @@ export type Mutation = {
2006
2050
  saveToken: PaymentGatewayToken;
2007
2051
  scaleDeployment: Deployment;
2008
2052
  selectShippingRate: Order;
2053
+ sendChatMessage: Array<ChatMessage>;
2009
2054
  setBillingAddress: Order;
2010
2055
  setConfigurationItemValue?: Maybe<Scalars['Boolean']['output']>;
2011
2056
  setCustomerForDraftOrder: Order;
@@ -2017,6 +2062,7 @@ export type Mutation = {
2017
2062
  setShippingAddress: Order;
2018
2063
  settleRefund: Refund;
2019
2064
  splitFulfillmentRequest: FulfillmentRequest;
2065
+ startChatSession: ChatSession;
2020
2066
  transitionFulfillmentToState: Fulfillment;
2021
2067
  transitionOrderToState: Order;
2022
2068
  triggerScheduledJob: ScheduledJobRun;
@@ -2199,6 +2245,16 @@ export type MutationchangeSubscriptionQuantityArgs = {
2199
2245
  };
2200
2246
 
2201
2247
 
2248
+ export type MutationclearChatHistoryArgs = {
2249
+ sessionId: Scalars['ID']['input'];
2250
+ };
2251
+
2252
+
2253
+ export type MutationcloseChatSessionArgs = {
2254
+ sessionId: Scalars['ID']['input'];
2255
+ };
2256
+
2257
+
2202
2258
  export type MutationcommitTransactionArgs = {
2203
2259
  token: Scalars['String']['input'];
2204
2260
  };
@@ -2591,6 +2647,11 @@ export type MutationenableScheduledJobArgs = {
2591
2647
  };
2592
2648
 
2593
2649
 
2650
+ export type MutationenqueueChatMessageArgs = {
2651
+ input: EnqueueChatMessageInput;
2652
+ };
2653
+
2654
+
2594
2655
  export type MutationevaluateAudienceSegmentArgs = {
2595
2656
  id: Scalars['ID']['input'];
2596
2657
  };
@@ -2816,6 +2877,11 @@ export type MutationselectShippingRateArgs = {
2816
2877
  };
2817
2878
 
2818
2879
 
2880
+ export type MutationsendChatMessageArgs = {
2881
+ input: SendChatMessageInput;
2882
+ };
2883
+
2884
+
2819
2885
  export type MutationsetBillingAddressArgs = {
2820
2886
  input: SetBillingAddressInput;
2821
2887
  };
@@ -3554,6 +3620,7 @@ export type Query = {
3554
3620
  channelPlugins: Array<ChannelPlugin>;
3555
3621
  channelSettings: ChannelSettings;
3556
3622
  channels: ChannelList;
3623
+ chatQueue: Array<ChatQueueItem>;
3557
3624
  collection?: Maybe<Collection>;
3558
3625
  collections: CollectionList;
3559
3626
  configurationItemValue?: Maybe<Scalars['JSON']['output']>;
@@ -3722,6 +3789,11 @@ export type QuerychannelsArgs = {
3722
3789
  };
3723
3790
 
3724
3791
 
3792
+ export type QuerychatQueueArgs = {
3793
+ sessionId: Scalars['ID']['input'];
3794
+ };
3795
+
3796
+
3725
3797
  export type QuerycollectionArgs = {
3726
3798
  id: Scalars['ID']['input'];
3727
3799
  };
@@ -4318,6 +4390,11 @@ export type RespondToHookDispatchInput = {
4318
4390
  subscriberId: Scalars['String']['input'];
4319
4391
  };
4320
4392
 
4393
+ export type ResumeChatSessionInput = {
4394
+ afterEventId: Scalars['Int']['input'];
4395
+ sessionId: Scalars['String']['input'];
4396
+ };
4397
+
4321
4398
  export type Role = {
4322
4399
  code: Scalars['String']['output'];
4323
4400
  createdAt: Scalars['DateTime']['output'];
@@ -4753,8 +4830,15 @@ export type StringFilter = {
4753
4830
  };
4754
4831
 
4755
4832
  export type Subscription = {
4833
+ chatMessageStream: ChatMessage;
4756
4834
  deploymentLogs: DeploymentLogEntry;
4757
4835
  hookDispatched: HookDispatchEvent;
4836
+ resumeChatSession: ChatMessage;
4837
+ };
4838
+
4839
+
4840
+ export type SubscriptionchatMessageStreamArgs = {
4841
+ input: SendChatMessageInput;
4758
4842
  };
4759
4843
 
4760
4844
 
@@ -4767,6 +4851,11 @@ export type SubscriptionhookDispatchedArgs = {
4767
4851
  hookPoints: Array<Scalars['String']['input']>;
4768
4852
  };
4769
4853
 
4854
+
4855
+ export type SubscriptionresumeChatSessionArgs = {
4856
+ input: ResumeChatSessionInput;
4857
+ };
4858
+
4770
4859
  export type SubscriptionCreditBalance = {
4771
4860
  amountCents: Scalars['Int']['output'];
4772
4861
  appliedCents: Scalars['Int']['output'];
@@ -4882,6 +4971,18 @@ export type TaxRateList = {
4882
4971
  totalItems: Scalars['Int']['output'];
4883
4972
  };
4884
4973
 
4974
+ export type ToolResultDetail = {
4975
+ isError: Scalars['Boolean']['output'];
4976
+ result: Scalars['String']['output'];
4977
+ toolId: Scalars['String']['output'];
4978
+ };
4979
+
4980
+ export type ToolUseDetail = {
4981
+ input: Scalars['String']['output'];
4982
+ toolId: Scalars['String']['output'];
4983
+ toolName: Scalars['String']['output'];
4984
+ };
4985
+
4885
4986
  export type TrackEventInput = {
4886
4987
  eventType: Scalars['String']['input'];
4887
4988
  occurredAt?: InputMaybe<Scalars['DateTime']['input']>;
@@ -7602,6 +7703,7 @@ export type ChannelFieldFragment = Pick<
7602
7703
  | 'code'
7603
7704
  | 'token'
7604
7705
  | 'secret'
7706
+ | 'previewUrl'
7605
7707
  | 'defaultLanguageCode'
7606
7708
  | 'defaultCurrencyCode'
7607
7709
  | 'availableLanguageCodes'
@@ -7628,6 +7730,7 @@ export type ChannelQuery = { channel?: Maybe<Pick<
7628
7730
  | 'code'
7629
7731
  | 'token'
7630
7732
  | 'secret'
7733
+ | 'previewUrl'
7631
7734
  | 'defaultLanguageCode'
7632
7735
  | 'defaultCurrencyCode'
7633
7736
  | 'availableLanguageCodes'
@@ -7656,6 +7759,7 @@ export type ChannelsQuery = { channels: (
7656
7759
  | 'code'
7657
7760
  | 'token'
7658
7761
  | 'secret'
7762
+ | 'previewUrl'
7659
7763
  | 'defaultLanguageCode'
7660
7764
  | 'defaultCurrencyCode'
7661
7765
  | 'availableLanguageCodes'
@@ -7683,6 +7787,7 @@ export type CreateChannelMutation = { createChannel: Pick<
7683
7787
  | 'code'
7684
7788
  | 'token'
7685
7789
  | 'secret'
7790
+ | 'previewUrl'
7686
7791
  | 'defaultLanguageCode'
7687
7792
  | 'defaultCurrencyCode'
7688
7793
  | 'availableLanguageCodes'
@@ -7709,6 +7814,7 @@ export type UpdateChannelMutation = { updateChannel: Pick<
7709
7814
  | 'code'
7710
7815
  | 'token'
7711
7816
  | 'secret'
7817
+ | 'previewUrl'
7712
7818
  | 'defaultLanguageCode'
7713
7819
  | 'defaultCurrencyCode'
7714
7820
  | 'availableLanguageCodes'
@@ -7771,6 +7877,7 @@ export type ProvisionChannelMutation = { provisionChannel: {
7771
7877
  | 'code'
7772
7878
  | 'token'
7773
7879
  | 'secret'
7880
+ | 'previewUrl'
7774
7881
  | 'defaultLanguageCode'
7775
7882
  | 'defaultCurrencyCode'
7776
7883
  | 'availableLanguageCodes'
@@ -7892,6 +7999,134 @@ export type ChannelUpdateSettingsMutation = { updateChannelSettings: (
7892
7999
  >> }
7893
8000
  ) };
7894
8001
 
8002
+ export type ChatSessionFieldFragment = Pick<
8003
+ ChatSession,
8004
+ | 'sessionId'
8005
+ | 'channelToken'
8006
+ | 'userId'
8007
+ | 'createdAt'
8008
+ | 'lastActivity'
8009
+ | 'messageCount'
8010
+ | 'status'
8011
+ >;
8012
+
8013
+ export type ChatMessageFieldFragment = (
8014
+ Pick<
8015
+ ChatMessage,
8016
+ | 'type'
8017
+ | 'content'
8018
+ | 'timestamp'
8019
+ | 'isFinal'
8020
+ | 'eventId'
8021
+ >
8022
+ & {
8023
+ toolUse?: Maybe<Pick<ToolUseDetail, 'toolId' | 'toolName' | 'input'>>,
8024
+ toolResult?: Maybe<Pick<ToolResultDetail, 'toolId' | 'result' | 'isError'>>,
8025
+ }
8026
+ );
8027
+
8028
+ export type StartChatSessionMutationVariables = Exact<{ [key: string]: never; }>;
8029
+
8030
+
8031
+ export type StartChatSessionMutation = { startChatSession: Pick<
8032
+ ChatSession,
8033
+ | 'sessionId'
8034
+ | 'channelToken'
8035
+ | 'userId'
8036
+ | 'createdAt'
8037
+ | 'lastActivity'
8038
+ | 'messageCount'
8039
+ | 'status'
8040
+ > };
8041
+
8042
+ export type SendChatMessageMutationVariables = Exact<{
8043
+ input: SendChatMessageInput;
8044
+ }>;
8045
+
8046
+
8047
+ export type SendChatMessageMutation = { sendChatMessage: Array<(
8048
+ Pick<
8049
+ ChatMessage,
8050
+ | 'type'
8051
+ | 'content'
8052
+ | 'timestamp'
8053
+ | 'isFinal'
8054
+ | 'eventId'
8055
+ >
8056
+ & {
8057
+ toolUse?: Maybe<Pick<ToolUseDetail, 'toolId' | 'toolName' | 'input'>>,
8058
+ toolResult?: Maybe<Pick<ToolResultDetail, 'toolId' | 'result' | 'isError'>>,
8059
+ }
8060
+ )> };
8061
+
8062
+ export type ChatMessageStreamSubscriptionVariables = Exact<{
8063
+ input: SendChatMessageInput;
8064
+ }>;
8065
+
8066
+
8067
+ export type ChatMessageStreamSubscription = { chatMessageStream: (
8068
+ Pick<
8069
+ ChatMessage,
8070
+ | 'type'
8071
+ | 'content'
8072
+ | 'timestamp'
8073
+ | 'isFinal'
8074
+ | 'eventId'
8075
+ >
8076
+ & {
8077
+ toolUse?: Maybe<Pick<ToolUseDetail, 'toolId' | 'toolName' | 'input'>>,
8078
+ toolResult?: Maybe<Pick<ToolResultDetail, 'toolId' | 'result' | 'isError'>>,
8079
+ }
8080
+ ) };
8081
+
8082
+ export type ResumeChatSessionSubscriptionVariables = Exact<{
8083
+ input: ResumeChatSessionInput;
8084
+ }>;
8085
+
8086
+
8087
+ export type ResumeChatSessionSubscription = { resumeChatSession: (
8088
+ Pick<
8089
+ ChatMessage,
8090
+ | 'type'
8091
+ | 'content'
8092
+ | 'timestamp'
8093
+ | 'isFinal'
8094
+ | 'eventId'
8095
+ >
8096
+ & {
8097
+ toolUse?: Maybe<Pick<ToolUseDetail, 'toolId' | 'toolName' | 'input'>>,
8098
+ toolResult?: Maybe<Pick<ToolResultDetail, 'toolId' | 'result' | 'isError'>>,
8099
+ }
8100
+ ) };
8101
+
8102
+ export type CloseChatSessionMutationVariables = Exact<{
8103
+ sessionId: Scalars['ID']['input'];
8104
+ }>;
8105
+
8106
+
8107
+ export type CloseChatSessionMutation = Pick<Mutation, 'closeChatSession'>;
8108
+
8109
+ export type ClearChatHistoryMutationVariables = Exact<{
8110
+ sessionId: Scalars['ID']['input'];
8111
+ }>;
8112
+
8113
+
8114
+ export type ClearChatHistoryMutation = Pick<Mutation, 'clearChatHistory'>;
8115
+
8116
+ export type EnqueueChatMessageMutationVariables = Exact<{
8117
+ input: EnqueueChatMessageInput;
8118
+ }>;
8119
+
8120
+
8121
+ export type EnqueueChatMessageMutation = Pick<Mutation, 'enqueueChatMessage'>;
8122
+
8123
+ export type ChatQueueQueryVariables = Exact<{
8124
+ sessionId: Scalars['ID']['input'];
8125
+ }>;
8126
+
8127
+
8128
+ export type ChatQueueQuery = { chatQueue: Array<Pick<ChatQueueItem, 'id' | 'kind' | 'content'>> };
8129
+
7895
8130
  export type CollectionTranslationFieldFragment = Pick<
7896
8131
  CollectionTranslation,
7897
8132
  | 'id'