@canonry/canonry 4.180.1 → 4.180.3
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/assets/agent-workspace/skills/canonry/references/canonry-cli.md +11 -6
- package/assets/assets/{AuditHistoryPanel-DI6iXS0J.js → AuditHistoryPanel-CRtw07lK.js} +1 -1
- package/assets/assets/{BacklinksPage-DiwTMJTp.js → BacklinksPage-DURChJhG.js} +1 -1
- package/assets/assets/{HistoryPage-BWODoEok.js → HistoryPage-DsSSJmOs.js} +1 -1
- package/assets/assets/{MeasurementPropertyPage-C1uZ9LEl.js → MeasurementPropertyPage-DalkH9IT.js} +1 -1
- package/assets/assets/{ProjectPage-C-fk0Jja.js → ProjectPage-CXLK_E8n.js} +8 -8
- package/assets/assets/{RunRow-CMSISg-I.js → RunRow-DDwwyIxg.js} +1 -1
- package/assets/assets/{RunsPage-HZwwLQDE.js → RunsPage-DCgaTijO.js} +1 -1
- package/assets/assets/{SettingsPage-3eoRO4ze.js → SettingsPage-DwQqOC3_.js} +1 -1
- package/assets/assets/{SiteHealthSection-CATUc26x.js → SiteHealthSection-Fg2-UL0h.js} +3 -3
- package/assets/assets/{TrafficPage-Cw8AM5VR.js → TrafficPage-CefISwhk.js} +1 -1
- package/assets/assets/{TrafficSourceDetailPage-ChFDAstr.js → TrafficSourceDetailPage-Rotzu2tN.js} +1 -1
- package/assets/assets/{extract-error-message-CG_IQ_9c.js → extract-error-message-D6lzT2hr.js} +1 -1
- package/assets/assets/{index-Dz0ju3qg.js → index-BuZ_xmnc.js} +25 -25
- package/assets/assets/{react-sigma_core.esm.min-BvgsCKLZ.js → react-sigma_core.esm.min-D-IM5qRE.js} +1 -1
- package/assets/index.html +1 -1
- package/dist/{chunk-A6XDLCKF.js → chunk-CKGWOYPO.js} +2 -2
- package/dist/{chunk-3JW762Q4.js → chunk-JWPN6RU7.js} +14 -8
- package/dist/{chunk-VEEHINTY.js → chunk-OJDH2F6I.js} +183 -21
- package/dist/{chunk-BJAZWJNH.js → chunk-W3YSGMYK.js} +23 -11
- package/dist/{chunk-NFALEGSZ.js → chunk-YPDKZ73I.js} +2 -2
- package/dist/cli.js +5 -5
- package/dist/index.js +4 -4
- package/dist/{intelligence-service-NHAF7V6L.js → intelligence-service-DSYYBDR2.js} +2 -2
- package/dist/mcp.js +3 -3
- package/package.json +9 -9
package/assets/assets/{react-sigma_core.esm.min-BvgsCKLZ.js → react-sigma_core.esm.min-D-IM5qRE.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{g as Bt,t as S,r as C}from"./vendor-tanstack-Dock0eH1.js";import{e as Ht,G as Wt}from"./SiteHealthSection-
|
|
1
|
+
import{g as Bt,t as S,r as C}from"./vendor-tanstack-Dock0eH1.js";import{e as Ht,G as Wt}from"./SiteHealthSection-Fg2-UL0h.js";import"./index-BuZ_xmnc.js";import"./vendor-radix-4UOaVWza.js";import"./vendor-recharts-D8rt5lKn.js";import"./vendor-lucide-nYKv-BB7.js";import"./vendor-markdown-Bn7fRwrx.js";import"./vendor-yaml-GWJz5H2G.js";import"./ChartPrimitives-DG35TyhH.js";function Vt(r,n){if(typeof r!="object"||!r)return r;var i=r[Symbol.toPrimitive];if(i!==void 0){var e=i.call(r,n);if(typeof e!="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(r)}function ae(r){var n=Vt(r,"string");return typeof n=="symbol"?n:n+""}function A(r,n){if(!(r instanceof n))throw new TypeError("Cannot call a class as a function")}function He(r,n){for(var i=0;i<n.length;i++){var e=n[i];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(r,ae(e.key),e)}}function L(r,n,i){return n&&He(r.prototype,n),i&&He(r,i),Object.defineProperty(r,"prototype",{writable:!1}),r}function Q(r){return Q=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Q(r)}function yt(){try{var r=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(yt=function(){return!!r})()}function jt(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function Zt(r,n){if(n&&(typeof n=="object"||typeof n=="function"))return n;if(n!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return jt(r)}function I(r,n,i){return n=Q(n),Zt(r,yt()?Reflect.construct(n,i||[],Q(r).constructor):n.apply(r,i))}function xe(r,n){return xe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,e){return i.__proto__=e,i},xe(r,n)}function G(r,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function");r.prototype=Object.create(n&&n.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),n&&xe(r,n)}function qt(r){if(Array.isArray(r))return r}function Yt(r,n){var i=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(i!=null){var e,t,a,o,s=[],l=!0,h=!1;try{if(a=(i=i.call(r)).next,n===0){if(Object(i)!==i)return;l=!1}else for(;!(l=(e=a.call(i)).done)&&(s.push(e.value),s.length!==n);l=!0);}catch(u){h=!0,t=u}finally{try{if(!l&&i.return!=null&&(o=i.return(),Object(o)!==o))return}finally{if(h)throw t}}return s}}function Se(r,n){(n==null||n>r.length)&&(n=r.length);for(var i=0,e=Array(n);i<n;i++)e[i]=r[i];return e}function Tt(r,n){if(r){if(typeof r=="string")return Se(r,n);var i={}.toString.call(r).slice(8,-1);return i==="Object"&&r.constructor&&(i=r.constructor.name),i==="Map"||i==="Set"?Array.from(r):i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?Se(r,n):void 0}}function Xt(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
2
2
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ee(r,n){return qt(r)||Yt(r,n)||Tt(r,n)||Xt()}var pe={black:"#000000",silver:"#C0C0C0",gray:"#808080",grey:"#808080",white:"#FFFFFF",maroon:"#800000",red:"#FF0000",purple:"#800080",fuchsia:"#FF00FF",green:"#008000",lime:"#00FF00",olive:"#808000",yellow:"#FFFF00",navy:"#000080",blue:"#0000FF",teal:"#008080",aqua:"#00FFFF",darkblue:"#00008B",mediumblue:"#0000CD",darkgreen:"#006400",darkcyan:"#008B8B",deepskyblue:"#00BFFF",darkturquoise:"#00CED1",mediumspringgreen:"#00FA9A",springgreen:"#00FF7F",cyan:"#00FFFF",midnightblue:"#191970",dodgerblue:"#1E90FF",lightseagreen:"#20B2AA",forestgreen:"#228B22",seagreen:"#2E8B57",darkslategray:"#2F4F4F",darkslategrey:"#2F4F4F",limegreen:"#32CD32",mediumseagreen:"#3CB371",turquoise:"#40E0D0",royalblue:"#4169E1",steelblue:"#4682B4",darkslateblue:"#483D8B",mediumturquoise:"#48D1CC",indigo:"#4B0082",darkolivegreen:"#556B2F",cadetblue:"#5F9EA0",cornflowerblue:"#6495ED",rebeccapurple:"#663399",mediumaquamarine:"#66CDAA",dimgray:"#696969",dimgrey:"#696969",slateblue:"#6A5ACD",olivedrab:"#6B8E23",slategray:"#708090",slategrey:"#708090",lightslategray:"#778899",lightslategrey:"#778899",mediumslateblue:"#7B68EE",lawngreen:"#7CFC00",chartreuse:"#7FFF00",aquamarine:"#7FFFD4",skyblue:"#87CEEB",lightskyblue:"#87CEFA",blueviolet:"#8A2BE2",darkred:"#8B0000",darkmagenta:"#8B008B",saddlebrown:"#8B4513",darkseagreen:"#8FBC8F",lightgreen:"#90EE90",mediumpurple:"#9370DB",darkviolet:"#9400D3",palegreen:"#98FB98",darkorchid:"#9932CC",yellowgreen:"#9ACD32",sienna:"#A0522D",brown:"#A52A2A",darkgray:"#A9A9A9",darkgrey:"#A9A9A9",lightblue:"#ADD8E6",greenyellow:"#ADFF2F",paleturquoise:"#AFEEEE",lightsteelblue:"#B0C4DE",powderblue:"#B0E0E6",firebrick:"#B22222",darkgoldenrod:"#B8860B",mediumorchid:"#BA55D3",rosybrown:"#BC8F8F",darkkhaki:"#BDB76B",mediumvioletred:"#C71585",indianred:"#CD5C5C",peru:"#CD853F",chocolate:"#D2691E",tan:"#D2B48C",lightgray:"#D3D3D3",lightgrey:"#D3D3D3",thistle:"#D8BFD8",orchid:"#DA70D6",goldenrod:"#DAA520",palevioletred:"#DB7093",crimson:"#DC143C",gainsboro:"#DCDCDC",plum:"#DDA0DD",burlywood:"#DEB887",lightcyan:"#E0FFFF",lavender:"#E6E6FA",darksalmon:"#E9967A",violet:"#EE82EE",palegoldenrod:"#EEE8AA",lightcoral:"#F08080",khaki:"#F0E68C",aliceblue:"#F0F8FF",honeydew:"#F0FFF0",azure:"#F0FFFF",sandybrown:"#F4A460",wheat:"#F5DEB3",beige:"#F5F5DC",whitesmoke:"#F5F5F5",mintcream:"#F5FFFA",ghostwhite:"#F8F8FF",salmon:"#FA8072",antiquewhite:"#FAEBD7",linen:"#FAF0E6",lightgoldenrodyellow:"#FAFAD2",oldlace:"#FDF5E6",magenta:"#FF00FF",deeppink:"#FF1493",orangered:"#FF4500",tomato:"#FF6347",hotpink:"#FF69B4",coral:"#FF7F50",darkorange:"#FF8C00",lightsalmon:"#FFA07A",orange:"#FFA500",lightpink:"#FFB6C1",pink:"#FFC0CB",gold:"#FFD700",peachpuff:"#FFDAB9",navajowhite:"#FFDEAD",moccasin:"#FFE4B5",bisque:"#FFE4C4",mistyrose:"#FFE4E1",blanchedalmond:"#FFEBCD",papayawhip:"#FFEFD5",lavenderblush:"#FFF0F5",seashell:"#FFF5EE",cornsilk:"#FFF8DC",lemonchiffon:"#FFFACD",floralwhite:"#FFFAF0",snow:"#FFFAFA",lightyellow:"#FFFFE0",ivory:"#FFFFF0"},Ct=new Int8Array(4),be=new Int32Array(Ct.buffer,0,1),$t=new Float32Array(Ct.buffer,0,1),Kt=/^\s*rgba?\s*\(/,Jt=/^\s*rgba?\s*\(\s*([0-9]*)\s*,\s*([0-9]*)\s*,\s*([0-9]*)(?:\s*,\s*(.*)?)?\)\s*$/;function Qt(r){var n=0,i=0,e=0,t=1;if(r[0]==="#")r.length===4?(n=parseInt(r.charAt(1)+r.charAt(1),16),i=parseInt(r.charAt(2)+r.charAt(2),16),e=parseInt(r.charAt(3)+r.charAt(3),16)):(n=parseInt(r.charAt(1)+r.charAt(2),16),i=parseInt(r.charAt(3)+r.charAt(4),16),e=parseInt(r.charAt(5)+r.charAt(6),16)),r.length===9&&(t=parseInt(r.charAt(7)+r.charAt(8),16)/255);else if(Kt.test(r)){var a=r.match(Jt);a&&(n=+a[1],i=+a[2],e=+a[3],a[4]&&(t=+a[4]))}return{r:n,g:i,b:e,a:t}}var J={};for(var le in pe)J[le]=oe(pe[le]),J[pe[le]]=J[le];function Rt(r,n,i,e,t){return be[0]=e<<24|i<<16|n<<8|r,be[0]=be[0]&4278190079,$t[0]}function oe(r){if(r=r.toLowerCase(),typeof J[r]<"u")return J[r];var n=Qt(r),i=n.r,e=n.g,t=n.b,a=n.a;a=a*255|0;var o=Rt(i,e,t,a);return J[r]=o,o}var Ee={};function _t(r){if(typeof Ee[r]<"u")return Ee[r];var n=(r&16711680)>>>16,i=(r&65280)>>>8,e=r&255,t=255,a=Rt(n,i,e,t);return Ee[r]=a,a}function We(r,n,i,e){return i+(n<<8)+(r<<16)}function Ve(r,n,i,e,t,a){var o=Math.floor(i/a*t),s=Math.floor(r.drawingBufferHeight/a-e/a*t),l=new Uint8Array(4);r.bindFramebuffer(r.FRAMEBUFFER,n),r.readPixels(o,s,1,1,r.RGBA,r.UNSIGNED_BYTE,l);var h=ee(l,4),u=h[0],d=h[1],f=h[2],g=h[3];return[u,d,f,g]}function c(r,n,i){return(n=ae(n))in r?Object.defineProperty(r,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):r[n]=i,r}function je(r,n){var i=Object.keys(r);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(r);n&&(e=e.filter(function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})),i.push.apply(i,e)}return i}function b(r){for(var n=1;n<arguments.length;n++){var i=arguments[n]!=null?arguments[n]:{};n%2?je(Object(i),!0).forEach(function(e){c(r,e,i[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(i)):je(Object(i)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(i,e))})}return r}function ei(r,n){for(;!{}.hasOwnProperty.call(r,n)&&(r=Q(r))!==null;);return r}function Ae(){return Ae=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(r,n,i){var e=ei(r,n);if(e){var t=Object.getOwnPropertyDescriptor(e,n);return t.get?t.get.call(arguments.length<3?r:i):t.value}},Ae.apply(null,arguments)}function wt(r,n,i,e){var t=Ae(Q(r.prototype),n,i);return typeof t=="function"?function(a){return t.apply(i,a)}:t}function ti(r){return r.normalized?1:r.size}function ye(r){var n=0;return r.forEach(function(i){return n+=ti(i)}),n}function xt(r,n,i){var e=r==="VERTEX"?n.VERTEX_SHADER:n.FRAGMENT_SHADER,t=n.createShader(e);if(t===null)throw new Error("loadShader: error while creating the shader");n.shaderSource(t,i),n.compileShader(t);var a=n.getShaderParameter(t,n.COMPILE_STATUS);if(!a){var o=n.getShaderInfoLog(t);throw n.deleteShader(t),new Error(`loadShader: error while compiling the shader:
|
|
3
3
|
`.concat(o,`
|
|
4
4
|
`).concat(i))}return t}function ii(r,n){return xt("VERTEX",r,n)}function ri(r,n){return xt("FRAGMENT",r,n)}function ni(r,n){var i=r.createProgram();if(i===null)throw new Error("loadProgram: error while creating the program.");var e,t;for(e=0,t=n.length;e<t;e++)r.attachShader(i,n[e]);r.linkProgram(i);var a=r.getProgramParameter(i,r.LINK_STATUS);if(!a){var o=r.getProgramInfoLog(i);throw r.deleteProgram(i),new Error("loadProgram: error while linking the program: ".concat(o))}return i}function Ze(r){var n=r.gl,i=r.buffer,e=r.program,t=r.vertexShader,a=r.fragmentShader;n.deleteShader(t),n.deleteShader(a),n.deleteProgram(e),n.deleteBuffer(i)}var qe=`#define PICKING_MODE
|
package/assets/index.html
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
<link rel="icon" type="image/png" sizes="32x32" href="./favicon-32.png" />
|
|
13
13
|
<link rel="apple-touch-icon" href="./apple-touch-icon.png" />
|
|
14
14
|
<title>Canonry</title>
|
|
15
|
-
<script type="module" crossorigin src="./assets/index-
|
|
15
|
+
<script type="module" crossorigin src="./assets/index-BuZ_xmnc.js"></script>
|
|
16
16
|
<link rel="modulepreload" crossorigin href="./assets/vendor-tanstack-Dock0eH1.js">
|
|
17
17
|
<link rel="modulepreload" crossorigin href="./assets/vendor-radix-4UOaVWza.js">
|
|
18
18
|
<link rel="modulepreload" crossorigin href="./assets/vendor-recharts-D8rt5lKn.js">
|
|
@@ -5,11 +5,11 @@ import {
|
|
|
5
5
|
installSkills,
|
|
6
6
|
loadConfigRaw,
|
|
7
7
|
saveConfigPatch
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-YPDKZ73I.js";
|
|
9
9
|
import {
|
|
10
10
|
SKILL_MANIFEST_FILENAME,
|
|
11
11
|
SkillsClients
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-JWPN6RU7.js";
|
|
13
13
|
|
|
14
14
|
// src/skills-autosync.ts
|
|
15
15
|
import fs from "fs";
|
|
@@ -15422,13 +15422,16 @@ var adsOperationKindSchema = z52.enum([
|
|
|
15422
15422
|
"campaign_create",
|
|
15423
15423
|
"campaign_update",
|
|
15424
15424
|
"campaign_pause",
|
|
15425
|
+
"campaign_archive",
|
|
15425
15426
|
"campaign_tree_activate",
|
|
15426
15427
|
"ad_group_create",
|
|
15427
15428
|
"ad_group_update",
|
|
15428
15429
|
"ad_group_pause",
|
|
15430
|
+
"ad_group_archive",
|
|
15429
15431
|
"ad_create",
|
|
15430
15432
|
"ad_update",
|
|
15431
|
-
"ad_pause"
|
|
15433
|
+
"ad_pause",
|
|
15434
|
+
"ad_archive"
|
|
15432
15435
|
]);
|
|
15433
15436
|
var AdsOperationKinds = adsOperationKindSchema.enum;
|
|
15434
15437
|
var adsOperationStateSchema = z52.enum(["pending", "reconciling", "succeeded", "failed", "unknown"]);
|
|
@@ -15575,19 +15578,17 @@ var adsCampaignCreateRequestSchema = z52.object({
|
|
|
15575
15578
|
endTime: adsTimestampSchema.optional(),
|
|
15576
15579
|
lifetimeSpendLimitMicros: adsMicrosSchema.min(1e6),
|
|
15577
15580
|
locationIds: z52.array(adsEntityIdSchema).min(1).max(100),
|
|
15581
|
+
// biddingType is BILLING (what the account pays for) and is immutable once
|
|
15582
|
+
// the provider creates the campaign. conversionEventSettingIds is
|
|
15583
|
+
// OPTIMIZATION (what delivery is steered toward). The two are independent,
|
|
15584
|
+
// and the provider accepts a clicks campaign carrying no conversion event
|
|
15585
|
+
// settings, so neither field is conditioned on the other here.
|
|
15578
15586
|
biddingType: adsCampaignBiddingTypeSchema.optional(),
|
|
15579
15587
|
conversionEventSettingIds: adsConversionEventSettingIdsSchema.optional()
|
|
15580
15588
|
}).superRefine((value, ctx) => {
|
|
15581
15589
|
if (value.startTime !== void 0 && value.endTime !== void 0 && value.endTime <= value.startTime) {
|
|
15582
15590
|
ctx.addIssue({ code: "custom", path: ["endTime"], message: "endTime must be after startTime" });
|
|
15583
15591
|
}
|
|
15584
|
-
if (value.biddingType === AdsCampaignBiddingTypes.clicks && (value.conversionEventSettingIds === void 0 || value.conversionEventSettingIds.length === 0)) {
|
|
15585
|
-
ctx.addIssue({
|
|
15586
|
-
code: "custom",
|
|
15587
|
-
path: ["conversionEventSettingIds"],
|
|
15588
|
-
message: "conversionEventSettingIds must be non-empty when biddingType is clicks"
|
|
15589
|
-
});
|
|
15590
|
-
}
|
|
15591
15592
|
});
|
|
15592
15593
|
var adsAdGroupCreateRequestSchema = z52.object({
|
|
15593
15594
|
operationKey: adsOperationKeySchema,
|
|
@@ -15640,6 +15641,10 @@ var adsAdUpdateRequestSchema = z52.object({
|
|
|
15640
15641
|
var adsPauseRequestSchema = z52.object({
|
|
15641
15642
|
operationKey: adsOperationKeySchema
|
|
15642
15643
|
});
|
|
15644
|
+
var adsArchiveRequestSchema = z52.object({
|
|
15645
|
+
operationKey: adsOperationKeySchema,
|
|
15646
|
+
expectedUpdatedAt: z52.number().int().nonnegative()
|
|
15647
|
+
});
|
|
15643
15648
|
var adsOperationDtoSchema = z52.object({
|
|
15644
15649
|
id: z52.string(),
|
|
15645
15650
|
adAccountId: z52.string().nullable(),
|
|
@@ -17044,6 +17049,7 @@ export {
|
|
|
17044
17049
|
adsAdGroupUpdateRequestSchema,
|
|
17045
17050
|
adsAdUpdateRequestSchema,
|
|
17046
17051
|
adsPauseRequestSchema,
|
|
17052
|
+
adsArchiveRequestSchema,
|
|
17047
17053
|
adsOperationResponseSchema,
|
|
17048
17054
|
adsActivationGrantDtoSchema,
|
|
17049
17055
|
adsOperationStepDtoSchema,
|
|
@@ -141,6 +141,7 @@ import {
|
|
|
141
141
|
adsAdGroupCreateRequestSchema,
|
|
142
142
|
adsAdGroupUpdateRequestSchema,
|
|
143
143
|
adsAdUpdateRequestSchema,
|
|
144
|
+
adsArchiveRequestSchema,
|
|
144
145
|
adsCampaignBiddingTypeSchema,
|
|
145
146
|
adsCampaignCreateRequestSchema,
|
|
146
147
|
adsCampaignListResponseSchema,
|
|
@@ -642,7 +643,7 @@ import {
|
|
|
642
643
|
wordpressSchemaDeployResultDtoSchema,
|
|
643
644
|
wordpressSchemaStatusResultDtoSchema,
|
|
644
645
|
wordpressStatusDtoSchema
|
|
645
|
-
} from "./chunk-
|
|
646
|
+
} from "./chunk-JWPN6RU7.js";
|
|
646
647
|
|
|
647
648
|
// src/intelligence-service.ts
|
|
648
649
|
import { eq as eq62, desc as desc27, asc as asc11, and as and51, ne as ne8, or as or14, inArray as inArray22, gte as gte14, lte as lte12, isNull as isNull9, sql as sql25, exists } from "drizzle-orm";
|
|
@@ -34400,7 +34401,7 @@ var routeCatalog = [
|
|
|
34400
34401
|
method: "post",
|
|
34401
34402
|
path: "/api/v1/projects/{name}/ads/campaigns",
|
|
34402
34403
|
summary: "Create a paused OpenAI Ads campaign",
|
|
34403
|
-
description: "The server always creates the campaign paused.
|
|
34404
|
+
description: "The server always creates the campaign paused. biddingType is what the account is billed for and is immutable after creation; conversionEventSettingIds is the independent, optional optimization target, so click bidding may carry none. Omit both bidding fields for legacy impressions mode. Status is not accepted from the caller.",
|
|
34404
34405
|
tags: ["ads"],
|
|
34405
34406
|
parameters: [nameParameter],
|
|
34406
34407
|
requestBody: {
|
|
@@ -34421,7 +34422,7 @@ var routeCatalog = [
|
|
|
34421
34422
|
type: "array",
|
|
34422
34423
|
uniqueItems: true,
|
|
34423
34424
|
items: stringSchema,
|
|
34424
|
-
description: "
|
|
34425
|
+
description: "Optional conversion events to optimize delivery toward. Independent of biddingType: a clicks campaign may omit these."
|
|
34425
34426
|
}
|
|
34426
34427
|
}
|
|
34427
34428
|
} } }
|
|
@@ -34649,6 +34650,69 @@ var routeCatalog = [
|
|
|
34649
34650
|
502: errorResponse("Upstream outcome failed or is unknown.")
|
|
34650
34651
|
}
|
|
34651
34652
|
},
|
|
34653
|
+
{
|
|
34654
|
+
method: "post",
|
|
34655
|
+
path: "/api/v1/projects/{name}/ads/campaigns/{id}/archive",
|
|
34656
|
+
summary: "Archive an OpenAI Ads campaign (irreversible)",
|
|
34657
|
+
description: "IRREVERSIBLE. The entity must already be paused, and expectedUpdatedAt must match the live upstream revision, so an active entity is refused and a stale version is refused. There is no remediation: an unconfirmed archived state leaves the receipt unknown for reconciliation. The upstream archive path and its archived status transition were verified live against a Canonry-owned test advertiser account on 2026-09-02. The provider list endpoints are eventually consistent and can still report a freshly archived entity as paused, so the archived state is confirmed by a direct single-entity read, never by a list.",
|
|
34658
|
+
tags: ["ads"],
|
|
34659
|
+
parameters: [nameParameter, { name: "id", in: "path", required: true, description: "Campaign ID.", schema: stringSchema }],
|
|
34660
|
+
requestBody: { required: true, content: { "application/json": { schema: {
|
|
34661
|
+
type: "object",
|
|
34662
|
+
required: ["operationKey", "expectedUpdatedAt"],
|
|
34663
|
+
properties: { operationKey: adsOperationKeySchema, expectedUpdatedAt: integerSchema }
|
|
34664
|
+
} } } },
|
|
34665
|
+
responses: {
|
|
34666
|
+
200: jsonResponse("Campaign archive receipt.", "AdsOperationResponse"),
|
|
34667
|
+
400: errorResponse("Invalid request, active entity, stale expectedUpdatedAt, or ads connection unavailable."),
|
|
34668
|
+
403: errorResponse("The key lacks ads.write."),
|
|
34669
|
+
404: errorResponse("Project not found."),
|
|
34670
|
+
409: errorResponse("Operation key was already used for a different request."),
|
|
34671
|
+
502: errorResponse("Upstream outcome failed or is unknown.")
|
|
34672
|
+
}
|
|
34673
|
+
},
|
|
34674
|
+
{
|
|
34675
|
+
method: "post",
|
|
34676
|
+
path: "/api/v1/projects/{name}/ads/ad-groups/{id}/archive",
|
|
34677
|
+
summary: "Archive an OpenAI Ads ad group (irreversible)",
|
|
34678
|
+
description: "IRREVERSIBLE. The entity must already be paused, and expectedUpdatedAt must match the live upstream revision, so an active entity is refused and a stale version is refused. There is no remediation: an unconfirmed archived state leaves the receipt unknown for reconciliation. The upstream archive path and its archived status transition were verified live against a Canonry-owned test advertiser account on 2026-09-02. The provider list endpoints are eventually consistent and can still report a freshly archived entity as paused, so the archived state is confirmed by a direct single-entity read, never by a list.",
|
|
34679
|
+
tags: ["ads"],
|
|
34680
|
+
parameters: [nameParameter, { name: "id", in: "path", required: true, description: "Ad group ID.", schema: stringSchema }],
|
|
34681
|
+
requestBody: { required: true, content: { "application/json": { schema: {
|
|
34682
|
+
type: "object",
|
|
34683
|
+
required: ["operationKey", "expectedUpdatedAt"],
|
|
34684
|
+
properties: { operationKey: adsOperationKeySchema, expectedUpdatedAt: integerSchema }
|
|
34685
|
+
} } } },
|
|
34686
|
+
responses: {
|
|
34687
|
+
200: jsonResponse("Ad-group archive receipt.", "AdsOperationResponse"),
|
|
34688
|
+
400: errorResponse("Invalid request, active entity, stale expectedUpdatedAt, or ads connection unavailable."),
|
|
34689
|
+
403: errorResponse("The key lacks ads.write."),
|
|
34690
|
+
404: errorResponse("Project not found."),
|
|
34691
|
+
409: errorResponse("Operation key was already used for a different request."),
|
|
34692
|
+
502: errorResponse("Upstream outcome failed or is unknown.")
|
|
34693
|
+
}
|
|
34694
|
+
},
|
|
34695
|
+
{
|
|
34696
|
+
method: "post",
|
|
34697
|
+
path: "/api/v1/projects/{name}/ads/ads/{id}/archive",
|
|
34698
|
+
summary: "Archive an OpenAI Ads ad (irreversible)",
|
|
34699
|
+
description: "IRREVERSIBLE. The entity must already be paused, and expectedUpdatedAt must match the live upstream revision, so an active entity is refused and a stale version is refused. There is no remediation: an unconfirmed archived state leaves the receipt unknown for reconciliation. The upstream archive path and its archived status transition were verified live against a Canonry-owned test advertiser account on 2026-09-02. The provider list endpoints are eventually consistent and can still report a freshly archived entity as paused, so the archived state is confirmed by a direct single-entity read, never by a list.",
|
|
34700
|
+
tags: ["ads"],
|
|
34701
|
+
parameters: [nameParameter, { name: "id", in: "path", required: true, description: "Ad ID.", schema: stringSchema }],
|
|
34702
|
+
requestBody: { required: true, content: { "application/json": { schema: {
|
|
34703
|
+
type: "object",
|
|
34704
|
+
required: ["operationKey", "expectedUpdatedAt"],
|
|
34705
|
+
properties: { operationKey: adsOperationKeySchema, expectedUpdatedAt: integerSchema }
|
|
34706
|
+
} } } },
|
|
34707
|
+
responses: {
|
|
34708
|
+
200: jsonResponse("Ad archive receipt.", "AdsOperationResponse"),
|
|
34709
|
+
400: errorResponse("Invalid request, active entity, stale expectedUpdatedAt, or ads connection unavailable."),
|
|
34710
|
+
403: errorResponse("The key lacks ads.write."),
|
|
34711
|
+
404: errorResponse("Project not found."),
|
|
34712
|
+
409: errorResponse("Operation key was already used for a different request."),
|
|
34713
|
+
502: errorResponse("Upstream outcome failed or is unknown.")
|
|
34714
|
+
}
|
|
34715
|
+
},
|
|
34652
34716
|
{
|
|
34653
34717
|
method: "post",
|
|
34654
34718
|
path: "/api/v1/projects/{name}/ads/sync",
|
|
@@ -45989,14 +46053,15 @@ var DEFAULT_RECONCILE_BATCH_SIZE = 10;
|
|
|
45989
46053
|
var DEFAULT_RECONCILE_LEASE_MS = 3e4;
|
|
45990
46054
|
var DEFAULT_ADS_ACCOUNT_VERIFICATION_CACHE_TTL_MS = 5 * 6e4;
|
|
45991
46055
|
var ADS_RECONCILIATION_QUARANTINED = "ADS_RECONCILIATION_QUARANTINED";
|
|
45992
|
-
var
|
|
45993
|
-
constructor(entityId) {
|
|
45994
|
-
super(
|
|
46056
|
+
var AdsStatusPostconditionError = class extends Error {
|
|
46057
|
+
constructor(entityId, expectedStatus) {
|
|
46058
|
+
super(`OpenAI Ads API did not confirm the required ${expectedStatus} state`);
|
|
45995
46059
|
this.entityId = entityId;
|
|
45996
|
-
this.
|
|
46060
|
+
this.code = `ADS_${expectedStatus.toUpperCase()}_POSTCONDITION_FAILED`;
|
|
46061
|
+
this.name = "AdsStatusPostconditionError";
|
|
45997
46062
|
}
|
|
45998
46063
|
entityId;
|
|
45999
|
-
code
|
|
46064
|
+
code;
|
|
46000
46065
|
status = 502;
|
|
46001
46066
|
};
|
|
46002
46067
|
function statusDto(row) {
|
|
@@ -46448,7 +46513,7 @@ async function executeAdsOperation(app, request, input) {
|
|
|
46448
46513
|
if (input.expectedStatus !== void 0 && result.status !== input.expectedStatus) {
|
|
46449
46514
|
if (input.remediateStatus) result = await input.remediateStatus(result);
|
|
46450
46515
|
if (result.status !== input.expectedStatus) {
|
|
46451
|
-
throw new
|
|
46516
|
+
throw new AdsStatusPostconditionError(result.id, input.expectedStatus);
|
|
46452
46517
|
}
|
|
46453
46518
|
}
|
|
46454
46519
|
const succeededResult = result;
|
|
@@ -46979,9 +47044,9 @@ function assertExpectedUpdatedAt(entity, expected) {
|
|
|
46979
47044
|
});
|
|
46980
47045
|
}
|
|
46981
47046
|
}
|
|
46982
|
-
function
|
|
47047
|
+
function assertPausedForWrite(entity, action = "updating") {
|
|
46983
47048
|
if (entity.status !== AdsEntityStatuses.paused) {
|
|
46984
|
-
throw validationError(
|
|
47049
|
+
throw validationError(`Pause the upstream ad entity before ${action} it`, {
|
|
46985
47050
|
actualStatus: entity.status
|
|
46986
47051
|
});
|
|
46987
47052
|
}
|
|
@@ -47449,7 +47514,7 @@ async function adsRoutes(app, opts) {
|
|
|
47449
47514
|
run: async () => {
|
|
47450
47515
|
const current = await operator.getCampaign(apiKey, request.params.id);
|
|
47451
47516
|
assertExpectedUpdatedAt(current, expectedUpdatedAt);
|
|
47452
|
-
|
|
47517
|
+
assertPausedForWrite(current);
|
|
47453
47518
|
return operator.updateCampaign(apiKey, request.params.id, update);
|
|
47454
47519
|
}
|
|
47455
47520
|
});
|
|
@@ -47480,7 +47545,7 @@ async function adsRoutes(app, opts) {
|
|
|
47480
47545
|
run: async () => {
|
|
47481
47546
|
const current = await operator.getAdGroup(apiKey, request.params.id);
|
|
47482
47547
|
assertExpectedUpdatedAt(current, expectedUpdatedAt);
|
|
47483
|
-
|
|
47548
|
+
assertPausedForWrite(current);
|
|
47484
47549
|
if (update.maxBidMicros === void 0) {
|
|
47485
47550
|
return operator.updateAdGroup(apiKey, request.params.id, update);
|
|
47486
47551
|
}
|
|
@@ -47522,7 +47587,7 @@ async function adsRoutes(app, opts) {
|
|
|
47522
47587
|
run: async () => {
|
|
47523
47588
|
const current = await operator.getAd(apiKey, request.params.id);
|
|
47524
47589
|
assertExpectedUpdatedAt(current, expectedUpdatedAt);
|
|
47525
|
-
|
|
47590
|
+
assertPausedForWrite(current);
|
|
47526
47591
|
return operator.updateAd(apiKey, request.params.id, update);
|
|
47527
47592
|
}
|
|
47528
47593
|
});
|
|
@@ -47603,6 +47668,93 @@ async function adsRoutes(app, opts) {
|
|
|
47603
47668
|
});
|
|
47604
47669
|
}
|
|
47605
47670
|
);
|
|
47671
|
+
app.post(
|
|
47672
|
+
"/projects/:name/ads/campaigns/:id/archive",
|
|
47673
|
+
async (request) => {
|
|
47674
|
+
requireScope(request, ADS_WRITE_SCOPE);
|
|
47675
|
+
const project = resolveProject(app.db, request.params.name);
|
|
47676
|
+
const body = parseBody4(adsArchiveRequestSchema, request.body);
|
|
47677
|
+
const { apiKey, adAccountId, operator } = await resolveOperatorForProject(project);
|
|
47678
|
+
return executeAdsOperation(app, request, {
|
|
47679
|
+
projectId: project.id,
|
|
47680
|
+
adAccountId,
|
|
47681
|
+
operationKey: body.operationKey,
|
|
47682
|
+
kind: AdsOperationKinds.campaign_archive,
|
|
47683
|
+
entityType: AdsEntityTypes.campaign,
|
|
47684
|
+
payload: { id: request.params.id, expectedUpdatedAt: body.expectedUpdatedAt },
|
|
47685
|
+
knownEntityId: request.params.id,
|
|
47686
|
+
reconciliation: {
|
|
47687
|
+
strategy: AdsReconcileStrategies.known_entity,
|
|
47688
|
+
fields: { status: AdsEntityStatuses.archived }
|
|
47689
|
+
},
|
|
47690
|
+
expectedStatus: AdsEntityStatuses.archived,
|
|
47691
|
+
run: async () => {
|
|
47692
|
+
const current = await operator.getCampaign(apiKey, request.params.id);
|
|
47693
|
+
assertExpectedUpdatedAt(current, body.expectedUpdatedAt);
|
|
47694
|
+
assertPausedForWrite(current, "archiving");
|
|
47695
|
+
return operator.archiveCampaign(apiKey, request.params.id);
|
|
47696
|
+
}
|
|
47697
|
+
});
|
|
47698
|
+
}
|
|
47699
|
+
);
|
|
47700
|
+
app.post(
|
|
47701
|
+
"/projects/:name/ads/ad-groups/:id/archive",
|
|
47702
|
+
async (request) => {
|
|
47703
|
+
requireScope(request, ADS_WRITE_SCOPE);
|
|
47704
|
+
const project = resolveProject(app.db, request.params.name);
|
|
47705
|
+
const body = parseBody4(adsArchiveRequestSchema, request.body);
|
|
47706
|
+
const { apiKey, adAccountId, operator } = await resolveOperatorForProject(project);
|
|
47707
|
+
return executeAdsOperation(app, request, {
|
|
47708
|
+
projectId: project.id,
|
|
47709
|
+
adAccountId,
|
|
47710
|
+
operationKey: body.operationKey,
|
|
47711
|
+
kind: AdsOperationKinds.ad_group_archive,
|
|
47712
|
+
entityType: AdsEntityTypes.ad_group,
|
|
47713
|
+
payload: { id: request.params.id, expectedUpdatedAt: body.expectedUpdatedAt },
|
|
47714
|
+
knownEntityId: request.params.id,
|
|
47715
|
+
reconciliation: {
|
|
47716
|
+
strategy: AdsReconcileStrategies.known_entity,
|
|
47717
|
+
fields: { status: AdsEntityStatuses.archived }
|
|
47718
|
+
},
|
|
47719
|
+
expectedStatus: AdsEntityStatuses.archived,
|
|
47720
|
+
run: async () => {
|
|
47721
|
+
const current = await operator.getAdGroup(apiKey, request.params.id);
|
|
47722
|
+
assertExpectedUpdatedAt(current, body.expectedUpdatedAt);
|
|
47723
|
+
assertPausedForWrite(current, "archiving");
|
|
47724
|
+
return operator.archiveAdGroup(apiKey, request.params.id);
|
|
47725
|
+
}
|
|
47726
|
+
});
|
|
47727
|
+
}
|
|
47728
|
+
);
|
|
47729
|
+
app.post(
|
|
47730
|
+
"/projects/:name/ads/ads/:id/archive",
|
|
47731
|
+
async (request) => {
|
|
47732
|
+
requireScope(request, ADS_WRITE_SCOPE);
|
|
47733
|
+
const project = resolveProject(app.db, request.params.name);
|
|
47734
|
+
const body = parseBody4(adsArchiveRequestSchema, request.body);
|
|
47735
|
+
const { apiKey, adAccountId, operator } = await resolveOperatorForProject(project);
|
|
47736
|
+
return executeAdsOperation(app, request, {
|
|
47737
|
+
projectId: project.id,
|
|
47738
|
+
adAccountId,
|
|
47739
|
+
operationKey: body.operationKey,
|
|
47740
|
+
kind: AdsOperationKinds.ad_archive,
|
|
47741
|
+
entityType: AdsEntityTypes.ad,
|
|
47742
|
+
payload: { id: request.params.id, expectedUpdatedAt: body.expectedUpdatedAt },
|
|
47743
|
+
knownEntityId: request.params.id,
|
|
47744
|
+
reconciliation: {
|
|
47745
|
+
strategy: AdsReconcileStrategies.known_entity,
|
|
47746
|
+
fields: { status: AdsEntityStatuses.archived }
|
|
47747
|
+
},
|
|
47748
|
+
expectedStatus: AdsEntityStatuses.archived,
|
|
47749
|
+
run: async () => {
|
|
47750
|
+
const current = await operator.getAd(apiKey, request.params.id);
|
|
47751
|
+
assertExpectedUpdatedAt(current, body.expectedUpdatedAt);
|
|
47752
|
+
assertPausedForWrite(current, "archiving");
|
|
47753
|
+
return operator.archiveAd(apiKey, request.params.id);
|
|
47754
|
+
}
|
|
47755
|
+
});
|
|
47756
|
+
}
|
|
47757
|
+
);
|
|
47606
47758
|
app.post("/projects/:name/ads/sync", async (request) => {
|
|
47607
47759
|
requireScope(request, ADS_WRITE_SCOPE);
|
|
47608
47760
|
const project = resolveProject(app.db, request.params.name);
|
|
@@ -70148,10 +70300,16 @@ function bindTrafficSyncSchedule(tx, projectId, sourceId, now, createIfMissing =
|
|
|
70148
70300
|
}).run();
|
|
70149
70301
|
return { changed: true, created: true };
|
|
70150
70302
|
}
|
|
70303
|
+
var VercelRetentionClampError = class extends Error {
|
|
70304
|
+
constructor(requestedStartMs, effectiveStartMs) {
|
|
70305
|
+
super(
|
|
70306
|
+
`Vercel request-logs retention starts at ${new Date(effectiveStartMs).toISOString()}, after requested start ${new Date(requestedStartMs).toISOString()}; refusing to advance because historical traffic would be skipped`
|
|
70307
|
+
);
|
|
70308
|
+
this.name = "VercelRetentionClampError";
|
|
70309
|
+
}
|
|
70310
|
+
};
|
|
70151
70311
|
function vercelRetentionClampError(requestedStartMs, effectiveStartMs) {
|
|
70152
|
-
return new
|
|
70153
|
-
`Vercel request-logs retention starts at ${new Date(effectiveStartMs).toISOString()}, after requested start ${new Date(requestedStartMs).toISOString()}; refusing to advance because historical traffic would be skipped`
|
|
70154
|
-
);
|
|
70312
|
+
return new VercelRetentionClampError(requestedStartMs, effectiveStartMs);
|
|
70155
70313
|
}
|
|
70156
70314
|
async function runBackfillTask(options) {
|
|
70157
70315
|
const {
|
|
@@ -70164,13 +70322,13 @@ async function runBackfillTask(options) {
|
|
|
70164
70322
|
pullForBackfill,
|
|
70165
70323
|
pullErrorPrefix
|
|
70166
70324
|
} = options;
|
|
70167
|
-
const markFailed = (msg) => {
|
|
70325
|
+
const markFailed = (msg, preserveSourceState = false) => {
|
|
70168
70326
|
const failedAt = (/* @__PURE__ */ new Date()).toISOString();
|
|
70169
70327
|
try {
|
|
70170
70328
|
app.db.transaction((tx) => {
|
|
70171
70329
|
tx.update(runs).set({ status: RunStatuses.failed, error: msg, finishedAt: failedAt }).where(eq51(runs.id, runId)).run();
|
|
70172
70330
|
const latestSource = tx.select().from(trafficSources).where(eq51(trafficSources.id, sourceRow2.id)).get();
|
|
70173
|
-
if (latestSource && isAuthoritativeTrafficSource(tx, latestSource) && isSameTrafficSourceGeneration(latestSource, sourceRow2)) {
|
|
70331
|
+
if (!preserveSourceState && latestSource && isAuthoritativeTrafficSource(tx, latestSource) && isSameTrafficSourceGeneration(latestSource, sourceRow2)) {
|
|
70174
70332
|
tx.update(trafficSources).set({ status: TrafficSourceStatuses.error, lastError: msg, updatedAt: failedAt }).where(eq51(trafficSources.id, sourceRow2.id)).run();
|
|
70175
70333
|
}
|
|
70176
70334
|
});
|
|
@@ -70185,7 +70343,10 @@ async function runBackfillTask(options) {
|
|
|
70185
70343
|
try {
|
|
70186
70344
|
allEvents = await pullForBackfill();
|
|
70187
70345
|
} catch (e) {
|
|
70188
|
-
markFailed(
|
|
70346
|
+
markFailed(
|
|
70347
|
+
`${pullErrorPrefix}: ${describeError(e)}`,
|
|
70348
|
+
e instanceof VercelRetentionClampError
|
|
70349
|
+
);
|
|
70189
70350
|
return;
|
|
70190
70351
|
}
|
|
70191
70352
|
if (allEvents.length === 0) {
|
|
@@ -72300,7 +72461,8 @@ async function trafficRoutes(app, opts) {
|
|
|
72300
72461
|
}
|
|
72301
72462
|
const appliedDays = Math.min(requestedDays, MAX_BACKFILL_DAYS);
|
|
72302
72463
|
const windowEnd = /* @__PURE__ */ new Date();
|
|
72303
|
-
const
|
|
72464
|
+
const requestedWindowStartMs = windowEnd.getTime() - appliedDays * 864e5;
|
|
72465
|
+
const windowStart = new Date(requestedWindowStartMs);
|
|
72304
72466
|
windowStart.setUTCMinutes(0, 0, 0);
|
|
72305
72467
|
let pullForBackfill;
|
|
72306
72468
|
let pullErrorPrefix;
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
loadConfig,
|
|
12
12
|
loadConfigRaw,
|
|
13
13
|
saveConfigPatch
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-YPDKZ73I.js";
|
|
15
15
|
import {
|
|
16
16
|
CC_CACHE_DIR,
|
|
17
17
|
DUCKDB_SPEC,
|
|
@@ -157,7 +157,7 @@ import {
|
|
|
157
157
|
siteCrawlSnapshots,
|
|
158
158
|
toAlertView,
|
|
159
159
|
usageCounters
|
|
160
|
-
} from "./chunk-
|
|
160
|
+
} from "./chunk-OJDH2F6I.js";
|
|
161
161
|
import {
|
|
162
162
|
AGENT_MEMORY_VALUE_MAX_BYTES,
|
|
163
163
|
AGENT_PROVIDER_IDS,
|
|
@@ -295,7 +295,7 @@ import {
|
|
|
295
295
|
validationError,
|
|
296
296
|
winnabilityClassLabel,
|
|
297
297
|
withRetry
|
|
298
|
-
} from "./chunk-
|
|
298
|
+
} from "./chunk-JWPN6RU7.js";
|
|
299
299
|
|
|
300
300
|
// src/telemetry.ts
|
|
301
301
|
import crypto from "crypto";
|
|
@@ -7843,12 +7843,6 @@ function validateCampaignBidding(request) {
|
|
|
7843
7843
|
throw new OpenAiAdsApiError("Campaign conversion_event_setting_ids must contain unique IDs", 400);
|
|
7844
7844
|
}
|
|
7845
7845
|
}
|
|
7846
|
-
if (biddingType === OpenAiAdsBiddingTypes.clicks && (!Array.isArray(conversionIds) || conversionIds.length === 0)) {
|
|
7847
|
-
throw new OpenAiAdsApiError(
|
|
7848
|
-
"Click campaigns require at least one conversion_event_setting_id",
|
|
7849
|
-
400
|
|
7850
|
-
);
|
|
7851
|
-
}
|
|
7852
7846
|
}
|
|
7853
7847
|
function validateBiddingConfig(value) {
|
|
7854
7848
|
validateRequestObject(value, "Ad group bidding_config");
|
|
@@ -8075,6 +8069,11 @@ async function pauseCampaign(apiKey, campaignId) {
|
|
|
8075
8069
|
validateId(campaignId, "Campaign id");
|
|
8076
8070
|
return adsFetch(apiKey, `campaigns/${encodeURIComponent(campaignId)}/pause`, [], "POST");
|
|
8077
8071
|
}
|
|
8072
|
+
async function archiveCampaign(apiKey, campaignId) {
|
|
8073
|
+
validateApiKey(apiKey);
|
|
8074
|
+
validateId(campaignId, "Campaign id");
|
|
8075
|
+
return adsFetch(apiKey, `campaigns/${encodeURIComponent(campaignId)}/archive`, [], "POST");
|
|
8076
|
+
}
|
|
8078
8077
|
async function listAdGroups(apiKey, campaignId) {
|
|
8079
8078
|
validateApiKey(apiKey);
|
|
8080
8079
|
validateId(campaignId, "Campaign id");
|
|
@@ -8108,6 +8107,11 @@ async function pauseAdGroup(apiKey, adGroupId) {
|
|
|
8108
8107
|
validateId(adGroupId, "Ad group id");
|
|
8109
8108
|
return adsFetch(apiKey, `ad_groups/${encodeURIComponent(adGroupId)}/pause`, [], "POST");
|
|
8110
8109
|
}
|
|
8110
|
+
async function archiveAdGroup(apiKey, adGroupId) {
|
|
8111
|
+
validateApiKey(apiKey);
|
|
8112
|
+
validateId(adGroupId, "Ad group id");
|
|
8113
|
+
return adsFetch(apiKey, `ad_groups/${encodeURIComponent(adGroupId)}/archive`, [], "POST");
|
|
8114
|
+
}
|
|
8111
8115
|
async function listAds(apiKey, adGroupId) {
|
|
8112
8116
|
validateApiKey(apiKey);
|
|
8113
8117
|
validateId(adGroupId, "Ad group id");
|
|
@@ -8141,6 +8145,11 @@ async function pauseAd(apiKey, adId) {
|
|
|
8141
8145
|
validateId(adId, "Ad id");
|
|
8142
8146
|
return adsFetch(apiKey, `ads/${encodeURIComponent(adId)}/pause`, [], "POST");
|
|
8143
8147
|
}
|
|
8148
|
+
async function archiveAd(apiKey, adId) {
|
|
8149
|
+
validateApiKey(apiKey);
|
|
8150
|
+
validateId(adId, "Ad id");
|
|
8151
|
+
return adsFetch(apiKey, `ads/${encodeURIComponent(adId)}/archive`, [], "POST");
|
|
8152
|
+
}
|
|
8144
8153
|
async function uploadImageFromUrl(apiKey, imageUrl) {
|
|
8145
8154
|
validateApiKey(apiKey);
|
|
8146
8155
|
validateHttpUrl(imageUrl, "Image URL");
|
|
@@ -11857,7 +11866,7 @@ function readStoredGroundingSources(rawResponse) {
|
|
|
11857
11866
|
return result;
|
|
11858
11867
|
}
|
|
11859
11868
|
async function backfillInsightsCommand(project, opts) {
|
|
11860
|
-
const { IntelligenceService: IntelligenceService2 } = await import("./intelligence-service-
|
|
11869
|
+
const { IntelligenceService: IntelligenceService2 } = await import("./intelligence-service-DSYYBDR2.js");
|
|
11861
11870
|
const config = loadConfig();
|
|
11862
11871
|
const db = createClient(config.database);
|
|
11863
11872
|
migrate(db);
|
|
@@ -17504,6 +17513,7 @@ async function createServer(opts) {
|
|
|
17504
17513
|
})),
|
|
17505
17514
|
activateCampaign: async (apiKey, id) => adsCampaignEntityResult(await activateCampaign(apiKey, id)),
|
|
17506
17515
|
pauseCampaign: async (apiKey, id) => adsCampaignEntityResult(await pauseCampaign(apiKey, id)),
|
|
17516
|
+
archiveCampaign: async (apiKey, id) => adsCampaignEntityResult(await archiveCampaign(apiKey, id)),
|
|
17507
17517
|
getAdGroup: async (apiKey, id) => adsAdGroupEntityResult(await getAdGroup(apiKey, id)),
|
|
17508
17518
|
listAdGroups: async (apiKey, campaignId) => (await listAdGroups(apiKey, campaignId)).map((entity) => adsAdGroupEntityResult(entity, campaignId)),
|
|
17509
17519
|
createAdGroup: async (apiKey, input) => adsAdGroupEntityResult(await createAdGroup(apiKey, {
|
|
@@ -17537,6 +17547,7 @@ async function createServer(opts) {
|
|
|
17537
17547
|
},
|
|
17538
17548
|
activateAdGroup: async (apiKey, id) => adsAdGroupEntityResult(await activateAdGroup(apiKey, id)),
|
|
17539
17549
|
pauseAdGroup: async (apiKey, id) => adsAdGroupEntityResult(await pauseAdGroup(apiKey, id)),
|
|
17550
|
+
archiveAdGroup: async (apiKey, id) => adsAdGroupEntityResult(await archiveAdGroup(apiKey, id)),
|
|
17540
17551
|
getAd: async (apiKey, id) => adsAdEntityResult(await getAd(apiKey, id)),
|
|
17541
17552
|
listAds: async (apiKey, adGroupId) => (await listAds(apiKey, adGroupId)).map((entity) => adsAdEntityResult(entity, adGroupId)),
|
|
17542
17553
|
createAd: async (apiKey, input) => adsAdEntityResult(await createAd(apiKey, {
|
|
@@ -17562,7 +17573,8 @@ async function createServer(opts) {
|
|
|
17562
17573
|
} : void 0
|
|
17563
17574
|
})),
|
|
17564
17575
|
activateAd: async (apiKey, id) => adsAdEntityResult(await activateAd(apiKey, id)),
|
|
17565
|
-
pauseAd: async (apiKey, id) => adsAdEntityResult(await pauseAd(apiKey, id))
|
|
17576
|
+
pauseAd: async (apiKey, id) => adsAdEntityResult(await pauseAd(apiKey, id)),
|
|
17577
|
+
archiveAd: async (apiKey, id) => adsAdEntityResult(await archiveAd(apiKey, id))
|
|
17566
17578
|
};
|
|
17567
17579
|
const adsLiveEntity = (entity, extra) => ({
|
|
17568
17580
|
id: entity.id,
|
|
@@ -92,7 +92,7 @@ import {
|
|
|
92
92
|
trafficConnectWordpressRequestSchema,
|
|
93
93
|
trafficEventKindSchema,
|
|
94
94
|
trafficSeriesGranularitySchema
|
|
95
|
-
} from "./chunk-
|
|
95
|
+
} from "./chunk-JWPN6RU7.js";
|
|
96
96
|
|
|
97
97
|
// src/config.ts
|
|
98
98
|
import fs from "fs";
|
|
@@ -11800,7 +11800,7 @@ var canonryMcpTools = [
|
|
|
11800
11800
|
defineTool({
|
|
11801
11801
|
name: "canonry_ads_campaign_create",
|
|
11802
11802
|
title: "Create a paused ads campaign",
|
|
11803
|
-
description: "Create an OpenAI Ads campaign PAUSED with an explicit lifetime spend limit and location allowlist.
|
|
11803
|
+
description: "Create an OpenAI Ads campaign PAUSED with an explicit lifetime spend limit and location allowlist. biddingType is what the account is BILLED for (clicks or the legacy impressions default) and is immutable after creation; conversionEventSettingIds are what delivery OPTIMIZES toward and are independent, so a clicks campaign may omit them; adding provider-issued IDs makes it conversion-optimized. The server ignores any status concept and always sends paused. Inspect the receipt, then create matching paused ad groups and ads. A human must separately approve the exact tree before this operator can activate it.",
|
|
11804
11804
|
access: "write",
|
|
11805
11805
|
tier: "ads",
|
|
11806
11806
|
inputSchema: adsCampaignCreateInputSchema,
|
package/dist/cli.js
CHANGED
|
@@ -26,11 +26,11 @@ import {
|
|
|
26
26
|
showFirstRunNotice,
|
|
27
27
|
trackCliCommandFinished,
|
|
28
28
|
trackEvent
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-W3YSGMYK.js";
|
|
30
30
|
import {
|
|
31
31
|
autoSyncSkills,
|
|
32
32
|
formatAutoSyncNotice
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-CKGWOYPO.js";
|
|
34
34
|
import {
|
|
35
35
|
CliError,
|
|
36
36
|
EXIT_SYSTEM_ERROR,
|
|
@@ -55,7 +55,7 @@ import {
|
|
|
55
55
|
saveConfigPatch,
|
|
56
56
|
systemError,
|
|
57
57
|
usageError
|
|
58
|
-
} from "./chunk-
|
|
58
|
+
} from "./chunk-YPDKZ73I.js";
|
|
59
59
|
import {
|
|
60
60
|
CLOUDFLARE_WORKER_BINDINGS,
|
|
61
61
|
CLOUDFLARE_WORKER_GENERATED_MARKER,
|
|
@@ -69,7 +69,7 @@ import {
|
|
|
69
69
|
projects,
|
|
70
70
|
queries,
|
|
71
71
|
renderReportHtml
|
|
72
|
-
} from "./chunk-
|
|
72
|
+
} from "./chunk-OJDH2F6I.js";
|
|
73
73
|
import {
|
|
74
74
|
AdsDeliverySnapshotStatuses,
|
|
75
75
|
AdsHistoricalCampaignRollupStatuses,
|
|
@@ -138,7 +138,7 @@ import {
|
|
|
138
138
|
providerQuotaPolicySchema,
|
|
139
139
|
resolveProviderInput,
|
|
140
140
|
winnabilityClassSchema
|
|
141
|
-
} from "./chunk-
|
|
141
|
+
} from "./chunk-JWPN6RU7.js";
|
|
142
142
|
|
|
143
143
|
// src/cli.ts
|
|
144
144
|
import { pathToFileURL } from "url";
|
package/dist/index.js
CHANGED
|
@@ -3,12 +3,12 @@ import {
|
|
|
3
3
|
createGoogleMarketingCredentialStore,
|
|
4
4
|
createGoogleMarketingRuntime,
|
|
5
5
|
createServer
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-W3YSGMYK.js";
|
|
7
7
|
import {
|
|
8
8
|
loadConfig
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-YPDKZ73I.js";
|
|
10
|
+
import "./chunk-OJDH2F6I.js";
|
|
11
|
+
import "./chunk-JWPN6RU7.js";
|
|
12
12
|
export {
|
|
13
13
|
GoogleMarketingRuntimeError,
|
|
14
14
|
createGoogleMarketingCredentialStore,
|