posterly-mcp-server 0.55.0 → 0.56.1
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 +11 -4
- package/dist/index.js +9 -1
- package/dist/lib/api-client.d.ts +21 -3
- package/dist/lib/api-client.js +26 -7
- package/dist/lib/id-schema.js +7 -1
- package/dist/lib/idempotency.d.ts +45 -0
- package/dist/lib/idempotency.js +83 -0
- package/dist/lib/version.d.ts +1 -1
- package/dist/lib/version.js +1 -1
- package/dist/tools/create-api-key.d.ts +3 -0
- package/dist/tools/create-api-key.js +3 -1
- package/dist/tools/create-post.d.ts +27 -0
- package/dist/tools/create-post.js +27 -8
- package/dist/tools/create-posts-batch.d.ts +16 -0
- package/dist/tools/create-posts-batch.js +25 -5
- package/dist/tools/generate-image.js +1 -1
- package/dist/tools/get-subscription.js +1 -1
- package/dist/tools/list-posts.js +1 -1
- package/dist/tools/manage-google-business-location.js +2 -2
- package/dist/tools/manage-plan.d.ts +21 -0
- package/dist/tools/manage-plan.js +65 -0
- package/dist/tools/manage-workspace-member.d.ts +4 -0
- package/dist/tools/manage-workspace-member.js +14 -1
- package/dist/tools/trigger-platform-helper.js +4 -1
- package/dist/tools/update-post.d.ts +8 -0
- package/dist/tools/update-post.js +8 -1
- package/dist/tools/validate-post.d.ts +16 -0
- package/package.json +2 -2
- package/server.json +2 -2
- package/tool-annotations.json +2 -0
- package/tool-registry.json +37 -1
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.
|
|
126
|
+
`posterly-mcp-server@0.56.1` exposes 74 tools covering 117 actions. The hosted HTTP endpoint exposes the same catalog minus the three signup tools: 71 tools covering 114 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
|
|
|
@@ -152,8 +152,8 @@ Accounts, posting, media, schedule, analytics, and support. What most assistants
|
|
|
152
152
|
| `submit_agent_feedback` | Agent feedback |
|
|
153
153
|
| `submit_product_feedback` | Product feedback |
|
|
154
154
|
| `validate_post` | Validate a post |
|
|
155
|
-
| `create_post` | Create a post |
|
|
156
|
-
| `create_posts_batch` | Create posts in bulk |
|
|
155
|
+
| `create_post` | Create a post (optional `idempotency_key` makes a retry safe) |
|
|
156
|
+
| `create_posts_batch` | Create posts in bulk (optional `idempotency_key`, also per item) |
|
|
157
157
|
| `get_x_posting_quota` | X posting quota |
|
|
158
158
|
| `create_signed_upload` | Signed upload link |
|
|
159
159
|
| `create_media_drop` | Media drop link |
|
|
@@ -421,6 +421,13 @@ Subscription changes and Agency extra accounts.
|
|
|
421
421
|
| `resume_subscription` | Resume subscription |
|
|
422
422
|
| `downgrade_subscription` | Downgrade subscription |
|
|
423
423
|
|
|
424
|
+
**`manage_plan`**: Plans and the confirm link
|
|
425
|
+
|
|
426
|
+
| Action | What it does |
|
|
427
|
+
| --- | --- |
|
|
428
|
+
| `list` | Plans, and while trialing the price of starting the paid plan today. Does not charge. Needs `billing:read` |
|
|
429
|
+
| `confirm_link` | Return a link the human opens. Does not charge. Needs `billing:read` |
|
|
430
|
+
|
|
424
431
|
**`upgrade_subscription`**: Upgrade subscription
|
|
425
432
|
|
|
426
433
|
| Action | What it does |
|
|
@@ -593,6 +600,6 @@ The package reads:
|
|
|
593
600
|
|
|
594
601
|
The optional directory profile provides 54 tools over HTTP or 57 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.
|
|
595
602
|
|
|
596
|
-
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
|
|
603
|
+
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 71 hosted tools and 75 local tools. This profile does not grant authorization, bypass scopes, or change the existing preview and confirmation checks.
|
|
597
604
|
|
|
598
605
|
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
|
@@ -28,6 +28,7 @@ import { managePublishingPauseTool } from './tools/manage-publishing-pause.js';
|
|
|
28
28
|
import { getCreditsTool } from './tools/get-credits.js';
|
|
29
29
|
import { posterlyStatusTool } from './tools/posterly-status.js';
|
|
30
30
|
import { getSubscriptionTool } from './tools/get-subscription.js';
|
|
31
|
+
import { managePlanTool } from './tools/manage-plan.js';
|
|
31
32
|
import { cancelSubscriptionTool } from './tools/cancel-subscription.js';
|
|
32
33
|
import { pauseSubscriptionTool } from './tools/pause-subscription.js';
|
|
33
34
|
import { resumeSubscriptionTool } from './tools/resume-subscription.js';
|
|
@@ -106,6 +107,7 @@ const STDIO_TOOLS = [
|
|
|
106
107
|
managePublishingPauseTool,
|
|
107
108
|
getCreditsTool,
|
|
108
109
|
getSubscriptionTool,
|
|
110
|
+
managePlanTool,
|
|
109
111
|
cancelSubscriptionTool,
|
|
110
112
|
pauseSubscriptionTool,
|
|
111
113
|
resumeSubscriptionTool,
|
|
@@ -199,7 +201,13 @@ const client = new PosterlyClient();
|
|
|
199
201
|
// The SDK only learns the connected client's identity (e.g. "claude-ai",
|
|
200
202
|
// "chatgpt") once the initialize handshake completes, so this is a resolver
|
|
201
203
|
// read fresh on every request rather than a value captured once here.
|
|
202
|
-
setMcpClientNameResolver(() =>
|
|
204
|
+
setMcpClientNameResolver(() => {
|
|
205
|
+
const info = server.server.getClientVersion();
|
|
206
|
+
if (!info?.name)
|
|
207
|
+
return undefined;
|
|
208
|
+
const version = typeof info.version === 'string' ? info.version.trim() : '';
|
|
209
|
+
return version ? `${info.name}/${version}` : info.name;
|
|
210
|
+
});
|
|
203
211
|
// Old tools' exact input schemas, keyed by alias name, from the merged tool
|
|
204
212
|
// modules that replaced them.
|
|
205
213
|
const LEGACY_SCHEMAS = new Map();
|
package/dist/lib/api-client.d.ts
CHANGED
|
@@ -332,6 +332,8 @@ export type CreatePostResponse = {
|
|
|
332
332
|
code: string;
|
|
333
333
|
message: string;
|
|
334
334
|
}>;
|
|
335
|
+
replayed?: boolean;
|
|
336
|
+
deduplicated?: boolean;
|
|
335
337
|
};
|
|
336
338
|
export type ValidatePostResponse = {
|
|
337
339
|
dry_run: true;
|
|
@@ -575,6 +577,7 @@ export type CreateApiKeyPayload = {
|
|
|
575
577
|
name?: string;
|
|
576
578
|
scopes?: ApiKeyScope[];
|
|
577
579
|
workspace_id?: string;
|
|
580
|
+
workspace_client_id?: string;
|
|
578
581
|
expires_in_days?: number;
|
|
579
582
|
confirm: true;
|
|
580
583
|
};
|
|
@@ -586,6 +589,7 @@ export type CreateApiKeyResponse = {
|
|
|
586
589
|
key_prefix: string;
|
|
587
590
|
scopes: ApiKeyScope[];
|
|
588
591
|
workspace_id?: string | null;
|
|
592
|
+
workspace_client_id?: string | null;
|
|
589
593
|
expires_at?: string | null;
|
|
590
594
|
created_at: string;
|
|
591
595
|
};
|
|
@@ -1549,7 +1553,9 @@ export declare class PosterlyClient {
|
|
|
1549
1553
|
role: WorkspaceMemberRole;
|
|
1550
1554
|
brand_ids?: string[];
|
|
1551
1555
|
resend?: boolean;
|
|
1552
|
-
} & WorkspaceMemberConfirmFields
|
|
1556
|
+
} & WorkspaceMemberConfirmFields, options?: {
|
|
1557
|
+
idempotencyKey?: string | null;
|
|
1558
|
+
}): Promise<WorkspaceMemberChangeResponse>;
|
|
1553
1559
|
updateWorkspaceMember(workspaceId: string, target: {
|
|
1554
1560
|
member_id?: string;
|
|
1555
1561
|
invite_id?: string;
|
|
@@ -1577,6 +1583,12 @@ export declare class PosterlyClient {
|
|
|
1577
1583
|
confirm: true;
|
|
1578
1584
|
}): Promise<PublishMissedResponse>;
|
|
1579
1585
|
getSubscription(): Promise<SubscriptionSummaryResponse>;
|
|
1586
|
+
listPlans(): Promise<Record<string, unknown>>;
|
|
1587
|
+
createPlanConfirmLink(data: {
|
|
1588
|
+
intent: 'start_paid_now' | 'change_plan';
|
|
1589
|
+
tier?: string;
|
|
1590
|
+
interval?: string;
|
|
1591
|
+
}): Promise<Record<string, unknown>>;
|
|
1580
1592
|
getCredits(): Promise<CreditsSummaryResponse>;
|
|
1581
1593
|
getStatus(): Promise<PosterlyStatusResponse>;
|
|
1582
1594
|
cancelSubscription(data: CancelSubscriptionPayload): Promise<CancelSubscriptionResponse>;
|
|
@@ -1742,12 +1754,18 @@ export declare class PosterlyClient {
|
|
|
1742
1754
|
}): Promise<ListPostsResponse>;
|
|
1743
1755
|
/** GET /posts/counts: exact totals per day, status, account, and brand for a scheduled range. */
|
|
1744
1756
|
countPosts(params: ListPostsParams): Promise<PostCountsResponse>;
|
|
1745
|
-
createPost(data: CreatePostPayload
|
|
1757
|
+
createPost(data: CreatePostPayload, options?: {
|
|
1758
|
+
idempotencyKey?: string | null;
|
|
1759
|
+
}): Promise<CreatePostResponse>;
|
|
1746
1760
|
validatePost(data: CreatePostPayload): Promise<ValidatePostResponse>;
|
|
1747
1761
|
submitAgentFeedback(data: AgentFeedbackPayload): Promise<AgentFeedbackResponse>;
|
|
1748
1762
|
submitProductFeedback(data: ProductFeedbackPayload): Promise<ProductFeedbackResponse>;
|
|
1749
1763
|
createPostsBatch(data: {
|
|
1750
|
-
posts: CreatePostPayload
|
|
1764
|
+
posts: Array<CreatePostPayload & {
|
|
1765
|
+
idempotency_key?: string;
|
|
1766
|
+
}>;
|
|
1767
|
+
}, options?: {
|
|
1768
|
+
idempotencyKey?: string | null;
|
|
1751
1769
|
}): Promise<BatchCreatePostsResponse>;
|
|
1752
1770
|
generateCaptions(data: GenerateCaptionsPayload): Promise<GenerateCaptionsResponse>;
|
|
1753
1771
|
askSupport(data: AskSupportPayload): Promise<AskSupportResponse>;
|
package/dist/lib/api-client.js
CHANGED
|
@@ -197,6 +197,10 @@ export class PosterlyClient {
|
|
|
197
197
|
const clientLabel = clientName ? sanitizeClientHeaderValue(clientName) : '';
|
|
198
198
|
if (clientLabel) {
|
|
199
199
|
headers['X-Posterly-Client'] = clientLabel;
|
|
200
|
+
headers['X-Client-Label'] = clientLabel;
|
|
201
|
+
}
|
|
202
|
+
if (options?.idempotencyKey) {
|
|
203
|
+
headers['Idempotency-Key'] = options.idempotencyKey;
|
|
200
204
|
}
|
|
201
205
|
const init = { method, headers };
|
|
202
206
|
if (body instanceof FormData) {
|
|
@@ -254,8 +258,10 @@ export class PosterlyClient {
|
|
|
254
258
|
async listWorkspaceMembers(workspaceId) {
|
|
255
259
|
return this.request('GET', `/workspaces/${encodeURIComponent(workspaceId)}/members`);
|
|
256
260
|
}
|
|
257
|
-
async inviteWorkspaceMember(workspaceId, data) {
|
|
258
|
-
return this.request('POST', `/workspaces/${encodeURIComponent(workspaceId)}/members`, data
|
|
261
|
+
async inviteWorkspaceMember(workspaceId, data, options) {
|
|
262
|
+
return this.request('POST', `/workspaces/${encodeURIComponent(workspaceId)}/members`, data, {
|
|
263
|
+
idempotencyKey: options?.idempotencyKey,
|
|
264
|
+
});
|
|
259
265
|
}
|
|
260
266
|
async updateWorkspaceMember(workspaceId, target, data) {
|
|
261
267
|
const base = `/workspaces/${encodeURIComponent(workspaceId)}`;
|
|
@@ -293,6 +299,12 @@ export class PosterlyClient {
|
|
|
293
299
|
async getSubscription() {
|
|
294
300
|
return this.request('GET', '/subscription');
|
|
295
301
|
}
|
|
302
|
+
async listPlans() {
|
|
303
|
+
return this.request('GET', '/subscription/plans');
|
|
304
|
+
}
|
|
305
|
+
async createPlanConfirmLink(data) {
|
|
306
|
+
return this.request('POST', '/subscription/plans', data);
|
|
307
|
+
}
|
|
296
308
|
async getCredits() {
|
|
297
309
|
return this.request('GET', '/credits');
|
|
298
310
|
}
|
|
@@ -467,8 +479,8 @@ export class PosterlyClient {
|
|
|
467
479
|
const qs = postFilterParams(params).toString();
|
|
468
480
|
return this.request('GET', `/posts/counts${qs ? `?${qs}` : ''}`);
|
|
469
481
|
}
|
|
470
|
-
async createPost(data) {
|
|
471
|
-
return this.request('POST', '/posts', data);
|
|
482
|
+
async createPost(data, options) {
|
|
483
|
+
return this.request('POST', '/posts', data, { idempotencyKey: options?.idempotencyKey });
|
|
472
484
|
}
|
|
473
485
|
async validatePost(data) {
|
|
474
486
|
return this.request('POST', '/posts', { ...data, dry_run: true });
|
|
@@ -479,8 +491,8 @@ export class PosterlyClient {
|
|
|
479
491
|
async submitProductFeedback(data) {
|
|
480
492
|
return this.request('POST', '/feedback', data);
|
|
481
493
|
}
|
|
482
|
-
async createPostsBatch(data) {
|
|
483
|
-
return this.request('POST', '/posts/batch', data);
|
|
494
|
+
async createPostsBatch(data, options) {
|
|
495
|
+
return this.request('POST', '/posts/batch', data, { idempotencyKey: options?.idempotencyKey });
|
|
484
496
|
}
|
|
485
497
|
async generateCaptions(data) {
|
|
486
498
|
return this.request('POST', '/ai/generate-captions', data);
|
|
@@ -1081,7 +1093,14 @@ function formatApiError(res, data) {
|
|
|
1081
1093
|
if (res.status === 403 && (data?.code === 'trial_feature_locked' || data?.code === 'trial_post_cap_reached')) {
|
|
1082
1094
|
// A free-trial limit: the message already carries the upgrade link. Say
|
|
1083
1095
|
// plainly that retrying cannot help, so an agent does not loop on it.
|
|
1084
|
-
return
|
|
1096
|
+
return message.includes('Retrying will not help')
|
|
1097
|
+
? message
|
|
1098
|
+
: `${message} Retrying will not help until the paid plan is started.`;
|
|
1099
|
+
}
|
|
1100
|
+
if (res.status === 429 && data?.trial_limit === true) {
|
|
1101
|
+
// The API message leads with starting the paid plan. Do not put the wait
|
|
1102
|
+
// or a raw unix reset in front of it.
|
|
1103
|
+
return message;
|
|
1085
1104
|
}
|
|
1086
1105
|
if (res.status !== 429) {
|
|
1087
1106
|
return message;
|
package/dist/lib/id-schema.js
CHANGED
|
@@ -35,6 +35,7 @@ export function loosenIdSchema(schema) {
|
|
|
35
35
|
const description = schema.description;
|
|
36
36
|
let next = schema;
|
|
37
37
|
if (schema instanceof z.ZodOptional) {
|
|
38
|
+
// Under Zod 4, unwrap() is typed as the core schema. The cast restores ZodType.
|
|
38
39
|
next = loosenIdSchema(schema.unwrap()).optional();
|
|
39
40
|
}
|
|
40
41
|
else if (schema instanceof z.ZodNullable) {
|
|
@@ -55,7 +56,12 @@ export function loosenIdSchema(schema) {
|
|
|
55
56
|
}
|
|
56
57
|
else if (schema instanceof z.ZodArray) {
|
|
57
58
|
// Keep the original def so .min()/.max() limits survive the loosening.
|
|
58
|
-
|
|
59
|
+
// Zod 3 stores the element on def.type. Zod 4 types that field as "array".
|
|
60
|
+
// The assertion is erased, so this is still new ZodArray({ ...def, type }).
|
|
61
|
+
next = new z.ZodArray({
|
|
62
|
+
...schema._def,
|
|
63
|
+
type: loosenIdSchema(schema.element),
|
|
64
|
+
});
|
|
59
65
|
}
|
|
60
66
|
return withDescription(next, description);
|
|
61
67
|
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/** How long an omitted key keeps an identical create on the original post. */
|
|
2
|
+
export declare const MCP_IDEMPOTENCY_WINDOW_MS: number;
|
|
3
|
+
/**
|
|
4
|
+
* Stable JSON with sorted object keys, so two calls that differ only in
|
|
5
|
+
* property order share a key. Undefined values are dropped. Matches the
|
|
6
|
+
* spirit of lib/api-idempotency.ts stableStringify.
|
|
7
|
+
*/
|
|
8
|
+
export declare function stableIdempotencyString(value: unknown): string;
|
|
9
|
+
/**
|
|
10
|
+
* A caller-supplied key, or null when they left it out. Blank is treated as
|
|
11
|
+
* omitted so a derived key can still protect the retry. Header values must
|
|
12
|
+
* be printable ASCII or Node's fetch throws before the request is sent.
|
|
13
|
+
*/
|
|
14
|
+
export declare function explicitIdempotencyKey(value: unknown): string | null;
|
|
15
|
+
/** Deterministic key for one normalised create, bucketed to a short window. */
|
|
16
|
+
export declare function deriveMcpIdempotencyKey(payload: unknown, nowMs?: number, windowMs?: number): string;
|
|
17
|
+
/** Caller key when present, otherwise the windowed hash of the payload. */
|
|
18
|
+
export declare function resolveMcpIdempotencyKey(explicit: unknown, payload: unknown, nowMs?: number): string;
|
|
19
|
+
export declare function resolveBatchIdempotency(input: {
|
|
20
|
+
batchKey: unknown;
|
|
21
|
+
items: Array<{
|
|
22
|
+
explicitKey: unknown;
|
|
23
|
+
payload: unknown;
|
|
24
|
+
}>;
|
|
25
|
+
nowMs?: number;
|
|
26
|
+
}): {
|
|
27
|
+
headerKey: string | null;
|
|
28
|
+
itemKeys: Array<string | null>;
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* Invite confirms are the other create that honours Idempotency-Key.
|
|
32
|
+
* Preview calls do not send one. A lost confirm retries inside the window
|
|
33
|
+
* instead of emailing the teammate twice.
|
|
34
|
+
*/
|
|
35
|
+
export declare function resolveInviteIdempotencyKey(input: {
|
|
36
|
+
explicit: unknown;
|
|
37
|
+
confirm: boolean;
|
|
38
|
+
workspaceId: string;
|
|
39
|
+
email: string;
|
|
40
|
+
role: string;
|
|
41
|
+
brandIds?: string[] | null;
|
|
42
|
+
resend?: boolean;
|
|
43
|
+
previewId?: string | null;
|
|
44
|
+
nowMs?: number;
|
|
45
|
+
}): string | null;
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { createHash } from 'node:crypto';
|
|
2
|
+
/** How long an omitted key keeps an identical create on the original post. */
|
|
3
|
+
export const MCP_IDEMPOTENCY_WINDOW_MS = 10 * 60 * 1000;
|
|
4
|
+
const MAX_KEY_LENGTH = 255;
|
|
5
|
+
/**
|
|
6
|
+
* Stable JSON with sorted object keys, so two calls that differ only in
|
|
7
|
+
* property order share a key. Undefined values are dropped. Matches the
|
|
8
|
+
* spirit of lib/api-idempotency.ts stableStringify.
|
|
9
|
+
*/
|
|
10
|
+
export function stableIdempotencyString(value) {
|
|
11
|
+
if (value === null || value === undefined)
|
|
12
|
+
return 'null';
|
|
13
|
+
if (Array.isArray(value)) {
|
|
14
|
+
return `[${value.map((entry) => stableIdempotencyString(entry)).join(',')}]`;
|
|
15
|
+
}
|
|
16
|
+
if (typeof value === 'object') {
|
|
17
|
+
const entries = Object.entries(value)
|
|
18
|
+
.filter(([, entry]) => entry !== undefined)
|
|
19
|
+
.sort(([left], [right]) => left.localeCompare(right));
|
|
20
|
+
return `{${entries.map(([key, entry]) => `${JSON.stringify(key)}:${stableIdempotencyString(entry)}`).join(',')}}`;
|
|
21
|
+
}
|
|
22
|
+
return JSON.stringify(value);
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* A caller-supplied key, or null when they left it out. Blank is treated as
|
|
26
|
+
* omitted so a derived key can still protect the retry. Header values must
|
|
27
|
+
* be printable ASCII or Node's fetch throws before the request is sent.
|
|
28
|
+
*/
|
|
29
|
+
export function explicitIdempotencyKey(value) {
|
|
30
|
+
if (value === undefined || value === null)
|
|
31
|
+
return null;
|
|
32
|
+
if (typeof value !== 'string') {
|
|
33
|
+
throw new Error('idempotency_key must be a string of 255 printable ASCII characters or fewer.');
|
|
34
|
+
}
|
|
35
|
+
const trimmed = value.trim();
|
|
36
|
+
if (!trimmed)
|
|
37
|
+
return null;
|
|
38
|
+
if (trimmed.length > MAX_KEY_LENGTH || /[^\x20-\x7e]/.test(trimmed)) {
|
|
39
|
+
throw new Error('idempotency_key must be a string of 255 printable ASCII characters or fewer.');
|
|
40
|
+
}
|
|
41
|
+
return trimmed;
|
|
42
|
+
}
|
|
43
|
+
/** Deterministic key for one normalised create, bucketed to a short window. */
|
|
44
|
+
export function deriveMcpIdempotencyKey(payload, nowMs = Date.now(), windowMs = MCP_IDEMPOTENCY_WINDOW_MS) {
|
|
45
|
+
const bucket = Math.floor(nowMs / windowMs);
|
|
46
|
+
const hash = createHash('sha256').update(stableIdempotencyString(payload)).digest('hex');
|
|
47
|
+
return `mcp-auto:${hash}:${bucket}`;
|
|
48
|
+
}
|
|
49
|
+
/** Caller key when present, otherwise the windowed hash of the payload. */
|
|
50
|
+
export function resolveMcpIdempotencyKey(explicit, payload, nowMs) {
|
|
51
|
+
return explicitIdempotencyKey(explicit) ?? deriveMcpIdempotencyKey(payload, nowMs);
|
|
52
|
+
}
|
|
53
|
+
export function resolveBatchIdempotency(input) {
|
|
54
|
+
const headerKey = explicitIdempotencyKey(input.batchKey);
|
|
55
|
+
if (headerKey) {
|
|
56
|
+
return {
|
|
57
|
+
headerKey,
|
|
58
|
+
itemKeys: input.items.map((item) => explicitIdempotencyKey(item.explicitKey)),
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
return {
|
|
62
|
+
headerKey: null,
|
|
63
|
+
itemKeys: input.items.map((item) => (explicitIdempotencyKey(item.explicitKey) ?? deriveMcpIdempotencyKey(item.payload, input.nowMs))),
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Invite confirms are the other create that honours Idempotency-Key.
|
|
68
|
+
* Preview calls do not send one. A lost confirm retries inside the window
|
|
69
|
+
* instead of emailing the teammate twice.
|
|
70
|
+
*/
|
|
71
|
+
export function resolveInviteIdempotencyKey(input) {
|
|
72
|
+
if (input.confirm !== true)
|
|
73
|
+
return null;
|
|
74
|
+
return resolveMcpIdempotencyKey(input.explicit, {
|
|
75
|
+
action: 'invite',
|
|
76
|
+
workspace_id: input.workspaceId,
|
|
77
|
+
email: input.email.trim().toLowerCase(),
|
|
78
|
+
role: input.role,
|
|
79
|
+
brand_ids: input.brandIds ? [...input.brandIds].sort() : null,
|
|
80
|
+
resend: input.resend === true,
|
|
81
|
+
preview_id: input.previewId || null,
|
|
82
|
+
}, input.nowMs);
|
|
83
|
+
}
|
package/dist/lib/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const POSTERLY_MCP_VERSION = "0.
|
|
1
|
+
export declare const POSTERLY_MCP_VERSION = "0.56.1";
|
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.
|
|
8
|
+
export const POSTERLY_MCP_VERSION = '0.56.1';
|
|
@@ -7,6 +7,7 @@ export declare const createApiKeyTool: {
|
|
|
7
7
|
name: z.ZodOptional<z.ZodString>;
|
|
8
8
|
scopes: z.ZodOptional<z.ZodArray<z.ZodEnum<["accounts:read", "accounts:write", "posts:read", "posts:write", "media:write", "analytics:read", "billing:read", "billing:write"]>, "many">>;
|
|
9
9
|
workspace_id: z.ZodOptional<z.ZodString>;
|
|
10
|
+
workspace_client_id: z.ZodOptional<z.ZodString>;
|
|
10
11
|
expires_in_days: z.ZodOptional<z.ZodNumber>;
|
|
11
12
|
confirm: z.ZodLiteral<true>;
|
|
12
13
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -14,12 +15,14 @@ export declare const createApiKeyTool: {
|
|
|
14
15
|
workspace_id?: string | undefined;
|
|
15
16
|
name?: string | undefined;
|
|
16
17
|
scopes?: ("accounts:read" | "accounts:write" | "posts:read" | "posts:write" | "media:write" | "analytics:read" | "billing:read" | "billing:write")[] | undefined;
|
|
18
|
+
workspace_client_id?: string | undefined;
|
|
17
19
|
expires_in_days?: number | undefined;
|
|
18
20
|
}, {
|
|
19
21
|
confirm: true;
|
|
20
22
|
workspace_id?: string | undefined;
|
|
21
23
|
name?: string | undefined;
|
|
22
24
|
scopes?: ("accounts:read" | "accounts:write" | "posts:read" | "posts:write" | "media:write" | "analytics:read" | "billing:read" | "billing:write")[] | undefined;
|
|
25
|
+
workspace_client_id?: string | undefined;
|
|
23
26
|
expires_in_days?: number | undefined;
|
|
24
27
|
}>;
|
|
25
28
|
execute(client: PosterlyClient, input: CreateApiKeyPayload): Promise<string>;
|
|
@@ -12,6 +12,7 @@ function formatCreatedApiKey(result) {
|
|
|
12
12
|
['Prefix', code(key.key_prefix)],
|
|
13
13
|
['Scopes', key.scopes.join(', ')],
|
|
14
14
|
['Workspace', key.workspace_id ? code(key.workspace_id) : 'all accessible workspaces'],
|
|
15
|
+
['Brand', key.workspace_client_id ? code(key.workspace_client_id) : 'all brands in the workspace'],
|
|
15
16
|
['Expires', key.expires_at || 'no expiry'],
|
|
16
17
|
['Remaining key slots', result.limits?.remaining_user_keys ?? 'unknown'],
|
|
17
18
|
])),
|
|
@@ -20,11 +21,12 @@ function formatCreatedApiKey(result) {
|
|
|
20
21
|
}
|
|
21
22
|
export const createApiKeyTool = {
|
|
22
23
|
name: 'create_api_key',
|
|
23
|
-
description: 'Create a new posterly API key for the authenticated user. SECRET-CREATING WRITE: only use after explicit user confirmation. The new key can only request scopes already present on the calling dashboard-created API key; OAuth and managed assistant tokens cannot mint keys. Team management (members:read, members:write) and client portal sign-in link permissions are never copied or granted here: a person turns them on in /dashboard/api.',
|
|
24
|
+
description: 'Create a new posterly API key for the authenticated user. SECRET-CREATING WRITE: only use after explicit user confirmation. The new key can only request scopes already present on the calling dashboard-created API key; OAuth and managed assistant tokens cannot mint keys. Team management (members:read, members:write) and client portal sign-in link permissions are never copied or granted here: a person turns them on in /dashboard/api. Optional workspace_client_id limits the new key to one brand in the workspace. Omit it for a workspace-wide key. A key that is already limited to one brand cannot create keys.',
|
|
24
25
|
inputSchema: z.object({
|
|
25
26
|
name: z.string().trim().min(1).max(120).optional().describe('Human-readable key name.'),
|
|
26
27
|
scopes: z.array(scopeSchema).min(1).max(8).optional().describe('Scopes for the new key. Omit to copy the calling key scopes. Cannot exceed the calling key scopes. billing:read and billing:write allow managing the posterly subscription (cancel/pause/resume/downgrade).'),
|
|
27
28
|
workspace_id: z.string().trim().min(1).optional().describe('Optional workspace restriction. Workspace-scoped calling keys cannot create keys outside their workspace.'),
|
|
29
|
+
workspace_client_id: z.string().trim().min(1).optional().describe('Optional brand (workspace client id) in that workspace. Omit for a key that can see every brand. A key limited to one brand cannot create keys.'),
|
|
28
30
|
expires_in_days: z.number().int().min(1).max(365).optional().describe('Optional expiry from now, up to 365 days. Omit for no expiry.'),
|
|
29
31
|
confirm: z.literal(true).describe('Must be true after the user explicitly confirms that a new secret API key should be created.'),
|
|
30
32
|
}),
|
|
@@ -303,6 +303,7 @@ export declare const platformSettingsSchema: z.ZodObject<{
|
|
|
303
303
|
content_call_to_action_label: z.ZodOptional<z.ZodEnum<["APPLY", "DOWNLOAD", "VIEW_QUOTE", "LEARN_MORE", "SIGN_UP", "SUBSCRIBE", "REGISTER", "JOIN", "ATTEND", "REQUEST_DEMO", "SEE_MORE", "BUY_NOW", "SHOP_NOW"]>>;
|
|
304
304
|
content_landing_page: z.ZodOptional<z.ZodString>;
|
|
305
305
|
privacy_level: z.ZodOptional<z.ZodString>;
|
|
306
|
+
post_mode: z.ZodOptional<z.ZodEnum<["auto", "inbox"]>>;
|
|
306
307
|
allow_comment: z.ZodOptional<z.ZodBoolean>;
|
|
307
308
|
allow_duet: z.ZodOptional<z.ZodBoolean>;
|
|
308
309
|
allow_stitch: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -452,6 +453,7 @@ export declare const platformSettingsSchema: z.ZodObject<{
|
|
|
452
453
|
content_call_to_action_label: z.ZodOptional<z.ZodEnum<["APPLY", "DOWNLOAD", "VIEW_QUOTE", "LEARN_MORE", "SIGN_UP", "SUBSCRIBE", "REGISTER", "JOIN", "ATTEND", "REQUEST_DEMO", "SEE_MORE", "BUY_NOW", "SHOP_NOW"]>>;
|
|
453
454
|
content_landing_page: z.ZodOptional<z.ZodString>;
|
|
454
455
|
privacy_level: z.ZodOptional<z.ZodString>;
|
|
456
|
+
post_mode: z.ZodOptional<z.ZodEnum<["auto", "inbox"]>>;
|
|
455
457
|
allow_comment: z.ZodOptional<z.ZodBoolean>;
|
|
456
458
|
allow_duet: z.ZodOptional<z.ZodBoolean>;
|
|
457
459
|
allow_stitch: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -601,6 +603,7 @@ export declare const platformSettingsSchema: z.ZodObject<{
|
|
|
601
603
|
content_call_to_action_label: z.ZodOptional<z.ZodEnum<["APPLY", "DOWNLOAD", "VIEW_QUOTE", "LEARN_MORE", "SIGN_UP", "SUBSCRIBE", "REGISTER", "JOIN", "ATTEND", "REQUEST_DEMO", "SEE_MORE", "BUY_NOW", "SHOP_NOW"]>>;
|
|
602
604
|
content_landing_page: z.ZodOptional<z.ZodString>;
|
|
603
605
|
privacy_level: z.ZodOptional<z.ZodString>;
|
|
606
|
+
post_mode: z.ZodOptional<z.ZodEnum<["auto", "inbox"]>>;
|
|
604
607
|
allow_comment: z.ZodOptional<z.ZodBoolean>;
|
|
605
608
|
allow_duet: z.ZodOptional<z.ZodBoolean>;
|
|
606
609
|
allow_stitch: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -983,6 +986,7 @@ export declare const createPostPayloadInputSchema: z.ZodObject<{
|
|
|
983
986
|
content_call_to_action_label: z.ZodOptional<z.ZodEnum<["APPLY", "DOWNLOAD", "VIEW_QUOTE", "LEARN_MORE", "SIGN_UP", "SUBSCRIBE", "REGISTER", "JOIN", "ATTEND", "REQUEST_DEMO", "SEE_MORE", "BUY_NOW", "SHOP_NOW"]>>;
|
|
984
987
|
content_landing_page: z.ZodOptional<z.ZodString>;
|
|
985
988
|
privacy_level: z.ZodOptional<z.ZodString>;
|
|
989
|
+
post_mode: z.ZodOptional<z.ZodEnum<["auto", "inbox"]>>;
|
|
986
990
|
allow_comment: z.ZodOptional<z.ZodBoolean>;
|
|
987
991
|
allow_duet: z.ZodOptional<z.ZodBoolean>;
|
|
988
992
|
allow_stitch: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -1132,6 +1136,7 @@ export declare const createPostPayloadInputSchema: z.ZodObject<{
|
|
|
1132
1136
|
content_call_to_action_label: z.ZodOptional<z.ZodEnum<["APPLY", "DOWNLOAD", "VIEW_QUOTE", "LEARN_MORE", "SIGN_UP", "SUBSCRIBE", "REGISTER", "JOIN", "ATTEND", "REQUEST_DEMO", "SEE_MORE", "BUY_NOW", "SHOP_NOW"]>>;
|
|
1133
1137
|
content_landing_page: z.ZodOptional<z.ZodString>;
|
|
1134
1138
|
privacy_level: z.ZodOptional<z.ZodString>;
|
|
1139
|
+
post_mode: z.ZodOptional<z.ZodEnum<["auto", "inbox"]>>;
|
|
1135
1140
|
allow_comment: z.ZodOptional<z.ZodBoolean>;
|
|
1136
1141
|
allow_duet: z.ZodOptional<z.ZodBoolean>;
|
|
1137
1142
|
allow_stitch: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -1281,6 +1286,7 @@ export declare const createPostPayloadInputSchema: z.ZodObject<{
|
|
|
1281
1286
|
content_call_to_action_label: z.ZodOptional<z.ZodEnum<["APPLY", "DOWNLOAD", "VIEW_QUOTE", "LEARN_MORE", "SIGN_UP", "SUBSCRIBE", "REGISTER", "JOIN", "ATTEND", "REQUEST_DEMO", "SEE_MORE", "BUY_NOW", "SHOP_NOW"]>>;
|
|
1282
1287
|
content_landing_page: z.ZodOptional<z.ZodString>;
|
|
1283
1288
|
privacy_level: z.ZodOptional<z.ZodString>;
|
|
1289
|
+
post_mode: z.ZodOptional<z.ZodEnum<["auto", "inbox"]>>;
|
|
1284
1290
|
allow_comment: z.ZodOptional<z.ZodBoolean>;
|
|
1285
1291
|
allow_duet: z.ZodOptional<z.ZodBoolean>;
|
|
1286
1292
|
allow_stitch: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -1351,6 +1357,7 @@ export declare const createPostPayloadInputSchema: z.ZodObject<{
|
|
|
1351
1357
|
ai_generated: z.ZodOptional<z.ZodBoolean>;
|
|
1352
1358
|
}, z.ZodTypeAny, "passthrough">>>;
|
|
1353
1359
|
workspace_id: z.ZodOptional<z.ZodString>;
|
|
1360
|
+
idempotency_key: z.ZodOptional<z.ZodString>;
|
|
1354
1361
|
}, "strip", z.ZodTypeAny, {
|
|
1355
1362
|
platform?: "instagram" | "instagram-standalone" | "facebook" | "tiktok" | "twitter" | "threads" | "linkedin" | "youtube" | "pinterest" | "google_business" | "x" | "bluesky" | "telegram" | "discord" | "wordpress" | "devto" | "hashnode" | "lemmy" | "slack" | "mastodon" | "gmb" | "google-business" | "google_business_profile" | undefined;
|
|
1356
1363
|
account_id?: string | undefined;
|
|
@@ -1361,6 +1368,7 @@ export declare const createPostPayloadInputSchema: z.ZodObject<{
|
|
|
1361
1368
|
media_url?: string | undefined;
|
|
1362
1369
|
media_urls?: string[] | undefined;
|
|
1363
1370
|
post_type?: string | undefined;
|
|
1371
|
+
idempotency_key?: string | undefined;
|
|
1364
1372
|
thread_posts?: string[] | undefined;
|
|
1365
1373
|
instagram_settings?: {
|
|
1366
1374
|
post_type?: "post" | "feed" | "story" | "reel" | "carousel" | undefined;
|
|
@@ -1493,6 +1501,7 @@ export declare const createPostPayloadInputSchema: z.ZodObject<{
|
|
|
1493
1501
|
content_call_to_action_label: z.ZodOptional<z.ZodEnum<["APPLY", "DOWNLOAD", "VIEW_QUOTE", "LEARN_MORE", "SIGN_UP", "SUBSCRIBE", "REGISTER", "JOIN", "ATTEND", "REQUEST_DEMO", "SEE_MORE", "BUY_NOW", "SHOP_NOW"]>>;
|
|
1494
1502
|
content_landing_page: z.ZodOptional<z.ZodString>;
|
|
1495
1503
|
privacy_level: z.ZodOptional<z.ZodString>;
|
|
1504
|
+
post_mode: z.ZodOptional<z.ZodEnum<["auto", "inbox"]>>;
|
|
1496
1505
|
allow_comment: z.ZodOptional<z.ZodBoolean>;
|
|
1497
1506
|
allow_duet: z.ZodOptional<z.ZodBoolean>;
|
|
1498
1507
|
allow_stitch: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -1572,6 +1581,7 @@ export declare const createPostPayloadInputSchema: z.ZodObject<{
|
|
|
1572
1581
|
media_url?: string | undefined;
|
|
1573
1582
|
media_urls?: string[] | undefined;
|
|
1574
1583
|
post_type?: string | undefined;
|
|
1584
|
+
idempotency_key?: string | undefined;
|
|
1575
1585
|
thread_posts?: string[] | undefined;
|
|
1576
1586
|
instagram_settings?: {
|
|
1577
1587
|
post_type?: "post" | "feed" | "story" | "reel" | "carousel" | undefined;
|
|
@@ -1704,6 +1714,7 @@ export declare const createPostPayloadInputSchema: z.ZodObject<{
|
|
|
1704
1714
|
content_call_to_action_label: z.ZodOptional<z.ZodEnum<["APPLY", "DOWNLOAD", "VIEW_QUOTE", "LEARN_MORE", "SIGN_UP", "SUBSCRIBE", "REGISTER", "JOIN", "ATTEND", "REQUEST_DEMO", "SEE_MORE", "BUY_NOW", "SHOP_NOW"]>>;
|
|
1705
1715
|
content_landing_page: z.ZodOptional<z.ZodString>;
|
|
1706
1716
|
privacy_level: z.ZodOptional<z.ZodString>;
|
|
1717
|
+
post_mode: z.ZodOptional<z.ZodEnum<["auto", "inbox"]>>;
|
|
1707
1718
|
allow_comment: z.ZodOptional<z.ZodBoolean>;
|
|
1708
1719
|
allow_duet: z.ZodOptional<z.ZodBoolean>;
|
|
1709
1720
|
allow_stitch: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -2087,6 +2098,7 @@ export declare const createPostInputSchema: z.ZodObject<{
|
|
|
2087
2098
|
content_call_to_action_label: z.ZodOptional<z.ZodEnum<["APPLY", "DOWNLOAD", "VIEW_QUOTE", "LEARN_MORE", "SIGN_UP", "SUBSCRIBE", "REGISTER", "JOIN", "ATTEND", "REQUEST_DEMO", "SEE_MORE", "BUY_NOW", "SHOP_NOW"]>>;
|
|
2088
2099
|
content_landing_page: z.ZodOptional<z.ZodString>;
|
|
2089
2100
|
privacy_level: z.ZodOptional<z.ZodString>;
|
|
2101
|
+
post_mode: z.ZodOptional<z.ZodEnum<["auto", "inbox"]>>;
|
|
2090
2102
|
allow_comment: z.ZodOptional<z.ZodBoolean>;
|
|
2091
2103
|
allow_duet: z.ZodOptional<z.ZodBoolean>;
|
|
2092
2104
|
allow_stitch: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -2236,6 +2248,7 @@ export declare const createPostInputSchema: z.ZodObject<{
|
|
|
2236
2248
|
content_call_to_action_label: z.ZodOptional<z.ZodEnum<["APPLY", "DOWNLOAD", "VIEW_QUOTE", "LEARN_MORE", "SIGN_UP", "SUBSCRIBE", "REGISTER", "JOIN", "ATTEND", "REQUEST_DEMO", "SEE_MORE", "BUY_NOW", "SHOP_NOW"]>>;
|
|
2237
2249
|
content_landing_page: z.ZodOptional<z.ZodString>;
|
|
2238
2250
|
privacy_level: z.ZodOptional<z.ZodString>;
|
|
2251
|
+
post_mode: z.ZodOptional<z.ZodEnum<["auto", "inbox"]>>;
|
|
2239
2252
|
allow_comment: z.ZodOptional<z.ZodBoolean>;
|
|
2240
2253
|
allow_duet: z.ZodOptional<z.ZodBoolean>;
|
|
2241
2254
|
allow_stitch: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -2385,6 +2398,7 @@ export declare const createPostInputSchema: z.ZodObject<{
|
|
|
2385
2398
|
content_call_to_action_label: z.ZodOptional<z.ZodEnum<["APPLY", "DOWNLOAD", "VIEW_QUOTE", "LEARN_MORE", "SIGN_UP", "SUBSCRIBE", "REGISTER", "JOIN", "ATTEND", "REQUEST_DEMO", "SEE_MORE", "BUY_NOW", "SHOP_NOW"]>>;
|
|
2386
2399
|
content_landing_page: z.ZodOptional<z.ZodString>;
|
|
2387
2400
|
privacy_level: z.ZodOptional<z.ZodString>;
|
|
2401
|
+
post_mode: z.ZodOptional<z.ZodEnum<["auto", "inbox"]>>;
|
|
2388
2402
|
allow_comment: z.ZodOptional<z.ZodBoolean>;
|
|
2389
2403
|
allow_duet: z.ZodOptional<z.ZodBoolean>;
|
|
2390
2404
|
allow_stitch: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -2455,6 +2469,7 @@ export declare const createPostInputSchema: z.ZodObject<{
|
|
|
2455
2469
|
ai_generated: z.ZodOptional<z.ZodBoolean>;
|
|
2456
2470
|
}, z.ZodTypeAny, "passthrough">>>;
|
|
2457
2471
|
workspace_id: z.ZodOptional<z.ZodString>;
|
|
2472
|
+
idempotency_key: z.ZodOptional<z.ZodString>;
|
|
2458
2473
|
} & {
|
|
2459
2474
|
confirm: z.ZodLiteral<true>;
|
|
2460
2475
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -2468,6 +2483,7 @@ export declare const createPostInputSchema: z.ZodObject<{
|
|
|
2468
2483
|
media_url?: string | undefined;
|
|
2469
2484
|
media_urls?: string[] | undefined;
|
|
2470
2485
|
post_type?: string | undefined;
|
|
2486
|
+
idempotency_key?: string | undefined;
|
|
2471
2487
|
thread_posts?: string[] | undefined;
|
|
2472
2488
|
instagram_settings?: {
|
|
2473
2489
|
post_type?: "post" | "feed" | "story" | "reel" | "carousel" | undefined;
|
|
@@ -2600,6 +2616,7 @@ export declare const createPostInputSchema: z.ZodObject<{
|
|
|
2600
2616
|
content_call_to_action_label: z.ZodOptional<z.ZodEnum<["APPLY", "DOWNLOAD", "VIEW_QUOTE", "LEARN_MORE", "SIGN_UP", "SUBSCRIBE", "REGISTER", "JOIN", "ATTEND", "REQUEST_DEMO", "SEE_MORE", "BUY_NOW", "SHOP_NOW"]>>;
|
|
2601
2617
|
content_landing_page: z.ZodOptional<z.ZodString>;
|
|
2602
2618
|
privacy_level: z.ZodOptional<z.ZodString>;
|
|
2619
|
+
post_mode: z.ZodOptional<z.ZodEnum<["auto", "inbox"]>>;
|
|
2603
2620
|
allow_comment: z.ZodOptional<z.ZodBoolean>;
|
|
2604
2621
|
allow_duet: z.ZodOptional<z.ZodBoolean>;
|
|
2605
2622
|
allow_stitch: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -2680,6 +2697,7 @@ export declare const createPostInputSchema: z.ZodObject<{
|
|
|
2680
2697
|
media_url?: string | undefined;
|
|
2681
2698
|
media_urls?: string[] | undefined;
|
|
2682
2699
|
post_type?: string | undefined;
|
|
2700
|
+
idempotency_key?: string | undefined;
|
|
2683
2701
|
thread_posts?: string[] | undefined;
|
|
2684
2702
|
instagram_settings?: {
|
|
2685
2703
|
post_type?: "post" | "feed" | "story" | "reel" | "carousel" | undefined;
|
|
@@ -2812,6 +2830,7 @@ export declare const createPostInputSchema: z.ZodObject<{
|
|
|
2812
2830
|
content_call_to_action_label: z.ZodOptional<z.ZodEnum<["APPLY", "DOWNLOAD", "VIEW_QUOTE", "LEARN_MORE", "SIGN_UP", "SUBSCRIBE", "REGISTER", "JOIN", "ATTEND", "REQUEST_DEMO", "SEE_MORE", "BUY_NOW", "SHOP_NOW"]>>;
|
|
2813
2831
|
content_landing_page: z.ZodOptional<z.ZodString>;
|
|
2814
2832
|
privacy_level: z.ZodOptional<z.ZodString>;
|
|
2833
|
+
post_mode: z.ZodOptional<z.ZodEnum<["auto", "inbox"]>>;
|
|
2815
2834
|
allow_comment: z.ZodOptional<z.ZodBoolean>;
|
|
2816
2835
|
allow_duet: z.ZodOptional<z.ZodBoolean>;
|
|
2817
2836
|
allow_stitch: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -3224,6 +3243,7 @@ export declare const createPostTool: {
|
|
|
3224
3243
|
content_call_to_action_label: z.ZodOptional<z.ZodEnum<["APPLY", "DOWNLOAD", "VIEW_QUOTE", "LEARN_MORE", "SIGN_UP", "SUBSCRIBE", "REGISTER", "JOIN", "ATTEND", "REQUEST_DEMO", "SEE_MORE", "BUY_NOW", "SHOP_NOW"]>>;
|
|
3225
3244
|
content_landing_page: z.ZodOptional<z.ZodString>;
|
|
3226
3245
|
privacy_level: z.ZodOptional<z.ZodString>;
|
|
3246
|
+
post_mode: z.ZodOptional<z.ZodEnum<["auto", "inbox"]>>;
|
|
3227
3247
|
allow_comment: z.ZodOptional<z.ZodBoolean>;
|
|
3228
3248
|
allow_duet: z.ZodOptional<z.ZodBoolean>;
|
|
3229
3249
|
allow_stitch: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -3373,6 +3393,7 @@ export declare const createPostTool: {
|
|
|
3373
3393
|
content_call_to_action_label: z.ZodOptional<z.ZodEnum<["APPLY", "DOWNLOAD", "VIEW_QUOTE", "LEARN_MORE", "SIGN_UP", "SUBSCRIBE", "REGISTER", "JOIN", "ATTEND", "REQUEST_DEMO", "SEE_MORE", "BUY_NOW", "SHOP_NOW"]>>;
|
|
3374
3394
|
content_landing_page: z.ZodOptional<z.ZodString>;
|
|
3375
3395
|
privacy_level: z.ZodOptional<z.ZodString>;
|
|
3396
|
+
post_mode: z.ZodOptional<z.ZodEnum<["auto", "inbox"]>>;
|
|
3376
3397
|
allow_comment: z.ZodOptional<z.ZodBoolean>;
|
|
3377
3398
|
allow_duet: z.ZodOptional<z.ZodBoolean>;
|
|
3378
3399
|
allow_stitch: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -3522,6 +3543,7 @@ export declare const createPostTool: {
|
|
|
3522
3543
|
content_call_to_action_label: z.ZodOptional<z.ZodEnum<["APPLY", "DOWNLOAD", "VIEW_QUOTE", "LEARN_MORE", "SIGN_UP", "SUBSCRIBE", "REGISTER", "JOIN", "ATTEND", "REQUEST_DEMO", "SEE_MORE", "BUY_NOW", "SHOP_NOW"]>>;
|
|
3523
3544
|
content_landing_page: z.ZodOptional<z.ZodString>;
|
|
3524
3545
|
privacy_level: z.ZodOptional<z.ZodString>;
|
|
3546
|
+
post_mode: z.ZodOptional<z.ZodEnum<["auto", "inbox"]>>;
|
|
3525
3547
|
allow_comment: z.ZodOptional<z.ZodBoolean>;
|
|
3526
3548
|
allow_duet: z.ZodOptional<z.ZodBoolean>;
|
|
3527
3549
|
allow_stitch: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -3592,6 +3614,7 @@ export declare const createPostTool: {
|
|
|
3592
3614
|
ai_generated: z.ZodOptional<z.ZodBoolean>;
|
|
3593
3615
|
}, z.ZodTypeAny, "passthrough">>>;
|
|
3594
3616
|
workspace_id: z.ZodOptional<z.ZodString>;
|
|
3617
|
+
idempotency_key: z.ZodOptional<z.ZodString>;
|
|
3595
3618
|
} & {
|
|
3596
3619
|
confirm: z.ZodLiteral<true>;
|
|
3597
3620
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -3605,6 +3628,7 @@ export declare const createPostTool: {
|
|
|
3605
3628
|
media_url?: string | undefined;
|
|
3606
3629
|
media_urls?: string[] | undefined;
|
|
3607
3630
|
post_type?: string | undefined;
|
|
3631
|
+
idempotency_key?: string | undefined;
|
|
3608
3632
|
thread_posts?: string[] | undefined;
|
|
3609
3633
|
instagram_settings?: {
|
|
3610
3634
|
post_type?: "post" | "feed" | "story" | "reel" | "carousel" | undefined;
|
|
@@ -3737,6 +3761,7 @@ export declare const createPostTool: {
|
|
|
3737
3761
|
content_call_to_action_label: z.ZodOptional<z.ZodEnum<["APPLY", "DOWNLOAD", "VIEW_QUOTE", "LEARN_MORE", "SIGN_UP", "SUBSCRIBE", "REGISTER", "JOIN", "ATTEND", "REQUEST_DEMO", "SEE_MORE", "BUY_NOW", "SHOP_NOW"]>>;
|
|
3738
3762
|
content_landing_page: z.ZodOptional<z.ZodString>;
|
|
3739
3763
|
privacy_level: z.ZodOptional<z.ZodString>;
|
|
3764
|
+
post_mode: z.ZodOptional<z.ZodEnum<["auto", "inbox"]>>;
|
|
3740
3765
|
allow_comment: z.ZodOptional<z.ZodBoolean>;
|
|
3741
3766
|
allow_duet: z.ZodOptional<z.ZodBoolean>;
|
|
3742
3767
|
allow_stitch: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -3817,6 +3842,7 @@ export declare const createPostTool: {
|
|
|
3817
3842
|
media_url?: string | undefined;
|
|
3818
3843
|
media_urls?: string[] | undefined;
|
|
3819
3844
|
post_type?: string | undefined;
|
|
3845
|
+
idempotency_key?: string | undefined;
|
|
3820
3846
|
thread_posts?: string[] | undefined;
|
|
3821
3847
|
instagram_settings?: {
|
|
3822
3848
|
post_type?: "post" | "feed" | "story" | "reel" | "carousel" | undefined;
|
|
@@ -3949,6 +3975,7 @@ export declare const createPostTool: {
|
|
|
3949
3975
|
content_call_to_action_label: z.ZodOptional<z.ZodEnum<["APPLY", "DOWNLOAD", "VIEW_QUOTE", "LEARN_MORE", "SIGN_UP", "SUBSCRIBE", "REGISTER", "JOIN", "ATTEND", "REQUEST_DEMO", "SEE_MORE", "BUY_NOW", "SHOP_NOW"]>>;
|
|
3950
3976
|
content_landing_page: z.ZodOptional<z.ZodString>;
|
|
3951
3977
|
privacy_level: z.ZodOptional<z.ZodString>;
|
|
3978
|
+
post_mode: z.ZodOptional<z.ZodEnum<["auto", "inbox"]>>;
|
|
3952
3979
|
allow_comment: z.ZodOptional<z.ZodBoolean>;
|
|
3953
3980
|
allow_duet: z.ZodOptional<z.ZodBoolean>;
|
|
3954
3981
|
allow_stitch: z.ZodOptional<z.ZodBoolean>;
|