@libgot/whatsapp-bridge-sdk 1.0.4 → 1.0.6
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/README.md +2 -2
- package/api.ts +1 -0
- package/apis/chats-api.ts +117 -0
- package/apis/default-api.ts +0 -62
- package/dist/api.d.ts +1 -0
- package/dist/api.js +7 -2
- package/dist/apis/auth-api.js +51 -25
- package/dist/apis/chats-api.d.ts +66 -0
- package/dist/apis/chats-api.js +221 -0
- package/dist/apis/contacts-api.js +31 -13
- package/dist/apis/default-api.d.ts +0 -25
- package/dist/apis/default-api.js +31 -97
- package/dist/apis/healthchecks-api.js +41 -19
- package/dist/apis/messages-api.js +31 -13
- package/dist/apis/users-api.js +73 -39
- package/dist/base.js +3 -1
- package/dist/index.js +6 -2
- package/dist/models/chats-response-dto.d.ts +25 -0
- package/dist/models/chats-response-dto.js +15 -0
- package/dist/models/index.d.ts +2 -0
- package/dist/models/index.js +8 -2
- package/dist/models/whatsapp-chat-dto.d.ts +55 -0
- package/dist/models/whatsapp-chat-dto.js +15 -0
- package/dist/models/whatsapp-message-dto.d.ts +1 -1
- package/models/chats-response-dto.ts +29 -0
- package/models/index.ts +2 -0
- package/models/whatsapp-chat-dto.ts +64 -0
- package/models/whatsapp-message-dto.ts +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* whatsapp-bridge Node Api
|
|
6
|
+
* The whatsapp-bridge API description
|
|
7
|
+
*
|
|
8
|
+
* OpenAPI spec version: 0.0.1
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by the swagger code generator program.
|
|
12
|
+
* https://github.com/swagger-api/swagger-codegen.git
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
var __extends = (this && this.__extends) || (function () {
|
|
16
|
+
var extendStatics = function (d, b) {
|
|
17
|
+
extendStatics = Object.setPrototypeOf ||
|
|
18
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
19
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
20
|
+
return extendStatics(d, b);
|
|
21
|
+
};
|
|
22
|
+
return function (d, b) {
|
|
23
|
+
if (typeof b !== "function" && b !== null)
|
|
24
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
25
|
+
extendStatics(d, b);
|
|
26
|
+
function __() { this.constructor = d; }
|
|
27
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
28
|
+
};
|
|
29
|
+
})();
|
|
30
|
+
var __assign = (this && this.__assign) || function () {
|
|
31
|
+
__assign = Object.assign || function(t) {
|
|
32
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
33
|
+
s = arguments[i];
|
|
34
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
35
|
+
t[p] = s[p];
|
|
36
|
+
}
|
|
37
|
+
return t;
|
|
38
|
+
};
|
|
39
|
+
return __assign.apply(this, arguments);
|
|
40
|
+
};
|
|
41
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
42
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
43
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
44
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
45
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
46
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
47
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
48
|
+
});
|
|
49
|
+
};
|
|
50
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
51
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
52
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
53
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
54
|
+
function step(op) {
|
|
55
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
56
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
57
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
58
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
59
|
+
switch (op[0]) {
|
|
60
|
+
case 0: case 1: t = op; break;
|
|
61
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
62
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
63
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
64
|
+
default:
|
|
65
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
66
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
67
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
68
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
69
|
+
if (t[2]) _.ops.pop();
|
|
70
|
+
_.trys.pop(); continue;
|
|
71
|
+
}
|
|
72
|
+
op = body.call(thisArg, _);
|
|
73
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
74
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
78
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
79
|
+
if (ar || !(i in from)) {
|
|
80
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
81
|
+
ar[i] = from[i];
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
85
|
+
};
|
|
86
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
87
|
+
exports.ChatsApi = exports.ChatsApiFactory = exports.ChatsApiFp = exports.ChatsApiAxiosParamCreator = void 0;
|
|
88
|
+
var axios_1 = require("axios");
|
|
89
|
+
// Some imports not used depending on template conditions
|
|
90
|
+
// @ts-ignore
|
|
91
|
+
var base_1 = require("../base");
|
|
92
|
+
/**
|
|
93
|
+
* ChatsApi - axios parameter creator
|
|
94
|
+
* @export
|
|
95
|
+
*/
|
|
96
|
+
var ChatsApiAxiosParamCreator = function (configuration) {
|
|
97
|
+
var _this = this;
|
|
98
|
+
return {
|
|
99
|
+
/**
|
|
100
|
+
*
|
|
101
|
+
* @param {*} [options] Override http request option.
|
|
102
|
+
* @throws {RequiredError}
|
|
103
|
+
*/
|
|
104
|
+
getChats: function () {
|
|
105
|
+
var args_1 = [];
|
|
106
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
107
|
+
args_1[_i] = arguments[_i];
|
|
108
|
+
}
|
|
109
|
+
return __awaiter(_this, __spreadArray([], args_1, true), void 0, function (options) {
|
|
110
|
+
var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, query, key, key, headersFromBaseOptions;
|
|
111
|
+
if (options === void 0) { options = {}; }
|
|
112
|
+
return __generator(this, function (_a) {
|
|
113
|
+
localVarPath = "/api/chats";
|
|
114
|
+
localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
115
|
+
if (configuration) {
|
|
116
|
+
baseOptions = configuration.baseOptions;
|
|
117
|
+
}
|
|
118
|
+
localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
|
|
119
|
+
localVarHeaderParameter = {};
|
|
120
|
+
localVarQueryParameter = {};
|
|
121
|
+
query = new URLSearchParams(localVarUrlObj.search);
|
|
122
|
+
for (key in localVarQueryParameter) {
|
|
123
|
+
query.set(key, localVarQueryParameter[key]);
|
|
124
|
+
}
|
|
125
|
+
for (key in options.params) {
|
|
126
|
+
query.set(key, options.params[key]);
|
|
127
|
+
}
|
|
128
|
+
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
129
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
130
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
131
|
+
return [2 /*return*/, {
|
|
132
|
+
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
133
|
+
options: localVarRequestOptions,
|
|
134
|
+
}];
|
|
135
|
+
});
|
|
136
|
+
});
|
|
137
|
+
},
|
|
138
|
+
};
|
|
139
|
+
};
|
|
140
|
+
exports.ChatsApiAxiosParamCreator = ChatsApiAxiosParamCreator;
|
|
141
|
+
/**
|
|
142
|
+
* ChatsApi - functional programming interface
|
|
143
|
+
* @export
|
|
144
|
+
*/
|
|
145
|
+
var ChatsApiFp = function (configuration) {
|
|
146
|
+
return {
|
|
147
|
+
/**
|
|
148
|
+
*
|
|
149
|
+
* @param {*} [options] Override http request option.
|
|
150
|
+
* @throws {RequiredError}
|
|
151
|
+
*/
|
|
152
|
+
getChats: function (options) {
|
|
153
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
154
|
+
var localVarAxiosArgs;
|
|
155
|
+
return __generator(this, function (_a) {
|
|
156
|
+
switch (_a.label) {
|
|
157
|
+
case 0: return [4 /*yield*/, (0, exports.ChatsApiAxiosParamCreator)(configuration).getChats(options)];
|
|
158
|
+
case 1:
|
|
159
|
+
localVarAxiosArgs = _a.sent();
|
|
160
|
+
return [2 /*return*/, function (axios, basePath) {
|
|
161
|
+
if (axios === void 0) { axios = axios_1.default; }
|
|
162
|
+
if (basePath === void 0) { basePath = base_1.BASE_PATH; }
|
|
163
|
+
var axiosRequestArgs = __assign(__assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
|
|
164
|
+
return axios.request(axiosRequestArgs);
|
|
165
|
+
}];
|
|
166
|
+
}
|
|
167
|
+
});
|
|
168
|
+
});
|
|
169
|
+
},
|
|
170
|
+
};
|
|
171
|
+
};
|
|
172
|
+
exports.ChatsApiFp = ChatsApiFp;
|
|
173
|
+
/**
|
|
174
|
+
* ChatsApi - factory interface
|
|
175
|
+
* @export
|
|
176
|
+
*/
|
|
177
|
+
var ChatsApiFactory = function (configuration, basePath, axios) {
|
|
178
|
+
return {
|
|
179
|
+
/**
|
|
180
|
+
*
|
|
181
|
+
* @param {*} [options] Override http request option.
|
|
182
|
+
* @throws {RequiredError}
|
|
183
|
+
*/
|
|
184
|
+
getChats: function (options) {
|
|
185
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
186
|
+
return __generator(this, function (_a) {
|
|
187
|
+
return [2 /*return*/, (0, exports.ChatsApiFp)(configuration).getChats(options).then(function (request) { return request(axios, basePath); })];
|
|
188
|
+
});
|
|
189
|
+
});
|
|
190
|
+
},
|
|
191
|
+
};
|
|
192
|
+
};
|
|
193
|
+
exports.ChatsApiFactory = ChatsApiFactory;
|
|
194
|
+
/**
|
|
195
|
+
* ChatsApi - object-oriented interface
|
|
196
|
+
* @export
|
|
197
|
+
* @class ChatsApi
|
|
198
|
+
* @extends {BaseAPI}
|
|
199
|
+
*/
|
|
200
|
+
var ChatsApi = /** @class */ (function (_super) {
|
|
201
|
+
__extends(ChatsApi, _super);
|
|
202
|
+
function ChatsApi() {
|
|
203
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
204
|
+
}
|
|
205
|
+
/**
|
|
206
|
+
*
|
|
207
|
+
* @param {*} [options] Override http request option.
|
|
208
|
+
* @throws {RequiredError}
|
|
209
|
+
* @memberof ChatsApi
|
|
210
|
+
*/
|
|
211
|
+
ChatsApi.prototype.getChats = function (options) {
|
|
212
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
213
|
+
var _this = this;
|
|
214
|
+
return __generator(this, function (_a) {
|
|
215
|
+
return [2 /*return*/, (0, exports.ChatsApiFp)(this.configuration).getChats(options).then(function (request) { return request(_this.axios, _this.basePath); })];
|
|
216
|
+
});
|
|
217
|
+
});
|
|
218
|
+
};
|
|
219
|
+
return ChatsApi;
|
|
220
|
+
}(base_1.BaseAPI));
|
|
221
|
+
exports.ChatsApi = ChatsApi;
|
|
@@ -16,10 +16,12 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
16
16
|
var extendStatics = function (d, b) {
|
|
17
17
|
extendStatics = Object.setPrototypeOf ||
|
|
18
18
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
19
|
-
function (d, b) { for (var p in b) if (
|
|
19
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
20
20
|
return extendStatics(d, b);
|
|
21
21
|
};
|
|
22
22
|
return function (d, b) {
|
|
23
|
+
if (typeof b !== "function" && b !== null)
|
|
24
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
23
25
|
extendStatics(d, b);
|
|
24
26
|
function __() { this.constructor = d; }
|
|
25
27
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
@@ -46,12 +48,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
46
48
|
});
|
|
47
49
|
};
|
|
48
50
|
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
49
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
50
|
-
return g =
|
|
51
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
52
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
51
53
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
52
54
|
function step(op) {
|
|
53
55
|
if (f) throw new TypeError("Generator is already executing.");
|
|
54
|
-
while (_) try {
|
|
56
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
55
57
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
56
58
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
57
59
|
switch (op[0]) {
|
|
@@ -72,6 +74,15 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
72
74
|
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
73
75
|
}
|
|
74
76
|
};
|
|
77
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
78
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
79
|
+
if (ar || !(i in from)) {
|
|
80
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
81
|
+
ar[i] = from[i];
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
85
|
+
};
|
|
75
86
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
76
87
|
exports.ContactsApi = exports.ContactsApiFactory = exports.ContactsApiFp = exports.ContactsApiAxiosParamCreator = void 0;
|
|
77
88
|
var axios_1 = require("axios");
|
|
@@ -82,7 +93,7 @@ var base_1 = require("../base");
|
|
|
82
93
|
* ContactsApi - axios parameter creator
|
|
83
94
|
* @export
|
|
84
95
|
*/
|
|
85
|
-
|
|
96
|
+
var ContactsApiAxiosParamCreator = function (configuration) {
|
|
86
97
|
var _this = this;
|
|
87
98
|
return {
|
|
88
99
|
/**
|
|
@@ -90,10 +101,14 @@ exports.ContactsApiAxiosParamCreator = function (configuration) {
|
|
|
90
101
|
* @param {*} [options] Override http request option.
|
|
91
102
|
* @throws {RequiredError}
|
|
92
103
|
*/
|
|
93
|
-
getContacts: function (
|
|
94
|
-
|
|
95
|
-
|
|
104
|
+
getContacts: function () {
|
|
105
|
+
var args_1 = [];
|
|
106
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
107
|
+
args_1[_i] = arguments[_i];
|
|
108
|
+
}
|
|
109
|
+
return __awaiter(_this, __spreadArray([], args_1, true), void 0, function (options) {
|
|
96
110
|
var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, query, key, key, headersFromBaseOptions;
|
|
111
|
+
if (options === void 0) { options = {}; }
|
|
97
112
|
return __generator(this, function (_a) {
|
|
98
113
|
localVarPath = "/api/contacts";
|
|
99
114
|
localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
@@ -122,11 +137,12 @@ exports.ContactsApiAxiosParamCreator = function (configuration) {
|
|
|
122
137
|
},
|
|
123
138
|
};
|
|
124
139
|
};
|
|
140
|
+
exports.ContactsApiAxiosParamCreator = ContactsApiAxiosParamCreator;
|
|
125
141
|
/**
|
|
126
142
|
* ContactsApi - functional programming interface
|
|
127
143
|
* @export
|
|
128
144
|
*/
|
|
129
|
-
|
|
145
|
+
var ContactsApiFp = function (configuration) {
|
|
130
146
|
return {
|
|
131
147
|
/**
|
|
132
148
|
*
|
|
@@ -138,7 +154,7 @@ exports.ContactsApiFp = function (configuration) {
|
|
|
138
154
|
var localVarAxiosArgs;
|
|
139
155
|
return __generator(this, function (_a) {
|
|
140
156
|
switch (_a.label) {
|
|
141
|
-
case 0: return [4 /*yield*/, exports.ContactsApiAxiosParamCreator(configuration).getContacts(options)];
|
|
157
|
+
case 0: return [4 /*yield*/, (0, exports.ContactsApiAxiosParamCreator)(configuration).getContacts(options)];
|
|
142
158
|
case 1:
|
|
143
159
|
localVarAxiosArgs = _a.sent();
|
|
144
160
|
return [2 /*return*/, function (axios, basePath) {
|
|
@@ -153,11 +169,12 @@ exports.ContactsApiFp = function (configuration) {
|
|
|
153
169
|
},
|
|
154
170
|
};
|
|
155
171
|
};
|
|
172
|
+
exports.ContactsApiFp = ContactsApiFp;
|
|
156
173
|
/**
|
|
157
174
|
* ContactsApi - factory interface
|
|
158
175
|
* @export
|
|
159
176
|
*/
|
|
160
|
-
|
|
177
|
+
var ContactsApiFactory = function (configuration, basePath, axios) {
|
|
161
178
|
return {
|
|
162
179
|
/**
|
|
163
180
|
*
|
|
@@ -167,12 +184,13 @@ exports.ContactsApiFactory = function (configuration, basePath, axios) {
|
|
|
167
184
|
getContacts: function (options) {
|
|
168
185
|
return __awaiter(this, void 0, void 0, function () {
|
|
169
186
|
return __generator(this, function (_a) {
|
|
170
|
-
return [2 /*return*/, exports.ContactsApiFp(configuration).getContacts(options).then(function (request) { return request(axios, basePath); })];
|
|
187
|
+
return [2 /*return*/, (0, exports.ContactsApiFp)(configuration).getContacts(options).then(function (request) { return request(axios, basePath); })];
|
|
171
188
|
});
|
|
172
189
|
});
|
|
173
190
|
},
|
|
174
191
|
};
|
|
175
192
|
};
|
|
193
|
+
exports.ContactsApiFactory = ContactsApiFactory;
|
|
176
194
|
/**
|
|
177
195
|
* ContactsApi - object-oriented interface
|
|
178
196
|
* @export
|
|
@@ -194,7 +212,7 @@ var ContactsApi = /** @class */ (function (_super) {
|
|
|
194
212
|
return __awaiter(this, void 0, void 0, function () {
|
|
195
213
|
var _this = this;
|
|
196
214
|
return __generator(this, function (_a) {
|
|
197
|
-
return [2 /*return*/, exports.ContactsApiFp(this.configuration).getContacts(options).then(function (request) { return request(_this.axios, _this.basePath); })];
|
|
215
|
+
return [2 /*return*/, (0, exports.ContactsApiFp)(this.configuration).getContacts(options).then(function (request) { return request(_this.axios, _this.basePath); })];
|
|
198
216
|
});
|
|
199
217
|
});
|
|
200
218
|
};
|
|
@@ -23,12 +23,6 @@ export declare const DefaultApiAxiosParamCreator: (configuration?: Configuration
|
|
|
23
23
|
* @throws {RequiredError}
|
|
24
24
|
*/
|
|
25
25
|
appControllerGetHello: (options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
26
|
-
/**
|
|
27
|
-
*
|
|
28
|
-
* @param {*} [options] Override http request option.
|
|
29
|
-
* @throws {RequiredError}
|
|
30
|
-
*/
|
|
31
|
-
getChats: (options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
32
26
|
};
|
|
33
27
|
/**
|
|
34
28
|
* DefaultApi - functional programming interface
|
|
@@ -41,12 +35,6 @@ export declare const DefaultApiFp: (configuration?: Configuration) => {
|
|
|
41
35
|
* @throws {RequiredError}
|
|
42
36
|
*/
|
|
43
37
|
appControllerGetHello(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>>;
|
|
44
|
-
/**
|
|
45
|
-
*
|
|
46
|
-
* @param {*} [options] Override http request option.
|
|
47
|
-
* @throws {RequiredError}
|
|
48
|
-
*/
|
|
49
|
-
getChats(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>>;
|
|
50
38
|
};
|
|
51
39
|
/**
|
|
52
40
|
* DefaultApi - factory interface
|
|
@@ -59,12 +47,6 @@ export declare const DefaultApiFactory: (configuration?: Configuration, basePath
|
|
|
59
47
|
* @throws {RequiredError}
|
|
60
48
|
*/
|
|
61
49
|
appControllerGetHello(options?: AxiosRequestConfig): Promise<AxiosResponse<void>>;
|
|
62
|
-
/**
|
|
63
|
-
*
|
|
64
|
-
* @param {*} [options] Override http request option.
|
|
65
|
-
* @throws {RequiredError}
|
|
66
|
-
*/
|
|
67
|
-
getChats(options?: AxiosRequestConfig): Promise<AxiosResponse<void>>;
|
|
68
50
|
};
|
|
69
51
|
/**
|
|
70
52
|
* DefaultApi - object-oriented interface
|
|
@@ -80,11 +62,4 @@ export declare class DefaultApi extends BaseAPI {
|
|
|
80
62
|
* @memberof DefaultApi
|
|
81
63
|
*/
|
|
82
64
|
appControllerGetHello(options?: AxiosRequestConfig): Promise<AxiosResponse<void>>;
|
|
83
|
-
/**
|
|
84
|
-
*
|
|
85
|
-
* @param {*} [options] Override http request option.
|
|
86
|
-
* @throws {RequiredError}
|
|
87
|
-
* @memberof DefaultApi
|
|
88
|
-
*/
|
|
89
|
-
getChats(options?: AxiosRequestConfig): Promise<AxiosResponse<void>>;
|
|
90
65
|
}
|
package/dist/apis/default-api.js
CHANGED
|
@@ -16,10 +16,12 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
16
16
|
var extendStatics = function (d, b) {
|
|
17
17
|
extendStatics = Object.setPrototypeOf ||
|
|
18
18
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
19
|
-
function (d, b) { for (var p in b) if (
|
|
19
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
20
20
|
return extendStatics(d, b);
|
|
21
21
|
};
|
|
22
22
|
return function (d, b) {
|
|
23
|
+
if (typeof b !== "function" && b !== null)
|
|
24
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
23
25
|
extendStatics(d, b);
|
|
24
26
|
function __() { this.constructor = d; }
|
|
25
27
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
@@ -46,12 +48,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
46
48
|
});
|
|
47
49
|
};
|
|
48
50
|
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
49
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
50
|
-
return g =
|
|
51
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
52
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
51
53
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
52
54
|
function step(op) {
|
|
53
55
|
if (f) throw new TypeError("Generator is already executing.");
|
|
54
|
-
while (_) try {
|
|
56
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
55
57
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
56
58
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
57
59
|
switch (op[0]) {
|
|
@@ -72,6 +74,15 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
72
74
|
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
73
75
|
}
|
|
74
76
|
};
|
|
77
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
78
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
79
|
+
if (ar || !(i in from)) {
|
|
80
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
81
|
+
ar[i] = from[i];
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
85
|
+
};
|
|
75
86
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
76
87
|
exports.DefaultApi = exports.DefaultApiFactory = exports.DefaultApiFp = exports.DefaultApiAxiosParamCreator = void 0;
|
|
77
88
|
var axios_1 = require("axios");
|
|
@@ -82,7 +93,7 @@ var base_1 = require("../base");
|
|
|
82
93
|
* DefaultApi - axios parameter creator
|
|
83
94
|
* @export
|
|
84
95
|
*/
|
|
85
|
-
|
|
96
|
+
var DefaultApiAxiosParamCreator = function (configuration) {
|
|
86
97
|
var _this = this;
|
|
87
98
|
return {
|
|
88
99
|
/**
|
|
@@ -90,10 +101,14 @@ exports.DefaultApiAxiosParamCreator = function (configuration) {
|
|
|
90
101
|
* @param {*} [options] Override http request option.
|
|
91
102
|
* @throws {RequiredError}
|
|
92
103
|
*/
|
|
93
|
-
appControllerGetHello: function (
|
|
94
|
-
|
|
95
|
-
|
|
104
|
+
appControllerGetHello: function () {
|
|
105
|
+
var args_1 = [];
|
|
106
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
107
|
+
args_1[_i] = arguments[_i];
|
|
108
|
+
}
|
|
109
|
+
return __awaiter(_this, __spreadArray([], args_1, true), void 0, function (options) {
|
|
96
110
|
var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, query, key, key, headersFromBaseOptions;
|
|
111
|
+
if (options === void 0) { options = {}; }
|
|
97
112
|
return __generator(this, function (_a) {
|
|
98
113
|
localVarPath = "/";
|
|
99
114
|
localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
@@ -120,48 +135,14 @@ exports.DefaultApiAxiosParamCreator = function (configuration) {
|
|
|
120
135
|
});
|
|
121
136
|
});
|
|
122
137
|
},
|
|
123
|
-
/**
|
|
124
|
-
*
|
|
125
|
-
* @param {*} [options] Override http request option.
|
|
126
|
-
* @throws {RequiredError}
|
|
127
|
-
*/
|
|
128
|
-
getChats: function (options) {
|
|
129
|
-
if (options === void 0) { options = {}; }
|
|
130
|
-
return __awaiter(_this, void 0, void 0, function () {
|
|
131
|
-
var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, query, key, key, headersFromBaseOptions;
|
|
132
|
-
return __generator(this, function (_a) {
|
|
133
|
-
localVarPath = "/api/chats";
|
|
134
|
-
localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
135
|
-
if (configuration) {
|
|
136
|
-
baseOptions = configuration.baseOptions;
|
|
137
|
-
}
|
|
138
|
-
localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
|
|
139
|
-
localVarHeaderParameter = {};
|
|
140
|
-
localVarQueryParameter = {};
|
|
141
|
-
query = new URLSearchParams(localVarUrlObj.search);
|
|
142
|
-
for (key in localVarQueryParameter) {
|
|
143
|
-
query.set(key, localVarQueryParameter[key]);
|
|
144
|
-
}
|
|
145
|
-
for (key in options.params) {
|
|
146
|
-
query.set(key, options.params[key]);
|
|
147
|
-
}
|
|
148
|
-
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
149
|
-
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
150
|
-
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
151
|
-
return [2 /*return*/, {
|
|
152
|
-
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
153
|
-
options: localVarRequestOptions,
|
|
154
|
-
}];
|
|
155
|
-
});
|
|
156
|
-
});
|
|
157
|
-
},
|
|
158
138
|
};
|
|
159
139
|
};
|
|
140
|
+
exports.DefaultApiAxiosParamCreator = DefaultApiAxiosParamCreator;
|
|
160
141
|
/**
|
|
161
142
|
* DefaultApi - functional programming interface
|
|
162
143
|
* @export
|
|
163
144
|
*/
|
|
164
|
-
|
|
145
|
+
var DefaultApiFp = function (configuration) {
|
|
165
146
|
return {
|
|
166
147
|
/**
|
|
167
148
|
*
|
|
@@ -173,30 +154,7 @@ exports.DefaultApiFp = function (configuration) {
|
|
|
173
154
|
var localVarAxiosArgs;
|
|
174
155
|
return __generator(this, function (_a) {
|
|
175
156
|
switch (_a.label) {
|
|
176
|
-
case 0: return [4 /*yield*/, exports.DefaultApiAxiosParamCreator(configuration).appControllerGetHello(options)];
|
|
177
|
-
case 1:
|
|
178
|
-
localVarAxiosArgs = _a.sent();
|
|
179
|
-
return [2 /*return*/, function (axios, basePath) {
|
|
180
|
-
if (axios === void 0) { axios = axios_1.default; }
|
|
181
|
-
if (basePath === void 0) { basePath = base_1.BASE_PATH; }
|
|
182
|
-
var axiosRequestArgs = __assign(__assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
|
|
183
|
-
return axios.request(axiosRequestArgs);
|
|
184
|
-
}];
|
|
185
|
-
}
|
|
186
|
-
});
|
|
187
|
-
});
|
|
188
|
-
},
|
|
189
|
-
/**
|
|
190
|
-
*
|
|
191
|
-
* @param {*} [options] Override http request option.
|
|
192
|
-
* @throws {RequiredError}
|
|
193
|
-
*/
|
|
194
|
-
getChats: function (options) {
|
|
195
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
196
|
-
var localVarAxiosArgs;
|
|
197
|
-
return __generator(this, function (_a) {
|
|
198
|
-
switch (_a.label) {
|
|
199
|
-
case 0: return [4 /*yield*/, exports.DefaultApiAxiosParamCreator(configuration).getChats(options)];
|
|
157
|
+
case 0: return [4 /*yield*/, (0, exports.DefaultApiAxiosParamCreator)(configuration).appControllerGetHello(options)];
|
|
200
158
|
case 1:
|
|
201
159
|
localVarAxiosArgs = _a.sent();
|
|
202
160
|
return [2 /*return*/, function (axios, basePath) {
|
|
@@ -211,11 +169,12 @@ exports.DefaultApiFp = function (configuration) {
|
|
|
211
169
|
},
|
|
212
170
|
};
|
|
213
171
|
};
|
|
172
|
+
exports.DefaultApiFp = DefaultApiFp;
|
|
214
173
|
/**
|
|
215
174
|
* DefaultApi - factory interface
|
|
216
175
|
* @export
|
|
217
176
|
*/
|
|
218
|
-
|
|
177
|
+
var DefaultApiFactory = function (configuration, basePath, axios) {
|
|
219
178
|
return {
|
|
220
179
|
/**
|
|
221
180
|
*
|
|
@@ -225,24 +184,13 @@ exports.DefaultApiFactory = function (configuration, basePath, axios) {
|
|
|
225
184
|
appControllerGetHello: function (options) {
|
|
226
185
|
return __awaiter(this, void 0, void 0, function () {
|
|
227
186
|
return __generator(this, function (_a) {
|
|
228
|
-
return [2 /*return*/, exports.DefaultApiFp(configuration).appControllerGetHello(options).then(function (request) { return request(axios, basePath); })];
|
|
229
|
-
});
|
|
230
|
-
});
|
|
231
|
-
},
|
|
232
|
-
/**
|
|
233
|
-
*
|
|
234
|
-
* @param {*} [options] Override http request option.
|
|
235
|
-
* @throws {RequiredError}
|
|
236
|
-
*/
|
|
237
|
-
getChats: function (options) {
|
|
238
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
239
|
-
return __generator(this, function (_a) {
|
|
240
|
-
return [2 /*return*/, exports.DefaultApiFp(configuration).getChats(options).then(function (request) { return request(axios, basePath); })];
|
|
187
|
+
return [2 /*return*/, (0, exports.DefaultApiFp)(configuration).appControllerGetHello(options).then(function (request) { return request(axios, basePath); })];
|
|
241
188
|
});
|
|
242
189
|
});
|
|
243
190
|
},
|
|
244
191
|
};
|
|
245
192
|
};
|
|
193
|
+
exports.DefaultApiFactory = DefaultApiFactory;
|
|
246
194
|
/**
|
|
247
195
|
* DefaultApi - object-oriented interface
|
|
248
196
|
* @export
|
|
@@ -264,21 +212,7 @@ var DefaultApi = /** @class */ (function (_super) {
|
|
|
264
212
|
return __awaiter(this, void 0, void 0, function () {
|
|
265
213
|
var _this = this;
|
|
266
214
|
return __generator(this, function (_a) {
|
|
267
|
-
return [2 /*return*/, exports.DefaultApiFp(this.configuration).appControllerGetHello(options).then(function (request) { return request(_this.axios, _this.basePath); })];
|
|
268
|
-
});
|
|
269
|
-
});
|
|
270
|
-
};
|
|
271
|
-
/**
|
|
272
|
-
*
|
|
273
|
-
* @param {*} [options] Override http request option.
|
|
274
|
-
* @throws {RequiredError}
|
|
275
|
-
* @memberof DefaultApi
|
|
276
|
-
*/
|
|
277
|
-
DefaultApi.prototype.getChats = function (options) {
|
|
278
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
279
|
-
var _this = this;
|
|
280
|
-
return __generator(this, function (_a) {
|
|
281
|
-
return [2 /*return*/, exports.DefaultApiFp(this.configuration).getChats(options).then(function (request) { return request(_this.axios, _this.basePath); })];
|
|
215
|
+
return [2 /*return*/, (0, exports.DefaultApiFp)(this.configuration).appControllerGetHello(options).then(function (request) { return request(_this.axios, _this.basePath); })];
|
|
282
216
|
});
|
|
283
217
|
});
|
|
284
218
|
};
|