@use_socials/sdk 0.1.0
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 +46 -0
- package/dist/api.d.ts +762 -0
- package/dist/api.js +1274 -0
- package/dist/base.d.ts +42 -0
- package/dist/base.js +46 -0
- package/dist/client.d.ts +196 -0
- package/dist/client.js +275 -0
- package/dist/common.d.ts +34 -0
- package/dist/common.js +139 -0
- package/dist/configuration.d.ts +98 -0
- package/dist/configuration.js +44 -0
- package/dist/esm/api.d.ts +762 -0
- package/dist/esm/api.js +1243 -0
- package/dist/esm/base.d.ts +42 -0
- package/dist/esm/base.js +41 -0
- package/dist/esm/client.d.ts +196 -0
- package/dist/esm/client.js +270 -0
- package/dist/esm/common.d.ts +34 -0
- package/dist/esm/common.js +126 -0
- package/dist/esm/configuration.d.ts +98 -0
- package/dist/esm/configuration.js +40 -0
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/index.js +3 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +19 -0
- package/package.json +46 -0
package/dist/api.js
ADDED
|
@@ -0,0 +1,1274 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* use-socials API
|
|
6
|
+
* Social media publishing API as a service. Allows app builders to let their users post to YouTube, TikTok, Instagram, and Pinterest.
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.0
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
16
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
17
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
18
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
19
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
20
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
21
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
+
exports.WaitlistApi = exports.WaitlistApiFactory = exports.WaitlistApiFp = exports.WaitlistApiAxiosParamCreator = exports.UsersApi = exports.UsersApiFactory = exports.UsersApiFp = exports.UsersApiAxiosParamCreator = exports.PublishApi = exports.PublishApiFactory = exports.PublishApiFp = exports.PublishApiAxiosParamCreator = exports.PostsApi = exports.PostsApiFactory = exports.PostsApiFp = exports.PostsApiAxiosParamCreator = exports.OauthApi = exports.OauthApiFactory = exports.OauthApiFp = exports.OauthApiAxiosParamCreator = exports.MediaApi = exports.MediaApiFactory = exports.MediaApiFp = exports.MediaApiAxiosParamCreator = exports.HealthApi = exports.HealthApiFactory = exports.HealthApiFp = exports.HealthApiAxiosParamCreator = void 0;
|
|
26
|
+
const axios_1 = require("axios");
|
|
27
|
+
// Some imports not used depending on template conditions
|
|
28
|
+
// @ts-ignore
|
|
29
|
+
const common_1 = require("./common");
|
|
30
|
+
// @ts-ignore
|
|
31
|
+
const base_1 = require("./base");
|
|
32
|
+
/**
|
|
33
|
+
* HealthApi - axios parameter creator
|
|
34
|
+
*/
|
|
35
|
+
const HealthApiAxiosParamCreator = function (configuration) {
|
|
36
|
+
return {
|
|
37
|
+
/**
|
|
38
|
+
* Returns the current health status of the API.
|
|
39
|
+
* @summary Health check
|
|
40
|
+
* @param {*} [options] Override http request option.
|
|
41
|
+
* @throws {RequiredError}
|
|
42
|
+
*/
|
|
43
|
+
healthGet: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
|
|
44
|
+
const localVarPath = `/health`;
|
|
45
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
46
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
47
|
+
let baseOptions;
|
|
48
|
+
if (configuration) {
|
|
49
|
+
baseOptions = configuration.baseOptions;
|
|
50
|
+
}
|
|
51
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
52
|
+
const localVarHeaderParameter = {};
|
|
53
|
+
const localVarQueryParameter = {};
|
|
54
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
55
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
56
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
57
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
58
|
+
return {
|
|
59
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
60
|
+
options: localVarRequestOptions,
|
|
61
|
+
};
|
|
62
|
+
}),
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
exports.HealthApiAxiosParamCreator = HealthApiAxiosParamCreator;
|
|
66
|
+
/**
|
|
67
|
+
* HealthApi - functional programming interface
|
|
68
|
+
*/
|
|
69
|
+
const HealthApiFp = function (configuration) {
|
|
70
|
+
const localVarAxiosParamCreator = (0, exports.HealthApiAxiosParamCreator)(configuration);
|
|
71
|
+
return {
|
|
72
|
+
/**
|
|
73
|
+
* Returns the current health status of the API.
|
|
74
|
+
* @summary Health check
|
|
75
|
+
* @param {*} [options] Override http request option.
|
|
76
|
+
* @throws {RequiredError}
|
|
77
|
+
*/
|
|
78
|
+
healthGet(options) {
|
|
79
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
80
|
+
var _a, _b, _c;
|
|
81
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.healthGet(options);
|
|
82
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
83
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['HealthApi.healthGet']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
84
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
85
|
+
});
|
|
86
|
+
},
|
|
87
|
+
};
|
|
88
|
+
};
|
|
89
|
+
exports.HealthApiFp = HealthApiFp;
|
|
90
|
+
/**
|
|
91
|
+
* HealthApi - factory interface
|
|
92
|
+
*/
|
|
93
|
+
const HealthApiFactory = function (configuration, basePath, axios) {
|
|
94
|
+
const localVarFp = (0, exports.HealthApiFp)(configuration);
|
|
95
|
+
return {
|
|
96
|
+
/**
|
|
97
|
+
* Returns the current health status of the API.
|
|
98
|
+
* @summary Health check
|
|
99
|
+
* @param {*} [options] Override http request option.
|
|
100
|
+
* @throws {RequiredError}
|
|
101
|
+
*/
|
|
102
|
+
healthGet(options) {
|
|
103
|
+
return localVarFp.healthGet(options).then((request) => request(axios, basePath));
|
|
104
|
+
},
|
|
105
|
+
};
|
|
106
|
+
};
|
|
107
|
+
exports.HealthApiFactory = HealthApiFactory;
|
|
108
|
+
/**
|
|
109
|
+
* HealthApi - object-oriented interface
|
|
110
|
+
*/
|
|
111
|
+
class HealthApi extends base_1.BaseAPI {
|
|
112
|
+
/**
|
|
113
|
+
* Returns the current health status of the API.
|
|
114
|
+
* @summary Health check
|
|
115
|
+
* @param {*} [options] Override http request option.
|
|
116
|
+
* @throws {RequiredError}
|
|
117
|
+
*/
|
|
118
|
+
healthGet(options) {
|
|
119
|
+
return (0, exports.HealthApiFp)(this.configuration).healthGet(options).then((request) => request(this.axios, this.basePath));
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
exports.HealthApi = HealthApi;
|
|
123
|
+
/**
|
|
124
|
+
* MediaApi - axios parameter creator
|
|
125
|
+
*/
|
|
126
|
+
const MediaApiAxiosParamCreator = function (configuration) {
|
|
127
|
+
return {
|
|
128
|
+
/**
|
|
129
|
+
* Confirms media upload is complete and ready for use in publish jobs.
|
|
130
|
+
* @summary Complete media upload
|
|
131
|
+
* @param {string} mediaId Media ID
|
|
132
|
+
* @param {*} [options] Override http request option.
|
|
133
|
+
* @throws {RequiredError}
|
|
134
|
+
*/
|
|
135
|
+
apiV1MediaMediaIdCompletePost: (mediaId_1, ...args_1) => __awaiter(this, [mediaId_1, ...args_1], void 0, function* (mediaId, options = {}) {
|
|
136
|
+
// verify required parameter 'mediaId' is not null or undefined
|
|
137
|
+
(0, common_1.assertParamExists)('apiV1MediaMediaIdCompletePost', 'mediaId', mediaId);
|
|
138
|
+
const localVarPath = `/api/v1/media/{mediaId}/complete`
|
|
139
|
+
.replace(`{${"mediaId"}}`, encodeURIComponent(String(mediaId)));
|
|
140
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
141
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
142
|
+
let baseOptions;
|
|
143
|
+
if (configuration) {
|
|
144
|
+
baseOptions = configuration.baseOptions;
|
|
145
|
+
}
|
|
146
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
147
|
+
const localVarHeaderParameter = {};
|
|
148
|
+
const localVarQueryParameter = {};
|
|
149
|
+
// authentication ApiKeyAuth required
|
|
150
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-api-key", configuration);
|
|
151
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
152
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
153
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
154
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
155
|
+
return {
|
|
156
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
157
|
+
options: localVarRequestOptions,
|
|
158
|
+
};
|
|
159
|
+
}),
|
|
160
|
+
/**
|
|
161
|
+
* Returns a presigned URL for direct media upload to cloud storage.
|
|
162
|
+
* @summary Generate presigned upload URL
|
|
163
|
+
* @param {HandlersPresignMediaRequest} body Media presign request
|
|
164
|
+
* @param {*} [options] Override http request option.
|
|
165
|
+
* @throws {RequiredError}
|
|
166
|
+
*/
|
|
167
|
+
apiV1MediaPresignPost: (body_1, ...args_1) => __awaiter(this, [body_1, ...args_1], void 0, function* (body, options = {}) {
|
|
168
|
+
// verify required parameter 'body' is not null or undefined
|
|
169
|
+
(0, common_1.assertParamExists)('apiV1MediaPresignPost', 'body', body);
|
|
170
|
+
const localVarPath = `/api/v1/media/presign`;
|
|
171
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
172
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
173
|
+
let baseOptions;
|
|
174
|
+
if (configuration) {
|
|
175
|
+
baseOptions = configuration.baseOptions;
|
|
176
|
+
}
|
|
177
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
178
|
+
const localVarHeaderParameter = {};
|
|
179
|
+
const localVarQueryParameter = {};
|
|
180
|
+
// authentication ApiKeyAuth required
|
|
181
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-api-key", configuration);
|
|
182
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
183
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
184
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
185
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
186
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
187
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(body, localVarRequestOptions, configuration);
|
|
188
|
+
return {
|
|
189
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
190
|
+
options: localVarRequestOptions,
|
|
191
|
+
};
|
|
192
|
+
}),
|
|
193
|
+
};
|
|
194
|
+
};
|
|
195
|
+
exports.MediaApiAxiosParamCreator = MediaApiAxiosParamCreator;
|
|
196
|
+
/**
|
|
197
|
+
* MediaApi - functional programming interface
|
|
198
|
+
*/
|
|
199
|
+
const MediaApiFp = function (configuration) {
|
|
200
|
+
const localVarAxiosParamCreator = (0, exports.MediaApiAxiosParamCreator)(configuration);
|
|
201
|
+
return {
|
|
202
|
+
/**
|
|
203
|
+
* Confirms media upload is complete and ready for use in publish jobs.
|
|
204
|
+
* @summary Complete media upload
|
|
205
|
+
* @param {string} mediaId Media ID
|
|
206
|
+
* @param {*} [options] Override http request option.
|
|
207
|
+
* @throws {RequiredError}
|
|
208
|
+
*/
|
|
209
|
+
apiV1MediaMediaIdCompletePost(mediaId, options) {
|
|
210
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
211
|
+
var _a, _b, _c;
|
|
212
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.apiV1MediaMediaIdCompletePost(mediaId, options);
|
|
213
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
214
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['MediaApi.apiV1MediaMediaIdCompletePost']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
215
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
216
|
+
});
|
|
217
|
+
},
|
|
218
|
+
/**
|
|
219
|
+
* Returns a presigned URL for direct media upload to cloud storage.
|
|
220
|
+
* @summary Generate presigned upload URL
|
|
221
|
+
* @param {HandlersPresignMediaRequest} body Media presign request
|
|
222
|
+
* @param {*} [options] Override http request option.
|
|
223
|
+
* @throws {RequiredError}
|
|
224
|
+
*/
|
|
225
|
+
apiV1MediaPresignPost(body, options) {
|
|
226
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
227
|
+
var _a, _b, _c;
|
|
228
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.apiV1MediaPresignPost(body, options);
|
|
229
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
230
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['MediaApi.apiV1MediaPresignPost']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
231
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
232
|
+
});
|
|
233
|
+
},
|
|
234
|
+
};
|
|
235
|
+
};
|
|
236
|
+
exports.MediaApiFp = MediaApiFp;
|
|
237
|
+
/**
|
|
238
|
+
* MediaApi - factory interface
|
|
239
|
+
*/
|
|
240
|
+
const MediaApiFactory = function (configuration, basePath, axios) {
|
|
241
|
+
const localVarFp = (0, exports.MediaApiFp)(configuration);
|
|
242
|
+
return {
|
|
243
|
+
/**
|
|
244
|
+
* Confirms media upload is complete and ready for use in publish jobs.
|
|
245
|
+
* @summary Complete media upload
|
|
246
|
+
* @param {string} mediaId Media ID
|
|
247
|
+
* @param {*} [options] Override http request option.
|
|
248
|
+
* @throws {RequiredError}
|
|
249
|
+
*/
|
|
250
|
+
apiV1MediaMediaIdCompletePost(mediaId, options) {
|
|
251
|
+
return localVarFp.apiV1MediaMediaIdCompletePost(mediaId, options).then((request) => request(axios, basePath));
|
|
252
|
+
},
|
|
253
|
+
/**
|
|
254
|
+
* Returns a presigned URL for direct media upload to cloud storage.
|
|
255
|
+
* @summary Generate presigned upload URL
|
|
256
|
+
* @param {HandlersPresignMediaRequest} body Media presign request
|
|
257
|
+
* @param {*} [options] Override http request option.
|
|
258
|
+
* @throws {RequiredError}
|
|
259
|
+
*/
|
|
260
|
+
apiV1MediaPresignPost(body, options) {
|
|
261
|
+
return localVarFp.apiV1MediaPresignPost(body, options).then((request) => request(axios, basePath));
|
|
262
|
+
},
|
|
263
|
+
};
|
|
264
|
+
};
|
|
265
|
+
exports.MediaApiFactory = MediaApiFactory;
|
|
266
|
+
/**
|
|
267
|
+
* MediaApi - object-oriented interface
|
|
268
|
+
*/
|
|
269
|
+
class MediaApi extends base_1.BaseAPI {
|
|
270
|
+
/**
|
|
271
|
+
* Confirms media upload is complete and ready for use in publish jobs.
|
|
272
|
+
* @summary Complete media upload
|
|
273
|
+
* @param {string} mediaId Media ID
|
|
274
|
+
* @param {*} [options] Override http request option.
|
|
275
|
+
* @throws {RequiredError}
|
|
276
|
+
*/
|
|
277
|
+
apiV1MediaMediaIdCompletePost(mediaId, options) {
|
|
278
|
+
return (0, exports.MediaApiFp)(this.configuration).apiV1MediaMediaIdCompletePost(mediaId, options).then((request) => request(this.axios, this.basePath));
|
|
279
|
+
}
|
|
280
|
+
/**
|
|
281
|
+
* Returns a presigned URL for direct media upload to cloud storage.
|
|
282
|
+
* @summary Generate presigned upload URL
|
|
283
|
+
* @param {HandlersPresignMediaRequest} body Media presign request
|
|
284
|
+
* @param {*} [options] Override http request option.
|
|
285
|
+
* @throws {RequiredError}
|
|
286
|
+
*/
|
|
287
|
+
apiV1MediaPresignPost(body, options) {
|
|
288
|
+
return (0, exports.MediaApiFp)(this.configuration).apiV1MediaPresignPost(body, options).then((request) => request(this.axios, this.basePath));
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
exports.MediaApi = MediaApi;
|
|
292
|
+
/**
|
|
293
|
+
* OauthApi - axios parameter creator
|
|
294
|
+
*/
|
|
295
|
+
const OauthApiAxiosParamCreator = function (configuration) {
|
|
296
|
+
return {
|
|
297
|
+
/**
|
|
298
|
+
* Callback endpoint for social platform OAuth flows. On success, the social account is connected immediately and the response returns `status=connected`.
|
|
299
|
+
* @summary OAuth callback endpoint
|
|
300
|
+
* @param {string} platform Platform name (youtube, tiktok, instagram, pinterest)
|
|
301
|
+
* @param {string} code Authorization code from the platform
|
|
302
|
+
* @param {string} state State parameter for CSRF protection
|
|
303
|
+
* @param {*} [options] Override http request option.
|
|
304
|
+
* @throws {RequiredError}
|
|
305
|
+
*/
|
|
306
|
+
apiV1OauthPlatformCallbackGet: (platform_1, code_1, state_1, ...args_1) => __awaiter(this, [platform_1, code_1, state_1, ...args_1], void 0, function* (platform, code, state, options = {}) {
|
|
307
|
+
// verify required parameter 'platform' is not null or undefined
|
|
308
|
+
(0, common_1.assertParamExists)('apiV1OauthPlatformCallbackGet', 'platform', platform);
|
|
309
|
+
// verify required parameter 'code' is not null or undefined
|
|
310
|
+
(0, common_1.assertParamExists)('apiV1OauthPlatformCallbackGet', 'code', code);
|
|
311
|
+
// verify required parameter 'state' is not null or undefined
|
|
312
|
+
(0, common_1.assertParamExists)('apiV1OauthPlatformCallbackGet', 'state', state);
|
|
313
|
+
const localVarPath = `/api/v1/oauth/{platform}/callback`
|
|
314
|
+
.replace(`{${"platform"}}`, encodeURIComponent(String(platform)));
|
|
315
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
316
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
317
|
+
let baseOptions;
|
|
318
|
+
if (configuration) {
|
|
319
|
+
baseOptions = configuration.baseOptions;
|
|
320
|
+
}
|
|
321
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
322
|
+
const localVarHeaderParameter = {};
|
|
323
|
+
const localVarQueryParameter = {};
|
|
324
|
+
if (code !== undefined) {
|
|
325
|
+
localVarQueryParameter['code'] = code;
|
|
326
|
+
}
|
|
327
|
+
if (state !== undefined) {
|
|
328
|
+
localVarQueryParameter['state'] = state;
|
|
329
|
+
}
|
|
330
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
331
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
332
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
333
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
334
|
+
return {
|
|
335
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
336
|
+
options: localVarRequestOptions,
|
|
337
|
+
};
|
|
338
|
+
}),
|
|
339
|
+
/**
|
|
340
|
+
* Returns an authorization URL for the user to authenticate with the specified social platform.
|
|
341
|
+
* @summary Generate OAuth authorization URL
|
|
342
|
+
* @param {string} platform Platform name (youtube, tiktok, instagram, pinterest)
|
|
343
|
+
* @param {string} userId User ID
|
|
344
|
+
* @param {string} [redirectUrl] URL to redirect to after OAuth callback
|
|
345
|
+
* @param {*} [options] Override http request option.
|
|
346
|
+
* @throws {RequiredError}
|
|
347
|
+
*/
|
|
348
|
+
apiV1OauthPlatformUrlGet: (platform_1, userId_1, redirectUrl_1, ...args_1) => __awaiter(this, [platform_1, userId_1, redirectUrl_1, ...args_1], void 0, function* (platform, userId, redirectUrl, options = {}) {
|
|
349
|
+
// verify required parameter 'platform' is not null or undefined
|
|
350
|
+
(0, common_1.assertParamExists)('apiV1OauthPlatformUrlGet', 'platform', platform);
|
|
351
|
+
// verify required parameter 'userId' is not null or undefined
|
|
352
|
+
(0, common_1.assertParamExists)('apiV1OauthPlatformUrlGet', 'userId', userId);
|
|
353
|
+
const localVarPath = `/api/v1/oauth/{platform}/url`
|
|
354
|
+
.replace(`{${"platform"}}`, encodeURIComponent(String(platform)));
|
|
355
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
356
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
357
|
+
let baseOptions;
|
|
358
|
+
if (configuration) {
|
|
359
|
+
baseOptions = configuration.baseOptions;
|
|
360
|
+
}
|
|
361
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
362
|
+
const localVarHeaderParameter = {};
|
|
363
|
+
const localVarQueryParameter = {};
|
|
364
|
+
// authentication ApiKeyAuth required
|
|
365
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-api-key", configuration);
|
|
366
|
+
if (userId !== undefined) {
|
|
367
|
+
localVarQueryParameter['userId'] = userId;
|
|
368
|
+
}
|
|
369
|
+
if (redirectUrl !== undefined) {
|
|
370
|
+
localVarQueryParameter['redirectUrl'] = redirectUrl;
|
|
371
|
+
}
|
|
372
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
373
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
374
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
375
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
376
|
+
return {
|
|
377
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
378
|
+
options: localVarRequestOptions,
|
|
379
|
+
};
|
|
380
|
+
}),
|
|
381
|
+
};
|
|
382
|
+
};
|
|
383
|
+
exports.OauthApiAxiosParamCreator = OauthApiAxiosParamCreator;
|
|
384
|
+
/**
|
|
385
|
+
* OauthApi - functional programming interface
|
|
386
|
+
*/
|
|
387
|
+
const OauthApiFp = function (configuration) {
|
|
388
|
+
const localVarAxiosParamCreator = (0, exports.OauthApiAxiosParamCreator)(configuration);
|
|
389
|
+
return {
|
|
390
|
+
/**
|
|
391
|
+
* Callback endpoint for social platform OAuth flows. On success, the social account is connected immediately and the response returns `status=connected`.
|
|
392
|
+
* @summary OAuth callback endpoint
|
|
393
|
+
* @param {string} platform Platform name (youtube, tiktok, instagram, pinterest)
|
|
394
|
+
* @param {string} code Authorization code from the platform
|
|
395
|
+
* @param {string} state State parameter for CSRF protection
|
|
396
|
+
* @param {*} [options] Override http request option.
|
|
397
|
+
* @throws {RequiredError}
|
|
398
|
+
*/
|
|
399
|
+
apiV1OauthPlatformCallbackGet(platform, code, state, options) {
|
|
400
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
401
|
+
var _a, _b, _c;
|
|
402
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.apiV1OauthPlatformCallbackGet(platform, code, state, options);
|
|
403
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
404
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['OauthApi.apiV1OauthPlatformCallbackGet']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
405
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
406
|
+
});
|
|
407
|
+
},
|
|
408
|
+
/**
|
|
409
|
+
* Returns an authorization URL for the user to authenticate with the specified social platform.
|
|
410
|
+
* @summary Generate OAuth authorization URL
|
|
411
|
+
* @param {string} platform Platform name (youtube, tiktok, instagram, pinterest)
|
|
412
|
+
* @param {string} userId User ID
|
|
413
|
+
* @param {string} [redirectUrl] URL to redirect to after OAuth callback
|
|
414
|
+
* @param {*} [options] Override http request option.
|
|
415
|
+
* @throws {RequiredError}
|
|
416
|
+
*/
|
|
417
|
+
apiV1OauthPlatformUrlGet(platform, userId, redirectUrl, options) {
|
|
418
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
419
|
+
var _a, _b, _c;
|
|
420
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.apiV1OauthPlatformUrlGet(platform, userId, redirectUrl, options);
|
|
421
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
422
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['OauthApi.apiV1OauthPlatformUrlGet']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
423
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
424
|
+
});
|
|
425
|
+
},
|
|
426
|
+
};
|
|
427
|
+
};
|
|
428
|
+
exports.OauthApiFp = OauthApiFp;
|
|
429
|
+
/**
|
|
430
|
+
* OauthApi - factory interface
|
|
431
|
+
*/
|
|
432
|
+
const OauthApiFactory = function (configuration, basePath, axios) {
|
|
433
|
+
const localVarFp = (0, exports.OauthApiFp)(configuration);
|
|
434
|
+
return {
|
|
435
|
+
/**
|
|
436
|
+
* Callback endpoint for social platform OAuth flows. On success, the social account is connected immediately and the response returns `status=connected`.
|
|
437
|
+
* @summary OAuth callback endpoint
|
|
438
|
+
* @param {string} platform Platform name (youtube, tiktok, instagram, pinterest)
|
|
439
|
+
* @param {string} code Authorization code from the platform
|
|
440
|
+
* @param {string} state State parameter for CSRF protection
|
|
441
|
+
* @param {*} [options] Override http request option.
|
|
442
|
+
* @throws {RequiredError}
|
|
443
|
+
*/
|
|
444
|
+
apiV1OauthPlatformCallbackGet(platform, code, state, options) {
|
|
445
|
+
return localVarFp.apiV1OauthPlatformCallbackGet(platform, code, state, options).then((request) => request(axios, basePath));
|
|
446
|
+
},
|
|
447
|
+
/**
|
|
448
|
+
* Returns an authorization URL for the user to authenticate with the specified social platform.
|
|
449
|
+
* @summary Generate OAuth authorization URL
|
|
450
|
+
* @param {string} platform Platform name (youtube, tiktok, instagram, pinterest)
|
|
451
|
+
* @param {string} userId User ID
|
|
452
|
+
* @param {string} [redirectUrl] URL to redirect to after OAuth callback
|
|
453
|
+
* @param {*} [options] Override http request option.
|
|
454
|
+
* @throws {RequiredError}
|
|
455
|
+
*/
|
|
456
|
+
apiV1OauthPlatformUrlGet(platform, userId, redirectUrl, options) {
|
|
457
|
+
return localVarFp.apiV1OauthPlatformUrlGet(platform, userId, redirectUrl, options).then((request) => request(axios, basePath));
|
|
458
|
+
},
|
|
459
|
+
};
|
|
460
|
+
};
|
|
461
|
+
exports.OauthApiFactory = OauthApiFactory;
|
|
462
|
+
/**
|
|
463
|
+
* OauthApi - object-oriented interface
|
|
464
|
+
*/
|
|
465
|
+
class OauthApi extends base_1.BaseAPI {
|
|
466
|
+
/**
|
|
467
|
+
* Callback endpoint for social platform OAuth flows. On success, the social account is connected immediately and the response returns `status=connected`.
|
|
468
|
+
* @summary OAuth callback endpoint
|
|
469
|
+
* @param {string} platform Platform name (youtube, tiktok, instagram, pinterest)
|
|
470
|
+
* @param {string} code Authorization code from the platform
|
|
471
|
+
* @param {string} state State parameter for CSRF protection
|
|
472
|
+
* @param {*} [options] Override http request option.
|
|
473
|
+
* @throws {RequiredError}
|
|
474
|
+
*/
|
|
475
|
+
apiV1OauthPlatformCallbackGet(platform, code, state, options) {
|
|
476
|
+
return (0, exports.OauthApiFp)(this.configuration).apiV1OauthPlatformCallbackGet(platform, code, state, options).then((request) => request(this.axios, this.basePath));
|
|
477
|
+
}
|
|
478
|
+
/**
|
|
479
|
+
* Returns an authorization URL for the user to authenticate with the specified social platform.
|
|
480
|
+
* @summary Generate OAuth authorization URL
|
|
481
|
+
* @param {string} platform Platform name (youtube, tiktok, instagram, pinterest)
|
|
482
|
+
* @param {string} userId User ID
|
|
483
|
+
* @param {string} [redirectUrl] URL to redirect to after OAuth callback
|
|
484
|
+
* @param {*} [options] Override http request option.
|
|
485
|
+
* @throws {RequiredError}
|
|
486
|
+
*/
|
|
487
|
+
apiV1OauthPlatformUrlGet(platform, userId, redirectUrl, options) {
|
|
488
|
+
return (0, exports.OauthApiFp)(this.configuration).apiV1OauthPlatformUrlGet(platform, userId, redirectUrl, options).then((request) => request(this.axios, this.basePath));
|
|
489
|
+
}
|
|
490
|
+
}
|
|
491
|
+
exports.OauthApi = OauthApi;
|
|
492
|
+
/**
|
|
493
|
+
* PostsApi - axios parameter creator
|
|
494
|
+
*/
|
|
495
|
+
const PostsApiAxiosParamCreator = function (configuration) {
|
|
496
|
+
return {
|
|
497
|
+
/**
|
|
498
|
+
* Returns all posts for a user.
|
|
499
|
+
* @summary List posts
|
|
500
|
+
* @param {string} userId User ID
|
|
501
|
+
* @param {*} [options] Override http request option.
|
|
502
|
+
* @throws {RequiredError}
|
|
503
|
+
*/
|
|
504
|
+
apiV1UsersUserIdPostsGet: (userId_1, ...args_1) => __awaiter(this, [userId_1, ...args_1], void 0, function* (userId, options = {}) {
|
|
505
|
+
// verify required parameter 'userId' is not null or undefined
|
|
506
|
+
(0, common_1.assertParamExists)('apiV1UsersUserIdPostsGet', 'userId', userId);
|
|
507
|
+
const localVarPath = `/api/v1/users/{userId}/posts`
|
|
508
|
+
.replace(`{${"userId"}}`, encodeURIComponent(String(userId)));
|
|
509
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
510
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
511
|
+
let baseOptions;
|
|
512
|
+
if (configuration) {
|
|
513
|
+
baseOptions = configuration.baseOptions;
|
|
514
|
+
}
|
|
515
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
516
|
+
const localVarHeaderParameter = {};
|
|
517
|
+
const localVarQueryParameter = {};
|
|
518
|
+
// authentication ApiKeyAuth required
|
|
519
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-api-key", configuration);
|
|
520
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
521
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
522
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
523
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
524
|
+
return {
|
|
525
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
526
|
+
options: localVarRequestOptions,
|
|
527
|
+
};
|
|
528
|
+
}),
|
|
529
|
+
/**
|
|
530
|
+
* Creates a post for one or more connected social accounts and enqueues publish tasks.
|
|
531
|
+
* @summary Create a new post
|
|
532
|
+
* @param {string} userId User ID
|
|
533
|
+
* @param {HandlersCreatePostRequest} body Post payload
|
|
534
|
+
* @param {string} [idempotencyKey] Idempotency key for safe retries (optional)
|
|
535
|
+
* @param {*} [options] Override http request option.
|
|
536
|
+
* @throws {RequiredError}
|
|
537
|
+
*/
|
|
538
|
+
apiV1UsersUserIdPostsPost: (userId_1, body_1, idempotencyKey_1, ...args_1) => __awaiter(this, [userId_1, body_1, idempotencyKey_1, ...args_1], void 0, function* (userId, body, idempotencyKey, options = {}) {
|
|
539
|
+
// verify required parameter 'userId' is not null or undefined
|
|
540
|
+
(0, common_1.assertParamExists)('apiV1UsersUserIdPostsPost', 'userId', userId);
|
|
541
|
+
// verify required parameter 'body' is not null or undefined
|
|
542
|
+
(0, common_1.assertParamExists)('apiV1UsersUserIdPostsPost', 'body', body);
|
|
543
|
+
const localVarPath = `/api/v1/users/{userId}/posts`
|
|
544
|
+
.replace(`{${"userId"}}`, encodeURIComponent(String(userId)));
|
|
545
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
546
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
547
|
+
let baseOptions;
|
|
548
|
+
if (configuration) {
|
|
549
|
+
baseOptions = configuration.baseOptions;
|
|
550
|
+
}
|
|
551
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
552
|
+
const localVarHeaderParameter = {};
|
|
553
|
+
const localVarQueryParameter = {};
|
|
554
|
+
// authentication ApiKeyAuth required
|
|
555
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-api-key", configuration);
|
|
556
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
557
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
558
|
+
if (idempotencyKey != null) {
|
|
559
|
+
localVarHeaderParameter['Idempotency-Key'] = String(idempotencyKey);
|
|
560
|
+
}
|
|
561
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
562
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
563
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
564
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(body, localVarRequestOptions, configuration);
|
|
565
|
+
return {
|
|
566
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
567
|
+
options: localVarRequestOptions,
|
|
568
|
+
};
|
|
569
|
+
}),
|
|
570
|
+
/**
|
|
571
|
+
* Returns a post with all social publication targets.
|
|
572
|
+
* @summary Get post
|
|
573
|
+
* @param {string} userId User ID
|
|
574
|
+
* @param {string} postId Post ID
|
|
575
|
+
* @param {*} [options] Override http request option.
|
|
576
|
+
* @throws {RequiredError}
|
|
577
|
+
*/
|
|
578
|
+
apiV1UsersUserIdPostsPostIdGet: (userId_1, postId_1, ...args_1) => __awaiter(this, [userId_1, postId_1, ...args_1], void 0, function* (userId, postId, options = {}) {
|
|
579
|
+
// verify required parameter 'userId' is not null or undefined
|
|
580
|
+
(0, common_1.assertParamExists)('apiV1UsersUserIdPostsPostIdGet', 'userId', userId);
|
|
581
|
+
// verify required parameter 'postId' is not null or undefined
|
|
582
|
+
(0, common_1.assertParamExists)('apiV1UsersUserIdPostsPostIdGet', 'postId', postId);
|
|
583
|
+
const localVarPath = `/api/v1/users/{userId}/posts/{postId}`
|
|
584
|
+
.replace(`{${"userId"}}`, encodeURIComponent(String(userId)))
|
|
585
|
+
.replace(`{${"postId"}}`, encodeURIComponent(String(postId)));
|
|
586
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
587
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
588
|
+
let baseOptions;
|
|
589
|
+
if (configuration) {
|
|
590
|
+
baseOptions = configuration.baseOptions;
|
|
591
|
+
}
|
|
592
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
593
|
+
const localVarHeaderParameter = {};
|
|
594
|
+
const localVarQueryParameter = {};
|
|
595
|
+
// authentication ApiKeyAuth required
|
|
596
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-api-key", configuration);
|
|
597
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
598
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
599
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
600
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
601
|
+
return {
|
|
602
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
603
|
+
options: localVarRequestOptions,
|
|
604
|
+
};
|
|
605
|
+
}),
|
|
606
|
+
/**
|
|
607
|
+
* Retries publish for a specific social target row.
|
|
608
|
+
* @summary Retry post publish for a failed target
|
|
609
|
+
* @param {string} userId User ID
|
|
610
|
+
* @param {string} postId Post ID
|
|
611
|
+
* @param {string} targetId Post target ID
|
|
612
|
+
* @param {*} [options] Override http request option.
|
|
613
|
+
* @throws {RequiredError}
|
|
614
|
+
*/
|
|
615
|
+
apiV1UsersUserIdPostsPostIdTargetsTargetIdRetryPost: (userId_1, postId_1, targetId_1, ...args_1) => __awaiter(this, [userId_1, postId_1, targetId_1, ...args_1], void 0, function* (userId, postId, targetId, options = {}) {
|
|
616
|
+
// verify required parameter 'userId' is not null or undefined
|
|
617
|
+
(0, common_1.assertParamExists)('apiV1UsersUserIdPostsPostIdTargetsTargetIdRetryPost', 'userId', userId);
|
|
618
|
+
// verify required parameter 'postId' is not null or undefined
|
|
619
|
+
(0, common_1.assertParamExists)('apiV1UsersUserIdPostsPostIdTargetsTargetIdRetryPost', 'postId', postId);
|
|
620
|
+
// verify required parameter 'targetId' is not null or undefined
|
|
621
|
+
(0, common_1.assertParamExists)('apiV1UsersUserIdPostsPostIdTargetsTargetIdRetryPost', 'targetId', targetId);
|
|
622
|
+
const localVarPath = `/api/v1/users/{userId}/posts/{postId}/targets/{targetId}/retry`
|
|
623
|
+
.replace(`{${"userId"}}`, encodeURIComponent(String(userId)))
|
|
624
|
+
.replace(`{${"postId"}}`, encodeURIComponent(String(postId)))
|
|
625
|
+
.replace(`{${"targetId"}}`, encodeURIComponent(String(targetId)));
|
|
626
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
627
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
628
|
+
let baseOptions;
|
|
629
|
+
if (configuration) {
|
|
630
|
+
baseOptions = configuration.baseOptions;
|
|
631
|
+
}
|
|
632
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
633
|
+
const localVarHeaderParameter = {};
|
|
634
|
+
const localVarQueryParameter = {};
|
|
635
|
+
// authentication ApiKeyAuth required
|
|
636
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-api-key", configuration);
|
|
637
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
638
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
639
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
640
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
641
|
+
return {
|
|
642
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
643
|
+
options: localVarRequestOptions,
|
|
644
|
+
};
|
|
645
|
+
}),
|
|
646
|
+
};
|
|
647
|
+
};
|
|
648
|
+
exports.PostsApiAxiosParamCreator = PostsApiAxiosParamCreator;
|
|
649
|
+
/**
|
|
650
|
+
* PostsApi - functional programming interface
|
|
651
|
+
*/
|
|
652
|
+
const PostsApiFp = function (configuration) {
|
|
653
|
+
const localVarAxiosParamCreator = (0, exports.PostsApiAxiosParamCreator)(configuration);
|
|
654
|
+
return {
|
|
655
|
+
/**
|
|
656
|
+
* Returns all posts for a user.
|
|
657
|
+
* @summary List posts
|
|
658
|
+
* @param {string} userId User ID
|
|
659
|
+
* @param {*} [options] Override http request option.
|
|
660
|
+
* @throws {RequiredError}
|
|
661
|
+
*/
|
|
662
|
+
apiV1UsersUserIdPostsGet(userId, options) {
|
|
663
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
664
|
+
var _a, _b, _c;
|
|
665
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.apiV1UsersUserIdPostsGet(userId, options);
|
|
666
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
667
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['PostsApi.apiV1UsersUserIdPostsGet']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
668
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
669
|
+
});
|
|
670
|
+
},
|
|
671
|
+
/**
|
|
672
|
+
* Creates a post for one or more connected social accounts and enqueues publish tasks.
|
|
673
|
+
* @summary Create a new post
|
|
674
|
+
* @param {string} userId User ID
|
|
675
|
+
* @param {HandlersCreatePostRequest} body Post payload
|
|
676
|
+
* @param {string} [idempotencyKey] Idempotency key for safe retries (optional)
|
|
677
|
+
* @param {*} [options] Override http request option.
|
|
678
|
+
* @throws {RequiredError}
|
|
679
|
+
*/
|
|
680
|
+
apiV1UsersUserIdPostsPost(userId, body, idempotencyKey, options) {
|
|
681
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
682
|
+
var _a, _b, _c;
|
|
683
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.apiV1UsersUserIdPostsPost(userId, body, idempotencyKey, options);
|
|
684
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
685
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['PostsApi.apiV1UsersUserIdPostsPost']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
686
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
687
|
+
});
|
|
688
|
+
},
|
|
689
|
+
/**
|
|
690
|
+
* Returns a post with all social publication targets.
|
|
691
|
+
* @summary Get post
|
|
692
|
+
* @param {string} userId User ID
|
|
693
|
+
* @param {string} postId Post ID
|
|
694
|
+
* @param {*} [options] Override http request option.
|
|
695
|
+
* @throws {RequiredError}
|
|
696
|
+
*/
|
|
697
|
+
apiV1UsersUserIdPostsPostIdGet(userId, postId, options) {
|
|
698
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
699
|
+
var _a, _b, _c;
|
|
700
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.apiV1UsersUserIdPostsPostIdGet(userId, postId, options);
|
|
701
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
702
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['PostsApi.apiV1UsersUserIdPostsPostIdGet']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
703
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
704
|
+
});
|
|
705
|
+
},
|
|
706
|
+
/**
|
|
707
|
+
* Retries publish for a specific social target row.
|
|
708
|
+
* @summary Retry post publish for a failed target
|
|
709
|
+
* @param {string} userId User ID
|
|
710
|
+
* @param {string} postId Post ID
|
|
711
|
+
* @param {string} targetId Post target ID
|
|
712
|
+
* @param {*} [options] Override http request option.
|
|
713
|
+
* @throws {RequiredError}
|
|
714
|
+
*/
|
|
715
|
+
apiV1UsersUserIdPostsPostIdTargetsTargetIdRetryPost(userId, postId, targetId, options) {
|
|
716
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
717
|
+
var _a, _b, _c;
|
|
718
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.apiV1UsersUserIdPostsPostIdTargetsTargetIdRetryPost(userId, postId, targetId, options);
|
|
719
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
720
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['PostsApi.apiV1UsersUserIdPostsPostIdTargetsTargetIdRetryPost']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
721
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
722
|
+
});
|
|
723
|
+
},
|
|
724
|
+
};
|
|
725
|
+
};
|
|
726
|
+
exports.PostsApiFp = PostsApiFp;
|
|
727
|
+
/**
|
|
728
|
+
* PostsApi - factory interface
|
|
729
|
+
*/
|
|
730
|
+
const PostsApiFactory = function (configuration, basePath, axios) {
|
|
731
|
+
const localVarFp = (0, exports.PostsApiFp)(configuration);
|
|
732
|
+
return {
|
|
733
|
+
/**
|
|
734
|
+
* Returns all posts for a user.
|
|
735
|
+
* @summary List posts
|
|
736
|
+
* @param {string} userId User ID
|
|
737
|
+
* @param {*} [options] Override http request option.
|
|
738
|
+
* @throws {RequiredError}
|
|
739
|
+
*/
|
|
740
|
+
apiV1UsersUserIdPostsGet(userId, options) {
|
|
741
|
+
return localVarFp.apiV1UsersUserIdPostsGet(userId, options).then((request) => request(axios, basePath));
|
|
742
|
+
},
|
|
743
|
+
/**
|
|
744
|
+
* Creates a post for one or more connected social accounts and enqueues publish tasks.
|
|
745
|
+
* @summary Create a new post
|
|
746
|
+
* @param {string} userId User ID
|
|
747
|
+
* @param {HandlersCreatePostRequest} body Post payload
|
|
748
|
+
* @param {string} [idempotencyKey] Idempotency key for safe retries (optional)
|
|
749
|
+
* @param {*} [options] Override http request option.
|
|
750
|
+
* @throws {RequiredError}
|
|
751
|
+
*/
|
|
752
|
+
apiV1UsersUserIdPostsPost(userId, body, idempotencyKey, options) {
|
|
753
|
+
return localVarFp.apiV1UsersUserIdPostsPost(userId, body, idempotencyKey, options).then((request) => request(axios, basePath));
|
|
754
|
+
},
|
|
755
|
+
/**
|
|
756
|
+
* Returns a post with all social publication targets.
|
|
757
|
+
* @summary Get post
|
|
758
|
+
* @param {string} userId User ID
|
|
759
|
+
* @param {string} postId Post ID
|
|
760
|
+
* @param {*} [options] Override http request option.
|
|
761
|
+
* @throws {RequiredError}
|
|
762
|
+
*/
|
|
763
|
+
apiV1UsersUserIdPostsPostIdGet(userId, postId, options) {
|
|
764
|
+
return localVarFp.apiV1UsersUserIdPostsPostIdGet(userId, postId, options).then((request) => request(axios, basePath));
|
|
765
|
+
},
|
|
766
|
+
/**
|
|
767
|
+
* Retries publish for a specific social target row.
|
|
768
|
+
* @summary Retry post publish for a failed target
|
|
769
|
+
* @param {string} userId User ID
|
|
770
|
+
* @param {string} postId Post ID
|
|
771
|
+
* @param {string} targetId Post target ID
|
|
772
|
+
* @param {*} [options] Override http request option.
|
|
773
|
+
* @throws {RequiredError}
|
|
774
|
+
*/
|
|
775
|
+
apiV1UsersUserIdPostsPostIdTargetsTargetIdRetryPost(userId, postId, targetId, options) {
|
|
776
|
+
return localVarFp.apiV1UsersUserIdPostsPostIdTargetsTargetIdRetryPost(userId, postId, targetId, options).then((request) => request(axios, basePath));
|
|
777
|
+
},
|
|
778
|
+
};
|
|
779
|
+
};
|
|
780
|
+
exports.PostsApiFactory = PostsApiFactory;
|
|
781
|
+
/**
|
|
782
|
+
* PostsApi - object-oriented interface
|
|
783
|
+
*/
|
|
784
|
+
class PostsApi extends base_1.BaseAPI {
|
|
785
|
+
/**
|
|
786
|
+
* Returns all posts for a user.
|
|
787
|
+
* @summary List posts
|
|
788
|
+
* @param {string} userId User ID
|
|
789
|
+
* @param {*} [options] Override http request option.
|
|
790
|
+
* @throws {RequiredError}
|
|
791
|
+
*/
|
|
792
|
+
apiV1UsersUserIdPostsGet(userId, options) {
|
|
793
|
+
return (0, exports.PostsApiFp)(this.configuration).apiV1UsersUserIdPostsGet(userId, options).then((request) => request(this.axios, this.basePath));
|
|
794
|
+
}
|
|
795
|
+
/**
|
|
796
|
+
* Creates a post for one or more connected social accounts and enqueues publish tasks.
|
|
797
|
+
* @summary Create a new post
|
|
798
|
+
* @param {string} userId User ID
|
|
799
|
+
* @param {HandlersCreatePostRequest} body Post payload
|
|
800
|
+
* @param {string} [idempotencyKey] Idempotency key for safe retries (optional)
|
|
801
|
+
* @param {*} [options] Override http request option.
|
|
802
|
+
* @throws {RequiredError}
|
|
803
|
+
*/
|
|
804
|
+
apiV1UsersUserIdPostsPost(userId, body, idempotencyKey, options) {
|
|
805
|
+
return (0, exports.PostsApiFp)(this.configuration).apiV1UsersUserIdPostsPost(userId, body, idempotencyKey, options).then((request) => request(this.axios, this.basePath));
|
|
806
|
+
}
|
|
807
|
+
/**
|
|
808
|
+
* Returns a post with all social publication targets.
|
|
809
|
+
* @summary Get post
|
|
810
|
+
* @param {string} userId User ID
|
|
811
|
+
* @param {string} postId Post ID
|
|
812
|
+
* @param {*} [options] Override http request option.
|
|
813
|
+
* @throws {RequiredError}
|
|
814
|
+
*/
|
|
815
|
+
apiV1UsersUserIdPostsPostIdGet(userId, postId, options) {
|
|
816
|
+
return (0, exports.PostsApiFp)(this.configuration).apiV1UsersUserIdPostsPostIdGet(userId, postId, options).then((request) => request(this.axios, this.basePath));
|
|
817
|
+
}
|
|
818
|
+
/**
|
|
819
|
+
* Retries publish for a specific social target row.
|
|
820
|
+
* @summary Retry post publish for a failed target
|
|
821
|
+
* @param {string} userId User ID
|
|
822
|
+
* @param {string} postId Post ID
|
|
823
|
+
* @param {string} targetId Post target ID
|
|
824
|
+
* @param {*} [options] Override http request option.
|
|
825
|
+
* @throws {RequiredError}
|
|
826
|
+
*/
|
|
827
|
+
apiV1UsersUserIdPostsPostIdTargetsTargetIdRetryPost(userId, postId, targetId, options) {
|
|
828
|
+
return (0, exports.PostsApiFp)(this.configuration).apiV1UsersUserIdPostsPostIdTargetsTargetIdRetryPost(userId, postId, targetId, options).then((request) => request(this.axios, this.basePath));
|
|
829
|
+
}
|
|
830
|
+
}
|
|
831
|
+
exports.PostsApi = PostsApi;
|
|
832
|
+
/**
|
|
833
|
+
* PublishApi - axios parameter creator
|
|
834
|
+
*/
|
|
835
|
+
const PublishApiAxiosParamCreator = function (configuration) {
|
|
836
|
+
return {
|
|
837
|
+
/**
|
|
838
|
+
* Returns the current status and results of a publish task.
|
|
839
|
+
* @summary Get publish task status
|
|
840
|
+
* @param {string} jobId Job ID
|
|
841
|
+
* @param {*} [options] Override http request option.
|
|
842
|
+
* @throws {RequiredError}
|
|
843
|
+
*/
|
|
844
|
+
apiV1PublishJobsJobIdGet: (jobId_1, ...args_1) => __awaiter(this, [jobId_1, ...args_1], void 0, function* (jobId, options = {}) {
|
|
845
|
+
// verify required parameter 'jobId' is not null or undefined
|
|
846
|
+
(0, common_1.assertParamExists)('apiV1PublishJobsJobIdGet', 'jobId', jobId);
|
|
847
|
+
const localVarPath = `/api/v1/publish-jobs/{jobId}`
|
|
848
|
+
.replace(`{${"jobId"}}`, encodeURIComponent(String(jobId)));
|
|
849
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
850
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
851
|
+
let baseOptions;
|
|
852
|
+
if (configuration) {
|
|
853
|
+
baseOptions = configuration.baseOptions;
|
|
854
|
+
}
|
|
855
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
856
|
+
const localVarHeaderParameter = {};
|
|
857
|
+
const localVarQueryParameter = {};
|
|
858
|
+
// authentication ApiKeyAuth required
|
|
859
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-api-key", configuration);
|
|
860
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
861
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
862
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
863
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
864
|
+
return {
|
|
865
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
866
|
+
options: localVarRequestOptions,
|
|
867
|
+
};
|
|
868
|
+
}),
|
|
869
|
+
};
|
|
870
|
+
};
|
|
871
|
+
exports.PublishApiAxiosParamCreator = PublishApiAxiosParamCreator;
|
|
872
|
+
/**
|
|
873
|
+
* PublishApi - functional programming interface
|
|
874
|
+
*/
|
|
875
|
+
const PublishApiFp = function (configuration) {
|
|
876
|
+
const localVarAxiosParamCreator = (0, exports.PublishApiAxiosParamCreator)(configuration);
|
|
877
|
+
return {
|
|
878
|
+
/**
|
|
879
|
+
* Returns the current status and results of a publish task.
|
|
880
|
+
* @summary Get publish task status
|
|
881
|
+
* @param {string} jobId Job ID
|
|
882
|
+
* @param {*} [options] Override http request option.
|
|
883
|
+
* @throws {RequiredError}
|
|
884
|
+
*/
|
|
885
|
+
apiV1PublishJobsJobIdGet(jobId, options) {
|
|
886
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
887
|
+
var _a, _b, _c;
|
|
888
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.apiV1PublishJobsJobIdGet(jobId, options);
|
|
889
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
890
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['PublishApi.apiV1PublishJobsJobIdGet']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
891
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
892
|
+
});
|
|
893
|
+
},
|
|
894
|
+
};
|
|
895
|
+
};
|
|
896
|
+
exports.PublishApiFp = PublishApiFp;
|
|
897
|
+
/**
|
|
898
|
+
* PublishApi - factory interface
|
|
899
|
+
*/
|
|
900
|
+
const PublishApiFactory = function (configuration, basePath, axios) {
|
|
901
|
+
const localVarFp = (0, exports.PublishApiFp)(configuration);
|
|
902
|
+
return {
|
|
903
|
+
/**
|
|
904
|
+
* Returns the current status and results of a publish task.
|
|
905
|
+
* @summary Get publish task status
|
|
906
|
+
* @param {string} jobId Job ID
|
|
907
|
+
* @param {*} [options] Override http request option.
|
|
908
|
+
* @throws {RequiredError}
|
|
909
|
+
*/
|
|
910
|
+
apiV1PublishJobsJobIdGet(jobId, options) {
|
|
911
|
+
return localVarFp.apiV1PublishJobsJobIdGet(jobId, options).then((request) => request(axios, basePath));
|
|
912
|
+
},
|
|
913
|
+
};
|
|
914
|
+
};
|
|
915
|
+
exports.PublishApiFactory = PublishApiFactory;
|
|
916
|
+
/**
|
|
917
|
+
* PublishApi - object-oriented interface
|
|
918
|
+
*/
|
|
919
|
+
class PublishApi extends base_1.BaseAPI {
|
|
920
|
+
/**
|
|
921
|
+
* Returns the current status and results of a publish task.
|
|
922
|
+
* @summary Get publish task status
|
|
923
|
+
* @param {string} jobId Job ID
|
|
924
|
+
* @param {*} [options] Override http request option.
|
|
925
|
+
* @throws {RequiredError}
|
|
926
|
+
*/
|
|
927
|
+
apiV1PublishJobsJobIdGet(jobId, options) {
|
|
928
|
+
return (0, exports.PublishApiFp)(this.configuration).apiV1PublishJobsJobIdGet(jobId, options).then((request) => request(this.axios, this.basePath));
|
|
929
|
+
}
|
|
930
|
+
}
|
|
931
|
+
exports.PublishApi = PublishApi;
|
|
932
|
+
/**
|
|
933
|
+
* UsersApi - axios parameter creator
|
|
934
|
+
*/
|
|
935
|
+
const UsersApiAxiosParamCreator = function (configuration) {
|
|
936
|
+
return {
|
|
937
|
+
/**
|
|
938
|
+
* Creates a new user or retrieves an existing one for an organization. Idempotent by externalId.
|
|
939
|
+
* @summary Create or retrieve a user
|
|
940
|
+
* @param {HandlersCreateUserRequest} body Create user request
|
|
941
|
+
* @param {*} [options] Override http request option.
|
|
942
|
+
* @throws {RequiredError}
|
|
943
|
+
*/
|
|
944
|
+
apiV1UsersPost: (body_1, ...args_1) => __awaiter(this, [body_1, ...args_1], void 0, function* (body, options = {}) {
|
|
945
|
+
// verify required parameter 'body' is not null or undefined
|
|
946
|
+
(0, common_1.assertParamExists)('apiV1UsersPost', 'body', body);
|
|
947
|
+
const localVarPath = `/api/v1/users`;
|
|
948
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
949
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
950
|
+
let baseOptions;
|
|
951
|
+
if (configuration) {
|
|
952
|
+
baseOptions = configuration.baseOptions;
|
|
953
|
+
}
|
|
954
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
955
|
+
const localVarHeaderParameter = {};
|
|
956
|
+
const localVarQueryParameter = {};
|
|
957
|
+
// authentication ApiKeyAuth required
|
|
958
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-api-key", configuration);
|
|
959
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
960
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
961
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
962
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
963
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
964
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(body, localVarRequestOptions, configuration);
|
|
965
|
+
return {
|
|
966
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
967
|
+
options: localVarRequestOptions,
|
|
968
|
+
};
|
|
969
|
+
}),
|
|
970
|
+
/**
|
|
971
|
+
* Revokes access to a connected social media account.
|
|
972
|
+
* @summary Disconnect a social media account
|
|
973
|
+
* @param {string} userId User ID
|
|
974
|
+
* @param {string} accountId Account ID
|
|
975
|
+
* @param {*} [options] Override http request option.
|
|
976
|
+
* @throws {RequiredError}
|
|
977
|
+
*/
|
|
978
|
+
apiV1UsersUserIdAccountsAccountIdDelete: (userId_1, accountId_1, ...args_1) => __awaiter(this, [userId_1, accountId_1, ...args_1], void 0, function* (userId, accountId, options = {}) {
|
|
979
|
+
// verify required parameter 'userId' is not null or undefined
|
|
980
|
+
(0, common_1.assertParamExists)('apiV1UsersUserIdAccountsAccountIdDelete', 'userId', userId);
|
|
981
|
+
// verify required parameter 'accountId' is not null or undefined
|
|
982
|
+
(0, common_1.assertParamExists)('apiV1UsersUserIdAccountsAccountIdDelete', 'accountId', accountId);
|
|
983
|
+
const localVarPath = `/api/v1/users/{userId}/accounts/{accountId}`
|
|
984
|
+
.replace(`{${"userId"}}`, encodeURIComponent(String(userId)))
|
|
985
|
+
.replace(`{${"accountId"}}`, encodeURIComponent(String(accountId)));
|
|
986
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
987
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
988
|
+
let baseOptions;
|
|
989
|
+
if (configuration) {
|
|
990
|
+
baseOptions = configuration.baseOptions;
|
|
991
|
+
}
|
|
992
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
|
|
993
|
+
const localVarHeaderParameter = {};
|
|
994
|
+
const localVarQueryParameter = {};
|
|
995
|
+
// authentication ApiKeyAuth required
|
|
996
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-api-key", configuration);
|
|
997
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
998
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
999
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1000
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1001
|
+
return {
|
|
1002
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
1003
|
+
options: localVarRequestOptions,
|
|
1004
|
+
};
|
|
1005
|
+
}),
|
|
1006
|
+
/**
|
|
1007
|
+
* Returns all connected social media accounts for a specific user.
|
|
1008
|
+
* @summary List social media accounts for a user
|
|
1009
|
+
* @param {string} userId User ID
|
|
1010
|
+
* @param {*} [options] Override http request option.
|
|
1011
|
+
* @throws {RequiredError}
|
|
1012
|
+
*/
|
|
1013
|
+
apiV1UsersUserIdAccountsGet: (userId_1, ...args_1) => __awaiter(this, [userId_1, ...args_1], void 0, function* (userId, options = {}) {
|
|
1014
|
+
// verify required parameter 'userId' is not null or undefined
|
|
1015
|
+
(0, common_1.assertParamExists)('apiV1UsersUserIdAccountsGet', 'userId', userId);
|
|
1016
|
+
const localVarPath = `/api/v1/users/{userId}/accounts`
|
|
1017
|
+
.replace(`{${"userId"}}`, encodeURIComponent(String(userId)));
|
|
1018
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1019
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
1020
|
+
let baseOptions;
|
|
1021
|
+
if (configuration) {
|
|
1022
|
+
baseOptions = configuration.baseOptions;
|
|
1023
|
+
}
|
|
1024
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
1025
|
+
const localVarHeaderParameter = {};
|
|
1026
|
+
const localVarQueryParameter = {};
|
|
1027
|
+
// authentication ApiKeyAuth required
|
|
1028
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-api-key", configuration);
|
|
1029
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
1030
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
1031
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1032
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1033
|
+
return {
|
|
1034
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
1035
|
+
options: localVarRequestOptions,
|
|
1036
|
+
};
|
|
1037
|
+
}),
|
|
1038
|
+
};
|
|
1039
|
+
};
|
|
1040
|
+
exports.UsersApiAxiosParamCreator = UsersApiAxiosParamCreator;
|
|
1041
|
+
/**
|
|
1042
|
+
* UsersApi - functional programming interface
|
|
1043
|
+
*/
|
|
1044
|
+
const UsersApiFp = function (configuration) {
|
|
1045
|
+
const localVarAxiosParamCreator = (0, exports.UsersApiAxiosParamCreator)(configuration);
|
|
1046
|
+
return {
|
|
1047
|
+
/**
|
|
1048
|
+
* Creates a new user or retrieves an existing one for an organization. Idempotent by externalId.
|
|
1049
|
+
* @summary Create or retrieve a user
|
|
1050
|
+
* @param {HandlersCreateUserRequest} body Create user request
|
|
1051
|
+
* @param {*} [options] Override http request option.
|
|
1052
|
+
* @throws {RequiredError}
|
|
1053
|
+
*/
|
|
1054
|
+
apiV1UsersPost(body, options) {
|
|
1055
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1056
|
+
var _a, _b, _c;
|
|
1057
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.apiV1UsersPost(body, options);
|
|
1058
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
1059
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['UsersApi.apiV1UsersPost']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
1060
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1061
|
+
});
|
|
1062
|
+
},
|
|
1063
|
+
/**
|
|
1064
|
+
* Revokes access to a connected social media account.
|
|
1065
|
+
* @summary Disconnect a social media account
|
|
1066
|
+
* @param {string} userId User ID
|
|
1067
|
+
* @param {string} accountId Account ID
|
|
1068
|
+
* @param {*} [options] Override http request option.
|
|
1069
|
+
* @throws {RequiredError}
|
|
1070
|
+
*/
|
|
1071
|
+
apiV1UsersUserIdAccountsAccountIdDelete(userId, accountId, options) {
|
|
1072
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1073
|
+
var _a, _b, _c;
|
|
1074
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.apiV1UsersUserIdAccountsAccountIdDelete(userId, accountId, options);
|
|
1075
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
1076
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['UsersApi.apiV1UsersUserIdAccountsAccountIdDelete']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
1077
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1078
|
+
});
|
|
1079
|
+
},
|
|
1080
|
+
/**
|
|
1081
|
+
* Returns all connected social media accounts for a specific user.
|
|
1082
|
+
* @summary List social media accounts for a user
|
|
1083
|
+
* @param {string} userId User ID
|
|
1084
|
+
* @param {*} [options] Override http request option.
|
|
1085
|
+
* @throws {RequiredError}
|
|
1086
|
+
*/
|
|
1087
|
+
apiV1UsersUserIdAccountsGet(userId, options) {
|
|
1088
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1089
|
+
var _a, _b, _c;
|
|
1090
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.apiV1UsersUserIdAccountsGet(userId, options);
|
|
1091
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
1092
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['UsersApi.apiV1UsersUserIdAccountsGet']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
1093
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1094
|
+
});
|
|
1095
|
+
},
|
|
1096
|
+
};
|
|
1097
|
+
};
|
|
1098
|
+
exports.UsersApiFp = UsersApiFp;
|
|
1099
|
+
/**
|
|
1100
|
+
* UsersApi - factory interface
|
|
1101
|
+
*/
|
|
1102
|
+
const UsersApiFactory = function (configuration, basePath, axios) {
|
|
1103
|
+
const localVarFp = (0, exports.UsersApiFp)(configuration);
|
|
1104
|
+
return {
|
|
1105
|
+
/**
|
|
1106
|
+
* Creates a new user or retrieves an existing one for an organization. Idempotent by externalId.
|
|
1107
|
+
* @summary Create or retrieve a user
|
|
1108
|
+
* @param {HandlersCreateUserRequest} body Create user request
|
|
1109
|
+
* @param {*} [options] Override http request option.
|
|
1110
|
+
* @throws {RequiredError}
|
|
1111
|
+
*/
|
|
1112
|
+
apiV1UsersPost(body, options) {
|
|
1113
|
+
return localVarFp.apiV1UsersPost(body, options).then((request) => request(axios, basePath));
|
|
1114
|
+
},
|
|
1115
|
+
/**
|
|
1116
|
+
* Revokes access to a connected social media account.
|
|
1117
|
+
* @summary Disconnect a social media account
|
|
1118
|
+
* @param {string} userId User ID
|
|
1119
|
+
* @param {string} accountId Account ID
|
|
1120
|
+
* @param {*} [options] Override http request option.
|
|
1121
|
+
* @throws {RequiredError}
|
|
1122
|
+
*/
|
|
1123
|
+
apiV1UsersUserIdAccountsAccountIdDelete(userId, accountId, options) {
|
|
1124
|
+
return localVarFp.apiV1UsersUserIdAccountsAccountIdDelete(userId, accountId, options).then((request) => request(axios, basePath));
|
|
1125
|
+
},
|
|
1126
|
+
/**
|
|
1127
|
+
* Returns all connected social media accounts for a specific user.
|
|
1128
|
+
* @summary List social media accounts for a user
|
|
1129
|
+
* @param {string} userId User ID
|
|
1130
|
+
* @param {*} [options] Override http request option.
|
|
1131
|
+
* @throws {RequiredError}
|
|
1132
|
+
*/
|
|
1133
|
+
apiV1UsersUserIdAccountsGet(userId, options) {
|
|
1134
|
+
return localVarFp.apiV1UsersUserIdAccountsGet(userId, options).then((request) => request(axios, basePath));
|
|
1135
|
+
},
|
|
1136
|
+
};
|
|
1137
|
+
};
|
|
1138
|
+
exports.UsersApiFactory = UsersApiFactory;
|
|
1139
|
+
/**
|
|
1140
|
+
* UsersApi - object-oriented interface
|
|
1141
|
+
*/
|
|
1142
|
+
class UsersApi extends base_1.BaseAPI {
|
|
1143
|
+
/**
|
|
1144
|
+
* Creates a new user or retrieves an existing one for an organization. Idempotent by externalId.
|
|
1145
|
+
* @summary Create or retrieve a user
|
|
1146
|
+
* @param {HandlersCreateUserRequest} body Create user request
|
|
1147
|
+
* @param {*} [options] Override http request option.
|
|
1148
|
+
* @throws {RequiredError}
|
|
1149
|
+
*/
|
|
1150
|
+
apiV1UsersPost(body, options) {
|
|
1151
|
+
return (0, exports.UsersApiFp)(this.configuration).apiV1UsersPost(body, options).then((request) => request(this.axios, this.basePath));
|
|
1152
|
+
}
|
|
1153
|
+
/**
|
|
1154
|
+
* Revokes access to a connected social media account.
|
|
1155
|
+
* @summary Disconnect a social media account
|
|
1156
|
+
* @param {string} userId User ID
|
|
1157
|
+
* @param {string} accountId Account ID
|
|
1158
|
+
* @param {*} [options] Override http request option.
|
|
1159
|
+
* @throws {RequiredError}
|
|
1160
|
+
*/
|
|
1161
|
+
apiV1UsersUserIdAccountsAccountIdDelete(userId, accountId, options) {
|
|
1162
|
+
return (0, exports.UsersApiFp)(this.configuration).apiV1UsersUserIdAccountsAccountIdDelete(userId, accountId, options).then((request) => request(this.axios, this.basePath));
|
|
1163
|
+
}
|
|
1164
|
+
/**
|
|
1165
|
+
* Returns all connected social media accounts for a specific user.
|
|
1166
|
+
* @summary List social media accounts for a user
|
|
1167
|
+
* @param {string} userId User ID
|
|
1168
|
+
* @param {*} [options] Override http request option.
|
|
1169
|
+
* @throws {RequiredError}
|
|
1170
|
+
*/
|
|
1171
|
+
apiV1UsersUserIdAccountsGet(userId, options) {
|
|
1172
|
+
return (0, exports.UsersApiFp)(this.configuration).apiV1UsersUserIdAccountsGet(userId, options).then((request) => request(this.axios, this.basePath));
|
|
1173
|
+
}
|
|
1174
|
+
}
|
|
1175
|
+
exports.UsersApi = UsersApi;
|
|
1176
|
+
/**
|
|
1177
|
+
* WaitlistApi - axios parameter creator
|
|
1178
|
+
*/
|
|
1179
|
+
const WaitlistApiAxiosParamCreator = function (configuration) {
|
|
1180
|
+
return {
|
|
1181
|
+
/**
|
|
1182
|
+
* Add an email address to the waitlist for early access.
|
|
1183
|
+
* @summary Join the waitlist
|
|
1184
|
+
* @param {HandlersWaitlistRequest} body Waitlist signup
|
|
1185
|
+
* @param {*} [options] Override http request option.
|
|
1186
|
+
* @throws {RequiredError}
|
|
1187
|
+
*/
|
|
1188
|
+
waitlistPost: (body_1, ...args_1) => __awaiter(this, [body_1, ...args_1], void 0, function* (body, options = {}) {
|
|
1189
|
+
// verify required parameter 'body' is not null or undefined
|
|
1190
|
+
(0, common_1.assertParamExists)('waitlistPost', 'body', body);
|
|
1191
|
+
const localVarPath = `/waitlist`;
|
|
1192
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1193
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
1194
|
+
let baseOptions;
|
|
1195
|
+
if (configuration) {
|
|
1196
|
+
baseOptions = configuration.baseOptions;
|
|
1197
|
+
}
|
|
1198
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
1199
|
+
const localVarHeaderParameter = {};
|
|
1200
|
+
const localVarQueryParameter = {};
|
|
1201
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
1202
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
1203
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
1204
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1205
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1206
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(body, localVarRequestOptions, configuration);
|
|
1207
|
+
return {
|
|
1208
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
1209
|
+
options: localVarRequestOptions,
|
|
1210
|
+
};
|
|
1211
|
+
}),
|
|
1212
|
+
};
|
|
1213
|
+
};
|
|
1214
|
+
exports.WaitlistApiAxiosParamCreator = WaitlistApiAxiosParamCreator;
|
|
1215
|
+
/**
|
|
1216
|
+
* WaitlistApi - functional programming interface
|
|
1217
|
+
*/
|
|
1218
|
+
const WaitlistApiFp = function (configuration) {
|
|
1219
|
+
const localVarAxiosParamCreator = (0, exports.WaitlistApiAxiosParamCreator)(configuration);
|
|
1220
|
+
return {
|
|
1221
|
+
/**
|
|
1222
|
+
* Add an email address to the waitlist for early access.
|
|
1223
|
+
* @summary Join the waitlist
|
|
1224
|
+
* @param {HandlersWaitlistRequest} body Waitlist signup
|
|
1225
|
+
* @param {*} [options] Override http request option.
|
|
1226
|
+
* @throws {RequiredError}
|
|
1227
|
+
*/
|
|
1228
|
+
waitlistPost(body, options) {
|
|
1229
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1230
|
+
var _a, _b, _c;
|
|
1231
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.waitlistPost(body, options);
|
|
1232
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
1233
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['WaitlistApi.waitlistPost']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
1234
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1235
|
+
});
|
|
1236
|
+
},
|
|
1237
|
+
};
|
|
1238
|
+
};
|
|
1239
|
+
exports.WaitlistApiFp = WaitlistApiFp;
|
|
1240
|
+
/**
|
|
1241
|
+
* WaitlistApi - factory interface
|
|
1242
|
+
*/
|
|
1243
|
+
const WaitlistApiFactory = function (configuration, basePath, axios) {
|
|
1244
|
+
const localVarFp = (0, exports.WaitlistApiFp)(configuration);
|
|
1245
|
+
return {
|
|
1246
|
+
/**
|
|
1247
|
+
* Add an email address to the waitlist for early access.
|
|
1248
|
+
* @summary Join the waitlist
|
|
1249
|
+
* @param {HandlersWaitlistRequest} body Waitlist signup
|
|
1250
|
+
* @param {*} [options] Override http request option.
|
|
1251
|
+
* @throws {RequiredError}
|
|
1252
|
+
*/
|
|
1253
|
+
waitlistPost(body, options) {
|
|
1254
|
+
return localVarFp.waitlistPost(body, options).then((request) => request(axios, basePath));
|
|
1255
|
+
},
|
|
1256
|
+
};
|
|
1257
|
+
};
|
|
1258
|
+
exports.WaitlistApiFactory = WaitlistApiFactory;
|
|
1259
|
+
/**
|
|
1260
|
+
* WaitlistApi - object-oriented interface
|
|
1261
|
+
*/
|
|
1262
|
+
class WaitlistApi extends base_1.BaseAPI {
|
|
1263
|
+
/**
|
|
1264
|
+
* Add an email address to the waitlist for early access.
|
|
1265
|
+
* @summary Join the waitlist
|
|
1266
|
+
* @param {HandlersWaitlistRequest} body Waitlist signup
|
|
1267
|
+
* @param {*} [options] Override http request option.
|
|
1268
|
+
* @throws {RequiredError}
|
|
1269
|
+
*/
|
|
1270
|
+
waitlistPost(body, options) {
|
|
1271
|
+
return (0, exports.WaitlistApiFp)(this.configuration).waitlistPost(body, options).then((request) => request(this.axios, this.basePath));
|
|
1272
|
+
}
|
|
1273
|
+
}
|
|
1274
|
+
exports.WaitlistApi = WaitlistApi;
|