posterly-mcp-server 0.53.1 → 0.53.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -2
- package/dist/index.js +2 -0
- package/dist/lib/api-client.d.ts +78 -1
- package/dist/lib/api-client.js +8 -0
- package/dist/lib/version.d.ts +1 -1
- package/dist/lib/version.js +1 -1
- package/dist/tools/cancel-subscription.js +1 -1
- package/dist/tools/create-signed-upload.js +3 -3
- package/dist/tools/delete-post.js +2 -2
- package/dist/tools/get-subscription.js +1 -1
- package/dist/tools/list-analytics.js +1 -1
- package/dist/tools/list-posts.js +3 -3
- package/dist/tools/manage-publishing-pause.js +1 -1
- package/dist/tools/manage-workspace-member.js +4 -4
- package/dist/tools/update-post.js +3 -3
- package/dist/tools/upgrade-subscription.d.ts +47 -0
- package/dist/tools/upgrade-subscription.js +169 -0
- package/package.json +1 -1
- package/server.json +2 -2
- package/tool-annotations.json +4 -0
- package/tool-registry.json +59 -0
package/README.md
CHANGED
|
@@ -123,7 +123,7 @@ Add the same server definition to your Cursor MCP settings:
|
|
|
123
123
|
|
|
124
124
|
## Available tools
|
|
125
125
|
|
|
126
|
-
`posterly-mcp-server@0.53.
|
|
126
|
+
`posterly-mcp-server@0.53.2` exposes 66 tools covering 102 actions. The hosted HTTP endpoint exposes the same catalog minus the three signup tools: 63 tools covering 99 actions.
|
|
127
127
|
|
|
128
128
|
Many tools pick what to do with one parameter: `view` (reads), `action` (writes), or `type`. A few pick their mode from which parameters you pass (for example `update_post` with `status` changes the status instead of editing). Every tool description names all of its views and actions.
|
|
129
129
|
|
|
@@ -383,6 +383,12 @@ Subscription changes and Agency extra accounts.
|
|
|
383
383
|
| `resume_subscription` | Resume subscription |
|
|
384
384
|
| `downgrade_subscription` | Downgrade subscription |
|
|
385
385
|
|
|
386
|
+
**`upgrade_subscription`**: Upgrade subscription
|
|
387
|
+
|
|
388
|
+
| Action | What it does |
|
|
389
|
+
| --- | --- |
|
|
390
|
+
| `upgrade` | Move to a higher plan: quote the exact charge, then upgrade after `confirm: true` with the `preview_id` (preview then confirm) |
|
|
391
|
+
|
|
386
392
|
**`manage_extra_account`**: Buy or remove extra accounts
|
|
387
393
|
|
|
388
394
|
| Action | What it does |
|
|
@@ -543,6 +549,6 @@ The package reads:
|
|
|
543
549
|
|
|
544
550
|
The optional directory profile provides 52 tools over HTTP or 55 tools over local stdio for social publishing, existing-media uploads, analytics, and inbox work. AI image and video generation, generation-job helpers, billing mutations, and legacy tool aliases are unavailable in this profile. Text caption suggestions and read-only subscription information remain available. Tool descriptions are functional summaries; input schemas retain their validation constraints.
|
|
545
551
|
|
|
546
|
-
Hosted endpoint: `https://www.poster.ly/api/mcp?profile=claude`. For local stdio, set `POSTERLY_DIRECTORY_PROFILE=claude` alongside the existing API key. The default catalogs remain
|
|
552
|
+
Hosted endpoint: `https://www.poster.ly/api/mcp?profile=claude`. For local stdio, set `POSTERLY_DIRECTORY_PROFILE=claude` alongside the existing API key. The default catalogs remain 63 hosted tools and 66 local tools. This profile does not grant authorization, bypass scopes, or change the existing preview and confirmation checks.
|
|
547
553
|
|
|
548
554
|
Directory approval remains Anthropic's decision. This profile addresses the generation and financial-transaction restrictions in the [Anthropic Software Directory Policy](https://support.claude.com/en/articles/13145358-anthropic-software-directory-policy).
|
package/dist/index.js
CHANGED
|
@@ -30,6 +30,7 @@ import { cancelSubscriptionTool } from './tools/cancel-subscription.js';
|
|
|
30
30
|
import { pauseSubscriptionTool } from './tools/pause-subscription.js';
|
|
31
31
|
import { resumeSubscriptionTool } from './tools/resume-subscription.js';
|
|
32
32
|
import { downgradeSubscriptionTool } from './tools/downgrade-subscription.js';
|
|
33
|
+
import { upgradeSubscriptionTool } from './tools/upgrade-subscription.js';
|
|
33
34
|
import { manageExtraAccountTool } from './tools/manage-extra-account.js';
|
|
34
35
|
import { listOAuthClientsTool } from './tools/list-oauth-clients.js';
|
|
35
36
|
import { manageOAuthClientTool } from './tools/manage-oauth-client.js';
|
|
@@ -101,6 +102,7 @@ const STDIO_TOOLS = [
|
|
|
101
102
|
pauseSubscriptionTool,
|
|
102
103
|
resumeSubscriptionTool,
|
|
103
104
|
downgradeSubscriptionTool,
|
|
105
|
+
upgradeSubscriptionTool,
|
|
104
106
|
manageExtraAccountTool,
|
|
105
107
|
listOAuthClientsTool,
|
|
106
108
|
manageOAuthClientTool,
|
package/dist/lib/api-client.d.ts
CHANGED
|
@@ -610,7 +610,7 @@ export type SubscriptionSummary = {
|
|
|
610
610
|
upgrade_options?: SubscriptionUpgradeOption[];
|
|
611
611
|
/** What to do next for this user's tier and status. */
|
|
612
612
|
next_steps?: SubscriptionNextStep[];
|
|
613
|
-
/**
|
|
613
|
+
/** The billing page: the way out where a plan change cannot be made from a tool. */
|
|
614
614
|
billing_url?: string;
|
|
615
615
|
/** Agency workspace owners only. Same body as GET /subscription/extra-accounts. */
|
|
616
616
|
extra_accounts?: ExtraAccountsStateResponse;
|
|
@@ -674,6 +674,67 @@ export type DowngradeSubscriptionResponse = {
|
|
|
674
674
|
success: true;
|
|
675
675
|
tier: SubscriptionTierName;
|
|
676
676
|
};
|
|
677
|
+
export type UpgradeInterval = 'week' | 'month' | 'year';
|
|
678
|
+
export type UpgradeQuote = {
|
|
679
|
+
kind: 'upgrade';
|
|
680
|
+
current_tier: SubscriptionTierName;
|
|
681
|
+
current_tier_name: string;
|
|
682
|
+
new_tier: SubscriptionTierName;
|
|
683
|
+
new_tier_name: string;
|
|
684
|
+
current_interval: UpgradeInterval;
|
|
685
|
+
interval: UpgradeInterval;
|
|
686
|
+
interval_changes: boolean;
|
|
687
|
+
trialing: boolean;
|
|
688
|
+
charge_today_cents: number;
|
|
689
|
+
charge_today: string;
|
|
690
|
+
currency: string;
|
|
691
|
+
current_recurring_cents: number | null;
|
|
692
|
+
new_recurring_cents: number;
|
|
693
|
+
new_recurring: string;
|
|
694
|
+
account_limit_before: number;
|
|
695
|
+
account_limit_after: number;
|
|
696
|
+
included_credits_before: number;
|
|
697
|
+
included_credits_after: number;
|
|
698
|
+
};
|
|
699
|
+
export type UpgradeQuoteResponse = {
|
|
700
|
+
dry_run: true;
|
|
701
|
+
quote: UpgradeQuote;
|
|
702
|
+
};
|
|
703
|
+
export type UpgradePaymentPending = {
|
|
704
|
+
hosted_invoice_url: string | null;
|
|
705
|
+
requested_tier: SubscriptionTierName | null;
|
|
706
|
+
amount_due_cents: number | null;
|
|
707
|
+
expires_at: string | null;
|
|
708
|
+
};
|
|
709
|
+
export type UpgradeAppliedResponse = {
|
|
710
|
+
applied: true;
|
|
711
|
+
status: 'applied';
|
|
712
|
+
previous_tier: SubscriptionTierName;
|
|
713
|
+
previous_tier_name: string;
|
|
714
|
+
tier: SubscriptionTierName;
|
|
715
|
+
tier_name: string;
|
|
716
|
+
interval: UpgradeInterval;
|
|
717
|
+
trialing: boolean;
|
|
718
|
+
charged_cents: number | null;
|
|
719
|
+
account_limit: number;
|
|
720
|
+
included_credits: number;
|
|
721
|
+
};
|
|
722
|
+
export type UpgradePaymentRequiredResponse = {
|
|
723
|
+
applied: false;
|
|
724
|
+
status: 'payment_required';
|
|
725
|
+
payment_required: true;
|
|
726
|
+
message: string;
|
|
727
|
+
hosted_invoice_url: string | null;
|
|
728
|
+
payment_pending: UpgradePaymentPending;
|
|
729
|
+
previous_tier: SubscriptionTierName;
|
|
730
|
+
previous_tier_name: string;
|
|
731
|
+
requested_tier: SubscriptionTierName;
|
|
732
|
+
requested_tier_name: string;
|
|
733
|
+
interval: UpgradeInterval;
|
|
734
|
+
account_limit_after_payment: number;
|
|
735
|
+
included_credits_after_payment: number;
|
|
736
|
+
};
|
|
737
|
+
export type UpgradeSubscriptionResponse = UpgradeAppliedResponse | UpgradePaymentRequiredResponse;
|
|
677
738
|
export type ExtraAccountsPaymentPending = {
|
|
678
739
|
hosted_invoice_url: string | null;
|
|
679
740
|
requested_extra_accounts: number;
|
|
@@ -1446,6 +1507,22 @@ export declare class PosterlyClient {
|
|
|
1446
1507
|
downgradeSubscription(data: {
|
|
1447
1508
|
tier?: SubscriptionTierName;
|
|
1448
1509
|
}): Promise<DowngradeSubscriptionResponse>;
|
|
1510
|
+
/** Exact price of a plan upgrade; charges nothing. */
|
|
1511
|
+
quoteUpgrade(data: {
|
|
1512
|
+
tier: SubscriptionTierName;
|
|
1513
|
+
interval?: 'month' | 'year';
|
|
1514
|
+
workspace_id?: string;
|
|
1515
|
+
}): Promise<UpgradeQuoteResponse>;
|
|
1516
|
+
/** Applies the upgrade and charges the saved card. Only call after a quote was shown and approved. */
|
|
1517
|
+
upgradeSubscription(data: {
|
|
1518
|
+
tier: SubscriptionTierName;
|
|
1519
|
+
interval?: 'month' | 'year';
|
|
1520
|
+
request_id?: string;
|
|
1521
|
+
workspace_id?: string;
|
|
1522
|
+
/** What the quote was based on; the API answers 409 quote_stale when the live values differ. */
|
|
1523
|
+
expected_current_tier?: SubscriptionTierName;
|
|
1524
|
+
expected_interval?: UpgradeInterval;
|
|
1525
|
+
}): Promise<UpgradeSubscriptionResponse>;
|
|
1449
1526
|
/** Exact price of a change; charges nothing. */
|
|
1450
1527
|
quoteExtraAccounts(data: {
|
|
1451
1528
|
extra_accounts: number;
|
package/dist/lib/api-client.js
CHANGED
|
@@ -264,6 +264,14 @@ export class PosterlyClient {
|
|
|
264
264
|
async downgradeSubscription(data) {
|
|
265
265
|
return this.request('POST', '/subscription/downgrade', data);
|
|
266
266
|
}
|
|
267
|
+
/** Exact price of a plan upgrade; charges nothing. */
|
|
268
|
+
async quoteUpgrade(data) {
|
|
269
|
+
return this.request('POST', '/subscription/upgrade', { ...data, dry_run: true });
|
|
270
|
+
}
|
|
271
|
+
/** Applies the upgrade and charges the saved card. Only call after a quote was shown and approved. */
|
|
272
|
+
async upgradeSubscription(data) {
|
|
273
|
+
return this.request('POST', '/subscription/upgrade', data);
|
|
274
|
+
}
|
|
267
275
|
/** Exact price of a change; charges nothing. */
|
|
268
276
|
async quoteExtraAccounts(data) {
|
|
269
277
|
return this.request('POST', '/subscription/extra-accounts', { ...data, dry_run: true });
|
package/dist/lib/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const POSTERLY_MCP_VERSION = "0.53.
|
|
1
|
+
export declare const POSTERLY_MCP_VERSION = "0.53.2";
|
package/dist/lib/version.js
CHANGED
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
// tool set (minus the intentional pre-auth signup tools that only this stdio
|
|
6
6
|
// package exposes). `npm run check:mcp-parity` enforces both the version match
|
|
7
7
|
// and the tool-list match, and runs in the pre-commit hook.
|
|
8
|
-
export const POSTERLY_MCP_VERSION = '0.53.
|
|
8
|
+
export const POSTERLY_MCP_VERSION = '0.53.2';
|
|
@@ -23,7 +23,7 @@ function formatCanceled(result) {
|
|
|
23
23
|
}
|
|
24
24
|
export const cancelSubscriptionTool = {
|
|
25
25
|
name: 'cancel_subscription',
|
|
26
|
-
description: "Cancel the authenticated user's posterly subscription. DESTRUCTIVE
|
|
26
|
+
description: "Cancel the authenticated user's posterly subscription. DESTRUCTIVE; requires billing:write. ALWAYS ask the user why they are cancelling FIRST and pass their answer as `reason` (one of the allowed values). By default an active or trialing plan is set to cancel at the end of the current period. A past_due or unpaid plan always ends now, even when immediate is false: the unpaid renewal is dropped and payment retries stop. Pass immediate=true only when the user explicitly wants an active plan cancelled right now. Only call after the user explicitly confirms.",
|
|
27
27
|
inputSchema: z.object({
|
|
28
28
|
reason: z.enum(CANCELLATION_REASONS).describe('Why the user is cancelling. Ask the user before calling; do not guess.'),
|
|
29
29
|
feedback: z.string().max(2000).optional().describe('Optional free-text detail the user gave about why they are cancelling.'),
|
|
@@ -48,7 +48,7 @@ export function formatSignedUploadBatch(batch, requested) {
|
|
|
48
48
|
}
|
|
49
49
|
export const createSignedUploadTool = {
|
|
50
50
|
name: 'create_signed_upload',
|
|
51
|
-
description: 'Create signed upload URLs for larger images, videos or PDFs, 1 to 20 files per call. Accepts JPEG, PNG, GIF, WebP, MP4, MOV, WebM, and PDF up to 50MB (a PDF is for LinkedIn document posts); HEIC is not accepted. For one file pass filename, content_type and size. For several pass files: [{filename, content_type, size}]
|
|
51
|
+
description: 'Create signed upload URLs for larger images, videos or PDFs, 1 to 20 files per call. Accepts JPEG, PNG, GIF, WebP, MP4, MOV, WebM, and PDF up to 50MB (a PDF is for LinkedIn document posts); HEIC is not accepted. For one file pass filename, content_type and size. For several pass files: [{filename, content_type, size}] and get one slot per file, with any file that fails reported in place. PUT the raw bytes of each file to its upload_url (object storage) with the returned headers, then pass public_url to create_post / create_posts_batch. For a PDF, create the post with post_type document, media_url set to that public_url and a document_title in settings (LinkedIn only). Pinning is available per request with pin_content_type: true, which locks each slot to the content_type you declare (a PUT with any other Content-Type then fails with 403). posterly may turn it on by default in the future, so always send the Content-Type header returned with the slot. Slots expire in 15 minutes.',
|
|
52
52
|
inputSchema: z.object({
|
|
53
53
|
filename: z.string().optional().describe('Single file: filename with extension, e.g. launch-video.mp4. Omit when using files.'),
|
|
54
54
|
content_type: z.string().optional().describe('Single file: MIME type, e.g. video/mp4. Omit when using files.'),
|
|
@@ -58,11 +58,11 @@ export const createSignedUploadTool = {
|
|
|
58
58
|
.min(1)
|
|
59
59
|
.max(20)
|
|
60
60
|
.optional()
|
|
61
|
-
.describe('Batch: 1 to 20
|
|
61
|
+
.describe('Batch: 1 to 20 {filename, content_type, size}. Use instead of the single-file fields.'),
|
|
62
62
|
pin_content_type: z
|
|
63
63
|
.boolean()
|
|
64
64
|
.optional()
|
|
65
|
-
.describe('Optional. true locks each slot to the declared content_type
|
|
65
|
+
.describe('Optional. true locks each slot to the declared content_type; a PUT with any other Content-Type fails with 403.'),
|
|
66
66
|
workspace_id: z.string().optional().describe('Optional. The workspace this acts in and whose plan pays (from whoami). Needed only when your connection can act in several workspaces.'),
|
|
67
67
|
}),
|
|
68
68
|
async execute(client, input) {
|
|
@@ -3,7 +3,7 @@ import { code, dashboardUrlForPosts } from '../lib/format.js';
|
|
|
3
3
|
import { previewThenConfirm, validateArgs } from '../lib/tool-runtime.js';
|
|
4
4
|
export const deletePostTool = {
|
|
5
5
|
name: 'delete_post',
|
|
6
|
-
description: 'Delete posts. DESTRUCTIVE and IRREVERSIBLE: deleted posts and captions cannot be recovered. post_id: delete one post; fetch it with `get_post` first, show the user what will be deleted (caption, account, scheduled time), and pass confirm=true only after explicit confirmation ("yes delete it", "remove it"). A post that is currently publishing is never deleted. A published post is taken down only when the user also explicitly confirms the live removal
|
|
6
|
+
description: 'Delete posts. DESTRUCTIVE and IRREVERSIBLE: deleted posts and captions cannot be recovered. post_id: delete one post; fetch it with `get_post` first, show the user what will be deleted (caption, account, scheduled time), and pass confirm=true only after explicit confirmation ("yes delete it", "remove it"). A post that is currently publishing is never deleted. A published post is taken down only when the user also explicitly confirms the live removal: delete_mode=platform with confirm_published=true takes the live post down too; delete_mode=posterly removes only the posterly record and leaves it up. Live deletion supports eligible connected platforms with saved post IDs and deletion permissions; refusals keep the record. Threads requires threads_delete. YouTube requires youtube.force-ssl or equivalent, upload alone is insufficient. A published post with no live URL and no platform id is removed from posterly only. group_id: delete every draft, scheduled, failed, or paused post matching a caller-defined group_id, post_group_id, api_group_id, or release_id. A group delete never removes published posts. Preview then confirm: call without confirm to get a preview and preview_id, show it, then call again with confirm=true and that preview_id. Never delete several posts one by one without listing each and confirming the full list.',
|
|
7
7
|
inputSchema: z.object({
|
|
8
8
|
post_id: z.number().optional().describe('Delete this one post.'),
|
|
9
9
|
group_id: z.string().min(1).max(160).optional().describe('Delete every unpublished post in this group or release instead. Never deletes published posts.'),
|
|
@@ -11,7 +11,7 @@ export const deletePostTool = {
|
|
|
11
11
|
confirm_published: z
|
|
12
12
|
.boolean()
|
|
13
13
|
.optional()
|
|
14
|
-
.describe('With post_id only. True only after the user explicitly confirms taking a live post down. Required with delete_mode=platform.
|
|
14
|
+
.describe('With post_id only. True only after the user explicitly confirms taking a live post down. Required with delete_mode=platform.'),
|
|
15
15
|
confirm: z
|
|
16
16
|
.boolean()
|
|
17
17
|
.optional()
|
|
@@ -80,7 +80,7 @@ function formatSubscription(result, options_) {
|
|
|
80
80
|
}
|
|
81
81
|
export const getSubscriptionTool = {
|
|
82
82
|
name: 'get_subscription',
|
|
83
|
-
description: "Get the authenticated user's posterly subscription: status, tier, cancel-at-period-end, period end, trial end and pause state. Also reports connected accounts in use and the account limit for the workspace this caller is acting in (plan tier plus any extra slots). Call this FIRST for \"upgrade\", \"change plan\", \"add accounts\" or \"how many accounts\": it returns the plans above this user's with prices, limits and credits, the Agency extra-accounts state (owners), and the exact next steps
|
|
83
|
+
description: "Get the authenticated user's posterly subscription: status, tier, cancel-at-period-end, period end, trial end and pause state. Also reports connected accounts in use and the account limit for the workspace this caller is acting in (plan tier plus any extra slots). Call this FIRST for \"upgrade\", \"change plan\", \"add accounts\" or \"how many accounts\": it returns the plans above this user's with prices, limits and credits, the Agency extra-accounts state (owners), and the exact next steps. Read-only. Requires the billing:read scope.",
|
|
84
84
|
inputSchema: z.object({}),
|
|
85
85
|
async execute(client) {
|
|
86
86
|
const result = await client.getSubscription();
|
|
@@ -31,7 +31,7 @@ export const listAnalyticsTool = {
|
|
|
31
31
|
.enum(['1h', '6h', '24h', '72h', '7d'])
|
|
32
32
|
.optional()
|
|
33
33
|
.describe('insights: filter to one checkpoint after publish.'),
|
|
34
|
-
presentation: presentationSchema.describe('accounts and posts: compact
|
|
34
|
+
presentation: presentationSchema.describe('accounts and posts: compact, table, or json.'),
|
|
35
35
|
}),
|
|
36
36
|
/** The old tools' exact input schemas, for alias calls (see alias-transport.ts). */
|
|
37
37
|
legacySchemas: {
|
package/dist/tools/list-posts.js
CHANGED
|
@@ -6,7 +6,7 @@ export const LIST_POSTS_DESCRIPTION = 'Posts in your workspaces, teammates\' too
|
|
|
6
6
|
'view=list (default): posts filtered by status (scheduled, published, failed, draft), platform, account_id, workspace_id, brand_id, approval_status, approval_waiting_on, and a scheduled date range: scheduled_from (inclusive) and scheduled_to (a plain date includes that whole day), read in timezone (IANA, default UTC; also the zone times are shown in). Returns limit posts (default 20, max 200) starting at offset; with a date range the order defaults to oldest first (order=asc|desc). ' +
|
|
7
7
|
'The output always says whether every matching post was shown. If it says more are available, call again with the offset it gives and keep paging until all are shown before drawing any conclusion about totals, gaps, or how busy a client is. ' +
|
|
8
8
|
'view=counts (scheduled_from and scheduled_to required, up to 366 days): exact totals per day, status, account, and brand for the same filters (limit, offset, and order are ignored); use it for "how many" or "is this month full" questions. ' +
|
|
9
|
-
'
|
|
9
|
+
'Each post includes approval.pending_client_approval.';
|
|
10
10
|
export const listPostsTool = {
|
|
11
11
|
name: 'list_posts',
|
|
12
12
|
description: LIST_POSTS_DESCRIPTION,
|
|
@@ -14,7 +14,7 @@ export const listPostsTool = {
|
|
|
14
14
|
view: z
|
|
15
15
|
.enum(['list', 'counts'])
|
|
16
16
|
.optional()
|
|
17
|
-
.describe('list (default): the posts
|
|
17
|
+
.describe('list (default): the posts. counts: totals (needs scheduled_from and scheduled_to).'),
|
|
18
18
|
status: z
|
|
19
19
|
.string()
|
|
20
20
|
.optional()
|
|
@@ -54,7 +54,7 @@ export const listPostsTool = {
|
|
|
54
54
|
.int()
|
|
55
55
|
.min(0)
|
|
56
56
|
.optional()
|
|
57
|
-
.describe('
|
|
57
|
+
.describe('Matching posts to skip; use the offset the previous page gives. Ignored by view=counts.'),
|
|
58
58
|
workspace_id: z
|
|
59
59
|
.string()
|
|
60
60
|
.optional()
|
|
@@ -11,7 +11,7 @@ export const managePublishingPauseTool = {
|
|
|
11
11
|
workspace_id: z.string().optional().describe('Workspace ID from whoami. Defaults to your default workspace.'),
|
|
12
12
|
brand_id: z.string().optional().describe('pause and resume: a brand ID from list_brands. Leave it out (never empty) for the whole workspace.'),
|
|
13
13
|
post_ids: z.array(z.number().int().positive()).max(500).optional().describe('publish_missed: the missed post IDs a resume returned.'),
|
|
14
|
-
confirm: z.boolean().optional().describe('pause: leave out to
|
|
14
|
+
confirm: z.boolean().optional().describe('pause: leave out to preview. pause and publish_missed: true only after the user agreed. resume: not needed.'),
|
|
15
15
|
}),
|
|
16
16
|
async execute(client, input, ctx) {
|
|
17
17
|
// A present but empty brand_id is refused, never read as the whole
|
|
@@ -94,18 +94,18 @@ export function validateManageWorkspaceMemberInput(input) {
|
|
|
94
94
|
}
|
|
95
95
|
export const manageWorkspaceMemberTool = {
|
|
96
96
|
name: 'manage_workspace_member',
|
|
97
|
-
description: 'Invite, update, or remove a workspace colleague. This SENDS EMAILS and CHANGES WHO CAN ACCESS the workspace. Needs an API key with the Manage team permission, and the caller must be a workspace owner or admin. ALWAYS preview first: call without confirm, show the
|
|
97
|
+
description: 'Invite, update, or remove a workspace colleague. This SENDS EMAILS and CHANGES WHO CAN ACCESS the workspace. Needs an API key with the Manage team permission, and the caller must be a workspace owner or admin. ALWAYS preview first: call without confirm, show the preview to the user, and only call again with confirm: true plus the returned preview_id after the user explicitly approves. action=invite: email and role required (publisher, editor or viewer), optional brand_ids and resend; always sends a pending invite email, never adds anyone instantly. action=update: member_id or invite_id (from list_workspace_members) plus role and/or brand_ids; or member_id plus api_access (true or false, on its own) to turn API and AI app access on or off for that teammate, which lets them use the workspace API plan from their own keys and AI apps (off by default; you cannot change your own; only the owner can change it for an admin; turning it off stops their keys, AI app connections and webhooks for this workspace). action=remove: member_id (removes the teammate and revokes their API keys for this workspace) or invite_id (cancels a pending invite). Admin seats can only be granted in the posterly dashboard. The workspace owner is emailed about every change.',
|
|
98
98
|
inputSchema: z.object({
|
|
99
99
|
action: z.enum(ACTIONS).describe('invite, update, or remove.'),
|
|
100
100
|
workspace_id: z.string().describe('Workspace ID (from whoami).'),
|
|
101
101
|
email: z.string().optional().describe('action=invite only: the colleague email address.'),
|
|
102
|
-
role: z.enum(ROLES).optional().describe('action=invite (required) or action=update: publisher, editor, or viewer.
|
|
102
|
+
role: z.enum(ROLES).optional().describe('action=invite (required) or action=update: publisher, editor, or viewer.'),
|
|
103
103
|
brand_ids: z.array(z.string()).max(100).optional().describe('action=invite or action=update: limit the seat to these brand IDs (from list_brands). Empty array means every brand. Omit on update to keep the current brands.'),
|
|
104
104
|
resend: z.boolean().optional().describe('action=invite only: email an unchanged pending invite again.'),
|
|
105
105
|
member_id: z.string().optional().describe('action=update or action=remove: a member ID from list_workspace_members.'),
|
|
106
106
|
invite_id: z.string().optional().describe('action=update or action=remove: a pending invite ID from list_workspace_members.'),
|
|
107
|
-
api_access: z.boolean().optional().describe('action=update with member_id only, on its own: true
|
|
108
|
-
confirm: z.boolean().optional().describe('Leave out to get a preview. Set true only after the user explicitly approved
|
|
107
|
+
api_access: z.boolean().optional().describe('action=update with member_id only, on its own: true turns API and AI app access on; false turns it off.'),
|
|
108
|
+
confirm: z.boolean().optional().describe('Leave out to get a preview. Set true only after the user explicitly approved it, with the preview_id.'),
|
|
109
109
|
preview_id: z.string().optional().describe('The preview_id returned by the preview call. Required with confirm: true.'),
|
|
110
110
|
}),
|
|
111
111
|
async execute(client, input) {
|
|
@@ -154,8 +154,8 @@ export const updatePostTool = {
|
|
|
154
154
|
.string()
|
|
155
155
|
.optional()
|
|
156
156
|
.describe('New scheduled time (ISO 8601, e.g. 2026-03-10T09:00:00Z)'),
|
|
157
|
-
media_url: z.string().optional().describe('New media URL. Posterly storage URLs are used as-is; third-party
|
|
158
|
-
media_urls: z.array(z.string()).optional().describe('New media URLs for carousel
|
|
157
|
+
media_url: z.string().optional().describe('New media URL. Posterly storage URLs are used as-is; third-party URLs are copied into posterly storage first. Short-lived signed URLs must still be live when this tool runs.'),
|
|
158
|
+
media_urls: z.array(z.string()).optional().describe('New media URLs for carousel, handled like media_url.'),
|
|
159
159
|
post_type: z
|
|
160
160
|
.string()
|
|
161
161
|
.optional()
|
|
@@ -186,7 +186,7 @@ export const updatePostTool = {
|
|
|
186
186
|
approval_action: z
|
|
187
187
|
.enum(['request', 'approve', 'request_changes', 'reject'])
|
|
188
188
|
.optional()
|
|
189
|
-
.describe('Change client approval instead of editing the post.
|
|
189
|
+
.describe('Change client approval instead of editing the post. Send on its own.'),
|
|
190
190
|
approval_axis: z
|
|
191
191
|
.enum(['asset', 'caption'])
|
|
192
192
|
.optional()
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import type { PosterlyClient, SubscriptionTierName, UpgradePaymentPending, UpgradeQuote, UpgradeSubscriptionResponse } from '../lib/api-client.js';
|
|
3
|
+
import { type ToolContext } from '../lib/tool-runtime.js';
|
|
4
|
+
/** Same wording as the hosted endpoint (lib/mcp/http-tools.ts). */
|
|
5
|
+
export declare function formatUpgradePaymentPending(pending: UpgradePaymentPending | null | undefined): string;
|
|
6
|
+
export declare function formatUpgradeQuote(q: UpgradeQuote): string;
|
|
7
|
+
export declare function formatUpgradeResult(d: UpgradeSubscriptionResponse): string;
|
|
8
|
+
type UpgradeSubscriptionInput = {
|
|
9
|
+
tier: SubscriptionTierName;
|
|
10
|
+
interval?: 'month' | 'year';
|
|
11
|
+
workspace_id?: string;
|
|
12
|
+
expected_current_tier?: SubscriptionTierName;
|
|
13
|
+
expected_interval?: 'week' | 'month' | 'year';
|
|
14
|
+
confirm?: boolean;
|
|
15
|
+
preview_id?: string;
|
|
16
|
+
};
|
|
17
|
+
export declare const upgradeSubscriptionTool: {
|
|
18
|
+
name: string;
|
|
19
|
+
description: string;
|
|
20
|
+
inputSchema: z.ZodObject<{
|
|
21
|
+
tier: z.ZodEnum<["starter", "pro", "power_user", "agency"]>;
|
|
22
|
+
interval: z.ZodOptional<z.ZodEnum<["month", "year"]>>;
|
|
23
|
+
workspace_id: z.ZodOptional<z.ZodString>;
|
|
24
|
+
expected_current_tier: z.ZodOptional<z.ZodEnum<["starter", "pro", "power_user", "agency"]>>;
|
|
25
|
+
expected_interval: z.ZodOptional<z.ZodEnum<["week", "month", "year"]>>;
|
|
26
|
+
confirm: z.ZodOptional<z.ZodBoolean>;
|
|
27
|
+
preview_id: z.ZodOptional<z.ZodString>;
|
|
28
|
+
}, "strip", z.ZodTypeAny, {
|
|
29
|
+
tier: "starter" | "pro" | "power_user" | "agency";
|
|
30
|
+
workspace_id?: string | undefined;
|
|
31
|
+
confirm?: boolean | undefined;
|
|
32
|
+
preview_id?: string | undefined;
|
|
33
|
+
interval?: "month" | "year" | undefined;
|
|
34
|
+
expected_interval?: "week" | "month" | "year" | undefined;
|
|
35
|
+
expected_current_tier?: "starter" | "pro" | "power_user" | "agency" | undefined;
|
|
36
|
+
}, {
|
|
37
|
+
tier: "starter" | "pro" | "power_user" | "agency";
|
|
38
|
+
workspace_id?: string | undefined;
|
|
39
|
+
confirm?: boolean | undefined;
|
|
40
|
+
preview_id?: string | undefined;
|
|
41
|
+
interval?: "month" | "year" | undefined;
|
|
42
|
+
expected_interval?: "week" | "month" | "year" | undefined;
|
|
43
|
+
expected_current_tier?: "starter" | "pro" | "power_user" | "agency" | undefined;
|
|
44
|
+
}>;
|
|
45
|
+
execute(client: PosterlyClient, input: UpgradeSubscriptionInput, ctx: ToolContext): Promise<string>;
|
|
46
|
+
};
|
|
47
|
+
export {};
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
import { createHash } from 'node:crypto';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { formatDateTime, mdKeyValue, mdSection, mdTitle } from '../lib/format.js';
|
|
4
|
+
import { previewThenConfirm, readForPreview, validateArgs } from '../lib/tool-runtime.js';
|
|
5
|
+
import { usdFromCents } from './manage-extra-account.js';
|
|
6
|
+
const TIER_VALUES = ['starter', 'pro', 'power_user', 'agency'];
|
|
7
|
+
function upgradeNumber(value) {
|
|
8
|
+
return Number.isFinite(value) ? value.toLocaleString('en-US') : String(value);
|
|
9
|
+
}
|
|
10
|
+
function intervalNoun(interval) {
|
|
11
|
+
return interval === 'year' ? 'year' : interval === 'week' ? 'week' : 'month';
|
|
12
|
+
}
|
|
13
|
+
function intervalAdverb(interval) {
|
|
14
|
+
return interval === 'year' ? 'yearly' : interval === 'week' ? 'weekly' : 'monthly';
|
|
15
|
+
}
|
|
16
|
+
/** Same wording as the hosted endpoint (lib/mcp/http-tools.ts). */
|
|
17
|
+
export function formatUpgradePaymentPending(pending) {
|
|
18
|
+
if (!pending)
|
|
19
|
+
return '';
|
|
20
|
+
return mdSection('Payment waiting', [
|
|
21
|
+
mdKeyValue([
|
|
22
|
+
['Requested plan', pending.requested_tier || 'a plan change'],
|
|
23
|
+
['Amount due', pending.amount_due_cents === null || pending.amount_due_cents === undefined ? 'n/a' : usdFromCents(pending.amount_due_cents)],
|
|
24
|
+
['Expires', pending.expires_at ? formatDateTime(pending.expires_at) : 'n/a'],
|
|
25
|
+
['Payment link', pending.hosted_invoice_url || 'not available, finish it on the billing page'],
|
|
26
|
+
]),
|
|
27
|
+
'The plan has not changed yet. It changes automatically once this invoice is paid. Until then posterly will not accept another plan change.',
|
|
28
|
+
].join('\n\n'));
|
|
29
|
+
}
|
|
30
|
+
export function formatUpgradeQuote(q) {
|
|
31
|
+
const word = intervalNoun(q.interval);
|
|
32
|
+
const rows = [
|
|
33
|
+
['Plan now', `${q.current_tier_name} (${intervalAdverb(q.current_interval)})`],
|
|
34
|
+
['Plan after', `${q.new_tier_name} (${intervalAdverb(q.interval)})`],
|
|
35
|
+
['Connected accounts', `${upgradeNumber(q.account_limit_before)} to ${upgradeNumber(q.account_limit_after)}`],
|
|
36
|
+
['AI credits a month', `${upgradeNumber(q.included_credits_before)} to ${upgradeNumber(q.included_credits_after)}`],
|
|
37
|
+
['Charge today', q.trialing ? '$0.00 (trial)' : q.charge_today || usdFromCents(q.charge_today_cents)],
|
|
38
|
+
[
|
|
39
|
+
'New recurring cost',
|
|
40
|
+
`${q.new_recurring || usdFromCents(q.new_recurring_cents)} per ${word}${q.current_recurring_cents === null || q.current_recurring_cents === undefined ? '' : ` (now ${usdFromCents(q.current_recurring_cents)} per ${intervalNoun(q.current_interval)})`}`,
|
|
41
|
+
],
|
|
42
|
+
];
|
|
43
|
+
if (q.interval_changes)
|
|
44
|
+
rows.push(['Billing interval', `${intervalAdverb(q.current_interval)} to ${intervalAdverb(q.interval)}`]);
|
|
45
|
+
const chargeLine = q.trialing
|
|
46
|
+
? 'Nothing is charged today because the subscription is on a trial. The trial continues and the new price starts when it ends.'
|
|
47
|
+
: `The saved card on file is charged ${q.charge_today || usdFromCents(q.charge_today_cents)} today (${q.interval_changes ? 'the unused time on the current plan is credited, and the new billing period starts today' : 'prorated for the rest of this billing period'}) when this is confirmed. Prices are before any discount on the subscription, and discounts carry over. If the card needs confirmation or declines, nothing changes and a payment link is returned instead.`;
|
|
48
|
+
return [mdSection(`Upgrade to ${q.new_tier_name}`, mdKeyValue(rows)), chargeLine].join('\n\n');
|
|
49
|
+
}
|
|
50
|
+
export function formatUpgradeResult(d) {
|
|
51
|
+
if (d.status === 'payment_required') {
|
|
52
|
+
return [
|
|
53
|
+
mdTitle('Payment needed: the plan was not changed yet'),
|
|
54
|
+
'The saved card needs confirmation (3D Secure) or was declined, so posterly did not change the plan. Send the user to the payment link. The plan changes automatically once it is paid.',
|
|
55
|
+
mdKeyValue([
|
|
56
|
+
['Requested plan', d.requested_tier_name],
|
|
57
|
+
['Connected accounts once paid', d.account_limit_after_payment],
|
|
58
|
+
['AI credits a month once paid', d.included_credits_after_payment],
|
|
59
|
+
['Amount due', d.payment_pending?.amount_due_cents === null || d.payment_pending?.amount_due_cents === undefined ? 'n/a' : usdFromCents(d.payment_pending.amount_due_cents)],
|
|
60
|
+
['Link expires', d.payment_pending?.expires_at ? formatDateTime(d.payment_pending.expires_at) : 'n/a'],
|
|
61
|
+
['Payment link', d.hosted_invoice_url || 'not available, ask the user to finish it on the billing page'],
|
|
62
|
+
]),
|
|
63
|
+
'Call get_subscription afterwards to confirm the new plan.',
|
|
64
|
+
].join('\n\n');
|
|
65
|
+
}
|
|
66
|
+
return [
|
|
67
|
+
mdTitle(`Upgraded to ${d.tier_name}`),
|
|
68
|
+
`The plan is now ${d.tier_name}. New limits show in get_subscription as soon as Stripe confirms the change, usually within seconds.`,
|
|
69
|
+
mdKeyValue([
|
|
70
|
+
['Plan', `${d.previous_tier_name} to ${d.tier_name}`],
|
|
71
|
+
['Connected accounts', d.account_limit],
|
|
72
|
+
['AI credits a month', d.included_credits],
|
|
73
|
+
['Billing interval', intervalAdverb(d.interval)],
|
|
74
|
+
['Charged today', d.trialing ? '$0.00 (trial)' : d.charged_cents === null || d.charged_cents === undefined ? 'the prorated amount' : usdFromCents(d.charged_cents)],
|
|
75
|
+
]),
|
|
76
|
+
d.trialing ? 'The trial continues. The new price starts when it ends.' : 'The prorated amount was charged to the saved card.',
|
|
77
|
+
].join('\n\n');
|
|
78
|
+
}
|
|
79
|
+
export const upgradeSubscriptionTool = {
|
|
80
|
+
name: 'upgrade_subscription',
|
|
81
|
+
description: 'Upgrade to a strictly higher plan. MONEY: charges the saved card (prorated). Owner only. Call without confirm for the quote and preview_id; after the user agrees, call with confirm=true, that preview_id and the expected_ fields. 3D Secure or a decline returns a payment link; nothing changes.',
|
|
82
|
+
inputSchema: z.object({
|
|
83
|
+
tier: z.enum(TIER_VALUES),
|
|
84
|
+
interval: z.enum(['month', 'year']).optional(),
|
|
85
|
+
workspace_id: z.string().optional(),
|
|
86
|
+
expected_current_tier: z.enum(TIER_VALUES).optional(),
|
|
87
|
+
expected_interval: z.enum(['week', 'month', 'year']).optional(),
|
|
88
|
+
confirm: z.boolean().optional(),
|
|
89
|
+
preview_id: z.string().optional(),
|
|
90
|
+
}),
|
|
91
|
+
async execute(client, input, ctx) {
|
|
92
|
+
const { args } = validateArgs(ctx, 'upgrade_subscription', input);
|
|
93
|
+
const call = args;
|
|
94
|
+
// Read at use time: a repeated, equal interval is dropped below.
|
|
95
|
+
const makeBase = () => ({
|
|
96
|
+
tier: call.tier,
|
|
97
|
+
...(call.interval ? { interval: call.interval } : {}),
|
|
98
|
+
...(call.workspace_id ? { workspace_id: call.workspace_id } : {}),
|
|
99
|
+
});
|
|
100
|
+
// A preview is only issued for a change posterly can actually make: price
|
|
101
|
+
// it first, and answer a failed quote with an error and NO preview_id. The
|
|
102
|
+
// quote's current plan and interval are pinned into the previewed args, so
|
|
103
|
+
// the confirm must repeat them and the API refuses a stale quote.
|
|
104
|
+
let quote = null;
|
|
105
|
+
let previewArgs = args;
|
|
106
|
+
if (call.confirm !== true) {
|
|
107
|
+
const read = await readForPreview(() => client.quoteUpgrade(makeBase()));
|
|
108
|
+
if (!read.ok) {
|
|
109
|
+
throw new Error([
|
|
110
|
+
'No preview: this plan change cannot be made right now.',
|
|
111
|
+
read.error,
|
|
112
|
+
'Nothing was changed and no preview_id was issued. Tell the user why. If the reason points to the billing page, send them there.',
|
|
113
|
+
].join('\n\n'));
|
|
114
|
+
}
|
|
115
|
+
quote = read.data.quote;
|
|
116
|
+
// An interval equal to the current one is a no-op the preview does not
|
|
117
|
+
// ask to repeat, so it is dropped from the previewed args: the confirm
|
|
118
|
+
// then binds to exactly the fields listed under "Fields to repeat on
|
|
119
|
+
// confirm".
|
|
120
|
+
const { interval: _noopInterval, ...rest } = args;
|
|
121
|
+
previewArgs = {
|
|
122
|
+
...(quote.interval_changes ? args : rest),
|
|
123
|
+
expected_current_tier: quote.current_tier,
|
|
124
|
+
expected_interval: quote.current_interval,
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
else if (call.interval && call.interval === call.expected_interval) {
|
|
128
|
+
// Confirm side of the same rule: a repeated, equal interval is a no-op.
|
|
129
|
+
const { interval: _noopInterval, ...rest } = args;
|
|
130
|
+
previewArgs = rest;
|
|
131
|
+
call.interval = undefined;
|
|
132
|
+
}
|
|
133
|
+
return previewThenConfirm({
|
|
134
|
+
tool: 'upgrade_subscription',
|
|
135
|
+
action: 'upgrade',
|
|
136
|
+
args: previewArgs,
|
|
137
|
+
nonce: true,
|
|
138
|
+
legacyRefusal: 'Refusing to upgrade the plan without confirm=true after explicit user confirmation.',
|
|
139
|
+
ctx,
|
|
140
|
+
describe: async () => [
|
|
141
|
+
formatUpgradeQuote(quote),
|
|
142
|
+
'Only confirm after the user has seen the price and agreed. The change is billed to the saved card, not to anything the user types here.',
|
|
143
|
+
mdSection('Fields to repeat on confirm', mdKeyValue([
|
|
144
|
+
['tier', quote.new_tier],
|
|
145
|
+
...(quote.interval_changes ? [['interval', quote.interval]] : []),
|
|
146
|
+
['expected_current_tier', quote.current_tier],
|
|
147
|
+
['expected_interval', quote.current_interval],
|
|
148
|
+
])),
|
|
149
|
+
].join('\n\n'),
|
|
150
|
+
run: async () => {
|
|
151
|
+
if (!call.expected_current_tier || !call.expected_interval) {
|
|
152
|
+
throw new Error('Confirm needs expected_current_tier and expected_interval from the preview. Get a new preview.');
|
|
153
|
+
}
|
|
154
|
+
// The same preview_id always maps to the same request_id, so a replayed
|
|
155
|
+
// confirm can never upgrade twice.
|
|
156
|
+
const requestId = typeof call.preview_id === 'string' && call.preview_id
|
|
157
|
+
? `mcp-${createHash('sha256').update(call.preview_id).digest('hex').slice(0, 40)}`
|
|
158
|
+
: undefined;
|
|
159
|
+
const result = await client.upgradeSubscription({
|
|
160
|
+
...makeBase(),
|
|
161
|
+
expected_current_tier: call.expected_current_tier,
|
|
162
|
+
expected_interval: call.expected_interval,
|
|
163
|
+
...(requestId ? { request_id: requestId } : {}),
|
|
164
|
+
});
|
|
165
|
+
return formatUpgradeResult(result);
|
|
166
|
+
},
|
|
167
|
+
});
|
|
168
|
+
},
|
|
169
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "posterly-mcp-server",
|
|
3
|
-
"version": "0.53.
|
|
3
|
+
"version": "0.53.2",
|
|
4
4
|
"mcpName": "io.github.awpthorp/posterly",
|
|
5
5
|
"description": "MCP server for posterly: schedule and publish social media posts across 18 platforms from any MCP client (Claude, ChatGPT, Cursor, Windsurf, Cline, and more)",
|
|
6
6
|
"license": "MIT",
|
package/server.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"name": "io.github.awpthorp/posterly",
|
|
4
4
|
"title": "posterly",
|
|
5
5
|
"description": "Validate, schedule, publish, and analyze social content across 18 platforms with posterly.",
|
|
6
|
-
"version": "0.53.
|
|
6
|
+
"version": "0.53.2",
|
|
7
7
|
"websiteUrl": "https://www.poster.ly/mcp",
|
|
8
8
|
"repository": {
|
|
9
9
|
"url": "https://github.com/awpthorp/posterly-mcp-server",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
{
|
|
14
14
|
"registryType": "npm",
|
|
15
15
|
"identifier": "posterly-mcp-server",
|
|
16
|
-
"version": "0.53.
|
|
16
|
+
"version": "0.53.2",
|
|
17
17
|
"transport": {
|
|
18
18
|
"type": "stdio"
|
|
19
19
|
},
|
package/tool-annotations.json
CHANGED
|
@@ -63,6 +63,7 @@
|
|
|
63
63
|
"pause_subscription",
|
|
64
64
|
"resume_subscription",
|
|
65
65
|
"downgrade_subscription",
|
|
66
|
+
"upgrade_subscription",
|
|
66
67
|
"manage_extra_account",
|
|
67
68
|
"get_updates"
|
|
68
69
|
],
|
|
@@ -115,6 +116,7 @@
|
|
|
115
116
|
"manage_publishing_pause",
|
|
116
117
|
"pause_subscription",
|
|
117
118
|
"downgrade_subscription",
|
|
119
|
+
"upgrade_subscription",
|
|
118
120
|
"manage_extra_account"
|
|
119
121
|
],
|
|
120
122
|
"idempotentMutationTools": [
|
|
@@ -128,6 +130,7 @@
|
|
|
128
130
|
"pause_subscription",
|
|
129
131
|
"resume_subscription",
|
|
130
132
|
"downgrade_subscription",
|
|
133
|
+
"upgrade_subscription",
|
|
131
134
|
"manage_extra_account"
|
|
132
135
|
],
|
|
133
136
|
"openWorldTools": [
|
|
@@ -171,6 +174,7 @@
|
|
|
171
174
|
"pause_subscription",
|
|
172
175
|
"resume_subscription",
|
|
173
176
|
"downgrade_subscription",
|
|
177
|
+
"upgrade_subscription",
|
|
174
178
|
"manage_extra_account",
|
|
175
179
|
"delete_post",
|
|
176
180
|
"submit_product_feedback"
|
package/tool-registry.json
CHANGED
|
@@ -1981,6 +1981,65 @@
|
|
|
1981
1981
|
"openWorld": true,
|
|
1982
1982
|
"confirm": "confirm"
|
|
1983
1983
|
},
|
|
1984
|
+
"upgrade_subscription": {
|
|
1985
|
+
"set": "billing",
|
|
1986
|
+
"label": "Upgrade subscription",
|
|
1987
|
+
"exception": {
|
|
1988
|
+
"category": "money",
|
|
1989
|
+
"reason": "Moving to a higher plan charges the saved card; read the plans and eligibility with get_subscription."
|
|
1990
|
+
},
|
|
1991
|
+
"selector": "params",
|
|
1992
|
+
"defaultMode": "upgrade",
|
|
1993
|
+
"actions": {
|
|
1994
|
+
"upgrade": {
|
|
1995
|
+
"label": "Upgrade to a higher plan",
|
|
1996
|
+
"destructive": true,
|
|
1997
|
+
"idempotent": true,
|
|
1998
|
+
"openWorld": true,
|
|
1999
|
+
"confirm": "preview",
|
|
2000
|
+
"nonce": true,
|
|
2001
|
+
"params": {
|
|
2002
|
+
"tier": {
|
|
2003
|
+
"type": "string",
|
|
2004
|
+
"enum": [
|
|
2005
|
+
"starter",
|
|
2006
|
+
"pro",
|
|
2007
|
+
"power_user",
|
|
2008
|
+
"agency"
|
|
2009
|
+
],
|
|
2010
|
+
"required": true
|
|
2011
|
+
},
|
|
2012
|
+
"interval": {
|
|
2013
|
+
"type": "string",
|
|
2014
|
+
"enum": [
|
|
2015
|
+
"month",
|
|
2016
|
+
"year"
|
|
2017
|
+
]
|
|
2018
|
+
},
|
|
2019
|
+
"workspace_id": {
|
|
2020
|
+
"type": "string"
|
|
2021
|
+
},
|
|
2022
|
+
"expected_current_tier": {
|
|
2023
|
+
"type": "string",
|
|
2024
|
+
"enum": [
|
|
2025
|
+
"starter",
|
|
2026
|
+
"pro",
|
|
2027
|
+
"power_user",
|
|
2028
|
+
"agency"
|
|
2029
|
+
]
|
|
2030
|
+
},
|
|
2031
|
+
"expected_interval": {
|
|
2032
|
+
"type": "string",
|
|
2033
|
+
"enum": [
|
|
2034
|
+
"week",
|
|
2035
|
+
"month",
|
|
2036
|
+
"year"
|
|
2037
|
+
]
|
|
2038
|
+
}
|
|
2039
|
+
}
|
|
2040
|
+
}
|
|
2041
|
+
}
|
|
2042
|
+
},
|
|
1984
2043
|
"manage_extra_account": {
|
|
1985
2044
|
"set": "billing",
|
|
1986
2045
|
"label": "Buy or remove extra accounts",
|