@drodil/backstage-plugin-qeta-common 3.59.6 → 3.59.9

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/dist/index.d.ts CHANGED
@@ -1,7 +1,6 @@
1
1
  import { BasicPermission, ResourcePermission } from '@backstage/plugin-permission-common';
2
2
  import { IndexableDocument } from '@backstage/plugin-search-common';
3
3
  import { ErrorObject } from 'ajv';
4
- import { PostType as PostType$1, PostStatus as PostStatus$1, PostsResponse as PostsResponse$1, PostRequest as PostRequest$1, PostResponse as PostResponse$1, PostReview as PostReview$1, AIResponse as AIResponse$1, AIStatusResponse as AIStatusResponse$1, TagsResponse as TagsResponse$1, Badge as Badge$1, UserBadge as UserBadge$1, TagResponse as TagResponse$1, EntitiesResponse as EntitiesResponse$1, EntityResponse as EntityResponse$1, UsersResponse as UsersResponse$1, StatisticsRequestParameters as StatisticsRequestParameters$1, StatisticResponse as StatisticResponse$1, AnswerResponse as AnswerResponse$1, AnswerRequest as AnswerRequest$1, AnswerResponseBody as AnswerResponseBody$1, AttachmentResponseBody as AttachmentResponseBody$1, AnswersResponse as AnswersResponse$1, UserCollectionsResponse as UserCollectionsResponse$1, UserTagsResponse as UserTagsResponse$1, UserEntitiesResponse as UserEntitiesResponse$1, UserUsersResponse as UserUsersResponse$1, ImpactResponse as ImpactResponse$1, StatisticsResponse as StatisticsResponse$1, GlobalStat as GlobalStat$1, UserStat as UserStat$1, CollectionsResponse as CollectionsResponse$1, CollectionResponse as CollectionResponse$1, CollectionRequest as CollectionRequest$1, TemplatesResponse as TemplatesResponse$1, TemplateResponse as TemplateResponse$1, TemplateRequest as TemplateRequest$1, SuggestionsResponse as SuggestionsResponse$1, TagSuggestionsResponse as TagSuggestionsResponse$1, EntitySuggestionsResponse as EntitySuggestionsResponse$1, URLMetadataRequest as URLMetadataRequest$1, URLMetadataResponse as URLMetadataResponse$1, BatchURLMetadataRequest as BatchURLMetadataRequest$1, BatchURLMetadataResponse as BatchURLMetadataResponse$1, EntityLinks as EntityLinks$1, TimelineOptions as TimelineOptions$1, TimelineResponse as TimelineResponse$1, CommunityStats as CommunityStats$1, Post as Post$1, PostRevisionsResponse as PostRevisionsResponse$1, PostRevision as PostRevision$1, ContentSuggestionsQuery as ContentSuggestionsQuery$1, Answer as Answer$1 } from '@drodil/backstage-plugin-qeta-common';
5
4
  import { EntityLink, Entity } from '@backstage/catalog-model';
6
5
  import { Config } from '@backstage/config';
7
6
 
@@ -77,11 +76,11 @@ interface PostsQuery extends PaginatedQuery {
77
76
  includeExperts?: boolean;
78
77
  fromDate?: string;
79
78
  toDate?: string;
80
- type?: PostType$1;
79
+ type?: PostType;
81
80
  collectionId?: number;
82
81
  ids?: number[];
83
82
  checkAccess?: boolean;
84
- status?: PostStatus$1;
83
+ status?: PostStatus;
85
84
  }
