postboost 1.0.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/.openapi-generator/FILES +72 -0
- package/.openapi-generator/VERSION +1 -0
- package/.openapi-generator-ignore +23 -0
- package/LICENSE +21 -0
- package/README.md +0 -0
- package/api/accountsApi.ts +247 -0
- package/api/apis.ts +28 -0
- package/api/mediaApi.ts +1007 -0
- package/api/postsApi.ts +827 -0
- package/api/receiptsApi.ts +541 -0
- package/api/subscriptionsApi.ts +856 -0
- package/api/tagsApi.ts +492 -0
- package/api/usersApi.ts +537 -0
- package/api/workspacesApi.ts +784 -0
- package/api.ts +3 -0
- package/git_push.sh +57 -0
- package/model/account.ts +94 -0
- package/model/addGenericSubscriptionRequest.ts +43 -0
- package/model/changeSubscriptionPlanRequest.ts +55 -0
- package/model/checkoutSubscription200Response.ts +31 -0
- package/model/checkoutSubscriptionRequest.ts +49 -0
- package/model/deleteMediaBulkRequest.ts +34 -0
- package/model/deleteMode.ts +22 -0
- package/model/deletePostRequest.ts +40 -0
- package/model/deletePostsBulkRequest.ts +52 -0
- package/model/deleteReceiptsBulkRequest.ts +31 -0
- package/model/deleteResult.ts +43 -0
- package/model/deleteUser400Response.ts +37 -0
- package/model/deleteUsersBulkRequest.ts +31 -0
- package/model/deleteWorkspacesBulkRequest.ts +31 -0
- package/model/getRemoteUploadStatus200Response.ts +49 -0
- package/model/initiateChunkedUpload200Response.ts +43 -0
- package/model/initiateChunkedUploadRequest.ts +46 -0
- package/model/initiateRemoteUpload200Response.ts +94 -0
- package/model/initiateRemoteUpload200ResponseOneOf.ts +31 -0
- package/model/initiateRemoteUploadRequest.ts +40 -0
- package/model/listAccounts200Response.ts +32 -0
- package/model/listMedia200Response.ts +46 -0
- package/model/listPosts200Response.ts +46 -0
- package/model/listReceipts200Response.ts +46 -0
- package/model/listTags200Response.ts +32 -0
- package/model/listUsers200Response.ts +46 -0
- package/model/listWorkspaces200Response.ts +46 -0
- package/model/media.ts +86 -0
- package/model/models.ts +443 -0
- package/model/paginationMeta.ts +39 -0
- package/model/paginationMetaLinks.ts +49 -0
- package/model/paginationMetaMeta.ts +61 -0
- package/model/post.ts +91 -0
- package/model/postContent.ts +55 -0
- package/model/postInput.ts +98 -0
- package/model/postStatus.ts +19 -0
- package/model/postVersion.ts +59 -0
- package/model/receipt.ts +85 -0
- package/model/receiptInput.ts +79 -0
- package/model/receiptUpdateInput.ts +73 -0
- package/model/removeUserFromWorkspaceRequest.ts +31 -0
- package/model/schedulePostRequest.ts +31 -0
- package/model/scheduleResult.ts +37 -0
- package/model/subscription.ts +76 -0
- package/model/subscriptionInput.ts +55 -0
- package/model/subscriptionStatus.ts +22 -0
- package/model/subscriptionUpdateInput.ts +58 -0
- package/model/tag.ts +49 -0
- package/model/tagInput.ts +37 -0
- package/model/updateMediaRequest.ts +34 -0
- package/model/uploadChunk200Response.ts +34 -0
- package/model/user.ts +61 -0
- package/model/userInput.ts +55 -0
- package/model/userUpdateInput.ts +58 -0
- package/model/workspace.ts +69 -0
- package/model/workspaceInput.ts +56 -0
- package/model/workspaceUserInput.ts +56 -0
- package/package.json +28 -0
- package/tsconfig.json +24 -0
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
.gitignore
|
|
2
|
+
.openapi-generator-ignore
|
|
3
|
+
api.ts
|
|
4
|
+
api/accountsApi.ts
|
|
5
|
+
api/apis.ts
|
|
6
|
+
api/mediaApi.ts
|
|
7
|
+
api/postsApi.ts
|
|
8
|
+
api/receiptsApi.ts
|
|
9
|
+
api/subscriptionsApi.ts
|
|
10
|
+
api/tagsApi.ts
|
|
11
|
+
api/usersApi.ts
|
|
12
|
+
api/workspacesApi.ts
|
|
13
|
+
git_push.sh
|
|
14
|
+
model/account.ts
|
|
15
|
+
model/addGenericSubscriptionRequest.ts
|
|
16
|
+
model/changeSubscriptionPlanRequest.ts
|
|
17
|
+
model/checkoutSubscription200Response.ts
|
|
18
|
+
model/checkoutSubscriptionRequest.ts
|
|
19
|
+
model/deleteMediaBulkRequest.ts
|
|
20
|
+
model/deleteMode.ts
|
|
21
|
+
model/deletePostRequest.ts
|
|
22
|
+
model/deletePostsBulkRequest.ts
|
|
23
|
+
model/deleteReceiptsBulkRequest.ts
|
|
24
|
+
model/deleteResult.ts
|
|
25
|
+
model/deleteUser400Response.ts
|
|
26
|
+
model/deleteUsersBulkRequest.ts
|
|
27
|
+
model/deleteWorkspacesBulkRequest.ts
|
|
28
|
+
model/getRemoteUploadStatus200Response.ts
|
|
29
|
+
model/initiateChunkedUpload200Response.ts
|
|
30
|
+
model/initiateChunkedUploadRequest.ts
|
|
31
|
+
model/initiateRemoteUpload200Response.ts
|
|
32
|
+
model/initiateRemoteUpload200ResponseOneOf.ts
|
|
33
|
+
model/initiateRemoteUploadRequest.ts
|
|
34
|
+
model/listAccounts200Response.ts
|
|
35
|
+
model/listMedia200Response.ts
|
|
36
|
+
model/listPosts200Response.ts
|
|
37
|
+
model/listReceipts200Response.ts
|
|
38
|
+
model/listTags200Response.ts
|
|
39
|
+
model/listUsers200Response.ts
|
|
40
|
+
model/listWorkspaces200Response.ts
|
|
41
|
+
model/media.ts
|
|
42
|
+
model/models.ts
|
|
43
|
+
model/paginationMeta.ts
|
|
44
|
+
model/paginationMetaLinks.ts
|
|
45
|
+
model/paginationMetaMeta.ts
|
|
46
|
+
model/post.ts
|
|
47
|
+
model/postContent.ts
|
|
48
|
+
model/postInput.ts
|
|
49
|
+
model/postStatus.ts
|
|
50
|
+
model/postVersion.ts
|
|
51
|
+
model/receipt.ts
|
|
52
|
+
model/receiptInput.ts
|
|
53
|
+
model/receiptUpdateInput.ts
|
|
54
|
+
model/removeUserFromWorkspaceRequest.ts
|
|
55
|
+
model/schedulePostRequest.ts
|
|
56
|
+
model/scheduleResult.ts
|
|
57
|
+
model/subscription.ts
|
|
58
|
+
model/subscriptionInput.ts
|
|
59
|
+
model/subscriptionStatus.ts
|
|
60
|
+
model/subscriptionUpdateInput.ts
|
|
61
|
+
model/tag.ts
|
|
62
|
+
model/tagInput.ts
|
|
63
|
+
model/updateMediaRequest.ts
|
|
64
|
+
model/uploadChunk200Response.ts
|
|
65
|
+
model/user.ts
|
|
66
|
+
model/userInput.ts
|
|
67
|
+
model/userUpdateInput.ts
|
|
68
|
+
model/workspace.ts
|
|
69
|
+
model/workspaceInput.ts
|
|
70
|
+
model/workspaceUserInput.ts
|
|
71
|
+
package.json
|
|
72
|
+
tsconfig.json
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
7.9.0
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# OpenAPI Generator Ignore
|
|
2
|
+
# Generated by openapi-generator https://github.com/openapitools/openapi-generator
|
|
3
|
+
|
|
4
|
+
# Use this file to prevent files from being overwritten by the generator.
|
|
5
|
+
# The patterns follow closely to .gitignore or .dockerignore.
|
|
6
|
+
|
|
7
|
+
# As an example, the C# client generator defines ApiClient.cs.
|
|
8
|
+
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
|
|
9
|
+
#ApiClient.cs
|
|
10
|
+
|
|
11
|
+
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
|
|
12
|
+
#foo/*/qux
|
|
13
|
+
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
|
|
14
|
+
|
|
15
|
+
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
|
|
16
|
+
#foo/**/qux
|
|
17
|
+
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
|
|
18
|
+
|
|
19
|
+
# You can also negate patterns with an exclamation (!).
|
|
20
|
+
# For example, you can ignore all files in a docs folder with the file extension .md:
|
|
21
|
+
#docs/*.md
|
|
22
|
+
# Then explicitly reverse the ignore rule for a single file:
|
|
23
|
+
#!docs/README.md
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 PostBoost
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
File without changes
|
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PostBoost API
|
|
3
|
+
* The PostBoost REST API lets you publish, schedule, and analyze social media posts across 8+ platforms from a single integration. No OAuth apps to maintain — PostBoost handles platform authorization for you. ## Base URL All workspace-scoped endpoints are prefixed with `/{workspaceUuid}`. Panel/admin endpoints are prefixed with `/panel`. ## Authentication All requests require a Bearer token in the `Authorization` header. Generate tokens in your PostBoost dashboard under **Settings → Access Tokens**. ``` Authorization: Bearer YOUR_API_TOKEN ```
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
* Contact: hi@postboost.co
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
import localVarRequest from 'request';
|
|
15
|
+
import http from 'http';
|
|
16
|
+
|
|
17
|
+
/* tslint:disable:no-unused-locals */
|
|
18
|
+
import { Account } from '../model/account';
|
|
19
|
+
import { ListAccounts200Response } from '../model/listAccounts200Response';
|
|
20
|
+
|
|
21
|
+
import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models';
|
|
22
|
+
import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models';
|
|
23
|
+
|
|
24
|
+
import { HttpError, RequestFile } from './apis';
|
|
25
|
+
|
|
26
|
+
let defaultBasePath = 'https://postboost.co/app/api';
|
|
27
|
+
|
|
28
|
+
// ===============================================
|
|
29
|
+
// This file is autogenerated - Please do not edit
|
|
30
|
+
// ===============================================
|
|
31
|
+
|
|
32
|
+
export enum AccountsApiApiKeys {
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export class AccountsApi {
|
|
36
|
+
protected _basePath = defaultBasePath;
|
|
37
|
+
protected _defaultHeaders : any = {};
|
|
38
|
+
protected _useQuerystring : boolean = false;
|
|
39
|
+
|
|
40
|
+
protected authentications = {
|
|
41
|
+
'default': <Authentication>new VoidAuth(),
|
|
42
|
+
'bearerAuth': new HttpBearerAuth(),
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
protected interceptors: Interceptor[] = [];
|
|
46
|
+
|
|
47
|
+
constructor(basePath?: string);
|
|
48
|
+
constructor(basePathOrUsername: string, password?: string, basePath?: string) {
|
|
49
|
+
if (password) {
|
|
50
|
+
if (basePath) {
|
|
51
|
+
this.basePath = basePath;
|
|
52
|
+
}
|
|
53
|
+
} else {
|
|
54
|
+
if (basePathOrUsername) {
|
|
55
|
+
this.basePath = basePathOrUsername
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
set useQuerystring(value: boolean) {
|
|
61
|
+
this._useQuerystring = value;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
set basePath(basePath: string) {
|
|
65
|
+
this._basePath = basePath;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
set defaultHeaders(defaultHeaders: any) {
|
|
69
|
+
this._defaultHeaders = defaultHeaders;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
get defaultHeaders() {
|
|
73
|
+
return this._defaultHeaders;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
get basePath() {
|
|
77
|
+
return this._basePath;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
public setDefaultAuthentication(auth: Authentication) {
|
|
81
|
+
this.authentications.default = auth;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
public setApiKey(key: AccountsApiApiKeys, value: string) {
|
|
85
|
+
(this.authentications as any)[AccountsApiApiKeys[key]].apiKey = value;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
set accessToken(accessToken: string | (() => string)) {
|
|
89
|
+
this.authentications.bearerAuth.accessToken = accessToken;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
public addInterceptor(interceptor: Interceptor) {
|
|
93
|
+
this.interceptors.push(interceptor);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Returns a single social media account.
|
|
98
|
+
* @summary Get account
|
|
99
|
+
* @param workspaceUuid UUID of the workspace.
|
|
100
|
+
* @param accountUuid UUID of the social media account.
|
|
101
|
+
*/
|
|
102
|
+
public async getAccount (workspaceUuid: string, accountUuid: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Account; }> {
|
|
103
|
+
const localVarPath = this.basePath + '/{workspaceUuid}/accounts/{accountUuid}'
|
|
104
|
+
.replace('{' + 'workspaceUuid' + '}', encodeURIComponent(String(workspaceUuid)))
|
|
105
|
+
.replace('{' + 'accountUuid' + '}', encodeURIComponent(String(accountUuid)));
|
|
106
|
+
let localVarQueryParameters: any = {};
|
|
107
|
+
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
108
|
+
const produces = ['application/json'];
|
|
109
|
+
// give precedence to 'application/json'
|
|
110
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
111
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
112
|
+
} else {
|
|
113
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
114
|
+
}
|
|
115
|
+
let localVarFormParams: any = {};
|
|
116
|
+
|
|
117
|
+
// verify required parameter 'workspaceUuid' is not null or undefined
|
|
118
|
+
if (workspaceUuid === null || workspaceUuid === undefined) {
|
|
119
|
+
throw new Error('Required parameter workspaceUuid was null or undefined when calling getAccount.');
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
// verify required parameter 'accountUuid' is not null or undefined
|
|
123
|
+
if (accountUuid === null || accountUuid === undefined) {
|
|
124
|
+
throw new Error('Required parameter accountUuid was null or undefined when calling getAccount.');
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
128
|
+
|
|
129
|
+
let localVarUseFormData = false;
|
|
130
|
+
|
|
131
|
+
let localVarRequestOptions: localVarRequest.Options = {
|
|
132
|
+
method: 'GET',
|
|
133
|
+
qs: localVarQueryParameters,
|
|
134
|
+
headers: localVarHeaderParams,
|
|
135
|
+
uri: localVarPath,
|
|
136
|
+
useQuerystring: this._useQuerystring,
|
|
137
|
+
json: true,
|
|
138
|
+
};
|
|
139
|
+
|
|
140
|
+
let authenticationPromise = Promise.resolve();
|
|
141
|
+
if (this.authentications.bearerAuth.accessToken) {
|
|
142
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.bearerAuth.applyToRequest(localVarRequestOptions));
|
|
143
|
+
}
|
|
144
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
145
|
+
|
|
146
|
+
let interceptorPromise = authenticationPromise;
|
|
147
|
+
for (const interceptor of this.interceptors) {
|
|
148
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
return interceptorPromise.then(() => {
|
|
152
|
+
if (Object.keys(localVarFormParams).length) {
|
|
153
|
+
if (localVarUseFormData) {
|
|
154
|
+
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
155
|
+
} else {
|
|
156
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
return new Promise<{ response: http.IncomingMessage; body: Account; }>((resolve, reject) => {
|
|
160
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
161
|
+
if (error) {
|
|
162
|
+
reject(error);
|
|
163
|
+
} else {
|
|
164
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
165
|
+
body = ObjectSerializer.deserialize(body, "Account");
|
|
166
|
+
resolve({ response: response, body: body });
|
|
167
|
+
} else {
|
|
168
|
+
reject(new HttpError(response, body, response.statusCode));
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
});
|
|
172
|
+
});
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* Returns all social media accounts connected to the workspace.
|
|
177
|
+
* @summary List accounts
|
|
178
|
+
* @param workspaceUuid UUID of the workspace.
|
|
179
|
+
*/
|
|
180
|
+
public async listAccounts (workspaceUuid: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: ListAccounts200Response; }> {
|
|
181
|
+
const localVarPath = this.basePath + '/{workspaceUuid}/accounts'
|
|
182
|
+
.replace('{' + 'workspaceUuid' + '}', encodeURIComponent(String(workspaceUuid)));
|
|
183
|
+
let localVarQueryParameters: any = {};
|
|
184
|
+
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
185
|
+
const produces = ['application/json'];
|
|
186
|
+
// give precedence to 'application/json'
|
|
187
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
188
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
189
|
+
} else {
|
|
190
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
191
|
+
}
|
|
192
|
+
let localVarFormParams: any = {};
|
|
193
|
+
|
|
194
|
+
// verify required parameter 'workspaceUuid' is not null or undefined
|
|
195
|
+
if (workspaceUuid === null || workspaceUuid === undefined) {
|
|
196
|
+
throw new Error('Required parameter workspaceUuid was null or undefined when calling listAccounts.');
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
200
|
+
|
|
201
|
+
let localVarUseFormData = false;
|
|
202
|
+
|
|
203
|
+
let localVarRequestOptions: localVarRequest.Options = {
|
|
204
|
+
method: 'GET',
|
|
205
|
+
qs: localVarQueryParameters,
|
|
206
|
+
headers: localVarHeaderParams,
|
|
207
|
+
uri: localVarPath,
|
|
208
|
+
useQuerystring: this._useQuerystring,
|
|
209
|
+
json: true,
|
|
210
|
+
};
|
|
211
|
+
|
|
212
|
+
let authenticationPromise = Promise.resolve();
|
|
213
|
+
if (this.authentications.bearerAuth.accessToken) {
|
|
214
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.bearerAuth.applyToRequest(localVarRequestOptions));
|
|
215
|
+
}
|
|
216
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
217
|
+
|
|
218
|
+
let interceptorPromise = authenticationPromise;
|
|
219
|
+
for (const interceptor of this.interceptors) {
|
|
220
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
return interceptorPromise.then(() => {
|
|
224
|
+
if (Object.keys(localVarFormParams).length) {
|
|
225
|
+
if (localVarUseFormData) {
|
|
226
|
+
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
227
|
+
} else {
|
|
228
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
return new Promise<{ response: http.IncomingMessage; body: ListAccounts200Response; }>((resolve, reject) => {
|
|
232
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
233
|
+
if (error) {
|
|
234
|
+
reject(error);
|
|
235
|
+
} else {
|
|
236
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
237
|
+
body = ObjectSerializer.deserialize(body, "ListAccounts200Response");
|
|
238
|
+
resolve({ response: response, body: body });
|
|
239
|
+
} else {
|
|
240
|
+
reject(new HttpError(response, body, response.statusCode));
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
});
|
|
244
|
+
});
|
|
245
|
+
});
|
|
246
|
+
}
|
|
247
|
+
}
|
package/api/apis.ts
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export * from './accountsApi';
|
|
2
|
+
import { AccountsApi } from './accountsApi';
|
|
3
|
+
export * from './mediaApi';
|
|
4
|
+
import { MediaApi } from './mediaApi';
|
|
5
|
+
export * from './postsApi';
|
|
6
|
+
import { PostsApi } from './postsApi';
|
|
7
|
+
export * from './receiptsApi';
|
|
8
|
+
import { ReceiptsApi } from './receiptsApi';
|
|
9
|
+
export * from './subscriptionsApi';
|
|
10
|
+
import { SubscriptionsApi } from './subscriptionsApi';
|
|
11
|
+
export * from './tagsApi';
|
|
12
|
+
import { TagsApi } from './tagsApi';
|
|
13
|
+
export * from './usersApi';
|
|
14
|
+
import { UsersApi } from './usersApi';
|
|
15
|
+
export * from './workspacesApi';
|
|
16
|
+
import { WorkspacesApi } from './workspacesApi';
|
|
17
|
+
import * as http from 'http';
|
|
18
|
+
|
|
19
|
+
export class HttpError extends Error {
|
|
20
|
+
constructor (public response: http.IncomingMessage, public body: any, public statusCode?: number) {
|
|
21
|
+
super('HTTP request failed');
|
|
22
|
+
this.name = 'HttpError';
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export { RequestFile } from '../model/models';
|
|
27
|
+
|
|
28
|
+
export const APIS = [AccountsApi, MediaApi, PostsApi, ReceiptsApi, SubscriptionsApi, TagsApi, UsersApi, WorkspacesApi];
|