@closerplatform/spinner-openapi 0.12.108 → 0.12.112

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/api.d.ts CHANGED
@@ -2417,6 +2417,25 @@ export declare enum EventActionEvent {
2417
2417
  ThreadOpenedAgentsUnavailable = "thread_opened_agents_unavailable",
2418
2418
  WidgetOpenedNoOpenThread = "widget_opened_no_open_thread"
2419
2419
  }
2420
+ /**
2421
+ *
2422
+ * @export
2423
+ * @interface ExternalMessageForm
2424
+ */
2425
+ export interface ExternalMessageForm {
2426
+ /**
2427
+ * Text that should be displayed in the message
2428
+ * @type {string}
2429
+ * @memberof ExternalMessageForm
2430
+ */
2431
+ text: string;
2432
+ /**
2433
+ * Any metadata that should be sent along with the message
2434
+ * @type {any}
2435
+ * @memberof ExternalMessageForm
2436
+ */
2437
+ context?: any;
2438
+ }
2420
2439
  /**
2421
2440
  *
2422
2441
  * @export
@@ -8550,10 +8569,11 @@ export declare const ConversationsApiFetchParamCreator: (configuration?: Configu
8550
8569
  * @param {number} [anyThreadClosedBefore]
8551
8570
  * @param {string} [sorting]
8552
8571
  * @param {Array<string>} [tagGroupId]
8572
+ * @param {boolean} [closed]
8553
8573
  * @param {*} [options] Override http request option.
8554
8574
  * @throws {RequiredError}
8555
8575
  */
8556
- getConversations(tab?: string, limit?: number, offset?: number, tag?: Array<string>, onlySnoozed?: boolean, assigneeId?: string, anyThreadClosedAfter?: number, anyThreadClosedBefore?: number, sorting?: string, tagGroupId?: Array<string>, options?: any): FetchArgs;
8576
+ getConversations(tab?: string, limit?: number, offset?: number, tag?: Array<string>, onlySnoozed?: boolean, assigneeId?: string, anyThreadClosedAfter?: number, anyThreadClosedBefore?: number, sorting?: string, tagGroupId?: Array<string>, closed?: boolean, options?: any): FetchArgs;
8557
8577
  /**
8558
8578
  *
8559
8579
  * @summary Get custom conversations
@@ -8582,10 +8602,11 @@ export declare const ConversationsApiFp: (configuration?: Configuration) => {
8582
8602
  * @param {number} [anyThreadClosedBefore]
8583
8603
  * @param {string} [sorting]
8584
8604
  * @param {Array<string>} [tagGroupId]
8605
+ * @param {boolean} [closed]
8585
8606
  * @param {*} [options] Override http request option.
8586
8607
  * @throws {RequiredError}
8587
8608
  */
8588
- getConversations(tab?: string, limit?: number, offset?: number, tag?: Array<string>, onlySnoozed?: boolean, assigneeId?: string, anyThreadClosedAfter?: number, anyThreadClosedBefore?: number, sorting?: string, tagGroupId?: Array<string>, options?: any): (fetch?: FetchAPI, basePath?: string) => Promise<InboxState>;
8609
+ getConversations(tab?: string, limit?: number, offset?: number, tag?: Array<string>, onlySnoozed?: boolean, assigneeId?: string, anyThreadClosedAfter?: number, anyThreadClosedBefore?: number, sorting?: string, tagGroupId?: Array<string>, closed?: boolean, options?: any): (fetch?: FetchAPI, basePath?: string) => Promise<InboxState>;
8589
8610
  /**
8590
8611
  *
8591
8612
  * @summary Get custom conversations
@@ -8614,10 +8635,11 @@ export declare const ConversationsApiFactory: (configuration?: Configuration, fe
8614
8635
  * @param {number} [anyThreadClosedBefore]
8615
8636
  * @param {string} [sorting]
8616
8637
  * @param {Array<string>} [tagGroupId]
8638
+ * @param {boolean} [closed]
8617
8639
  * @param {*} [options] Override http request option.
8618
8640
  * @throws {RequiredError}
8619
8641
  */