86
85
  interface PostQuery {
87
86
  anonymous?: boolean;
@@ -151,115 +150,115 @@ interface EntitySuggestionsQuery extends ContentSuggestionsQuery {
151
150
  tags?: string[];
152
151
  }
153
152
  interface QetaApi {
154
- getPosts(options: PostsQuery, requestOptions?: RequestOptions): Promise<PostsResponse$1>;
155
- getPostsList(type: string, options?: PostsQuery, requestOptions?: RequestOptions): Promise<PostsResponse$1>;
156
- createPost(post: PostRequest$1, requestOptions?: RequestOptions): Promise<PostResponse$1>;
157
- commentPost(id: number, content: string, requestOptions?: RequestOptions): Promise<PostResponse$1>;
158
- updatePostComment(postId: number, id: number, content: string, requestOptions?: RequestOptions): Promise<PostResponse$1>;
159
- reviewPost(id: number, status: 'valid' | 'obsolete', comment?: string, requestOptions?: RequestOptions): Promise<PostResponse$1>;
160
- getPostReviews(id: number, requestOptions?: RequestOptions): Promise<PostReview$1[]>;
161
- deletePostComment(postId: number, id: number, requestOptions?: RequestOptions): Promise<PostResponse$1>;
162
- reviewPost(id: number, status: 'valid' | 'obsolete', comment?: string, requestOptions?: RequestOptions): Promise<PostResponse$1>;
163
- getPostReviews(id: number, requestOptions?: RequestOptions): Promise<PostReview$1[]>;
164
- getPost(id: string | number | undefined, options?: PostQuery, requestOptions?: RequestOptions): Promise<PostResponse$1>;
165
- getAIAnswerForQuestion(questionId: string | number, options?: AIQuery, requestOptions?: RequestOptions): Promise<AIResponse$1 | null>;
166
- getAIAnswerForDraft(title: string, content: string, requestOptions?: RequestOptions): Promise<AIResponse$1 | null>;
167
- getAISummaryForArticle(articleId: string | number, options?: AIQuery, requestOptions?: RequestOptions): Promise<AIResponse$1 | null>;
168
- isAIEnabled(): Promise<AIStatusResponse$1>;
169
- getTags(options?: TagsQuery, requestOptions?: RequestOptions): Promise<TagsResponse$1>;
170
- getBadges(): Promise<Badge$1[]>;
171
- getUserBadges(userRef: string): Promise<UserBadge$1[]>;
172
- getTag(tag: string, requestOptions?: RequestOptions): Promise<TagResponse$1 | null>;
173
- createTag(tag: string, description?: string, experts?: string[], requestOptions?: RequestOptions): Promise<TagResponse$1 | null>;
174
- updateTag(id: number, description?: string, experts?: string[], requestOptions?: RequestOptions): Promise<TagResponse$1 | null>;
175
- getEntities(options?: EntitiesQuery, requestOptions?: RequestOptions): Promise<EntitiesResponse$1>;
176
- getEntity(entityRef: string, requestOptions?: RequestOptions): Promise<EntityResponse$1 | null>;
153
+ getPosts(options: PostsQuery, requestOptions?: RequestOptions): Promise<PostsResponse>;
154
+ getPostsList(type: string, options?: PostsQuery, requestOptions?: RequestOptions): Promise<PostsResponse>;
155
+ createPost(post: PostRequest, requestOptions?: RequestOptions): Promise<PostResponse>;
156
+ commentPost(id: number, content: string, requestOptions?: RequestOptions): Promise<PostResponse>;
157
+ updatePostComment(postId: number, id: number, content: string, requestOptions?: RequestOptions): Promise<PostResponse>;
158
+ reviewPost(id: number, status: 'valid' | 'obsolete', comment?: string, requestOptions?: RequestOptions): Promise<PostResponse>;
159
+ getPostReviews(id: number, requestOptions?: RequestOptions): Promise<PostReview[]>;
160
+ deletePostComment(postId: number, id: number, requestOptions?: RequestOptions): Promise<PostResponse>;
161
+ reviewPost(id: number, status: 'valid' | 'obsolete', comment?: string, requestOptions?: RequestOptions): Promise<PostResponse>;
162
+ getPostReviews(id: number, requestOptions?: RequestOptions): Promise<PostReview[]>;
163
+ getPost(id: string | number | undefined, options?: PostQuery, requestOptions?: RequestOptions): Promise<PostResponse>;
164
+ getAIAnswerForQuestion(questionId: string | number, options?: AIQuery, requestOptions?: RequestOptions): Promise<AIResponse | null>;
165
+ getAIAnswerForDraft(title: string, content: string, requestOptions?: RequestOptions): Promise<AIResponse | null>;
166
+ getAISummaryForArticle(articleId: string | number, options?: AIQuery, requestOptions?: RequestOptions): Promise<AIResponse | null>;
167
+ isAIEnabled(): Promise<AIStatusResponse>;
168
+ getTags(options?: TagsQuery, requestOptions?: RequestOptions): Promise<TagsResponse>;
169
+ getBadges(): Promise<Badge[]>;
170
+ getUserBadges(userRef: string): Promise<UserBadge[]>;
171
+ getTag(tag: string, requestOptions?: RequestOptions): Promise<TagResponse | null>;
172
+ createTag(tag: string, description?: string, experts?: string[], requestOptions?: RequestOptions): Promise<TagResponse | null>;
173
+ updateTag(id: number, description?: string, experts?: string[], requestOptions?: RequestOptions): Promise<TagResponse | null>;
174
+ getEntities(options?: EntitiesQuery, requestOptions?: RequestOptions): Promise<EntitiesResponse>;
175
+ getEntity(entityRef: string, requestOptions?: RequestOptions): Promise<EntityResponse | null>;
177
176
  suggest(options: ContentSuggestionsQuery & {
178
177
  tags?: string[];
179
178
  entities?: string[];
180
- }, requestOptions?: RequestOptions): Promise<PostsResponse$1>;
181
- getUsers(options?: UsersQuery, requestOptions?: RequestOptions): Promise<UsersResponse$1>;
182
- getMostUpvotedPosts({ author, options, }: StatisticsRequestParameters$1): Promise<StatisticResponse$1>;
183
- getMostUpvotedAnswers({ author, options, }: StatisticsRequestParameters$1): Promise<StatisticResponse$1>;
184
- getMostUpvotedCorrectAnswers({ author, options, }: StatisticsRequestParameters$1): Promise<StatisticResponse$1>;
185
- getMostPosts({ author, options, }: StatisticsRequestParameters$1): Promise<StatisticResponse$1>;
186
- getMostAnswers({ author, options, }: StatisticsRequestParameters$1): Promise<StatisticResponse$1>;
187
- getTopStatisticsHomepage({ author, options, }: StatisticsRequestParameters$1): Promise<StatisticResponse$1[]>;
179
+ }, requestOptions?: RequestOptions): Promise<PostsResponse>;
180
+ getUsers(options?: UsersQuery, requestOptions?: RequestOptions): Promise<UsersResponse>;
181
+ getMostUpvotedPosts({ author, options, }: StatisticsRequestParameters): Promise<StatisticResponse>;
182
+ getMostUpvotedAnswers({ author, options, }: StatisticsRequestParameters): Promise<StatisticResponse>;
183
+ getMostUpvotedCorrectAnswers({ author, options, }: StatisticsRequestParameters): Promise<StatisticResponse>;
184
+ getMostPosts({ author, options, }: StatisticsRequestParameters): Promise<StatisticResponse>;
185
+ getMostAnswers({ author, options, }: StatisticsRequestParameters): Promise<StatisticResponse>;
186
+ getTopStatisticsHomepage({ author, options, }: StatisticsRequestParameters): Promise<StatisticResponse[]>;
188
187
  clickLink(id: number): Promise<void>;
189
- votePostUp(id: number, requestOptions?: RequestOptions): Promise<PostResponse$1>;
190
- votePostDown(id: number, requestOptions?: RequestOptions): Promise<PostResponse$1>;
191
- deletePostVote(id: number, requestOptions?: RequestOptions): Promise<PostResponse$1>;
192
- voteAnswerUp(postId: number, id: number, requestOptions?: RequestOptions): Promise<AnswerResponse$1>;
193
- voteAnswerDown(postId: number, id: number, requestOptions?: RequestOptions): Promise<AnswerResponse$1>;
194
- deleteAnswerVote(postId: number, id: number, requestOptions?: RequestOptions): Promise<AnswerResponse$1>;
188
+ votePostUp(id: number, requestOptions?: RequestOptions): Promise<PostResponse>;
189
+ votePostDown(id: number, requestOptions?: RequestOptions): Promise<PostResponse>;
190
+ deletePostVote(id: number, requestOptions?: RequestOptions): Promise<PostResponse>;
191
+ voteAnswerUp(postId: number, id: number, requestOptions?: RequestOptions): Promise<AnswerResponse>;
192
+ voteAnswerDown(postId: number, id: number, requestOptions?: RequestOptions): Promise<AnswerResponse>;
193
+ deleteAnswerVote(postId: number, id: number, requestOptions?: RequestOptions): Promise<AnswerResponse>;
195
194
  markAnswerCorrect(postId: number, id: number, requestOptions?: RequestOptions): Promise<boolean>;
