@adport/provider-x 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 CHANGED
@@ -1474,7 +1474,7 @@ function xAudienceTools(provider) {
1474
1474
  defineTool5({ ...read, name: "x_custom_audience_permissions", description: "Inspect existing audience sharing permissions with native cursor/ID filters; does not grant, revoke or expand access.", input: audiencePermissions, pagination: { cursorInput: "cursor" }, handler: (input) => provider.audiences.permissions(input) }),
1475
1475
  defineTool5({ ...read, name: "x_custom_audience_usage", description: "Inspect all targeted campaigns, including inactive groups, sharing permissions and direct audience inclusion/exclusion criteria. Bounded complete scan supplies usage_hash for deletion; incomplete scans fail.", input: z16.object({ account_id: xId, custom_audience_id: xId }).strict(), handler: (input) => provider.audiences.usage(input.account_id, input.custom_audience_id) }),
1476
1476
  guardedWriteTool5({ ...write, name: "x_create_custom_audience", kind: "create", destructive: false, description: "Create an empty owned CRM audience placeholder. Independently reads back ownership and approved metadata; no user upload, ad association, sharing or activation.", payload: createAudience }),
1477
- guardedWriteTool5({ ...write, name: "x_update_custom_audience", kind: "update", destructive: false, description: "Edit an owned audience name or description using a fresh configuration_hash. Preserves omitted metadata and audience type; independently verifies native readback.", payload: updateAudience }),
1477
+ guardedWriteTool5({ ...write, name: "x_update_custom_audience", kind: "update", destructive: true, description: "Edit an owned audience name or description using a fresh configuration_hash. Preserves omitted metadata and audience type; independently verifies native readback.", payload: updateAudience }),
1478
1478
  guardedWriteTool5({ ...write, name: "x_update_custom_audience_users", kind: "update", destructive: true, description: "Submit explicit Update/Delete member groups to an owned CRM audience. Identifiers must already be normalized SHA256, except native partner_user_id. Preview shows counts/digest; receipt confirms processing acceptance, not targeting readiness. No automatic retry.", payload: audienceUsers, sensitiveInputs: ["operations"] }),
1479
1479
  guardedWriteTool5({ ...write, name: "x_delete_custom_audience", kind: "remove", destructive: true, description: "Delete an owned unreferenced, unshared audience using current configuration and usage hashes. Checks inactive targeting and exclusions, then independently verifies deleted=true. No restore endpoint is claimed.", payload: deleteAudience })
1480
1480
  ];
@@ -1735,7 +1735,7 @@ function xMeasurementTools(provider) {
1735
1735
  defineTool6({ ...read, name: "x_tracking_tags", description: "Inspect native impression/click tracking tags with account/line-item ownership checks, configuration hashes and native cursor/ID filters.", input: trackingTags, pagination: { cursorInput: "cursor" }, handler: (input) => provider.measurement.listTracking(input) }),
1736
1736
  defineTool6({ ...read, name: "x_get_tracking_tag", description: "Read one impression/click tracking tag and its configuration_hash after checking its line item and campaign in the selected account.", input: trackingTag, handler: (input) => provider.measurement.getTracking(input) }),
1737
1737
  guardedWriteTool6({ ...write, name: "x_create_tracking_tag", kind: "create", destructive: false, description: "Associate an HTTPS impression or click tracker with an existing non-draft line item. May immediately change measurement on an active ad group. Verifies native receipt/readback; sends no test event and never retries automatically.", payload: createTrackingTag }),
1738
- guardedWriteTool6({ ...write, name: "x_update_tracking_tag", kind: "update", destructive: false, description: "Change only a tracking-tag URL using a current configuration_hash. Preserves its parent/type and independently reads back the result. May affect active measurement immediately; no automatic retry.", payload: updateTrackingTag }),
1738
+ guardedWriteTool6({ ...write, name: "x_update_tracking_tag", kind: "update", destructive: true, description: "Change only a tracking-tag URL using a current configuration_hash. Preserves its parent/type and independently reads back the result. May affect active measurement immediately; no automatic retry.", payload: updateTrackingTag }),
1739
1739
  guardedWriteTool6({ ...write, name: "x_delete_tracking_tag", kind: "remove", destructive: true, description: "Disassociate a tracking tag using a current configuration_hash. Verifies native deleted=true and independent readback. Can stop third-party measurement; does not pause ads or claim a restore endpoint.", payload: deleteTrackingTag }),
1740
1740
  defineTool6({ ...read, name: "x_conversion_stats", description: "Read native WEB_CONVERSION or separately requested MOBILE_CONVERSION objects for up to 20 verified entities and 30 account-local dates. Placement is explicit. Preserves native fields/units; does not label them normalized conversions, revenue, CPA or ROAS.", input: conversionStats, handler: (input) => provider.measurement.conversions(input) })
1741
1741
  ];
