@closerplatform/spinner-openapi 0.12.109 → 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
@@ -12408,6 +12427,15 @@ export declare const RoomsApiFetchParamCreator: (configuration?: Configuration)
12408
12427
  * @throws {RequiredError}
12409
12428
  */
12410
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;
12411
12439
  /**
12412
12440
  *
12413
12441
  * @summary Follow room
@@ -12530,6 +12558,15 @@ export declare const RoomsApiFp: (configuration?: Configuration) => {
12530
12558
  * @throws {RequiredError}
12531
12559
  */
12532
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>;
12533
12570
  /**
12534
12571
  *
12535
12572
  * @summary Follow room
@@ -12652,6 +12689,15 @@ export declare const RoomsApiFactory: (configuration?: Configuration, fetch?: Fe
12652
12689
  * @throws {RequiredError}
12653
12690
  */
12654
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>;
12655
12701
  /**
12656
12702
  *
12657
12703
  * @summary Follow room
@@ -12778,6 +12824,16 @@ export declare class RoomsApi extends BaseAPI {
12778
12824
  * @memberof RoomsApi
12779
12825
  */
12780
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>;
12781
12837
  /**
12782
12838
  *
12783
12839
  * @summary Follow room
package/dist/api.js CHANGED
@@ -12078,6 +12078,48 @@ exports.RoomsApiFetchParamCreator = function (configuration) {
12078
12078
  options: localVarRequestOptions,
12079
12079
  };
12080
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
+ },
12081
12123
  /**
12082
12124
  *
12083
12125
  * @summary Follow room
@@ -12561,6 +12603,27 @@ exports.RoomsApiFp = function (configuration) {
12561
12603
  });
12562
12604
  };
12563
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
+ },
12564
12627
  /**
12565
12628
  *
12566
12629
  * @summary Follow room
@@ -12833,6 +12896,17 @@ exports.RoomsApiFactory = function (configuration, fetch, basePath) {
12833
12896
  autoAssignConversation(body, roomId, options) {
12834
12897
  return exports.RoomsApiFp(configuration).autoAssignConversation(body, roomId, options)(fetch, basePath);
12835
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
+ },
12836
12910
  /**
12837
12911
  *
12838
12912
  * @summary Follow room
@@ -12988,6 +13062,18 @@ class RoomsApi extends BaseAPI {
12988
13062
  autoAssignConversation(body, roomId, options) {
12989
13063
  return exports.RoomsApiFp(this.configuration).autoAssignConversation(body, roomId, options)(this.fetch, this.basePath);
12990
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
+ }
12991
13077
  /**
12992
13078
  *
12993
13079
  * @summary Follow room
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@closerplatform/spinner-openapi",
3
- "version": "0.12.109",
3
+ "version": "0.12.112",
4
4
  "description": "swagger client for @closerplatform/spinner-openapi",
5
5
  "author": "Swagger Codegen Contributors",
6
6
  "keywords": [