196
195
  markAnswerIncorrect(postId: number, id: number, requestOptions?: RequestOptions): Promise<boolean>;
197
- favoritePost(id: number, requestOptions?: RequestOptions): Promise<PostResponse$1>;
198
- unfavoritePost(id: number, requestOptions?: RequestOptions): Promise<PostResponse$1>;
199
- postAnswer(answer: AnswerRequest$1, requestOptions?: RequestOptions): Promise<AnswerResponseBody$1>;
196
+ favoritePost(id: number, requestOptions?: RequestOptions): Promise<PostResponse>;
197
+ unfavoritePost(id: number, requestOptions?: RequestOptions): Promise<PostResponse>;
198
+ postAnswer(answer: AnswerRequest, requestOptions?: RequestOptions): Promise<AnswerResponseBody>;
200
199
  postAttachment(file: Blob, options?: {
201
200
  postId?: number;
202
201
  answerId?: number;
203
202
  collectionId?: number;
204
- }, requestOptions?: RequestOptions): Promise<AttachmentResponseBody$1>;
205
- commentAnswer(questionId: number, id: number, content: string, requestOptions?: RequestOptions): Promise<AnswerResponse$1>;
206
- updateAnswerComment(questionId: number, answerId: number, id: number, content: string, requestOptions?: RequestOptions): Promise<AnswerResponse$1>;
207
- deleteAnswerComment(questionId: number, answerId: number, id: number, requestOptions?: RequestOptions): Promise<AnswerResponse$1>;
203
+ }, requestOptions?: RequestOptions): Promise<AttachmentResponseBody>;
204
+ commentAnswer(questionId: number, id: number, content: string, requestOptions?: RequestOptions): Promise<AnswerResponse>;
205
+ updateAnswerComment(questionId: number, answerId: number, id: number, content: string, requestOptions?: RequestOptions): Promise<AnswerResponse>;
206
+ deleteAnswerComment(questionId: number, answerId: number, id: number, requestOptions?: RequestOptions): Promise<AnswerResponse>;
208
207
  deletePost(postId: number, reason?: string, requestOptions?: RequestOptions): Promise<boolean>;
209
208
  deleteAnswer(postId: number | string, id: number, reason?: string, requestOptions?: RequestOptions): Promise<boolean>;
210
- updatePost(id: string | number, question: PostRequest$1, requestOptions?: RequestOptions): Promise<PostResponse$1>;
211
- restorePost(id: string | number, requestOptions?: RequestOptions): Promise<PostResponse$1>;
212
- updateAnswer(id: number, answer: AnswerRequest$1, requestOptions?: RequestOptions): Promise<AnswerResponseBody$1>;
213
- getAnswers(options: AnswersQuery, requestOptions?: RequestOptions): Promise<AnswersResponse$1>;
214
- getAnswer(questionId: string | number | undefined, id: string | number | undefined, requestOptions?: RequestOptions): Promise<AnswerResponseBody$1>;
215
- getFollowedCollections(requestOptions?: RequestOptions): Promise<UserCollectionsResponse$1>;
209
+ updatePost(id: string | number, question: PostRequest, requestOptions?: RequestOptions): Promise<PostResponse>;
210
+ restorePost(id: string | number, requestOptions?: RequestOptions): Promise<PostResponse>;
211
+ updateAnswer(id: number, answer: AnswerRequest, requestOptions?: RequestOptions): Promise<AnswerResponseBody>;
212
+ getAnswers(options: AnswersQuery, requestOptions?: RequestOptions): Promise<AnswersResponse>;
213
+ getAnswer(questionId: string | number | undefined, id: string | number | undefined, requestOptions?: RequestOptions): Promise<AnswerResponseBody>;
214
+ getFollowedCollections(requestOptions?: RequestOptions): Promise<UserCollectionsResponse>;
216
215
  followCollection(collectionId: number, requestOptions?: RequestOptions): Promise<boolean>;
217
216
  unfollowCollection(collectionId: number, requestOptions?: RequestOptions): Promise<boolean>;
218
- getFollowedTags(requestOptions?: RequestOptions): Promise<UserTagsResponse$1>;
217
+ getFollowedTags(requestOptions?: RequestOptions): Promise<UserTagsResponse>;
219
218
  followTag(tag: string, requestOptions?: RequestOptions): Promise<boolean>;
220
219
  unfollowTag(tag: string, requestOptions?: RequestOptions): Promise<boolean>;
221
220
  deleteTag(id: number, reason?: string, requestOptions?: RequestOptions): Promise<boolean>;
222
- getFollowedEntities(requestOptions?: RequestOptions): Promise<UserEntitiesResponse$1>;
221
+ getFollowedEntities(requestOptions?: RequestOptions): Promise<UserEntitiesResponse>;
223
222
  followEntity(entityRef: string, requestOptions?: RequestOptions): Promise<boolean>;
224
223
  unfollowEntity(entityRef: string, requestOptions?: RequestOptions): Promise<boolean>;
225
- getFollowedUsers(requestOptions?: RequestOptions): Promise<UserUsersResponse$1>;
224
+ getFollowedUsers(requestOptions?: RequestOptions): Promise<UserUsersResponse>;
226
225
  followUser(userRef: string, requestOptions?: RequestOptions): Promise<boolean>;
