apinoa-mcp 0.2.1 → 0.2.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.
@@ -15,7 +15,7 @@ const snapshot = [
15
15
  "regions": [
16
16
  "US"
17
17
  ],
18
- "parserVersion": 1,
18
+ "parserVersion": 3,
19
19
  "cost": {
20
20
  "browse": {
21
21
  "base": 1,
@@ -287,7 +287,7 @@ const snapshot = [
287
287
  "SG",
288
288
  "AU"
289
289
  ],
290
- "parserVersion": 3,
290
+ "parserVersion": 5,
291
291
  "cost": {
292
292
  "search": {
293
293
  "base": 1,
@@ -750,7 +750,7 @@ const snapshot = [
750
750
  "regions": [
751
751
  "US"
752
752
  ],
753
- "parserVersion": 3,
753
+ "parserVersion": 6,
754
754
  "cost": {
755
755
  "profile": {
756
756
  "base": 1,
@@ -957,7 +957,7 @@ const snapshot = [
957
957
  "regions": [
958
958
  "US"
959
959
  ],
960
- "parserVersion": 4,
960
+ "parserVersion": 5,
961
961
  "cost": {
962
962
  "profile": {
963
963
  "base": 1,
@@ -1118,11 +1118,11 @@ const snapshot = [
1118
1118
  "regions": [
1119
1119
  "US"
1120
1120
  ],
1121
- "parserVersion": 2,
1121
+ "parserVersion": 6,
1122
1122
  "cost": {
1123
1123
  "profile": {
1124
1124
  "base": 1,
1125
- "max": 2
1125
+ "max": 5
1126
1126
  },
1127
1127
  "profiles": {
1128
1128
  "base": 1,
@@ -1425,7 +1425,7 @@ const snapshot = [
1425
1425
  "regions": [
1426
1426
  "US"
1427
1427
  ],
1428
- "parserVersion": 2,
1428
+ "parserVersion": 5,
1429
1429
  "cost": {
1430
1430
  "search": {
1431
1431
  "base": 1,
@@ -1713,7 +1713,7 @@ const snapshot = [
1713
1713
  "regions": [
1714
1714
  "US"
1715
1715
  ],
1716
- "parserVersion": 3,
1716
+ "parserVersion": 6,
1717
1717
  "cost": {
1718
1718
  "profile": {
1719
1719
  "base": 1,
@@ -1745,6 +1745,20 @@ const snapshot = [
1745
1745
  "type": "string",
1746
1746
  "minLength": 1,
1747
1747
  "description": "Numeric Threads user id."
1748
+ },
1749
+ "include": {
1750
+ "anyOf": [
1751
+ {
1752
+ "type": "string"
1753
+ },
1754
+ {
1755
+ "type": "array",
1756
+ "items": {
1757
+ "type": "string"
1758
+ }
1759
+ }
1760
+ ],
1761
+ "description": "username only. Attach from the same page, at no extra cost: posts (the creator's latest threads, ext.posts)."
1748
1762
  }
1749
1763
  },
1750
1764
  "additionalProperties": false,
@@ -1757,6 +1771,20 @@ const snapshot = [
1757
1771
  "type": "string",
1758
1772
  "minLength": 1,
1759
1773
  "description": "Post shortcode, or the post URL (…/@user/post/<code> or …/t/<code>)."
1774
+ },
1775
+ "include": {
1776
+ "anyOf": [
1777
+ {
1778
+ "type": "string"
1779
+ },
1780
+ {
1781
+ "type": "array",
1782
+ "items": {
1783
+ "type": "string"
1784
+ }
1785
+ }
1786
+ ],
1787
+ "description": "Attach from the same page, at no extra cost: comments (the first replies, top order, ext.comments), related (the related threads Threads suggests beside it, ext.related)."
1760
1788
  }
1761
1789
  },
1762
1790
  "additionalProperties": false,
@@ -1797,6 +1825,20 @@ const snapshot = [
1797
1825
  ],
1798
1826
  "description": "query only: top (default) or recent."
1799
1827
  },
1828
+ "include": {
1829
+ "anyOf": [
1830
+ {
1831
+ "type": "string"
1832
+ },
1833
+ {
1834
+ "type": "array",
1835
+ "items": {
1836
+ "type": "string"
1837
+ }
1838
+ }
1839
+ ],
1840
+ "description": "username only. Attach from the same page, at no extra cost: profile (the creator's profile, ext.profile)."
1841
+ },
1800
1842
  "cursor": {
1801
1843
  "type": "string",
1802
1844
  "minLength": 1,
@@ -1822,6 +1864,20 @@ const snapshot = [
1822
1864
  ],
1823
1865
  "description": "top (default) or recent."
1824
1866
  },
1867
+ "include": {
1868
+ "anyOf": [
1869
+ {
1870
+ "type": "string"
1871
+ },
1872
+ {
1873
+ "type": "array",
1874
+ "items": {
1875
+ "type": "string"
1876
+ }
1877
+ }
1878
+ ],
1879
+ "description": "Top order only. Attach from the same page, at no extra cost: post (the post itself, in `post`), related (the related threads Threads suggests beside it, ext.related)."
1880
+ },
1825
1881
  "cursor": {
1826
1882
  "type": "string",
1827
1883
  "minLength": 1,
@@ -1850,7 +1906,7 @@ const snapshot = [
1850
1906
  "regions": [
1851
1907
  "US"
1852
1908
  ],
1853
- "parserVersion": 3,
1909
+ "parserVersion": 6,
1854
1910
  "cost": {
1855
1911
  "profile": {
1856
1912
  "base": 1,
@@ -2118,7 +2174,7 @@ const snapshot = [
2118
2174
  "regions": [
2119
2175
  "US"
2120
2176
  ],
2121
- "parserVersion": 3,
2177
+ "parserVersion": 6,
2122
2178
  "cost": {
2123
2179
  "search": {
2124
2180
  "base": 1,
@@ -2273,7 +2329,7 @@ const snapshot = [
2273
2329
  "regions": [
2274
2330
  "US"
2275
2331
  ],
2276
- "parserVersion": 3,
2332
+ "parserVersion": 5,
2277
2333
  "cost": {
2278
2334
  "search": {
2279
2335
  "base": 1,
@@ -2574,7 +2630,7 @@ const snapshot = [
2574
2630
  "regions": [
2575
2631
  "US"
2576
2632
  ],
2577
- "parserVersion": 2,
2633
+ "parserVersion": 4,
2578
2634
  "cost": {
2579
2635
  "profile": {
2580
2636
  "base": 1,
@@ -2675,7 +2731,7 @@ const snapshot = [
2675
2731
  "regions": [
2676
2732
  "US"
2677
2733
  ],
2678
- "parserVersion": 3,
2734
+ "parserVersion": 6,
2679
2735
  "cost": {
2680
2736
  "profile": {
2681
2737
  "base": 1,
@@ -1,6 +1,6 @@
1
1
  // GENERATED by scripts/gen-schema.mjs from the OpenAPI document (tools/public/generate-sdks.sh). Do not edit.
2
2
  // The response types code in `execute` is checked against, and the type each operation returns.
3
- export const SCHEMA_TYPES = "interface Account {\n platform: \"reddit\" | \"linkedin\" | \"tiktok\" | \"youtube\" | \"instagram\" | \"threads\" | \"x\";\n id?: string;\n handle: string;\n displayName?: string;\n bio?: string;\n url: string;\n avatarUrl?: string;\n bannerUrl?: string;\n verified?: boolean;\n createdAt?: string;\n counts?: {\n followers?: number;\n following?: number;\n posts?: number;\n };\n links?: Link[];\n private?: boolean;\n category?: string;\n ext?: Record<string, unknown>;\n}\ninterface AccountPage {\n platform: \"reddit\" | \"linkedin\" | \"tiktok\" | \"youtube\" | \"instagram\" | \"threads\" | \"x\";\n items: Account[];\n cursor?: string;\n total?: number;\n ext?: Record<string, unknown>;\n}\ninterface AccountRef {\n platform: \"reddit\" | \"linkedin\" | \"tiktok\" | \"youtube\" | \"instagram\" | \"threads\" | \"x\";\n id?: string;\n handle?: string;\n displayName?: string;\n url?: string;\n avatarUrl?: string;\n verified?: boolean;\n counts?: {\n followers?: number;\n following?: number;\n posts?: number;\n };\n ext?: Record<string, unknown>;\n}\ninterface Attribute {\n name: string;\n value: string;\n}\ninterface Audio {\n id?: string;\n title?: string;\n artist?: string;\n url?: string;\n}\ninterface Broadcast {\n status: \"scheduled\" | \"live\" | \"ended\";\n scheduledAt?: string;\n startedAt?: string;\n endedAt?: string;\n}\ninterface Catalog {\n marketplaces: ({\n id: string;\n kind: \"marketplace\" | \"sns\";\n operations: string[];\n regions?: string[];\n cost?: Record<string, unknown>;\n /** Each operation's input, as JSON Schema. */\n params?: Record<string, unknown>;\n })[];\n pricing?: Record<string, unknown>;\n}\ninterface CategoryList {\n marketplace: string;\n path: CategoryStep[];\n categories: CategoryNode[];\n}\ninterface CategoryNode {\n id: string;\n name: string;\n parentId?: string;\n hasChildren?: boolean;\n browsable?: boolean;\n productCount?: number;\n ext?: Ext;\n}\ninterface CategoryStep {\n id?: string;\n name?: string;\n}\ninterface Comment {\n platform: \"reddit\" | \"linkedin\" | \"tiktok\" | \"youtube\" | \"instagram\" | \"threads\" | \"x\";\n id: string;\n url?: string;\n postId: string;\n parentId?: string;\n author: AccountRef;\n text: string;\n createdAt?: string;\n editedAt?: string;\n lang?: string;\n pinned?: boolean;\n byAuthor?: boolean;\n likedByAuthor?: boolean;\n metrics?: {\n likes?: number;\n replies?: number;\n };\n media?: SocialMedia[];\n replies: Comment[];\n moreReplies?: {\n count?: number;\n ids?: string[];\n cursor?: string;\n ext?: Record<string, unknown>;\n };\n ext?: Record<string, unknown>;\n}\ninterface CommentPage {\n platform: \"reddit\" | \"linkedin\" | \"tiktok\" | \"youtube\" | \"instagram\" | \"threads\" | \"x\";\n items: Comment[];\n cursor?: string;\n total?: number;\n ext?: Record<string, unknown>;\n}\ninterface DeliveryOption {\n carrier?: string;\n code?: string;\n estimate?: string;\n cost?: Money;\n free?: boolean;\n minDays?: number;\n maxDays?: number;\n guaranteedDays?: number;\n handlingDays?: number;\n cutoff?: string;\n condition?: string;\n available?: boolean;\n membership?: string;\n minimumOrder?: Money;\n tracking?: boolean;\n shipsFrom?: string;\n}\ninterface Entities {\n mentions?: Mention[];\n urls?: Url[];\n hashtags?: string[];\n}\ntype Ext = Record<string, unknown>;\ninterface Facet {\n id: string;\n name: string;\n kind: \"select\" | \"range\";\n values: FacetValue[];\n min?: number;\n max?: number;\n maps_to?: string;\n}\ninterface FacetValue {\n value: string;\n name: string;\n count?: number;\n selected?: boolean;\n}\ninterface Group {\n platform: \"reddit\" | \"linkedin\" | \"tiktok\" | \"youtube\" | \"instagram\" | \"threads\" | \"x\";\n kind: \"community\" | \"channel\" | \"company\" | \"hashtag\" | \"sound\" | \"topic\" | \"location\" | \"list\";\n id: string;\n name: string;\n url: string;\n description?: string;\n avatarUrl?: string;\n bannerUrl?: string;\n createdAt?: string;\n counts?: {\n members?: number;\n posts?: number;\n };\n sensitive?: boolean;\n ext?: Record<string, unknown>;\n}\ninterface GroupPage {\n platform: \"reddit\" | \"linkedin\" | \"tiktok\" | \"youtube\" | \"instagram\" | \"threads\" | \"x\";\n items: Group[];\n cursor?: string;\n total?: number;\n ext?: Record<string, unknown>;\n}\ninterface Identifiers {\n gtin?: string;\n mpn?: string;\n model?: string;\n}\ninterface InReplyTo {\n id: string;\n url?: string;\n author?: AccountRef;\n}\ninterface Job {\n platform: \"linkedin\";\n id: string;\n url: string;\n title: string;\n company: {\n name: string;\n slug?: string;\n url?: string;\n logoUrl?: string;\n };\n location?: string;\n postedText?: string;\n applicants?: number;\n applicantsAtLeast?: number;\n seniority?: string;\n employmentType?: string;\n jobFunction?: string;\n industries?: string;\n description?: string;\n descriptionHtml?: string;\n}\ninterface JobPage {\n platform: \"linkedin\";\n items: {\n platform: \"linkedin\";\n id: string;\n url: string;\n title: string;\n company: {\n name: string;\n url?: string;\n };\n location?: string;\n listedAt?: string;\n logoUrl?: string;\n }[];\n cursor?: string;\n}\ninterface Link {\n url: string;\n title?: string;\n}\ninterface LinkPreview {\n url: string;\n title?: string;\n description?: string;\n thumbnailUrl?: string;\n domain?: string;\n}\ninterface Media {\n images: string[];\n videos: MediaVideo[];\n}\ninterface MediaFile {\n platform: string;\n postId: string;\n /** The file's MIME type, e.g. video/mp4 or image/jpeg. */\n contentType: string;\n /** The decoded file's size in bytes. */\n bytes: number;\n encoding: \"base64\";\n /** The file, base64-encoded. */\n data: string;\n /** Photo posts: which picture this is, 1-based. */\n index?: number;\n /** Photo posts: how many pictures the post has. */\n count?: number;\n}\ninterface MediaVariant {\n url: string;\n width?: number;\n height?: number;\n bitrate?: number;\n contentType?: string;\n}\ninterface MediaVideo {\n thumbnailUrl?: string;\n url?: string;\n title?: string;\n duration?: string;\n creator?: string;\n}\ninterface Mention {\n handle: string;\n id?: string;\n displayName?: string;\n}\ninterface Money {\n currency: string;\n amount: number;\n}\ninterface OcrResult {\n regions: TextRegion[];\n regions_found?: number;\n src_w?: number;\n src_h?: number;\n}\ninterface Offer {\n seller?: Seller;\n price: Money;\n listPrice?: Money;\n condition?: string;\n conditionNote?: string;\n fulfilledBy?: string;\n inStock?: boolean;\n status?: string;\n delivery?: DeliveryOption;\n ext?: Ext;\n}\ninterface Option {\n id: string;\n name: string;\n values: OptionValue[];\n}\ninterface OptionValue {\n id: string;\n name: string;\n imageUrl?: string;\n}\ninterface Page {\n index: number;\n size: number;\n total?: number;\n}\ninterface Place {\n name: string;\n id?: string;\n lat?: number;\n lng?: number;\n address?: string;\n city?: string;\n region?: string;\n postalCode?: string;\n country?: string;\n}\ninterface Poll {\n options: {\n text: string;\n votes?: number;\n }[];\n totalVotes?: number;\n endsAt?: string;\n}\ninterface Post {\n platform: \"reddit\" | \"linkedin\" | \"tiktok\" | \"youtube\" | \"instagram\" | \"threads\" | \"x\";\n id: string;\n url: string;\n author: AccountRef;\n title?: string;\n text?: string;\n createdAt?: string;\n editedAt?: string;\n lang?: string;\n media: SocialMedia[];\n metrics?: {\n likes?: number;\n comments?: number;\n shares?: number;\n views?: number;\n reposts?: number;\n quotes?: number;\n saves?: number;\n liveViewers?: number;\n };\n entities?: Entities;\n linkPreview?: LinkPreview;\n poll?: Poll;\n place?: Place;\n audio?: Audio;\n live?: boolean;\n broadcast?: Broadcast;\n repostOf?: Post;\n quoteOf?: Post;\n inReplyTo?: InReplyTo;\n sponsored?: boolean;\n pinned?: boolean;\n aiGenerated?: boolean;\n sensitive?: boolean;\n ext?: Record<string, unknown>;\n}\ninterface PostPage {\n platform: \"reddit\" | \"linkedin\" | \"tiktok\" | \"youtube\" | \"instagram\" | \"threads\" | \"x\";\n items: Post[];\n cursor?: string;\n total?: number;\n ext?: Record<string, unknown>;\n}\ninterface Product {\n marketplace: string;\n id: string;\n url?: string;\n title: string;\n price?: Money;\n listPrice?: Money;\n condition?: string;\n conditionNote?: string;\n unitPrice?: {\n price: Money;\n unit?: string;\n };\n brand?: string;\n rating?: Rating;\n seller?: Seller;\n salesCount?: number;\n salesLabel?: string;\n inStock?: boolean;\n status?: string;\n delivery?: ShippingOption;\n shippingOptions?: ShippingOption[];\n stock?: number;\n identifiers?: Identifiers;\n listingFormat?: string;\n paymentOptions?: string[];\n returnsPolicy?: string;\n badges: string[];\n promotions: string[];\n groupId?: string;\n attributes: Attribute[];\n offersSummary?: {\n count?: number;\n fromPrice?: Money;\n url?: string;\n };\n priceRange?: {\n min: Money;\n max: Money;\n };\n endsAt?: string;\n purchaseLimit?: number;\n listedAt?: string;\n deliveryTo?: {\n label?: string;\n country?: string;\n postalCode?: string;\n };\n ext?: Ext;\n description?: string;\n features: string[];\n media: Media;\n category: CategoryStep[];\n options: Option[];\n variants: Variant[];\n offers: Offer[];\n subscriptionPrice?: Money;\n reviewSummary?: string;\n reviewAspects: {\n name: string;\n mentions?: number;\n positive?: number;\n negative?: number;\n }[];\n boxContents: string[];\n brandUrl?: string;\n fulfilledBy?: string;\n replacedBy?: string;\n reviews: Review[];\n package?: {\n lengthCm?: number;\n widthCm?: number;\n heightCm?: number;\n weightKg?: number;\n soldInLot?: boolean;\n };\n wholesale?: boolean;\n included?: string[];\n}\ninterface Rating {\n average: number;\n count?: number;\n distribution?: Record<string, unknown>;\n grouped?: boolean;\n}\ninterface Review {\n id?: string;\n author?: string;\n rating: number;\n title?: string;\n body?: string;\n date?: string;\n country?: string;\n verified?: boolean;\n helpfulCount?: number;\n variant?: string;\n images: string[];\n incentivized?: boolean;\n reply?: {\n body: string;\n date?: string;\n author?: string;\n };\n ext?: Ext;\n}\ninterface ReviewPage {\n marketplace: string;\n productId: string;\n summary?: Rating;\n page: Page;\n reviews: Review[];\n cursor?: string;\n grouped?: boolean;\n ext?: Ext;\n}\ninterface SearchItem {\n marketplace: string;\n id: string;\n url?: string;\n title: string;\n price?: Money;\n listPrice?: Money;\n condition?: string;\n conditionNote?: string;\n unitPrice?: {\n price: Money;\n unit?: string;\n };\n brand?: string;\n rating?: Rating;\n seller?: Seller;\n salesCount?: number;\n salesLabel?: string;\n inStock?: boolean;\n status?: string;\n delivery?: ShippingOption;\n shippingOptions?: ShippingOption[];\n stock?: number;\n identifiers?: Identifiers;\n listingFormat?: string;\n paymentOptions?: string[];\n returnsPolicy?: string;\n badges: string[];\n promotions: string[];\n groupId?: string;\n attributes: Attribute[];\n offersSummary?: {\n count?: number;\n fromPrice?: Money;\n url?: string;\n };\n priceRange?: {\n min: Money;\n max: Money;\n };\n endsAt?: string;\n purchaseLimit?: number;\n listedAt?: string;\n deliveryTo?: {\n label?: string;\n country?: string;\n postalCode?: string;\n };\n ext?: Ext;\n imageUrl?: string;\n sponsored?: boolean;\n variantCount?: number;\n category?: CategoryStep[];\n matchScore?: number;\n}\ninterface SearchResult {\n marketplace: string;\n query?: string;\n page: Page;\n items: SearchItem[];\n cursor?: string;\n facets?: Facet[];\n}\ninterface Seller {\n id?: string;\n name?: string;\n url?: string;\n rating?: Rating;\n country?: string;\n detailedRatings?: {\n itemAsDescribed?: number;\n communication?: number;\n shippingSpeed?: number;\n };\n positivePercent?: number;\n ext?: Ext;\n}\ninterface ShippingOption {\n carrier?: string;\n code?: string;\n estimate?: string;\n cost?: Money;\n free?: boolean;\n minDays?: number;\n maxDays?: number;\n guaranteedDays?: number;\n handlingDays?: number;\n cutoff?: string;\n condition?: string;\n available?: boolean;\n membership?: string;\n minimumOrder?: Money;\n tracking?: boolean;\n shipsFrom?: string;\n}\ninterface ShippingQuote {\n marketplace: string;\n productId: string;\n skuId?: string;\n region: string;\n quantity: number;\n available: boolean;\n options: ShippingOption[];\n}\ninterface SocialMedia {\n type: \"image\" | \"gif\" | \"video\" | \"embed\";\n url: string;\n width?: number;\n height?: number;\n thumbnailUrl?: string;\n durationSec?: number;\n variants?: MediaVariant[];\n altText?: string;\n caption?: string;\n ext?: Record<string, unknown>;\n}\ninterface SupportedFonts {\n fontsByLanguage?: Record<string, unknown>;\n defaultByLanguage?: Record<string, unknown>;\n allFonts?: string[];\n allWeights?: string[];\n supportedSourceLanguages?: string[];\n userFonts?: Record<string, unknown>[];\n}\ninterface TextRegion {\n /** The region's number, starting at 0. */\n index: number;\n /** Four corner points, in the original image's coordinates. */\n polygon: number[][];\n bbox: {\n x: number;\n y: number;\n w: number;\n h: number;\n };\n /** The text that was read. */\n text: string;\n /** Recognition confidence, 0–1. */\n confidence?: number;\n text_color?: {\n r: number;\n g: number;\n b: number;\n };\n bg_color?: {\n r: number;\n g: number;\n b: number;\n };\n /** How uneven the background is behind the text; near 0 is a flat colour. */\n bg_std?: number;\n font_weight?: string;\n /** True for text on a filled label, such as a price tag. */\n is_badge?: boolean;\n}\ninterface TranslatedRegion {\n /** The region's number, starting at 0. */\n index: number;\n /** Four corner points, in the original image's coordinates. */\n polygon: number[][];\n bbox: {\n x: number;\n y: number;\n w: number;\n h: number;\n };\n /** The text that was read. */\n text: string;\n /** Recognition confidence, 0–1. */\n confidence?: number;\n text_color?: {\n r: number;\n g: number;\n b: number;\n };\n bg_color?: {\n r: number;\n g: number;\n b: number;\n };\n /** How uneven the background is behind the text; near 0 is a flat colour. */\n bg_std?: number;\n font_weight?: string;\n /** True for text on a filled label, such as a price tag. */\n is_badge?: boolean;\n /** The translation, in target_language (the field name is historical). */\n text_kr?: string;\n}\ninterface TranslatedRegions {\n /** The image with the source text removed, as a base64 JPEG. */\n inpainted_base64: string;\n regions: TranslatedRegion[];\n regions_count?: number;\n}\ninterface Url {\n url: string;\n displayUrl?: string;\n}\ninterface Variant {\n id: string;\n productId?: string;\n sku?: string;\n price?: Money;\n listPrice?: Money;\n bulkPrice?: Money;\n purchaseLimit?: number;\n taxIncluded?: boolean;\n inStock?: boolean;\n stock?: number;\n selections: VariantSelection[];\n identifiers?: Identifiers;\n weightKg?: number;\n ext?: Ext;\n}\ninterface VariantSelection {\n optionId: string;\n valueId: string;\n optionName: string;\n valueName: string;\n}";
3
+ export const SCHEMA_TYPES = "interface Account {\n platform: \"reddit\" | \"linkedin\" | \"tiktok\" | \"youtube\" | \"instagram\" | \"threads\" | \"x\";\n id?: string;\n handle: string;\n displayName?: string;\n bio?: string;\n url: string;\n avatarUrl?: string;\n bannerUrl?: string;\n verified?: boolean;\n createdAt?: string;\n counts?: {\n followers?: number;\n following?: number;\n posts?: number;\n };\n links?: Link[];\n private?: boolean;\n category?: string;\n location?: string;\n ext?: Record<string, unknown>;\n}\ninterface AccountPage {\n platform: \"reddit\" | \"linkedin\" | \"tiktok\" | \"youtube\" | \"instagram\" | \"threads\" | \"x\";\n items: Account[];\n cursor?: string;\n ext?: Record<string, unknown>;\n}\ninterface AccountRef {\n platform: \"reddit\" | \"linkedin\" | \"tiktok\" | \"youtube\" | \"instagram\" | \"threads\" | \"x\";\n id?: string;\n handle?: string;\n displayName?: string;\n url?: string;\n avatarUrl?: string;\n verified?: boolean;\n counts?: {\n followers?: number;\n following?: number;\n posts?: number;\n };\n bio?: string;\n bannerUrl?: string;\n createdAt?: string;\n links?: Link[];\n private?: boolean;\n category?: string;\n location?: string;\n ext?: Record<string, unknown>;\n}\ninterface Attribute {\n name: string;\n value: string;\n}\ninterface Audio {\n id?: string;\n title?: string;\n artist?: string;\n url?: string;\n coverUrl?: string;\n durationSec?: number;\n original?: boolean;\n album?: string;\n ext?: Record<string, unknown>;\n}\ninterface Broadcast {\n status: \"scheduled\" | \"live\" | \"ended\";\n ext?: Record<string, unknown>;\n}\ninterface CaptionTrack {\n url: string;\n lang?: string;\n format?: string;\n ext?: Record<string, unknown>;\n}\ninterface Catalog {\n marketplaces: ({\n id: string;\n kind: \"marketplace\" | \"sns\";\n operations: string[];\n regions?: string[];\n cost?: Record<string, unknown>;\n /** Each operation's input, as JSON Schema. */\n params?: Record<string, unknown>;\n })[];\n pricing?: Record<string, unknown>;\n}\ninterface CategoryList {\n marketplace: string;\n path: CategoryStep[];\n categories: CategoryNode[];\n ext?: Ext;\n}\ninterface CategoryNode {\n id: string;\n name: string;\n parentId?: string;\n hasChildren?: boolean;\n browsable?: boolean;\n imageUrl?: string;\n ext?: Ext;\n}\ninterface CategoryStep {\n id?: string;\n name?: string;\n}\ninterface Comment {\n platform: \"reddit\" | \"linkedin\" | \"tiktok\" | \"youtube\" | \"instagram\" | \"threads\" | \"x\";\n id: string;\n url?: string;\n postId: string;\n parentId?: string;\n author: AccountRef;\n text: string;\n entities?: Entities;\n createdAt?: string;\n editedAt?: string;\n edited?: boolean;\n lang?: string;\n pinned?: boolean;\n byAuthor?: boolean;\n likedByAuthor?: boolean;\n metrics?: {\n likes?: number;\n replies?: number;\n };\n media?: SocialMedia[];\n replies: Comment[];\n moreReplies?: {\n count?: number;\n cursor?: string;\n ext?: Record<string, unknown>;\n };\n ext?: Record<string, unknown>;\n}\ninterface CommentPage {\n platform: \"reddit\" | \"linkedin\" | \"tiktok\" | \"youtube\" | \"instagram\" | \"threads\" | \"x\";\n items: Comment[];\n cursor?: string;\n total?: number;\n order?: string;\n ext?: Record<string, unknown>;\n post?: Post;\n}\ninterface DeliveryOption {\n carrier?: string;\n code?: string;\n estimate?: string;\n cost?: Money;\n free?: boolean;\n minDays?: number;\n maxDays?: number;\n handlingDays?: number;\n cutoff?: string;\n condition?: string;\n available?: boolean;\n minimumOrder?: Money;\n shipsFrom?: string;\n ext?: Ext;\n}\ninterface Entities {\n mentions?: Mention[];\n urls?: Url[];\n hashtags?: string[];\n}\ntype Ext = Record<string, unknown>;\ninterface Facet {\n id: string;\n name: string;\n kind: \"select\" | \"range\";\n values: FacetValue[];\n min?: number;\n max?: number;\n maps_to?: string;\n}\ninterface FacetValue {\n value: string;\n name: string;\n selected?: boolean;\n}\ninterface Group {\n platform: \"reddit\" | \"linkedin\" | \"tiktok\" | \"youtube\" | \"instagram\" | \"threads\" | \"x\";\n kind: \"community\" | \"channel\" | \"company\" | \"hashtag\" | \"sound\" | \"topic\" | \"location\" | \"list\";\n id: string;\n name: string;\n url: string;\n description?: string;\n avatarUrl?: string;\n bannerUrl?: string;\n createdAt?: string;\n counts?: {\n members?: number;\n posts?: number;\n };\n sensitive?: boolean;\n ext?: Record<string, unknown>;\n}\ninterface GroupPage {\n platform: \"reddit\" | \"linkedin\" | \"tiktok\" | \"youtube\" | \"instagram\" | \"threads\" | \"x\";\n items: Group[];\n cursor?: string;\n order?: string;\n ext?: Record<string, unknown>;\n}\ninterface Identifiers {\n gtin?: string;\n mpn?: string;\n model?: string;\n}\ninterface InReplyTo {\n id: string;\n url?: string;\n author?: AccountRef;\n}\ninterface Job {\n platform: \"linkedin\";\n id: string;\n url: string;\n title: string;\n company: {\n name: string;\n slug?: string;\n url?: string;\n logoUrl?: string;\n };\n location?: string;\n postedText?: string;\n applicants?: number;\n applicantsAtLeast?: number;\n seniority?: string;\n employmentType?: string;\n jobFunction?: string;\n industries?: string;\n description?: string;\n descriptionHtml?: string;\n applyMethod?: \"linkedin\" | \"external\";\n}\ninterface JobPage {\n platform: \"linkedin\";\n items: {\n platform: \"linkedin\";\n id: string;\n url: string;\n title: string;\n company: {\n name: string;\n url?: string;\n };\n location?: string;\n listedAt?: string;\n logoUrl?: string;\n insights?: string[];\n }[];\n cursor?: string;\n}\ninterface Link {\n url: string;\n title?: string;\n}\ninterface LinkPreview {\n url: string;\n title?: string;\n description?: string;\n thumbnailUrl?: string;\n domain?: string;\n ext?: Record<string, unknown>;\n}\ninterface Media {\n images: string[];\n videos: MediaVideo[];\n}\ninterface MediaFile {\n platform: string;\n postId: string;\n /** The file's MIME type, e.g. video/mp4 or image/jpeg. */\n contentType: string;\n /** The decoded file's size in bytes. */\n bytes: number;\n encoding: \"base64\";\n /** The file, base64-encoded. */\n data: string;\n /** Photo posts: which picture this is, 1-based. */\n index?: number;\n /** Photo posts: how many pictures the post has. */\n count?: number;\n}\ninterface MediaTag {\n account: AccountRef;\n ext?: Record<string, unknown>;\n}\ninterface MediaVariant {\n url: string;\n width?: number;\n height?: number;\n bitrate?: number;\n contentType?: string;\n codec?: string;\n sizeBytes?: number;\n fps?: number;\n quality?: string;\n ext?: Record<string, unknown>;\n}\ninterface MediaVideo {\n thumbnailUrl?: string;\n url?: string;\n title?: string;\n duration?: string;\n ext?: Ext;\n}\ninterface Mention {\n handle: string;\n id?: string;\n displayName?: string;\n ext?: Record<string, unknown>;\n}\ninterface Money {\n currency: string;\n amount: number;\n}\ninterface OcrResult {\n regions: TextRegion[];\n regions_found?: number;\n src_w?: number;\n src_h?: number;\n}\ninterface Offer {\n seller?: Seller;\n price: Money;\n listPrice?: Money;\n condition?: string;\n conditionNote?: string;\n fulfilledBy?: string;\n inStock?: boolean;\n status?: string;\n delivery?: DeliveryOption;\n shippingOptions?: DeliveryOption[];\n unitPrice?: {\n price: Money;\n unit?: string;\n };\n promotions?: string[];\n paymentOptions?: string[];\n ext?: Ext;\n}\ninterface Option {\n id: string;\n name: string;\n values: OptionValue[];\n}\ninterface OptionValue {\n id: string;\n name: string;\n imageUrl?: string;\n}\ninterface Page {\n index: number;\n size: number;\n total?: number;\n}\ninterface Place {\n name: string;\n id?: string;\n lat?: number;\n lng?: number;\n address?: string;\n city?: string;\n type?: string;\n country?: string;\n ext?: Record<string, unknown>;\n}\ninterface Poll {\n options: {\n text: string;\n votes?: number;\n }[];\n totalVotes?: number;\n endsAt?: string;\n ext?: Record<string, unknown>;\n}\ninterface Post {\n platform: \"reddit\" | \"linkedin\" | \"tiktok\" | \"youtube\" | \"instagram\" | \"threads\" | \"x\";\n id: string;\n url: string;\n author: AccountRef;\n title?: string;\n text?: string;\n createdAt?: string;\n editedAt?: string;\n edited?: boolean;\n lang?: string;\n media: SocialMedia[];\n metrics?: {\n likes?: number;\n comments?: number;\n shares?: number;\n views?: number;\n reposts?: number;\n quotes?: number;\n saves?: number;\n };\n entities?: Entities;\n linkPreview?: LinkPreview;\n poll?: Poll;\n place?: Place;\n audio?: Audio;\n live?: boolean;\n broadcast?: Broadcast;\n repostOf?: Post;\n quoteOf?: Post;\n inReplyTo?: InReplyTo;\n sponsored?: boolean;\n pinned?: boolean;\n aiGenerated?: boolean;\n sensitive?: boolean;\n ext?: Record<string, unknown>;\n}\ninterface PostPage {\n platform: \"reddit\" | \"linkedin\" | \"tiktok\" | \"youtube\" | \"instagram\" | \"threads\" | \"x\";\n items: Post[];\n cursor?: string;\n total?: number;\n order?: string;\n ext?: Record<string, unknown>;\n}\ninterface Product {\n marketplace: string;\n id: string;\n url?: string;\n title: string;\n price?: Money;\n listPrice?: Money;\n subscriptionPrice?: Money;\n description?: string;\n fulfilledBy?: string;\n condition?: string;\n unitPrice?: {\n price: Money;\n unit?: string;\n };\n brand?: string;\n rating?: Rating;\n seller?: Seller;\n salesCount?: number;\n salesLabel?: string;\n inStock?: boolean;\n status?: string;\n delivery?: ShippingOption;\n shippingOptions?: ShippingOption[];\n stock?: number;\n identifiers?: Identifiers;\n listingFormat?: string;\n paymentOptions?: string[];\n returnsPolicy?: string;\n badges: string[];\n promotions: string[];\n groupId?: string;\n attributes: Attribute[];\n offersSummary?: {\n count?: number;\n fromPrice?: Money;\n ext?: Ext;\n };\n priceRange?: {\n min: Money;\n max: Money;\n };\n endsAt?: string;\n deliveryTo?: {\n label?: string;\n country?: string;\n postalCode?: string;\n };\n ext?: Ext;\n conditionNote?: string;\n purchaseLimit?: number;\n listedAt?: string;\n features: string[];\n highlights?: string[];\n media: Media;\n category: CategoryStep[];\n options: Option[];\n variants: Variant[];\n offers: Offer[];\n protectionPlans?: ProtectionPlan[];\n reviewSummary?: string;\n reviewAspects: {\n name: string;\n mentions?: number;\n positive?: number;\n negative?: number;\n }[];\n boxContents: string[];\n brandUrl?: string;\n replacedBy?: string;\n reviews: Review[];\n package?: {\n weightKg?: number;\n ext?: Ext;\n };\n}\ninterface ProtectionPlan {\n id?: string;\n name: string;\n price?: Money;\n provider?: string;\n ext?: Ext;\n}\ninterface Rating {\n average: number;\n count?: number;\n distribution?: Record<string, unknown>;\n starCounts?: Record<string, unknown>;\n grouped?: boolean;\n}\ninterface Review {\n id?: string;\n author?: string;\n authorAvatarUrl?: string;\n rating: number;\n title?: string;\n body?: string;\n date?: string;\n country?: string;\n verified?: boolean;\n helpfulCount?: number;\n unhelpfulCount?: number;\n recommended?: boolean;\n badges?: string[];\n syndicatedFrom?: string;\n productId?: string;\n productImageUrl?: string;\n variant?: string;\n variantId?: string;\n language?: string;\n images: string[];\n incentivized?: boolean;\n reply?: {\n body: string;\n date?: string;\n author?: string;\n };\n ext?: Ext;\n}\ninterface ReviewPage {\n marketplace: string;\n productId: string;\n summary?: Rating;\n page: Page;\n reviews: Review[];\n cursor?: string;\n grouped?: boolean;\n reviewSummary?: string;\n reviewAspects?: {\n name: string;\n mentions?: number;\n positive?: number;\n negative?: number;\n }[];\n ext?: Ext;\n}\ninterface SearchItem {\n marketplace: string;\n id: string;\n url?: string;\n title: string;\n price?: Money;\n listPrice?: Money;\n subscriptionPrice?: Money;\n description?: string;\n fulfilledBy?: string;\n condition?: string;\n unitPrice?: {\n price: Money;\n unit?: string;\n };\n brand?: string;\n rating?: Rating;\n seller?: Seller;\n salesCount?: number;\n salesLabel?: string;\n inStock?: boolean;\n status?: string;\n delivery?: ShippingOption;\n shippingOptions?: ShippingOption[];\n stock?: number;\n identifiers?: Identifiers;\n listingFormat?: string;\n paymentOptions?: string[];\n returnsPolicy?: string;\n badges: string[];\n promotions: string[];\n groupId?: string;\n attributes: Attribute[];\n offersSummary?: {\n count?: number;\n fromPrice?: Money;\n ext?: Ext;\n };\n priceRange?: {\n min: Money;\n max: Money;\n };\n endsAt?: string;\n deliveryTo?: {\n label?: string;\n country?: string;\n postalCode?: string;\n };\n ext?: Ext;\n imageUrl?: string;\n sponsored?: boolean;\n variantCount?: number;\n category?: CategoryStep[];\n matchScore?: number;\n offers?: Offer[];\n variants?: Variant[];\n}\ninterface SearchResult {\n marketplace: string;\n query?: string;\n page: Page;\n items: SearchItem[];\n cursor?: string;\n facets?: Facet[];\n relatedSearches?: string[];\n ext?: Ext;\n}\ninterface Seller {\n id?: string;\n name?: string;\n url?: string;\n logoUrl?: string;\n rating?: Rating;\n country?: string;\n positivePercent?: number;\n productCount?: number;\n ext?: Ext;\n}\ninterface ShippingOption {\n carrier?: string;\n code?: string;\n estimate?: string;\n cost?: Money;\n free?: boolean;\n minDays?: number;\n maxDays?: number;\n handlingDays?: number;\n cutoff?: string;\n condition?: string;\n available?: boolean;\n minimumOrder?: Money;\n shipsFrom?: string;\n ext?: Ext;\n}\ninterface ShippingQuote {\n marketplace: string;\n productId: string;\n skuId?: string;\n region: string;\n quantity: number;\n available: boolean;\n options: ShippingOption[];\n}\ninterface SocialMedia {\n type: \"image\" | \"gif\" | \"video\" | \"embed\";\n id?: string;\n url: string;\n width?: number;\n height?: number;\n thumbnailUrl?: string;\n durationSec?: number;\n variants?: MediaVariant[];\n altText?: string;\n caption?: string;\n title?: string;\n hasAudio?: boolean;\n tags?: MediaTag[];\n captions?: CaptionTrack[];\n ext?: Record<string, unknown>;\n}\ninterface SupportedFonts {\n fontsByLanguage?: Record<string, unknown>;\n defaultByLanguage?: Record<string, unknown>;\n allFonts?: string[];\n allWeights?: string[];\n supportedSourceLanguages?: string[];\n userFonts?: Record<string, unknown>[];\n}\ninterface TextRegion {\n /** The region's number, starting at 0. */\n index: number;\n /** Four corner points, in the original image's coordinates. */\n polygon: number[][];\n bbox: {\n x: number;\n y: number;\n w: number;\n h: number;\n };\n /** The text that was read. */\n text: string;\n /** Recognition confidence, 0–1. */\n confidence?: number;\n text_color?: {\n r: number;\n g: number;\n b: number;\n };\n bg_color?: {\n r: number;\n g: number;\n b: number;\n };\n /** How uneven the background is behind the text; near 0 is a flat colour. */\n bg_std?: number;\n font_weight?: string;\n /** True for text on a filled label, such as a price tag. */\n is_badge?: boolean;\n}\ninterface TranslatedRegion {\n /** The region's number, starting at 0. */\n index: number;\n /** Four corner points, in the original image's coordinates. */\n polygon: number[][];\n bbox: {\n x: number;\n y: number;\n w: number;\n h: number;\n };\n /** The text that was read. */\n text: string;\n /** Recognition confidence, 0–1. */\n confidence?: number;\n text_color?: {\n r: number;\n g: number;\n b: number;\n };\n bg_color?: {\n r: number;\n g: number;\n b: number;\n };\n /** How uneven the background is behind the text; near 0 is a flat colour. */\n bg_std?: number;\n font_weight?: string;\n /** True for text on a filled label, such as a price tag. */\n is_badge?: boolean;\n /** The translation, in target_language (the field name is historical). */\n text_kr?: string;\n}\ninterface TranslatedRegions {\n /** The image with the source text removed, as a base64 JPEG. */\n inpainted_base64: string;\n regions: TranslatedRegion[];\n regions_count?: number;\n}\ninterface Url {\n url: string;\n displayUrl?: string;\n}\ninterface Variant {\n id: string;\n productId?: string;\n name?: string;\n images?: string[];\n price?: Money;\n listPrice?: Money;\n purchaseLimit?: number;\n inStock?: boolean;\n stock?: number;\n selections: VariantSelection[];\n identifiers?: Identifiers;\n weightKg?: number;\n ext?: Ext;\n}\ninterface VariantSelection {\n optionId: string;\n valueId: string;\n optionName: string;\n valueName: string;\n}";
4
4
  export const RETURNS = {
5
5
  "aliexpress/search": "SearchResult",
6
6
  "aliexpress/browse": "SearchResult",
package/dist/server.d.ts CHANGED
@@ -1,19 +1,7 @@
1
- /**
2
- * The apinoa MCP server.
3
- *
4
- * Code mode (the default) exposes three tools: `search_docs` finds the operations for a task with their
5
- * parameters, costs and the fields they return; `execute` runs TypeScript the model writes against a typed
6
- * `apinoa` client in a sandbox, so a task of hundreds of calls is one tool call and only the result enters the
7
- * conversation; `translate_image` returns an image, which code cannot. APINOA_MCP_MODE=tools serves the 0.1
8
- * tool set instead (one tool call per API call).
9
- *
10
- * The platforms, operations and parameters come from the live catalog, so a platform added to apinoa appears
11
- * here without a new release.
12
- */
13
1
  import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
14
2
  import { type CatalogEntry } from "./api.js";
15
3
  import { type SandboxOptions } from "./code/sandbox.js";
16
- export declare const VERSION = "0.2.0";
4
+ export declare const VERSION: string;
17
5
  export interface ServerOptions {
18
6
  /** Defaults to APINOA_API_KEY. Docs work without one; every data call needs it. */
19
7
  apiKey?: string;
package/dist/server.js CHANGED
@@ -10,6 +10,7 @@
10
10
  * The platforms, operations and parameters come from the live catalog, so a platform added to apinoa appears
11
11
  * here without a new release.
12
12
  */
13
+ import { createRequire } from "node:module";
13
14
  import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
14
15
  import { z } from "zod";
15
16
  import { fetchCatalog, translateImage, download } from "./api.js";
@@ -17,7 +18,9 @@ import SNAPSHOT from "./catalog.snapshot.js";
17
18
  import { declarations, operations, overview, sandboxOperations, searchDocs } from "./code/docs.js";
18
19
  import { Sandbox, denoRuns, findDeno } from "./code/sandbox.js";
19
20
  import { failure, registerLegacyTools } from "./legacy.js";
20
- export const VERSION = "0.2.0";
21
+ // The published package's own version (dist/ and src/ both sit one level below package.json), so a release
22
+ // cannot announce the previous one.
23
+ export const VERSION = createRequire(import.meta.url)("../package.json").version;
21
24
  const DEFAULT_BUDGET = 500;
22
25
  export async function createApinoaServer(options = {}) {
23
26
  const api = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "apinoa-mcp",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "description": "MCP server for apinoa: marketplace and social data for Claude, Cursor and any MCP client. Code mode: the model writes TypeScript against a typed client, run in a sandbox.",
5
5
  "license": "MIT",
6
6
  "homepage": "https://apinoa.com/docs",