8620
- getConversations(tab?: string, limit?: number, offset?: number, tag?: Array<string>, onlySnoozed?: boolean, assigneeId?: string, anyThreadClosedAfter?: number, anyThreadClosedBefore?: number, sorting?: string, tagGroupId?: Array<string>, options?: any): Promise<InboxState>;
8642
+ getConversations(tab?: string, limit?: number, offset?: number, tag?: Array<string>, onlySnoozed?: boolean, assigneeId?: string, anyThreadClosedAfter?: number, anyThreadClosedBefore?: number, sorting?: string, tagGroupId?: Array<string>, closed?: boolean, options?: any): Promise<InboxState>;
8621
8643
  /**
8622
8644
  *
8623
8645
  * @summary Get custom conversations
@@ -8648,11 +8670,12 @@ export declare class ConversationsApi extends BaseAPI {
8648
8670
  * @param {number} [anyThreadClosedBefore]
8649
8671
  * @param {string} [sorting]
8650
8672
  * @param {Array<string>} [tagGroupId]
8673
+ * @param {boolean} [closed]
8651
8674
  * @param {*} [options] Override http request option.
8652
8675
  * @throws {RequiredError}
8653
8676
  * @memberof ConversationsApi
8654
8677
  */
8655
- getConversations(tab?: string, limit?: number, offset?: number, tag?: Array<string>, onlySnoozed?: boolean, assigneeId?: string, anyThreadClosedAfter?: number, anyThreadClosedBefore?: number, sorting?: string, tagGroupId?: Array<string>, options?: any): Promise<InboxState>;
8678
+ getConversations(tab?: string, limit?: number, offset?: number, tag?: Array<string>, onlySnoozed?: boolean, assigneeId?: string, anyThreadClosedAfter?: number, anyThreadClosedBefore?: number, sorting?: string, tagGroupId?: Array<string>, closed?: boolean, options?: any): Promise<InboxState>;
8656
8679
  /**
8657
8680
  *
8658
8681
  * @summary Get custom conversations
@@ -12404,6 +12427,15 @@ export declare const RoomsApiFetchParamCreator: (configuration?: Configuration)
12404
12427
  * @throws {RequiredError}
12405
12428
  */
12406
12429
  autoAssignConversation(body: AutoAssign, roomId: string, options?: any): FetchArgs;
12430
+ /**
12431
+ *
12432
+ * @summary Send external message to the given room
12433
+ * @param {ExternalMessageForm} body
12434
+ * @param {string} roomId Id of room that message should be sent to
12435
+ * @param {*} [options] Override http request option.
12436
+ * @throws {RequiredError}
12437
+ */
12438
+ createExternalMessage(body: ExternalMessageForm, roomId: string, options?: any): FetchArgs;
12407
12439
  /**
12408
12440
  *
12409
12441
  * @summary Follow room
@@ -12526,6 +12558,15 @@ export declare const RoomsApiFp: (configuration?: Configuration) => {
12526
12558
  * @throws {RequiredError}
12527
12559
  */
12528
12560
  autoAssignConversation(body: AutoAssign, roomId: string, options?: any): (fetch?: FetchAPI, basePath?: string) => Promise<Response>;
12561
+ /**
12562
+ *
12563
+ * @summary Send external message to the given room
12564
+ * @param {ExternalMessageForm} body
12565
+ * @param {string} roomId Id of room that message should be sent to
12566
+ * @param {*} [options] Override http request option.
12567
+ * @throws {RequiredError}
12568
+ */
12569
+ createExternalMessage(body: ExternalMessageForm, roomId: string, options?: any): (fetch?: FetchAPI, basePath?: string) => Promise<Response>;
12529
12570
  /**
12530
12571
  *
12531
12572
  * @summary Follow room
@@ -12648,6 +12689,15 @@ export declare const RoomsApiFactory: (configuration?: Configuration, fetch?: Fe
12648
12689
  * @throws {RequiredError}
12649
12690
  */
12650
12691
  autoAssignConversation(body: AutoAssign, roomId: string, options?: any): Promise<Response>;
12692
+ /**
12693
+ *
12694
+ * @summary Send external message to the given room
12695
+ * @param {ExternalMessageForm} body
12696
+ * @param {string} roomId Id of room that message should be sent to
12697
+ * @param {*} [options] Override http request option.
12698
+ * @throws {RequiredError}
12699
+ */
12700
+ createExternalMessage(body: ExternalMessageForm, roomId: string, options?: any): Promise<Response>;
12651
12701
  /**
12652
12702
  *
12653
12703
  * @summary Follow room
@@ -12774,6 +12824,16 @@ export declare class RoomsApi extends BaseAPI {
12774
12824
  * @memberof RoomsApi
12775
12825
  */