227
226
  unfollowUser(userRef: string, requestOptions?: RequestOptions): Promise<boolean>;
228
- getUserImpact(requestOptions?: RequestOptions): Promise<ImpactResponse$1>;
229
- getGlobalStats(requestOptions?: RequestOptions): Promise<StatisticsResponse$1<GlobalStat$1>>;
230
- getUserStats(userRef: string, requestOptions?: RequestOptions): Promise<StatisticsResponse$1<UserStat$1>>;
231
- getCollections(options?: CollectionsQuery, requestOptions?: RequestOptions): Promise<CollectionsResponse$1>;
232
- getCollection(id?: string | number, requestOptions?: RequestOptions): Promise<CollectionResponse$1>;
233
- createCollection(collection: CollectionRequest$1, requestOptions?: RequestOptions): Promise<CollectionResponse$1>;
234
- updateCollection(id: number, collection: CollectionRequest$1, requestOptions?: RequestOptions): Promise<CollectionResponse$1>;
227
+ getUserImpact(requestOptions?: RequestOptions): Promise<ImpactResponse>;
228
+ getGlobalStats(requestOptions?: RequestOptions): Promise<StatisticsResponse<GlobalStat>>;
229
+ getUserStats(userRef: string, requestOptions?: RequestOptions): Promise<StatisticsResponse<UserStat>>;
230
+ getCollections(options?: CollectionsQuery, requestOptions?: RequestOptions): Promise<CollectionsResponse>;
231
+ getCollection(id?: string | number, requestOptions?: RequestOptions): Promise<CollectionResponse>;
232
+ createCollection(collection: CollectionRequest, requestOptions?: RequestOptions): Promise<CollectionResponse>;
233
+ updateCollection(id: number, collection: CollectionRequest, requestOptions?: RequestOptions): Promise<CollectionResponse>;
235
234
  deleteCollection(id?: number, reason?: string, requestOptions?: RequestOptions): Promise<boolean>;
236
- addPostToCollection(collectionId: number, postId: number, requestOptions?: RequestOptions): Promise<CollectionResponse$1>;
237
- removePostFromCollection(collectionId: number, postId: number, requestOptions?: RequestOptions): Promise<CollectionResponse$1>;
235
+ addPostToCollection(collectionId: number, postId: number, requestOptions?: RequestOptions): Promise<CollectionResponse>;
236
+ removePostFromCollection(collectionId: number, postId: number, requestOptions?: RequestOptions): Promise<CollectionResponse>;
238
237
  rankPostInCollection(collectionId: number, postId: number, rank: 'top' | 'bottom' | 'up' | 'down', requestOptions?: RequestOptions): Promise<boolean>;
239
- getTemplates(requestOptions?: RequestOptions): Promise<TemplatesResponse$1>;
240
- getTemplate(id: string | number, requestOptions?: RequestOptions): Promise<TemplateResponse$1>;
241
- createTemplate(template: TemplateRequest$1, requestOptions?: RequestOptions): Promise<TemplateResponse$1>;
242
- updateTemplate(id: string | number, template: TemplateRequest$1, requestOptions?: RequestOptions): Promise<TemplateResponse$1>;
238
+ getTemplates(requestOptions?: RequestOptions): Promise<TemplatesResponse>;
239
+ getTemplate(id: string | number, requestOptions?: RequestOptions): Promise<TemplateResponse>;
240
+ createTemplate(template: TemplateRequest, requestOptions?: RequestOptions): Promise<TemplateResponse>;
241
+ updateTemplate(id: string | number, template: TemplateRequest, requestOptions?: RequestOptions): Promise<TemplateResponse>;
243
242
  deleteTemplate(templateId: number, requestOptions?: RequestOptions): Promise<boolean>;
244
- getSuggestions(options?: SuggestionsQuery, requestOptions?: RequestOptions): Promise<SuggestionsResponse$1>;
245
- getTagSuggestions(options: ContentSuggestionsQuery, requestOptions?: RequestOptions): Promise<TagSuggestionsResponse$1>;
246
- getEntitySuggestions(options: EntitySuggestionsQuery, requestOptions?: RequestOptions): Promise<EntitySuggestionsResponse$1>;
247
- fetchURLMetadata(request: URLMetadataRequest$1): Promise<URLMetadataResponse$1>;
248
- fetchBatchURLMetadata(request: BatchURLMetadataRequest$1): Promise<BatchURLMetadataResponse$1>;
249
- getEntityLinks(options?: RequestOptions): Promise<EntityLinks$1[]>;
250
- getTimeline(options?: TimelineOptions$1, requestOptions?: RequestOptions): Promise<TimelineResponse$1>;
251
- getCommunityActivity(period: string, requestOptions?: RequestOptions): Promise<CommunityStats$1>;
252
- getMostRecentViewedPosts(limit: number, requestOptions?: RequestOptions): Promise<Post$1[]>;
243
+ getSuggestions(options?: SuggestionsQuery, requestOptions?: RequestOptions): Promise<SuggestionsResponse>;
244
+ getTagSuggestions(options: ContentSuggestionsQuery, requestOptions?: RequestOptions): Promise<TagSuggestionsResponse>;
245
+ getEntitySuggestions(options: EntitySuggestionsQuery, requestOptions?: RequestOptions): Promise<EntitySuggestionsResponse>;
246
+ fetchURLMetadata(request: URLMetadataRequest): Promise<URLMetadataResponse>;
247
+ fetchBatchURLMetadata(request: BatchURLMetadataRequest): Promise<BatchURLMetadataResponse>;
248
+ getEntityLinks(options?: RequestOptions): Promise<EntityLinks[]>;
249
+ getTimeline(options?: TimelineOptions, requestOptions?: RequestOptions): Promise<TimelineResponse>;
250
+ getCommunityActivity(period: string, requestOptions?: RequestOptions): Promise<CommunityStats>;
251
+ getMostRecentViewedPosts(limit: number, requestOptions?: RequestOptions): Promise<Post[]>;
253
252
  followPost(id: number, requestOptions?: RequestOptions): Promise<void>;
