postboost 1.6.0 → 1.8.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 +1 -1
- package/api/aIApi.ts +2 -2
- package/api/accountsApi.ts +24 -4
- package/api/analyticsApi.ts +553 -0
- package/api/apis.ts +5 -1
- package/api/mediaApi.ts +381 -10
- package/api/mentionsApi.ts +507 -0
- package/api/postsApi.ts +182 -9
- package/api/receiptsApi.ts +2 -2
- package/api/subscriptionsApi.ts +10 -5
- package/api/tagsApi.ts +2 -2
- package/api/usersApi.ts +2 -2
- package/api/workspacesApi.ts +142 -3
- package/model/aICredits.ts +52 -0
- package/model/account.ts +35 -2
- package/model/accountAnalytics.ts +73 -0
- package/model/accountAnalyticsInitialSync.ts +37 -0
- package/model/accountSchedule.ts +49 -0
- package/model/addGenericSubscriptionRequest.ts +2 -2
- package/model/addPostToQueueRequest.ts +34 -0
- package/model/analyticsPeriod.ts +52 -0
- package/model/analyticsSummary.ts +39 -0
- package/model/analyticsSummaryData.ts +100 -0
- package/model/approvePostRequest.ts +62 -0
- package/model/bestPostingTimes.ts +41 -0
- package/model/bestPostingTimesTimesInner.ts +49 -0
- package/model/blogToSocial200Response.ts +2 -2
- package/model/blogToSocial429Response.ts +2 -2
- package/model/blogToSocialCaption.ts +2 -2
- package/model/blogToSocialInput.ts +2 -2
- package/model/blogToSocialMedia.ts +2 -2
- package/model/blogToSocialResponse.ts +2 -2
- package/model/cancelSubscription422Response.ts +38 -0
- package/model/cancelSubscription422ResponseErrors.ts +31 -0
- package/model/cancelSubscriptionRequest.ts +34 -0
- package/model/changeSubscriptionPlanRequest.ts +2 -2
- package/model/checkoutSubscription200Response.ts +2 -2
- package/model/checkoutSubscriptionRequest.ts +2 -2
- package/model/completeChunkedUploadRequest.ts +40 -0
- package/model/createMediaFolderRequest.ts +43 -0
- package/model/createMention201Response.ts +32 -0
- package/model/deleteMediaBulkRequest.ts +6 -5
- package/model/deleteMediaBulkRequestItemsInner.ts +26 -0
- package/model/deleteMediaFolderRequest.ts +31 -0
- package/model/deleteMode.ts +2 -2
- package/model/deletePostRequest.ts +2 -2
- package/model/deletePostsBulkRequest.ts +2 -2
- package/model/deleteReceiptsBulkRequest.ts +2 -2
- package/model/deleteResult.ts +2 -2
- package/model/deleteUser400Response.ts +2 -2
- package/model/deleteUsersBulkRequest.ts +2 -2
- package/model/deleteWorkspacesBulkRequest.ts +2 -2
- package/model/getRemoteUploadStatus200Response.ts +2 -2
- package/model/imageAltText200Response.ts +2 -2
- package/model/imageAltTextInput.ts +2 -2
- package/model/imageAltTextResponse.ts +2 -2
- package/model/imageEditInput.ts +2 -2
- package/model/imageGenerate200Response.ts +2 -2
- package/model/imageGenerate429Response.ts +2 -2
- package/model/imageGenerateInput.ts +2 -2
- package/model/imageGenerationResponse.ts +5 -5
- package/model/imagePrompt200Response.ts +2 -2
- package/model/imagePrompt429Response.ts +2 -2
- package/model/imagePromptInput.ts +2 -2
- package/model/imagePromptResponse.ts +2 -2
- package/model/imageVariations200Response.ts +2 -2
- package/model/imageVariationsInput.ts +2 -2
- package/model/imageVariationsResponse.ts +5 -5
- package/model/initiateChunkedUpload201Response.ts +2 -2
- package/model/initiateChunkedUploadRequest.ts +2 -2
- package/model/initiateRemoteUpload201Response.ts +60 -2
- package/model/initiateRemoteUpload201ResponseOneOf.ts +2 -2
- package/model/initiateRemoteUploadRequest.ts +11 -2
- package/model/listAccounts200Response.ts +2 -2
- package/model/listMedia200Response.ts +2 -2
- package/model/listMediaFolders200Response.ts +32 -0
- package/model/listMentions200Response.ts +46 -0
- package/model/listMyWorkspaces200Response.ts +32 -0
- package/model/listPosts200Response.ts +2 -2
- package/model/listReceipts200Response.ts +2 -2
- package/model/listTags200Response.ts +2 -2
- package/model/listUsers200Response.ts +2 -2
- package/model/listWorkspaces200Response.ts +2 -2
- package/model/media.ts +60 -2
- package/model/mediaFolder.ts +55 -0
- package/model/mediaFolderInput.ts +43 -0
- package/model/{generatedImageItem.ts → mediaFolderRef.ts} +10 -16
- package/model/mention.ts +65 -0
- package/model/mentionIdentity.ts +55 -0
- package/model/mentionIdentityInput.ts +67 -0
- package/model/mentionInput.ts +44 -0
- package/model/models.ts +125 -3
- package/model/paginationMeta.ts +2 -2
- package/model/paginationMetaLinks.ts +2 -2
- package/model/paginationMetaMeta.ts +2 -2
- package/model/post.ts +12 -2
- package/model/postAnalytics.ts +46 -0
- package/model/postContent.ts +2 -2
- package/model/postInput.ts +15 -2
- package/model/postStatus.ts +9 -3
- package/model/postVersion.ts +11 -2
- package/model/postingTimeSlot.ts +51 -0
- package/model/postingTimes.ts +88 -0
- package/model/postingTimesBestInner.ts +49 -0
- package/model/postingTimesDayIntervalsInnerInner.ts +69 -0
- package/model/postingTimesDaysInner.ts +57 -0
- package/model/publicWorkspace.ts +50 -0
- package/model/publicWorkspacePivot.ts +53 -0
- package/model/publishProgress.ts +46 -0
- package/model/receipt.ts +2 -2
- package/model/receiptInput.ts +2 -2
- package/model/receiptUpdateInput.ts +2 -2
- package/model/removeGenericSubscription422Response.ts +31 -0
- package/model/removeUserFromWorkspaceRequest.ts +2 -2
- package/model/retryPostAccountResult.ts +47 -0
- package/model/schedulePostRequest.ts +39 -2
- package/model/scheduleResult.ts +11 -2
- package/model/subscription.ts +2 -2
- package/model/subscriptionInput.ts +2 -2
- package/model/subscriptionStatus.ts +2 -2
- package/model/subscriptionUpdateInput.ts +2 -2
- package/model/tag.ts +2 -2
- package/model/tagInput.ts +2 -2
- package/model/updateMediaRequest.ts +18 -3
- package/model/uploadChunk201Response.ts +2 -2
- package/model/user.ts +11 -2
- package/model/userInput.ts +2 -2
- package/model/userUpdateInput.ts +2 -2
- package/model/workspace.ts +17 -3
- package/model/workspaceInput.ts +8 -3
- package/model/workspaceUserInput.ts +2 -2
- package/package.json +1 -1
package/api/postsApi.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* PostBoost API
|
|
3
|
-
* The PostBoost REST API lets you publish, schedule, and analyze social media posts across 12+ 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 ```
|
|
3
|
+
* The PostBoost REST API lets you publish, schedule, and analyze social media posts across 12+ 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`. ## Plan access Every workspace-scoped endpoint returns `403` when the workspace\'s plan does not include API access (capability `api`). ## Dates and times Post dates and times (`date`, `time`, `accounts_schedule`) are read in the request\'s `timezone` when one is given, otherwise in the workspace timezone. ## 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
4
|
*
|
|
5
|
-
* The version of the OpenAPI document: 1.
|
|
5
|
+
* The version of the OpenAPI document: 1.8.0
|
|
6
6
|
* Contact: hi@postboost.co
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -15,12 +15,16 @@ import localVarRequest from 'request';
|
|
|
15
15
|
import http from 'http';
|
|
16
16
|
|
|
17
17
|
/* tslint:disable:no-unused-locals */
|
|
18
|
+
import { AddPostToQueueRequest } from '../model/addPostToQueueRequest';
|
|
19
|
+
import { ApprovePostRequest } from '../model/approvePostRequest';
|
|
18
20
|
import { DeletePostRequest } from '../model/deletePostRequest';
|
|
19
21
|
import { DeletePostsBulkRequest } from '../model/deletePostsBulkRequest';
|
|
20
22
|
import { DeleteResult } from '../model/deleteResult';
|
|
21
23
|
import { ListPosts200Response } from '../model/listPosts200Response';
|
|
22
24
|
import { Post } from '../model/post';
|
|
25
|
+
import { PostAnalytics } from '../model/postAnalytics';
|
|
23
26
|
import { PostInput } from '../model/postInput';
|
|
27
|
+
import { RetryPostAccountResult } from '../model/retryPostAccountResult';
|
|
24
28
|
import { SchedulePostRequest } from '../model/schedulePostRequest';
|
|
25
29
|
import { ScheduleResult } from '../model/scheduleResult';
|
|
26
30
|
|
|
@@ -100,12 +104,13 @@ export class PostsApi {
|
|
|
100
104
|
}
|
|
101
105
|
|
|
102
106
|
/**
|
|
103
|
-
* Add an existing post to the smart publishing queue.
|
|
107
|
+
* Add an existing post to the smart publishing queue. Each account of the post gets its own next free queue slot. Returns `422` when the post has no accounts, the posting schedule has no available times, or provider requirements are not met.
|
|
104
108
|
* @summary Add post to queue
|
|
105
109
|
* @param workspaceUuid UUID of the workspace.
|
|
106
110
|
* @param postUuid UUID of the post.
|
|
111
|
+
* @param addPostToQueueRequest
|
|
107
112
|
*/
|
|
108
|
-
public async addPostToQueue (workspaceUuid: string, postUuid: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: ScheduleResult; }> {
|
|
113
|
+
public async addPostToQueue (workspaceUuid: string, postUuid: string, addPostToQueueRequest?: AddPostToQueueRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: ScheduleResult; }> {
|
|
109
114
|
const localVarPath = this.basePath + '/{workspaceUuid}/posts/add-to-queue/{postUuid}'
|
|
110
115
|
.replace('{' + 'workspaceUuid' + '}', encodeURIComponent(String(workspaceUuid)))
|
|
111
116
|
.replace('{' + 'postUuid' + '}', encodeURIComponent(String(postUuid)));
|
|
@@ -141,6 +146,7 @@ export class PostsApi {
|
|
|
141
146
|
uri: localVarPath,
|
|
142
147
|
useQuerystring: this._useQuerystring,
|
|
143
148
|
json: true,
|
|
149
|
+
body: ObjectSerializer.serialize(addPostToQueueRequest, "AddPostToQueueRequest")
|
|
144
150
|
};
|
|
145
151
|
|
|
146
152
|
let authenticationPromise = Promise.resolve();
|
|
@@ -179,12 +185,13 @@ export class PostsApi {
|
|
|
179
185
|
});
|
|
180
186
|
}
|
|
181
187
|
/**
|
|
182
|
-
* Approve a post that is pending review.
|
|
188
|
+
* Approve a post that is pending review. The approver may move the post with `date`/`time` (read in `timezone`) and set per-account times with `accounts_schedule`; without them the post keeps the time it was submitted with. Provider requirements are validated and reported as `422`.
|
|
183
189
|
* @summary Approve post
|
|
184
190
|
* @param workspaceUuid UUID of the workspace.
|
|
185
191
|
* @param postUuid UUID of the post.
|
|
192
|
+
* @param approvePostRequest
|
|
186
193
|
*/
|
|
187
|
-
public async approvePost (workspaceUuid: string, postUuid: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: ScheduleResult; }> {
|
|
194
|
+
public async approvePost (workspaceUuid: string, postUuid: string, approvePostRequest?: ApprovePostRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: ScheduleResult; }> {
|
|
188
195
|
const localVarPath = this.basePath + '/{workspaceUuid}/posts/approve/{postUuid}'
|
|
189
196
|
.replace('{' + 'workspaceUuid' + '}', encodeURIComponent(String(workspaceUuid)))
|
|
190
197
|
.replace('{' + 'postUuid' + '}', encodeURIComponent(String(postUuid)));
|
|
@@ -220,6 +227,7 @@ export class PostsApi {
|
|
|
220
227
|
uri: localVarPath,
|
|
221
228
|
useQuerystring: this._useQuerystring,
|
|
222
229
|
json: true,
|
|
230
|
+
body: ObjectSerializer.serialize(approvePostRequest, "ApprovePostRequest")
|
|
223
231
|
};
|
|
224
232
|
|
|
225
233
|
let authenticationPromise = Promise.resolve();
|
|
@@ -258,7 +266,7 @@ export class PostsApi {
|
|
|
258
266
|
});
|
|
259
267
|
}
|
|
260
268
|
/**
|
|
261
|
-
* Create a new post. Use `schedule: true` with `date` and `time` to schedule, `schedule_now: true` to publish immediately, or `queue: true` to add to the smart publishing queue.
|
|
269
|
+
* Create a new post. Use `schedule: true` with `date` and `time` to schedule, `schedule_now: true` to publish immediately, or `queue: true` to add to the smart publishing queue (each account gets its own queue slot). `date`, `time` and `accounts_schedule` are read in `timezone` when given, otherwise in the workspace timezone. Use `accounts_schedule` to give individual accounts their own departure time. Post bodies may reference mentions with `{{mention:<reference>}}` (see the Mentions endpoints). When the post is scheduled, provider requirements (for example a network that requires media) are validated up front and reported as `422`.
|
|
262
270
|
* @summary Create post
|
|
263
271
|
* @param workspaceUuid UUID of the workspace.
|
|
264
272
|
* @param postInput
|
|
@@ -575,6 +583,85 @@ export class PostsApi {
|
|
|
575
583
|
});
|
|
576
584
|
});
|
|
577
585
|
}
|
|
586
|
+
/**
|
|
587
|
+
* Engagement metrics for a published post across its accounts (also works for trashed posts), with totals, trends and the best-performing account.
|
|
588
|
+
* @summary Get post analytics
|
|
589
|
+
* @param workspaceUuid UUID of the workspace.
|
|
590
|
+
* @param postUuid UUID of the post.
|
|
591
|
+
*/
|
|
592
|
+
public async getPostAnalytics (workspaceUuid: string, postUuid: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: PostAnalytics; }> {
|
|
593
|
+
const localVarPath = this.basePath + '/{workspaceUuid}/posts/{postUuid}/analytics'
|
|
594
|
+
.replace('{' + 'workspaceUuid' + '}', encodeURIComponent(String(workspaceUuid)))
|
|
595
|
+
.replace('{' + 'postUuid' + '}', encodeURIComponent(String(postUuid)));
|
|
596
|
+
let localVarQueryParameters: any = {};
|
|
597
|
+
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
598
|
+
const produces = ['application/json'];
|
|
599
|
+
// give precedence to 'application/json'
|
|
600
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
601
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
602
|
+
} else {
|
|
603
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
604
|
+
}
|
|
605
|
+
let localVarFormParams: any = {};
|
|
606
|
+
|
|
607
|
+
// verify required parameter 'workspaceUuid' is not null or undefined
|
|
608
|
+
if (workspaceUuid === null || workspaceUuid === undefined) {
|
|
609
|
+
throw new Error('Required parameter workspaceUuid was null or undefined when calling getPostAnalytics.');
|
|
610
|
+
}
|
|
611
|
+
|
|
612
|
+
// verify required parameter 'postUuid' is not null or undefined
|
|
613
|
+
if (postUuid === null || postUuid === undefined) {
|
|
614
|
+
throw new Error('Required parameter postUuid was null or undefined when calling getPostAnalytics.');
|
|
615
|
+
}
|
|
616
|
+
|
|
617
|
+
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
618
|
+
|
|
619
|
+
let localVarUseFormData = false;
|
|
620
|
+
|
|
621
|
+
let localVarRequestOptions: localVarRequest.Options = {
|
|
622
|
+
method: 'GET',
|
|
623
|
+
qs: localVarQueryParameters,
|
|
624
|
+
headers: localVarHeaderParams,
|
|
625
|
+
uri: localVarPath,
|
|
626
|
+
useQuerystring: this._useQuerystring,
|
|
627
|
+
json: true,
|
|
628
|
+
};
|
|
629
|
+
|
|
630
|
+
let authenticationPromise = Promise.resolve();
|
|
631
|
+
if (this.authentications.bearerAuth.accessToken) {
|
|
632
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.bearerAuth.applyToRequest(localVarRequestOptions));
|
|
633
|
+
}
|
|
634
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
635
|
+
|
|
636
|
+
let interceptorPromise = authenticationPromise;
|
|
637
|
+
for (const interceptor of this.interceptors) {
|
|
638
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
639
|
+
}
|
|
640
|
+
|
|
641
|
+
return interceptorPromise.then(() => {
|
|
642
|
+
if (Object.keys(localVarFormParams).length) {
|
|
643
|
+
if (localVarUseFormData) {
|
|
644
|
+
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
645
|
+
} else {
|
|
646
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
647
|
+
}
|
|
648
|
+
}
|
|
649
|
+
return new Promise<{ response: http.IncomingMessage; body: PostAnalytics; }>((resolve, reject) => {
|
|
650
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
651
|
+
if (error) {
|
|
652
|
+
reject(error);
|
|
653
|
+
} else {
|
|
654
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
655
|
+
body = ObjectSerializer.deserialize(body, "PostAnalytics");
|
|
656
|
+
resolve({ response: response, body: body });
|
|
657
|
+
} else {
|
|
658
|
+
reject(new HttpError(response, body, response.statusCode));
|
|
659
|
+
}
|
|
660
|
+
}
|
|
661
|
+
});
|
|
662
|
+
});
|
|
663
|
+
});
|
|
664
|
+
}
|
|
578
665
|
/**
|
|
579
666
|
* Returns a paginated list of posts in the workspace.
|
|
580
667
|
* @summary List posts
|
|
@@ -653,7 +740,93 @@ export class PostsApi {
|
|
|
653
740
|
});
|
|
654
741
|
}
|
|
655
742
|
/**
|
|
656
|
-
*
|
|
743
|
+
* Re-publishes a post to a single account whose publishing failed. Returns `422` when the account is not on the post, the post is still publishing, or the account did not fail.
|
|
744
|
+
* @summary Retry publishing to one account
|
|
745
|
+
* @param workspaceUuid UUID of the workspace.
|
|
746
|
+
* @param postUuid UUID of the post.
|
|
747
|
+
* @param accountUuid UUID of the social media account.
|
|
748
|
+
*/
|
|
749
|
+
public async retryPostAccount (workspaceUuid: string, postUuid: string, accountUuid: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: RetryPostAccountResult; }> {
|
|
750
|
+
const localVarPath = this.basePath + '/{workspaceUuid}/posts/retry/{postUuid}/{accountUuid}'
|
|
751
|
+
.replace('{' + 'workspaceUuid' + '}', encodeURIComponent(String(workspaceUuid)))
|
|
752
|
+
.replace('{' + 'postUuid' + '}', encodeURIComponent(String(postUuid)))
|
|
753
|
+
.replace('{' + 'accountUuid' + '}', encodeURIComponent(String(accountUuid)));
|
|
754
|
+
let localVarQueryParameters: any = {};
|
|
755
|
+
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
756
|
+
const produces = ['application/json'];
|
|
757
|
+
// give precedence to 'application/json'
|
|
758
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
759
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
760
|
+
} else {
|
|
761
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
762
|
+
}
|
|
763
|
+
let localVarFormParams: any = {};
|
|
764
|
+
|
|
765
|
+
// verify required parameter 'workspaceUuid' is not null or undefined
|
|
766
|
+
if (workspaceUuid === null || workspaceUuid === undefined) {
|
|
767
|
+
throw new Error('Required parameter workspaceUuid was null or undefined when calling retryPostAccount.');
|
|
768
|
+
}
|
|
769
|
+
|
|
770
|
+
// verify required parameter 'postUuid' is not null or undefined
|
|
771
|
+
if (postUuid === null || postUuid === undefined) {
|
|
772
|
+
throw new Error('Required parameter postUuid was null or undefined when calling retryPostAccount.');
|
|
773
|
+
}
|
|
774
|
+
|
|
775
|
+
// verify required parameter 'accountUuid' is not null or undefined
|
|
776
|
+
if (accountUuid === null || accountUuid === undefined) {
|
|
777
|
+
throw new Error('Required parameter accountUuid was null or undefined when calling retryPostAccount.');
|
|
778
|
+
}
|
|
779
|
+
|
|
780
|
+
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
781
|
+
|
|
782
|
+
let localVarUseFormData = false;
|
|
783
|
+
|
|
784
|
+
let localVarRequestOptions: localVarRequest.Options = {
|
|
785
|
+
method: 'POST',
|
|
786
|
+
qs: localVarQueryParameters,
|
|
787
|
+
headers: localVarHeaderParams,
|
|
788
|
+
uri: localVarPath,
|
|
789
|
+
useQuerystring: this._useQuerystring,
|
|
790
|
+
json: true,
|
|
791
|
+
};
|
|
792
|
+
|
|
793
|
+
let authenticationPromise = Promise.resolve();
|
|
794
|
+
if (this.authentications.bearerAuth.accessToken) {
|
|
795
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.bearerAuth.applyToRequest(localVarRequestOptions));
|
|
796
|
+
}
|
|
797
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
798
|
+
|
|
799
|
+
let interceptorPromise = authenticationPromise;
|
|
800
|
+
for (const interceptor of this.interceptors) {
|
|
801
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
802
|
+
}
|
|
803
|
+
|
|
804
|
+
return interceptorPromise.then(() => {
|
|
805
|
+
if (Object.keys(localVarFormParams).length) {
|
|
806
|
+
if (localVarUseFormData) {
|
|
807
|
+
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
808
|
+
} else {
|
|
809
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
810
|
+
}
|
|
811
|
+
}
|
|
812
|
+
return new Promise<{ response: http.IncomingMessage; body: RetryPostAccountResult; }>((resolve, reject) => {
|
|
813
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
814
|
+
if (error) {
|
|
815
|
+
reject(error);
|
|
816
|
+
} else {
|
|
817
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
818
|
+
body = ObjectSerializer.deserialize(body, "RetryPostAccountResult");
|
|
819
|
+
resolve({ response: response, body: body });
|
|
820
|
+
} else {
|
|
821
|
+
reject(new HttpError(response, body, response.statusCode));
|
|
822
|
+
}
|
|
823
|
+
}
|
|
824
|
+
});
|
|
825
|
+
});
|
|
826
|
+
});
|
|
827
|
+
}
|
|
828
|
+
/**
|
|
829
|
+
* Schedule an existing post. Optionally move it with `date`/`time` (read in `timezone`) and give accounts their own times with `accounts_schedule`. Set `postNow: true` to publish immediately; publishing starts within the request and any per-account times are dropped. Provider requirements are validated and reported as `422`.
|
|
657
830
|
* @summary Schedule post
|
|
658
831
|
* @param workspaceUuid UUID of the workspace.
|
|
659
832
|
* @param postUuid UUID of the post.
|
|
@@ -739,7 +912,7 @@ export class PostsApi {
|
|
|
739
912
|
});
|
|
740
913
|
}
|
|
741
914
|
/**
|
|
742
|
-
* Replaces a post\'s versions, accounts, tags, and scheduling options. The post must not be in a published state.
|
|
915
|
+
* Replaces a post\'s versions, accounts, tags, and scheduling options. The post must not be in a published state. `timezone` is honoured: `date`, `time` and `accounts_schedule` are read in it. When the post stays scheduled, provider requirements are validated and reported as `422`.
|
|
743
916
|
* @summary Update post
|
|
744
917
|
* @param workspaceUuid UUID of the workspace.
|
|
745
918
|
* @param postUuid UUID of the post.
|
package/api/receiptsApi.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* PostBoost API
|
|
3
|
-
* The PostBoost REST API lets you publish, schedule, and analyze social media posts across 12+ 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 ```
|
|
3
|
+
* The PostBoost REST API lets you publish, schedule, and analyze social media posts across 12+ 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`. ## Plan access Every workspace-scoped endpoint returns `403` when the workspace\'s plan does not include API access (capability `api`). ## Dates and times Post dates and times (`date`, `time`, `accounts_schedule`) are read in the request\'s `timezone` when one is given, otherwise in the workspace timezone. ## 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
4
|
*
|
|
5
|
-
* The version of the OpenAPI document: 1.
|
|
5
|
+
* The version of the OpenAPI document: 1.8.0
|
|
6
6
|
* Contact: hi@postboost.co
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
package/api/subscriptionsApi.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* PostBoost API
|
|
3
|
-
* The PostBoost REST API lets you publish, schedule, and analyze social media posts across 12+ 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 ```
|
|
3
|
+
* The PostBoost REST API lets you publish, schedule, and analyze social media posts across 12+ 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`. ## Plan access Every workspace-scoped endpoint returns `403` when the workspace\'s plan does not include API access (capability `api`). ## Dates and times Post dates and times (`date`, `time`, `accounts_schedule`) are read in the request\'s `timezone` when one is given, otherwise in the workspace timezone. ## 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
4
|
*
|
|
5
|
-
* The version of the OpenAPI document: 1.
|
|
5
|
+
* The version of the OpenAPI document: 1.8.0
|
|
6
6
|
* Contact: hi@postboost.co
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -16,9 +16,12 @@ import http from 'http';
|
|
|
16
16
|
|
|
17
17
|
/* tslint:disable:no-unused-locals */
|
|
18
18
|
import { AddGenericSubscriptionRequest } from '../model/addGenericSubscriptionRequest';
|
|
19
|
+
import { CancelSubscription422Response } from '../model/cancelSubscription422Response';
|
|
20
|
+
import { CancelSubscriptionRequest } from '../model/cancelSubscriptionRequest';
|
|
19
21
|
import { ChangeSubscriptionPlanRequest } from '../model/changeSubscriptionPlanRequest';
|
|
20
22
|
import { CheckoutSubscription200Response } from '../model/checkoutSubscription200Response';
|
|
21
23
|
import { CheckoutSubscriptionRequest } from '../model/checkoutSubscriptionRequest';
|
|
24
|
+
import { RemoveGenericSubscription422Response } from '../model/removeGenericSubscription422Response';
|
|
22
25
|
import { Subscription } from '../model/subscription';
|
|
23
26
|
import { SubscriptionInput } from '../model/subscriptionInput';
|
|
24
27
|
import { SubscriptionUpdateInput } from '../model/subscriptionUpdateInput';
|
|
@@ -178,11 +181,12 @@ export class SubscriptionsApi {
|
|
|
178
181
|
});
|
|
179
182
|
}
|
|
180
183
|
/**
|
|
181
|
-
* Cancels the workspace\'s Stripe subscription at the end of the current billing period. Admin only.
|
|
184
|
+
* Cancels the workspace\'s Stripe subscription at the end of the current billing period, or right away with `immediately: true`. Works for active and past-due subscriptions. Admin only.
|
|
182
185
|
* @summary Cancel subscription
|
|
183
186
|
* @param workspaceUuid UUID of the workspace.
|
|
187
|
+
* @param cancelSubscriptionRequest
|
|
184
188
|
*/
|
|
185
|
-
public async cancelSubscription (workspaceUuid: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: object; }> {
|
|
189
|
+
public async cancelSubscription (workspaceUuid: string, cancelSubscriptionRequest?: CancelSubscriptionRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: object; }> {
|
|
186
190
|
const localVarPath = this.basePath + '/panel/workspaces/{workspaceUuid}/subscription/cancel'
|
|
187
191
|
.replace('{' + 'workspaceUuid' + '}', encodeURIComponent(String(workspaceUuid)));
|
|
188
192
|
let localVarQueryParameters: any = {};
|
|
@@ -212,6 +216,7 @@ export class SubscriptionsApi {
|
|
|
212
216
|
uri: localVarPath,
|
|
213
217
|
useQuerystring: this._useQuerystring,
|
|
214
218
|
json: true,
|
|
219
|
+
body: ObjectSerializer.serialize(cancelSubscriptionRequest, "CancelSubscriptionRequest")
|
|
215
220
|
};
|
|
216
221
|
|
|
217
222
|
let authenticationPromise = Promise.resolve();
|
|
@@ -631,7 +636,7 @@ export class SubscriptionsApi {
|
|
|
631
636
|
});
|
|
632
637
|
}
|
|
633
638
|
/**
|
|
634
|
-
* Removes the generic (non-Stripe) subscription from the workspace. Admin only.
|
|
639
|
+
* Removes the generic (non-Stripe) subscription from the workspace. Returns `422` when the workspace has no generic subscription. Admin only.
|
|
635
640
|
* @summary Remove generic subscription
|
|
636
641
|
* @param workspaceUuid UUID of the workspace.
|
|
637
642
|
*/
|
package/api/tagsApi.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* PostBoost API
|
|
3
|
-
* The PostBoost REST API lets you publish, schedule, and analyze social media posts across 12+ 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 ```
|
|
3
|
+
* The PostBoost REST API lets you publish, schedule, and analyze social media posts across 12+ 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`. ## Plan access Every workspace-scoped endpoint returns `403` when the workspace\'s plan does not include API access (capability `api`). ## Dates and times Post dates and times (`date`, `time`, `accounts_schedule`) are read in the request\'s `timezone` when one is given, otherwise in the workspace timezone. ## 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
4
|
*
|
|
5
|
-
* The version of the OpenAPI document: 1.
|
|
5
|
+
* The version of the OpenAPI document: 1.8.0
|
|
6
6
|
* Contact: hi@postboost.co
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
package/api/usersApi.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* PostBoost API
|
|
3
|
-
* The PostBoost REST API lets you publish, schedule, and analyze social media posts across 12+ 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 ```
|
|
3
|
+
* The PostBoost REST API lets you publish, schedule, and analyze social media posts across 12+ 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`. ## Plan access Every workspace-scoped endpoint returns `403` when the workspace\'s plan does not include API access (capability `api`). ## Dates and times Post dates and times (`date`, `time`, `accounts_schedule`) are read in the request\'s `timezone` when one is given, otherwise in the workspace timezone. ## 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
4
|
*
|
|
5
|
-
* The version of the OpenAPI document: 1.
|
|
5
|
+
* The version of the OpenAPI document: 1.8.0
|
|
6
6
|
* Contact: hi@postboost.co
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
package/api/workspacesApi.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* PostBoost API
|
|
3
|
-
* The PostBoost REST API lets you publish, schedule, and analyze social media posts across 12+ 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 ```
|
|
3
|
+
* The PostBoost REST API lets you publish, schedule, and analyze social media posts across 12+ 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`. ## Plan access Every workspace-scoped endpoint returns `403` when the workspace\'s plan does not include API access (capability `api`). ## Dates and times Post dates and times (`date`, `time`, `accounts_schedule`) are read in the request\'s `timezone` when one is given, otherwise in the workspace timezone. ## 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
4
|
*
|
|
5
|
-
* The version of the OpenAPI document: 1.
|
|
5
|
+
* The version of the OpenAPI document: 1.8.0
|
|
6
6
|
* Contact: hi@postboost.co
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -15,7 +15,9 @@ import localVarRequest from 'request';
|
|
|
15
15
|
import http from 'http';
|
|
16
16
|
|
|
17
17
|
/* tslint:disable:no-unused-locals */
|
|
18
|
+
import { AICredits } from '../model/aICredits';
|
|
18
19
|
import { DeleteWorkspacesBulkRequest } from '../model/deleteWorkspacesBulkRequest';
|
|
20
|
+
import { ListMyWorkspaces200Response } from '../model/listMyWorkspaces200Response';
|
|
19
21
|
import { ListWorkspaces200Response } from '../model/listWorkspaces200Response';
|
|
20
22
|
import { RemoveUserFromWorkspaceRequest } from '../model/removeUserFromWorkspaceRequest';
|
|
21
23
|
import { Workspace } from '../model/workspace';
|
|
@@ -464,6 +466,143 @@ export class WorkspacesApi {
|
|
|
464
466
|
});
|
|
465
467
|
});
|
|
466
468
|
}
|
|
469
|
+
/**
|
|
470
|
+
* Returns whether the workspace can use AI credits, its remaining balance, and whether the balance is low. Admin only.
|
|
471
|
+
* @summary Get workspace AI credits
|
|
472
|
+
* @param workspaceUuid UUID of the workspace.
|
|
473
|
+
*/
|
|
474
|
+
public async getWorkspaceAICredits (workspaceUuid: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: AICredits; }> {
|
|
475
|
+
const localVarPath = this.basePath + '/panel/workspaces/{workspaceUuid}/ai-credits'
|
|
476
|
+
.replace('{' + 'workspaceUuid' + '}', encodeURIComponent(String(workspaceUuid)));
|
|
477
|
+
let localVarQueryParameters: any = {};
|
|
478
|
+
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
479
|
+
const produces = ['application/json'];
|
|
480
|
+
// give precedence to 'application/json'
|
|
481
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
482
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
483
|
+
} else {
|
|
484
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
485
|
+
}
|
|
486
|
+
let localVarFormParams: any = {};
|
|
487
|
+
|
|
488
|
+
// verify required parameter 'workspaceUuid' is not null or undefined
|
|
489
|
+
if (workspaceUuid === null || workspaceUuid === undefined) {
|
|
490
|
+
throw new Error('Required parameter workspaceUuid was null or undefined when calling getWorkspaceAICredits.');
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
494
|
+
|
|
495
|
+
let localVarUseFormData = false;
|
|
496
|
+
|
|
497
|
+
let localVarRequestOptions: localVarRequest.Options = {
|
|
498
|
+
method: 'GET',
|
|
499
|
+
qs: localVarQueryParameters,
|
|
500
|
+
headers: localVarHeaderParams,
|
|
501
|
+
uri: localVarPath,
|
|
502
|
+
useQuerystring: this._useQuerystring,
|
|
503
|
+
json: true,
|
|
504
|
+
};
|
|
505
|
+
|
|
506
|
+
let authenticationPromise = Promise.resolve();
|
|
507
|
+
if (this.authentications.bearerAuth.accessToken) {
|
|
508
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.bearerAuth.applyToRequest(localVarRequestOptions));
|
|
509
|
+
}
|
|
510
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
511
|
+
|
|
512
|
+
let interceptorPromise = authenticationPromise;
|
|
513
|
+
for (const interceptor of this.interceptors) {
|
|
514
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
return interceptorPromise.then(() => {
|
|
518
|
+
if (Object.keys(localVarFormParams).length) {
|
|
519
|
+
if (localVarUseFormData) {
|
|
520
|
+
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
521
|
+
} else {
|
|
522
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
523
|
+
}
|
|
524
|
+
}
|
|
525
|
+
return new Promise<{ response: http.IncomingMessage; body: AICredits; }>((resolve, reject) => {
|
|
526
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
527
|
+
if (error) {
|
|
528
|
+
reject(error);
|
|
529
|
+
} else {
|
|
530
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
531
|
+
body = ObjectSerializer.deserialize(body, "AICredits");
|
|
532
|
+
resolve({ response: response, body: body });
|
|
533
|
+
} else {
|
|
534
|
+
reject(new HttpError(response, body, response.statusCode));
|
|
535
|
+
}
|
|
536
|
+
}
|
|
537
|
+
});
|
|
538
|
+
});
|
|
539
|
+
});
|
|
540
|
+
}
|
|
541
|
+
/**
|
|
542
|
+
* Returns the workspaces the authenticated user belongs to, most recently updated first, with the caller\'s role in each. Use a returned `uuid` as `workspaceUuid`.
|
|
543
|
+
* @summary List my workspaces
|
|
544
|
+
*/
|
|
545
|
+
public async listMyWorkspaces (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: ListMyWorkspaces200Response; }> {
|
|
546
|
+
const localVarPath = this.basePath + '/workspaces';
|
|
547
|
+
let localVarQueryParameters: any = {};
|
|
548
|
+
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
549
|
+
const produces = ['application/json'];
|
|
550
|
+
// give precedence to 'application/json'
|
|
551
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
552
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
553
|
+
} else {
|
|
554
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
555
|
+
}
|
|
556
|
+
let localVarFormParams: any = {};
|
|
557
|
+
|
|
558
|
+
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
559
|
+
|
|
560
|
+
let localVarUseFormData = false;
|
|
561
|
+
|
|
562
|
+
let localVarRequestOptions: localVarRequest.Options = {
|
|
563
|
+
method: 'GET',
|
|
564
|
+
qs: localVarQueryParameters,
|
|
565
|
+
headers: localVarHeaderParams,
|
|
566
|
+
uri: localVarPath,
|
|
567
|
+
useQuerystring: this._useQuerystring,
|
|
568
|
+
json: true,
|
|
569
|
+
};
|
|
570
|
+
|
|
571
|
+
let authenticationPromise = Promise.resolve();
|
|
572
|
+
if (this.authentications.bearerAuth.accessToken) {
|
|
573
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.bearerAuth.applyToRequest(localVarRequestOptions));
|
|
574
|
+
}
|
|
575
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
576
|
+
|
|
577
|
+
let interceptorPromise = authenticationPromise;
|
|
578
|
+
for (const interceptor of this.interceptors) {
|
|
579
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
return interceptorPromise.then(() => {
|
|
583
|
+
if (Object.keys(localVarFormParams).length) {
|
|
584
|
+
if (localVarUseFormData) {
|
|
585
|
+
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
586
|
+
} else {
|
|
587
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
588
|
+
}
|
|
589
|
+
}
|
|
590
|
+
return new Promise<{ response: http.IncomingMessage; body: ListMyWorkspaces200Response; }>((resolve, reject) => {
|
|
591
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
592
|
+
if (error) {
|
|
593
|
+
reject(error);
|
|
594
|
+
} else {
|
|
595
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
596
|
+
body = ObjectSerializer.deserialize(body, "ListMyWorkspaces200Response");
|
|
597
|
+
resolve({ response: response, body: body });
|
|
598
|
+
} else {
|
|
599
|
+
reject(new HttpError(response, body, response.statusCode));
|
|
600
|
+
}
|
|
601
|
+
}
|
|
602
|
+
});
|
|
603
|
+
});
|
|
604
|
+
});
|
|
605
|
+
}
|
|
467
606
|
/**
|
|
468
607
|
* Returns a paginated list of all workspaces. Admin only.
|
|
469
608
|
* @summary List workspaces
|
|
@@ -629,7 +768,7 @@ export class WorkspacesApi {
|
|
|
629
768
|
});
|
|
630
769
|
}
|
|
631
770
|
/**
|
|
632
|
-
* Updates a workspace\'s name,
|
|
771
|
+
* Updates a workspace\'s name, owner, or access status. Admin only. `hex_color` is accepted but ignored.
|
|
633
772
|
* @summary Update workspace
|
|
634
773
|
* @param workspaceUuid UUID of the workspace.
|
|
635
774
|
* @param workspaceInput
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PostBoost API
|
|
3
|
+
* The PostBoost REST API lets you publish, schedule, and analyze social media posts across 12+ 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`. ## Plan access Every workspace-scoped endpoint returns `403` when the workspace\'s plan does not include API access (capability `api`). ## Dates and times Post dates and times (`date`, `time`, `accounts_schedule`) are read in the request\'s `timezone` when one is given, otherwise in the workspace timezone. ## 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.8.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
|
+
import { RequestFile } from './models';
|
|
14
|
+
|
|
15
|
+
export class AICredits {
|
|
16
|
+
/**
|
|
17
|
+
* Whether the workspace can spend AI credits now. Always true when no balance is tracked.
|
|
18
|
+
*/
|
|
19
|
+
'available': boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Remaining credit balance (2 decimals), or null when no balance is tracked.
|
|
22
|
+
*/
|
|
23
|
+
'balance': number;
|
|
24
|
+
/**
|
|
25
|
+
* True when the balance is above 0 and at most 10.
|
|
26
|
+
*/
|
|
27
|
+
'low': boolean;
|
|
28
|
+
|
|
29
|
+
static discriminator: string | undefined = undefined;
|
|
30
|
+
|
|
31
|
+
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
|
|
32
|
+
{
|
|
33
|
+
"name": "available",
|
|
34
|
+
"baseName": "available",
|
|
35
|
+
"type": "boolean"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"name": "balance",
|
|
39
|
+
"baseName": "balance",
|
|
40
|
+
"type": "number"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"name": "low",
|
|
44
|
+
"baseName": "low",
|
|
45
|
+
"type": "boolean"
|
|
46
|
+
} ];
|
|
47
|
+
|
|
48
|
+
static getAttributeTypeMap() {
|
|
49
|
+
return AICredits.attributeTypeMap;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|