@prism-draft/sdk 0.0.0-stage → 0.2.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.
@@ -0,0 +1,1460 @@
1
+ import type { operations } from "./schema.js";
2
+ import type { PrismDraftClient, RequestOptions } from "../transport.js";
3
+ export type ApiKeysListInput = operations["apiKeys.list"]["parameters"]["path"];
4
+ export type ApiKeysListOutput = operations["apiKeys.list"]["responses"][200]["content"]["application/json"];
5
+ export type ApiKeysCreateInput = operations["apiKeys.create"]["parameters"]["path"] & {
6
+ body: NonNullable<operations["apiKeys.create"]["requestBody"]>["content"]["application/json"];
7
+ };
8
+ export type ApiKeysCreateOutput = operations["apiKeys.create"]["responses"][201]["content"]["application/json"];
9
+ export type ApiKeysRevokeInput = operations["apiKeys.revoke"]["parameters"]["path"];
10
+ export type ApiKeysRevokeOutput = operations["apiKeys.revoke"]["responses"][200]["content"]["application/json"];
11
+ export type ApiKeysRotateInput = operations["apiKeys.rotate"]["parameters"]["path"];
12
+ export type ApiKeysRotateOutput = operations["apiKeys.rotate"]["responses"][201]["content"]["application/json"];
13
+ export declare class ApiKeys {
14
+ private readonly client;
15
+ constructor(client: PrismDraftClient);
16
+ /**
17
+ * List a workspace's API keys
18
+ *
19
+ * `GET /api/workspaces/{workspaceId}/api-keys`
20
+ */
21
+ list(input: ApiKeysListInput, init?: RequestOptions): Promise<ApiKeysListOutput>;
22
+ /**
23
+ * Create an API key
24
+ *
25
+ * `POST /api/workspaces/{workspaceId}/api-keys`
26
+ */
27
+ create(input: ApiKeysCreateInput, init?: RequestOptions): Promise<ApiKeysCreateOutput>;
28
+ /**
29
+ * Revoke an API key
30
+ *
31
+ * `DELETE /api/workspaces/{workspaceId}/api-keys/{keyId}`
32
+ */
33
+ revoke(input: ApiKeysRevokeInput, init?: RequestOptions): Promise<ApiKeysRevokeOutput>;
34
+ /**
35
+ * Rotate an API key
36
+ *
37
+ * `POST /api/workspaces/{workspaceId}/api-keys/{keyId}/rotate`
38
+ */
39
+ rotate(input: ApiKeysRotateInput, init?: RequestOptions): Promise<ApiKeysRotateOutput>;
40
+ }
41
+ export type ArticleGroupsListInput = NonNullable<operations["articleGroups.list"]["parameters"]["query"]>;
42
+ export type ArticleGroupsListOutput = operations["articleGroups.list"]["responses"][200]["content"]["application/json"];
43
+ export type ArticleGroupsGetInput = operations["articleGroups.get"]["parameters"]["path"];
44
+ export type ArticleGroupsGetOutput = operations["articleGroups.get"]["responses"][200]["content"]["application/json"];
45
+ export type ArticleGroupsDeleteInput = operations["articleGroups.delete"]["parameters"]["path"];
46
+ export type ArticleGroupsDeleteOutput = operations["articleGroups.delete"]["responses"][200]["content"]["application/json"];
47
+ export type ArticleGroupsApproveInput = operations["articleGroups.approve"]["parameters"]["path"] & {
48
+ body?: NonNullable<operations["articleGroups.approve"]["requestBody"]>["content"]["application/json"];
49
+ };
50
+ export type ArticleGroupsApproveOutput = operations["articleGroups.approve"]["responses"][200]["content"]["application/json"];
51
+ export type ArticleGroupsPublishInput = operations["articleGroups.publish"]["parameters"]["path"] & {
52
+ body?: NonNullable<operations["articleGroups.publish"]["requestBody"]>["content"]["application/json"];
53
+ };
54
+ export type ArticleGroupsPublishOutput = operations["articleGroups.publish"]["responses"][200]["content"]["application/json"];
55
+ export type ArticleGroupsUnpublishInput = operations["articleGroups.unpublish"]["parameters"]["path"] & {
56
+ body?: NonNullable<operations["articleGroups.unpublish"]["requestBody"]>["content"]["application/json"];
57
+ };
58
+ export type ArticleGroupsUnpublishOutput = operations["articleGroups.unpublish"]["responses"][200]["content"]["application/json"];
59
+ export declare class ArticleGroups {
60
+ private readonly client;
61
+ constructor(client: PrismDraftClient);
62
+ /**
63
+ * List articles, one item per content piece
64
+ *
65
+ * `GET /api/article-groups`
66
+ */
67
+ list(input: ArticleGroupsListInput, init?: RequestOptions): Promise<ArticleGroupsListOutput>;
68
+ /**
69
+ * Read one content piece with all its language versions
70
+ *
71
+ * `GET /api/article-groups/{translationGroupId}`
72
+ */
73
+ get(input: ArticleGroupsGetInput, init?: RequestOptions): Promise<ArticleGroupsGetOutput>;
74
+ /**
75
+ * Delete every language version of a content piece
76
+ *
77
+ * `DELETE /api/article-groups/{translationGroupId}`
78
+ */
79
+ delete(input: ArticleGroupsDeleteInput, init?: RequestOptions): Promise<ArticleGroupsDeleteOutput>;
80
+ /**
81
+ * Approve the language versions of a group
82
+ *
83
+ * `POST /api/article-groups/{translationGroupId}/approve`
84
+ */
85
+ approve(input: ArticleGroupsApproveInput, init?: RequestOptions): Promise<ArticleGroupsApproveOutput>;
86
+ /**
87
+ * Publish the language versions of a group
88
+ *
89
+ * `POST /api/article-groups/{translationGroupId}/publish`
90
+ */
91
+ publish(input: ArticleGroupsPublishInput, init?: RequestOptions): Promise<ArticleGroupsPublishOutput>;
92
+ /**
93
+ * Unpublish the language versions of a group
94
+ *
95
+ * `POST /api/article-groups/{translationGroupId}/unpublish`
96
+ */
97
+ unpublish(input: ArticleGroupsUnpublishInput, init?: RequestOptions): Promise<ArticleGroupsUnpublishOutput>;
98
+ }
99
+ export type ArticlesCreateInput = {
100
+ body: NonNullable<operations["articles.create"]["requestBody"]>["content"]["application/json"];
101
+ };
102
+ export type ArticlesCreateOutput = operations["articles.create"]["responses"][201]["content"]["application/json"];
103
+ export type ArticlesListInput = NonNullable<operations["articles.list"]["parameters"]["query"]>;
104
+ export type ArticlesListOutput = operations["articles.list"]["responses"][200]["content"]["application/json"];
105
+ export type ArticlesDuplicateInput = operations["articles.duplicate"]["parameters"]["path"] & {
106
+ body?: NonNullable<operations["articles.duplicate"]["requestBody"]>["content"]["application/json"];
107
+ };
108
+ export type ArticlesDuplicateOutput = operations["articles.duplicate"]["responses"][201]["content"]["application/json"];
109
+ export type ArticlesGetInput = operations["articles.get"]["parameters"]["path"] & NonNullable<operations["articles.get"]["parameters"]["query"]>;
110
+ export type ArticlesGetOutput = operations["articles.get"]["responses"][200]["content"]["application/json"];
111
+ export type ArticlesUpdateInput = operations["articles.update"]["parameters"]["path"] & {
112
+ body?: NonNullable<operations["articles.update"]["requestBody"]>["content"]["application/json"];
113
+ };
114
+ export type ArticlesUpdateOutput = operations["articles.update"]["responses"][200]["content"]["application/json"];
115
+ export type ArticlesDeleteInput = operations["articles.delete"]["parameters"]["path"];
116
+ export type ArticlesDeleteOutput = operations["articles.delete"]["responses"][200]["content"]["application/json"];
117
+ export type ArticlesSubmitInput = operations["articles.submit"]["parameters"]["path"];
118
+ export type ArticlesSubmitOutput = operations["articles.submit"]["responses"][200]["content"]["application/json"];
119
+ export type ArticlesApproveInput = operations["articles.approve"]["parameters"]["path"] & {
120
+ body?: NonNullable<operations["articles.approve"]["requestBody"]>["content"]["application/json"];
121
+ };
122
+ export type ArticlesApproveOutput = operations["articles.approve"]["responses"][200]["content"]["application/json"];
123
+ export type ArticlesRejectInput = operations["articles.reject"]["parameters"]["path"] & {
124
+ body?: NonNullable<operations["articles.reject"]["requestBody"]>["content"]["application/json"];
125
+ };
126
+ export type ArticlesRejectOutput = operations["articles.reject"]["responses"][200]["content"]["application/json"];
127
+ export type ArticlesRequestChangesInput = operations["articles.requestChanges"]["parameters"]["path"] & {
128
+ body?: NonNullable<operations["articles.requestChanges"]["requestBody"]>["content"]["application/json"];
129
+ };
130
+ export type ArticlesRequestChangesOutput = operations["articles.requestChanges"]["responses"][200]["content"]["application/json"];
131
+ export type ArticlesPublishInput = operations["articles.publish"]["parameters"]["path"] & {
132
+ body?: NonNullable<operations["articles.publish"]["requestBody"]>["content"]["application/json"];
133
+ };
134
+ export type ArticlesPublishOutput = operations["articles.publish"]["responses"][200]["content"]["application/json"];
135
+ export type ArticlesUnpublishInput = operations["articles.unpublish"]["parameters"]["path"];
136
+ export type ArticlesUnpublishOutput = operations["articles.unpublish"]["responses"][200]["content"]["application/json"];
137
+ export type ArticlesTransitionTranslationsInput = operations["articles.transitionTranslations"]["parameters"]["path"] & {
138
+ body?: NonNullable<operations["articles.transitionTranslations"]["requestBody"]>["content"]["application/json"];
139
+ };
140
+ export type ArticlesTransitionTranslationsOutput = operations["articles.transitionTranslations"]["responses"][200]["content"]["application/json"];
141
+ export type ArticlesListReviewsInput = operations["articles.listReviews"]["parameters"]["path"];
142
+ export type ArticlesListReviewsOutput = operations["articles.listReviews"]["responses"][200]["content"]["application/json"];
143
+ export type ArticlesListVersionsInput = operations["articles.listVersions"]["parameters"]["path"];
144
+ export type ArticlesListVersionsOutput = operations["articles.listVersions"]["responses"][200]["content"]["application/json"];
145
+ export type ArticlesGetVersionInput = operations["articles.getVersion"]["parameters"]["path"];
146
+ export type ArticlesGetVersionOutput = operations["articles.getVersion"]["responses"][200]["content"]["application/json"];
147
+ export type ArticlesGetSourcesInput = operations["articles.getSources"]["parameters"]["path"];
148
+ export type ArticlesGetSourcesOutput = operations["articles.getSources"]["responses"][200]["content"]["application/json"];
149
+ export type ArticlesRestoreVersionInput = operations["articles.restoreVersion"]["parameters"]["path"];
150
+ export type ArticlesRestoreVersionOutput = operations["articles.restoreVersion"]["responses"][200]["content"]["application/json"];
151
+ export type ArticlesListCommentsInput = operations["articles.listComments"]["parameters"]["path"] & NonNullable<operations["articles.listComments"]["parameters"]["query"]>;
152
+ export type ArticlesListCommentsOutput = operations["articles.listComments"]["responses"][200]["content"]["application/json"];
153
+ export type ArticlesAddCommentInput = operations["articles.addComment"]["parameters"]["path"] & {
154
+ body: NonNullable<operations["articles.addComment"]["requestBody"]>["content"]["application/json"];
155
+ };
156
+ export type ArticlesAddCommentOutput = operations["articles.addComment"]["responses"][201]["content"]["application/json"];
157
+ export type ArticlesResolveCommentInput = operations["articles.resolveComment"]["parameters"]["path"];
158
+ export type ArticlesResolveCommentOutput = operations["articles.resolveComment"]["responses"][200]["content"]["application/json"];
159
+ export type ArticlesReopenCommentInput = operations["articles.reopenComment"]["parameters"]["path"];
160
+ export type ArticlesReopenCommentOutput = operations["articles.reopenComment"]["responses"][200]["content"]["application/json"];
161
+ export type ArticlesCheckDuplicatesInput = operations["articles.checkDuplicates"]["parameters"]["path"] & NonNullable<operations["articles.checkDuplicates"]["parameters"]["query"]>;
162
+ export type ArticlesCheckDuplicatesOutput = operations["articles.checkDuplicates"]["responses"][200]["content"]["application/json"];
163
+ export type ArticlesSetHeroFromUrlInput = operations["articles.setHeroFromUrl"]["parameters"]["path"] & {
164
+ body: NonNullable<operations["articles.setHeroFromUrl"]["requestBody"]>["content"]["application/json"];
165
+ };
166
+ export type ArticlesSetHeroFromUrlOutput = operations["articles.setHeroFromUrl"]["responses"][201]["content"]["application/json"];
167
+ export type ArticlesSetHeroFromFileInput = operations["articles.setHeroFromFile"]["parameters"]["path"] & NonNullable<operations["articles.setHeroFromFile"]["parameters"]["query"]> & {
168
+ body: Blob | ArrayBuffer | Uint8Array;
169
+ contentType: "image/png" | "image/jpeg" | "image/webp" | "image/gif" | "image/avif";
170
+ };
171
+ export type ArticlesSetHeroFromFileOutput = operations["articles.setHeroFromFile"]["responses"][201]["content"]["application/json"];
172
+ export type ArticlesDetachHeroFromBodyInput = operations["articles.detachHeroFromBody"]["parameters"]["path"];
173
+ export type ArticlesDetachHeroFromBodyOutput = operations["articles.detachHeroFromBody"]["responses"][200]["content"]["application/json"];
174
+ export declare class Articles {
175
+ private readonly client;
176
+ constructor(client: PrismDraftClient);
177
+ /**
178
+ * Create an article
179
+ *
180
+ * `POST /api/articles`
181
+ */
182
+ create(input: ArticlesCreateInput, init?: RequestOptions): Promise<ArticlesCreateOutput>;
183
+ /**
184
+ * List articles
185
+ *
186
+ * `GET /api/articles`
187
+ */
188
+ list(input: ArticlesListInput, init?: RequestOptions): Promise<ArticlesListOutput>;
189
+ /**
190
+ * Duplicate an article
191
+ *
192
+ * `POST /api/articles/{articleId}/duplicate`
193
+ */
194
+ duplicate(input: ArticlesDuplicateInput, init?: RequestOptions): Promise<ArticlesDuplicateOutput>;
195
+ /**
196
+ * Read an article
197
+ *
198
+ * `GET /api/articles/{articleId}`
199
+ */
200
+ get(input: ArticlesGetInput, init?: RequestOptions): Promise<ArticlesGetOutput>;
201
+ /**
202
+ * Update an article
203
+ *
204
+ * `PATCH /api/articles/{articleId}`
205
+ */
206
+ update(input: ArticlesUpdateInput, init?: RequestOptions): Promise<ArticlesUpdateOutput>;
207
+ /**
208
+ * Delete an article
209
+ *
210
+ * `DELETE /api/articles/{articleId}`
211
+ */
212
+ delete(input: ArticlesDeleteInput, init?: RequestOptions): Promise<ArticlesDeleteOutput>;
213
+ /**
214
+ * Submit an article for review
215
+ *
216
+ * `POST /api/articles/{articleId}/submit`
217
+ */
218
+ submit(input: ArticlesSubmitInput, init?: RequestOptions): Promise<ArticlesSubmitOutput>;
219
+ /**
220
+ * Approve an article
221
+ *
222
+ * `POST /api/articles/{articleId}/approve`
223
+ */
224
+ approve(input: ArticlesApproveInput, init?: RequestOptions): Promise<ArticlesApproveOutput>;
225
+ /**
226
+ * Record a review decision: rejected
227
+ *
228
+ * `POST /api/articles/{articleId}/reject`
229
+ */
230
+ reject(input: ArticlesRejectInput, init?: RequestOptions): Promise<ArticlesRejectOutput>;
231
+ /**
232
+ * Record a review decision: changes_requested
233
+ *
234
+ * `POST /api/articles/{articleId}/request-changes`
235
+ */
236
+ requestChanges(input: ArticlesRequestChangesInput, init?: RequestOptions): Promise<ArticlesRequestChangesOutput>;
237
+ /**
238
+ * Publish an approved article to its integration
239
+ *
240
+ * `POST /api/articles/{articleId}/publish`
241
+ */
242
+ publish(input: ArticlesPublishInput, init?: RequestOptions): Promise<ArticlesPublishOutput>;
243
+ /**
244
+ * Take a published article back to DRAFT
245
+ *
246
+ * `POST /api/articles/{articleId}/unpublish`
247
+ */
248
+ unpublish(input: ArticlesUnpublishInput, init?: RequestOptions): Promise<ArticlesUnpublishOutput>;
249
+ /**
250
+ * Submit, approve or publish every language version together
251
+ *
252
+ * `POST /api/articles/{articleId}/translations/{action}`
253
+ */
254
+ transitionTranslations(input: ArticlesTransitionTranslationsInput, init?: RequestOptions): Promise<ArticlesTransitionTranslationsOutput>;
255
+ /**
256
+ * The article's review history
257
+ *
258
+ * `GET /api/articles/{articleId}/reviews`
259
+ */
260
+ listReviews(input: ArticlesListReviewsInput, init?: RequestOptions): Promise<ArticlesListReviewsOutput>;
261
+ /**
262
+ * The article's version history
263
+ *
264
+ * `GET /api/articles/{articleId}/versions`
265
+ */
266
+ listVersions(input: ArticlesListVersionsInput, init?: RequestOptions): Promise<ArticlesListVersionsOutput>;
267
+ /**
268
+ * Read one version of an article
269
+ *
270
+ * `GET /api/articles/{articleId}/versions/{version}`
271
+ */
272
+ getVersion(input: ArticlesGetVersionInput, init?: RequestOptions): Promise<ArticlesGetVersionOutput>;
273
+ /**
274
+ * Research sources and fact checks behind an article
275
+ *
276
+ * `GET /api/articles/{articleId}/sources`
277
+ */
278
+ getSources(input: ArticlesGetSourcesInput, init?: RequestOptions): Promise<ArticlesGetSourcesOutput>;
279
+ /**
280
+ * Restore an earlier version
281
+ *
282
+ * `POST /api/articles/{articleId}/versions/{version}/restore`
283
+ */
284
+ restoreVersion(input: ArticlesRestoreVersionInput, init?: RequestOptions): Promise<ArticlesRestoreVersionOutput>;
285
+ /**
286
+ * List comments on an article
287
+ *
288
+ * `GET /api/articles/{articleId}/comments`
289
+ */
290
+ listComments(input: ArticlesListCommentsInput, init?: RequestOptions): Promise<ArticlesListCommentsOutput>;
291
+ /**
292
+ * Comment on an article
293
+ *
294
+ * `POST /api/articles/{articleId}/comments`
295
+ */
296
+ addComment(input: ArticlesAddCommentInput, init?: RequestOptions): Promise<ArticlesAddCommentOutput>;
297
+ /**
298
+ * Resolve a comment
299
+ *
300
+ * `POST /api/articles/{articleId}/comments/{commentId}/resolve`
301
+ */
302
+ resolveComment(input: ArticlesResolveCommentInput, init?: RequestOptions): Promise<ArticlesResolveCommentOutput>;
303
+ /**
304
+ * Reopen a resolved comment
305
+ *
306
+ * `POST /api/articles/{articleId}/comments/{commentId}/reopen`
307
+ */
308
+ reopenComment(input: ArticlesReopenCommentInput, init?: RequestOptions): Promise<ArticlesReopenCommentOutput>;
309
+ /**
310
+ * Check a title for a possible duplicate before creating an article
311
+ *
312
+ * `GET /api/projects/{projectId}/duplicate-check`
313
+ */
314
+ checkDuplicates(input: ArticlesCheckDuplicatesInput, init?: RequestOptions): Promise<ArticlesCheckDuplicatesOutput>;
315
+ /**
316
+ * Replace the hero image with a picture from a URL
317
+ *
318
+ * `POST /api/articles/{articleId}/hero`
319
+ */
320
+ setHeroFromUrl(input: ArticlesSetHeroFromUrlInput, init?: RequestOptions): Promise<ArticlesSetHeroFromUrlOutput>;
321
+ /**
322
+ * Replace the hero image with an uploaded file
323
+ *
324
+ * `PUT /api/articles/{articleId}/hero/file`
325
+ *
326
+ * `body` is the raw file; `contentType` is sent as the Content-Type header and picks how the server reads it.
327
+ */
328
+ setHeroFromFile(input: ArticlesSetHeroFromFileInput, init?: RequestOptions): Promise<ArticlesSetHeroFromFileOutput>;
329
+ /**
330
+ * Take the hero image out of the article body
331
+ *
332
+ * `POST /api/articles/{articleId}/hero/detach-from-body`
333
+ */
334
+ detachHeroFromBody(input: ArticlesDetachHeroFromBodyInput, init?: RequestOptions): Promise<ArticlesDetachHeroFromBodyOutput>;
335
+ }
336
+ export type BillingListCreditPackagesOutput = operations["billing.listCreditPackages"]["responses"][200]["content"]["application/json"];
337
+ export type BillingGetCreditsInput = operations["billing.getCredits"]["parameters"]["path"];
338
+ export type BillingGetCreditsOutput = operations["billing.getCredits"]["responses"][200]["content"]["application/json"];
339
+ export type BillingAdjustCreditsInput = operations["billing.adjustCredits"]["parameters"]["path"] & {
340
+ body: NonNullable<operations["billing.adjustCredits"]["requestBody"]>["content"]["application/json"];
341
+ };
342
+ export type BillingAdjustCreditsOutput = operations["billing.adjustCredits"]["responses"][200]["content"]["application/json"];
343
+ export type BillingListPlansOutput = operations["billing.listPlans"]["responses"][200]["content"]["application/json"];
344
+ export type BillingGetSubscriptionInput = operations["billing.getSubscription"]["parameters"]["path"];
345
+ export type BillingGetSubscriptionOutput = operations["billing.getSubscription"]["responses"][200]["content"]["application/json"];
346
+ export type BillingStartSubscriptionCheckoutInput = operations["billing.startSubscriptionCheckout"]["parameters"]["path"] & {
347
+ body: NonNullable<operations["billing.startSubscriptionCheckout"]["requestBody"]>["content"]["application/json"];
348
+ };
349
+ export type BillingStartSubscriptionCheckoutOutput = operations["billing.startSubscriptionCheckout"]["responses"][201]["content"]["application/json"];
350
+ export type BillingOpenPortalInput = operations["billing.openPortal"]["parameters"]["path"] & {
351
+ body?: NonNullable<operations["billing.openPortal"]["requestBody"]>["content"]["application/json"];
352
+ };
353
+ export type BillingOpenPortalOutput = operations["billing.openPortal"]["responses"][200]["content"]["application/json"];
354
+ export type BillingStartCheckoutInput = operations["billing.startCheckout"]["parameters"]["path"] & {
355
+ body: NonNullable<operations["billing.startCheckout"]["requestBody"]>["content"]["application/json"];
356
+ };
357
+ export type BillingStartCheckoutOutput = operations["billing.startCheckout"]["responses"][201]["content"]["application/json"];
358
+ export declare class Billing {
359
+ private readonly client;
360
+ constructor(client: PrismDraftClient);
361
+ /**
362
+ * The credit packs on sale
363
+ *
364
+ * `GET /api/credit-packages`
365
+ */
366
+ listCreditPackages(init?: RequestOptions): Promise<BillingListCreditPackagesOutput>;
367
+ /**
368
+ * Wallet balance, reserved and available
369
+ *
370
+ * `GET /api/workspaces/{workspaceId}/credits`
371
+ */
372
+ getCredits(input: BillingGetCreditsInput, init?: RequestOptions): Promise<BillingGetCreditsOutput>;
373
+ /**
374
+ * Adjust a wallet by hand
375
+ *
376
+ * `POST /api/workspaces/{workspaceId}/credits/adjust`
377
+ */
378
+ adjustCredits(input: BillingAdjustCreditsInput, init?: RequestOptions): Promise<BillingAdjustCreditsOutput>;
379
+ /**
380
+ * The plans on offer
381
+ *
382
+ * `GET /api/plans`
383
+ */
384
+ listPlans(init?: RequestOptions): Promise<BillingListPlansOutput>;
385
+ /**
386
+ * The plan in force, the subscription, and its invoices
387
+ *
388
+ * `GET /api/workspaces/{workspaceId}/subscription`
389
+ */
390
+ getSubscription(input: BillingGetSubscriptionInput, init?: RequestOptions): Promise<BillingGetSubscriptionOutput>;
391
+ /**
392
+ * Start a Stripe checkout for a plan
393
+ *
394
+ * `POST /api/workspaces/{workspaceId}/subscription/checkout`
395
+ */
396
+ startSubscriptionCheckout(input: BillingStartSubscriptionCheckoutInput, init?: RequestOptions): Promise<BillingStartSubscriptionCheckoutOutput>;
397
+ /**
398
+ * Open the Stripe billing portal
399
+ *
400
+ * `POST /api/workspaces/{workspaceId}/subscription/portal`
401
+ */
402
+ openPortal(input: BillingOpenPortalInput, init?: RequestOptions): Promise<BillingOpenPortalOutput>;
403
+ /**
404
+ * Start a Stripe checkout for a credit pack
405
+ *
406
+ * `POST /api/workspaces/{workspaceId}/checkout`
407
+ */
408
+ startCheckout(input: BillingStartCheckoutInput, init?: RequestOptions): Promise<BillingStartCheckoutOutput>;
409
+ }
410
+ export type BlogListPostsInput = NonNullable<operations["blog.listPosts"]["parameters"]["query"]>;
411
+ export type BlogListPostsOutput = operations["blog.listPosts"]["responses"][200]["content"]["application/json"];
412
+ export type BlogListCategoriesInput = NonNullable<operations["blog.listCategories"]["parameters"]["query"]>;
413
+ export type BlogListCategoriesOutput = operations["blog.listCategories"]["responses"][200]["content"]["application/json"];
414
+ export type BlogGetPostInput = operations["blog.getPost"]["parameters"]["path"] & NonNullable<operations["blog.getPost"]["parameters"]["query"]>;
415
+ export type BlogGetPostOutput = operations["blog.getPost"]["responses"][200]["content"]["application/json"];
416
+ export type BlogGetPostEditInput = operations["blog.getPostEdit"]["parameters"]["path"] & NonNullable<operations["blog.getPostEdit"]["parameters"]["query"]>;
417
+ export type BlogGetPostEditOutput = operations["blog.getPostEdit"]["responses"][200]["content"]["application/json"];
418
+ export declare class Blog {
419
+ private readonly client;
420
+ constructor(client: PrismDraftClient);
421
+ /**
422
+ * The blog's published posts in one language
423
+ *
424
+ * `GET /api/blog/posts`
425
+ */
426
+ listPosts(input: BlogListPostsInput, init?: RequestOptions): Promise<BlogListPostsOutput>;
427
+ /**
428
+ * The categories that have published posts, in one language
429
+ *
430
+ * `GET /api/blog/categories`
431
+ */
432
+ listCategories(input: BlogListCategoriesInput, init?: RequestOptions): Promise<BlogListCategoriesOutput>;
433
+ /**
434
+ * One published post
435
+ *
436
+ * `GET /api/blog/posts/{slug}`
437
+ */
438
+ getPost(input: BlogGetPostInput, init?: RequestOptions): Promise<BlogGetPostOutput>;
439
+ /**
440
+ * Where the caller can edit a published post
441
+ *
442
+ * `GET /api/blog/posts/{slug}/edit`
443
+ */
444
+ getPostEdit(input: BlogGetPostEditInput, init?: RequestOptions): Promise<BlogGetPostEditOutput>;
445
+ }
446
+ export type BrandVoicesListInput = operations["brandVoices.list"]["parameters"]["path"] & NonNullable<operations["brandVoices.list"]["parameters"]["query"]>;
447
+ export type BrandVoicesListOutput = operations["brandVoices.list"]["responses"][200]["content"]["application/json"];
448
+ export type BrandVoicesCreateInput = operations["brandVoices.create"]["parameters"]["path"] & {
449
+ body: NonNullable<operations["brandVoices.create"]["requestBody"]>["content"]["application/json"];
450
+ };
451
+ export type BrandVoicesCreateOutput = operations["brandVoices.create"]["responses"][201]["content"]["application/json"];
452
+ export type BrandVoicesUpdateInput = operations["brandVoices.update"]["parameters"]["path"] & {
453
+ body?: NonNullable<operations["brandVoices.update"]["requestBody"]>["content"]["application/json"];
454
+ };
455
+ export type BrandVoicesUpdateOutput = operations["brandVoices.update"]["responses"][200]["content"]["application/json"];
456
+ export type BrandVoicesDeleteInput = operations["brandVoices.delete"]["parameters"]["path"];
457
+ export type BrandVoicesDeleteOutput = operations["brandVoices.delete"]["responses"][200]["content"]["application/json"];
458
+ export declare class BrandVoices {
459
+ private readonly client;
460
+ constructor(client: PrismDraftClient);
461
+ /**
462
+ * List brand voices
463
+ *
464
+ * `GET /api/workspaces/{workspaceId}/brand-voices`
465
+ */
466
+ list(input: BrandVoicesListInput, init?: RequestOptions): Promise<BrandVoicesListOutput>;
467
+ /**
468
+ * Create a brand voice
469
+ *
470
+ * `POST /api/workspaces/{workspaceId}/brand-voices`
471
+ */
472
+ create(input: BrandVoicesCreateInput, init?: RequestOptions): Promise<BrandVoicesCreateOutput>;
473
+ /**
474
+ * Update a brand voice
475
+ *
476
+ * `PATCH /api/workspaces/{workspaceId}/brand-voices/{voiceId}`
477
+ */
478
+ update(input: BrandVoicesUpdateInput, init?: RequestOptions): Promise<BrandVoicesUpdateOutput>;
479
+ /**
480
+ * Delete a brand voice
481
+ *
482
+ * `DELETE /api/workspaces/{workspaceId}/brand-voices/{voiceId}`
483
+ */
484
+ delete(input: BrandVoicesDeleteInput, init?: RequestOptions): Promise<BrandVoicesDeleteOutput>;
485
+ }
486
+ export type BriefsDraftInput = operations["briefs.draft"]["parameters"]["path"] & {
487
+ body: NonNullable<operations["briefs.draft"]["requestBody"]>["content"]["application/json"];
488
+ };
489
+ export type BriefsDraftOutput = operations["briefs.draft"]["responses"][200]["content"]["application/json"];
490
+ export type BriefsListInput = operations["briefs.list"]["parameters"]["path"];
491
+ export type BriefsListOutput = operations["briefs.list"]["responses"][200]["content"]["application/json"];
492
+ export type BriefsCreateInput = operations["briefs.create"]["parameters"]["path"] & {
493
+ body: NonNullable<operations["briefs.create"]["requestBody"]>["content"]["application/json"];
494
+ };
495
+ export type BriefsCreateOutput = operations["briefs.create"]["responses"][201]["content"]["application/json"];
496
+ export type BriefsGetInput = operations["briefs.get"]["parameters"]["path"];
497
+ export type BriefsGetOutput = operations["briefs.get"]["responses"][200]["content"]["application/json"];
498
+ export type BriefsUpdateInput = operations["briefs.update"]["parameters"]["path"] & {
499
+ body?: NonNullable<operations["briefs.update"]["requestBody"]>["content"]["application/json"];
500
+ };
501
+ export type BriefsUpdateOutput = operations["briefs.update"]["responses"][200]["content"]["application/json"];
502
+ export type BriefsDeleteInput = operations["briefs.delete"]["parameters"]["path"];
503
+ export type BriefsDeleteOutput = operations["briefs.delete"]["responses"][200]["content"]["application/json"];
504
+ export declare class Briefs {
505
+ private readonly client;
506
+ constructor(client: PrismDraftClient);
507
+ /**
508
+ * Draft a content brief
509
+ *
510
+ * `POST /api/projects/{projectId}/brief`
511
+ */
512
+ draft(input: BriefsDraftInput, init?: RequestOptions): Promise<BriefsDraftOutput>;
513
+ /**
514
+ * List a project's stored briefs
515
+ *
516
+ * `GET /api/projects/{projectId}/briefs`
517
+ */
518
+ list(input: BriefsListInput, init?: RequestOptions): Promise<BriefsListOutput>;
519
+ /**
520
+ * Store a content brief
521
+ *
522
+ * `POST /api/projects/{projectId}/briefs`
523
+ */
524
+ create(input: BriefsCreateInput, init?: RequestOptions): Promise<BriefsCreateOutput>;
525
+ /**
526
+ * Read a stored brief
527
+ *
528
+ * `GET /api/briefs/{briefId}`
529
+ */
530
+ get(input: BriefsGetInput, init?: RequestOptions): Promise<BriefsGetOutput>;
531
+ /**
532
+ * Update a stored brief
533
+ *
534
+ * `PATCH /api/briefs/{briefId}`
535
+ */
536
+ update(input: BriefsUpdateInput, init?: RequestOptions): Promise<BriefsUpdateOutput>;
537
+ /**
538
+ * Delete a stored brief
539
+ *
540
+ * `DELETE /api/briefs/{briefId}`
541
+ */
542
+ delete(input: BriefsDeleteInput, init?: RequestOptions): Promise<BriefsDeleteOutput>;
543
+ }
544
+ export type CalendarListInput = operations["calendar.list"]["parameters"]["path"] & NonNullable<operations["calendar.list"]["parameters"]["query"]>;
545
+ export type CalendarListOutput = operations["calendar.list"]["responses"][200]["content"]["application/json"];
546
+ export type CalendarCreateInput = operations["calendar.create"]["parameters"]["path"] & {
547
+ body: NonNullable<operations["calendar.create"]["requestBody"]>["content"]["application/json"];
548
+ };
549
+ export type CalendarCreateOutput = operations["calendar.create"]["responses"][201]["content"]["application/json"];
550
+ export type CalendarUpdateInput = operations["calendar.update"]["parameters"]["path"] & {
551
+ body?: NonNullable<operations["calendar.update"]["requestBody"]>["content"]["application/json"];
552
+ };
553
+ export type CalendarUpdateOutput = operations["calendar.update"]["responses"][200]["content"]["application/json"];
554
+ export type CalendarDeleteInput = operations["calendar.delete"]["parameters"]["path"];
555
+ export type CalendarDeleteOutput = operations["calendar.delete"]["responses"][200]["content"]["application/json"];
556
+ export declare class Calendar {
557
+ private readonly client;
558
+ constructor(client: PrismDraftClient);
559
+ /**
560
+ * The content calendar over a date range
561
+ *
562
+ * `GET /api/workspaces/{workspaceId}/calendar`
563
+ */
564
+ list(input: CalendarListInput, init?: RequestOptions): Promise<CalendarListOutput>;
565
+ /**
566
+ * Add a calendar item
567
+ *
568
+ * `POST /api/workspaces/{workspaceId}/calendar`
569
+ */
570
+ create(input: CalendarCreateInput, init?: RequestOptions): Promise<CalendarCreateOutput>;
571
+ /**
572
+ * Update a calendar item
573
+ *
574
+ * `PATCH /api/workspaces/{workspaceId}/calendar/{itemId}`
575
+ */
576
+ update(input: CalendarUpdateInput, init?: RequestOptions): Promise<CalendarUpdateOutput>;
577
+ /**
578
+ * Remove a calendar item
579
+ *
580
+ * `DELETE /api/workspaces/{workspaceId}/calendar/{itemId}`
581
+ */
582
+ delete(input: CalendarDeleteInput, init?: RequestOptions): Promise<CalendarDeleteOutput>;
583
+ }
584
+ export type CategoriesListInput = operations["categories.list"]["parameters"]["path"];
585
+ export type CategoriesListOutput = operations["categories.list"]["responses"][200]["content"]["application/json"];
586
+ export type CategoriesCreateInput = operations["categories.create"]["parameters"]["path"] & {
587
+ body: NonNullable<operations["categories.create"]["requestBody"]>["content"]["application/json"];
588
+ };
589
+ export type CategoriesCreateOutput = operations["categories.create"]["responses"][201]["content"]["application/json"];
590
+ export type CategoriesUpdateInput = operations["categories.update"]["parameters"]["path"] & {
591
+ body?: NonNullable<operations["categories.update"]["requestBody"]>["content"]["application/json"];
592
+ };
593
+ export type CategoriesUpdateOutput = operations["categories.update"]["responses"][200]["content"]["application/json"];
594
+ export type CategoriesDeleteInput = operations["categories.delete"]["parameters"]["path"];
595
+ export type CategoriesDeleteOutput = operations["categories.delete"]["responses"][200]["content"]["application/json"];
596
+ export type CategoriesSetForArticleInput = operations["categories.setForArticle"]["parameters"]["path"] & {
597
+ body: NonNullable<operations["categories.setForArticle"]["requestBody"]>["content"]["application/json"];
598
+ };
599
+ export type CategoriesSetForArticleOutput = operations["categories.setForArticle"]["responses"][200]["content"]["application/json"];
600
+ export type CategoriesSuggestForArticleInput = operations["categories.suggestForArticle"]["parameters"]["path"];
601
+ export type CategoriesSuggestForArticleOutput = operations["categories.suggestForArticle"]["responses"][200]["content"]["application/json"];
602
+ export type CategoriesSuggestForProjectInput = operations["categories.suggestForProject"]["parameters"]["path"];
603
+ export type CategoriesSuggestForProjectOutput = operations["categories.suggestForProject"]["responses"][200]["content"]["application/json"];
604
+ export type CategoriesTranslateInput = operations["categories.translate"]["parameters"]["path"] & {
605
+ body: NonNullable<operations["categories.translate"]["requestBody"]>["content"]["application/json"];
606
+ };
607
+ export type CategoriesTranslateOutput = operations["categories.translate"]["responses"][200]["content"]["application/json"];
608
+ export declare class Categories {
609
+ private readonly client;
610
+ constructor(client: PrismDraftClient);
611
+ /**
612
+ * List categories
613
+ *
614
+ * `GET /api/workspaces/{workspaceId}/categories`
615
+ */
616
+ list(input: CategoriesListInput, init?: RequestOptions): Promise<CategoriesListOutput>;
617
+ /**
618
+ * Create a category
619
+ *
620
+ * `POST /api/workspaces/{workspaceId}/categories`
621
+ */
622
+ create(input: CategoriesCreateInput, init?: RequestOptions): Promise<CategoriesCreateOutput>;
623
+ /**
624
+ * Rename a category, add or remove a language
625
+ *
626
+ * `PATCH /api/workspaces/{workspaceId}/categories/{categoryId}`
627
+ */
628
+ update(input: CategoriesUpdateInput, init?: RequestOptions): Promise<CategoriesUpdateOutput>;
629
+ /**
630
+ * Delete a category
631
+ *
632
+ * `DELETE /api/workspaces/{workspaceId}/categories/{categoryId}`
633
+ */
634
+ delete(input: CategoriesDeleteInput, init?: RequestOptions): Promise<CategoriesDeleteOutput>;
635
+ /**
636
+ * Set an article's categories
637
+ *
638
+ * `PUT /api/articles/{articleId}/categories`
639
+ */
640
+ setForArticle(input: CategoriesSetForArticleInput, init?: RequestOptions): Promise<CategoriesSetForArticleOutput>;
641
+ /**
642
+ * Suggest categories for an article
643
+ *
644
+ * `POST /api/articles/{articleId}/categories/suggest`
645
+ */
646
+ suggestForArticle(input: CategoriesSuggestForArticleInput, init?: RequestOptions): Promise<CategoriesSuggestForArticleOutput>;
647
+ /**
648
+ * Suggest a starter set of categories for a project
649
+ *
650
+ * `POST /api/projects/{projectId}/categories/suggest`
651
+ */
652
+ suggestForProject(input: CategoriesSuggestForProjectInput, init?: RequestOptions): Promise<CategoriesSuggestForProjectOutput>;
653
+ /**
654
+ * Suggest names for a category in other languages
655
+ *
656
+ * `POST /api/workspaces/{workspaceId}/categories/{categoryId}/translate`
657
+ */
658
+ translate(input: CategoriesTranslateInput, init?: RequestOptions): Promise<CategoriesTranslateOutput>;
659
+ }
660
+ export type ContentTemplatesListInput = operations["contentTemplates.list"]["parameters"]["path"];
661
+ export type ContentTemplatesListOutput = operations["contentTemplates.list"]["responses"][200]["content"]["application/json"];
662
+ export type ContentTemplatesCreateInput = operations["contentTemplates.create"]["parameters"]["path"] & {
663
+ body: NonNullable<operations["contentTemplates.create"]["requestBody"]>["content"]["application/json"];
664
+ };
665
+ export type ContentTemplatesCreateOutput = operations["contentTemplates.create"]["responses"][201]["content"]["application/json"];
666
+ export type ContentTemplatesUpdateInput = operations["contentTemplates.update"]["parameters"]["path"] & {
667
+ body?: NonNullable<operations["contentTemplates.update"]["requestBody"]>["content"]["application/json"];
668
+ };
669
+ export type ContentTemplatesUpdateOutput = operations["contentTemplates.update"]["responses"][200]["content"]["application/json"];
670
+ export type ContentTemplatesDeleteInput = operations["contentTemplates.delete"]["parameters"]["path"];
671
+ export type ContentTemplatesDeleteOutput = operations["contentTemplates.delete"]["responses"][200]["content"]["application/json"];
672
+ export declare class ContentTemplates {
673
+ private readonly client;
674
+ constructor(client: PrismDraftClient);
675
+ /**
676
+ * List the content templates available to a workspace
677
+ *
678
+ * `GET /api/workspaces/{workspaceId}/content-templates`
679
+ */
680
+ list(input: ContentTemplatesListInput, init?: RequestOptions): Promise<ContentTemplatesListOutput>;
681
+ /**
682
+ * Create a workspace content template
683
+ *
684
+ * `POST /api/workspaces/{workspaceId}/content-templates`
685
+ */
686
+ create(input: ContentTemplatesCreateInput, init?: RequestOptions): Promise<ContentTemplatesCreateOutput>;
687
+ /**
688
+ * Update a workspace content template
689
+ *
690
+ * `PATCH /api/workspaces/{workspaceId}/content-templates/{templateId}`
691
+ */
692
+ update(input: ContentTemplatesUpdateInput, init?: RequestOptions): Promise<ContentTemplatesUpdateOutput>;
693
+ /**
694
+ * Delete a workspace content template
695
+ *
696
+ * `DELETE /api/workspaces/{workspaceId}/content-templates/{templateId}`
697
+ */
698
+ delete(input: ContentTemplatesDeleteInput, init?: RequestOptions): Promise<ContentTemplatesDeleteOutput>;
699
+ }
700
+ export type DashboardGetAnalyticsInput = operations["dashboard.getAnalytics"]["parameters"]["path"] & NonNullable<operations["dashboard.getAnalytics"]["parameters"]["query"]>;
701
+ export type DashboardGetAnalyticsOutput = operations["dashboard.getAnalytics"]["responses"][200]["content"]["application/json"];
702
+ export type DashboardGetTrendsInput = operations["dashboard.getTrends"]["parameters"]["path"] & NonNullable<operations["dashboard.getTrends"]["parameters"]["query"]>;
703
+ export type DashboardGetTrendsOutput = operations["dashboard.getTrends"]["responses"][200]["content"]["application/json"];
704
+ export type DashboardGetArticleCountsInput = operations["dashboard.getArticleCounts"]["parameters"]["path"];
705
+ export type DashboardGetArticleCountsOutput = operations["dashboard.getArticleCounts"]["responses"][200]["content"]["application/json"];
706
+ export type DashboardListJobsInput = operations["dashboard.listJobs"]["parameters"]["path"] & NonNullable<operations["dashboard.listJobs"]["parameters"]["query"]>;
707
+ export type DashboardListJobsOutput = operations["dashboard.listJobs"]["responses"][200]["content"]["application/json"];
708
+ export type DashboardListAuditInput = operations["dashboard.listAudit"]["parameters"]["path"] & NonNullable<operations["dashboard.listAudit"]["parameters"]["query"]>;
709
+ export type DashboardListAuditOutput = operations["dashboard.listAudit"]["responses"][200]["content"]["application/json"];
710
+ export type DashboardGetCreditBurnInput = operations["dashboard.getCreditBurn"]["parameters"]["path"] & NonNullable<operations["dashboard.getCreditBurn"]["parameters"]["query"]>;
711
+ export type DashboardGetCreditBurnOutput = operations["dashboard.getCreditBurn"]["responses"][200]["content"]["application/json"];
712
+ export declare class Dashboard {
713
+ private readonly client;
714
+ constructor(client: PrismDraftClient);
715
+ /**
716
+ * Generation and publishing aggregates over a window
717
+ *
718
+ * `GET /api/workspaces/{workspaceId}/analytics`
719
+ */
720
+ getAnalytics(input: DashboardGetAnalyticsInput, init?: RequestOptions): Promise<DashboardGetAnalyticsOutput>;
721
+ /**
722
+ * Credits used and articles created or published, per day or week
723
+ *
724
+ * `GET /api/workspaces/{workspaceId}/trends`
725
+ */
726
+ getTrends(input: DashboardGetTrendsInput, init?: RequestOptions): Promise<DashboardGetTrendsOutput>;
727
+ /**
728
+ * Article counts by status
729
+ *
730
+ * `GET /api/workspaces/{workspaceId}/article-counts`
731
+ */
732
+ getArticleCounts(input: DashboardGetArticleCountsInput, init?: RequestOptions): Promise<DashboardGetArticleCountsOutput>;
733
+ /**
734
+ * Running jobs, and those that failed recently
735
+ *
736
+ * `GET /api/workspaces/{workspaceId}/jobs`
737
+ */
738
+ listJobs(input: DashboardListJobsInput, init?: RequestOptions): Promise<DashboardListJobsOutput>;
739
+ /**
740
+ * Audit trail entries, filtered and paged
741
+ *
742
+ * `GET /api/workspaces/{workspaceId}/audit`
743
+ */
744
+ listAudit(input: DashboardListAuditInput, init?: RequestOptions): Promise<DashboardListAuditOutput>;
745
+ /**
746
+ * Credit consumption over recent days
747
+ *
748
+ * `GET /api/workspaces/{workspaceId}/credit-burn`
749
+ */
750
+ getCreditBurn(input: DashboardGetCreditBurnInput, init?: RequestOptions): Promise<DashboardGetCreditBurnOutput>;
751
+ }
752
+ export type GenerationEstimateInput = operations["generation.estimate"]["parameters"]["path"];
753
+ export type GenerationEstimateOutput = operations["generation.estimate"]["responses"][200]["content"]["application/json"];
754
+ export type GenerationGetOutlineInput = operations["generation.getOutline"]["parameters"]["path"];
755
+ export type GenerationGetOutlineOutput = operations["generation.getOutline"]["responses"][200]["content"]["application/json"];
756
+ export type GenerationApproveOutlineInput = operations["generation.approveOutline"]["parameters"]["path"] & {
757
+ body?: NonNullable<operations["generation.approveOutline"]["requestBody"]>["content"]["application/json"];
758
+ };
759
+ export type GenerationApproveOutlineOutput = operations["generation.approveOutline"]["responses"][200]["content"]["application/json"];
760
+ export type GenerationAiEditInput = operations["generation.aiEdit"]["parameters"]["path"] & {
761
+ body: NonNullable<operations["generation.aiEdit"]["requestBody"]>["content"]["application/json"];
762
+ };
763
+ export type GenerationAiEditOutput = operations["generation.aiEdit"]["responses"][200]["content"]["application/json"];
764
+ export type GenerationStartInput = operations["generation.start"]["parameters"]["path"] & {
765
+ body?: NonNullable<operations["generation.start"]["requestBody"]>["content"]["application/json"];
766
+ };
767
+ export type GenerationStartOutput = operations["generation.start"]["responses"][200]["content"]["application/json"];
768
+ export type GenerationGetStatusInput = operations["generation.getStatus"]["parameters"]["path"];
769
+ export type GenerationGetStatusOutput = operations["generation.getStatus"]["responses"][200]["content"]["application/json"];
770
+ export type GenerationCancelInput = operations["generation.cancel"]["parameters"]["path"];
771
+ export type GenerationCancelOutput = operations["generation.cancel"]["responses"][200]["content"]["application/json"];
772
+ export type GenerationRegenerateImageInput = operations["generation.regenerateImage"]["parameters"]["path"] & {
773
+ body: NonNullable<operations["generation.regenerateImage"]["requestBody"]>["content"]["application/json"];
774
+ };
775
+ export type GenerationRegenerateImageOutput = operations["generation.regenerateImage"]["responses"][202]["content"]["application/json"];
776
+ export type GenerationUpdateAssetInput = operations["generation.updateAsset"]["parameters"]["path"] & {
777
+ body?: NonNullable<operations["generation.updateAsset"]["requestBody"]>["content"]["application/json"];
778
+ };
779
+ export type GenerationUpdateAssetOutput = operations["generation.updateAsset"]["responses"][200]["content"]["application/json"];
780
+ export type GenerationDeleteAssetInput = operations["generation.deleteAsset"]["parameters"]["path"];
781
+ export type GenerationDeleteAssetOutput = operations["generation.deleteAsset"]["responses"][200]["content"]["application/json"];
782
+ export declare class Generation {
783
+ private readonly client;
784
+ constructor(client: PrismDraftClient);
785
+ /**
786
+ * Quote the credit cost of generating this article
787
+ *
788
+ * `GET /api/articles/{articleId}/estimate`
789
+ */
790
+ estimate(input: GenerationEstimateInput, init?: RequestOptions): Promise<GenerationEstimateOutput>;
791
+ /**
792
+ * The outline awaiting review
793
+ *
794
+ * `GET /api/articles/{articleId}/outline`
795
+ */
796
+ getOutline(input: GenerationGetOutlineInput, init?: RequestOptions): Promise<GenerationGetOutlineOutput>;
797
+ /**
798
+ * Approve an outline and resume writing
799
+ *
800
+ * `POST /api/articles/{articleId}/outline/approve`
801
+ */
802
+ approveOutline(input: GenerationApproveOutlineInput, init?: RequestOptions): Promise<GenerationApproveOutlineOutput>;
803
+ /**
804
+ * Expand, shorten, rewrite, simplify or change the tone of a passage
805
+ *
806
+ * `POST /api/articles/{articleId}/ai-edit`
807
+ */
808
+ aiEdit(input: GenerationAiEditInput, init?: RequestOptions): Promise<GenerationAiEditOutput>;
809
+ /**
810
+ * Start generating an article
811
+ *
812
+ * `POST /api/articles/{articleId}/generate`
813
+ */
814
+ start(input: GenerationStartInput, init?: RequestOptions): Promise<GenerationStartOutput>;
815
+ /**
816
+ * Generation progress for an article
817
+ *
818
+ * `GET /api/articles/{articleId}/status`
819
+ */
820
+ getStatus(input: GenerationGetStatusInput, init?: RequestOptions): Promise<GenerationGetStatusOutput>;
821
+ /**
822
+ * Cancel a running generation
823
+ *
824
+ * `POST /api/articles/{articleId}/cancel`
825
+ */
826
+ cancel(input: GenerationCancelInput, init?: RequestOptions): Promise<GenerationCancelOutput>;
827
+ /**
828
+ * Regenerate an image, optionally with a new prompt or style
829
+ *
830
+ * `POST /api/articles/{articleId}/regenerate-image`
831
+ */
832
+ regenerateImage(input: GenerationRegenerateImageInput, init?: RequestOptions): Promise<GenerationRegenerateImageOutput>;
833
+ /**
834
+ * Edit an image's alt text, or make it the hero or an inline image
835
+ *
836
+ * `PATCH /api/articles/{articleId}/assets/{assetId}`
837
+ */
838
+ updateAsset(input: GenerationUpdateAssetInput, init?: RequestOptions): Promise<GenerationUpdateAssetOutput>;
839
+ /**
840
+ * Delete an image
841
+ *
842
+ * `DELETE /api/articles/{articleId}/assets/{assetId}`
843
+ */
844
+ deleteAsset(input: GenerationDeleteAssetInput, init?: RequestOptions): Promise<GenerationDeleteAssetOutput>;
845
+ }
846
+ export type IdeasListInput = operations["ideas.list"]["parameters"]["path"] & NonNullable<operations["ideas.list"]["parameters"]["query"]>;
847
+ export type IdeasListOutput = operations["ideas.list"]["responses"][200]["content"]["application/json"];
848
+ export type IdeasCreateInput = operations["ideas.create"]["parameters"]["path"] & {
849
+ body: NonNullable<operations["ideas.create"]["requestBody"]>["content"]["application/json"];
850
+ };
851
+ export type IdeasCreateOutput = operations["ideas.create"]["responses"][201]["content"]["application/json"];
852
+ export type IdeasUpdateInput = operations["ideas.update"]["parameters"]["path"] & {
853
+ body?: NonNullable<operations["ideas.update"]["requestBody"]>["content"]["application/json"];
854
+ };
855
+ export type IdeasUpdateOutput = operations["ideas.update"]["responses"][200]["content"]["application/json"];
856
+ export type IdeasDeleteInput = operations["ideas.delete"]["parameters"]["path"];
857
+ export type IdeasDeleteOutput = operations["ideas.delete"]["responses"][200]["content"]["application/json"];
858
+ export type IdeasGenerateInput = operations["ideas.generate"]["parameters"]["path"];
859
+ export type IdeasGenerateOutput = operations["ideas.generate"]["responses"][201]["content"]["application/json"];
860
+ export declare class Ideas {
861
+ private readonly client;
862
+ constructor(client: PrismDraftClient);
863
+ /**
864
+ * List content ideas
865
+ *
866
+ * `GET /api/workspaces/{workspaceId}/ideas`
867
+ */
868
+ list(input: IdeasListInput, init?: RequestOptions): Promise<IdeasListOutput>;
869
+ /**
870
+ * Create a content idea
871
+ *
872
+ * `POST /api/workspaces/{workspaceId}/ideas`
873
+ */
874
+ create(input: IdeasCreateInput, init?: RequestOptions): Promise<IdeasCreateOutput>;
875
+ /**
876
+ * Update a content idea
877
+ *
878
+ * `PATCH /api/workspaces/{workspaceId}/ideas/{ideaId}`
879
+ */
880
+ update(input: IdeasUpdateInput, init?: RequestOptions): Promise<IdeasUpdateOutput>;
881
+ /**
882
+ * Delete a content idea
883
+ *
884
+ * `DELETE /api/workspaces/{workspaceId}/ideas/{ideaId}`
885
+ */
886
+ delete(input: IdeasDeleteInput, init?: RequestOptions): Promise<IdeasDeleteOutput>;
887
+ /**
888
+ * Suggest content ideas for a project
889
+ *
890
+ * `POST /api/projects/{projectId}/ideas/generate`
891
+ */
892
+ generate(input: IdeasGenerateInput, init?: RequestOptions): Promise<IdeasGenerateOutput>;
893
+ }
894
+ export type IntegrationsListInput = operations["integrations.list"]["parameters"]["path"];
895
+ export type IntegrationsListOutput = operations["integrations.list"]["responses"][200]["content"]["application/json"];
896
+ export type IntegrationsCreateInput = operations["integrations.create"]["parameters"]["path"] & {
897
+ body: NonNullable<operations["integrations.create"]["requestBody"]>["content"]["application/json"];
898
+ };
899
+ export type IntegrationsCreateOutput = operations["integrations.create"]["responses"][201]["content"]["application/json"];
900
+ export type IntegrationsUpdateInput = operations["integrations.update"]["parameters"]["path"] & {
901
+ body?: NonNullable<operations["integrations.update"]["requestBody"]>["content"]["application/json"];
902
+ };
903
+ export type IntegrationsUpdateOutput = operations["integrations.update"]["responses"][200]["content"]["application/json"];
904
+ export type IntegrationsDeleteInput = operations["integrations.delete"]["parameters"]["path"];
905
+ export type IntegrationsDeleteOutput = operations["integrations.delete"]["responses"][200]["content"]["application/json"];
906
+ export declare class Integrations {
907
+ private readonly client;
908
+ constructor(client: PrismDraftClient);
909
+ /**
910
+ * List publishing integrations
911
+ *
912
+ * `GET /api/workspaces/{workspaceId}/integrations`
913
+ */
914
+ list(input: IntegrationsListInput, init?: RequestOptions): Promise<IntegrationsListOutput>;
915
+ /**
916
+ * Connect a publishing target
917
+ *
918
+ * `POST /api/workspaces/{workspaceId}/integrations`
919
+ */
920
+ create(input: IntegrationsCreateInput, init?: RequestOptions): Promise<IntegrationsCreateOutput>;
921
+ /**
922
+ * Update an integration
923
+ *
924
+ * `PATCH /api/workspaces/{workspaceId}/integrations/{integrationId}`
925
+ */
926
+ update(input: IntegrationsUpdateInput, init?: RequestOptions): Promise<IntegrationsUpdateOutput>;
927
+ /**
928
+ * Disconnect an integration
929
+ *
930
+ * `DELETE /api/workspaces/{workspaceId}/integrations/{integrationId}`
931
+ */
932
+ delete(input: IntegrationsDeleteInput, init?: RequestOptions): Promise<IntegrationsDeleteOutput>;
933
+ }
934
+ export type InvitationsListInput = operations["invitations.list"]["parameters"]["path"];
935
+ export type InvitationsListOutput = operations["invitations.list"]["responses"][200]["content"]["application/json"];
936
+ export type InvitationsRevokeInput = operations["invitations.revoke"]["parameters"]["path"];
937
+ export type InvitationsRevokeOutput = operations["invitations.revoke"]["responses"][200]["content"]["application/json"];
938
+ export type InvitationsResendInput = operations["invitations.resend"]["parameters"]["path"] & {
939
+ body?: NonNullable<operations["invitations.resend"]["requestBody"]>["content"]["application/json"];
940
+ };
941
+ export type InvitationsResendOutput = operations["invitations.resend"]["responses"][200]["content"]["application/json"];
942
+ export declare class Invitations {
943
+ private readonly client;
944
+ constructor(client: PrismDraftClient);
945
+ /**
946
+ * List a workspace's pending invitations
947
+ *
948
+ * `GET /api/workspaces/{workspaceId}/invitations`
949
+ */
950
+ list(input: InvitationsListInput, init?: RequestOptions): Promise<InvitationsListOutput>;
951
+ /**
952
+ * Revoke an invitation
953
+ *
954
+ * `DELETE /api/workspaces/{workspaceId}/invitations/{invitationId}`
955
+ */
956
+ revoke(input: InvitationsRevokeInput, init?: RequestOptions): Promise<InvitationsRevokeOutput>;
957
+ /**
958
+ * Send an invitation again
959
+ *
960
+ * `POST /api/workspaces/{workspaceId}/invitations/{invitationId}/resend`
961
+ */
962
+ resend(input: InvitationsResendInput, init?: RequestOptions): Promise<InvitationsResendOutput>;
963
+ }
964
+ export type KnowledgeListInput = operations["knowledge.list"]["parameters"]["path"];
965
+ export type KnowledgeListOutput = operations["knowledge.list"]["responses"][200]["content"]["application/json"];
966
+ export type KnowledgeCreateInput = operations["knowledge.create"]["parameters"]["path"] & {
967
+ body: NonNullable<operations["knowledge.create"]["requestBody"]>["content"]["application/json"];
968
+ };
969
+ export type KnowledgeCreateOutput = operations["knowledge.create"]["responses"][201]["content"]["application/json"];
970
+ export type KnowledgeUploadContentInput = operations["knowledge.uploadContent"]["parameters"]["path"] & {
971
+ body: Blob | ArrayBuffer | Uint8Array;
972
+ contentType: "application/pdf" | "application/vnd.openxmlformats-officedocument.wordprocessingml.document" | "text/plain" | "text/markdown";
973
+ };
974
+ export type KnowledgeUploadContentOutput = operations["knowledge.uploadContent"]["responses"][200]["content"]["application/json"];
975
+ export type KnowledgeReingestInput = operations["knowledge.reingest"]["parameters"]["path"];
976
+ export type KnowledgeReingestOutput = operations["knowledge.reingest"]["responses"][200]["content"]["application/json"];
977
+ export type KnowledgeDeleteInput = operations["knowledge.delete"]["parameters"]["path"];
978
+ export type KnowledgeDeleteOutput = operations["knowledge.delete"]["responses"][200]["content"]["application/json"];
979
+ export declare class Knowledge {
980
+ private readonly client;
981
+ constructor(client: PrismDraftClient);
982
+ /**
983
+ * List a project's knowledge sources
984
+ *
985
+ * `GET /api/workspaces/{workspaceId}/projects/{projectId}/knowledge`
986
+ */
987
+ list(input: KnowledgeListInput, init?: RequestOptions): Promise<KnowledgeListOutput>;
988
+ /**
989
+ * Register a knowledge source
990
+ *
991
+ * `POST /api/workspaces/{workspaceId}/projects/{projectId}/knowledge`
992
+ */
993
+ create(input: KnowledgeCreateInput, init?: RequestOptions): Promise<KnowledgeCreateOutput>;
994
+ /**
995
+ * Upload a knowledge source's bytes
996
+ *
997
+ * `PUT /api/workspaces/{workspaceId}/knowledge/{sourceId}/content`
998
+ *
999
+ * `body` is the raw file; `contentType` is sent as the Content-Type header and picks how the server reads it.
1000
+ */
1001
+ uploadContent(input: KnowledgeUploadContentInput, init?: RequestOptions): Promise<KnowledgeUploadContentOutput>;
1002
+ /**
1003
+ * Re-run ingestion for a knowledge source
1004
+ *
1005
+ * `POST /api/workspaces/{workspaceId}/knowledge/{sourceId}/reingest`
1006
+ */
1007
+ reingest(input: KnowledgeReingestInput, init?: RequestOptions): Promise<KnowledgeReingestOutput>;
1008
+ /**
1009
+ * Delete a knowledge source
1010
+ *
1011
+ * `DELETE /api/workspaces/{workspaceId}/knowledge/{sourceId}`
1012
+ */
1013
+ delete(input: KnowledgeDeleteInput, init?: RequestOptions): Promise<KnowledgeDeleteOutput>;
1014
+ }
1015
+ export type LinksListInput = operations["links.list"]["parameters"]["path"];
1016
+ export type LinksListOutput = operations["links.list"]["responses"][200]["content"]["application/json"];
1017
+ export type LinksGenerateInput = operations["links.generate"]["parameters"]["path"];
1018
+ export type LinksGenerateOutput = operations["links.generate"]["responses"][200]["content"]["application/json"];
1019
+ export type LinksDecideInput = operations["links.decide"]["parameters"]["path"] & {
1020
+ body: NonNullable<operations["links.decide"]["requestBody"]>["content"]["application/json"];
1021
+ };
1022
+ export type LinksDecideOutput = operations["links.decide"]["responses"][200]["content"]["application/json"];
1023
+ export declare class Links {
1024
+ private readonly client;
1025
+ constructor(client: PrismDraftClient);
1026
+ /**
1027
+ * Internal link suggestions for an article
1028
+ *
1029
+ * `GET /api/articles/{articleId}/links`
1030
+ */
1031
+ list(input: LinksListInput, init?: RequestOptions): Promise<LinksListOutput>;
1032
+ /**
1033
+ * Generate internal link suggestions
1034
+ *
1035
+ * `POST /api/articles/{articleId}/links`
1036
+ */
1037
+ generate(input: LinksGenerateInput, init?: RequestOptions): Promise<LinksGenerateOutput>;
1038
+ /**
1039
+ * Accept, edit or reject a link suggestion
1040
+ *
1041
+ * `POST /api/workspaces/{workspaceId}/links/{suggestionId}`
1042
+ */
1043
+ decide(input: LinksDecideInput, init?: RequestOptions): Promise<LinksDecideOutput>;
1044
+ }
1045
+ export type PermissionsListOutput = operations["permissions.list"]["responses"][200]["content"]["application/json"];
1046
+ export declare class Permissions {
1047
+ private readonly client;
1048
+ constructor(client: PrismDraftClient);
1049
+ /**
1050
+ * The catalog of permissions a role can grant
1051
+ *
1052
+ * `GET /api/permissions`
1053
+ */
1054
+ list(init?: RequestOptions): Promise<PermissionsListOutput>;
1055
+ }
1056
+ export type ProjectsListInput = operations["projects.list"]["parameters"]["path"] & NonNullable<operations["projects.list"]["parameters"]["query"]>;
1057
+ export type ProjectsListOutput = operations["projects.list"]["responses"][200]["content"]["application/json"];
1058
+ export type ProjectsCreateInput = operations["projects.create"]["parameters"]["path"] & {
1059
+ body: NonNullable<operations["projects.create"]["requestBody"]>["content"]["application/json"];
1060
+ };
1061
+ export type ProjectsCreateOutput = operations["projects.create"]["responses"][201]["content"]["application/json"];
1062
+ export type ProjectsGetInput = operations["projects.get"]["parameters"]["path"];
1063
+ export type ProjectsGetOutput = operations["projects.get"]["responses"][200]["content"]["application/json"];
1064
+ export type ProjectsUpdateInput = operations["projects.update"]["parameters"]["path"] & {
1065
+ body?: NonNullable<operations["projects.update"]["requestBody"]>["content"]["application/json"];
1066
+ };
1067
+ export type ProjectsUpdateOutput = operations["projects.update"]["responses"][200]["content"]["application/json"];
1068
+ export type ProjectsDeleteInput = operations["projects.delete"]["parameters"]["path"];
1069
+ export type ProjectsDeleteOutput = operations["projects.delete"]["responses"][200]["content"]["application/json"];
1070
+ export type ProjectsArchiveInput = operations["projects.archive"]["parameters"]["path"];
1071
+ export type ProjectsArchiveOutput = operations["projects.archive"]["responses"][200]["content"]["application/json"];
1072
+ export type ProjectsRestoreInput = operations["projects.restore"]["parameters"]["path"];
1073
+ export type ProjectsRestoreOutput = operations["projects.restore"]["responses"][200]["content"]["application/json"];
1074
+ export type ProjectsListMembersInput = operations["projects.listMembers"]["parameters"]["path"];
1075
+ export type ProjectsListMembersOutput = operations["projects.listMembers"]["responses"][200]["content"]["application/json"];
1076
+ export type ProjectsAddMemberInput = operations["projects.addMember"]["parameters"]["path"] & {
1077
+ body: NonNullable<operations["projects.addMember"]["requestBody"]>["content"]["application/json"];
1078
+ };
1079
+ export type ProjectsAddMemberOutput = operations["projects.addMember"]["responses"][201]["content"]["application/json"];
1080
+ export type ProjectsSetMemberRoleInput = operations["projects.setMemberRole"]["parameters"]["path"] & {
1081
+ body: NonNullable<operations["projects.setMemberRole"]["requestBody"]>["content"]["application/json"];
1082
+ };
1083
+ export type ProjectsSetMemberRoleOutput = operations["projects.setMemberRole"]["responses"][200]["content"]["application/json"];
1084
+ export type ProjectsRemoveMemberInput = operations["projects.removeMember"]["parameters"]["path"];
1085
+ export type ProjectsRemoveMemberOutput = operations["projects.removeMember"]["responses"][200]["content"]["application/json"];
1086
+ export declare class Projects {
1087
+ private readonly client;
1088
+ constructor(client: PrismDraftClient);
1089
+ /**
1090
+ * List a workspace's projects
1091
+ *
1092
+ * `GET /api/workspaces/{workspaceId}/projects`
1093
+ */
1094
+ list(input: ProjectsListInput, init?: RequestOptions): Promise<ProjectsListOutput>;
1095
+ /**
1096
+ * Create a project
1097
+ *
1098
+ * `POST /api/workspaces/{workspaceId}/projects`
1099
+ */
1100
+ create(input: ProjectsCreateInput, init?: RequestOptions): Promise<ProjectsCreateOutput>;
1101
+ /**
1102
+ * Read a project
1103
+ *
1104
+ * `GET /api/workspaces/{workspaceId}/projects/{projectId}`
1105
+ */
1106
+ get(input: ProjectsGetInput, init?: RequestOptions): Promise<ProjectsGetOutput>;
1107
+ /**
1108
+ * Update a project
1109
+ *
1110
+ * `PATCH /api/workspaces/{workspaceId}/projects/{projectId}`
1111
+ */
1112
+ update(input: ProjectsUpdateInput, init?: RequestOptions): Promise<ProjectsUpdateOutput>;
1113
+ /**
1114
+ * Delete a project
1115
+ *
1116
+ * `DELETE /api/workspaces/{workspaceId}/projects/{projectId}`
1117
+ */
1118
+ delete(input: ProjectsDeleteInput, init?: RequestOptions): Promise<ProjectsDeleteOutput>;
1119
+ /**
1120
+ * Archive a project
1121
+ *
1122
+ * `POST /api/workspaces/{workspaceId}/projects/{projectId}/archive`
1123
+ */
1124
+ archive(input: ProjectsArchiveInput, init?: RequestOptions): Promise<ProjectsArchiveOutput>;
1125
+ /**
1126
+ * Restore an archived project
1127
+ *
1128
+ * `POST /api/workspaces/{workspaceId}/projects/{projectId}/restore`
1129
+ */
1130
+ restore(input: ProjectsRestoreInput, init?: RequestOptions): Promise<ProjectsRestoreOutput>;
1131
+ /**
1132
+ * List a project's members
1133
+ *
1134
+ * `GET /api/workspaces/{workspaceId}/projects/{projectId}/members`
1135
+ */
1136
+ listMembers(input: ProjectsListMembersInput, init?: RequestOptions): Promise<ProjectsListMembersOutput>;
1137
+ /**
1138
+ * Add a member to a project
1139
+ *
1140
+ * `POST /api/workspaces/{workspaceId}/projects/{projectId}/members`
1141
+ */
1142
+ addMember(input: ProjectsAddMemberInput, init?: RequestOptions): Promise<ProjectsAddMemberOutput>;
1143
+ /**
1144
+ * Change a project member's role
1145
+ *
1146
+ * `PATCH /api/workspaces/{workspaceId}/projects/{projectId}/members/{projectMemberId}`
1147
+ */
1148
+ setMemberRole(input: ProjectsSetMemberRoleInput, init?: RequestOptions): Promise<ProjectsSetMemberRoleOutput>;
1149
+ /**
1150
+ * Remove a member from a project
1151
+ *
1152
+ * `DELETE /api/workspaces/{workspaceId}/projects/{projectId}/members/{projectMemberId}`
1153
+ */
1154
+ removeMember(input: ProjectsRemoveMemberInput, init?: RequestOptions): Promise<ProjectsRemoveMemberOutput>;
1155
+ }
1156
+ export type RolesListInput = operations["roles.list"]["parameters"]["path"];
1157
+ export type RolesListOutput = operations["roles.list"]["responses"][200]["content"]["application/json"];
1158
+ export type RolesCreateInput = operations["roles.create"]["parameters"]["path"] & {
1159
+ body: NonNullable<operations["roles.create"]["requestBody"]>["content"]["application/json"];
1160
+ };
1161
+ export type RolesCreateOutput = operations["roles.create"]["responses"][201]["content"]["application/json"];
1162
+ export type RolesUpdateInput = operations["roles.update"]["parameters"]["path"] & {
1163
+ body?: NonNullable<operations["roles.update"]["requestBody"]>["content"]["application/json"];
1164
+ };
1165
+ export type RolesUpdateOutput = operations["roles.update"]["responses"][200]["content"]["application/json"];
1166
+ export type RolesDeleteInput = operations["roles.delete"]["parameters"]["path"];
1167
+ export type RolesDeleteOutput = operations["roles.delete"]["responses"][200]["content"]["application/json"];
1168
+ export type RolesDuplicateInput = operations["roles.duplicate"]["parameters"]["path"] & {
1169
+ body: NonNullable<operations["roles.duplicate"]["requestBody"]>["content"]["application/json"];
1170
+ };
1171
+ export type RolesDuplicateOutput = operations["roles.duplicate"]["responses"][201]["content"]["application/json"];
1172
+ export declare class Roles {
1173
+ private readonly client;
1174
+ constructor(client: PrismDraftClient);
1175
+ /**
1176
+ * List a workspace's roles
1177
+ *
1178
+ * `GET /api/workspaces/{workspaceId}/roles`
1179
+ */
1180
+ list(input: RolesListInput, init?: RequestOptions): Promise<RolesListOutput>;
1181
+ /**
1182
+ * Create a role
1183
+ *
1184
+ * `POST /api/workspaces/{workspaceId}/roles`
1185
+ */
1186
+ create(input: RolesCreateInput, init?: RequestOptions): Promise<RolesCreateOutput>;
1187
+ /**
1188
+ * Update a role's name, description or permissions
1189
+ *
1190
+ * `PATCH /api/workspaces/{workspaceId}/roles/{roleId}`
1191
+ */
1192
+ update(input: RolesUpdateInput, init?: RequestOptions): Promise<RolesUpdateOutput>;
1193
+ /**
1194
+ * Delete a role
1195
+ *
1196
+ * `DELETE /api/workspaces/{workspaceId}/roles/{roleId}`
1197
+ */
1198
+ delete(input: RolesDeleteInput, init?: RequestOptions): Promise<RolesDeleteOutput>;
1199
+ /**
1200
+ * Duplicate a role under a new name
1201
+ *
1202
+ * `POST /api/workspaces/{workspaceId}/roles/{roleId}/duplicate`
1203
+ */
1204
+ duplicate(input: RolesDuplicateInput, init?: RequestOptions): Promise<RolesDuplicateOutput>;
1205
+ }
1206
+ export type SiteAnalysesStartInput = operations["siteAnalyses.start"]["parameters"]["path"] & {
1207
+ body: NonNullable<operations["siteAnalyses.start"]["requestBody"]>["content"]["application/json"];
1208
+ };
1209
+ export type SiteAnalysesStartOutput = operations["siteAnalyses.start"]["responses"][202]["content"]["application/json"];
1210
+ export type SiteAnalysesGetInput = operations["siteAnalyses.get"]["parameters"]["path"];
1211
+ export type SiteAnalysesGetOutput = operations["siteAnalyses.get"]["responses"][200]["content"]["application/json"];
1212
+ export type SiteAnalysesApplyInput = operations["siteAnalyses.apply"]["parameters"]["path"] & {
1213
+ body: NonNullable<operations["siteAnalyses.apply"]["requestBody"]>["content"]["application/json"];
1214
+ };
1215
+ export type SiteAnalysesApplyOutput = operations["siteAnalyses.apply"]["responses"][201]["content"]["application/json"];
1216
+ export declare class SiteAnalyses {
1217
+ private readonly client;
1218
+ constructor(client: PrismDraftClient);
1219
+ /**
1220
+ * Analyse the client's website to draft a project
1221
+ *
1222
+ * `POST /api/workspaces/{workspaceId}/site-analyses`
1223
+ */
1224
+ start(input: SiteAnalysesStartInput, init?: RequestOptions): Promise<SiteAnalysesStartOutput>;
1225
+ /**
1226
+ * Read a website analysis
1227
+ *
1228
+ * `GET /api/site-analyses/{analysisId}`
1229
+ */
1230
+ get(input: SiteAnalysesGetInput, init?: RequestOptions): Promise<SiteAnalysesGetOutput>;
1231
+ /**
1232
+ * Create the project a website analysis drafted, as reviewed
1233
+ *
1234
+ * `POST /api/site-analyses/{analysisId}/apply`
1235
+ */
1236
+ apply(input: SiteAnalysesApplyInput, init?: RequestOptions): Promise<SiteAnalysesApplyOutput>;
1237
+ }
1238
+ export type SocialGenerateInput = operations["social.generate"]["parameters"]["path"];
1239
+ export type SocialGenerateOutput = operations["social.generate"]["responses"][200]["content"]["application/json"];
1240
+ export type SocialListInput = operations["social.list"]["parameters"]["path"];
1241
+ export type SocialListOutput = operations["social.list"]["responses"][200]["content"]["application/json"];
1242
+ export declare class Social {
1243
+ private readonly client;
1244
+ constructor(client: PrismDraftClient);
1245
+ /**
1246
+ * Repurpose an article into social posts
1247
+ *
1248
+ * `POST /api/articles/{articleId}/social`
1249
+ */
1250
+ generate(input: SocialGenerateInput, init?: RequestOptions): Promise<SocialGenerateOutput>;
1251
+ /**
1252
+ * The social posts stored for an article
1253
+ *
1254
+ * `GET /api/articles/{articleId}/social`
1255
+ */
1256
+ list(input: SocialListInput, init?: RequestOptions): Promise<SocialListOutput>;
1257
+ }
1258
+ export type TranslationsEstimateInput = operations["translations.estimate"]["parameters"]["path"] & NonNullable<operations["translations.estimate"]["parameters"]["query"]>;
1259
+ export type TranslationsEstimateOutput = operations["translations.estimate"]["responses"][200]["content"]["application/json"];
1260
+ export type TranslationsCreateInput = operations["translations.create"]["parameters"]["path"] & {
1261
+ body: NonNullable<operations["translations.create"]["requestBody"]>["content"]["application/json"];
1262
+ };
1263
+ export type TranslationsCreateOutput = operations["translations.create"]["responses"][200]["content"]["application/json"];
1264
+ export declare class Translations {
1265
+ private readonly client;
1266
+ constructor(client: PrismDraftClient);
1267
+ /**
1268
+ * Estimate a translation
1269
+ *
1270
+ * `GET /api/articles/{articleId}/translations/estimate`
1271
+ */
1272
+ estimate(input: TranslationsEstimateInput, init?: RequestOptions): Promise<TranslationsEstimateOutput>;
1273
+ /**
1274
+ * Translate an article into another of its project's languages
1275
+ *
1276
+ * `POST /api/articles/{articleId}/translations`
1277
+ */
1278
+ create(input: TranslationsCreateInput, init?: RequestOptions): Promise<TranslationsCreateOutput>;
1279
+ }
1280
+ export type UsageListTransactionsInput = operations["usage.listTransactions"]["parameters"]["path"] & NonNullable<operations["usage.listTransactions"]["parameters"]["query"]>;
1281
+ export type UsageListTransactionsOutput = operations["usage.listTransactions"]["responses"][200]["content"]["application/json"];
1282
+ export type UsageGetInput = operations["usage.get"]["parameters"]["path"] & NonNullable<operations["usage.get"]["parameters"]["query"]>;
1283
+ export type UsageGetOutput = operations["usage.get"]["responses"][200]["content"]["application/json"];
1284
+ export type UsageListPaymentsInput = operations["usage.listPayments"]["parameters"]["path"];
1285
+ export type UsageListPaymentsOutput = operations["usage.listPayments"]["responses"][200]["content"]["application/json"];
1286
+ export type UsageListQuotasInput = operations["usage.listQuotas"]["parameters"]["path"];
1287
+ export type UsageListQuotasOutput = operations["usage.listQuotas"]["responses"][200]["content"]["application/json"];
1288
+ export type UsageSetQuotaInput = operations["usage.setQuota"]["parameters"]["path"] & {
1289
+ body: NonNullable<operations["usage.setQuota"]["requestBody"]>["content"]["application/json"];
1290
+ };
1291
+ export type UsageSetQuotaOutput = operations["usage.setQuota"]["responses"][200]["content"]["application/json"];
1292
+ export declare class Usage {
1293
+ private readonly client;
1294
+ constructor(client: PrismDraftClient);
1295
+ /**
1296
+ * The credit ledger, newest first
1297
+ *
1298
+ * `GET /api/workspaces/{workspaceId}/transactions`
1299
+ */
1300
+ listTransactions(input: UsageListTransactionsInput, init?: RequestOptions): Promise<UsageListTransactionsOutput>;
1301
+ /**
1302
+ * Usage records, filterable by window, project, user, operation and provider
1303
+ *
1304
+ * `GET /api/workspaces/{workspaceId}/usage`
1305
+ */
1306
+ get(input: UsageGetInput, init?: RequestOptions): Promise<UsageGetOutput>;
1307
+ /**
1308
+ * Checkout and payment history
1309
+ *
1310
+ * `GET /api/workspaces/{workspaceId}/payments`
1311
+ */
1312
+ listPayments(input: UsageListPaymentsInput, init?: RequestOptions): Promise<UsageListPaymentsOutput>;
1313
+ /**
1314
+ * Quota limits and current consumption
1315
+ *
1316
+ * `GET /api/workspaces/{workspaceId}/quotas`
1317
+ */
1318
+ listQuotas(input: UsageListQuotasInput, init?: RequestOptions): Promise<UsageListQuotasOutput>;
1319
+ /**
1320
+ * Set or clear a quota
1321
+ *
1322
+ * `PUT /api/workspaces/{workspaceId}/quotas`
1323
+ */
1324
+ setQuota(input: UsageSetQuotaInput, init?: RequestOptions): Promise<UsageSetQuotaOutput>;
1325
+ }
1326
+ export type WebhooksListInput = operations["webhooks.list"]["parameters"]["path"] & NonNullable<operations["webhooks.list"]["parameters"]["query"]>;
1327
+ export type WebhooksListOutput = operations["webhooks.list"]["responses"][200]["content"]["application/json"];
1328
+ export type WebhooksCreateInput = operations["webhooks.create"]["parameters"]["path"] & {
1329
+ body: NonNullable<operations["webhooks.create"]["requestBody"]>["content"]["application/json"];
1330
+ };
1331
+ export type WebhooksCreateOutput = operations["webhooks.create"]["responses"][201]["content"]["application/json"];
1332
+ export type WebhooksDeleteInput = operations["webhooks.delete"]["parameters"]["path"];
1333
+ export type WebhooksDeleteOutput = operations["webhooks.delete"]["responses"][200]["content"]["application/json"];
1334
+ export declare class Webhooks {
1335
+ private readonly client;
1336
+ constructor(client: PrismDraftClient);
1337
+ /**
1338
+ * Webhook endpoints, recent deliveries, and the catalog of events
1339
+ *
1340
+ * `GET /api/workspaces/{workspaceId}/webhooks`
1341
+ */
1342
+ list(input: WebhooksListInput, init?: RequestOptions): Promise<WebhooksListOutput>;
1343
+ /**
1344
+ * Register a webhook endpoint
1345
+ *
1346
+ * `POST /api/workspaces/{workspaceId}/webhooks`
1347
+ */
1348
+ create(input: WebhooksCreateInput, init?: RequestOptions): Promise<WebhooksCreateOutput>;
1349
+ /**
1350
+ * Remove a webhook endpoint
1351
+ *
1352
+ * `DELETE /api/workspaces/{workspaceId}/webhooks/{endpointId}`
1353
+ */
1354
+ delete(input: WebhooksDeleteInput, init?: RequestOptions): Promise<WebhooksDeleteOutput>;
1355
+ }
1356
+ export type WorkspacesListOutput = operations["workspaces.list"]["responses"][200]["content"]["application/json"];
1357
+ export type WorkspacesCreateInput = {
1358
+ body: NonNullable<operations["workspaces.create"]["requestBody"]>["content"]["application/json"];
1359
+ };
1360
+ export type WorkspacesCreateOutput = operations["workspaces.create"]["responses"][201]["content"]["application/json"];
1361
+ export type WorkspacesGetInput = operations["workspaces.get"]["parameters"]["path"];
1362
+ export type WorkspacesGetOutput = operations["workspaces.get"]["responses"][200]["content"]["application/json"];
1363
+ export type WorkspacesUpdateInput = operations["workspaces.update"]["parameters"]["path"] & {
1364
+ body?: NonNullable<operations["workspaces.update"]["requestBody"]>["content"]["application/json"];
1365
+ };
1366
+ export type WorkspacesUpdateOutput = operations["workspaces.update"]["responses"][200]["content"]["application/json"];
1367
+ export type WorkspacesListMembersInput = operations["workspaces.listMembers"]["parameters"]["path"];
1368
+ export type WorkspacesListMembersOutput = operations["workspaces.listMembers"]["responses"][200]["content"]["application/json"];
1369
+ export type WorkspacesAddMemberInput = operations["workspaces.addMember"]["parameters"]["path"] & {
1370
+ body: NonNullable<operations["workspaces.addMember"]["requestBody"]>["content"]["application/json"];
1371
+ };
1372
+ export type WorkspacesAddMemberOutput = operations["workspaces.addMember"]["responses"][201]["content"]["application/json"];
1373
+ export type WorkspacesSetMemberRolesInput = operations["workspaces.setMemberRoles"]["parameters"]["path"] & {
1374
+ body: NonNullable<operations["workspaces.setMemberRoles"]["requestBody"]>["content"]["application/json"];
1375
+ };
1376
+ export type WorkspacesSetMemberRolesOutput = operations["workspaces.setMemberRoles"]["responses"][200]["content"]["application/json"];
1377
+ export type WorkspacesRemoveMemberInput = operations["workspaces.removeMember"]["parameters"]["path"];
1378
+ export type WorkspacesRemoveMemberOutput = operations["workspaces.removeMember"]["responses"][200]["content"]["application/json"];
1379
+ export declare class Workspaces {
1380
+ private readonly client;
1381
+ constructor(client: PrismDraftClient);
1382
+ /**
1383
+ * List the workspaces the caller belongs to
1384
+ *
1385
+ * `GET /api/workspaces`
1386
+ */
1387
+ list(init?: RequestOptions): Promise<WorkspacesListOutput>;
1388
+ /**
1389
+ * Create a workspace
1390
+ *
1391
+ * `POST /api/workspaces`
1392
+ */
1393
+ create(input: WorkspacesCreateInput, init?: RequestOptions): Promise<WorkspacesCreateOutput>;
1394
+ /**
1395
+ * Read a workspace, the caller's permissions in it, and the server's features
1396
+ *
1397
+ * `GET /api/workspaces/{workspaceId}`
1398
+ */
1399
+ get(input: WorkspacesGetInput, init?: RequestOptions): Promise<WorkspacesGetOutput>;
1400
+ /**
1401
+ * Update a workspace
1402
+ *
1403
+ * `PATCH /api/workspaces/{workspaceId}`
1404
+ */
1405
+ update(input: WorkspacesUpdateInput, init?: RequestOptions): Promise<WorkspacesUpdateOutput>;
1406
+ /**
1407
+ * List a workspace's members
1408
+ *
1409
+ * `GET /api/workspaces/{workspaceId}/members`
1410
+ */
1411
+ listMembers(input: WorkspacesListMembersInput, init?: RequestOptions): Promise<WorkspacesListMembersOutput>;
1412
+ /**
1413
+ * Add a member, or invite an address by email
1414
+ *
1415
+ * `POST /api/workspaces/{workspaceId}/members`
1416
+ */
1417
+ addMember(input: WorkspacesAddMemberInput, init?: RequestOptions): Promise<WorkspacesAddMemberOutput>;
1418
+ /**
1419
+ * Replace a member's roles
1420
+ *
1421
+ * `PATCH /api/workspaces/{workspaceId}/members/{memberId}`
1422
+ */
1423
+ setMemberRoles(input: WorkspacesSetMemberRolesInput, init?: RequestOptions): Promise<WorkspacesSetMemberRolesOutput>;
1424
+ /**
1425
+ * Remove a member from a workspace
1426
+ *
1427
+ * `DELETE /api/workspaces/{workspaceId}/members/{memberId}`
1428
+ */
1429
+ removeMember(input: WorkspacesRemoveMemberInput, init?: RequestOptions): Promise<WorkspacesRemoveMemberOutput>;
1430
+ }
1431
+ /** Every resource of the API, one property each. */
1432
+ export declare class PrismDraftResources {
1433
+ readonly apiKeys: ApiKeys;
1434
+ readonly articleGroups: ArticleGroups;
1435
+ readonly articles: Articles;
1436
+ readonly billing: Billing;
1437
+ readonly blog: Blog;
1438
+ readonly brandVoices: BrandVoices;
1439
+ readonly briefs: Briefs;
1440
+ readonly calendar: Calendar;
1441
+ readonly categories: Categories;
1442
+ readonly contentTemplates: ContentTemplates;
1443
+ readonly dashboard: Dashboard;
1444
+ readonly generation: Generation;
1445
+ readonly ideas: Ideas;
1446
+ readonly integrations: Integrations;
1447
+ readonly invitations: Invitations;
1448
+ readonly knowledge: Knowledge;
1449
+ readonly links: Links;
1450
+ readonly permissions: Permissions;
1451
+ readonly projects: Projects;
1452
+ readonly roles: Roles;
1453
+ readonly siteAnalyses: SiteAnalyses;
1454
+ readonly social: Social;
1455
+ readonly translations: Translations;
1456
+ readonly usage: Usage;
1457
+ readonly webhooks: Webhooks;
1458
+ readonly workspaces: Workspaces;
1459
+ constructor(client: PrismDraftClient);
1460
+ }