254
253
  unfollowPost(id: number, requestOptions?: RequestOptions): Promise<void>;
255
254
  getPostFollowers(id: number, requestOptions?: RequestOptions): Promise<string[]>;
256
- getLinkedPosts(id: number, requestOptions?: RequestOptions): Promise<Post$1[]>;
255
+ getLinkedPosts(id: number, requestOptions?: RequestOptions): Promise<Post[]>;
257
256
  getPostRevisions(postId: number, options?: {
258
257
  limit?: number;
259
258
  offset?: number;
260
- }, requestOptions?: RequestOptions): Promise<PostRevisionsResponse$1>;
261
- getPostRevision(postId: number, revisionId: number, requestOptions?: RequestOptions): Promise<PostRevision$1>;
262
- restorePostRevision(postId: number, revisionId: number, requestOptions?: RequestOptions): Promise<PostResponse$1>;
259
+ }, requestOptions?: RequestOptions): Promise<PostRevisionsResponse>;
260
+ getPostRevision(postId: number, revisionId: number, requestOptions?: RequestOptions): Promise<PostRevision>;
261
+ restorePostRevision(postId: number, revisionId: number, requestOptions?: RequestOptions): Promise<PostResponse>;
263
262
  }
264
263
 
265
264
  declare class QetaClient implements QetaApi {
@@ -273,116 +272,113 @@ declare class QetaClient implements QetaApi {
273
272
  fetch: typeof fetch;
274
273
  };
275
274
  });
276
- getPosts(options: PostsQuery, requestOptions?: RequestOptions): Promise<PostsResponse$1>;
277
- getPostsList(type: string, options?: PostsQuery, requestOptions?: RequestOptions): Promise<PostsResponse$1>;
278
- createPost(question: PostRequest$1, requestOptions?: RequestOptions): Promise<Post$1>;
279
- commentPost(id: number, content: string, requestOptions?: RequestOptions): Promise<Post$1>;
280
- updatePostComment(questionId: number, id: number, content: string, requestOptions?: RequestOptions): Promise<Post$1>;
281
- reviewPost(id: number, status: 'valid' | 'obsolete', comment?: string, requestOptions?: RequestOptions): Promise<PostResponse$1>;
282
- getPostReviews(id: number, requestOptions?: RequestOptions): Promise<PostReview$1[]>;
283
- deletePostComment(questionId: number, id: number, requestOptions?: RequestOptions): Promise<Post$1>;
284
- getPost(id?: string, options?: PostQuery, requestOptions?: RequestOptions): Promise<Post$1>;
285
- getAIAnswerForQuestion(questionId: string | number, options?: AIQuery, requestOptions?: RequestOptions): Promise<AIResponse$1 | null>;
286
- getAIAnswerForDraft(title: string, content: string, requestOptions?: RequestOptions): Promise<AIResponse$1 | null>;
287
- getAISummaryForArticle(articleId: string | number, options?: AIQuery, requestOptions?: RequestOptions): Promise<AIResponse$1 | null>;
288
- isAIEnabled(): Promise<AIStatusResponse$1>;
289
- getTags(options?: TagsQuery, requestOptions?: RequestOptions): Promise<TagsResponse$1>;
290
- getBadges(requestOptions?: RequestOptions): Promise<Badge$1[]>;
291
- getUserBadges(userRef: string, requestOptions?: RequestOptions): Promise<UserBadge$1[]>;
292
- getTag(tag: string, requestOptions?: RequestOptions): Promise<TagResponse$1 | null>;
293
- updateTag(id: number, description?: string, experts?: string[], requestOptions?: RequestOptions): Promise<TagResponse$1 | null>;
294
- createTag(tag: string, description?: string, experts?: string[], requestOptions?: RequestOptions): Promise<TagResponse$1 | null>;
275
+ getPosts(options: PostsQuery, requestOptions?: RequestOptions): Promise<PostsResponse>;
276
+ getPostsList(type: string, options?: PostsQuery, requestOptions?: RequestOptions): Promise<PostsResponse>;
277
+ createPost(question: PostRequest, requestOptions?: RequestOptions): Promise<Post>;
278
+ commentPost(id: number, content: string, requestOptions?: RequestOptions): Promise<Post>;
279
+ updatePostComment(questionId: number, id: number, content: string, requestOptions?: RequestOptions): Promise<Post>;
280
+ reviewPost(id: number, status: 'valid' | 'obsolete', comment?: string, requestOptions?: RequestOptions): Promise<PostResponse>;
281
+ getPostReviews(id: number, requestOptions?: RequestOptions): Promise<PostReview[]>;
282
+ deletePostComment(questionId: number, id: number, requestOptions?: RequestOptions): Promise<Post>;
283
+ getPost(id?: string, options?: PostQuery, requestOptions?: RequestOptions): Promise<Post>;
284
+ getAIAnswerForQuestion(questionId: string | number, options?: AIQuery, requestOptions?: RequestOptions): Promise<AIResponse | null>;
285
+ getAIAnswerForDraft(title: string, content: string, requestOptions?: RequestOptions): Promise<AIResponse | null>;
286
+ getAISummaryForArticle(articleId: string | number, options?: AIQuery, requestOptions?: RequestOptions): Promise<AIResponse | null>;
287
+ isAIEnabled(): Promise<AIStatusResponse>;
288
+ getTags(options?: TagsQuery, requestOptions?: RequestOptions): Promise<TagsResponse>;
289
+ getBadges(requestOptions?: RequestOptions): Promise<Badge[]>;
290
+ getUserBadges(userRef: string, requestOptions?: RequestOptions): Promise<UserBadge[]>;
291
+ getTag(tag: string, requestOptions?: RequestOptions): Promise<TagResponse | null>;
292
+ updateTag(id: number, description?: string, experts?: string[], requestOptions?: RequestOptions): Promise<TagResponse | null>;
293
+ createTag(tag: string, description?: string, experts?: string[], requestOptions?: RequestOptions): Promise<TagResponse | null>;
295
294
  deleteTag(id?: number, reason?: string, requestOptions?: RequestOptions): Promise<boolean>;
