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
package/api/tagsApi.ts
ADDED
|
@@ -0,0 +1,492 @@
|
|
|
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 { ListTags200Response } from '../model/listTags200Response';
|
|
19
|
+
import { Tag } from '../model/tag';
|
|
20
|
+
import { TagInput } from '../model/tagInput';
|
|
21
|
+
|
|
22
|
+
import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models';
|
|
23
|
+
import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models';
|
|
24
|
+
|
|
25
|
+
import { HttpError, RequestFile } from './apis';
|
|
26
|
+
|
|
27
|
+
let defaultBasePath = 'https://postboost.co/app/api';
|
|
28
|
+
|
|
29
|
+
// ===============================================
|
|
30
|
+
// This file is autogenerated - Please do not edit
|
|
31
|
+
// ===============================================
|
|
32
|
+
|
|
33
|
+
export enum TagsApiApiKeys {
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export class TagsApi {
|
|
37
|
+
protected _basePath = defaultBasePath;
|
|
38
|
+
protected _defaultHeaders : any = {};
|
|
39
|
+
protected _useQuerystring : boolean = false;
|
|
40
|
+
|
|
41
|
+
protected authentications = {
|
|
42
|
+
'default': <Authentication>new VoidAuth(),
|
|
43
|
+
'bearerAuth': new HttpBearerAuth(),
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
protected interceptors: Interceptor[] = [];
|
|
47
|
+
|
|
48
|
+
constructor(basePath?: string);
|
|
49
|
+
constructor(basePathOrUsername: string, password?: string, basePath?: string) {
|
|
50
|
+
if (password) {
|
|
51
|
+
if (basePath) {
|
|
52
|
+
this.basePath = basePath;
|
|
53
|
+
}
|
|
54
|
+
} else {
|
|
55
|
+
if (basePathOrUsername) {
|
|
56
|
+
this.basePath = basePathOrUsername
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
set useQuerystring(value: boolean) {
|
|
62
|
+
this._useQuerystring = value;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
set basePath(basePath: string) {
|
|
66
|
+
this._basePath = basePath;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
set defaultHeaders(defaultHeaders: any) {
|
|
70
|
+
this._defaultHeaders = defaultHeaders;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
get defaultHeaders() {
|
|
74
|
+
return this._defaultHeaders;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
get basePath() {
|
|
78
|
+
return this._basePath;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
public setDefaultAuthentication(auth: Authentication) {
|
|
82
|
+
this.authentications.default = auth;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
public setApiKey(key: TagsApiApiKeys, value: string) {
|
|
86
|
+
(this.authentications as any)[TagsApiApiKeys[key]].apiKey = value;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
set accessToken(accessToken: string | (() => string)) {
|
|
90
|
+
this.authentications.bearerAuth.accessToken = accessToken;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
public addInterceptor(interceptor: Interceptor) {
|
|
94
|
+
this.interceptors.push(interceptor);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
*
|
|
99
|
+
* @summary Create tag
|
|
100
|
+
* @param workspaceUuid UUID of the workspace.
|
|
101
|
+
* @param tagInput
|
|
102
|
+
*/
|
|
103
|
+
public async createTag (workspaceUuid: string, tagInput: TagInput, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Tag; }> {
|
|
104
|
+
const localVarPath = this.basePath + '/{workspaceUuid}/tags'
|
|
105
|
+
.replace('{' + 'workspaceUuid' + '}', encodeURIComponent(String(workspaceUuid)));
|
|
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 createTag.');
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
// verify required parameter 'tagInput' is not null or undefined
|
|
123
|
+
if (tagInput === null || tagInput === undefined) {
|
|
124
|
+
throw new Error('Required parameter tagInput was null or undefined when calling createTag.');
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
128
|
+
|
|
129
|
+
let localVarUseFormData = false;
|
|
130
|
+
|
|
131
|
+
let localVarRequestOptions: localVarRequest.Options = {
|
|
132
|
+
method: 'POST',
|
|
133
|
+
qs: localVarQueryParameters,
|
|
134
|
+
headers: localVarHeaderParams,
|
|
135
|
+
uri: localVarPath,
|
|
136
|
+
useQuerystring: this._useQuerystring,
|
|
137
|
+
json: true,
|
|
138
|
+
body: ObjectSerializer.serialize(tagInput, "TagInput")
|
|
139
|
+
};
|
|
140
|
+
|
|
141
|
+
let authenticationPromise = Promise.resolve();
|
|
142
|
+
if (this.authentications.bearerAuth.accessToken) {
|
|
143
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.bearerAuth.applyToRequest(localVarRequestOptions));
|
|
144
|
+
}
|
|
145
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
146
|
+
|
|
147
|
+
let interceptorPromise = authenticationPromise;
|
|
148
|
+
for (const interceptor of this.interceptors) {
|
|
149
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
return interceptorPromise.then(() => {
|
|
153
|
+
if (Object.keys(localVarFormParams).length) {
|
|
154
|
+
if (localVarUseFormData) {
|
|
155
|
+
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
156
|
+
} else {
|
|
157
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
return new Promise<{ response: http.IncomingMessage; body: Tag; }>((resolve, reject) => {
|
|
161
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
162
|
+
if (error) {
|
|
163
|
+
reject(error);
|
|
164
|
+
} else {
|
|
165
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
166
|
+
body = ObjectSerializer.deserialize(body, "Tag");
|
|
167
|
+
resolve({ response: response, body: body });
|
|
168
|
+
} else {
|
|
169
|
+
reject(new HttpError(response, body, response.statusCode));
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
});
|
|
173
|
+
});
|
|
174
|
+
});
|
|
175
|
+
}
|
|
176
|
+
/**
|
|
177
|
+
*
|
|
178
|
+
* @summary Delete tag
|
|
179
|
+
* @param workspaceUuid UUID of the workspace.
|
|
180
|
+
* @param tagUuid UUID of the tag.
|
|
181
|
+
*/
|
|
182
|
+
public async deleteTag (workspaceUuid: string, tagUuid: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: object; }> {
|
|
183
|
+
const localVarPath = this.basePath + '/{workspaceUuid}/tags/{tagUuid}'
|
|
184
|
+
.replace('{' + 'workspaceUuid' + '}', encodeURIComponent(String(workspaceUuid)))
|
|
185
|
+
.replace('{' + 'tagUuid' + '}', encodeURIComponent(String(tagUuid)));
|
|
186
|
+
let localVarQueryParameters: any = {};
|
|
187
|
+
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
188
|
+
const produces = ['application/json'];
|
|
189
|
+
// give precedence to 'application/json'
|
|
190
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
191
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
192
|
+
} else {
|
|
193
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
194
|
+
}
|
|
195
|
+
let localVarFormParams: any = {};
|
|
196
|
+
|
|
197
|
+
// verify required parameter 'workspaceUuid' is not null or undefined
|
|
198
|
+
if (workspaceUuid === null || workspaceUuid === undefined) {
|
|
199
|
+
throw new Error('Required parameter workspaceUuid was null or undefined when calling deleteTag.');
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
// verify required parameter 'tagUuid' is not null or undefined
|
|
203
|
+
if (tagUuid === null || tagUuid === undefined) {
|
|
204
|
+
throw new Error('Required parameter tagUuid was null or undefined when calling deleteTag.');
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
208
|
+
|
|
209
|
+
let localVarUseFormData = false;
|
|
210
|
+
|
|
211
|
+
let localVarRequestOptions: localVarRequest.Options = {
|
|
212
|
+
method: 'DELETE',
|
|
213
|
+
qs: localVarQueryParameters,
|
|
214
|
+
headers: localVarHeaderParams,
|
|
215
|
+
uri: localVarPath,
|
|
216
|
+
useQuerystring: this._useQuerystring,
|
|
217
|
+
json: true,
|
|
218
|
+
};
|
|
219
|
+
|
|
220
|
+
let authenticationPromise = Promise.resolve();
|
|
221
|
+
if (this.authentications.bearerAuth.accessToken) {
|
|
222
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.bearerAuth.applyToRequest(localVarRequestOptions));
|
|
223
|
+
}
|
|
224
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
225
|
+
|
|
226
|
+
let interceptorPromise = authenticationPromise;
|
|
227
|
+
for (const interceptor of this.interceptors) {
|
|
228
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
return interceptorPromise.then(() => {
|
|
232
|
+
if (Object.keys(localVarFormParams).length) {
|
|
233
|
+
if (localVarUseFormData) {
|
|
234
|
+
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
235
|
+
} else {
|
|
236
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
return new Promise<{ response: http.IncomingMessage; body: object; }>((resolve, reject) => {
|
|
240
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
241
|
+
if (error) {
|
|
242
|
+
reject(error);
|
|
243
|
+
} else {
|
|
244
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
245
|
+
body = ObjectSerializer.deserialize(body, "object");
|
|
246
|
+
resolve({ response: response, body: body });
|
|
247
|
+
} else {
|
|
248
|
+
reject(new HttpError(response, body, response.statusCode));
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
});
|
|
252
|
+
});
|
|
253
|
+
});
|
|
254
|
+
}
|
|
255
|
+
/**
|
|
256
|
+
*
|
|
257
|
+
* @summary Get tag
|
|
258
|
+
* @param workspaceUuid UUID of the workspace.
|
|
259
|
+
* @param tagUuid UUID of the tag.
|
|
260
|
+
*/
|
|
261
|
+
public async getTag (workspaceUuid: string, tagUuid: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Tag; }> {
|
|
262
|
+
const localVarPath = this.basePath + '/{workspaceUuid}/tags/{tagUuid}'
|
|
263
|
+
.replace('{' + 'workspaceUuid' + '}', encodeURIComponent(String(workspaceUuid)))
|
|
264
|
+
.replace('{' + 'tagUuid' + '}', encodeURIComponent(String(tagUuid)));
|
|
265
|
+
let localVarQueryParameters: any = {};
|
|
266
|
+
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
267
|
+
const produces = ['application/json'];
|
|
268
|
+
// give precedence to 'application/json'
|
|
269
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
270
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
271
|
+
} else {
|
|
272
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
273
|
+
}
|
|
274
|
+
let localVarFormParams: any = {};
|
|
275
|
+
|
|
276
|
+
// verify required parameter 'workspaceUuid' is not null or undefined
|
|
277
|
+
if (workspaceUuid === null || workspaceUuid === undefined) {
|
|
278
|
+
throw new Error('Required parameter workspaceUuid was null or undefined when calling getTag.');
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
// verify required parameter 'tagUuid' is not null or undefined
|
|
282
|
+
if (tagUuid === null || tagUuid === undefined) {
|
|
283
|
+
throw new Error('Required parameter tagUuid was null or undefined when calling getTag.');
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
287
|
+
|
|
288
|
+
let localVarUseFormData = false;
|
|
289
|
+
|
|
290
|
+
let localVarRequestOptions: localVarRequest.Options = {
|
|
291
|
+
method: 'GET',
|
|
292
|
+
qs: localVarQueryParameters,
|
|
293
|
+
headers: localVarHeaderParams,
|
|
294
|
+
uri: localVarPath,
|
|
295
|
+
useQuerystring: this._useQuerystring,
|
|
296
|
+
json: true,
|
|
297
|
+
};
|
|
298
|
+
|
|
299
|
+
let authenticationPromise = Promise.resolve();
|
|
300
|
+
if (this.authentications.bearerAuth.accessToken) {
|
|
301
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.bearerAuth.applyToRequest(localVarRequestOptions));
|
|
302
|
+
}
|
|
303
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
304
|
+
|
|
305
|
+
let interceptorPromise = authenticationPromise;
|
|
306
|
+
for (const interceptor of this.interceptors) {
|
|
307
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
return interceptorPromise.then(() => {
|
|
311
|
+
if (Object.keys(localVarFormParams).length) {
|
|
312
|
+
if (localVarUseFormData) {
|
|
313
|
+
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
314
|
+
} else {
|
|
315
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
return new Promise<{ response: http.IncomingMessage; body: Tag; }>((resolve, reject) => {
|
|
319
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
320
|
+
if (error) {
|
|
321
|
+
reject(error);
|
|
322
|
+
} else {
|
|
323
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
324
|
+
body = ObjectSerializer.deserialize(body, "Tag");
|
|
325
|
+
resolve({ response: response, body: body });
|
|
326
|
+
} else {
|
|
327
|
+
reject(new HttpError(response, body, response.statusCode));
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
});
|
|
331
|
+
});
|
|
332
|
+
});
|
|
333
|
+
}
|
|
334
|
+
/**
|
|
335
|
+
*
|
|
336
|
+
* @summary List tags
|
|
337
|
+
* @param workspaceUuid UUID of the workspace.
|
|
338
|
+
*/
|
|
339
|
+
public async listTags (workspaceUuid: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: ListTags200Response; }> {
|
|
340
|
+
const localVarPath = this.basePath + '/{workspaceUuid}/tags'
|
|
341
|
+
.replace('{' + 'workspaceUuid' + '}', encodeURIComponent(String(workspaceUuid)));
|
|
342
|
+
let localVarQueryParameters: any = {};
|
|
343
|
+
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
344
|
+
const produces = ['application/json'];
|
|
345
|
+
// give precedence to 'application/json'
|
|
346
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
347
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
348
|
+
} else {
|
|
349
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
350
|
+
}
|
|
351
|
+
let localVarFormParams: any = {};
|
|
352
|
+
|
|
353
|
+
// verify required parameter 'workspaceUuid' is not null or undefined
|
|
354
|
+
if (workspaceUuid === null || workspaceUuid === undefined) {
|
|
355
|
+
throw new Error('Required parameter workspaceUuid was null or undefined when calling listTags.');
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
359
|
+
|
|
360
|
+
let localVarUseFormData = false;
|
|
361
|
+
|
|
362
|
+
let localVarRequestOptions: localVarRequest.Options = {
|
|
363
|
+
method: 'GET',
|
|
364
|
+
qs: localVarQueryParameters,
|
|
365
|
+
headers: localVarHeaderParams,
|
|
366
|
+
uri: localVarPath,
|
|
367
|
+
useQuerystring: this._useQuerystring,
|
|
368
|
+
json: true,
|
|
369
|
+
};
|
|
370
|
+
|
|
371
|
+
let authenticationPromise = Promise.resolve();
|
|
372
|
+
if (this.authentications.bearerAuth.accessToken) {
|
|
373
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.bearerAuth.applyToRequest(localVarRequestOptions));
|
|
374
|
+
}
|
|
375
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
376
|
+
|
|
377
|
+
let interceptorPromise = authenticationPromise;
|
|
378
|
+
for (const interceptor of this.interceptors) {
|
|
379
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
return interceptorPromise.then(() => {
|
|
383
|
+
if (Object.keys(localVarFormParams).length) {
|
|
384
|
+
if (localVarUseFormData) {
|
|
385
|
+
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
386
|
+
} else {
|
|
387
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
return new Promise<{ response: http.IncomingMessage; body: ListTags200Response; }>((resolve, reject) => {
|
|
391
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
392
|
+
if (error) {
|
|
393
|
+
reject(error);
|
|
394
|
+
} else {
|
|
395
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
396
|
+
body = ObjectSerializer.deserialize(body, "ListTags200Response");
|
|
397
|
+
resolve({ response: response, body: body });
|
|
398
|
+
} else {
|
|
399
|
+
reject(new HttpError(response, body, response.statusCode));
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
});
|
|
403
|
+
});
|
|
404
|
+
});
|
|
405
|
+
}
|
|
406
|
+
/**
|
|
407
|
+
*
|
|
408
|
+
* @summary Update tag
|
|
409
|
+
* @param workspaceUuid UUID of the workspace.
|
|
410
|
+
* @param tagUuid UUID of the tag.
|
|
411
|
+
* @param tagInput
|
|
412
|
+
*/
|
|
413
|
+
public async updateTag (workspaceUuid: string, tagUuid: string, tagInput: TagInput, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: object; }> {
|
|
414
|
+
const localVarPath = this.basePath + '/{workspaceUuid}/tags/{tagUuid}'
|
|
415
|
+
.replace('{' + 'workspaceUuid' + '}', encodeURIComponent(String(workspaceUuid)))
|
|
416
|
+
.replace('{' + 'tagUuid' + '}', encodeURIComponent(String(tagUuid)));
|
|
417
|
+
let localVarQueryParameters: any = {};
|
|
418
|
+
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
419
|
+
const produces = ['application/json'];
|
|
420
|
+
// give precedence to 'application/json'
|
|
421
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
422
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
423
|
+
} else {
|
|
424
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
425
|
+
}
|
|
426
|
+
let localVarFormParams: any = {};
|
|
427
|
+
|
|
428
|
+
// verify required parameter 'workspaceUuid' is not null or undefined
|
|
429
|
+
if (workspaceUuid === null || workspaceUuid === undefined) {
|
|
430
|
+
throw new Error('Required parameter workspaceUuid was null or undefined when calling updateTag.');
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
// verify required parameter 'tagUuid' is not null or undefined
|
|
434
|
+
if (tagUuid === null || tagUuid === undefined) {
|
|
435
|
+
throw new Error('Required parameter tagUuid was null or undefined when calling updateTag.');
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
// verify required parameter 'tagInput' is not null or undefined
|
|
439
|
+
if (tagInput === null || tagInput === undefined) {
|
|
440
|
+
throw new Error('Required parameter tagInput was null or undefined when calling updateTag.');
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
444
|
+
|
|
445
|
+
let localVarUseFormData = false;
|
|
446
|
+
|
|
447
|
+
let localVarRequestOptions: localVarRequest.Options = {
|
|
448
|
+
method: 'PUT',
|
|
449
|
+
qs: localVarQueryParameters,
|
|
450
|
+
headers: localVarHeaderParams,
|
|
451
|
+
uri: localVarPath,
|
|
452
|
+
useQuerystring: this._useQuerystring,
|
|
453
|
+
json: true,
|
|
454
|
+
body: ObjectSerializer.serialize(tagInput, "TagInput")
|
|
455
|
+
};
|
|
456
|
+
|
|
457
|
+
let authenticationPromise = Promise.resolve();
|
|
458
|
+
if (this.authentications.bearerAuth.accessToken) {
|
|
459
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.bearerAuth.applyToRequest(localVarRequestOptions));
|
|
460
|
+
}
|
|
461
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
462
|
+
|
|
463
|
+
let interceptorPromise = authenticationPromise;
|
|
464
|
+
for (const interceptor of this.interceptors) {
|
|
465
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
return interceptorPromise.then(() => {
|
|
469
|
+
if (Object.keys(localVarFormParams).length) {
|
|
470
|
+
if (localVarUseFormData) {
|
|
471
|
+
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
472
|
+
} else {
|
|
473
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
474
|
+
}
|
|
475
|
+
}
|
|
476
|
+
return new Promise<{ response: http.IncomingMessage; body: object; }>((resolve, reject) => {
|
|
477
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
478
|
+
if (error) {
|
|
479
|
+
reject(error);
|
|
480
|
+
} else {
|
|
481
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
482
|
+
body = ObjectSerializer.deserialize(body, "object");
|
|
483
|
+
resolve({ response: response, body: body });
|
|
484
|
+
} else {
|
|
485
|
+
reject(new HttpError(response, body, response.statusCode));
|
|
486
|
+
}
|
|
487
|
+
}
|
|
488
|
+
});
|
|
489
|
+
});
|
|
490
|
+
});
|
|
491
|
+
}
|
|
492
|
+
}
|