@smartlyqofficial/node 0.1.10 → 0.1.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -412,7 +412,7 @@ type SocialPostCreateRequest = {
412
412
  */
413
413
  allow_duplicates?: boolean;
414
414
  /**
415
- * Per-platform composer options - the same payload the web composer stores; publish handlers read it as-is (unknown keys are ignored, max 20KB). Keyed by platform, e.g. {"tiktok": {"privacy_level": "SELF_ONLY"}, "instagram": {"content": "IG-specific caption"}, "_thumbnail": {"timestamp_ms": 3000}}. Common keys: per-platform `content` override; tiktok privacy/duet/stitch options; `_thumbnail` custom video cover.
415
+ * Per-platform composer options - the same payload the web composer stores; publish handlers read it as-is (unknown keys are ignored, max 20KB). Keyed by platform, e.g. {"tiktok": {"privacy_level": "SELF_ONLY"}, "instagram": {"content": "IG-specific caption"}, "_thumbnail": {"timestamp_ms": 3000}}. Common keys: per-platform `content` override; tiktok privacy/duet/stitch options; `_thumbnail` custom video cover. See the Platform options guide for every key each platform accepts (privacy, flair, first comments, formatting, AI-disclosure flags, thumbnails and more).
416
416
  */
417
417
  platform_options?: {
418
418
  [key: string]: unknown;
@@ -476,7 +476,7 @@ type SocialPostScheduleRequest = {
476
476
  */
477
477
  allow_duplicates?: boolean;
478
478
  /**
479
- * Per-platform composer options - the same payload the web composer stores; publish handlers read it as-is (unknown keys are ignored, max 20KB). Keyed by platform, e.g. {"tiktok": {"privacy_level": "SELF_ONLY"}, "instagram": {"content": "IG-specific caption"}, "_thumbnail": {"timestamp_ms": 3000}}. Common keys: per-platform `content` override; tiktok privacy/duet/stitch options; `_thumbnail` custom video cover.
479
+ * Per-platform composer options - the same payload the web composer stores; publish handlers read it as-is (unknown keys are ignored, max 20KB). Keyed by platform, e.g. {"tiktok": {"privacy_level": "SELF_ONLY"}, "instagram": {"content": "IG-specific caption"}, "_thumbnail": {"timestamp_ms": 3000}}. Common keys: per-platform `content` override; tiktok privacy/duet/stitch options; `_thumbnail` custom video cover. Per-platform STAGGER: give any platform its own `scheduled_time` here (interpreted in the request `timezone`) and it publishes at that moment - platforms without one use the request-level scheduled_time. One call, one post per distinct time (response carries `staggered[]` with the created legs). Not combinable with queue_id or recycle.
480
480
  */
481
481
  platform_options?: {
482
482
  [key: string]: unknown;
@@ -1451,6 +1451,10 @@ type CreateSocialPostData = {
1451
1451
  * Act inside a profile (sub-account) you own: data reads and writes target the profile workspace while billing, rate limits and usage stay on your own account. Requires the profiles:manage scope. Returns 404 for profiles you do not own and 409 for paused profiles.
1452
1452
  */
1453
1453
  'X-Profile-Id'?: number;
1454
+ /**
1455
+ * Client idempotency key (X-Request-Id accepted as an alias). Send a fresh key per logical post and REUSE it when retrying that exact call after a timeout / 5xx / connection reset: the retry returns the original post with HTTP 200 and `idempotent_replay: true` instead of creating a duplicate. A key permanently identifies its post in the workspace (deleting the post frees the key). See the Idempotency guide.
1456
+ */
1457
+ 'X-Idempotency-Key'?: string;
1454
1458
  };
1455
1459
  path?: never;
1456
1460
  query?: never;
@@ -1515,6 +1519,10 @@ type ScheduleSocialPostData = {
1515
1519
  * Act inside a profile (sub-account) you own: data reads and writes target the profile workspace while billing, rate limits and usage stay on your own account. Requires the profiles:manage scope. Returns 404 for profiles you do not own and 409 for paused profiles.
1516
1520
  */
1517
1521
  'X-Profile-Id'?: number;
1522
+ /**
1523
+ * Client idempotency key (X-Request-Id accepted as an alias). Send a fresh key per logical post and REUSE it when retrying that exact call after a timeout / 5xx / connection reset: the retry returns the original post with HTTP 200 and `idempotent_replay: true` instead of creating a duplicate. A key permanently identifies its post in the workspace (deleting the post frees the key). See the Idempotency guide.
1524
+ */
1525
+ 'X-Idempotency-Key'?: string;
1518
1526
  };
1519
1527
  path?: never;
1520
1528
  query?: never;
@@ -5044,7 +5052,7 @@ type CreateWebhookData = {
5044
5052
  /**
5045
5053
  * Events to subscribe to. Must be from the 25-event catalog (see the webhooks object in this spec and the Webhooks guide).
5046
5054
  */
5047
- events: Array<'post.published' | 'post.partial' | 'post.failed' | 'account.connected' | 'account.disconnected' | 'account.token_expired' | 'comment.received' | 'message.received' | 'job.completed' | 'job.failed' | 'balance.low' | 'balance.depleted' | 'key.revoked' | 'wallet.recharge.succeeded' | 'wallet.recharge.failed' | 'account_billing.charged' | 'account_billing.failed' | 'contact.created' | 'contact.updated' | 'contact.tag_added' | 'contact.tag_removed' | 'deal.created' | 'deal.stage_changed' | 'deal.won' | 'deal.lost'>;
5055
+ events: Array<'post.published' | 'post.partial' | 'post.failed' | 'account.connected' | 'account.disconnected' | 'account.token_expired' | 'comment.received' | 'message.received' | 'job.completed' | 'job.failed' | 'balance.low' | 'balance.depleted' | 'key.revoked' | 'wallet.recharge.succeeded' | 'wallet.recharge.failed' | 'account_billing.charged' | 'account_billing.failed' | 'contact.created' | 'contact.updated' | 'contact.tag_added' | 'contact.tag_removed' | 'deal.created' | 'deal.stage_changed' | 'deal.won' | 'deal.lost' | 'post.scheduled' | 'post.cancelled' | 'post.recycled' | 'post.external.created' | 'post.external.updated' | 'message.sent' | 'conversation.started' | 'reaction.received' | 'review.new' | 'review.updated'>;
5048
5056
  };
5049
5057
  path?: never;
5050
5058
  query?: never;
@@ -5137,7 +5145,7 @@ type UpdateWebhookData = {
5137
5145
  /**
5138
5146
  * Full replacement list of subscribed events.
5139
5147
  */
5140
- events?: Array<'post.published' | 'post.partial' | 'post.failed' | 'account.connected' | 'account.disconnected' | 'account.token_expired' | 'comment.received' | 'message.received' | 'job.completed' | 'job.failed' | 'balance.low' | 'balance.depleted' | 'key.revoked' | 'wallet.recharge.succeeded' | 'wallet.recharge.failed' | 'account_billing.charged' | 'account_billing.failed' | 'contact.created' | 'contact.updated' | 'contact.tag_added' | 'contact.tag_removed' | 'deal.created' | 'deal.stage_changed' | 'deal.won' | 'deal.lost'>;
5148
+ events?: Array<'post.published' | 'post.partial' | 'post.failed' | 'account.connected' | 'account.disconnected' | 'account.token_expired' | 'comment.received' | 'message.received' | 'job.completed' | 'job.failed' | 'balance.low' | 'balance.depleted' | 'key.revoked' | 'wallet.recharge.succeeded' | 'wallet.recharge.failed' | 'account_billing.charged' | 'account_billing.failed' | 'contact.created' | 'contact.updated' | 'contact.tag_added' | 'contact.tag_removed' | 'deal.created' | 'deal.stage_changed' | 'deal.won' | 'deal.lost' | 'post.scheduled' | 'post.cancelled' | 'post.recycled' | 'post.external.created' | 'post.external.updated' | 'message.sent' | 'conversation.started' | 'reaction.received' | 'review.new' | 'review.updated'>;
5141
5149
  /**
5142
5150
  * Pause or resume deliveries.
5143
5151
  */
@@ -5250,6 +5258,14 @@ type ConnectSocialAccountData = {
5250
5258
  * Optional URL to redirect the user to after they finish authorizing.
5251
5259
  */
5252
5260
  return_url?: string;
5261
+ /**
5262
+ * Telegram only (required for it): your bot's token from @BotFather (e.g. `123456:AA...`). Verified against Telegram (getMe/getChat/getChatMember - the bot must have posting rights in the chat) and stored encrypted.
5263
+ */
5264
+ bot_token?: string;
5265
+ /**
5266
+ * Telegram only (required for it): the target channel/group as `@channelusername` or a numeric chat id. Private chats are rejected.
5267
+ */
5268
+ chat?: string;
5253
5269
  };
5254
5270
  headers?: {
5255
5271
  /**
@@ -5259,9 +5275,9 @@ type ConnectSocialAccountData = {
5259
5275
  };
5260
5276
  path: {
5261
5277
  /**
5262
- * Platform to connect. All 13 platforms are supported (use `twitter` for X, `gmb` for Google Business).
5278
+ * Platform to connect. All 15 platforms are supported (use `twitter` for X, `gmb` for Google Business). 14 are OAuth flows returning a `connect_url` (`discord` runs the server-webhook authorize flow). `telegram` is a CREDENTIAL connect instead: pass `bot_token` + `chat` in the body and the account connects immediately - no URL to open.
5263
5279
  */
5264
- platform: 'facebook' | 'instagram' | 'twitter' | 'linkedin' | 'youtube' | 'tiktok' | 'threads' | 'bluesky' | 'pinterest' | 'reddit' | 'snapchat' | 'tumblr' | 'gmb';
5280
+ platform: 'facebook' | 'instagram' | 'twitter' | 'linkedin' | 'youtube' | 'tiktok' | 'threads' | 'bluesky' | 'pinterest' | 'reddit' | 'snapchat' | 'tumblr' | 'gmb' | 'discord' | 'telegram';
5265
5281
  };
5266
5282
  query?: never;
5267
5283
  url: '/social/connect/{platform}';
@@ -5291,7 +5307,7 @@ type ConnectSocialAccountErrors = {
5291
5307
  type ConnectSocialAccountError = ConnectSocialAccountErrors[keyof ConnectSocialAccountErrors];
5292
5308
  type ConnectSocialAccountResponses = {
5293
5309
  /**
5294
- * Connection link created
5310
+ * Connection link created. For `telegram` the response has no `connect_url` - the account is connected immediately and returned as `{platform, account}`.
5295
5311
  */
5296
5312
  201: {
5297
5313
  success?: true;
package/dist/index.d.ts CHANGED
@@ -412,7 +412,7 @@ type SocialPostCreateRequest = {
412
412
  */
413
413
  allow_duplicates?: boolean;
414
414
  /**
415
- * Per-platform composer options - the same payload the web composer stores; publish handlers read it as-is (unknown keys are ignored, max 20KB). Keyed by platform, e.g. {"tiktok": {"privacy_level": "SELF_ONLY"}, "instagram": {"content": "IG-specific caption"}, "_thumbnail": {"timestamp_ms": 3000}}. Common keys: per-platform `content` override; tiktok privacy/duet/stitch options; `_thumbnail` custom video cover.
415
+ * Per-platform composer options - the same payload the web composer stores; publish handlers read it as-is (unknown keys are ignored, max 20KB). Keyed by platform, e.g. {"tiktok": {"privacy_level": "SELF_ONLY"}, "instagram": {"content": "IG-specific caption"}, "_thumbnail": {"timestamp_ms": 3000}}. Common keys: per-platform `content` override; tiktok privacy/duet/stitch options; `_thumbnail` custom video cover. See the Platform options guide for every key each platform accepts (privacy, flair, first comments, formatting, AI-disclosure flags, thumbnails and more).
416
416
  */
417
417
  platform_options?: {
418
418
  [key: string]: unknown;
@@ -476,7 +476,7 @@ type SocialPostScheduleRequest = {
476
476
  */
477
477
  allow_duplicates?: boolean;
478
478
  /**
479
- * Per-platform composer options - the same payload the web composer stores; publish handlers read it as-is (unknown keys are ignored, max 20KB). Keyed by platform, e.g. {"tiktok": {"privacy_level": "SELF_ONLY"}, "instagram": {"content": "IG-specific caption"}, "_thumbnail": {"timestamp_ms": 3000}}. Common keys: per-platform `content` override; tiktok privacy/duet/stitch options; `_thumbnail` custom video cover.
479
+ * Per-platform composer options - the same payload the web composer stores; publish handlers read it as-is (unknown keys are ignored, max 20KB). Keyed by platform, e.g. {"tiktok": {"privacy_level": "SELF_ONLY"}, "instagram": {"content": "IG-specific caption"}, "_thumbnail": {"timestamp_ms": 3000}}. Common keys: per-platform `content` override; tiktok privacy/duet/stitch options; `_thumbnail` custom video cover. Per-platform STAGGER: give any platform its own `scheduled_time` here (interpreted in the request `timezone`) and it publishes at that moment - platforms without one use the request-level scheduled_time. One call, one post per distinct time (response carries `staggered[]` with the created legs). Not combinable with queue_id or recycle.
480
480
  */
481
481
  platform_options?: {
482
482
  [key: string]: unknown;
@@ -1451,6 +1451,10 @@ type CreateSocialPostData = {
1451
1451
  * Act inside a profile (sub-account) you own: data reads and writes target the profile workspace while billing, rate limits and usage stay on your own account. Requires the profiles:manage scope. Returns 404 for profiles you do not own and 409 for paused profiles.
1452
1452
  */
1453
1453
  'X-Profile-Id'?: number;
1454
+ /**
1455
+ * Client idempotency key (X-Request-Id accepted as an alias). Send a fresh key per logical post and REUSE it when retrying that exact call after a timeout / 5xx / connection reset: the retry returns the original post with HTTP 200 and `idempotent_replay: true` instead of creating a duplicate. A key permanently identifies its post in the workspace (deleting the post frees the key). See the Idempotency guide.
1456
+ */
1457
+ 'X-Idempotency-Key'?: string;
1454
1458
  };
1455
1459
  path?: never;
1456
1460
  query?: never;
@@ -1515,6 +1519,10 @@ type ScheduleSocialPostData = {
1515
1519
  * Act inside a profile (sub-account) you own: data reads and writes target the profile workspace while billing, rate limits and usage stay on your own account. Requires the profiles:manage scope. Returns 404 for profiles you do not own and 409 for paused profiles.
1516
1520
  */
1517
1521
  'X-Profile-Id'?: number;
1522
+ /**
1523
+ * Client idempotency key (X-Request-Id accepted as an alias). Send a fresh key per logical post and REUSE it when retrying that exact call after a timeout / 5xx / connection reset: the retry returns the original post with HTTP 200 and `idempotent_replay: true` instead of creating a duplicate. A key permanently identifies its post in the workspace (deleting the post frees the key). See the Idempotency guide.
1524
+ */
1525
+ 'X-Idempotency-Key'?: string;
1518
1526
  };
1519
1527
  path?: never;
1520
1528
  query?: never;
@@ -5044,7 +5052,7 @@ type CreateWebhookData = {
5044
5052
  /**
5045
5053
  * Events to subscribe to. Must be from the 25-event catalog (see the webhooks object in this spec and the Webhooks guide).
5046
5054
  */
5047
- events: Array<'post.published' | 'post.partial' | 'post.failed' | 'account.connected' | 'account.disconnected' | 'account.token_expired' | 'comment.received' | 'message.received' | 'job.completed' | 'job.failed' | 'balance.low' | 'balance.depleted' | 'key.revoked' | 'wallet.recharge.succeeded' | 'wallet.recharge.failed' | 'account_billing.charged' | 'account_billing.failed' | 'contact.created' | 'contact.updated' | 'contact.tag_added' | 'contact.tag_removed' | 'deal.created' | 'deal.stage_changed' | 'deal.won' | 'deal.lost'>;
5055
+ events: Array<'post.published' | 'post.partial' | 'post.failed' | 'account.connected' | 'account.disconnected' | 'account.token_expired' | 'comment.received' | 'message.received' | 'job.completed' | 'job.failed' | 'balance.low' | 'balance.depleted' | 'key.revoked' | 'wallet.recharge.succeeded' | 'wallet.recharge.failed' | 'account_billing.charged' | 'account_billing.failed' | 'contact.created' | 'contact.updated' | 'contact.tag_added' | 'contact.tag_removed' | 'deal.created' | 'deal.stage_changed' | 'deal.won' | 'deal.lost' | 'post.scheduled' | 'post.cancelled' | 'post.recycled' | 'post.external.created' | 'post.external.updated' | 'message.sent' | 'conversation.started' | 'reaction.received' | 'review.new' | 'review.updated'>;
5048
5056
  };
5049
5057
  path?: never;
5050
5058
  query?: never;
@@ -5137,7 +5145,7 @@ type UpdateWebhookData = {
5137
5145
  /**
5138
5146
  * Full replacement list of subscribed events.
5139
5147
  */
5140
- events?: Array<'post.published' | 'post.partial' | 'post.failed' | 'account.connected' | 'account.disconnected' | 'account.token_expired' | 'comment.received' | 'message.received' | 'job.completed' | 'job.failed' | 'balance.low' | 'balance.depleted' | 'key.revoked' | 'wallet.recharge.succeeded' | 'wallet.recharge.failed' | 'account_billing.charged' | 'account_billing.failed' | 'contact.created' | 'contact.updated' | 'contact.tag_added' | 'contact.tag_removed' | 'deal.created' | 'deal.stage_changed' | 'deal.won' | 'deal.lost'>;
5148
+ events?: Array<'post.published' | 'post.partial' | 'post.failed' | 'account.connected' | 'account.disconnected' | 'account.token_expired' | 'comment.received' | 'message.received' | 'job.completed' | 'job.failed' | 'balance.low' | 'balance.depleted' | 'key.revoked' | 'wallet.recharge.succeeded' | 'wallet.recharge.failed' | 'account_billing.charged' | 'account_billing.failed' | 'contact.created' | 'contact.updated' | 'contact.tag_added' | 'contact.tag_removed' | 'deal.created' | 'deal.stage_changed' | 'deal.won' | 'deal.lost' | 'post.scheduled' | 'post.cancelled' | 'post.recycled' | 'post.external.created' | 'post.external.updated' | 'message.sent' | 'conversation.started' | 'reaction.received' | 'review.new' | 'review.updated'>;
5141
5149
  /**
5142
5150
  * Pause or resume deliveries.
5143
5151
  */
@@ -5250,6 +5258,14 @@ type ConnectSocialAccountData = {
5250
5258
  * Optional URL to redirect the user to after they finish authorizing.
5251
5259
  */
5252
5260
  return_url?: string;
5261
+ /**
5262
+ * Telegram only (required for it): your bot's token from @BotFather (e.g. `123456:AA...`). Verified against Telegram (getMe/getChat/getChatMember - the bot must have posting rights in the chat) and stored encrypted.
5263
+ */
5264
+ bot_token?: string;
5265
+ /**
5266
+ * Telegram only (required for it): the target channel/group as `@channelusername` or a numeric chat id. Private chats are rejected.
5267
+ */
5268
+ chat?: string;
5253
5269
  };
5254
5270
  headers?: {
5255
5271
  /**
@@ -5259,9 +5275,9 @@ type ConnectSocialAccountData = {
5259
5275
  };
5260
5276
  path: {
5261
5277
  /**
5262
- * Platform to connect. All 13 platforms are supported (use `twitter` for X, `gmb` for Google Business).
5278
+ * Platform to connect. All 15 platforms are supported (use `twitter` for X, `gmb` for Google Business). 14 are OAuth flows returning a `connect_url` (`discord` runs the server-webhook authorize flow). `telegram` is a CREDENTIAL connect instead: pass `bot_token` + `chat` in the body and the account connects immediately - no URL to open.
5263
5279
  */
5264
- platform: 'facebook' | 'instagram' | 'twitter' | 'linkedin' | 'youtube' | 'tiktok' | 'threads' | 'bluesky' | 'pinterest' | 'reddit' | 'snapchat' | 'tumblr' | 'gmb';
5280
+ platform: 'facebook' | 'instagram' | 'twitter' | 'linkedin' | 'youtube' | 'tiktok' | 'threads' | 'bluesky' | 'pinterest' | 'reddit' | 'snapchat' | 'tumblr' | 'gmb' | 'discord' | 'telegram';
5265
5281
  };
5266
5282
  query?: never;
5267
5283
  url: '/social/connect/{platform}';
@@ -5291,7 +5307,7 @@ type ConnectSocialAccountErrors = {
5291
5307
  type ConnectSocialAccountError = ConnectSocialAccountErrors[keyof ConnectSocialAccountErrors];
5292
5308
  type ConnectSocialAccountResponses = {
5293
5309
  /**
5294
- * Connection link created
5310
+ * Connection link created. For `telegram` the response has no `connect_url` - the account is connected immediately and returned as `{platform, account}`.
5295
5311
  */
5296
5312
  201: {
5297
5313
  success?: true;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smartlyqofficial/node",
3
- "version": "0.1.10",
3
+ "version": "0.1.12",
4
4
  "description": "Official Node.js SDK for the SmartlyQ API - social posting, AI content generation, SEO, CRM, and more.",
5
5
  "keywords": [
6
6
  "smartlyq",