296
- getUsers(options?: UsersQuery, requestOptions?: RequestOptions): Promise<UsersResponse$1>;
297
- getEntities(options?: EntitiesQuery, requestOptions?: RequestOptions): Promise<EntitiesResponse$1>;
298
- getEntity(entityRef: string, requestOptions?: RequestOptions): Promise<EntityResponse$1 | null>;
299
- suggest(options: ContentSuggestionsQuery$1 & {
300
- tags?: string[];
301
- entities?: string[];
302
- }, requestOptions?: RequestOptions): Promise<PostsResponse$1>;
295
+ getUsers(options?: UsersQuery, requestOptions?: RequestOptions): Promise<UsersResponse>;
296
+ getEntities(options?: EntitiesQuery, requestOptions?: RequestOptions): Promise<EntitiesResponse>;
297
+ getEntity(entityRef: string, requestOptions?: RequestOptions): Promise<EntityResponse | null>;
298
+ suggest(options: Parameters<QetaApi['suggest']>[0], requestOptions?: RequestOptions): Promise<PostsResponse>;
303
299
  clickLink(id: number): Promise<void>;
304
- votePostUp(id: number, requestOptions?: RequestOptions): Promise<Post$1>;
305
- votePostDown(id: number, requestOptions?: RequestOptions): Promise<Post$1>;
306
- deletePostVote(id: number, requestOptions?: RequestOptions): Promise<PostResponse$1>;
307
- favoritePost(id: number, requestOptions?: RequestOptions): Promise<Post$1>;
308
- unfavoritePost(id: number, requestOptions?: RequestOptions): Promise<Post$1>;
309
- postAnswer(answer: AnswerRequest$1, requestOptions?: RequestOptions): Promise<Answer$1>;
310
- commentAnswer(questionId: number, id: number, content: string, requestOptions?: RequestOptions): Promise<Answer$1>;
311
- updateAnswerComment(questionId: number, answerId: number, id: number, content: string, requestOptions?: RequestOptions): Promise<Answer$1>;
312
- deleteAnswerComment(questionId: number, answerId: number, id: number, requestOptions?: RequestOptions): Promise<Answer$1>;
313
- voteAnswerUp(questionId: number, id: number, requestOptions?: RequestOptions): Promise<Answer$1>;
314
- voteAnswerDown(questionId: number, id: number, requestOptions?: RequestOptions): Promise<Answer$1>;
315
- deleteAnswerVote(postId: number, id: number, requestOptions?: RequestOptions): Promise<AnswerResponse$1>;
300
+ votePostUp(id: number, requestOptions?: RequestOptions): Promise<Post>;
301
+ votePostDown(id: number, requestOptions?: RequestOptions): Promise<Post>;
302
+ deletePostVote(id: number, requestOptions?: RequestOptions): Promise<PostResponse>;
303
+ favoritePost(id: number, requestOptions?: RequestOptions): Promise<Post>;
304
+ unfavoritePost(id: number, requestOptions?: RequestOptions): Promise<Post>;
305
+ postAnswer(answer: AnswerRequest, requestOptions?: RequestOptions): Promise<Answer>;
306
+ commentAnswer(questionId: number, id: number, content: string, requestOptions?: RequestOptions): Promise<Answer>;
307
+ updateAnswerComment(questionId: number, answerId: number, id: number, content: string, requestOptions?: RequestOptions): Promise<Answer>;
308
+ deleteAnswerComment(questionId: number, answerId: number, id: number, requestOptions?: RequestOptions): Promise<Answer>;
309
+ voteAnswerUp(questionId: number, id: number, requestOptions?: RequestOptions): Promise<Answer>;
310
+ voteAnswerDown(questionId: number, id: number, requestOptions?: RequestOptions): Promise<Answer>;
311
+ deleteAnswerVote(postId: number, id: number, requestOptions?: RequestOptions): Promise<AnswerResponse>;
316
312
  markAnswerCorrect(questionId: number, id: number, requestOptions?: RequestOptions): Promise<boolean>;
317
313
  markAnswerIncorrect(questionId: number, id: number, requestOptions?: RequestOptions): Promise<boolean>;
318
314
  deletePost(questionId: number, reason?: string, requestOptions?: RequestOptions): Promise<boolean>;
319
315
  deleteAnswer(questionId: number, id: number, reason?: string, requestOptions?: RequestOptions): Promise<boolean>;
320
- restorePost(id: string | number, requestOptions?: RequestOptions): Promise<Post$1>;
321
- updatePost(id: string, question: PostRequest$1, requestOptions?: RequestOptions): Promise<Post$1>;
322
- updateAnswer(id: number, answer: AnswerRequest$1, requestOptions?: RequestOptions): Promise<AnswerResponseBody$1>;
323
- getAnswers(options: AnswersQuery, requestOptions?: RequestOptions): Promise<AnswersResponse$1>;
324
- getAnswer(questionId: string | number | undefined, id: string | number | undefined, requestOptions?: RequestOptions): Promise<AnswerResponseBody$1>;
325
- getFollowedCollections(requestOptions?: RequestOptions): Promise<UserCollectionsResponse$1>;
316
+ restorePost(id: string | number, requestOptions?: RequestOptions): Promise<Post>;
317
+ updatePost(id: string, question: PostRequest, requestOptions?: RequestOptions): Promise<Post>;
318
+ updateAnswer(id: number, answer: AnswerRequest, requestOptions?: RequestOptions): Promise<AnswerResponseBody>;
319
+ getAnswers(options: AnswersQuery, requestOptions?: RequestOptions): Promise<AnswersResponse>;
320
+ getAnswer(questionId: string | number | undefined, id: string | number | undefined, requestOptions?: RequestOptions): Promise<AnswerResponseBody>;
321
+ getFollowedCollections(requestOptions?: RequestOptions): Promise<UserCollectionsResponse>;
326
322
  followCollection(collectionId: number, requestOptions?: RequestOptions): Promise<boolean>;
