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
package/api/analyticsApi.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`. ## 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 ```
|
|
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
4
|
*
|
|
5
|
-
* The version of the OpenAPI document: 1.
|
|
5
|
+
* The version of the OpenAPI document: 1.14.0
|
|
6
6
|
* Contact: hi@postboost.co
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -18,8 +18,14 @@ import http from 'http';
|
|
|
18
18
|
import { AccountAnalytics } from '../model/accountAnalytics';
|
|
19
19
|
import { AnalyticsSummary } from '../model/analyticsSummary';
|
|
20
20
|
import { BestPostingTimes } from '../model/bestPostingTimes';
|
|
21
|
+
import { CreateReportExport201Response } from '../model/createReportExport201Response';
|
|
22
|
+
import { GetReportBranding200Response } from '../model/getReportBranding200Response';
|
|
23
|
+
import { ListReportExports200Response } from '../model/listReportExports200Response';
|
|
24
|
+
import { MessageOnly } from '../model/messageOnly';
|
|
21
25
|
import { PostAnalytics } from '../model/postAnalytics';
|
|
22
26
|
import { PostingTimes } from '../model/postingTimes';
|
|
27
|
+
import { ReportBrandingInput } from '../model/reportBrandingInput';
|
|
28
|
+
import { ReportExportInput } from '../model/reportExportInput';
|
|
23
29
|
|
|
24
30
|
import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models';
|
|
25
31
|
import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models';
|
|
@@ -96,6 +102,164 @@ export class AnalyticsApi {
|
|
|
96
102
|
this.interceptors.push(interceptor);
|
|
97
103
|
}
|
|
98
104
|
|
|
105
|
+
/**
|
|
106
|
+
* Generates a report for a period (default `last_month`) or a custom `date_from`/`date_to` range: a branded PDF (summary, accounts, top 10 posts; the header uses the report branding) or a CSV with one row per published post and account (`dataset: posts`, default) or per account (`dataset: accounts`). CSV files are UTF-8 with a byte order mark. At most 500 posts per report. The file is ready when the call returns; fetch it from `download_url` with the same token. Admins and members only; 20 per minute.
|
|
107
|
+
* @summary Create a report export
|
|
108
|
+
* @param workspaceUuid UUID of the workspace.
|
|
109
|
+
* @param reportExportInput
|
|
110
|
+
*/
|
|
111
|
+
public async createReportExport (workspaceUuid: string, reportExportInput: ReportExportInput, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: CreateReportExport201Response; }> {
|
|
112
|
+
const localVarPath = this.basePath + '/{workspaceUuid}/reports/exports'
|
|
113
|
+
.replace('{' + 'workspaceUuid' + '}', encodeURIComponent(String(workspaceUuid)));
|
|
114
|
+
let localVarQueryParameters: any = {};
|
|
115
|
+
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
116
|
+
const produces = ['application/json'];
|
|
117
|
+
// give precedence to 'application/json'
|
|
118
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
119
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
120
|
+
} else {
|
|
121
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
122
|
+
}
|
|
123
|
+
let localVarFormParams: any = {};
|
|
124
|
+
|
|
125
|
+
// verify required parameter 'workspaceUuid' is not null or undefined
|
|
126
|
+
if (workspaceUuid === null || workspaceUuid === undefined) {
|
|
127
|
+
throw new Error('Required parameter workspaceUuid was null or undefined when calling createReportExport.');
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
// verify required parameter 'reportExportInput' is not null or undefined
|
|
131
|
+
if (reportExportInput === null || reportExportInput === undefined) {
|
|
132
|
+
throw new Error('Required parameter reportExportInput was null or undefined when calling createReportExport.');
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
136
|
+
|
|
137
|
+
let localVarUseFormData = false;
|
|
138
|
+
|
|
139
|
+
let localVarRequestOptions: localVarRequest.Options = {
|
|
140
|
+
method: 'POST',
|
|
141
|
+
qs: localVarQueryParameters,
|
|
142
|
+
headers: localVarHeaderParams,
|
|
143
|
+
uri: localVarPath,
|
|
144
|
+
useQuerystring: this._useQuerystring,
|
|
145
|
+
json: true,
|
|
146
|
+
body: ObjectSerializer.serialize(reportExportInput, "ReportExportInput")
|
|
147
|
+
};
|
|
148
|
+
|
|
149
|
+
let authenticationPromise = Promise.resolve();
|
|
150
|
+
if (this.authentications.bearerAuth.accessToken) {
|
|
151
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.bearerAuth.applyToRequest(localVarRequestOptions));
|
|
152
|
+
}
|
|
153
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
154
|
+
|
|
155
|
+
let interceptorPromise = authenticationPromise;
|
|
156
|
+
for (const interceptor of this.interceptors) {
|
|
157
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
return interceptorPromise.then(() => {
|
|
161
|
+
if (Object.keys(localVarFormParams).length) {
|
|
162
|
+
if (localVarUseFormData) {
|
|
163
|
+
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
164
|
+
} else {
|
|
165
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
return new Promise<{ response: http.IncomingMessage; body: CreateReportExport201Response; }>((resolve, reject) => {
|
|
169
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
170
|
+
if (error) {
|
|
171
|
+
reject(error);
|
|
172
|
+
} else {
|
|
173
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
174
|
+
body = ObjectSerializer.deserialize(body, "CreateReportExport201Response");
|
|
175
|
+
resolve({ response: response, body: body });
|
|
176
|
+
} else {
|
|
177
|
+
reject(new HttpError(response, body, response.statusCode));
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
});
|
|
181
|
+
});
|
|
182
|
+
});
|
|
183
|
+
}
|
|
184
|
+
/**
|
|
185
|
+
* The PDF or CSV file. `410` once it expired (7 days) or if the export failed.
|
|
186
|
+
* @summary Download a report file
|
|
187
|
+
* @param workspaceUuid UUID of the workspace.
|
|
188
|
+
* @param exportUuid UUID of the report export.
|
|
189
|
+
*/
|
|
190
|
+
public async downloadReportExport (workspaceUuid: string, exportUuid: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Buffer; }> {
|
|
191
|
+
const localVarPath = this.basePath + '/{workspaceUuid}/reports/exports/{exportUuid}/download'
|
|
192
|
+
.replace('{' + 'workspaceUuid' + '}', encodeURIComponent(String(workspaceUuid)))
|
|
193
|
+
.replace('{' + 'exportUuid' + '}', encodeURIComponent(String(exportUuid)));
|
|
194
|
+
let localVarQueryParameters: any = {};
|
|
195
|
+
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
196
|
+
const produces = ['application/pdf', 'text/csv', 'application/json'];
|
|
197
|
+
// give precedence to 'application/json'
|
|
198
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
199
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
200
|
+
} else {
|
|
201
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
202
|
+
}
|
|
203
|
+
let localVarFormParams: any = {};
|
|
204
|
+
|
|
205
|
+
// verify required parameter 'workspaceUuid' is not null or undefined
|
|
206
|
+
if (workspaceUuid === null || workspaceUuid === undefined) {
|
|
207
|
+
throw new Error('Required parameter workspaceUuid was null or undefined when calling downloadReportExport.');
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
// verify required parameter 'exportUuid' is not null or undefined
|
|
211
|
+
if (exportUuid === null || exportUuid === undefined) {
|
|
212
|
+
throw new Error('Required parameter exportUuid was null or undefined when calling downloadReportExport.');
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
216
|
+
|
|
217
|
+
let localVarUseFormData = false;
|
|
218
|
+
|
|
219
|
+
let localVarRequestOptions: localVarRequest.Options = {
|
|
220
|
+
method: 'GET',
|
|
221
|
+
qs: localVarQueryParameters,
|
|
222
|
+
headers: localVarHeaderParams,
|
|
223
|
+
uri: localVarPath,
|
|
224
|
+
useQuerystring: this._useQuerystring,
|
|
225
|
+
encoding: null,
|
|
226
|
+
};
|
|
227
|
+
|
|
228
|
+
let authenticationPromise = Promise.resolve();
|
|
229
|
+
if (this.authentications.bearerAuth.accessToken) {
|
|
230
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.bearerAuth.applyToRequest(localVarRequestOptions));
|
|
231
|
+
}
|
|
232
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
233
|
+
|
|
234
|
+
let interceptorPromise = authenticationPromise;
|
|
235
|
+
for (const interceptor of this.interceptors) {
|
|
236
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
return interceptorPromise.then(() => {
|
|
240
|
+
if (Object.keys(localVarFormParams).length) {
|
|
241
|
+
if (localVarUseFormData) {
|
|
242
|
+
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
243
|
+
} else {
|
|
244
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
return new Promise<{ response: http.IncomingMessage; body: Buffer; }>((resolve, reject) => {
|
|
248
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
249
|
+
if (error) {
|
|
250
|
+
reject(error);
|
|
251
|
+
} else {
|
|
252
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
253
|
+
body = ObjectSerializer.deserialize(body, "Buffer");
|
|
254
|
+
resolve({ response: response, body: body });
|
|
255
|
+
} else {
|
|
256
|
+
reject(new HttpError(response, body, response.statusCode));
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
});
|
|
260
|
+
});
|
|
261
|
+
});
|
|
262
|
+
}
|
|
99
263
|
/**
|
|
100
264
|
* Analytics for one account. `type` selects one of the tabs the account supports (listed in `tabs` of the response); returns `422` when the account does not support analytics.
|
|
101
265
|
* @summary Get account analytics
|
|
@@ -550,4 +714,389 @@ export class AnalyticsApi {
|
|
|
550
714
|
});
|
|
551
715
|
});
|
|
552
716
|
}
|
|
717
|
+
/**
|
|
718
|
+
* The white-label header of the workspace\'s PDF reports. Unset fields are `null`; the workspace name is used then.
|
|
719
|
+
* @summary Get the report branding
|
|
720
|
+
* @param workspaceUuid UUID of the workspace.
|
|
721
|
+
*/
|
|
722
|
+
public async getReportBranding (workspaceUuid: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: GetReportBranding200Response; }> {
|
|
723
|
+
const localVarPath = this.basePath + '/{workspaceUuid}/report-branding'
|
|
724
|
+
.replace('{' + 'workspaceUuid' + '}', encodeURIComponent(String(workspaceUuid)));
|
|
725
|
+
let localVarQueryParameters: any = {};
|
|
726
|
+
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
727
|
+
const produces = ['application/json'];
|
|
728
|
+
// give precedence to 'application/json'
|
|
729
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
730
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
731
|
+
} else {
|
|
732
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
733
|
+
}
|
|
734
|
+
let localVarFormParams: any = {};
|
|
735
|
+
|
|
736
|
+
// verify required parameter 'workspaceUuid' is not null or undefined
|
|
737
|
+
if (workspaceUuid === null || workspaceUuid === undefined) {
|
|
738
|
+
throw new Error('Required parameter workspaceUuid was null or undefined when calling getReportBranding.');
|
|
739
|
+
}
|
|
740
|
+
|
|
741
|
+
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
742
|
+
|
|
743
|
+
let localVarUseFormData = false;
|
|
744
|
+
|
|
745
|
+
let localVarRequestOptions: localVarRequest.Options = {
|
|
746
|
+
method: 'GET',
|
|
747
|
+
qs: localVarQueryParameters,
|
|
748
|
+
headers: localVarHeaderParams,
|
|
749
|
+
uri: localVarPath,
|
|
750
|
+
useQuerystring: this._useQuerystring,
|
|
751
|
+
json: true,
|
|
752
|
+
};
|
|
753
|
+
|
|
754
|
+
let authenticationPromise = Promise.resolve();
|
|
755
|
+
if (this.authentications.bearerAuth.accessToken) {
|
|
756
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.bearerAuth.applyToRequest(localVarRequestOptions));
|
|
757
|
+
}
|
|
758
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
759
|
+
|
|
760
|
+
let interceptorPromise = authenticationPromise;
|
|
761
|
+
for (const interceptor of this.interceptors) {
|
|
762
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
763
|
+
}
|
|
764
|
+
|
|
765
|
+
return interceptorPromise.then(() => {
|
|
766
|
+
if (Object.keys(localVarFormParams).length) {
|
|
767
|
+
if (localVarUseFormData) {
|
|
768
|
+
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
769
|
+
} else {
|
|
770
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
771
|
+
}
|
|
772
|
+
}
|
|
773
|
+
return new Promise<{ response: http.IncomingMessage; body: GetReportBranding200Response; }>((resolve, reject) => {
|
|
774
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
775
|
+
if (error) {
|
|
776
|
+
reject(error);
|
|
777
|
+
} else {
|
|
778
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
779
|
+
body = ObjectSerializer.deserialize(body, "GetReportBranding200Response");
|
|
780
|
+
resolve({ response: response, body: body });
|
|
781
|
+
} else {
|
|
782
|
+
reject(new HttpError(response, body, response.statusCode));
|
|
783
|
+
}
|
|
784
|
+
}
|
|
785
|
+
});
|
|
786
|
+
});
|
|
787
|
+
});
|
|
788
|
+
}
|
|
789
|
+
/**
|
|
790
|
+
*
|
|
791
|
+
* @summary Get a report export
|
|
792
|
+
* @param workspaceUuid UUID of the workspace.
|
|
793
|
+
* @param exportUuid UUID of the report export.
|
|
794
|
+
*/
|
|
795
|
+
public async getReportExport (workspaceUuid: string, exportUuid: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: CreateReportExport201Response; }> {
|
|
796
|
+
const localVarPath = this.basePath + '/{workspaceUuid}/reports/exports/{exportUuid}'
|
|
797
|
+
.replace('{' + 'workspaceUuid' + '}', encodeURIComponent(String(workspaceUuid)))
|
|
798
|
+
.replace('{' + 'exportUuid' + '}', encodeURIComponent(String(exportUuid)));
|
|
799
|
+
let localVarQueryParameters: any = {};
|
|
800
|
+
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
801
|
+
const produces = ['application/json'];
|
|
802
|
+
// give precedence to 'application/json'
|
|
803
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
804
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
805
|
+
} else {
|
|
806
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
807
|
+
}
|
|
808
|
+
let localVarFormParams: any = {};
|
|
809
|
+
|
|
810
|
+
// verify required parameter 'workspaceUuid' is not null or undefined
|
|
811
|
+
if (workspaceUuid === null || workspaceUuid === undefined) {
|
|
812
|
+
throw new Error('Required parameter workspaceUuid was null or undefined when calling getReportExport.');
|
|
813
|
+
}
|
|
814
|
+
|
|
815
|
+
// verify required parameter 'exportUuid' is not null or undefined
|
|
816
|
+
if (exportUuid === null || exportUuid === undefined) {
|
|
817
|
+
throw new Error('Required parameter exportUuid was null or undefined when calling getReportExport.');
|
|
818
|
+
}
|
|
819
|
+
|
|
820
|
+
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
821
|
+
|
|
822
|
+
let localVarUseFormData = false;
|
|
823
|
+
|
|
824
|
+
let localVarRequestOptions: localVarRequest.Options = {
|
|
825
|
+
method: 'GET',
|
|
826
|
+
qs: localVarQueryParameters,
|
|
827
|
+
headers: localVarHeaderParams,
|
|
828
|
+
uri: localVarPath,
|
|
829
|
+
useQuerystring: this._useQuerystring,
|
|
830
|
+
json: true,
|
|
831
|
+
};
|
|
832
|
+
|
|
833
|
+
let authenticationPromise = Promise.resolve();
|
|
834
|
+
if (this.authentications.bearerAuth.accessToken) {
|
|
835
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.bearerAuth.applyToRequest(localVarRequestOptions));
|
|
836
|
+
}
|
|
837
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
838
|
+
|
|
839
|
+
let interceptorPromise = authenticationPromise;
|
|
840
|
+
for (const interceptor of this.interceptors) {
|
|
841
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
842
|
+
}
|
|
843
|
+
|
|
844
|
+
return interceptorPromise.then(() => {
|
|
845
|
+
if (Object.keys(localVarFormParams).length) {
|
|
846
|
+
if (localVarUseFormData) {
|
|
847
|
+
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
848
|
+
} else {
|
|
849
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
850
|
+
}
|
|
851
|
+
}
|
|
852
|
+
return new Promise<{ response: http.IncomingMessage; body: CreateReportExport201Response; }>((resolve, reject) => {
|
|
853
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
854
|
+
if (error) {
|
|
855
|
+
reject(error);
|
|
856
|
+
} else {
|
|
857
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
858
|
+
body = ObjectSerializer.deserialize(body, "CreateReportExport201Response");
|
|
859
|
+
resolve({ response: response, body: body });
|
|
860
|
+
} else {
|
|
861
|
+
reject(new HttpError(response, body, response.statusCode));
|
|
862
|
+
}
|
|
863
|
+
}
|
|
864
|
+
});
|
|
865
|
+
});
|
|
866
|
+
});
|
|
867
|
+
}
|
|
868
|
+
/**
|
|
869
|
+
* The workspace\'s latest 50 report exports, newest first. Files can be downloaded for 7 days.
|
|
870
|
+
* @summary List report exports
|
|
871
|
+
* @param workspaceUuid UUID of the workspace.
|
|
872
|
+
*/
|
|
873
|
+
public async listReportExports (workspaceUuid: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: ListReportExports200Response; }> {
|
|
874
|
+
const localVarPath = this.basePath + '/{workspaceUuid}/reports/exports'
|
|
875
|
+
.replace('{' + 'workspaceUuid' + '}', encodeURIComponent(String(workspaceUuid)));
|
|
876
|
+
let localVarQueryParameters: any = {};
|
|
877
|
+
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
878
|
+
const produces = ['application/json'];
|
|
879
|
+
// give precedence to 'application/json'
|
|
880
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
881
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
882
|
+
} else {
|
|
883
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
884
|
+
}
|
|
885
|
+
let localVarFormParams: any = {};
|
|
886
|
+
|
|
887
|
+
// verify required parameter 'workspaceUuid' is not null or undefined
|
|
888
|
+
if (workspaceUuid === null || workspaceUuid === undefined) {
|
|
889
|
+
throw new Error('Required parameter workspaceUuid was null or undefined when calling listReportExports.');
|
|
890
|
+
}
|
|
891
|
+
|
|
892
|
+
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
893
|
+
|
|
894
|
+
let localVarUseFormData = false;
|
|
895
|
+
|
|
896
|
+
let localVarRequestOptions: localVarRequest.Options = {
|
|
897
|
+
method: 'GET',
|
|
898
|
+
qs: localVarQueryParameters,
|
|
899
|
+
headers: localVarHeaderParams,
|
|
900
|
+
uri: localVarPath,
|
|
901
|
+
useQuerystring: this._useQuerystring,
|
|
902
|
+
json: true,
|
|
903
|
+
};
|
|
904
|
+
|
|
905
|
+
let authenticationPromise = Promise.resolve();
|
|
906
|
+
if (this.authentications.bearerAuth.accessToken) {
|
|
907
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.bearerAuth.applyToRequest(localVarRequestOptions));
|
|
908
|
+
}
|
|
909
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
910
|
+
|
|
911
|
+
let interceptorPromise = authenticationPromise;
|
|
912
|
+
for (const interceptor of this.interceptors) {
|
|
913
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
914
|
+
}
|
|
915
|
+
|
|
916
|
+
return interceptorPromise.then(() => {
|
|
917
|
+
if (Object.keys(localVarFormParams).length) {
|
|
918
|
+
if (localVarUseFormData) {
|
|
919
|
+
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
920
|
+
} else {
|
|
921
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
922
|
+
}
|
|
923
|
+
}
|
|
924
|
+
return new Promise<{ response: http.IncomingMessage; body: ListReportExports200Response; }>((resolve, reject) => {
|
|
925
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
926
|
+
if (error) {
|
|
927
|
+
reject(error);
|
|
928
|
+
} else {
|
|
929
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
930
|
+
body = ObjectSerializer.deserialize(body, "ListReportExports200Response");
|
|
931
|
+
resolve({ response: response, body: body });
|
|
932
|
+
} else {
|
|
933
|
+
reject(new HttpError(response, body, response.statusCode));
|
|
934
|
+
}
|
|
935
|
+
}
|
|
936
|
+
});
|
|
937
|
+
});
|
|
938
|
+
});
|
|
939
|
+
}
|
|
940
|
+
/**
|
|
941
|
+
* Name, colour and footer of PDF reports. Fields you leave out keep their value. Upload the logo with `uploadReportBrandingLogo`. Admins and members only.
|
|
942
|
+
* @summary Update the report branding
|
|
943
|
+
* @param workspaceUuid UUID of the workspace.
|
|
944
|
+
* @param reportBrandingInput
|
|
945
|
+
*/
|
|
946
|
+
public async updateReportBranding (workspaceUuid: string, reportBrandingInput: ReportBrandingInput, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: GetReportBranding200Response; }> {
|
|
947
|
+
const localVarPath = this.basePath + '/{workspaceUuid}/report-branding'
|
|
948
|
+
.replace('{' + 'workspaceUuid' + '}', encodeURIComponent(String(workspaceUuid)));
|
|
949
|
+
let localVarQueryParameters: any = {};
|
|
950
|
+
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
951
|
+
const produces = ['application/json'];
|
|
952
|
+
// give precedence to 'application/json'
|
|
953
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
954
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
955
|
+
} else {
|
|
956
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
957
|
+
}
|
|
958
|
+
let localVarFormParams: any = {};
|
|
959
|
+
|
|
960
|
+
// verify required parameter 'workspaceUuid' is not null or undefined
|
|
961
|
+
if (workspaceUuid === null || workspaceUuid === undefined) {
|
|
962
|
+
throw new Error('Required parameter workspaceUuid was null or undefined when calling updateReportBranding.');
|
|
963
|
+
}
|
|
964
|
+
|
|
965
|
+
// verify required parameter 'reportBrandingInput' is not null or undefined
|
|
966
|
+
if (reportBrandingInput === null || reportBrandingInput === undefined) {
|
|
967
|
+
throw new Error('Required parameter reportBrandingInput was null or undefined when calling updateReportBranding.');
|
|
968
|
+
}
|
|
969
|
+
|
|
970
|
+
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
971
|
+
|
|
972
|
+
let localVarUseFormData = false;
|
|
973
|
+
|
|
974
|
+
let localVarRequestOptions: localVarRequest.Options = {
|
|
975
|
+
method: 'PUT',
|
|
976
|
+
qs: localVarQueryParameters,
|
|
977
|
+
headers: localVarHeaderParams,
|
|
978
|
+
uri: localVarPath,
|
|
979
|
+
useQuerystring: this._useQuerystring,
|
|
980
|
+
json: true,
|
|
981
|
+
body: ObjectSerializer.serialize(reportBrandingInput, "ReportBrandingInput")
|
|
982
|
+
};
|
|
983
|
+
|
|
984
|
+
let authenticationPromise = Promise.resolve();
|
|
985
|
+
if (this.authentications.bearerAuth.accessToken) {
|
|
986
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.bearerAuth.applyToRequest(localVarRequestOptions));
|
|
987
|
+
}
|
|
988
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
989
|
+
|
|
990
|
+
let interceptorPromise = authenticationPromise;
|
|
991
|
+
for (const interceptor of this.interceptors) {
|
|
992
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
993
|
+
}
|
|
994
|
+
|
|
995
|
+
return interceptorPromise.then(() => {
|
|
996
|
+
if (Object.keys(localVarFormParams).length) {
|
|
997
|
+
if (localVarUseFormData) {
|
|
998
|
+
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
999
|
+
} else {
|
|
1000
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
1001
|
+
}
|
|
1002
|
+
}
|
|
1003
|
+
return new Promise<{ response: http.IncomingMessage; body: GetReportBranding200Response; }>((resolve, reject) => {
|
|
1004
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
1005
|
+
if (error) {
|
|
1006
|
+
reject(error);
|
|
1007
|
+
} else {
|
|
1008
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
1009
|
+
body = ObjectSerializer.deserialize(body, "GetReportBranding200Response");
|
|
1010
|
+
resolve({ response: response, body: body });
|
|
1011
|
+
} else {
|
|
1012
|
+
reject(new HttpError(response, body, response.statusCode));
|
|
1013
|
+
}
|
|
1014
|
+
}
|
|
1015
|
+
});
|
|
1016
|
+
});
|
|
1017
|
+
});
|
|
1018
|
+
}
|
|
1019
|
+
/**
|
|
1020
|
+
* PNG or JPEG, up to 1 MB (SVG is not accepted). Replaces the current logo. Admins and members only.
|
|
1021
|
+
* @summary Upload the report logo
|
|
1022
|
+
* @param workspaceUuid UUID of the workspace.
|
|
1023
|
+
* @param logo
|
|
1024
|
+
*/
|
|
1025
|
+
public async uploadReportBrandingLogo (workspaceUuid: string, logo: RequestFile, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: GetReportBranding200Response; }> {
|
|
1026
|
+
const localVarPath = this.basePath + '/{workspaceUuid}/report-branding/logo'
|
|
1027
|
+
.replace('{' + 'workspaceUuid' + '}', encodeURIComponent(String(workspaceUuid)));
|
|
1028
|
+
let localVarQueryParameters: any = {};
|
|
1029
|
+
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
1030
|
+
const produces = ['application/json'];
|
|
1031
|
+
// give precedence to 'application/json'
|
|
1032
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
1033
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
1034
|
+
} else {
|
|
1035
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
1036
|
+
}
|
|
1037
|
+
let localVarFormParams: any = {};
|
|
1038
|
+
|
|
1039
|
+
// verify required parameter 'workspaceUuid' is not null or undefined
|
|
1040
|
+
if (workspaceUuid === null || workspaceUuid === undefined) {
|
|
1041
|
+
throw new Error('Required parameter workspaceUuid was null or undefined when calling uploadReportBrandingLogo.');
|
|
1042
|
+
}
|
|
1043
|
+
|
|
1044
|
+
// verify required parameter 'logo' is not null or undefined
|
|
1045
|
+
if (logo === null || logo === undefined) {
|
|
1046
|
+
throw new Error('Required parameter logo was null or undefined when calling uploadReportBrandingLogo.');
|
|
1047
|
+
}
|
|
1048
|
+
|
|
1049
|
+
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
1050
|
+
|
|
1051
|
+
let localVarUseFormData = false;
|
|
1052
|
+
|
|
1053
|
+
if (logo !== undefined) {
|
|
1054
|
+
localVarFormParams['logo'] = logo;
|
|
1055
|
+
}
|
|
1056
|
+
localVarUseFormData = true;
|
|
1057
|
+
|
|
1058
|
+
let localVarRequestOptions: localVarRequest.Options = {
|
|
1059
|
+
method: 'POST',
|
|
1060
|
+
qs: localVarQueryParameters,
|
|
1061
|
+
headers: localVarHeaderParams,
|
|
1062
|
+
uri: localVarPath,
|
|
1063
|
+
useQuerystring: this._useQuerystring,
|
|
1064
|
+
json: true,
|
|
1065
|
+
};
|
|
1066
|
+
|
|
1067
|
+
let authenticationPromise = Promise.resolve();
|
|
1068
|
+
if (this.authentications.bearerAuth.accessToken) {
|
|
1069
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.bearerAuth.applyToRequest(localVarRequestOptions));
|
|
1070
|
+
}
|
|
1071
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
1072
|
+
|
|
1073
|
+
let interceptorPromise = authenticationPromise;
|
|
1074
|
+
for (const interceptor of this.interceptors) {
|
|
1075
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
1076
|
+
}
|
|
1077
|
+
|
|
1078
|
+
return interceptorPromise.then(() => {
|
|
1079
|
+
if (Object.keys(localVarFormParams).length) {
|
|
1080
|
+
if (localVarUseFormData) {
|
|
1081
|
+
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
1082
|
+
} else {
|
|
1083
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
1084
|
+
}
|
|
1085
|
+
}
|
|
1086
|
+
return new Promise<{ response: http.IncomingMessage; body: GetReportBranding200Response; }>((resolve, reject) => {
|
|
1087
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
1088
|
+
if (error) {
|
|
1089
|
+
reject(error);
|
|
1090
|
+
} else {
|
|
1091
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
1092
|
+
body = ObjectSerializer.deserialize(body, "GetReportBranding200Response");
|
|
1093
|
+
resolve({ response: response, body: body });
|
|
1094
|
+
} else {
|
|
1095
|
+
reject(new HttpError(response, body, response.statusCode));
|
|
1096
|
+
}
|
|
1097
|
+
}
|
|
1098
|
+
});
|
|
1099
|
+
});
|
|
1100
|
+
});
|
|
1101
|
+
}
|
|
553
1102
|
}
|
package/api/apis.ts
CHANGED
|
@@ -1,13 +1,27 @@
|
|
|
1
1
|
export * from './aIApi';
|
|
2
2
|
import { AIApi } from './aIApi';
|
|
3
|
+
export * from './accountGroupsApi';
|
|
4
|
+
import { AccountGroupsApi } from './accountGroupsApi';
|
|
3
5
|
export * from './accountsApi';
|
|
4
6
|
import { AccountsApi } from './accountsApi';
|
|
7
|
+
export * from './activityApi';
|
|
8
|
+
import { ActivityApi } from './activityApi';
|
|
9
|
+
export * from './agentsApi';
|
|
10
|
+
import { AgentsApi } from './agentsApi';
|
|
5
11
|
export * from './analyticsApi';
|
|
6
12
|
import { AnalyticsApi } from './analyticsApi';
|
|
13
|
+
export * from './competitorsApi';
|
|
14
|
+
import { CompetitorsApi } from './competitorsApi';
|
|
15
|
+
export * from './hashtagGroupsApi';
|
|
16
|
+
import { HashtagGroupsApi } from './hashtagGroupsApi';
|
|
17
|
+
export * from './inboxApi';
|
|
18
|
+
import { InboxApi } from './inboxApi';
|
|
7
19
|
export * from './mediaApi';
|
|
8
20
|
import { MediaApi } from './mediaApi';
|
|
9
21
|
export * from './mentionsApi';
|
|
10
22
|
import { MentionsApi } from './mentionsApi';
|
|
23
|
+
export * from './postingScheduleApi';
|
|
24
|
+
import { PostingScheduleApi } from './postingScheduleApi';
|
|
11
25
|
export * from './postsApi';
|
|
12
26
|
import { PostsApi } from './postsApi';
|
|
13
27
|
export * from './receiptsApi';
|
|
@@ -16,8 +30,12 @@ export * from './subscriptionsApi';
|
|
|
16
30
|
import { SubscriptionsApi } from './subscriptionsApi';
|
|
17
31
|
export * from './tagsApi';
|
|
18
32
|
import { TagsApi } from './tagsApi';
|
|
33
|
+
export * from './templatesApi';
|
|
34
|
+
import { TemplatesApi } from './templatesApi';
|
|
19
35
|
export * from './usersApi';
|
|
20
36
|
import { UsersApi } from './usersApi';
|
|
37
|
+
export * from './webhooksApi';
|
|
38
|
+
import { WebhooksApi } from './webhooksApi';
|
|
21
39
|
export * from './workspacesApi';
|
|
22
40
|
import { WorkspacesApi } from './workspacesApi';
|
|
23
41
|
import * as http from 'http';
|
|
@@ -31,4 +49,4 @@ export class HttpError extends Error {
|
|
|
31
49
|
|
|
32
50
|
export { RequestFile } from '../model/models';
|
|
33
51
|
|
|
34
|
-
export const APIS = [AIApi, AccountsApi, AnalyticsApi, MediaApi, MentionsApi, PostsApi, ReceiptsApi, SubscriptionsApi, TagsApi, UsersApi, WorkspacesApi];
|
|
52
|
+
export const APIS = [AIApi, AccountGroupsApi, AccountsApi, ActivityApi, AgentsApi, AnalyticsApi, CompetitorsApi, HashtagGroupsApi, InboxApi, MediaApi, MentionsApi, PostingScheduleApi, PostsApi, ReceiptsApi, SubscriptionsApi, TagsApi, TemplatesApi, UsersApi, WebhooksApi, WorkspacesApi];
|