@droz-js/sdk 0.9.16 → 0.9.18

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@droz-js/sdk",
3
3
  "description": "Droz SDK",
4
- "version": "0.9.16",
4
+ "version": "0.9.18",
5
5
  "private": false,
6
6
  "exports": {
7
7
  ".": "./src/index.js",
@@ -5,6 +5,7 @@ declare const ChatWidgetWs_base: new () => {
5
5
  } & {
6
6
  getChatWidget(variables: import("./sdks/chatwidget").Exact<{
7
7
  id: import("./sdks/chatwidget").Scalars["ID"]["input"];
8
+ stylesOnly?: import("./sdks/chatwidget").InputMaybe<import("./sdks/chatwidget").Scalars["Boolean"]["input"]>;
8
9
  }>, options?: unknown): Promise<import("./sdks/chatwidget").GetChatWidgetQuery>;
9
10
  listChatWidgets(variables?: import("./sdks/chatwidget").Exact<{
10
11
  [key: string]: never;
@@ -8,6 +8,7 @@ declare const ChatWidget_base: new (options?: import("./client/http").HttpClient
8
8
  } & {
9
9
  getChatWidget(variables: import("./sdks/chatwidget").Exact<{
10
10
  id: import("./sdks/chatwidget").Scalars["ID"]["input"];
11
+ stylesOnly?: import("./sdks/chatwidget").InputMaybe<import("./sdks/chatwidget").Scalars["Boolean"]["input"]>;
11
12
  }>, options?: unknown): Promise<import("./sdks/chatwidget").GetChatWidgetQuery>;
12
13
  listChatWidgets(variables?: import("./sdks/chatwidget").Exact<{
13
14
  [key: string]: never;
@@ -139,9 +139,19 @@ export declare enum Can {
139
139
  Write = "write"
140
140
  }
141
141
  export type ChatWidget = {
142
+ allowedDomains: Array<Scalars['String']['output']>;
143
+ avatarUrl: Scalars['String']['output'];
144
+ buttonsBorderRadius: Scalars['String']['output'];
142
145
  createdAt: Scalars['DateTime']['output'];
143
146
  drn: Scalars['DRN']['output'];
147
+ fontFamily: Scalars['String']['output'];
148
+ fontSize: Scalars['String']['output'];
149
+ headerBorderRadius: Scalars['String']['output'];
150
+ headerTitle: Scalars['String']['output'];
151
+ iconButtonUrl: Scalars['String']['output'];
144
152
  id: Scalars['ID']['output'];
153
+ mainColor: Scalars['String']['output'];
154
+ messagesBorderRadius: Scalars['String']['output'];
145
155
  name: Scalars['String']['output'];
146
156
  updatedAt: Scalars['DateTime']['output'];
147
157
  };
@@ -179,6 +189,16 @@ export type CloseChatWidgetSessionInput = {
179
189
  sessionId: Scalars['ID']['input'];
180
190
  };
181
191
  export type CreateChatWidgetInput = {
192
+ allowedDomains: Array<InputMaybe<Scalars['String']['input']>>;
193
+ avatarUrl: Scalars['String']['input'];
194
+ buttonsBorderRadius: Scalars['String']['input'];
195
+ fontFamily: Scalars['String']['input'];
196
+ fontSize: Scalars['String']['input'];
197
+ headerBorderRadius: Scalars['String']['input'];
198
+ headerTitle: Scalars['String']['input'];
199
+ iconButtonUrl: Scalars['String']['input'];
200
+ mainColor: Scalars['String']['input'];
201
+ messagesBorderRadius: Scalars['String']['input'];
182
202
  name: Scalars['String']['input'];
183
203
  };
184
204
  export type I18nText = {
@@ -248,6 +268,7 @@ export type Query = {
248
268
  };
249
269
  export type QueryGetChatWidgetArgs = {
250
270
  id: Scalars['ID']['input'];
271
+ stylesOnly?: InputMaybe<Scalars['Boolean']['input']>;
251
272
  };
252
273
  export type RemoveChatWidgetInput = {
253
274
  id: Scalars['ID']['input'];
@@ -329,18 +350,30 @@ export declare enum Typenames {
329
350
  GraphqlSubscriptions = "GraphqlSubscriptions"
330
351
  }
331
352
  export type UpdateChatWidgetInput = {
353
+ allowedDomains?: InputMaybe<Array<InputMaybe<Scalars['String']['input']>>>;
354
+ avatarUrl?: InputMaybe<Scalars['String']['input']>;
355
+ buttonsBorderRadius?: InputMaybe<Scalars['String']['input']>;
356
+ fontFamily?: InputMaybe<Scalars['String']['input']>;
357
+ fontSize?: InputMaybe<Scalars['String']['input']>;
358
+ headerBorderRadius?: InputMaybe<Scalars['String']['input']>;
359
+ headerTitle?: InputMaybe<Scalars['String']['input']>;
360
+ iconButtonUrl?: InputMaybe<Scalars['String']['input']>;
332
361
  id: Scalars['ID']['input'];
333
- name: Scalars['String']['input'];
362
+ mainColor?: InputMaybe<Scalars['String']['input']>;
363
+ messagesBorderRadius?: InputMaybe<Scalars['String']['input']>;
364
+ name?: InputMaybe<Scalars['String']['input']>;
334
365
  };
335
- export type ChatWidgetFragment = Pick<ChatWidget, 'id' | 'name' | 'drn' | 'createdAt' | 'updatedAt'>;
366
+ export type ChatWidgetFragment = Pick<ChatWidget, 'id' | 'name' | 'allowedDomains' | 'drn' | 'createdAt' | 'updatedAt'>;
367
+ export type ChatWidgetStylingFragment = Pick<ChatWidget, 'headerTitle' | 'mainColor' | 'fontSize' | 'fontFamily' | 'buttonsBorderRadius' | 'headerBorderRadius' | 'messagesBorderRadius' | 'avatarUrl' | 'iconButtonUrl'>;
336
368
  export type ChatWidgetMessageFragment = (Pick<ChatWidgetMessage, 'id' | 'type' | 'sessionClosed'> & {
337
369
  payload: Array<Pick<ChatWidgetMessagePayload, 'from' | 'to' | 'channelId' | 'contentType' | 'content' | 'filename'>>;
338
370
  });
339
371
  export type GetChatWidgetQueryVariables = Exact<{
340
372
  id: Scalars['ID']['input'];
373
+ stylesOnly?: InputMaybe<Scalars['Boolean']['input']>;
341
374
  }>;
342
375
  export type GetChatWidgetQuery = {
343
- getChatWidget?: Maybe<ChatWidgetFragment>;
376
+ getChatWidget?: Maybe<(ChatWidgetFragment & ChatWidgetStylingFragment)>;
344
377
  };
345
378
  export type ListChatWidgetsQueryVariables = Exact<{
346
379
  [key: string]: never;
@@ -388,13 +421,14 @@ export type OnChatWidgetMessageSubscriptionVariables = Exact<{
388
421
  export type OnChatWidgetMessageSubscription = {
389
422
  onChatWidgetMessage: ChatWidgetMessageFragment;
390
423
  };
391
- export declare const ChatWidgetFragmentDoc = "\n fragment chatWidget on ChatWidget {\n id\n name\n drn\n createdAt\n updatedAt\n}\n ";
424
+ export declare const ChatWidgetFragmentDoc = "\n fragment chatWidget on ChatWidget {\n id\n name\n allowedDomains\n drn\n createdAt\n updatedAt\n}\n ";
425
+ export declare const ChatWidgetStylingFragmentDoc = "\n fragment chatWidgetStyling on ChatWidget {\n headerTitle\n mainColor\n fontSize\n fontFamily\n buttonsBorderRadius\n headerBorderRadius\n messagesBorderRadius\n avatarUrl\n iconButtonUrl\n}\n ";
392
426
  export declare const ChatWidgetMessageFragmentDoc = "\n fragment chatWidgetMessage on ChatWidgetMessage {\n id\n type\n sessionClosed\n payload {\n from\n to\n channelId\n contentType\n content\n filename\n }\n}\n ";
393
- export declare const GetChatWidgetDocument = "\n query getChatWidget($id: ID!) {\n getChatWidget(id: $id) {\n ...chatWidget\n }\n}\n \n fragment chatWidget on ChatWidget {\n id\n name\n drn\n createdAt\n updatedAt\n}\n ";
394
- export declare const ListChatWidgetsDocument = "\n query listChatWidgets {\n listChatWidgets {\n ...chatWidget\n }\n}\n \n fragment chatWidget on ChatWidget {\n id\n name\n drn\n createdAt\n updatedAt\n}\n ";
395
- export declare const CreateChatWidgetDocument = "\n mutation createChatWidget($input: CreateChatWidgetInput!) {\n createChatWidget(input: $input) {\n ...chatWidget\n }\n}\n \n fragment chatWidget on ChatWidget {\n id\n name\n drn\n createdAt\n updatedAt\n}\n ";
396
- export declare const UpdateChatWidgetDocument = "\n mutation updateChatWidget($input: UpdateChatWidgetInput!) {\n updateChatWidget(input: $input) {\n ...chatWidget\n }\n}\n \n fragment chatWidget on ChatWidget {\n id\n name\n drn\n createdAt\n updatedAt\n}\n ";
397
- export declare const RemoveChatWidgetDocument = "\n mutation removeChatWidget($input: RemoveChatWidgetInput!) {\n removeChatWidget(input: $input) {\n ...chatWidget\n }\n}\n \n fragment chatWidget on ChatWidget {\n id\n name\n drn\n createdAt\n updatedAt\n}\n ";
427
+ export declare const GetChatWidgetDocument = "\n query getChatWidget($id: ID!, $stylesOnly: Boolean = false) {\n getChatWidget(id: $id) {\n ...chatWidget @skip(if: $stylesOnly)\n ...chatWidgetStyling\n }\n}\n \n fragment chatWidget on ChatWidget {\n id\n name\n allowedDomains\n drn\n createdAt\n updatedAt\n}\n \n\n fragment chatWidgetStyling on ChatWidget {\n headerTitle\n mainColor\n fontSize\n fontFamily\n buttonsBorderRadius\n headerBorderRadius\n messagesBorderRadius\n avatarUrl\n iconButtonUrl\n}\n ";
428
+ export declare const ListChatWidgetsDocument = "\n query listChatWidgets {\n listChatWidgets {\n ...chatWidget\n }\n}\n \n fragment chatWidget on ChatWidget {\n id\n name\n allowedDomains\n drn\n createdAt\n updatedAt\n}\n ";
429
+ export declare const CreateChatWidgetDocument = "\n mutation createChatWidget($input: CreateChatWidgetInput!) {\n createChatWidget(input: $input) {\n ...chatWidget\n }\n}\n \n fragment chatWidget on ChatWidget {\n id\n name\n allowedDomains\n drn\n createdAt\n updatedAt\n}\n ";
430
+ export declare const UpdateChatWidgetDocument = "\n mutation updateChatWidget($input: UpdateChatWidgetInput!) {\n updateChatWidget(input: $input) {\n ...chatWidget\n }\n}\n \n fragment chatWidget on ChatWidget {\n id\n name\n allowedDomains\n drn\n createdAt\n updatedAt\n}\n ";
431
+ export declare const RemoveChatWidgetDocument = "\n mutation removeChatWidget($input: RemoveChatWidgetInput!) {\n removeChatWidget(input: $input) {\n ...chatWidget\n }\n}\n \n fragment chatWidget on ChatWidget {\n id\n name\n allowedDomains\n drn\n createdAt\n updatedAt\n}\n ";
398
432
  export declare const StartChatWidgetSessionDocument = "\n mutation startChatWidgetSession($input: StartChatWidgetSessionInput!) {\n startChatWidgetSession(input: $input) {\n id\n }\n}\n ";
399
433
  export declare const SendMessageToChatWidgetDocument = "\n mutation sendMessageToChatWidget($input: SendMessageToChatWidgetInput!) {\n sendMessageToChatWidget(input: $input) {\n ...chatWidgetMessage\n }\n}\n \n fragment chatWidgetMessage on ChatWidgetMessage {\n id\n type\n sessionClosed\n payload {\n from\n to\n channelId\n contentType\n content\n filename\n }\n}\n ";
400
434
  export declare const CloseChatWidgetSessionDocument = "\n mutation closeChatWidgetSession($input: CloseChatWidgetSessionInput!) {\n closeChatWidgetSession(input: $input)\n}\n ";
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  /* istanbul ignore file */
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.serviceName = exports.OnChatWidgetMessageDocument = exports.CloseChatWidgetSessionDocument = exports.SendMessageToChatWidgetDocument = exports.StartChatWidgetSessionDocument = exports.RemoveChatWidgetDocument = exports.UpdateChatWidgetDocument = exports.CreateChatWidgetDocument = exports.ListChatWidgetsDocument = exports.GetChatWidgetDocument = exports.ChatWidgetMessageFragmentDoc = exports.ChatWidgetFragmentDoc = exports.Typenames = exports.SubscriptionAction = exports.Can = exports.AppInstanceStatus = void 0;
4
+ exports.serviceName = exports.OnChatWidgetMessageDocument = exports.CloseChatWidgetSessionDocument = exports.SendMessageToChatWidgetDocument = exports.StartChatWidgetSessionDocument = exports.RemoveChatWidgetDocument = exports.UpdateChatWidgetDocument = exports.CreateChatWidgetDocument = exports.ListChatWidgetsDocument = exports.GetChatWidgetDocument = exports.ChatWidgetMessageFragmentDoc = exports.ChatWidgetStylingFragmentDoc = exports.ChatWidgetFragmentDoc = exports.Typenames = exports.SubscriptionAction = exports.Can = exports.AppInstanceStatus = void 0;
5
5
  exports.getSdk = getSdk;
6
6
  var AppInstanceStatus;
7
7
  (function (AppInstanceStatus) {
@@ -34,11 +34,25 @@ exports.ChatWidgetFragmentDoc = `
34
34
  fragment chatWidget on ChatWidget {
35
35
  id
36
36
  name
37
+ allowedDomains
37
38
  drn
38
39
  createdAt
39
40
  updatedAt
40
41
  }
41
42
  `;
43
+ exports.ChatWidgetStylingFragmentDoc = `
44
+ fragment chatWidgetStyling on ChatWidget {
45
+ headerTitle
46
+ mainColor
47
+ fontSize
48
+ fontFamily
49
+ buttonsBorderRadius
50
+ headerBorderRadius
51
+ messagesBorderRadius
52
+ avatarUrl
53
+ iconButtonUrl
54
+ }
55
+ `;
42
56
  exports.ChatWidgetMessageFragmentDoc = `
43
57
  fragment chatWidgetMessage on ChatWidgetMessage {
44
58
  id
@@ -55,12 +69,14 @@ exports.ChatWidgetMessageFragmentDoc = `
55
69
  }
56
70
  `;
57
71
  exports.GetChatWidgetDocument = `
58
- query getChatWidget($id: ID!) {
72
+ query getChatWidget($id: ID!, $stylesOnly: Boolean = false) {
59
73
  getChatWidget(id: $id) {
60
- ...chatWidget
74
+ ...chatWidget @skip(if: $stylesOnly)
75
+ ...chatWidgetStyling
61
76
  }
62
77
  }
63
- ${exports.ChatWidgetFragmentDoc}`;
78
+ ${exports.ChatWidgetFragmentDoc}
79
+ ${exports.ChatWidgetStylingFragmentDoc}`;
64
80
  exports.ListChatWidgetsDocument = `
65
81
  query listChatWidgets {
66
82
  listChatWidgets {
@@ -2160,7 +2160,6 @@ export type QueryPoliciesArgs = {
2160
2160
  useCache?: InputMaybe<Scalars['Boolean']['input']>;
2161
2161
  };
2162
2162
  export type QueryQueryByLabelsArgs = {
2163
- recompute?: InputMaybe<Scalars['Boolean']['input']>;
2164
2163
  text: Scalars['String']['input'];
2165
2164
  };
2166
2165
  export type QueryQueryPermissionsArgs = {
@@ -2309,10 +2308,8 @@ export type QueryByLabelResponse = {
2309
2308
  docs?: Maybe<Array<Doc>>;
2310
2309
  label: Scalars['String']['output'];
2311
2310
  score: Scalars['Float']['output'];
2312
- sourceId: Scalars['ID']['output'];
2313
2311
  };
2314
2312
  export type QueryByLabelsResponse = {
2315
- cached: Scalars['Boolean']['output'];
2316
2313
  labels?: Maybe<Array<QueryByLabelResponse>>;
2317
2314
  };
2318
2315
  export type Quiz = {
@@ -4465,11 +4462,11 @@ export type QueryByLabelsQueryVariables = Exact<{
4465
4462
  recompute?: InputMaybe<Scalars['Boolean']['input']>;
4466
4463
  }>;
4467
4464
  export type QueryByLabelsQuery = {
4468
- queryByLabels?: Maybe<(Pick<QueryByLabelsResponse, 'cached'> & {
4469
- labels?: Maybe<Array<(Pick<QueryByLabelResponse, 'label' | 'score' | 'sourceId'> & {
4465
+ queryByLabels?: Maybe<{
4466
+ labels?: Maybe<Array<(Pick<QueryByLabelResponse, 'label' | 'score'> & {
4470
4467
  docs?: Maybe<Array<DocFragment>>;
4471
4468
  })>>;
4472
- })>;
4469
+ }>;
4473
4470
  };
4474
4471
  export type GetGifsQueryVariables = Exact<{
4475
4472
  query: Scalars['String']['input'];
@@ -5437,7 +5434,7 @@ export declare const UpdateIntegrationConfigDocument = "\n mutation updateInt
5437
5434
  export declare const RemoveIntegrationConfigDocument = "\n mutation removeIntegrationConfig($input: RemoveIntegrationConfigInput!) {\n removeIntegrationConfig(input: $input) {\n ...integration\n }\n}\n \n fragment integration on IntegrationConfig {\n id\n type\n title\n description\n url\n active\n status\n username\n automatedUpsert\n automatedRemoval\n}\n ";
5438
5435
  export declare const MigrateDocument = "\n mutation migrate($input: MigrateInput!) {\n migrate(input: $input)\n}\n ";
5439
5436
  export declare const UpdateZendeskArticleDocument = "\n mutation updateZendeskArticle($input: UpdateZendeskArticleInput!) {\n updateZendeskArticle(input: $input)\n}\n ";
5440
- export declare const QueryByLabelsDocument = "\n query queryByLabels($text: String!, $recompute: Boolean) {\n queryByLabels(text: $text, recompute: $recompute) {\n cached\n labels {\n label\n score\n docs {\n ...doc\n }\n sourceId\n }\n }\n}\n \n fragment doc on Doc {\n ...docWithoutContent\n content\n}\n \n\n fragment docWithoutContent on Doc {\n id\n version\n typename\n origin\n identifier\n prefixCode\n title\n slug\n tags\n entities\n createdAt\n updatedAt\n ttl\n thumbnailUrl\n toc\n showToc\n features\n references\n views\n parent {\n ...record\n }\n authors {\n ...userInfo\n }\n}\n \n\n fragment record on Record {\n id\n slug\n title\n trail\n typename\n color\n thumbnailUrl\n downloadUrl\n origin\n identifier\n createdAt\n updatedAt\n status\n}\n \n\n fragment userInfo on UserInfo {\n username\n name\n picture\n enabled\n bio\n department\n}\n ";
5437
+ export declare const QueryByLabelsDocument = "\n query queryByLabels($text: String!, $recompute: Boolean) {\n queryByLabels(text: $text) {\n labels {\n label\n score\n docs {\n ...doc\n }\n }\n }\n}\n \n fragment doc on Doc {\n ...docWithoutContent\n content\n}\n \n\n fragment docWithoutContent on Doc {\n id\n version\n typename\n origin\n identifier\n prefixCode\n title\n slug\n tags\n entities\n createdAt\n updatedAt\n ttl\n thumbnailUrl\n toc\n showToc\n features\n references\n views\n parent {\n ...record\n }\n authors {\n ...userInfo\n }\n}\n \n\n fragment record on Record {\n id\n slug\n title\n trail\n typename\n color\n thumbnailUrl\n downloadUrl\n origin\n identifier\n createdAt\n updatedAt\n status\n}\n \n\n fragment userInfo on UserInfo {\n username\n name\n picture\n enabled\n bio\n department\n}\n ";
5441
5438
  export declare const GetGifsDocument = "\n query getGifs($query: String!, $limit: Int, $offset: Int) {\n gifs(query: $query, limit: $limit, offset: $offset) {\n id\n url\n }\n}\n ";
5442
5439
  export declare const GetIconsDocument = "\n query getIcons($query: String!, $limit: Int, $offset: Int) {\n icons(query: $query, limit: $limit, offset: $offset) {\n id\n url\n }\n}\n ";
5443
5440
  export declare const GetWebArticleDocument = "\n query getWebArticle($url: String!) {\n webArticle(url: $url) {\n id\n title\n content\n text\n }\n}\n ";
@@ -3332,15 +3332,13 @@ exports.UpdateZendeskArticleDocument = `
3332
3332
  `;
3333
3333
  exports.QueryByLabelsDocument = `
3334
3334
  query queryByLabels($text: String!, $recompute: Boolean) {
3335
- queryByLabels(text: $text, recompute: $recompute) {
3336
- cached
3335
+ queryByLabels(text: $text) {
3337
3336
  labels {
3338
3337
  label
3339
3338
  score
3340
3339
  docs {
3341
3340
  ...doc
3342
3341
  }
3343
- sourceId
3344
3342
  }
3345
3343
  }
3346
3344
  }
@@ -906,6 +906,7 @@ export type SessionContext = {
906
906
  export type SessionContextInput = {
907
907
  country?: InputMaybe<Scalars['CountryCode']['input']>;
908
908
  currency?: InputMaybe<Scalars['Currency']['input']>;
909
+ headers?: InputMaybe<Scalars['JSON']['input']>;
909
910
  ipAddress?: InputMaybe<Scalars['IPAddress']['input']>;
910
911
  locale?: InputMaybe<Scalars['Locale']['input']>;
911
912
  platform?: InputMaybe<Scalars['String']['input']>;