327
323
  unfollowCollection(collectionId: number, requestOptions?: RequestOptions): Promise<boolean>;
328
- getFollowedTags(requestOptions?: RequestOptions): Promise<UserTagsResponse$1>;
324
+ getFollowedTags(requestOptions?: RequestOptions): Promise<UserTagsResponse>;
329
325
  followTag(tag: string, requestOptions?: RequestOptions): Promise<boolean>;
330
326
  unfollowTag(tag: string, requestOptions?: RequestOptions): Promise<boolean>;
331
- getFollowedEntities(requestOptions?: RequestOptions): Promise<UserEntitiesResponse$1>;
327
+ getFollowedEntities(requestOptions?: RequestOptions): Promise<UserEntitiesResponse>;
332
328
  followEntity(entityRef: string, requestOptions?: RequestOptions): Promise<boolean>;
333
329
  unfollowEntity(entityRef: string, requestOptions?: RequestOptions): Promise<boolean>;
334
- getFollowedUsers(requestOptions?: RequestOptions): Promise<UserUsersResponse$1>;
330
+ getFollowedUsers(requestOptions?: RequestOptions): Promise<UserUsersResponse>;
335
331
  followUser(userRef: string, requestOptions?: RequestOptions): Promise<boolean>;
336
332
  unfollowUser(userRef: string, requestOptions?: RequestOptions): Promise<boolean>;
337
333
  postAttachment(file: Blob, options?: {
338
334
  postId?: number;
339
335
  answerId?: number;
340
336
  collectionId?: number;
341
- }, requestOptions?: RequestOptions): Promise<AttachmentResponseBody$1>;
342
- getMostUpvotedAnswers(options: StatisticsRequestParameters$1): Promise<StatisticResponse$1>;
343
- getMostUpvotedCorrectAnswers(options: StatisticsRequestParameters$1): Promise<StatisticResponse$1>;
344
- getMostUpvotedPosts(options: StatisticsRequestParameters$1): Promise<StatisticResponse$1>;
345
- getMostPosts(options: StatisticsRequestParameters$1): Promise<StatisticResponse$1>;
346
- getMostAnswers(options: StatisticsRequestParameters$1): Promise<StatisticResponse$1>;
347
- getTopStatisticsHomepage(options: StatisticsRequestParameters$1): Promise<StatisticResponse$1[]>;
348
- getUserImpact(requestOptions?: RequestOptions): Promise<ImpactResponse$1>;
349
- getGlobalStats(requestOptions?: RequestOptions): Promise<StatisticsResponse$1<GlobalStat$1>>;
350
- getUserStats(userRef: string, requestOptions?: RequestOptions): Promise<StatisticsResponse$1<UserStat$1>>;
351
- getCollections(options?: CollectionsQuery, requestOptions?: RequestOptions): Promise<CollectionsResponse$1>;
352
- getCollection(id?: string | number, requestOptions?: RequestOptions): Promise<CollectionResponse$1>;
353
- createCollection(collection: CollectionRequest$1, requestOptions?: RequestOptions): Promise<CollectionResponse$1>;
354
- updateCollection(id: number, collection: CollectionRequest$1, requestOptions?: RequestOptions): Promise<CollectionResponse$1>;
337
+ }, requestOptions?: RequestOptions): Promise<AttachmentResponseBody>;
338
+ getMostUpvotedAnswers(options: StatisticsRequestParameters): Promise<StatisticResponse>;
339
+ getMostUpvotedCorrectAnswers(options: StatisticsRequestParameters): Promise<StatisticResponse>;
340
+ getMostUpvotedPosts(options: StatisticsRequestParameters): Promise<StatisticResponse>;
341
+ getMostPosts(options: StatisticsRequestParameters): Promise<StatisticResponse>;
342
+ getMostAnswers(options: StatisticsRequestParameters): Promise<StatisticResponse>;
343
+ getTopStatisticsHomepage(options: StatisticsRequestParameters): Promise<StatisticResponse[]>;
344
+ getUserImpact(requestOptions?: RequestOptions): Promise<ImpactResponse>;
345
+ getGlobalStats(requestOptions?: RequestOptions): Promise<StatisticsResponse<GlobalStat>>;
346
+ getUserStats(userRef: string, requestOptions?: RequestOptions): Promise<StatisticsResponse<UserStat>>;
347
+ getCollections(options?: CollectionsQuery, requestOptions?: RequestOptions): Promise<CollectionsResponse>;
348
+ getCollection(id?: string | number, requestOptions?: RequestOptions): Promise<CollectionResponse>;
349
+ createCollection(collection: CollectionRequest, requestOptions?: RequestOptions): Promise<CollectionResponse>;
350
+ updateCollection(id: number, collection: CollectionRequest, requestOptions?: RequestOptions): Promise<CollectionResponse>;
355
351
  deleteCollection(id?: number, reason?: string, requestOptions?: RequestOptions): Promise<boolean>;
356
- addPostToCollection(collectionId: number, postId: number, requestOptions?: RequestOptions): Promise<CollectionResponse$1>;
357
- removePostFromCollection(collectionId: number, postId: number, requestOptions?: RequestOptions): Promise<CollectionResponse$1>;
352
+ addPostToCollection(collectionId: number, postId: number, requestOptions?: RequestOptions): Promise<CollectionResponse>;
353
+ removePostFromCollection(collectionId: number, postId: number, requestOptions?: RequestOptions): Promise<CollectionResponse>;
358
354
  rankPostInCollection(collectionId: number, postId: number, rank: 'top' | 'bottom' | 'up' | 'down', requestOptions?: RequestOptions): Promise<boolean>;