12776
12826
  autoAssignConversation(body: AutoAssign, roomId: string, options?: any): Promise<Response>;
12827
+ /**
12828
+ *
12829
+ * @summary Send external message to the given room
12830
+ * @param {ExternalMessageForm} body
12831
+ * @param {string} roomId Id of room that message should be sent to
12832
+ * @param {*} [options] Override http request option.
12833
+ * @throws {RequiredError}
12834
+ * @memberof RoomsApi
12835
+ */
12836
+ createExternalMessage(body: ExternalMessageForm, roomId: string, options?: any): Promise<Response>;
12777
12837
  /**
12778
12838
  *
12779
12839
  * @summary Follow room
package/dist/api.js CHANGED
@@ -3598,10 +3598,11 @@ exports.ConversationsApiFetchParamCreator = function (configuration) {
3598
3598
  * @param {number} [anyThreadClosedBefore]
3599
3599
  * @param {string} [sorting]
3600
3600
  * @param {Array<string>} [tagGroupId]
3601
+ * @param {boolean} [closed]
3601
3602
  * @param {*} [options] Override http request option.
3602
3603
  * @throws {RequiredError}
3603
3604
  */
3604
- getConversations(tab, limit, offset, tag, onlySnoozed, assigneeId, anyThreadClosedAfter, anyThreadClosedBefore, sorting, tagGroupId, options = {}) {
3605
+ getConversations(tab, limit, offset, tag, onlySnoozed, assigneeId, anyThreadClosedAfter, anyThreadClosedBefore, sorting, tagGroupId, closed, options = {}) {
3605
3606
  const localVarPath = `/conversations`;
3606
3607
  const localVarUrlObj = url.parse(localVarPath, true);
3607
3608
  const localVarRequestOptions = Object.assign({ method: 'GET' }, options);
@@ -3644,6 +3645,9 @@ exports.ConversationsApiFetchParamCreator = function (configuration) {
3644
3645
  if (tagGroupId) {
3645
3646
  localVarQueryParameter['tagGroupId'] = tagGroupId;
3646
3647
  }
3648
+ if (closed !== undefined) {
3649
+ localVarQueryParameter['closed'] = closed;
3650
+ }
3647
3651
  localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
3648
3652
  // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
3649
3653
  delete localVarUrlObj.search;
@@ -3710,11 +3714,12 @@ exports.ConversationsApiFp = function (configuration) {
3710
3714
  * @param {number} [anyThreadClosedBefore]
3711
3715
  * @param {string} [sorting]
3712
3716
  * @param {Array<string>} [tagGroupId]
3717
+ * @param {boolean} [closed]
3713
3718
  * @param {*} [options] Override http request option.
3714
3719
  * @throws {RequiredError}
3715
3720
  */
3716
- getConversations(tab, limit, offset, tag, onlySnoozed, assigneeId, anyThreadClosedAfter, anyThreadClosedBefore, sorting, tagGroupId, options) {
3717
- const localVarFetchArgs = exports.ConversationsApiFetchParamCreator(configuration).getConversations(tab, limit, offset, tag, onlySnoozed, assigneeId, anyThreadClosedAfter, anyThreadClosedBefore, sorting, tagGroupId, options);
3721
+ getConversations(tab, limit, offset, tag, onlySnoozed, assigneeId, anyThreadClosedAfter, anyThreadClosedBefore, sorting, tagGroupId, closed, options) {
3722
+ const localVarFetchArgs = exports.ConversationsApiFetchParamCreator(configuration).getConversations(tab, limit, offset, tag, onlySnoozed, assigneeId, anyThreadClosedAfter, anyThreadClosedBefore, sorting, tagGroupId, closed, options);
3718
3723
  return (fetch = isomorphicFetch, basePath = BASE_PATH) => {
3719
3724
  return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => {
3720
3725
  if (response.status >= 200 && response.status < 300) {
@@ -3768,11 +3773,12 @@ exports.ConversationsApiFactory = function (configuration, fetch, basePath) {
3768
3773
  * @param {number} [anyThreadClosedBefore]
3769
3774
  * @param {string} [sorting]
3770
3775
  * @param {Array<string>} [tagGroupId]
3776
+ * @param {boolean} [closed]
3771
3777
  * @param {*} [options] Override http request option.
3772
3778
  * @throws {RequiredError}
3773
3779
  */
3774
- getConversations(tab, limit, offset, tag, onlySnoozed, assigneeId, anyThreadClosedAfter, anyThreadClosedBefore, sorting, tagGroupId, options) {
3775
- return exports.ConversationsApiFp(configuration).getConversations(tab, limit, offset, tag, onlySnoozed, assigneeId, anyThreadClosedAfter, anyThreadClosedBefore, sorting, tagGroupId, options)(fetch, basePath);
3780
+ getConversations(tab, limit, offset, tag, onlySnoozed, assigneeId, anyThreadClosedAfter, anyThreadClosedBefore, sorting, tagGroupId, closed, options) {
3781
+ return exports.ConversationsApiFp(configuration).getConversations(tab, limit, offset, tag, onlySnoozed, assigneeId, anyThreadClosedAfter, anyThreadClosedBefore, sorting, tagGroupId, closed, options)(fetch, basePath);
3776
3782
  },
3777
3783
  /**
3778
3784
  *
@@ -3807,12 +3813,13 @@ class ConversationsApi extends BaseAPI {
3807
3813
  * @param {number} [anyThreadClosedBefore]
3808
3814
  * @param {string} [sorting]
3809
3815
  * @param {Array<string>} [tagGroupId]
3816
+ * @param {boolean} [closed]
3810
3817
  * @param {*} [options] Override http request option.
3811
3818
  * @throws {RequiredError}
3812
3819
  * @memberof ConversationsApi
3813
3820
  */
3814
- getConversations(tab, limit, offset, tag, onlySnoozed, assigneeId, anyThreadClosedAfter, anyThreadClosedBefore, sorting, tagGroupId, options) {
3815
- return exports.ConversationsApiFp(this.configuration).getConversations(tab, limit, offset, tag, onlySnoozed, assigneeId, anyThreadClosedAfter, anyThreadClosedBefore, sorting, tagGroupId, options)(this.fetch, this.basePath);
3821
+ getConversations(tab, limit, offset, tag, onlySnoozed, assigneeId, anyThreadClosedAfter, anyThreadClosedBefore, sorting, tagGroupId, closed, options) {
3822
+ return exports.ConversationsApiFp(this.configuration).getConversations(tab, limit, offset, tag, onlySnoozed, assigneeId, anyThreadClosedAfter, anyThreadClosedBefore, sorting, tagGroupId, closed, options)(this.fetch, this.basePath);
3816
3823
  }
3817
3824
  /**
3818
3825
  *
@@ -12071,6 +12078,48 @@ exports.RoomsApiFetchParamCreator = function (configuration) {
12071
12078
  options: localVarRequestOptions,
12072
12079
  };
12073
12080
  },
12081
+ /**
12082
+ *
12083
+ * @summary Send external message to the given room
12084
+ * @param {ExternalMessageForm} body
12085
+ * @param {string} roomId Id of room that message should be sent to
12086
+ * @param {*} [options] Override http request option.
12087
+ * @throws {RequiredError}
12088
+ */
12089
+ createExternalMessage(body, roomId, options = {}) {
12090
+ // verify required parameter 'body' is not null or undefined
12091
+ if (body === null || body === undefined) {
12092
+ throw new RequiredError('body', 'Required parameter body was null or undefined when calling createExternalMessage.');
12093
+ }
12094
+ // verify required parameter 'roomId' is not null or undefined
12095
+ if (roomId === null || roomId === undefined) {
12096
+ throw new RequiredError('roomId', 'Required parameter roomId was null or undefined when calling createExternalMessage.');
12097
+ }
12098
+ const localVarPath = `/rooms/{roomId}/external-messages`
12099
+ .replace(`{${"roomId"}}`, encodeURIComponent(String(roomId)));
12100
+ const localVarUrlObj = url.parse(localVarPath, true);
12101
+ const localVarRequestOptions = Object.assign({ method: 'POST' }, options);
12102
+ const localVarHeaderParameter = {};
12103
+ const localVarQueryParameter = {};
12104
+ // authentication apiKey required
12105
+ if (configuration && configuration.apiKey) {
12106
+ const localVarApiKeyValue = typeof configuration.apiKey === 'function'
12107
+ ? configuration.apiKey("X-Api-Key")
12108
+ : configuration.apiKey;
12109
+ localVarHeaderParameter["X-Api-Key"] = localVarApiKeyValue;
12110
+ }
12111
+ localVarHeaderParameter['Content-Type'] = 'application/json';
12112
+ localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
12113
+ // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
12114
+ delete localVarUrlObj.search;
12115
+ localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
12116
+ const needsSerialization = ("ExternalMessageForm" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
12117
+ localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : (body || "");
12118
+ return {
12119
+ url: url.format(localVarUrlObj),
12120
+ options: localVarRequestOptions,
12121
+ };
12122
+ },
12074
12123
  /**
12075
12124
  *
12076
12125
  * @summary Follow room
@@ -12554,6 +12603,27 @@ exports.RoomsApiFp = function (configuration) {
12554
12603
  });
12555
12604
  };
12556
12605
  },
12606
+ /**
12607
+ *
12608
+ * @summary Send external message to the given room
12609
+ * @param {ExternalMessageForm} body
12610
+ * @param {string} roomId Id of room that message should be sent to
12611
+ * @param {*} [options] Override http request option.
12612
+ * @throws {RequiredError}
12613
+ */
12614
+ createExternalMessage(body, roomId, options) {
12615
+ const localVarFetchArgs = exports.RoomsApiFetchParamCreator(configuration).createExternalMessage(body, roomId, options);
12616
+ return (fetch = isomorphicFetch, basePath = BASE_PATH) => {
12617
+ return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => {
12618
+ if (response.status >= 200 && response.status < 300) {
12619
+ return response;
12620
+ }
12621
+ else {
12622
+ throw response;
12623
+ }
12624
+ });
12625
+ };
12626
+ },
12557
12627
  /**
12558
12628
  *
12559
12629
  * @summary Follow room
@@ -12826,6 +12896,17 @@ exports.RoomsApiFactory = function (configuration, fetch, basePath) {
12826
12896
  autoAssignConversation(body, roomId, options) {
12827
12897
  return exports.RoomsApiFp(configuration).autoAssignConversation(body, roomId, options)(fetch, basePath);
12828
12898
  },
12899
+ /**
12900
+ *
12901
+ * @summary Send external message to the given room
12902
+ * @param {ExternalMessageForm} body
12903
+ * @param {string} roomId Id of room that message should be sent to
12904
+ * @param {*} [options] Override http request option.
12905
+ * @throws {RequiredError}
12906
+ */
12907
+ createExternalMessage(body, roomId, options) {
12908
+ return exports.RoomsApiFp(configuration).createExternalMessage(body, roomId, options)(fetch, basePath);
12909
+ },
12829
12910
  /**
12830
12911
  *
12831
12912
  * @summary Follow room
@@ -12981,6 +13062,18 @@ class RoomsApi extends BaseAPI {
12981
13062
  autoAssignConversation(body, roomId, options) {
12982
13063
  return exports.RoomsApiFp(this.configuration).autoAssignConversation(body, roomId, options)(this.fetch, this.basePath);
12983
13064
  }
13065
+ /**
13066
+ *
13067
+ * @summary Send external message to the given room
13068
+ * @param {ExternalMessageForm} body
13069
+ * @param {string} roomId Id of room that message should be sent to
13070
+ * @param {*} [options] Override http request option.
13071
+ * @throws {RequiredError}
13072
+ * @memberof RoomsApi
13073
+ */
13074
+ createExternalMessage(body, roomId, options) {
13075
+ return exports.RoomsApiFp(this.configuration).createExternalMessage(body, roomId, options)(this.fetch, this.basePath);
13076
+ }
12984
13077
  /**
12985
13078
  *
12986
13079
  * @summary Follow room
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@closerplatform/spinner-openapi",
3
- "version": "0.12.108",
3
+ "version": "0.12.112",
4
4
  "description": "swagger client for @closerplatform/spinner-openapi",
5
5
  "author": "Swagger Codegen Contributors",
6
6
  "keywords": [