postboost 1.8.0 → 1.14.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/.github/ISSUE_TEMPLATE/bug_report.yml +26 -0
- package/.github/ISSUE_TEMPLATE/config.yml +11 -0
- package/.github/ISSUE_TEMPLATE/feature_request.yml +14 -0
- package/.github/pull_request_template.md +6 -0
- package/CODE_OF_CONDUCT.md +7 -0
- package/CONTRIBUTING.md +31 -0
- package/README.md +46 -2
- package/SECURITY.md +9 -0
- package/api/aIApi.ts +460 -2
- package/api/accountGroupsApi.ts +501 -0
- package/api/accountsApi.ts +244 -2
- package/api/activityApi.ts +188 -0
- package/api/agentsApi.ts +918 -0
- package/api/analyticsApi.ts +551 -2
- package/api/apis.ts +19 -1
- package/api/competitorsApi.ts +412 -0
- package/api/hashtagGroupsApi.ts +501 -0
- package/api/inboxApi.ts +957 -0
- package/api/mediaApi.ts +97 -7
- package/api/mentionsApi.ts +5 -3
- package/api/postingScheduleApi.ts +497 -0
- package/api/postsApi.ts +1236 -99
- package/api/receiptsApi.ts +2 -2
- package/api/subscriptionsApi.ts +2 -2
- package/api/tagsApi.ts +5 -3
- package/api/templatesApi.ts +501 -0
- package/api/usersApi.ts +2 -2
- package/api/webhooksApi.ts +327 -0
- package/api/workspacesApi.ts +463 -2
- package/model/aICredits.ts +2 -2
- package/model/aIUsage.ts +39 -0
- package/model/aIUsageText.ts +52 -0
- package/model/account.ts +26 -4
- package/model/accountAnalytics.ts +2 -2
- package/model/accountAnalyticsInitialSync.ts +2 -2
- package/model/accountConnectionHealth.ts +124 -0
- package/model/accountErrorsInner.ts +50 -0
- package/model/accountErrorsInnerOneOf.ts +49 -0
- package/model/accountGroup.ts +49 -0
- package/model/accountGroupInput.ts +40 -0
- package/model/accountHealth.ts +90 -0
- package/model/accountHealthDailyCap.ts +43 -0
- package/model/accountSchedule.ts +2 -2
- package/model/addCompetitor202Response.ts +43 -0
- package/model/addCompetitor409Response.ts +37 -0
- package/model/addGenericSubscriptionRequest.ts +2 -2
- package/model/addPostToQueueRequest.ts +2 -2
- package/model/agentPageMeta.ts +49 -0
- package/model/agentProposal.ts +137 -0
- package/model/agentProposalDecision.ts +31 -0
- package/model/agentRun.ts +129 -0
- package/model/analyticsPeriod.ts +2 -2
- package/model/analyticsSummary.ts +2 -2
- package/model/analyticsSummaryData.ts +2 -2
- package/model/apiActivity.ts +94 -0
- package/model/apiActivityOutcome.ts +27 -0
- package/model/apiKey.ts +77 -0
- package/model/apiKeyAbility.ts +21 -0
- package/model/apiKeyInput.ts +56 -0
- package/model/approveAgentProposal200Response.ts +32 -0
- package/model/approveAgentProposal409Response.ts +38 -0
- package/model/approveInboxReplyDraft403Response.ts +43 -0
- package/model/approvePostRequest.ts +2 -2
- package/model/bestPostingTimes.ts +2 -2
- package/model/bestPostingTimesTimesInner.ts +2 -2
- package/model/blogToSocial200Response.ts +9 -2
- package/model/blogToSocial429Response.ts +2 -2
- package/model/blogToSocialCaption.ts +2 -2
- package/model/blogToSocialInput.ts +11 -2
- package/model/blogToSocialMedia.ts +2 -2
- package/model/blogToSocialResponse.ts +2 -2
- package/model/brandVoice.ts +136 -0
- package/model/brandVoiceInput.ts +142 -0
- package/model/brandVoiceMeta.ts +34 -0
- package/model/cancelSubscription422Response.ts +2 -2
- package/model/cancelSubscription422ResponseErrors.ts +2 -2
- package/model/cancelSubscriptionRequest.ts +2 -2
- package/model/changeSubscriptionPlanRequest.ts +2 -2
- package/model/channelAccount.ts +101 -0
- package/model/checkoutSubscription200Response.ts +2 -2
- package/model/checkoutSubscriptionRequest.ts +2 -2
- package/model/codedError.ts +46 -0
- package/model/competitor.ts +82 -0
- package/model/competitorDetail.ts +96 -0
- package/model/competitorInput.ts +43 -0
- package/model/competitorMedia.ts +61 -0
- package/model/competitorSnapshot.ts +43 -0
- package/model/completeChunkedUploadRequest.ts +2 -2
- package/model/connectChannelInput.ts +64 -0
- package/model/createAccountGroup201Response.ts +32 -0
- package/model/createAgent201Response.ts +32 -0
- package/model/createApiKey201Response.ts +32 -0
- package/model/createApiKey201ResponseData.ts +86 -0
- package/model/createHashtagGroup201Response.ts +32 -0
- package/model/createInboxReplyDraft201Response.ts +32 -0
- package/model/createMediaFolderRequest.ts +2 -2
- package/model/createMention201Response.ts +2 -2
- package/model/createRecyclingRule201Response.ts +32 -0
- package/model/createReportExport201Response.ts +32 -0
- package/model/createResellerClient201Response.ts +32 -0
- package/model/createRssFeed201Response.ts +32 -0
- package/model/createTemplate201Response.ts +32 -0
- package/model/createWebhookSubscription201Response.ts +32 -0
- package/model/createWebhookSubscription201ResponseData.ts +70 -0
- package/model/deleteAgent200Response.ts +31 -0
- package/model/deleteMediaBulkRequest.ts +2 -2
- package/model/deleteMediaBulkRequestItemsInner.ts +2 -2
- package/model/deleteMediaFolderRequest.ts +2 -2
- 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/getAccountHealth200Response.ts +32 -0
- package/model/getBrandVoice200Response.ts +32 -0
- package/model/getCompetitor200Response.ts +32 -0
- package/model/getInboxConversation200Response.ts +32 -0
- package/model/getPostingSchedule200Response.ts +32 -0
- package/model/getRemoteUploadStatus200Response.ts +2 -2
- package/model/getReportBranding200Response.ts +32 -0
- package/model/guardrailError.ts +82 -0
- package/model/hashtagGroup.ts +46 -0
- package/model/hashtagGroupInput.ts +37 -0
- package/model/imageAltText200Response.ts +2 -2
- package/model/imageAltTextInput.ts +2 -2
- package/model/imageAltTextResponse.ts +2 -2
- package/model/imageCreditBalance.ts +67 -0
- package/model/imageEditInput.ts +11 -2
- package/model/imageGenerate200Response.ts +9 -2
- package/model/imageGenerate429Response.ts +2 -2
- package/model/imageGenerateInput.ts +14 -2
- package/model/imageGenerationResponse.ts +2 -2
- package/model/imagePrompt200Response.ts +9 -2
- package/model/imagePrompt429Response.ts +2 -2
- package/model/imagePromptInput.ts +14 -2
- package/model/imagePromptResponse.ts +2 -2
- package/model/imageVariations200Response.ts +2 -2
- package/model/imageVariationsInput.ts +2 -2
- package/model/imageVariationsResponse.ts +2 -2
- package/model/inboxAuthor.ts +43 -0
- package/model/inboxConversation.ts +139 -0
- package/model/inboxConversationAccount.ts +49 -0
- package/model/inboxConversationUpdate.ts +43 -0
- package/model/inboxMessage.ts +95 -0
- package/model/inboxMessageAuthor.ts +43 -0
- package/model/inboxReplyDraft.ts +132 -0
- package/model/inboxReplyDraftApprove.ts +34 -0
- package/model/inboxReplyDraftEdit.ts +31 -0
- package/model/inboxReplyDraftInput.ts +43 -0
- package/model/initiateChunkedUpload201Response.ts +2 -2
- package/model/initiateChunkedUploadRequest.ts +2 -2
- package/model/initiateRemoteUpload201Response.ts +2 -2
- package/model/initiateRemoteUpload201ResponseOneOf.ts +2 -2
- package/model/initiateRemoteUploadRequest.ts +2 -2
- package/model/learnBrandVoiceInput.ts +61 -0
- package/model/learnBrandVoiceResponse.ts +39 -0
- package/model/learnBrandVoiceResponseMeta.ts +55 -0
- package/model/listAccountGroups200Response.ts +46 -0
- package/model/listAccounts200Response.ts +2 -2
- package/model/listAgentProposals200Response.ts +39 -0
- package/model/listAgentRuns200Response.ts +39 -0
- package/model/listAgents200Response.ts +32 -0
- package/model/listApiActivity200Response.ts +46 -0
- package/model/listApiKeys200Response.ts +32 -0
- package/model/listCompetitors200Response.ts +32 -0
- package/model/listHashtagGroups200Response.ts +46 -0
- package/model/listInboxConversations200Response.ts +46 -0
- package/model/listInboxReplyDrafts200Response.ts +46 -0
- package/model/listMedia200Response.ts +2 -2
- package/model/listMediaFolders200Response.ts +2 -2
- package/model/listMentions200Response.ts +2 -2
- package/model/listMyWorkspaces200Response.ts +2 -2
- package/model/listPosts200Response.ts +2 -2
- package/model/listReceipts200Response.ts +2 -2
- package/model/listRecyclingRules200Response.ts +32 -0
- package/model/listRecyclingRuns200Response.ts +32 -0
- package/model/listReportExports200Response.ts +32 -0
- package/model/listResellerClients200Response.ts +39 -0
- package/model/listRssFeeds200Response.ts +32 -0
- package/model/listTags200Response.ts +2 -2
- package/model/listTemplates200Response.ts +46 -0
- package/model/listUsers200Response.ts +2 -2
- package/model/listWebhookSubscriptions200Response.ts +32 -0
- package/model/listWorkspaces200Response.ts +2 -2
- package/model/media.ts +2 -2
- package/model/mediaBase64Input.ts +61 -0
- package/model/mediaFolder.ts +2 -2
- package/model/mediaFolderInput.ts +2 -2
- package/model/mediaFolderRef.ts +2 -2
- package/model/mention.ts +2 -2
- package/model/mentionIdentity.ts +2 -2
- package/model/mentionIdentityInput.ts +2 -2
- package/model/mentionInput.ts +2 -2
- package/model/messageOnly.ts +31 -0
- package/model/models.ts +475 -0
- package/model/paginationMeta.ts +2 -2
- package/model/paginationMetaLinks.ts +4 -4
- package/model/paginationMetaMeta.ts +4 -4
- package/model/pollRssFeed200Response.ts +50 -0
- package/model/post.ts +2 -2
- package/model/postAnalytics.ts +2 -2
- package/model/postContent.ts +6 -3
- package/model/postInput.ts +20 -2
- package/model/postOptionsInstagram.ts +59 -0
- package/model/postOptionsTikTok.ts +97 -0
- package/model/postOptionsYoutube.ts +62 -0
- package/model/postStatus.ts +2 -2
- package/model/postVersion.ts +7 -6
- package/model/postVersionOptions.ts +55 -0
- package/model/postingSchedule.ts +74 -0
- package/model/postingScheduleDay.ts +50 -0
- package/model/postingScheduleDayTimesInner.ts +34 -0
- package/model/postingScheduleInput.ts +53 -0
- package/model/postingTimeSlot.ts +2 -2
- package/model/postingTimes.ts +2 -2
- package/model/postingTimesBestInner.ts +2 -2
- package/model/postingTimesDayIntervalsInnerInner.ts +2 -2
- package/model/postingTimesDaysInner.ts +2 -2
- package/model/preflightResult.ts +69 -0
- package/model/publicWorkspace.ts +2 -2
- package/model/publicWorkspacePivot.ts +2 -2
- package/model/publishProgress.ts +2 -2
- package/model/queueSlots.ts +43 -0
- package/model/receipt.ts +2 -2
- package/model/receiptInput.ts +2 -2
- package/model/receiptUpdateInput.ts +2 -2
- package/model/recommendedPostingTimes.ts +61 -0
- package/model/reconnectLink.ts +46 -0
- package/model/recyclingRule.ts +117 -0
- package/model/recyclingRuleInput.ts +114 -0
- package/model/recyclingRuleSettings.ts +83 -0
- package/model/recyclingRuleUpdate.ts +71 -0
- package/model/recyclingRun.ts +71 -0
- package/model/removeGenericSubscription422Response.ts +2 -2
- package/model/removeUserFromWorkspaceRequest.ts +2 -2
- package/model/reportBranding.ts +61 -0
- package/model/reportBrandingInput.ts +55 -0
- package/model/reportExport.ts +121 -0
- package/model/reportExportInput.ts +91 -0
- package/model/repurposeContent200Response.ts +39 -0
- package/model/repurposeInput.ts +213 -0
- package/model/repurposeInputTheme.ts +46 -0
- package/model/repurposeResult.ts +89 -0
- package/model/repurposeResultMedia.ts +40 -0
- package/model/repurposeResultSource.ts +51 -0
- package/model/repurposeSlide.ts +43 -0
- package/model/resellerClient.ts +82 -0
- package/model/resellerClientInput.ts +31 -0
- package/model/resellerClientUsage.ts +43 -0
- package/model/retryPostAccountResult.ts +2 -2
- package/model/rssFeed.ts +100 -0
- package/model/rssFeedInput.ts +79 -0
- package/model/rssFeedUpdate.ts +73 -0
- package/model/runAgent202Response.ts +32 -0
- package/model/schedulePostRequest.ts +2 -2
- package/model/scheduleResult.ts +2 -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/template.ts +47 -0
- package/model/templateContentItem.ts +40 -0
- package/model/templateInput.ts +41 -0
- package/model/templateInputContentInner.ts +40 -0
- package/model/updateMediaRequest.ts +2 -2
- package/model/uploadChunk201Response.ts +2 -2
- package/model/user.ts +2 -2
- package/model/userInput.ts +2 -2
- package/model/userUpdateInput.ts +2 -2
- package/model/webhookEventName.ts +31 -0
- package/model/webhookEventPayload.ts +43 -0
- package/model/webhookSubscription.ts +61 -0
- package/model/webhookSubscriptionInput.ts +67 -0
- package/model/workspace.ts +2 -2
- package/model/workspaceAgent.ts +91 -0
- package/model/workspaceAgentInput.ts +67 -0
- package/model/workspaceAgentSettings.ts +70 -0
- package/model/workspaceAgentUpdate.ts +58 -0
- package/model/workspaceInput.ts +2 -2
- package/model/workspaceUserInput.ts +2 -2
- package/model/xUsage.ts +68 -0
- package/model/xUsageCounter.ts +40 -0
- package/package.json +1 -1
|
@@ -0,0 +1,501 @@
|
|
|
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. ## Idempotent requests Send an `Idempotency-Key` header (any unique string, for example a UUID) with a `POST`. Repeating the request with the same key within 24 hours returns the stored response with `Idempotent-Replayed: true` and creates nothing new. Reusing a key with a different body returns `422`; a request still in progress with the same key returns `409`. `5xx` and `429` responses are not stored, so they can be retried with the same key. ## Guardrails for automated clients Create and update requests are checked before anything is written: a post whose content matches one created for the same account in the last 24 hours returns `409` (`code: duplicate_post`, override with `allow_duplicate: true`), scheduling past an account\'s daily cap returns `429` (`code: account_daily_cap_reached`), and scheduling to an account that must be reconnected returns `422` (`code: account_unauthorized` or `account_token_missing`). Use `POST /{workspaceUuid}/posts/validate` for a dry run and `GET /{workspaceUuid}/activity` to review what API clients did. ## 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.14.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 { CreateHashtagGroup201Response } from '../model/createHashtagGroup201Response';
|
|
19
|
+
import { HashtagGroupInput } from '../model/hashtagGroupInput';
|
|
20
|
+
import { ListHashtagGroups200Response } from '../model/listHashtagGroups200Response';
|
|
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 HashtagGroupsApiApiKeys {
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export class HashtagGroupsApi {
|
|
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: HashtagGroupsApiApiKeys, value: string) {
|
|
86
|
+
(this.authentications as any)[HashtagGroupsApiApiKeys[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
|
+
* Saves a named set of hashtags (up to 3000 characters). Admins and members only (not viewers).
|
|
99
|
+
* @summary Create a hashtag group
|
|
100
|
+
* @param workspaceUuid UUID of the workspace.
|
|
101
|
+
* @param hashtagGroupInput
|
|
102
|
+
*/
|
|
103
|
+
public async createHashtagGroup (workspaceUuid: string, hashtagGroupInput: HashtagGroupInput, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: CreateHashtagGroup201Response; }> {
|
|
104
|
+
const localVarPath = this.basePath + '/{workspaceUuid}/hashtag-groups'
|
|
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 createHashtagGroup.');
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
// verify required parameter 'hashtagGroupInput' is not null or undefined
|
|
123
|
+
if (hashtagGroupInput === null || hashtagGroupInput === undefined) {
|
|
124
|
+
throw new Error('Required parameter hashtagGroupInput was null or undefined when calling createHashtagGroup.');
|
|
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(hashtagGroupInput, "HashtagGroupInput")
|
|
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: CreateHashtagGroup201Response; }>((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, "CreateHashtagGroup201Response");
|
|
167
|
+
resolve({ response: response, body: body });
|
|
168
|
+
} else {
|
|
169
|
+
reject(new HttpError(response, body, response.statusCode));
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
});
|
|
173
|
+
});
|
|
174
|
+
});
|
|
175
|
+
}
|
|
176
|
+
/**
|
|
177
|
+
* Admins and members only (not viewers).
|
|
178
|
+
* @summary Delete a hashtag group
|
|
179
|
+
* @param workspaceUuid UUID of the workspace.
|
|
180
|
+
* @param hashtagGroupId The hashtag group `id`.
|
|
181
|
+
*/
|
|
182
|
+
public async deleteHashtagGroup (workspaceUuid: string, hashtagGroupId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> {
|
|
183
|
+
const localVarPath = this.basePath + '/{workspaceUuid}/hashtag-groups/{hashtagGroupId}'
|
|
184
|
+
.replace('{' + 'workspaceUuid' + '}', encodeURIComponent(String(workspaceUuid)))
|
|
185
|
+
.replace('{' + 'hashtagGroupId' + '}', encodeURIComponent(String(hashtagGroupId)));
|
|
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 deleteHashtagGroup.');
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
// verify required parameter 'hashtagGroupId' is not null or undefined
|
|
203
|
+
if (hashtagGroupId === null || hashtagGroupId === undefined) {
|
|
204
|
+
throw new Error('Required parameter hashtagGroupId was null or undefined when calling deleteHashtagGroup.');
|
|
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?: any; }>((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
|
+
resolve({ response: response, body: body });
|
|
246
|
+
} else {
|
|
247
|
+
reject(new HttpError(response, body, response.statusCode));
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
});
|
|
251
|
+
});
|
|
252
|
+
});
|
|
253
|
+
}
|
|
254
|
+
/**
|
|
255
|
+
* One hashtag group.
|
|
256
|
+
* @summary Get a hashtag group
|
|
257
|
+
* @param workspaceUuid UUID of the workspace.
|
|
258
|
+
* @param hashtagGroupId The hashtag group `id`.
|
|
259
|
+
*/
|
|
260
|
+
public async getHashtagGroup (workspaceUuid: string, hashtagGroupId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: CreateHashtagGroup201Response; }> {
|
|
261
|
+
const localVarPath = this.basePath + '/{workspaceUuid}/hashtag-groups/{hashtagGroupId}'
|
|
262
|
+
.replace('{' + 'workspaceUuid' + '}', encodeURIComponent(String(workspaceUuid)))
|
|
263
|
+
.replace('{' + 'hashtagGroupId' + '}', encodeURIComponent(String(hashtagGroupId)));
|
|
264
|
+
let localVarQueryParameters: any = {};
|
|
265
|
+
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
266
|
+
const produces = ['application/json'];
|
|
267
|
+
// give precedence to 'application/json'
|
|
268
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
269
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
270
|
+
} else {
|
|
271
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
272
|
+
}
|
|
273
|
+
let localVarFormParams: any = {};
|
|
274
|
+
|
|
275
|
+
// verify required parameter 'workspaceUuid' is not null or undefined
|
|
276
|
+
if (workspaceUuid === null || workspaceUuid === undefined) {
|
|
277
|
+
throw new Error('Required parameter workspaceUuid was null or undefined when calling getHashtagGroup.');
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
// verify required parameter 'hashtagGroupId' is not null or undefined
|
|
281
|
+
if (hashtagGroupId === null || hashtagGroupId === undefined) {
|
|
282
|
+
throw new Error('Required parameter hashtagGroupId was null or undefined when calling getHashtagGroup.');
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
286
|
+
|
|
287
|
+
let localVarUseFormData = false;
|
|
288
|
+
|
|
289
|
+
let localVarRequestOptions: localVarRequest.Options = {
|
|
290
|
+
method: 'GET',
|
|
291
|
+
qs: localVarQueryParameters,
|
|
292
|
+
headers: localVarHeaderParams,
|
|
293
|
+
uri: localVarPath,
|
|
294
|
+
useQuerystring: this._useQuerystring,
|
|
295
|
+
json: true,
|
|
296
|
+
};
|
|
297
|
+
|
|
298
|
+
let authenticationPromise = Promise.resolve();
|
|
299
|
+
if (this.authentications.bearerAuth.accessToken) {
|
|
300
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.bearerAuth.applyToRequest(localVarRequestOptions));
|
|
301
|
+
}
|
|
302
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
303
|
+
|
|
304
|
+
let interceptorPromise = authenticationPromise;
|
|
305
|
+
for (const interceptor of this.interceptors) {
|
|
306
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
return interceptorPromise.then(() => {
|
|
310
|
+
if (Object.keys(localVarFormParams).length) {
|
|
311
|
+
if (localVarUseFormData) {
|
|
312
|
+
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
313
|
+
} else {
|
|
314
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
return new Promise<{ response: http.IncomingMessage; body: CreateHashtagGroup201Response; }>((resolve, reject) => {
|
|
318
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
319
|
+
if (error) {
|
|
320
|
+
reject(error);
|
|
321
|
+
} else {
|
|
322
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
323
|
+
body = ObjectSerializer.deserialize(body, "CreateHashtagGroup201Response");
|
|
324
|
+
resolve({ response: response, body: body });
|
|
325
|
+
} else {
|
|
326
|
+
reject(new HttpError(response, body, response.statusCode));
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
});
|
|
330
|
+
});
|
|
331
|
+
});
|
|
332
|
+
}
|
|
333
|
+
/**
|
|
334
|
+
* Saved hashtag sets of the workspace, newest first. Paginated with `page` and `per_page` (default 100).
|
|
335
|
+
* @summary List hashtag groups
|
|
336
|
+
* @param workspaceUuid UUID of the workspace.
|
|
337
|
+
* @param page Page number (1-based).
|
|
338
|
+
* @param perPage Items per page, 1-100.
|
|
339
|
+
*/
|
|
340
|
+
public async listHashtagGroups (workspaceUuid: string, page?: number, perPage?: number, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: ListHashtagGroups200Response; }> {
|
|
341
|
+
const localVarPath = this.basePath + '/{workspaceUuid}/hashtag-groups'
|
|
342
|
+
.replace('{' + 'workspaceUuid' + '}', encodeURIComponent(String(workspaceUuid)));
|
|
343
|
+
let localVarQueryParameters: any = {};
|
|
344
|
+
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
345
|
+
const produces = ['application/json'];
|
|
346
|
+
// give precedence to 'application/json'
|
|
347
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
348
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
349
|
+
} else {
|
|
350
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
351
|
+
}
|
|
352
|
+
let localVarFormParams: any = {};
|
|
353
|
+
|
|
354
|
+
// verify required parameter 'workspaceUuid' is not null or undefined
|
|
355
|
+
if (workspaceUuid === null || workspaceUuid === undefined) {
|
|
356
|
+
throw new Error('Required parameter workspaceUuid was null or undefined when calling listHashtagGroups.');
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
if (page !== undefined) {
|
|
360
|
+
localVarQueryParameters['page'] = ObjectSerializer.serialize(page, "number");
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
if (perPage !== undefined) {
|
|
364
|
+
localVarQueryParameters['per_page'] = ObjectSerializer.serialize(perPage, "number");
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
368
|
+
|
|
369
|
+
let localVarUseFormData = false;
|
|
370
|
+
|
|
371
|
+
let localVarRequestOptions: localVarRequest.Options = {
|
|
372
|
+
method: 'GET',
|
|
373
|
+
qs: localVarQueryParameters,
|
|
374
|
+
headers: localVarHeaderParams,
|
|
375
|
+
uri: localVarPath,
|
|
376
|
+
useQuerystring: this._useQuerystring,
|
|
377
|
+
json: true,
|
|
378
|
+
};
|
|
379
|
+
|
|
380
|
+
let authenticationPromise = Promise.resolve();
|
|
381
|
+
if (this.authentications.bearerAuth.accessToken) {
|
|
382
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.bearerAuth.applyToRequest(localVarRequestOptions));
|
|
383
|
+
}
|
|
384
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
385
|
+
|
|
386
|
+
let interceptorPromise = authenticationPromise;
|
|
387
|
+
for (const interceptor of this.interceptors) {
|
|
388
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
return interceptorPromise.then(() => {
|
|
392
|
+
if (Object.keys(localVarFormParams).length) {
|
|
393
|
+
if (localVarUseFormData) {
|
|
394
|
+
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
395
|
+
} else {
|
|
396
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
return new Promise<{ response: http.IncomingMessage; body: ListHashtagGroups200Response; }>((resolve, reject) => {
|
|
400
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
401
|
+
if (error) {
|
|
402
|
+
reject(error);
|
|
403
|
+
} else {
|
|
404
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
405
|
+
body = ObjectSerializer.deserialize(body, "ListHashtagGroups200Response");
|
|
406
|
+
resolve({ response: response, body: body });
|
|
407
|
+
} else {
|
|
408
|
+
reject(new HttpError(response, body, response.statusCode));
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
});
|
|
412
|
+
});
|
|
413
|
+
});
|
|
414
|
+
}
|
|
415
|
+
/**
|
|
416
|
+
* Admins and members only (not viewers).
|
|
417
|
+
* @summary Update a hashtag group
|
|
418
|
+
* @param workspaceUuid UUID of the workspace.
|
|
419
|
+
* @param hashtagGroupId The hashtag group `id`.
|
|
420
|
+
* @param hashtagGroupInput
|
|
421
|
+
*/
|
|
422
|
+
public async updateHashtagGroup (workspaceUuid: string, hashtagGroupId: string, hashtagGroupInput: HashtagGroupInput, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: CreateHashtagGroup201Response; }> {
|
|
423
|
+
const localVarPath = this.basePath + '/{workspaceUuid}/hashtag-groups/{hashtagGroupId}'
|
|
424
|
+
.replace('{' + 'workspaceUuid' + '}', encodeURIComponent(String(workspaceUuid)))
|
|
425
|
+
.replace('{' + 'hashtagGroupId' + '}', encodeURIComponent(String(hashtagGroupId)));
|
|
426
|
+
let localVarQueryParameters: any = {};
|
|
427
|
+
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
428
|
+
const produces = ['application/json'];
|
|
429
|
+
// give precedence to 'application/json'
|
|
430
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
431
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
432
|
+
} else {
|
|
433
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
434
|
+
}
|
|
435
|
+
let localVarFormParams: any = {};
|
|
436
|
+
|
|
437
|
+
// verify required parameter 'workspaceUuid' is not null or undefined
|
|
438
|
+
if (workspaceUuid === null || workspaceUuid === undefined) {
|
|
439
|
+
throw new Error('Required parameter workspaceUuid was null or undefined when calling updateHashtagGroup.');
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
// verify required parameter 'hashtagGroupId' is not null or undefined
|
|
443
|
+
if (hashtagGroupId === null || hashtagGroupId === undefined) {
|
|
444
|
+
throw new Error('Required parameter hashtagGroupId was null or undefined when calling updateHashtagGroup.');
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
// verify required parameter 'hashtagGroupInput' is not null or undefined
|
|
448
|
+
if (hashtagGroupInput === null || hashtagGroupInput === undefined) {
|
|
449
|
+
throw new Error('Required parameter hashtagGroupInput was null or undefined when calling updateHashtagGroup.');
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
453
|
+
|
|
454
|
+
let localVarUseFormData = false;
|
|
455
|
+
|
|
456
|
+
let localVarRequestOptions: localVarRequest.Options = {
|
|
457
|
+
method: 'PUT',
|
|
458
|
+
qs: localVarQueryParameters,
|
|
459
|
+
headers: localVarHeaderParams,
|
|
460
|
+
uri: localVarPath,
|
|
461
|
+
useQuerystring: this._useQuerystring,
|
|
462
|
+
json: true,
|
|
463
|
+
body: ObjectSerializer.serialize(hashtagGroupInput, "HashtagGroupInput")
|
|
464
|
+
};
|
|
465
|
+
|
|
466
|
+
let authenticationPromise = Promise.resolve();
|
|
467
|
+
if (this.authentications.bearerAuth.accessToken) {
|
|
468
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.bearerAuth.applyToRequest(localVarRequestOptions));
|
|
469
|
+
}
|
|
470
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
471
|
+
|
|
472
|
+
let interceptorPromise = authenticationPromise;
|
|
473
|
+
for (const interceptor of this.interceptors) {
|
|
474
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
return interceptorPromise.then(() => {
|
|
478
|
+
if (Object.keys(localVarFormParams).length) {
|
|
479
|
+
if (localVarUseFormData) {
|
|
480
|
+
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
481
|
+
} else {
|
|
482
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
483
|
+
}
|
|
484
|
+
}
|
|
485
|
+
return new Promise<{ response: http.IncomingMessage; body: CreateHashtagGroup201Response; }>((resolve, reject) => {
|
|
486
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
487
|
+
if (error) {
|
|
488
|
+
reject(error);
|
|
489
|
+
} else {
|
|
490
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
491
|
+
body = ObjectSerializer.deserialize(body, "CreateHashtagGroup201Response");
|
|
492
|
+
resolve({ response: response, body: body });
|
|
493
|
+
} else {
|
|
494
|
+
reject(new HttpError(response, body, response.statusCode));
|
|
495
|
+
}
|
|
496
|
+
}
|
|
497
|
+
});
|
|
498
|
+
});
|
|
499
|
+
});
|
|
500
|
+
}
|
|
501
|
+
}
|