@@ -2830,9 +2830,9 @@ var prerollCtaValues = ["GO_TO", "SEE_MORE", "SHOP", "VISIT_SITE", "WATCH_NOW"];
2830
2830
  var prerollCtaLabels = { GO_TO: "Go to", SEE_MORE: "See more", SHOP: "Shop", VISIT_SITE: "Visit site", WATCH_NOW: "Watch now" };
2831
2831
  var hash8 = z26.string().regex(/^[a-f0-9]{64}$/);
2832
2832
  var button = z26.enum(prerollCtaValues);
2833
- var destination2 = z26.string().url().max(4096).refine((value) => {
2833
+ var destination2 = z26.string().refine((value) => !/[\x00-\x1f\x7f]/.test(value), "Use a destination without control characters").url().max(4096).refine((value) => {
2834
2834
  const url3 = new URL(value);
2835
- return ["http:", "https:"].includes(url3.protocol) && !url3.username && !url3.password && !/[\x00-\x1f\x7f]/.test(value);
2835
+ return ["http:", "https:"].includes(url3.protocol) && !url3.username && !url3.password;
2836
2836
  }, "Use an HTTP(S) destination without embedded credentials or control characters");
2837
2837
  var nativePrerollCta = z26.object({ id: xId, line_item_id: xId, call_to_action: z26.string().min(1), call_to_action_url: z26.string(), deleted: z26.boolean(), account_id: xId.optional() });
2838
2838
  var prerollCtaList = z26.object({ account_id: xId, line_item_id: xId.optional(), count: z26.number().int().min(1).max(50).default(20), cursor: z26.string().min(1).max(4096).optional(), with_deleted: z26.boolean().default(false) }).strict();
@@ -3431,7 +3431,7 @@ function xCardTools(provider) {
3431
3431
  defineTool7({ name: "x_cards", namespace: "x", description: "Browse native website/app/carousel cards with bounded media previews, copy edits and cursor pagination. Cards are separate from post publication and ad delivery. Legacy inclusion is explicit; this inventory does not replace exact-URI cards/all lookup.", input: listCards, output: creativesOutput2.passthrough(), presentation: "creatives", pagination: { cursorInput: "cursor" }, catalog, annotations: { readOnly: true, openWorld: false }, handler: (v) => provider.cards.list(v) }),
3432
3432
  defineTool7({ name: "x_get_card", namespace: "x", description: "Read one modern card by numeric ID within the selected account, including full native configuration and configuration_hash for edits/deletion.", input: z33.object({ account_id: xId, card_id: snowflake, with_deleted: z33.boolean().default(false) }), catalog, annotations: { readOnly: true, openWorld: false }, handler: (v) => provider.cards.get(v.account_id, v.card_id, v.with_deleted) }),
3433
3433
  guardedWriteTool7({ name: "x_create_card", namespace: "x", provider: "x", kind: "create", description: "Create an unattached website/app or carousel card from ready account-owned image/video media. Uses the native JSON body and independently verifies content. Does not publish posts or create ad associations. Local preview only; never repeat an unconfirmed creation.", payload: createCard, destructive: false, openWorld: false, catalog }),
3434
- guardedWriteTool7({ name: "x_update_card", namespace: "x", provider: "x", kind: "update", description: "Edit one modern card using its current configuration hash. Omitted fields stay unchanged; components/slides replace their layout. Copy shortcuts edit a supported current layout and require slide_index for multi-destination cards. Shared changes can affect existing posts/ads immediately; acknowledgement required. No automatic retry.", payload: updateCard, destructive: true, openWorld: false, catalog }),
3434
+ guardedWriteTool7({ name: "x_update_card", namespace: "x", provider: "x", kind: "update", description: "Edit one modern card using its current configuration hash. Omitted fields stay unchanged; components/slides replace their layout. Copy shortcuts edit a supported current layout and require slide_index for multi-destination cards. Shared changes can affect existing posts/ads immediately; acknowledgement required. No automatic retry.", payload: updateCard, destructive: true, openWorld: true, catalog }),
3435
3435
  guardedWriteTool7({ name: "x_delete_card", namespace: "x", provider: "x", kind: "remove", description: "Delete one modern card after a matching snapshot and shared-effects acknowledgement. Existing uses may be affected; no restore endpoint is established. Verifies exact native deletion/readback; does not pause an ad or campaign. No automatic retry.", payload: deleteCard, destructive: true, openWorld: false, catalog })
3436
3436
  ];
3437
3437
  }