359
- getTemplates(requestOptions?: RequestOptions): Promise<TemplatesResponse$1>;
360
- getTemplate(id: string | number, requestOptions?: RequestOptions): Promise<TemplateResponse$1>;
361
- createTemplate(template: TemplateRequest$1, requestOptions?: RequestOptions): Promise<TemplateResponse$1>;
362
- updateTemplate(id: string | number, template: TemplateRequest$1, requestOptions?: RequestOptions): Promise<TemplateResponse$1>;
355
+ getTemplates(requestOptions?: RequestOptions): Promise<TemplatesResponse>;
356
+ getTemplate(id: string | number, requestOptions?: RequestOptions): Promise<TemplateResponse>;
357
+ createTemplate(template: TemplateRequest, requestOptions?: RequestOptions): Promise<TemplateResponse>;
358
+ updateTemplate(id: string | number, template: TemplateRequest, requestOptions?: RequestOptions): Promise<TemplateResponse>;
363
359
  deleteTemplate(templateId: number, requestOptions?: RequestOptions): Promise<boolean>;
364
- getSuggestions(options?: SuggestionsQuery, requestOptions?: RequestOptions): Promise<SuggestionsResponse$1>;
365
- getTagSuggestions(options: ContentSuggestionsQuery$1, requestOptions?: RequestOptions): Promise<TagSuggestionsResponse$1>;
366
- getEntitySuggestions(options: EntitySuggestionsQuery, requestOptions?: RequestOptions): Promise<EntitySuggestionsResponse$1>;
367
- fetchURLMetadata(request: URLMetadataRequest$1): Promise<URLMetadataResponse$1>;
368
- fetchBatchURLMetadata(request: BatchURLMetadataRequest$1): Promise<BatchURLMetadataResponse$1>;
369
- getEntityLinks(options?: RequestOptions): Promise<EntityLinks$1[]>;
370
- getTimeline(options?: TimelineOptions$1, requestOptions?: RequestOptions): Promise<TimelineResponse$1>;
360
+ getSuggestions(options?: SuggestionsQuery, requestOptions?: RequestOptions): Promise<SuggestionsResponse>;
361
+ getTagSuggestions(options: Parameters<QetaApi['getTagSuggestions']>[0], requestOptions?: RequestOptions): Promise<TagSuggestionsResponse>;
362
+ getEntitySuggestions(options: EntitySuggestionsQuery, requestOptions?: RequestOptions): Promise<EntitySuggestionsResponse>;
363
+ fetchURLMetadata(request: URLMetadataRequest): Promise<URLMetadataResponse>;
364
+ fetchBatchURLMetadata(request: BatchURLMetadataRequest): Promise<BatchURLMetadataResponse>;
365
+ getEntityLinks(options?: RequestOptions): Promise<EntityLinks[]>;
366
+ getTimeline(options?: TimelineOptions, requestOptions?: RequestOptions): Promise<TimelineResponse>;
371
367
  private getBaseUrl;
372
368
  private fetch;
373
369
  private getQueryParameters;
374
- getCommunityActivity(period: string, requestOptions?: RequestOptions): Promise<CommunityStats$1>;
375
- getMostRecentViewedPosts(limit: number, requestOptions?: RequestOptions): Promise<Post$1[]>;
370
+ getCommunityActivity(period: string, requestOptions?: RequestOptions): Promise<CommunityStats>;
371
+ getMostRecentViewedPosts(limit: number, requestOptions?: RequestOptions): Promise<Post[]>;
376
372
  followPost(id: number, requestOptions?: RequestOptions): Promise<void>;
377
373
  unfollowPost(id: number, requestOptions?: RequestOptions): Promise<void>;
378
374
  getPostFollowers(id: number, requestOptions?: RequestOptions): Promise<string[]>;
379
- getLinkedPosts(id: number, requestOptions?: RequestOptions): Promise<Post$1[]>;
375
+ getLinkedPosts(id: number, requestOptions?: RequestOptions): Promise<Post[]>;
380
376
  getPostRevisions(postId: number, options?: {
381
377
  limit?: number;
382
378
  offset?: number;
383
- }, requestOptions?: RequestOptions): Promise<PostRevisionsResponse$1>;
384
- getPostRevision(postId: number, revisionId: number, requestOptions?: RequestOptions): Promise<PostRevision$1>;
385
- restorePostRevision(postId: number, revisionId: number, requestOptions?: RequestOptions): Promise<PostResponse$1>;
379
+ }, requestOptions?: RequestOptions): Promise<PostRevisionsResponse>;
380
+ getPostRevision(postId: number, revisionId: number, requestOptions?: RequestOptions): Promise<PostRevision>;
381
+ restorePostRevision(postId: number, revisionId: number, requestOptions?: RequestOptions): Promise<PostResponse>;
386
382
  }
387
383
 
388
384
  interface TimelineOptions {
package/package.json CHANGED
@@ -7,7 +7,7 @@
7
7
  "frontend",
8
8
  "backstage.io"
9
9
  ],
10
- "version": "3.59.6",
10
+ "version": "3.59.9",
11
11
  "main": "dist/index.cjs.js",
12
12
  "types": "dist/index.d.ts",
13
13
  "prepublishOnly": "yarn tsc && yarn build",
@@ -48,20 +48,20 @@
48
48
  "tsc": "tsc"
49
49
  },
50
50
  "dependencies": {
51
- "@backstage/config": "^1.3.7",
52
- "@backstage/errors": "^1.3.0",
53
- "@backstage/plugin-permission-common": "^0.9.8",
54
- "@backstage/plugin-search-common": "^1.2.23",
51
+ "@backstage/config": "^1.3.8",
52
+ "@backstage/errors": "^1.3.1",
53
+ "@backstage/plugin-permission-common": "^0.9.9",
54
+ "@backstage/plugin-search-common": "^1.2.24",
55
55
  "ajv": "^8.12.0",
56
56
  "cross-fetch": "^4.0.0",
57
57
  "lodash": "^4.17.23",
58
58
  "qs": "^6.14.1"
59
59
  },
60
60
  "peerDependencies": {
61
- "@backstage/catalog-model": "^1.8.0"
61
+ "@backstage/catalog-model": "^1.9.0"
62
62
  },
63
63
  "devDependencies": {
64
- "@backstage/cli": "^0.36.1",
64
+ "@backstage/cli": "^0.36.2",
65
65
  "@types/lodash": "^4.14.199",
66
66
  "@types/qs": "^6"
67
67
  },