@adport/provider-tiktok 0.9.0 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +7 -4
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -1729,7 +1729,7 @@ var TikTokCatalogProductSets = class {
|
|
|
1729
1729
|
|
|
1730
1730
|
// src/catalog-feeds.ts
|
|
1731
1731
|
import { createHash as createHash7 } from "crypto";
|
|
1732
|
-
import { AdportError as AdportError11 } from "@adport/core";
|
|
1732
|
+
import { AdportError as AdportError11, hostedFeedUrl } from "@adport/core";
|
|
1733
1733
|
import { z as z12 } from "zod";
|
|
1734
1734
|
var hash5 = z12.string().regex(/^[a-f0-9]{64}$/);
|
|
1735
1735
|
var nativeId5 = z12.union([catalogId, z12.number().int().positive().safe()]).transform(String);
|
|
@@ -1787,6 +1787,9 @@ var catalogFeedUpdate = payload.extend({
|
|
|
1787
1787
|
acknowledge_shared_effects: z12.literal(true),
|
|
1788
1788
|
acknowledge_automatic_processing: z12.literal(true)
|
|
1789
1789
|
}).strict();
|
|
1790
|
+
var hostedSchedule = schedule.safeExtend({ source: z12.strictObject({ uri: hostedFeedUrl }) });
|
|
1791
|
+
var hostedCatalogFeedCreate = catalogFeedCreate.extend({ schedule_param: hostedSchedule.optional() });
|
|
1792
|
+
var hostedCatalogFeedUpdate = catalogFeedUpdate.extend({ schedule_param: hostedSchedule.optional() });
|
|
1790
1793
|
var catalogFeedSwitch = payload.extend({ feed_id: catalogId, status: z12.enum(["ON", "OFF"]), expected_configuration_hash: hash5, acknowledge_shared_effects: z12.literal(true), acknowledge_automatic_processing: z12.literal(true) }).strict();
|
|
1791
1794
|
var catalogFeedDelete = payload.extend({ feed_id: catalogId, expected_configuration_hash: hash5, acknowledge_shared_effects: z12.literal(true) }).strict();
|
|
1792
1795
|
var nativeSchedule = z12.looseObject({
|
|
@@ -3313,7 +3316,7 @@ function tiktokCatalogTools(provider, accessManagement = false) {
|
|
|
3313
3316
|
defineTool4({ ...read, name: "tiktok_catalog_event_source_context", catalog: { category: "measurement", exposure: "specialist" }, description: "Verify one app_id, pixel_code or both under the selected advertiser and read catalog/binding/source hashes for bind or unbind. Bind checks Pixel catalog availability; unbind checks existing membership. No events or writes.", input: catalogEventContext, handler: (input) => provider.catalogs.eventSources.context(input) }),
|
|
3314
3317
|
guardedWriteTool3({ name: "tiktok_bind_catalog_event_sources", namespace: "tiktok", provider: "tiktok", catalog: { category: "measurement", exposure: "specialist" }, kind: "update", destructive: true, description: "Bind selected advertiser app/Pixel sources to a writable catalog using fresh context hashes and shared/measurement-effects acknowledgement. Can affect existing catalog matching/ads. Rechecks sources and all bindings; no tracking installation, event sending or automatic replay.", payload: catalogEventChange }),
|
|
3315
3318
|
guardedWriteTool3({ name: "tiktok_unbind_catalog_event_sources", namespace: "tiktok", provider: "tiktok", catalog: { category: "measurement", exposure: "specialist" }, kind: "remove", destructive: true, description: "Unbind explicit selected advertiser app/Pixel sources using fresh context hashes. Requires existing membership and shared/measurement-effects acknowledgement. Verifies absence and preservation of unselected binding identities. No unbind-all inference or replay; no events sent.", payload: catalogEventChange }),
|
|
3316
|
-
defineTool4({ ...read, name: "tiktok_catalog_videos", catalog: { category: "creatives", exposure: "specialist" }, description: "
|
|
3319
|
+
defineTool4({ ...read, name: "tiktok_catalog_videos", catalog: { category: "creatives", exposure: "specialist" }, description: "List videos in the selected TikTok catalog with SKU links, processing status and six-hour previews. Read-only. If permitted, the gallery links to the separately listed tiktok_delete_catalog_video tool for preview and approval.", input: catalogVideoList, output: creativesOutput.extend({ videos: z20.array(z20.record(z20.string(), z20.unknown())), complete: z20.boolean().nullable(), next_page: z20.number().int().positive().optional(), notes: z20.array(z20.string()), page_info: z20.record(z20.string(), z20.unknown()).optional(), missing_ids: z20.array(z20.string()).optional() }), presentation: "creatives", pagination: { cursorInput: "page", cursorOutput: "next_page" }, handler: (input) => provider.catalogs.videos.list(input) }),
|
|
3317
3320
|
defineTool4({ ...read, name: "tiktok_catalog_video_log", catalog: { category: "creatives", exposure: "specialist" }, description: "Read one catalog-video handling task with exact catalog binding. Preserves native processing states/counts and bounded diagnostic field counts. Does not certify video extraction, ad eligibility or advertiser sync; source links/downloads and free-form diagnostics stay hidden.", input: catalogVideoLog, handler: (input) => provider.catalogs.videos.log(input) }),
|
|
3318
3321
|
defineTool4({ ...read, name: "tiktok_catalog_video_import_context", catalog: { category: "creatives", exposure: "specialist" }, description: "Inspect a checksum-bound project CSV for catalog videos and verify every referenced SKU is AVAILABLE for ad creation. Returns catalog/association hashes for upload. Up to 5,000 rows/distinct SKUs and 20 SKUs/video; source URLs stay private. No upload or media-eligibility claim.", input: catalogVideoImportContext, handler: (input) => provider.catalogs.videos.importContext(input) }),
|
|
3319
3322
|
guardedWriteTool3({ name: "tiktok_upload_catalog_videos", namespace: "tiktok", provider: "tiktok", catalog: { category: "creatives", exposure: "specialist" }, kind: "create", destructive: true, description: "Submit a checksum-bound library CSV to the native catalog-video file API, using fresh import-context hashes. May feed existing catalog ads; explicit delivery/shared/async acknowledgement required. Optional sync targets only the selected advertiser and requires copy acknowledgement. Returns an accepted job, not ingestion/sync success; no replay.", payload: catalogVideoUpload }),
|
|
@@ -3330,8 +3333,8 @@ function tiktokCatalogTools(provider, accessManagement = false) {
|
|
|
3330
3333
|
guardedWriteTool3({ name: "tiktok_import_catalog_file", namespace: "tiktok", provider: "tiktok", catalog: { category: "creatives", exposure: "specialist" }, kind: "update", destructive: true, description: "Submit a checksum-bound project CSV as a one-time catalog feed import. Fresh catalog/feed hashes, explicit mode and asynchronous/shared-effects acknowledgement; OVERWRITE also requires deletion acknowledgement. Returns an accepted native job, not completed ingestion. Never automatically replay.", payload: catalogFileImport }),
|
|
3331
3334
|
defineTool4({ ...read, name: "tiktok_catalog_feeds", catalog: { category: "creatives", exposure: "specialist" }, description: "Browse feeds in one explicitly granted catalog, with safe source fingerprints and configuration_hash. Native lists are unpaged; Adport bounds to 5,000 and snapshot-pages locally. Credentials, source paths and query values stay hidden.", input: catalogFeedList, pagination: { cursorInput: "cursor" }, handler: (input) => provider.catalogs.feeds.list(input) }),
|
|
3332
3335
|
defineTool4({ ...read, name: "tiktok_catalog_feed_log", catalog: { category: "creatives", exposure: "specialist" }, description: "Read the latest 10 native processing operations for an exact verified feed. Shows status, counts and timestamps only; not full history or proof of catalog ad eligibility.", input: catalogFeedLog, handler: (input) => provider.catalogs.feeds.log(input) }),
|
|
3333
|
-
guardedWriteTool3({ name: "tiktok_create_catalog_feed", namespace: "tiktok", provider: "tiktok", catalog: { category: "creatives", exposure: "specialist" }, kind: "create", destructive: true, description: "Create a feed using its catalog hash. Optional source/schedule can start product processing; OVERWRITE can remove products. Native config readback required. Source arguments stay private; use the agent to apply when supplied.", payload: catalogFeedCreate, sensitiveInputs: ["schedule_param.source"] }),
|
|
3334
|
-
guardedWriteTool3({ name: "tiktok_update_catalog_feed", namespace: "tiktok", provider: "tiktok", catalog: { category: "creatives", exposure: "specialist" }, kind: "update", destructive: true, description: "Update feed mode/source/schedule using its configuration_hash. OVERWRITE can remove products; explicit automatic-processing acknowledgement required. Native auth cannot be read back. Source arguments stay out of widget approvals.", payload: catalogFeedUpdate, sensitiveInputs: ["schedule_param.source"] }),
|
|
3336
|
+
guardedWriteTool3({ name: "tiktok_create_catalog_feed", namespace: "tiktok", provider: "tiktok", catalog: { category: "creatives", exposure: "specialist" }, kind: "create", destructive: true, description: "Create a feed using its catalog hash. Optional source/schedule can start product processing; OVERWRITE can remove products. Native config readback required. Source arguments stay private; use the agent to apply when supplied.", payload: catalogFeedCreate, hosted: { payload: hostedCatalogFeedCreate, description: "Create a feed in an authorized TikTok catalog. An optional public HTTPS source and schedule can start processing. OVERWRITE can remove products. Requires acknowledgment of processing and effects on existing products and ads." }, sensitiveInputs: ["schedule_param.source"] }),
|
|
3337
|
+
guardedWriteTool3({ name: "tiktok_update_catalog_feed", namespace: "tiktok", provider: "tiktok", catalog: { category: "creatives", exposure: "specialist" }, kind: "update", destructive: true, description: "Update feed mode/source/schedule using its configuration_hash. OVERWRITE can remove products; explicit automatic-processing acknowledgement required. Native auth cannot be read back. Source arguments stay out of widget approvals.", payload: catalogFeedUpdate, hosted: { payload: hostedCatalogFeedUpdate, description: "Update a selected TikTok feed using its current configuration hash. A replacement source must be a public HTTPS URL. OVERWRITE can remove products. Requires acknowledgment of processing and effects on existing products and ads." }, sensitiveInputs: ["schedule_param.source"] }),
|
|
3335
3338
|
guardedWriteTool3({ name: "tiktok_set_catalog_feed_schedule_status", namespace: "tiktok", provider: "tiktok", catalog: { category: "creatives", exposure: "specialist" }, kind: "update", destructive: true, description: "Switch a verified feed ON/OFF with a fresh configuration_hash. ON can resume automatic product changes; requires an existing source, interval and timezone. Opposite state only; independent preservation readback and no replay.", payload: catalogFeedSwitch }),
|
|
3336
3339
|
guardedWriteTool3({ name: "tiktok_delete_catalog_feed", namespace: "tiktok", provider: "tiktok", catalog: { category: "creatives", exposure: "specialist" }, kind: "remove", destructive: true, description: "Permanently delete one verified shared feed using its configuration_hash. Exact native receipt and complete catalog feed absence check required. Dependent products/ads must be reviewed; uncertain results are never replayed.", payload: catalogFeedDelete }),
|
|
3337
3340
|
defineTool4({ ...read, name: "tiktok_product_sets", catalog: { category: "creatives", exposure: "specialist" }, description: "Browse one granted catalog\u2019s product sets or an exact set, with configuration hashes. Snapshot-bound local paging; native endpoint returns all sets, bounded to 5,000. Product counts default off to avoid native timeouts.", input: productSetList, pagination: { cursorInput: "cursor" }, handler: (input) => provider.catalogs.productSets.list(input) }),
|