@adcp/sdk 14.0.0-beta.10 → 14.0.0-beta.11

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.
Files changed (134) hide show
  1. package/dist/lib/core/AgentClient.d.ts.map +1 -1
  2. package/dist/lib/core/SingleAgentClient.d.mts +2 -1
  3. package/dist/lib/core/SingleAgentClient.d.ts +2 -1
  4. package/dist/lib/core/SingleAgentClient.d.ts.map +1 -1
  5. package/dist/lib/core/SingleAgentClient.js +113 -64
  6. package/dist/lib/core/SingleAgentClient.js.map +1 -1
  7. package/dist/lib/core/SingleAgentClient.mjs +113 -64
  8. package/dist/lib/core/SingleAgentClient.mjs.map +1 -1
  9. package/dist/lib/index.d.mts +1 -1
  10. package/dist/lib/index.d.ts +1 -1
  11. package/dist/lib/index.d.ts.map +1 -1
  12. package/dist/lib/index.js.map +1 -1
  13. package/dist/lib/index.mjs.map +1 -1
  14. package/dist/lib/protocols/a2a.d.mts +10 -3
  15. package/dist/lib/protocols/a2a.d.ts +10 -3
  16. package/dist/lib/protocols/a2a.d.ts.map +1 -1
  17. package/dist/lib/protocols/a2a.js +162 -34
  18. package/dist/lib/protocols/a2a.js.map +1 -1
  19. package/dist/lib/protocols/a2a.mjs +166 -34
  20. package/dist/lib/protocols/a2a.mjs.map +1 -1
  21. package/dist/lib/schemas-data/v2.5/_provenance.json +1 -1
  22. package/dist/lib/server/a2a-adapter.d.mts +59 -33
  23. package/dist/lib/server/a2a-adapter.d.ts +59 -33
  24. package/dist/lib/server/a2a-adapter.d.ts.map +1 -1
  25. package/dist/lib/server/a2a-adapter.js +278 -67
  26. package/dist/lib/server/a2a-adapter.js.map +1 -1
  27. package/dist/lib/server/a2a-adapter.mjs +280 -68
  28. package/dist/lib/server/a2a-adapter.mjs.map +1 -1
  29. package/dist/lib/server/create-adcp-server.d.ts.map +1 -1
  30. package/dist/lib/server/create-adcp-server.js +35 -108
  31. package/dist/lib/server/create-adcp-server.js.map +1 -1
  32. package/dist/lib/server/create-adcp-server.mjs +37 -109
  33. package/dist/lib/server/create-adcp-server.mjs.map +1 -1
  34. package/dist/lib/server/decisioning/index.d.mts +2 -0
  35. package/dist/lib/server/decisioning/index.d.ts +2 -0
  36. package/dist/lib/server/decisioning/index.d.ts.map +1 -1
  37. package/dist/lib/server/decisioning/index.js +5 -2
  38. package/dist/lib/server/decisioning/index.js.map +1 -1
  39. package/dist/lib/server/decisioning/index.mjs +3 -1
  40. package/dist/lib/server/decisioning/index.mjs.map +1 -1
  41. package/dist/lib/server/decisioning/response-summary.d.mts +33 -0
  42. package/dist/lib/server/decisioning/response-summary.d.ts +34 -0
  43. package/dist/lib/server/decisioning/response-summary.d.ts.map +1 -0
  44. package/dist/lib/server/decisioning/response-summary.js +62 -0
  45. package/dist/lib/server/decisioning/response-summary.js.map +1 -0
  46. package/dist/lib/server/decisioning/response-summary.mjs +37 -0
  47. package/dist/lib/server/decisioning/response-summary.mjs.map +1 -0
  48. package/dist/lib/server/decisioning/runtime/from-platform.d.ts.map +1 -1
  49. package/dist/lib/server/decisioning/runtime/from-platform.js +27 -5
  50. package/dist/lib/server/decisioning/runtime/from-platform.js.map +1 -1
  51. package/dist/lib/server/decisioning/runtime/from-platform.mjs +27 -5
  52. package/dist/lib/server/decisioning/runtime/from-platform.mjs.map +1 -1
  53. package/dist/lib/server/decisioning/specialisms/sales.d.mts +7 -1
  54. package/dist/lib/server/decisioning/specialisms/sales.d.ts +7 -1
  55. package/dist/lib/server/decisioning/specialisms/sales.d.ts.map +1 -1
  56. package/dist/lib/server/decisioning/specialisms/sales.js.map +1 -1
  57. package/dist/lib/server/index.d.mts +1 -1
  58. package/dist/lib/server/index.d.ts +1 -1
  59. package/dist/lib/server/index.d.ts.map +1 -1
  60. package/dist/lib/server/index.js.map +1 -1
  61. package/dist/lib/server/index.mjs.map +1 -1
  62. package/dist/lib/server/responses.d.ts.map +1 -1
  63. package/dist/lib/server/responses.js +9 -1
  64. package/dist/lib/server/responses.js.map +1 -1
  65. package/dist/lib/server/responses.mjs +8 -1
  66. package/dist/lib/server/responses.mjs.map +1 -1
  67. package/dist/lib/testing/storyboard/context.d.ts.map +1 -1
  68. package/dist/lib/testing/storyboard/context.js +9 -4
  69. package/dist/lib/testing/storyboard/context.js.map +1 -1
  70. package/dist/lib/testing/storyboard/context.mjs +9 -4
  71. package/dist/lib/testing/storyboard/context.mjs.map +1 -1
  72. package/dist/lib/testing/storyboard/request-builder.d.ts.map +1 -1
  73. package/dist/lib/testing/storyboard/request-builder.js +28 -4
  74. package/dist/lib/testing/storyboard/request-builder.js.map +1 -1
  75. package/dist/lib/testing/storyboard/request-builder.mjs +28 -4
  76. package/dist/lib/testing/storyboard/request-builder.mjs.map +1 -1
  77. package/dist/lib/testing/storyboard/runner.d.ts.map +1 -1
  78. package/dist/lib/testing/storyboard/runner.js +21 -6
  79. package/dist/lib/testing/storyboard/runner.js.map +1 -1
  80. package/dist/lib/testing/storyboard/runner.mjs +21 -6
  81. package/dist/lib/testing/storyboard/runner.mjs.map +1 -1
  82. package/dist/lib/testing/storyboard/validations.d.mts +1 -1
  83. package/dist/lib/testing/storyboard/validations.d.ts +1 -1
  84. package/dist/lib/testing/storyboard/validations.d.ts.map +1 -1
  85. package/dist/lib/testing/storyboard/validations.js +18 -7
  86. package/dist/lib/testing/storyboard/validations.js.map +1 -1
  87. package/dist/lib/testing/storyboard/validations.mjs +18 -7
  88. package/dist/lib/testing/storyboard/validations.mjs.map +1 -1
  89. package/dist/lib/testing/storyboard/webhook-receiver.d.ts.map +1 -1
  90. package/dist/lib/testing/storyboard/webhook-receiver.js +32 -20
  91. package/dist/lib/testing/storyboard/webhook-receiver.js.map +1 -1
  92. package/dist/lib/testing/storyboard/webhook-receiver.mjs +32 -20
  93. package/dist/lib/testing/storyboard/webhook-receiver.mjs.map +1 -1
  94. package/dist/lib/types/schemas.generated.d.ts +516 -516
  95. package/dist/lib/types/schemas.generated.d.ts.map +1 -1
  96. package/dist/lib/types/schemas.generated.js.map +1 -1
  97. package/dist/lib/types/schemas.generated.mjs.map +1 -1
  98. package/dist/lib/utils/a2a-artifacts.d.ts.map +1 -1
  99. package/dist/lib/utils/a2a-artifacts.js +2 -2
  100. package/dist/lib/utils/a2a-artifacts.js.map +1 -1
  101. package/dist/lib/utils/a2a-artifacts.mjs +2 -2
  102. package/dist/lib/utils/a2a-artifacts.mjs.map +1 -1
  103. package/dist/lib/utils/a2a-discovery.d.mts +3 -3
  104. package/dist/lib/utils/a2a-discovery.d.ts +3 -3
  105. package/dist/lib/utils/a2a-discovery.js +1 -1
  106. package/dist/lib/utils/a2a-discovery.js.map +1 -1
  107. package/dist/lib/utils/a2a-discovery.mjs +1 -1
  108. package/dist/lib/utils/a2a-discovery.mjs.map +1 -1
  109. package/dist/lib/utils/tool-request-schemas.d.mts +31 -31
  110. package/dist/lib/utils/tool-request-schemas.d.ts +31 -31
  111. package/dist/lib/v2/projection/index.d.mts +2 -0
  112. package/dist/lib/v2/projection/index.d.ts +2 -0
  113. package/dist/lib/v2/projection/index.d.ts.map +1 -1
  114. package/dist/lib/v2/projection/index.js +3 -0
  115. package/dist/lib/v2/projection/index.js.map +1 -1
  116. package/dist/lib/v2/projection/index.mjs +2 -0
  117. package/dist/lib/v2/projection/index.mjs.map +1 -1
  118. package/dist/lib/v2/projection/legacy-normalization.d.mts +24 -0
  119. package/dist/lib/v2/projection/legacy-normalization.d.ts +25 -0
  120. package/dist/lib/v2/projection/legacy-normalization.d.ts.map +1 -0
  121. package/dist/lib/v2/projection/legacy-normalization.js +32 -0
  122. package/dist/lib/v2/projection/legacy-normalization.js.map +1 -0
  123. package/dist/lib/v2/projection/legacy-normalization.mjs +8 -0
  124. package/dist/lib/v2/projection/legacy-normalization.mjs.map +1 -0
  125. package/dist/lib/version.d.mts +3 -3
  126. package/dist/lib/version.d.ts +3 -3
  127. package/dist/lib/version.js +3 -3
  128. package/dist/lib/version.js.map +1 -1
  129. package/dist/lib/version.mjs +3 -3
  130. package/dist/lib/version.mjs.map +1 -1
  131. package/docs/guides/BUILD-AN-AGENT.md +42 -6
  132. package/docs/llms.txt +2 -2
  133. package/docs/migration-13-to-14.md +17 -0
  134. package/package.json +44 -41
@@ -1 +1 @@
1
- {"version":3,"file":"a2a-artifacts.d.ts","sourceRoot":"","sources":["../../../src/lib/utils/a2a-artifacts.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,MAAM,WAAW,qBAAqB;IACpC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAClC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC9B,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAC/B;AAED,wBAAgB,4BAA4B,CAAC,MAAM,EAAE,OAAO,GAAG,qBAAqB,GAAG,SAAS,CA6B/F;AAED,wBAAgB,gCAAgC,CAAC,QAAQ,EAAE,OAAO,GAAG,qBAAqB,GAAG,SAAS,CAGrG"}
1
+ {"version":3,"file":"a2a-artifacts.d.ts","sourceRoot":"","sources":["../../../src/lib/utils/a2a-artifacts.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,MAAM,WAAW,qBAAqB;IACpC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAClC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC9B,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAC/B;AAED,wBAAgB,4BAA4B,CAAC,MAAM,EAAE,OAAO,GAAG,qBAAqB,GAAG,SAAS,CAsC/F;AAED,wBAAgB,gCAAgC,CAAC,QAAQ,EAAE,OAAO,GAAG,qBAAqB,GAAG,SAAS,CAGrG"}
@@ -35,8 +35,8 @@ function getLatestA2ADataPartFromTask(result) {
35
35
  const part = parts[partIndex];
36
36
  if (part == null || typeof part !== "object" || Array.isArray(part)) continue;
37
37
  const record = part;
38
- if (record.kind !== "data") continue;
39
- const data = record.data;
38
+ const content = record.content;
39
+ const data = record.kind === "data" ? record.data : record.kind === void 0 && Object.hasOwn(record, "data") ? record.data : content != null && typeof content === "object" && !Array.isArray(content) ? content.$case === "data" ? content.value : void 0 : void 0;
40
40
  if (data == null || typeof data !== "object" || Array.isArray(data)) continue;
41
41
  return {
42
42
  artifact,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/lib/utils/a2a-artifacts.ts"],"sourcesContent":["/**\n * Shared A2A artifact extraction helpers.\n *\n * A2A conversational tasks append artifacts over time. The SDK's canonical\n * data path is the latest DataPart found by walking artifacts backward, then\n * parts backward. Trailing text-only artifacts can carry explanatory copy, but\n * they must not hide the latest structured AdCP payload.\n */\n\nexport interface A2ADataPartExtraction {\n artifact: Record<string, unknown>;\n part: Record<string, unknown>;\n data: Record<string, unknown>;\n}\n\nexport function getLatestA2ADataPartFromTask(result: unknown): A2ADataPartExtraction | undefined {\n if (result == null || typeof result !== 'object' || Array.isArray(result)) return undefined;\n\n const artifacts = (result as { artifacts?: unknown }).artifacts;\n if (!Array.isArray(artifacts) || artifacts.length === 0) return undefined;\n\n for (let artifactIndex = artifacts.length - 1; artifactIndex >= 0; artifactIndex -= 1) {\n const artifact = artifacts[artifactIndex];\n if (artifact == null || typeof artifact !== 'object' || Array.isArray(artifact)) continue;\n\n const parts = (artifact as { parts?: unknown }).parts;\n if (!Array.isArray(parts) || parts.length === 0) continue;\n\n for (let partIndex = parts.length - 1; partIndex >= 0; partIndex -= 1) {\n const part = parts[partIndex];\n if (part == null || typeof part !== 'object' || Array.isArray(part)) continue;\n const record = part as Record<string, unknown>;\n if (record.kind !== 'data') continue;\n const data = record.data;\n if (data == null || typeof data !== 'object' || Array.isArray(data)) continue;\n return {\n artifact: artifact as Record<string, unknown>,\n part: record,\n data: data as Record<string, unknown>,\n };\n }\n }\n\n return undefined;\n}\n\nexport function getLatestA2ADataPartFromResponse(response: unknown): A2ADataPartExtraction | undefined {\n if (response == null || typeof response !== 'object' || Array.isArray(response)) return undefined;\n return getLatestA2ADataPartFromTask((response as { result?: unknown }).result);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAeO,SAAS,6BAA6B,QAAoD;AAC/F,MAAI,UAAU,QAAQ,OAAO,WAAW,YAAY,MAAM,QAAQ,MAAM,EAAG,QAAO;AAElF,QAAM,YAAa,OAAmC;AACtD,MAAI,CAAC,MAAM,QAAQ,SAAS,KAAK,UAAU,WAAW,EAAG,QAAO;AAEhE,WAAS,gBAAgB,UAAU,SAAS,GAAG,iBAAiB,GAAG,iBAAiB,GAAG;AACrF,UAAM,WAAW,UAAU,aAAa;AACxC,QAAI,YAAY,QAAQ,OAAO,aAAa,YAAY,MAAM,QAAQ,QAAQ,EAAG;AAEjF,UAAM,QAAS,SAAiC;AAChD,QAAI,CAAC,MAAM,QAAQ,KAAK,KAAK,MAAM,WAAW,EAAG;AAEjD,aAAS,YAAY,MAAM,SAAS,GAAG,aAAa,GAAG,aAAa,GAAG;AACrE,YAAM,OAAO,MAAM,SAAS;AAC5B,UAAI,QAAQ,QAAQ,OAAO,SAAS,YAAY,MAAM,QAAQ,IAAI,EAAG;AACrE,YAAM,SAAS;AACf,UAAI,OAAO,SAAS,OAAQ;AAC5B,YAAM,OAAO,OAAO;AACpB,UAAI,QAAQ,QAAQ,OAAO,SAAS,YAAY,MAAM,QAAQ,IAAI,EAAG;AACrE,aAAO;AAAA,QACL;AAAA,QACA,MAAM;AAAA,QACN;AAAA,MACF;AAAA,IACF;AAAA,EACF;AAEA,SAAO;AACT;AAEO,SAAS,iCAAiC,UAAsD;AACrG,MAAI,YAAY,QAAQ,OAAO,aAAa,YAAY,MAAM,QAAQ,QAAQ,EAAG,QAAO;AACxF,SAAO,6BAA8B,SAAkC,MAAM;AAC/E;","names":[]}
1
+ {"version":3,"sources":["../../../src/lib/utils/a2a-artifacts.ts"],"sourcesContent":["/**\n * Shared A2A artifact extraction helpers.\n *\n * A2A conversational tasks append artifacts over time. The SDK's canonical\n * data path is the latest DataPart found by walking artifacts backward, then\n * parts backward. Trailing text-only artifacts can carry explanatory copy, but\n * they must not hide the latest structured AdCP payload.\n */\n\nexport interface A2ADataPartExtraction {\n artifact: Record<string, unknown>;\n part: Record<string, unknown>;\n data: Record<string, unknown>;\n}\n\nexport function getLatestA2ADataPartFromTask(result: unknown): A2ADataPartExtraction | undefined {\n if (result == null || typeof result !== 'object' || Array.isArray(result)) return undefined;\n\n const artifacts = (result as { artifacts?: unknown }).artifacts;\n if (!Array.isArray(artifacts) || artifacts.length === 0) return undefined;\n\n for (let artifactIndex = artifacts.length - 1; artifactIndex >= 0; artifactIndex -= 1) {\n const artifact = artifacts[artifactIndex];\n if (artifact == null || typeof artifact !== 'object' || Array.isArray(artifact)) continue;\n\n const parts = (artifact as { parts?: unknown }).parts;\n if (!Array.isArray(parts) || parts.length === 0) continue;\n\n for (let partIndex = parts.length - 1; partIndex >= 0; partIndex -= 1) {\n const part = parts[partIndex];\n if (part == null || typeof part !== 'object' || Array.isArray(part)) continue;\n const record = part as Record<string, unknown>;\n const content = record.content;\n const data =\n record.kind === 'data'\n ? record.data\n : record.kind === undefined && Object.hasOwn(record, 'data')\n ? record.data\n : content != null && typeof content === 'object' && !Array.isArray(content)\n ? (content as { $case?: unknown; value?: unknown }).$case === 'data'\n ? (content as { value?: unknown }).value\n : undefined\n : undefined;\n if (data == null || typeof data !== 'object' || Array.isArray(data)) continue;\n return {\n artifact: artifact as Record<string, unknown>,\n part: record,\n data: data as Record<string, unknown>,\n };\n }\n }\n\n return undefined;\n}\n\nexport function getLatestA2ADataPartFromResponse(response: unknown): A2ADataPartExtraction | undefined {\n if (response == null || typeof response !== 'object' || Array.isArray(response)) return undefined;\n return getLatestA2ADataPartFromTask((response as { result?: unknown }).result);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAeO,SAAS,6BA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
12
12
  if (part == null || typeof part !== "object" || Array.isArray(part)) continue;
13
13
  const record = part;
14
- if (record.kind !== "data") continue;
15
- const data = record.data;
14
+ const content = record.content;
15
+ const data = record.kind === "data" ? record.data : record.kind === void 0 && Object.hasOwn(record, "data") ? record.data : content != null && typeof content === "object" && !Array.isArray(content) ? content.$case === "data" ? content.value : void 0 : void 0;
16
16
  if (data == null || typeof data !== "object" || Array.isArray(data)) continue;
17
17
  return {
18
18
  artifact,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/lib/utils/a2a-artifacts.ts"],"sourcesContent":["/**\n * Shared A2A artifact extraction helpers.\n *\n * A2A conversational tasks append artifacts over time. The SDK's canonical\n * data path is the latest DataPart found by walking artifacts backward, then\n * parts backward. Trailing text-only artifacts can carry explanatory copy, but\n * they must not hide the latest structured AdCP payload.\n */\n\nexport interface A2ADataPartExtraction {\n artifact: Record<string, unknown>;\n part: Record<string, unknown>;\n data: Record<string, unknown>;\n}\n\nexport function getLatestA2ADataPartFromTask(result: unknown): A2ADataPartExtraction | undefined {\n if (result == null || typeof result !== 'object' || Array.isArray(result)) return undefined;\n\n const artifacts = (result as { artifacts?: unknown }).artifacts;\n if (!Array.isArray(artifacts) || artifacts.length === 0) return undefined;\n\n for (let artifactIndex = artifacts.length - 1; artifactIndex >= 0; artifactIndex -= 1) {\n const artifact = artifacts[artifactIndex];\n if (artifact == null || typeof artifact !== 'object' || Array.isArray(artifact)) continue;\n\n const parts = (artifact as { parts?: unknown }).parts;\n if (!Array.isArray(parts) || parts.length === 0) continue;\n\n for (let partIndex = parts.length - 1; partIndex >= 0; partIndex -= 1) {\n const part = parts[partIndex];\n if (part == null || typeof part !== 'object' || Array.isArray(part)) continue;\n const record = part as Record<string, unknown>;\n if (record.kind !== 'data') continue;\n const data = record.data;\n if (data == null || typeof data !== 'object' || Array.isArray(data)) continue;\n return {\n artifact: artifact as Record<string, unknown>,\n part: record,\n data: data as Record<string, unknown>,\n };\n }\n }\n\n return undefined;\n}\n\nexport function getLatestA2ADataPartFromResponse(response: unknown): A2ADataPartExtraction | undefined {\n if (response == null || typeof response !== 'object' || Array.isArray(response)) return undefined;\n return getLatestA2ADataPartFromTask((response as { result?: unknown }).result);\n}\n"],"mappings":"AAeO,SAAS,6BAA6B,QAAoD;AAC/F,MAAI,UAAU,QAAQ,OAAO,WAAW,YAAY,MAAM,QAAQ,MAAM,EAAG,QAAO;AAElF,QAAM,YAAa,OAAmC;AACtD,MAAI,CAAC,MAAM,QAAQ,SAAS,KAAK,UAAU,WAAW,EAAG,QAAO;AAEhE,WAAS,gBAAgB,UAAU,SAAS,GAAG,iBAAiB,GAAG,iBAAiB,GAAG;AACrF,UAAM,WAAW,UAAU,aAAa;AACxC,QAAI,YAAY,QAAQ,OAAO,aAAa,YAAY,MAAM,QAAQ,QAAQ,EAAG;AAEjF,UAAM,QAAS,SAAiC;AAChD,QAAI,CAAC,MAAM,QAAQ,KAAK,KAAK,MAAM,WAAW,EAAG;AAEjD,aAAS,YAAY,MAAM,SAAS,GAAG,aAAa,GAAG,aAAa,GAAG;AACrE,YAAM,OAAO,MAAM,SAAS;AAC5B,UAAI,QAAQ,QAAQ,OAAO,SAAS,YAAY,MAAM,QAAQ,IAAI,EAAG;AACrE,YAAM,SAAS;AACf,UAAI,OAAO,SAAS,OAAQ;AAC5B,YAAM,OAAO,OAAO;AACpB,UAAI,QAAQ,QAAQ,OAAO,SAAS,YAAY,MAAM,QAAQ,IAAI,EAAG;AACrE,aAAO;AAAA,QACL;AAAA,QACA,MAAM;AAAA,QACN;AAAA,MACF;AAAA,IACF;AAAA,EACF;AAEA,SAAO;AACT;AAEO,SAAS,iCAAiC,UAAsD;AACrG,MAAI,YAAY,QAAQ,OAAO,aAAa,YAAY,MAAM,QAAQ,QAAQ,EAAG,QAAO;AACxF,SAAO,6BAA8B,SAAkC,MAAM;AAC/E;","names":[]}
1
+ {"version":3,"sources":["../../../src/lib/utils/a2a-artifacts.ts"],"sourcesContent":["/**\n * Shared A2A artifact extraction helpers.\n *\n * A2A conversational tasks append artifacts over time. The SDK's canonical\n * data path is the latest DataPart found by walking artifacts backward, then\n * parts backward. Trailing text-only artifacts can carry explanatory copy, but\n * they must not hide the latest structured AdCP payload.\n */\n\nexport interface A2ADataPartExtraction {\n artifact: Record<string, unknown>;\n part: Record<string, unknown>;\n data: Record<string, unknown>;\n}\n\nexport function getLatestA2ADataPartFromTask(result: unknown): A2ADataPartExtraction | undefined {\n if (result == null || typeof result !== 'object' || Array.isArray(result)) return undefined;\n\n const artifacts = (result as { artifacts?: unknown }).artifacts;\n if (!Array.isArray(artifacts) || artifacts.length === 0) return undefined;\n\n for (let artifactIndex = artifacts.length - 1; artifactIndex >= 0; artifactIndex -= 1) {\n const artifact = artifacts[artifactIndex];\n if (artifact == null || typeof artifact !== 'object' || Array.isArray(artifact)) continue;\n\n const parts = (artifact as { parts?: unknown }).parts;\n if (!Array.isArray(parts) || parts.length === 0) continue;\n\n for (let partIndex = parts.length - 1; partIndex >= 0; partIndex -= 1) {\n const part = parts[partIndex];\n if (part == null || typeof part !== 'object' || Array.isArray(part)) continue;\n const record = part as Record<string, unknown>;\n const content = record.content;\n const data =\n record.kind === 'data'\n ? record.data\n : record.kind === undefined && Object.hasOwn(record, 'data')\n ? record.data\n : content != null && typeof content === 'object' && !Array.isArray(content)\n ? (content as { $case?: unknown; value?: unknown }).$case === 'data'\n ? (content as { value?: unknown }).value\n : undefined\n : undefined;\n if (data == null || typeof data !== 'object' || Array.isArray(data)) continue;\n return {\n artifact: artifact as Record<string, unknown>,\n part: record,\n data: data as Record<string, unknown>,\n };\n }\n }\n\n return undefined;\n}\n\nexport function getLatestA2ADataPartFromResponse(response: unknown): A2ADataPartExtraction | undefined {\n if (response == null || typeof response !== 'object' || Array.isArray(response)) return undefined;\n return getLatestA2ADataPartFromTask((response as { result?: unknown }).result);\n}\n"],"mappings":"AAeO,SAAS,6BAA6B,QAAoD;AAC/F,MAAI,UAAU,QAAQ,OAAO,WAAW,YAAY,MA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) for agent card discovery.
4
+ * Supports both /.well-known/agent-card.json (A2A 1.0)
5
+ * and /.well-known/agent.json (legacy) for agent card discovery.
6
6
  */
7
7
  /** A2A agent card well-known paths, preferred first */
8
- export declare const A2A_CARD_PATHS: readonly ["/.well-known/agent.json", "/.well-known/agent-card.json"];
8
+ export declare const A2A_CARD_PATHS: readonly ["/.well-known/agent-card.json", "/.well-known/agent.json"];
9
9
  /**
10
10
  * AdCP protocol transport suffixes that the runner appends to reach a
11
11
  * protocol endpoint. Kept here as the single source of truth — both
@@ -1,11 +1,11 @@
1
1
  /**
2
2
  * A2A Agent Card Discovery Utilities
3
3
  *
4
- * Supports both /.well-known/agent.json (current A2A spec)
5
- * and /.well-known/agent-card.json (legacy) for agent card discovery.
4
+ * Supports both /.well-known/agent-card.json (A2A 1.0)
5
+ * and /.well-known/agent.json (legacy) for agent card discovery.
6
6
  */
7
7
  /** A2A agent card well-known paths, preferred first */
8
- export declare const A2A_CARD_PATHS: readonly ["/.well-known/agent.json", "/.well-known/agent-card.json"];
8
+ export declare const A2A_CARD_PATHS: readonly ["/.well-known/agent-card.json", "/.well-known/agent.json"];
9
9
  /**
10
10
  * AdCP protocol transport suffixes that the runner appends to reach a
11
11
  * protocol endpoint. Kept here as the single source of truth — both
@@ -27,7 +27,7 @@ __export(a2a_discovery_exports, {
27
27
  stripTransportSuffix: () => stripTransportSuffix
28
28
  });
29
29
  module.exports = __toCommonJS(a2a_discovery_exports);
30
- const A2A_CARD_PATHS = ["/.well-known/agent.json", "/.well-known/agent-card.json"];
30
+ const A2A_CARD_PATHS = ["/.well-known/agent-card.json", "/.well-known/agent.json"];
31
31
  const AGENT_CARD_PATH_REGEX = /\/\.well-known\/agent(-card)?\.json$/i;
32
32
  const TRANSPORT_SUFFIX_REGEX = /\/(?:mcp|a2a|sse)\/?$/i;
33
33
  function stripTransportSuffix(url) {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/lib/utils/a2a-discovery.ts"],"sourcesContent":["/**\n * A2A Agent Card Discovery Utilities\n *\n * Supports both /.well-known/agent.json (current A2A spec)\n * and /.well-known/agent-card.json (legacy) for agent card discovery.\n */\n\n/** A2A agent card well-known paths, preferred first */\nexport const A2A_CARD_PATHS = ['/.well-known/agent.json', '/.well-known/agent-card.json'] as const;\n\n/** Matches either well-known agent card path at end of string (case-insensitive) */\nconst AGENT_CARD_PATH_REGEX = /\\/\\.well-known\\/agent(-card)?\\.json$/i;\n\n/**\n * AdCP protocol transport suffixes that the runner appends to reach a\n * protocol endpoint. Kept here as the single source of truth — both\n * `SingleAgentClient.computeBaseUrl` and the storyboard scope canonicalizer\n * import this so new transports (e.g., future websocket) only need to be\n * added in one place.\n */\nexport const TRANSPORT_SUFFIX_REGEX = /\\/(?:mcp|a2a|sse)\\/?$/i;\n\n/** Strip a protocol transport suffix (`/mcp`, `/a2a`, `/sse`) from a URL path. */\nexport function stripTransportSuffix(url: string): string {\n return url.replace(TRANSPORT_SUFFIX_REGEX, '');\n}\n\n/** Matches a root-level well-known agent card URL (scheme://host/.well-known/agent[-card].json) */\nconst AGENT_CARD_URL_REGEX = /^https?:\\/\\/[^/]+\\/\\.well-known\\/agent(-card)?\\.json$/i;\n\n/**\n * Check if a URL string ends with an agent card well-known path\n */\nexport function isAgentCardPath(url: string): boolean {\n return AGENT_CARD_PATH_REGEX.test(url);\n}\n\n/**\n * Check if a URL is a root-level well-known agent card URL.\n *\n * Matches: https://example.com/.well-known/agent.json\n * Matches: https://example.com/.well-known/agent-card.json\n * Rejects: https://example.com/api/.well-known/agent.json\n */\nexport function isWellKnownAgentCardUrl(url: string): boolean {\n return AGENT_CARD_URL_REGEX.test(url);\n}\n\n/**\n * Build the list of agent card URLs to try for a given agent URL.\n *\n * If the URL already points to a well-known agent card path, returns it as-is.\n * Otherwise returns both paths (preferred first) appended to the base URL.\n */\nexport function buildCardUrls(agentUrl: string): string[] {\n if (isAgentCardPath(agentUrl)) {\n return [agentUrl];\n }\n const base = agentUrl.replace(/\\/$/, '');\n return A2A_CARD_PATHS.map(path => `${base}${path}`);\n}\n\n/**\n * Strip a well-known agent card path from a URL, returning the base URL.\n */\nexport function stripAgentCardPath(url: string): string {\n return url.replace(AGENT_CARD_PATH_REGEX, '');\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAQO,MAAM,iBAAiB,CAAC,2BAA2B,8BAA8B;AAGxF,MAAM,wBAAwB;AASvB,MAAM,yBAAyB;AAG/B,SAAS,qBAAqB,KAAqB;AACxD,SAAO,IAAI,QAAQ,wBAAwB,EAAE;AAC/C;AAGA,MAAM,uBAAuB;AAKtB,SAAS,gBAAgB,KAAsB;AACpD,SAAO,sBAAsB,KAAK,GAAG;AACvC;AASO,SAAS,wBAAwB,KAAsB;AAC5D,SAAO,qBAAqB,KAAK,GAAG;AACtC;AAQO,SAAS,cAAc,UAA4B;AACxD,MAAI,gBAAgB,QAAQ,GAAG;AAC7B,WAAO,CAAC,QAAQ;AAAA,EAClB;AACA,QAAM,OAAO,SAAS,QAAQ,OAAO,EAAE;AACvC,SAAO,eAAe,IAAI,UAAQ,GAAG,IAAI,GAAG,IAAI,EAAE;AACpD;AAKO,SAAS,mBAAmB,KAAqB;AACtD,SAAO,IAAI,QAAQ,uBAAuB,EAAE;AAC9C;","names":[]}
1
+ {"version":3,"sources":["../../../src/lib/utils/a2a-discovery.ts"],"sourcesContent":["/**\n * A2A Agent Card Discovery Utilities\n *\n * Supports both /.well-known/agent-card.json (A2A 1.0)\n * and /.well-known/agent.json (legacy) for agent card discovery.\n */\n\n/** A2A agent card well-known paths, preferred first */\nexport const A2A_CARD_PATHS = ['/.well-known/agent-card.json', '/.well-known/agent.json'] as const;\n\n/** Matches either well-known agent card path at end of string (case-insensitive) */\nconst AGENT_CARD_PATH_REGEX = /\\/\\.well-known\\/agent(-card)?\\.json$/i;\n\n/**\n * AdCP protocol transport suffixes that the runner appends to reach a\n * protocol endpoint. Kept here as the single source of truth — both\n * `SingleAgentClient.computeBaseUrl` and the storyboard scope canonicalizer\n * import this so new transports (e.g., future websocket) only need to be\n * added in one place.\n */\nexport const TRANSPORT_SUFFIX_REGEX = /\\/(?:mcp|a2a|sse)\\/?$/i;\n\n/** Strip a protocol transport suffix (`/mcp`, `/a2a`, `/sse`) from a URL path. */\nexport function stripTransportSuffix(url: string): string {\n return url.replace(TRANSPORT_SUFFIX_REGEX, '');\n}\n\n/** Matches a root-level well-known agent card URL (scheme://host/.well-known/agent[-card].json) */\nconst AGENT_CARD_URL_REGEX = /^https?:\\/\\/[^/]+\\/\\.well-known\\/agent(-card)?\\.json$/i;\n\n/**\n * Check if a URL string ends with an agent card well-known path\n */\nexport function isAgentCardPath(url: string): boolean {\n return AGENT_CARD_PATH_REGEX.test(url);\n}\n\n/**\n * Check if a URL is a root-level well-known agent card URL.\n *\n * Matches: https://example.com/.well-known/agent.json\n * Matches: https://example.com/.well-known/agent-card.json\n * Rejects: https://example.com/api/.well-known/agent.json\n */\nexport function isWellKnownAgentCardUrl(url: string): boolean {\n return AGENT_CARD_URL_REGEX.test(url);\n}\n\n/**\n * Build the list of agent card URLs to try for a given agent URL.\n *\n * If the URL already points to a well-known agent card path, returns it as-is.\n * Otherwise returns both paths (preferred first) appended to the base URL.\n */\nexport function buildCardUrls(agentUrl: string): string[] {\n if (isAgentCardPath(agentUrl)) {\n return [agentUrl];\n }\n const base = agentUrl.replace(/\\/$/, '');\n return A2A_CARD_PATHS.map(path => `${base}${path}`);\n}\n\n/**\n * Strip a well-known agent card path from a URL, returning the base URL.\n */\nexport function stripAgentCardPath(url: string): string {\n return url.replace(AGENT_CARD_PATH_REGEX, '');\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAQO,MAAM,iBAAiB,CAAC,gCAAgC,yBAAyB;AAGxF,MAAM,wBAAwB;AASvB,MAAM,yBAAyB;AAG/B,SAAS,qBAAqB,KAAqB;AACxD,SAAO,IAAI,QAAQ,wBAAwB,EAAE;AAC/C;AAGA,MAAM,uBAAuB;AAKtB,SAAS,gBAAgB,KAAsB;AACpD,SAAO,sBAAsB,KAAK,GAAG;AACvC;AASO,SAAS,wBAAwB,KAAsB;AAC5D,SAAO,qBAAqB,KAAK,GAAG;AACtC;AAQO,SAAS,cAAc,UAA4B;AACxD,MAAI,gBAAgB,QAAQ,GAAG;AAC7B,WAAO,CAAC,QAAQ;AAAA,EAClB;AACA,QAAM,OAAO,SAAS,QAAQ,OAAO,EAAE;AACvC,SAAO,eAAe,IAAI,UAAQ,GAAG,IAAI,GAAG,IAAI,EAAE;AACpD;AAKO,SAAS,mBAAmB,KAAqB;AACtD,SAAO,IAAI,QAAQ,uBAAuB,EAAE;AAC9C;","names":[]}
@@ -1,4 +1,4 @@
1
- const A2A_CARD_PATHS = ["/.well-known/agent.json", "/.well-known/agent-card.json"];
1
+ const A2A_CARD_PATHS = ["/.well-known/agent-card.json", "/.well-known/agent.json"];
2
2
  const AGENT_CARD_PATH_REGEX = /\/\.well-known\/agent(-card)?\.json$/i;
3
3
  const TRANSPORT_SUFFIX_REGEX = /\/(?:mcp|a2a|sse)\/?$/i;
4
4
  function stripTransportSuffix(url) {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/lib/utils/a2a-discovery.ts"],"sourcesContent":["/**\n * A2A Agent Card Discovery Utilities\n *\n * Supports both /.well-known/agent.json (current A2A spec)\n * and /.well-known/agent-card.json (legacy) for agent card discovery.\n */\n\n/** A2A agent card well-known paths, preferred first */\nexport const A2A_CARD_PATHS = ['/.well-known/agent.json', '/.well-known/agent-card.json'] as const;\n\n/** Matches either well-known agent card path at end of string (case-insensitive) */\nconst AGENT_CARD_PATH_REGEX = /\\/\\.well-known\\/agent(-card)?\\.json$/i;\n\n/**\n * AdCP protocol transport suffixes that the runner appends to reach a\n * protocol endpoint. Kept here as the single source of truth — both\n * `SingleAgentClient.computeBaseUrl` and the storyboard scope canonicalizer\n * import this so new transports (e.g., future websocket) only need to be\n * added in one place.\n */\nexport const TRANSPORT_SUFFIX_REGEX = /\\/(?:mcp|a2a|sse)\\/?$/i;\n\n/** Strip a protocol transport suffix (`/mcp`, `/a2a`, `/sse`) from a URL path. */\nexport function stripTransportSuffix(url: string): string {\n return url.replace(TRANSPORT_SUFFIX_REGEX, '');\n}\n\n/** Matches a root-level well-known agent card URL (scheme://host/.well-known/agent[-card].json) */\nconst AGENT_CARD_URL_REGEX = /^https?:\\/\\/[^/]+\\/\\.well-known\\/agent(-card)?\\.json$/i;\n\n/**\n * Check if a URL string ends with an agent card well-known path\n */\nexport function isAgentCardPath(url: string): boolean {\n return AGENT_CARD_PATH_REGEX.test(url);\n}\n\n/**\n * Check if a URL is a root-level well-known agent card URL.\n *\n * Matches: https://example.com/.well-known/agent.json\n * Matches: https://example.com/.well-known/agent-card.json\n * Rejects: https://example.com/api/.well-known/agent.json\n */\nexport function isWellKnownAgentCardUrl(url: string): boolean {\n return AGENT_CARD_URL_REGEX.test(url);\n}\n\n/**\n * Build the list of agent card URLs to try for a given agent URL.\n *\n * If the URL already points to a well-known agent card path, returns it as-is.\n * Otherwise returns both paths (preferred first) appended to the base URL.\n */\nexport function buildCardUrls(agentUrl: string): string[] {\n if (isAgentCardPath(agentUrl)) {\n return [agentUrl];\n }\n const base = agentUrl.replace(/\\/$/, '');\n return A2A_CARD_PATHS.map(path => `${base}${path}`);\n}\n\n/**\n * Strip a well-known agent card path from a URL, returning the base URL.\n */\nexport function stripAgentCardPath(url: string): string {\n return url.replace(AGENT_CARD_PATH_REGEX, '');\n}\n"],"mappings":"AAQO,MAAM,iBAAiB,CAAC,2BAA2B,8BAA8B;AAGxF,MAAM,wBAAwB;AASvB,MAAM,yBAAyB;AAG/B,SAAS,qBAAqB,KAAqB;AACxD,SAAO,IAAI,QAAQ,wBAAwB,EAAE;AAC/C;AAGA,MAAM,uBAAuB;AAKtB,SAAS,gBAAgB,KAAsB;AACpD,SAAO,sBAAsB,KAAK,GAAG;AACvC;AASO,SAAS,wBAAwB,KAAsB;AAC5D,SAAO,qBAAqB,KAAK,GAAG;AACtC;AAQO,SAAS,cAAc,UAA4B;AACxD,MAAI,gBAAgB,QAAQ,GAAG;AAC7B,WAAO,CAAC,QAAQ;AAAA,EAClB;AACA,QAAM,OAAO,SAAS,QAAQ,OAAO,EAAE;AACvC,SAAO,eAAe,IAAI,UAAQ,GAAG,IAAI,GAAG,IAAI,EAAE;AACpD;AAKO,SAAS,mBAAmB,KAAqB;AACtD,SAAO,IAAI,QAAQ,uBAAuB,EAAE;AAC9C;","names":[]}
1
+ {"version":3,"sources":["../../../src/lib/utils/a2a-discovery.ts"],"sourcesContent":["/**\n * A2A Agent Card Discovery Utilities\n *\n * Supports both /.well-known/agent-card.json (A2A 1.0)\n * and /.well-known/agent.json (legacy) for agent card discovery.\n */\n\n/** A2A agent card well-known paths, preferred first */\nexport const A2A_CARD_PATHS = ['/.well-known/agent-card.json', '/.well-known/agent.json'] as const;\n\n/** Matches either well-known agent card path at end of string (case-insensitive) */\nconst AGENT_CARD_PATH_REGEX = /\\/\\.well-known\\/agent(-card)?\\.json$/i;\n\n/**\n * AdCP protocol transport suffixes that the runner appends to reach a\n * protocol endpoint. Kept here as the single source of truth — both\n * `SingleAgentClient.computeBaseUrl` and the storyboard scope canonicalizer\n * import this so new transports (e.g., future websocket) only need to be\n * added in one place.\n */\nexport const TRANSPORT_SUFFIX_REGEX = /\\/(?:mcp|a2a|sse)\\/?$/i;\n\n/** Strip a protocol transport suffix (`/mcp`, `/a2a`, `/sse`) from a URL path. */\nexport function stripTransportSuffix(url: string): string {\n return url.replace(TRANSPORT_SUFFIX_REGEX, '');\n}\n\n/** Matches a root-level well-known agent card URL (scheme://host/.well-known/agent[-card].json) */\nconst AGENT_CARD_URL_REGEX = /^https?:\\/\\/[^/]+\\/\\.well-known\\/agent(-card)?\\.json$/i;\n\n/**\n * Check if a URL string ends with an agent card well-known path\n */\nexport function isAgentCardPath(url: string): boolean {\n return AGENT_CARD_PATH_REGEX.test(url);\n}\n\n/**\n * Check if a URL is a root-level well-known agent card URL.\n *\n * Matches: https://example.com/.well-known/agent.json\n * Matches: https://example.com/.well-known/agent-card.json\n * Rejects: https://example.com/api/.well-known/agent.json\n */\nexport function isWellKnownAgentCardUrl(url: string): boolean {\n return AGENT_CARD_URL_REGEX.test(url);\n}\n\n/**\n * Build the list of agent card URLs to try for a given agent URL.\n *\n * If the URL already points to a well-known agent card path, returns it as-is.\n * Otherwise returns both paths (preferred first) appended to the base URL.\n */\nexport function buildCardUrls(agentUrl: string): string[] {\n if (isAgentCardPath(agentUrl)) {\n return [agentUrl];\n }\n const base = agentUrl.replace(/\\/$/, '');\n return A2A_CARD_PATHS.map(path => `${base}${path}`);\n}\n\n/**\n * Strip a well-known agent card path from a URL, returning the base URL.\n */\nexport function stripAgentCardPath(url: string): string {\n return url.replace(AGENT_CARD_PATH_REGEX, '');\n}\n"],"mappings":"AAQO,MAAM,iBAAiB,CAAC,gCAAgC,yBAAyB;AAGxF,MAAM,wBAAwB;AASvB,MAAM,yBAAyB;AAG/B,SAAS,qBAAqB,KAAqB;AACxD,SAAO,IAAI,QAAQ,wBAAwB,EAAE;AAC/C;AAGA,MAAM,uBAAuB;AAKtB,SAAS,gBAAgB,KAAsB;AACpD,SAAO,sBAAsB,KAAK,GAAG;AACvC;AASO,SAAS,wBAAwB,KAAsB;AAC5D,SAAO,qBAAqB,KAAK,GAAG;AACtC;AAQO,SAAS,cAAc,UAA4B;AACxD,MAAI,gBAAgB,QAAQ,GAAG;AAC7B,WAAO,CAAC,QAAQ;AAAA,EAClB;AACA,QAAM,OAAO,SAAS,QAAQ,OAAO,EAAE;AACvC,SAAO,eAAe,IAAI,UAAQ,GAAG,IAAI,GAAG,IAAI,EAAE;AACpD;AAKO,SAAS,mBAAmB,KAAqB;AACtD,SAAO,IAAI,QAAQ,uBAAuB,EAAE;AAC9C;","names":[]}
@@ -27,36 +27,36 @@ type CreateMediaBuyToolRequestShape = {
27
27
  };
28
28
  declare const CreateMediaBuyToolRequestSchema: z.ZodObject<CreateMediaBuyToolRequestShape, any>;
29
29
  declare const UpdateMediaBuyToolRequestSchema: z.ZodObject<WithOptionalAccountShape<{
30
- adcp_version: z.ZodType<string | undefined, string | undefined, z.core.$ZodTypeInternals<string | undefined, string | undefined>>;
31
- adcp_major_version: z.ZodType<number | undefined, number | undefined, z.core.$ZodTypeInternals<number | undefined, number | undefined>>;
32
- governance_context: z.ZodType<string | undefined, string | undefined, z.core.$ZodTypeInternals<string | undefined, string | undefined>>;
30
+ adcp_version: z.ZodOptional<z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>>;
31
+ adcp_major_version: z.ZodOptional<z.ZodType<number, number, z.core.$ZodTypeInternals<number, number>>>;
32
+ governance_context: z.ZodOptional<z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>>;
33
33
  account: z.ZodType<AccountReference, AccountReference, z.core.$ZodTypeInternals<AccountReference, AccountReference>>;
34
34
  media_buy_id: z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
35
- name: z.ZodType<string | undefined, string | undefined, z.core.$ZodTypeInternals<string | undefined, string | undefined>>;
36
- revision: z.ZodType<number | undefined, number | undefined, z.core.$ZodTypeInternals<number | undefined, number | undefined>>;
37
- paused: z.ZodType<boolean | undefined, boolean | undefined, z.core.$ZodTypeInternals<boolean | undefined, boolean | undefined>>;
38
- canceled: z.ZodType<true | undefined, true | undefined, z.core.$ZodTypeInternals<true | undefined, true | undefined>>;
39
- cancellation_reason: z.ZodType<string | undefined, string | undefined, z.core.$ZodTypeInternals<string | undefined, string | undefined>>;
40
- start_time: z.ZodType<string | undefined, string | undefined, z.core.$ZodTypeInternals<string | undefined, string | undefined>>;
41
- end_time: z.ZodType<string | undefined, string | undefined, z.core.$ZodTypeInternals<string | undefined, string | undefined>>;
42
- total_budget: z.ZodType<{
35
+ name: z.ZodOptional<z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>>;
36
+ revision: z.ZodOptional<z.ZodType<number, number, z.core.$ZodTypeInternals<number, number>>>;
37
+ paused: z.ZodOptional<z.ZodType<boolean, boolean, z.core.$ZodTypeInternals<boolean, boolean>>>;
38
+ canceled: z.ZodOptional<z.ZodType<true, true, z.core.$ZodTypeInternals<true, true>>>;
39
+ cancellation_reason: z.ZodOptional<z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>>;
40
+ start_time: z.ZodOptional<z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>>;
41
+ end_time: z.ZodOptional<z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>>;
42
+ total_budget: z.ZodOptional<z.ZodType<{
43
43
  amount: number;
44
44
  currency: string;
45
- } | undefined, {
45
+ }, {
46
46
  amount: number;
47
47
  currency: string;
48
- } | undefined, z.core.$ZodTypeInternals<{
48
+ }, z.core.$ZodTypeInternals<{
49
49
  amount: number;
50
50
  currency: string;
51
- } | undefined, {
51
+ }, {
52
52
  amount: number;
53
53
  currency: string;
54
- } | undefined>>;
55
- daily_budget_cap: z.ZodType<number | null | undefined, number | null | undefined, z.core.$ZodTypeInternals<number | null | undefined, number | null | undefined>>;
56
- budget_cap_timezone: z.ZodType<string | null | undefined, string | null | undefined, z.core.$ZodTypeInternals<string | null | undefined, string | null | undefined>>;
57
- budget_allocation: z.ZodType<import("../types/tools.generated.mjs").BudgetAllocation | undefined, import("../types/tools.generated.mjs").BudgetAllocation | undefined, z.core.$ZodTypeInternals<import("../types/tools.generated.mjs").BudgetAllocation | undefined, import("../types/tools.generated.mjs").BudgetAllocation | undefined>>;
58
- pacing: z.ZodType<import("../types/core.generated.mjs").Pacing | undefined, import("../types/core.generated.mjs").Pacing | undefined, z.core.$ZodTypeInternals<import("../types/core.generated.mjs").Pacing | undefined, import("../types/core.generated.mjs").Pacing | undefined>>;
59
- bidding: z.ZodType<{
54
+ }>>>;
55
+ daily_budget_cap: z.ZodOptional<z.ZodType<number | null, number | null, z.core.$ZodTypeInternals<number | null, number | null>>>;
56
+ budget_cap_timezone: z.ZodOptional<z.ZodType<string | null, string | null, z.core.$ZodTypeInternals<string | null, string | null>>>;
57
+ budget_allocation: z.ZodOptional<z.ZodType<import("../types/tools.generated.mjs").BudgetAllocation, import("../types/tools.generated.mjs").BudgetAllocation, z.core.$ZodTypeInternals<import("../types/tools.generated.mjs").BudgetAllocation, import("../types/tools.generated.mjs").BudgetAllocation>>>;
58
+ pacing: z.ZodOptional<z.ZodType<import("../types/core.generated.mjs").Pacing, import("../types/core.generated.mjs").Pacing, z.core.$ZodTypeInternals<import("../types/core.generated.mjs").Pacing, import("../types/core.generated.mjs").Pacing>>>;
59
+ bidding: z.ZodOptional<z.ZodType<{
60
60
  automatic?: true;
61
61
  bid_amount?: number;
62
62
  max_bid?: number;
@@ -68,7 +68,7 @@ declare const UpdateMediaBuyToolRequestSchema: z.ZodObject<WithOptionalAccountSh
68
68
  value: number;
69
69
  strength: "floor" | "target";
70
70
  };
71
- } | null | undefined, {
71
+ } | null, {
72
72
  automatic?: true;
73
73
  bid_amount?: number;
74
74
  max_bid?: number;
@@ -80,7 +80,7 @@ declare const UpdateMediaBuyToolRequestSchema: z.ZodObject<WithOptionalAccountSh
80
80
  value: number;
81
81
  strength: "floor" | "target";
82
82
  };
83
- } | null | undefined, z.core.$ZodTypeInternals<{
83
+ } | null, z.core.$ZodTypeInternals<{
84
84
  automatic?: true;
85
85
  bid_amount?: number;
86
86
  max_bid?: number;
@@ -92,7 +92,7 @@ declare const UpdateMediaBuyToolRequestSchema: z.ZodObject<WithOptionalAccountSh
92
92
  value: number;
93
93
  strength: "floor" | "target";
94
94
  };
95
- } | null | undefined, {
95
+ } | null, {
96
96
  automatic?: true;
97
97
  bid_amount?: number;
98
98
  max_bid?: number;
@@ -104,15 +104,15 @@ declare const UpdateMediaBuyToolRequestSchema: z.ZodObject<WithOptionalAccountSh
104
104
  value: number;
105
105
  strength: "floor" | "target";
106
106
  };
107
- } | null | undefined>>;
108
- packages: z.ZodType<import("../types/core.generated.mjs").PackageUpdate[] | undefined, import("../types/core.generated.mjs").PackageUpdate[] | undefined, z.core.$ZodTypeInternals<import("../types/core.generated.mjs").PackageUpdate[] | undefined, import("../types/core.generated.mjs").PackageUpdate[] | undefined>>;
109
- invoice_recipient: z.ZodType<import("../types/core.generated.mjs").BusinessEntity | undefined, import("../types/core.generated.mjs").BusinessEntity | undefined, z.core.$ZodTypeInternals<import("../types/core.generated.mjs").BusinessEntity | undefined, import("../types/core.generated.mjs").BusinessEntity | undefined>>;
110
- new_packages: z.ZodType<import("../types/tools.generated.mjs").PackageRequest[] | undefined, import("../types/tools.generated.mjs").PackageRequest[] | undefined, z.core.$ZodTypeInternals<import("../types/tools.generated.mjs").PackageRequest[] | undefined, import("../types/tools.generated.mjs").PackageRequest[] | undefined>>;
111
- reporting_webhook: z.ZodType<import("../types/tools.generated.mjs").ReportingWebhook | undefined, import("../types/tools.generated.mjs").ReportingWebhook | undefined, z.core.$ZodTypeInternals<import("../types/tools.generated.mjs").ReportingWebhook | undefined, import("../types/tools.generated.mjs").ReportingWebhook | undefined>>;
112
- push_notification_config: z.ZodType<import("../types/tools.generated.mjs").PushNotificationConfig | undefined, import("../types/tools.generated.mjs").PushNotificationConfig | undefined, z.core.$ZodTypeInternals<import("../types/tools.generated.mjs").PushNotificationConfig | undefined, import("../types/tools.generated.mjs").PushNotificationConfig | undefined>>;
107
+ } | null>>>;
108
+ packages: z.ZodOptional<z.ZodType<import("../types/core.generated.mjs").PackageUpdate[], import("../types/core.generated.mjs").PackageUpdate[], z.core.$ZodTypeInternals<import("../types/core.generated.mjs").PackageUpdate[], import("../types/core.generated.mjs").PackageUpdate[]>>>;
109
+ invoice_recipient: z.ZodOptional<z.ZodType<import("../types/core.generated.mjs").BusinessEntity, import("../types/core.generated.mjs").BusinessEntity, z.core.$ZodTypeInternals<import("../types/core.generated.mjs").BusinessEntity, import("../types/core.generated.mjs").BusinessEntity>>>;
110
+ new_packages: z.ZodOptional<z.ZodType<import("../types/tools.generated.mjs").PackageRequest[], import("../types/tools.generated.mjs").PackageRequest[], z.core.$ZodTypeInternals<import("../types/tools.generated.mjs").PackageRequest[], import("../types/tools.generated.mjs").PackageRequest[]>>>;
111
+ reporting_webhook: z.ZodOptional<z.ZodType<import("../types/tools.generated.mjs").ReportingWebhook, import("../types/tools.generated.mjs").ReportingWebhook, z.core.$ZodTypeInternals<import("../types/tools.generated.mjs").ReportingWebhook, import("../types/tools.generated.mjs").ReportingWebhook>>>;
112
+ push_notification_config: z.ZodOptional<z.ZodType<import("../types/tools.generated.mjs").PushNotificationConfig, import("../types/tools.generated.mjs").PushNotificationConfig, z.core.$ZodTypeInternals<import("../types/tools.generated.mjs").PushNotificationConfig, import("../types/tools.generated.mjs").PushNotificationConfig>>>;
113
113
  idempotency_key: z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
114
- context: z.ZodType<import("../types/tools.generated.mjs").ContextObject | undefined, import("../types/tools.generated.mjs").ContextObject | undefined, z.core.$ZodTypeInternals<import("../types/tools.generated.mjs").ContextObject | undefined, import("../types/tools.generated.mjs").ContextObject | undefined>>;
115
- ext: z.ZodType<import("../types/core.generated.mjs").ExtensionObject | undefined, import("../types/core.generated.mjs").ExtensionObject | undefined, z.core.$ZodTypeInternals<import("../types/core.generated.mjs").ExtensionObject | undefined, import("../types/core.generated.mjs").ExtensionObject | undefined>>;
114
+ context: z.ZodOptional<z.ZodType<import("../types/tools.generated.mjs").ContextObject, import("../types/tools.generated.mjs").ContextObject, z.core.$ZodTypeInternals<import("../types/tools.generated.mjs").ContextObject, import("../types/tools.generated.mjs").ContextObject>>>;
115
+ ext: z.ZodOptional<z.ZodType<import("../types/core.generated.mjs").ExtensionObject, import("../types/core.generated.mjs").ExtensionObject, z.core.$ZodTypeInternals<import("../types/core.generated.mjs").ExtensionObject, import("../types/core.generated.mjs").ExtensionObject>>>;
116
116
  }>, any>;
117
117
  type PreviewCreativeToolRequestKey = 'adcp_version' | 'adcp_major_version' | 'request_type' | 'creative_manifest' | 'target_capability_id' | 'format_id' | 'inputs' | 'template_id' | 'quality' | 'output_format' | 'item_limit' | 'requests' | 'variant_id' | 'creative_id' | 'allow_async' | 'push_notification_config' | 'context' | 'ext';
118
118
  type PreviewCreativeToolRequestShape = {
@@ -27,36 +27,36 @@ type CreateMediaBuyToolRequestShape = {
27
27
  };
28
28
  declare const CreateMediaBuyToolRequestSchema: z.ZodObject<CreateMediaBuyToolRequestShape, any>;
29
29
  declare const UpdateMediaBuyToolRequestSchema: z.ZodObject<WithOptionalAccountShape<{
30
- adcp_version: z.ZodType<string | undefined, string | undefined, z.core.$ZodTypeInternals<string | undefined, string | undefined>>;
31
- adcp_major_version: z.ZodType<number | undefined, number | undefined, z.core.$ZodTypeInternals<number | undefined, number | undefined>>;
32
- governance_context: z.ZodType<string | undefined, string | undefined, z.core.$ZodTypeInternals<string | undefined, string | undefined>>;
30
+ adcp_version: z.ZodOptional<z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>>;
31
+ adcp_major_version: z.ZodOptional<z.ZodType<number, number, z.core.$ZodTypeInternals<number, number>>>;
32
+ governance_context: z.ZodOptional<z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>>;
33
33
  account: z.ZodType<AccountReference, AccountReference, z.core.$ZodTypeInternals<AccountReference, AccountReference>>;
34
34
  media_buy_id: z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
35
- name: z.ZodType<string | undefined, string | undefined, z.core.$ZodTypeInternals<string | undefined, string | undefined>>;
36
- revision: z.ZodType<number | undefined, number | undefined, z.core.$ZodTypeInternals<number | undefined, number | undefined>>;
37
- paused: z.ZodType<boolean | undefined, boolean | undefined, z.core.$ZodTypeInternals<boolean | undefined, boolean | undefined>>;
38
- canceled: z.ZodType<true | undefined, true | undefined, z.core.$ZodTypeInternals<true | undefined, true | undefined>>;
39
- cancellation_reason: z.ZodType<string | undefined, string | undefined, z.core.$ZodTypeInternals<string | undefined, string | undefined>>;
40
- start_time: z.ZodType<string | undefined, string | undefined, z.core.$ZodTypeInternals<string | undefined, string | undefined>>;
41
- end_time: z.ZodType<string | undefined, string | undefined, z.core.$ZodTypeInternals<string | undefined, string | undefined>>;
42
- total_budget: z.ZodType<{
35
+ name: z.ZodOptional<z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>>;
36
+ revision: z.ZodOptional<z.ZodType<number, number, z.core.$ZodTypeInternals<number, number>>>;
37
+ paused: z.ZodOptional<z.ZodType<boolean, boolean, z.core.$ZodTypeInternals<boolean, boolean>>>;
38
+ canceled: z.ZodOptional<z.ZodType<true, true, z.core.$ZodTypeInternals<true, true>>>;
39
+ cancellation_reason: z.ZodOptional<z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>>;
40
+ start_time: z.ZodOptional<z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>>;
41
+ end_time: z.ZodOptional<z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>>;
42
+ total_budget: z.ZodOptional<z.ZodType<{
43
43
  amount: number;
44
44
  currency: string;
45
- } | undefined, {
45
+ }, {
46
46
  amount: number;
47
47
  currency: string;
48
- } | undefined, z.core.$ZodTypeInternals<{
48
+ }, z.core.$ZodTypeInternals<{
49
49
  amount: number;
50
50
  currency: string;
51
- } | undefined, {
51
+ }, {
52
52
  amount: number;
53
53
  currency: string;
54
- } | undefined>>;
55
- daily_budget_cap: z.ZodType<number | null | undefined, number | null | undefined, z.core.$ZodTypeInternals<number | null | undefined, number | null | undefined>>;
56
- budget_cap_timezone: z.ZodType<string | null | undefined, string | null | undefined, z.core.$ZodTypeInternals<string | null | undefined, string | null | undefined>>;
57
- budget_allocation: z.ZodType<import("../types/tools.generated").BudgetAllocation | undefined, import("../types/tools.generated").BudgetAllocation | undefined, z.core.$ZodTypeInternals<import("../types/tools.generated").BudgetAllocation | undefined, import("../types/tools.generated").BudgetAllocation | undefined>>;
58
- pacing: z.ZodType<import("../types/core.generated").Pacing | undefined, import("../types/core.generated").Pacing | undefined, z.core.$ZodTypeInternals<import("../types/core.generated").Pacing | undefined, import("../types/core.generated").Pacing | undefined>>;
59
- bidding: z.ZodType<{
54
+ }>>>;
55
+ daily_budget_cap: z.ZodOptional<z.ZodType<number | null, number | null, z.core.$ZodTypeInternals<number | null, number | null>>>;
56
+ budget_cap_timezone: z.ZodOptional<z.ZodType<string | null, string | null, z.core.$ZodTypeInternals<string | null, string | null>>>;
57
+ budget_allocation: z.ZodOptional<z.ZodType<import("../types/tools.generated").BudgetAllocation, import("../types/tools.generated").BudgetAllocation, z.core.$ZodTypeInternals<import("../types/tools.generated").BudgetAllocation, import("../types/tools.generated").BudgetAllocation>>>;
58
+ pacing: z.ZodOptional<z.ZodType<import("../types/core.generated").Pacing, import("../types/core.generated").Pacing, z.core.$ZodTypeInternals<import("../types/core.generated").Pacing, import("../types/core.generated").Pacing>>>;
59
+ bidding: z.ZodOptional<z.ZodType<{
60
60
  automatic?: true;
61
61
  bid_amount?: number;
62
62
  max_bid?: number;
@@ -68,7 +68,7 @@ declare const UpdateMediaBuyToolRequestSchema: z.ZodObject<WithOptionalAccountSh
68
68
  value: number;
69
69
  strength: "floor" | "target";
70
70
  };
71
- } | null | undefined, {
71
+ } | null, {
72
72
  automatic?: true;
73
73
  bid_amount?: number;
74
74
  max_bid?: number;
@@ -80,7 +80,7 @@ declare const UpdateMediaBuyToolRequestSchema: z.ZodObject<WithOptionalAccountSh
80
80
  value: number;
81
81
  strength: "floor" | "target";
82
82
  };
83
- } | null | undefined, z.core.$ZodTypeInternals<{
83
+ } | null, z.core.$ZodTypeInternals<{
84
84
  automatic?: true;
85
85
  bid_amount?: number;
86
86
  max_bid?: number;
@@ -92,7 +92,7 @@ declare const UpdateMediaBuyToolRequestSchema: z.ZodObject<WithOptionalAccountSh
92
92
  value: number;
93
93
  strength: "floor" | "target";
94
94
  };
95
- } | null | undefined, {
95
+ } | null, {
96
96
  automatic?: true;
97
97
  bid_amount?: number;
98
98
  max_bid?: number;
@@ -104,15 +104,15 @@ declare const UpdateMediaBuyToolRequestSchema: z.ZodObject<WithOptionalAccountSh
104
104
  value: number;
105
105
  strength: "floor" | "target";
106
106
  };
107
- } | null | undefined>>;
108
- packages: z.ZodType<import("../types/core.generated").PackageUpdate[] | undefined, import("../types/core.generated").PackageUpdate[] | undefined, z.core.$ZodTypeInternals<import("../types/core.generated").PackageUpdate[] | undefined, import("../types/core.generated").PackageUpdate[] | undefined>>;
109
- invoice_recipient: z.ZodType<import("../types/core.generated").BusinessEntity | undefined, import("../types/core.generated").BusinessEntity | undefined, z.core.$ZodTypeInternals<import("../types/core.generated").BusinessEntity | undefined, import("../types/core.generated").BusinessEntity | undefined>>;
110
- new_packages: z.ZodType<import("../types/tools.generated").PackageRequest[] | undefined, import("../types/tools.generated").PackageRequest[] | undefined, z.core.$ZodTypeInternals<import("../types/tools.generated").PackageRequest[] | undefined, import("../types/tools.generated").PackageRequest[] | undefined>>;
111
- reporting_webhook: z.ZodType<import("../types/tools.generated").ReportingWebhook | undefined, import("../types/tools.generated").ReportingWebhook | undefined, z.core.$ZodTypeInternals<import("../types/tools.generated").ReportingWebhook | undefined, import("../types/tools.generated").ReportingWebhook | undefined>>;
112
- push_notification_config: z.ZodType<import("../types/tools.generated").PushNotificationConfig | undefined, import("../types/tools.generated").PushNotificationConfig | undefined, z.core.$ZodTypeInternals<import("../types/tools.generated").PushNotificationConfig | undefined, import("../types/tools.generated").PushNotificationConfig | undefined>>;
107
+ } | null>>>;
108
+ packages: z.ZodOptional<z.ZodType<import("../types/core.generated").PackageUpdate[], import("../types/core.generated").PackageUpdate[], z.core.$ZodTypeInternals<import("../types/core.generated").PackageUpdate[], import("../types/core.generated").PackageUpdate[]>>>;
109
+ invoice_recipient: z.ZodOptional<z.ZodType<import("../types/core.generated").BusinessEntity, import("../types/core.generated").BusinessEntity, z.core.$ZodTypeInternals<import("../types/core.generated").BusinessEntity, import("../types/core.generated").BusinessEntity>>>;
110
+ new_packages: z.ZodOptional<z.ZodType<import("../types/tools.generated").PackageRequest[], import("../types/tools.generated").PackageRequest[], z.core.$ZodTypeInternals<import("../types/tools.generated").PackageRequest[], import("../types/tools.generated").PackageRequest[]>>>;
111
+ reporting_webhook: z.ZodOptional<z.ZodType<import("../types/tools.generated").ReportingWebhook, import("../types/tools.generated").ReportingWebhook, z.core.$ZodTypeInternals<import("../types/tools.generated").ReportingWebhook, import("../types/tools.generated").ReportingWebhook>>>;
112
+ push_notification_config: z.ZodOptional<z.ZodType<import("../types/tools.generated").PushNotificationConfig, import("../types/tools.generated").PushNotificationConfig, z.core.$ZodTypeInternals<import("../types/tools.generated").PushNotificationConfig, import("../types/tools.generated").PushNotificationConfig>>>;
113
113
  idempotency_key: z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
114
- context: z.ZodType<import("../types/tools.generated").ContextObject | undefined, import("../types/tools.generated").ContextObject | undefined, z.core.$ZodTypeInternals<import("../types/tools.generated").ContextObject | undefined, import("../types/tools.generated").ContextObject | undefined>>;
115
- ext: z.ZodType<import("../types/core.generated").ExtensionObject | undefined, import("../types/core.generated").ExtensionObject | undefined, z.core.$ZodTypeInternals<import("../types/core.generated").ExtensionObject | undefined, import("../types/core.generated").ExtensionObject | undefined>>;
114
+ context: z.ZodOptional<z.ZodType<import("../types/tools.generated").ContextObject, import("../types/tools.generated").ContextObject, z.core.$ZodTypeInternals<import("../types/tools.generated").ContextObject, import("../types/tools.generated").ContextObject>>>;
115
+ ext: z.ZodOptional<z.ZodType<import("../types/core.generated").ExtensionObject, import("../types/core.generated").ExtensionObject, z.core.$ZodTypeInternals<import("../types/core.generated").ExtensionObject, import("../types/core.generated").ExtensionObject>>>;
116
116
  }>, any>;
117
117
  type PreviewCreativeToolRequestKey = 'adcp_version' | 'adcp_major_version' | 'request_type' | 'creative_manifest' | 'target_capability_id' | 'format_id' | 'inputs' | 'template_id' | 'quality' | 'output_format' | 'item_limit' | 'requests' | 'variant_id' | 'creative_id' | 'allow_async' | 'push_notification_config' | 'context' | 'ext';
118
118
  type PreviewCreativeToolRequestShape = {
@@ -52,4 +52,6 @@ export { isProjectionProductInput } from './types.mjs';
52
52
  export { legacyFormatConverterFromCatalogSnapshots, canonicalFormatLegacyResolverFromCatalogSnapshots, projectionAdaptersFromCatalogSnapshots, type ProjectionCatalogAdapters, type ProjectionCatalogSnapshot, type ProjectionCatalogSource, } from './catalog-snapshot.mjs';
53
53
  export { loadCatalog, lookupV1Format, findCatalogEntryByCanonicalAndSize, parseSizedIdTemplate, _resetCatalogCache, type V1FormatDefinition, type CanonicalProjectionRef, } from './catalog.mjs';
54
54
  export { isCanonicalV1Translatable } from './canonical-properties.mjs';
55
+ export { normalizeLegacyGetProductsResponse } from './legacy-normalization.mjs';
56
+ export type { LegacyProductNormalizationInput, NormalizedLegacyProduct } from './legacy-normalization.mjs';
55
57
  export { CreativeFormatProjectionError, CreativeFormatCapabilityError, projectCreativeForDelivery, projectMediaBuyCreativesForDelivery, projectSyncCreativesForDelivery, stripLegacyCreativeIdentity, resolveCreativeFormatWireMode, type CreativeFormatSelectorContainer, type CanonicalCreativeFormatSelectorContainer, type CreativeFormatWireMode, type CanonicalCreativeAsset, type CanonicalSyncCreativeAsset, type CanonicalCreativeResponse, type CanonicalGetProductsResponse, type CanonicalGetProductsRequest, type CanonicalCreateMediaBuyRequest, type CanonicalCreateMediaBuyResponse, type CanonicalCreativeFilters, type CanonicalListCreativesRequest, type CanonicalListCreativesResponse, type CanonicalGetCreativeDeliveryResponse, type CanonicalGetMediaBuyDeliveryResponse, type CanonicalGetMediaBuysResponse, type CanonicalListedCreative, type CanonicalPackageRequest, type CanonicalPackageUpdate, type CanonicalPackage, type CanonicalPlacement, type CanonicalPreviewCreativeRequest, type CanonicalPreviewCreativeResponse, type CanonicalProduct, type CanonicalProjectedCreative, type CanonicalSyncCreativesRequest, type CanonicalSyncCreativesResponse, type CanonicalUpdateMediaBuyRequest, type CanonicalUpdateMediaBuyResponse, type LegacyCreativeAsset, type LegacyProjectedCreative, type ProjectedMediaBuyCreativeRequest, type ProjectedSyncCreativeRequest, type SyncCreativeFormatProjection, } from './creative-delivery.mjs';
@@ -52,5 +52,7 @@ export { isProjectionProductInput } from './types';
52
52
  export { legacyFormatConverterFromCatalogSnapshots, canonicalFormatLegacyResolverFromCatalogSnapshots, projectionAdaptersFromCatalogSnapshots, type ProjectionCatalogAdapters, type ProjectionCatalogSnapshot, type ProjectionCatalogSource, } from './catalog-snapshot';
53
53
  export { loadCatalog, lookupV1Format, findCatalogEntryByCanonicalAndSize, parseSizedIdTemplate, _resetCatalogCache, type V1FormatDefinition, type CanonicalProjectionRef, } from './catalog';
54
54
  export { isCanonicalV1Translatable } from './canonical-properties';
55
+ export { normalizeLegacyGetProductsResponse } from './legacy-normalization';
56
+ export type { LegacyProductNormalizationInput, NormalizedLegacyProduct } from './legacy-normalization';
55
57
  export { CreativeFormatProjectionError, CreativeFormatCapabilityError, projectCreativeForDelivery, projectMediaBuyCreativesForDelivery, projectSyncCreativesForDelivery, stripLegacyCreativeIdentity, resolveCreativeFormatWireMode, type CreativeFormatSelectorContainer, type CanonicalCreativeFormatSelectorContainer, type CreativeFormatWireMode, type CanonicalCreativeAsset, type CanonicalSyncCreativeAsset, type CanonicalCreativeResponse, type CanonicalGetProductsResponse, type CanonicalGetProductsRequest, type CanonicalCreateMediaBuyRequest, type CanonicalCreateMediaBuyResponse, type CanonicalCreativeFilters, type CanonicalListCreativesRequest, type CanonicalListCreativesResponse, type CanonicalGetCreativeDeliveryResponse, type CanonicalGetMediaBuyDeliveryResponse, type CanonicalGetMediaBuysResponse, type CanonicalListedCreative, type CanonicalPackageRequest, type CanonicalPackageUpdate, type CanonicalPackage, type CanonicalPlacement, type CanonicalPreviewCreativeRequest, type CanonicalPreviewCreativeResponse, type CanonicalProduct, type CanonicalProjectedCreative, type CanonicalSyncCreativesRequest, type CanonicalSyncCreativesResponse, type CanonicalUpdateMediaBuyRequest, type CanonicalUpdateMediaBuyResponse, type LegacyCreativeAsset, type LegacyProjectedCreative, type ProjectedMediaBuyCreativeRequest, type ProjectedSyncCreativeRequest, type SyncCreativeFormatProjection, } from './creative-delivery';
56
58
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/v2/projection/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AAEH,OAAO,EAAE,oBAAoB,EAAE,8BAA8B,EAAE,0BAA0B,EAAE,MAAM,YAAY,CAAC;AAC9G,YAAY,EACV,YAAY,EACZ,uBAAuB,EACvB,0BAA0B,EAC1B,6BAA6B,EAC7B,qBAAqB,EACrB,6BAA6B,EAC7B,oBAAoB,GACrB,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAClD,YAAY,EACV,YAAY,EACZ,uBAAuB,EACvB,6BAA6B,EAC7B,sCAAsC,EACtC,6CAA6C,EAC7C,8CAA8C,EAC9C,8CAA8C,GAC/C,MAAM,YAAY,CAAC;AAEpB,OAAO,EACL,uCAAuC,EACvC,sBAAsB,EACtB,KAAK,0BAA0B,GAChC,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EACL,+BAA+B,EAC/B,iBAAiB,EACjB,kCAAkC,EAClC,0BAA0B,EAC1B,kCAAkC,EAClC,sBAAsB,EACtB,uBAAuB,EACvB,KAAK,kBAAkB,EACvB,KAAK,wBAAwB,EAC7B,KAAK,oBAAoB,GAC1B,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EACL,eAAe,EACf,2BAA2B,EAC3B,4BAA4B,EAC5B,+BAA+B,EAC/B,0BAA0B,EAC1B,uBAAuB,EACvB,2BAA2B,EAC3B,eAAe,EACf,gBAAgB,EAChB,sBAAsB,EACtB,8BAA8B,EAC9B,sBAAsB,EACtB,6BAA6B,EAC7B,WAAW,EACX,mBAAmB,EACnB,mCAAmC,EACnC,8CAA8C,EAC9C,mCAAmC,EACnC,s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K,kBAAkB,EACvB,KAAK,+BAA+B,EACpC,KAAK,gCAAgC,EACrC,KAAK,gBAAgB,EACrB,KAAK,0BAA0B,EAC/B,KAAK,6BAA6B,EAClC,KAAK,8BAA8B,EACnC,KAAK,8BAA8B,EACnC,KAAK,+BAA+B,EACpC,KAAK,mBAAmB,EACxB,KAAK,uBAAuB,EAC5B,KAAK,gCAAgC,EACrC,KAAK,4BAA4B,EACjC,KAAK,4BAA4B,GAClC,MAAM,qBAAqB,CAAC"}
@@ -52,6 +52,7 @@ __export(projection_exports, {
52
52
  loadCatalog: () => import_catalog.loadCatalog,
53
53
  lookupV1Format: () => import_catalog.lookupV1Format,
54
54
  nativeInFeedFormatDeclaration: () => import_builders.nativeInFeedFormatDeclaration,
55
+ normalizeLegacyGetProductsResponse: () => import_legacy_normalization.normalizeLegacyGetProductsResponse,
55
56
  packageRefsForCapabilities: () => import_write_side.packageRefsForCapabilities,
56
57
  packageRefsForFormatOptions: () => import_write_side.packageRefsForFormatOptions,
57
58
  parseSizedIdTemplate: () => import_catalog.parseSizedIdTemplate,
@@ -90,6 +91,7 @@ var import_types = require('./types.js');
90
91
  var import_catalog_snapshot = require('./catalog-snapshot.js');
91
92
  var import_catalog = require('./catalog.js');
92
93
  var import_canonical_properties = require('./canonical-properties.js');
94
+ var import_legacy_normalization = require('./legacy-normalization.js');
93
95
  var import_creative_delivery = require('./creative-delivery.js');
94
96
  // Annotate the CommonJS export names for ESM import in node:
95
97
  0 && (module.exports = {
@@ -127,6 +129,7 @@ var import_creative_delivery = require('./creative-delivery.js');
127
129
  loadCatalog,
128
130
  lookupV1Format,
129
131
  nativeInFeedFormatDeclaration,
132
+ normalizeLegacyGetProductsResponse,
130
133
  packageRefsForCapabilities,
131
134
  packageRefsForFormatOptions,
132
135
  parseSizedIdTemplate,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/lib/v2/projection/index.ts"],"sourcesContent":["/**\n * v1 ↔ v2 Product projection layer (AdCP 3.1).\n *\n * Public surfaces:\n *\n * - `projectV1ProductToV2` / `projectV2ProductToV1` — the symmetric\n * core projections. Read a Product on one side, return a Product\n * on the other plus structured diagnostics (`source: 'sdk'`,\n * normative spec codes + SDK-local codes).\n *\n * - `resolveCanonicalFormatKind` / `canonicalDeclarationFromBareId` —\n * resolve a single bare format-id string (no surrounding Product,\n * no `agent_url`) to its canonical `format_kind` or full declaration.\n * Registry- and catalog-backed; fails closed to `null`.\n *\n * - `withFormatOptions` / `augmentProductWithFormatOptions` —\n * buyer-side response augmentation. Adds `format_options[]` to a\n * v1-shaped get_products response so canonical-format-aware buyers\n * can read the canonical model regardless of the seller's wire\n * version. Additive — `format_ids[]` is preserved.\n *\n * - `toAdditiveCanonicalProduct` — additive projection with URL-free\n * `format_options[]`, preserved top-level `format_ids[]`, and explicit\n * serializable legacy-route sidecars for later forwarding.\n * `withAdditiveCanonicalFormatOptions` is the response-level companion.\n * `toCanonicalFormatOptionsWithRoutes` provides the same safe route-first\n * concealment for callers that hold only a declaration array.\n *\n * - `toCanonicalOnlyProduct` / `toCanonicalOnlyResponse` — the\n * read-side narrowing for a fully-migrated consumer. Returns\n * `format_options[]` with `format_ids[]` dropped, surfacing a\n * diagnostic for any ref that couldn't be carried over.\n *\n * - Catalog + registry primitives (`lookupV1Format`,\n * `findCatalogEntryByCanonicalAndSize`, registry exports) for\n * callers wiring projection into their own code paths.\n *\n * Legacy-preserving and raw wire projection helpers are exposed only from\n * `@adcp/sdk/v2/projection`. The package root exports the canonical authoring\n * surface so ordinary buyers do not accidentally retain legacy identities.\n */\n\nexport { projectV1ProductToV2, canonicalDeclarationFromBareId, resolveCanonicalFormatKind } from './v1-to-v2';\nexport type {\n V1ToV2Result,\n V1ToV2ProjectionOptions,\n BareFormatIdResolveOptions,\n LegacyFormatConversionContext,\n LegacyFormatConverter,\n LegacyFormatResolutionContext,\n LegacyFormatResolver,\n} from './v1-to-v2';\n\nexport { projectV2ProductToV1 } from './v2-to-v1';\nexport type {\n V2ToV1Result,\n V2ToV1ProjectionOptions,\n CanonicalFormatLegacyResolver,\n CanonicalFormatLegacyResolutionContext,\n CanonicalProductFormatLegacyResolutionContext,\n CanonicalCreativeFormatLegacyResolutionContext,\n CanonicalSelectorFormatLegacyResolutionContext,\n} from './v2-to-v1';\n\nexport {\n canonicalFormatLegacyResolverFromRoutes,\n legacyRoutesForProduct,\n type CanonicalFormatLegacyRoute,\n} from './legacy-routes';\n\nexport {\n augmentProductWithFormatOptions,\n withFormatOptions,\n toCanonicalFormatOptionsWithRoutes,\n toAdditiveCanonicalProduct,\n withAdditiveCanonicalFormatOptions,\n toCanonicalOnlyProduct,\n toCanonicalOnlyResponse,\n type V2AugmentedProduct,\n type AdditiveCanonicalProduct,\n type CanonicalOnlyProduct,\n} from './augment-response';\n\nexport {\n CanonicalFormat,\n audioDaastFormatDeclaration,\n audioHostedFormatDeclaration,\n agentPlacementFormatDeclaration,\n canonicalFormatDeclaration,\n customFormatDeclaration,\n displayTagFormatDeclaration,\n legacyFormatRef,\n legacyFormatRefs,\n html5FormatDeclaration,\n imageCarouselFormatDeclaration,\n imageFormatDeclaration,\n nativeInFeedFormatDeclaration,\n productCard,\n productCardDetailed,\n responsiveCreativeFormatDeclaration,\n sellerRenderedStatefulDisplayFormatDeclaration,\n sponsoredPlacementFormatDeclaration,\n coordinatedPlacementsFormatDeclaration,\n videoHostedFormatDeclaration,\n videoVastFormatDeclaration,\n type CanonicalFormatDeclaration,\n type CanonicalFormatDeclarationFields,\n type CanonicalFormatKind,\n type CanonicalFormatParams,\n type FormatReferenceInput,\n type ProductCardDetailedFields,\n type ProductCardFields,\n} from './builders';\n\nexport {\n packageRefsForFormatOptions,\n packageRefsForCapabilities,\n legacyFormatIdsFromOptions,\n tryLegacyFormatIdsFromOptions,\n legacyFormatIdsForFormatOption,\n legacyFormatIdsForCapability,\n lintPackageFormatSelectorDimensions,\n FormatOptionRefsLookupError,\n CapabilityIdsLookupError,\n type PackageFormatRefs,\n type PackageCapabilityRefs,\n type FormatOptionRef,\n type FormatOptionSelector,\n type FormatOptionRefsLookupErrorCode,\n type CapabilityIdsLookupErrorCode,\n type PackageFormatSelectorInput,\n type PackageFormatSelectorDimensionOptions,\n type FixedSizeDimensions,\n type PackageFormatSelectorDimensionDiagnosticCode,\n type PackageFormatSelectorDimensionDiagnostic,\n} from './write-side';\n\nexport type {\n V1FormatId,\n V2ProductFormatDeclaration,\n V2ProductInput,\n V2Product,\n V1ProductInput,\n V1Product,\n ProjectionProductInput,\n ProjectionDiagnostic,\n} from './types';\nexport { isProjectionProductInput } from './types';\nexport {\n legacyFormatConverterFromCatalogSnapshots,\n canonicalFormatLegacyResolverFromCatalogSnapshots,\n projectionAdaptersFromCatalogSnapshots,\n type ProjectionCatalogAdapters,\n type ProjectionCatalogSnapshot,\n type ProjectionCatalogSource,\n} from './catalog-snapshot';\n\nexport {\n loadCatalog,\n lookupV1Format,\n findCatalogEntryByCanonicalAndSize,\n parseSizedIdTemplate,\n _resetCatalogCache,\n type V1FormatDefinition,\n type CanonicalProjectionRef,\n} from './catalog';\n\nexport { isCanonicalV1Translatable } from './canonical-properties';\n\nexport {\n CreativeFormatProjectionError,\n CreativeFormatCapabilityError,\n projectCreativeForDelivery,\n projectMediaBuyCreativesForDelivery,\n projectSyncCreativesForDelivery,\n stripLegacyCreativeIdentity,\n resolveCreativeFormatWireMode,\n type CreativeFormatSelectorContainer,\n type CanonicalCreativeFormatSelectorContainer,\n type CreativeFormatWireMode,\n type CanonicalCreativeAsset,\n type CanonicalSyncCreativeAsset,\n type CanonicalCreativeResponse,\n type CanonicalGetProductsResponse,\n type CanonicalGetProductsRequest,\n type CanonicalCreateMediaBuyRequest,\n type CanonicalCreateMediaBuyResponse,\n type CanonicalCreativeFilters,\n type CanonicalListCreativesRequest,\n type CanonicalListCreativesResponse,\n type CanonicalGetCreativeDeliveryResponse,\n type CanonicalGetMediaBuyDeliveryResponse,\n type CanonicalGetMediaBuysResponse,\n type CanonicalListedCreative,\n type CanonicalPackageRequest,\n type CanonicalPackageUpdate,\n type CanonicalPackage,\n type CanonicalPlacement,\n type CanonicalPreviewCreativeRequest,\n type CanonicalPreviewCreativeResponse,\n type CanonicalProduct,\n type CanonicalProjectedCreative,\n type CanonicalSyncCreativesRequest,\n type CanonicalSyncCreativesResponse,\n type CanonicalUpdateMediaBuyRequest,\n type CanonicalUpdateMediaBuyResponse,\n type LegacyCreativeAsset,\n type LegacyProjectedCreative,\n type ProjectedMediaBuyCreativeRequest,\n type ProjectedSyncCreativeRequest,\n type SyncCreativeFormatProjection,\n} from './creative-delivery';\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA0CA,sBAAiG;AAWjG,sBAAqC;AAWrC,2BAIO;AAEP,8BAWO;AAEP,sBA6BO;AAEP,wBAqBO;AAYP,mBAAyC;AACzC,8BAOO;AAEP,qBAQO;AAEP,kCAA0C;AAE1C,+BA0CO;","names":[]}
1
+ {"version":3,"sources":["../../../../src/lib/v2/projection/index.ts"],"sourcesContent":["/**\n * v1 ↔ v2 Product projection layer (AdCP 3.1).\n *\n * Public surfaces:\n *\n * - `projectV1ProductToV2` / `projectV2ProductToV1` — the symmetric\n * core projections. Read a Product on one side, return a Product\n * on the other plus structured diagnostics (`source: 'sdk'`,\n * normative spec codes + SDK-local codes).\n *\n * - `resolveCanonicalFormatKind` / `canonicalDeclarationFromBareId` —\n * resolve a single bare format-id string (no surrounding Product,\n * no `agent_url`) to its canonical `format_kind` or full declaration.\n * Registry- and catalog-backed; fails closed to `null`.\n *\n * - `withFormatOptions` / `augmentProductWithFormatOptions` —\n * buyer-side response augmentation. Adds `format_options[]` to a\n * v1-shaped get_products response so canonical-format-aware buyers\n * can read the canonical model regardless of the seller's wire\n * version. Additive — `format_ids[]` is preserved.\n *\n * - `toAdditiveCanonicalProduct` — additive projection with URL-free\n * `format_options[]`, preserved top-level `format_ids[]`, and explicit\n * serializable legacy-route sidecars for later forwarding.\n * `withAdditiveCanonicalFormatOptions` is the response-level companion.\n * `toCanonicalFormatOptionsWithRoutes` provides the same safe route-first\n * concealment for callers that hold only a declaration array.\n *\n * - `toCanonicalOnlyProduct` / `toCanonicalOnlyResponse` — the\n * read-side narrowing for a fully-migrated consumer. Returns\n * `format_options[]` with `format_ids[]` dropped, surfacing a\n * diagnostic for any ref that couldn't be carried over.\n *\n * - Catalog + registry primitives (`lookupV1Format`,\n * `findCatalogEntryByCanonicalAndSize`, registry exports) for\n * callers wiring projection into their own code paths.\n *\n * Legacy-preserving and raw wire projection helpers are exposed only from\n * `@adcp/sdk/v2/projection`. The package root exports the canonical authoring\n * surface so ordinary buyers do not accidentally retain legacy identities.\n */\n\nexport { projectV1ProductToV2, canonicalDeclarationFromBareId, resolveCanonicalFormatKind } from './v1-to-v2';\nexport type {\n V1ToV2Result,\n V1ToV2ProjectionOptions,\n BareFormatIdResolveOptions,\n LegacyFormatConversionContext,\n LegacyFormatConverter,\n LegacyFormatResolutionContext,\n LegacyFormatResolver,\n} from './v1-to-v2';\n\nexport { projectV2ProductToV1 } from './v2-to-v1';\nexport type {\n V2ToV1Result,\n V2ToV1ProjectionOptions,\n CanonicalFormatLegacyResolver,\n CanonicalFormatLegacyResolutionContext,\n CanonicalProductFormatLegacyResolutionContext,\n CanonicalCreativeFormatLegacyResolutionContext,\n CanonicalSelectorFormatLegacyResolutionContext,\n} from './v2-to-v1';\n\nexport {\n canonicalFormatLegacyResolverFromRoutes,\n legacyRoutesForProduct,\n type CanonicalFormatLegacyRoute,\n} from './legacy-routes';\n\nexport {\n augmentProductWithFormatOptions,\n withFormatOptions,\n toCanonicalFormatOptionsWithRoutes,\n toAdditiveCanonicalProduct,\n withAdditiveCanonicalFormatOptions,\n toCanonicalOnlyProduct,\n toCanonicalOnlyResponse,\n type V2AugmentedProduct,\n type AdditiveCanonicalProduct,\n type CanonicalOnlyProduct,\n} from './augment-response';\n\nexport {\n CanonicalFormat,\n audioDaastFormatDeclaration,\n audioHostedFormatDeclaration,\n agentPlacementFormatDeclaration,\n canonicalFormatDeclaration,\n customFormatDeclaration,\n displayTagFormatDeclaration,\n legacyFormatRef,\n legacyFormatRefs,\n html5FormatDeclaration,\n imageCarouselFormatDeclaration,\n imageFormatDeclaration,\n nativeInFeedFormatDeclaration,\n productCard,\n productCardDetailed,\n responsiveCreativeFormatDeclaration,\n sellerRenderedStatefulDisplayFormatDeclaration,\n sponsoredPlacementFormatDeclaration,\n coordinatedPlacementsFormatDeclaration,\n videoHostedFormatDeclaration,\n videoVastFormatDeclaration,\n type CanonicalFormatDeclaration,\n type CanonicalFormatDeclarationFields,\n type CanonicalFormatKind,\n type CanonicalFormatParams,\n type FormatReferenceInput,\n type ProductCardDetailedFields,\n type ProductCardFields,\n} from './builders';\n\nexport {\n packageRefsForFormatOptions,\n packageRefsForCapabilities,\n legacyFormatIdsFromOptions,\n tryLegacyFormatIdsFromOptions,\n legacyFormatIdsForFormatOption,\n legacyFormatIdsForCapability,\n lintPackageFormatSelectorDimensions,\n FormatOptionRefsLookupError,\n CapabilityIdsLookupError,\n type PackageFormatRefs,\n type PackageCapabilityRefs,\n type FormatOptionRef,\n type FormatOptionSelector,\n type FormatOptionRefsLookupErrorCode,\n type CapabilityIdsLookupErrorCode,\n type PackageFormatSelectorInput,\n type PackageFormatSelectorDimensionOptions,\n type FixedSizeDimensions,\n type PackageFormatSelectorDimensionDiagnosticCode,\n type PackageFormatSelectorDimensionDiagnostic,\n} from './write-side';\n\nexport type {\n V1FormatId,\n V2ProductFormatDeclaration,\n V2ProductInput,\n V2Product,\n V1ProductInput,\n V1Product,\n ProjectionProductInput,\n ProjectionDiagnostic,\n} from './types';\nexport { isProjectionProductInput } from './types';\nexport {\n legacyFormatConverterFromCatalogSnapshots,\n canonicalFormatLegacyResolverFromCatalogSnapshots,\n projectionAdaptersFromCatalogSnapshots,\n type ProjectionCatalogAdapters,\n type ProjectionCatalogSnapshot,\n type ProjectionCatalogSource,\n} from './catalog-snapshot';\n\nexport {\n loadCatalog,\n lookupV1Format,\n findCatalogEntryByCanonicalAndSize,\n parseSizedIdTemplate,\n _resetCatalogCache,\n type V1FormatDefinition,\n type CanonicalProjectionRef,\n} from './catalog';\n\nexport { isCanonicalV1Translatable } from './canonical-properties';\n\nexport { normalizeLegacyGetProductsResponse } from './legacy-normalization';\nexport type { LegacyProductNormalizationInput, NormalizedLegacyProduct } from './legacy-normalization';\n\nexport {\n CreativeFormatProjectionError,\n CreativeFormatCapabilityError,\n projectCreativeForDelivery,\n projectMediaBuyCreativesForDelivery,\n projectSyncCreativesForDelivery,\n stripLegacyCreativeIdentity,\n resolveCreativeFormatWireMode,\n type CreativeFormatSelectorContainer,\n type CanonicalCreativeFormatSelectorContainer,\n type CreativeFormatWireMode,\n type CanonicalCreativeAsset,\n type CanonicalSyncCreativeAsset,\n type CanonicalCreativeResponse,\n type CanonicalGetProductsResponse,\n type CanonicalGetProductsRequest,\n type CanonicalCreateMediaBuyRequest,\n type CanonicalCreateMediaBuyResponse,\n type CanonicalCreativeFilters,\n type CanonicalListCreativesRequest,\n type CanonicalListCreativesResponse,\n type CanonicalGetCreativeDeliveryResponse,\n type CanonicalGetMediaBuyDeliveryResponse,\n type CanonicalGetMediaBuysResponse,\n type CanonicalListedCreative,\n type CanonicalPackageRequest,\n type CanonicalPackageUpdate,\n type CanonicalPackage,\n type CanonicalPlacement,\n type CanonicalPreviewCreativeRequest,\n type CanonicalPreviewCreativeResponse,\n type CanonicalProduct,\n type CanonicalProjectedCreative,\n type CanonicalSyncCreativesRequest,\n type CanonicalSyncCreativesResponse,\n type CanonicalUpdateMediaBuyRequest,\n type CanonicalUpdateMediaBuyResponse,\n type LegacyCreativeAsset,\n type LegacyProjectedCreative,\n type ProjectedMediaBuyCreativeRequest,\n type ProjectedSyncCreativeRequest,\n type SyncCreativeFormatProjection,\n} from './creative-delivery';\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA0CA,sBAAiG;AAWjG,sBAAqC;AAWrC,2BAIO;AAEP,8BAWO;AAEP,sBA6BO;AAEP,wBAqBO;AAYP,mBAAyC;AACzC,8BAOO;AAEP,qBAQO;AAEP,kCAA0C;AAE1C,kCAAmD;AAGnD,+BA0CO;","names":[]}
@@ -61,6 +61,7 @@ import {
61
61
  _resetCatalogCache
62
62
  } from "./catalog.mjs";
63
63
  import { isCanonicalV1Translatable } from "./canonical-properties.mjs";
64
+ import { normalizeLegacyGetProductsResponse } from "./legacy-normalization.mjs";
64
65
  import {
65
66
  CreativeFormatProjectionError,
66
67
  CreativeFormatCapabilityError,
@@ -105,6 +106,7 @@ export {
105
106
  loadCatalog,
106
107
  lookupV1Format,
107
108
  nativeInFeedFormatDeclaration,
109
+ normalizeLegacyGetProductsResponse,
108
110
  packageRefsForCapabilities,
109
111
  packageRefsForFormatOptions,
110
112
  parseSizedIdTemplate,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/lib/v2/projection/index.ts"],"sourcesContent":["/**\n * v1 ↔ v2 Product projection layer (AdCP 3.1).\n *\n * Public surfaces:\n *\n * - `projectV1ProductToV2` / `projectV2ProductToV1` — the symmetric\n * core projections. Read a Product on one side, return a Product\n * on the other plus structured diagnostics (`source: 'sdk'`,\n * normative spec codes + SDK-local codes).\n *\n * - `resolveCanonicalFormatKind` / `canonicalDeclarationFromBareId` —\n * resolve a single bare format-id string (no surrounding Product,\n * no `agent_url`) to its canonical `format_kind` or full declaration.\n * Registry- and catalog-backed; fails closed to `null`.\n *\n * - `withFormatOptions` / `augmentProductWithFormatOptions` —\n * buyer-side response augmentation. Adds `format_options[]` to a\n * v1-shaped get_products response so canonical-format-aware buyers\n * can read the canonical model regardless of the seller's wire\n * version. Additive — `format_ids[]` is preserved.\n *\n * - `toAdditiveCanonicalProduct` — additive projection with URL-free\n * `format_options[]`, preserved top-level `format_ids[]`, and explicit\n * serializable legacy-route sidecars for later forwarding.\n * `withAdditiveCanonicalFormatOptions` is the response-level companion.\n * `toCanonicalFormatOptionsWithRoutes` provides the same safe route-first\n * concealment for callers that hold only a declaration array.\n *\n * - `toCanonicalOnlyProduct` / `toCanonicalOnlyResponse` — the\n * read-side narrowing for a fully-migrated consumer. Returns\n * `format_options[]` with `format_ids[]` dropped, surfacing a\n * diagnostic for any ref that couldn't be carried over.\n *\n * - Catalog + registry primitives (`lookupV1Format`,\n * `findCatalogEntryByCanonicalAndSize`, registry exports) for\n * callers wiring projection into their own code paths.\n *\n * Legacy-preserving and raw wire projection helpers are exposed only from\n * `@adcp/sdk/v2/projection`. The package root exports the canonical authoring\n * surface so ordinary buyers do not accidentally retain legacy identities.\n */\n\nexport { projectV1ProductToV2, canonicalDeclarationFromBareId, resolveCanonicalFormatKind } from './v1-to-v2';\nexport type {\n V1ToV2Result,\n V1ToV2ProjectionOptions,\n BareFormatIdResolveOptions,\n LegacyFormatConversionContext,\n LegacyFormatConverter,\n LegacyFormatResolutionContext,\n LegacyFormatResolver,\n} from './v1-to-v2';\n\nexport { projectV2ProductToV1 } from './v2-to-v1';\nexport type {\n V2ToV1Result,\n V2ToV1ProjectionOptions,\n CanonicalFormatLegacyResolver,\n CanonicalFormatLegacyResolutionContext,\n CanonicalProductFormatLegacyResolutionContext,\n CanonicalCreativeFormatLegacyResolutionContext,\n CanonicalSelectorFormatLegacyResolutionContext,\n} from './v2-to-v1';\n\nexport {\n canonicalFormatLegacyResolverFromRoutes,\n legacyRoutesForProduct,\n type CanonicalFormatLegacyRoute,\n} from './legacy-routes';\n\nexport {\n augmentProductWithFormatOptions,\n withFormatOptions,\n toCanonicalFormatOptionsWithRoutes,\n toAdditiveCanonicalProduct,\n withAdditiveCanonicalFormatOptions,\n toCanonicalOnlyProduct,\n toCanonicalOnlyResponse,\n type V2AugmentedProduct,\n type AdditiveCanonicalProduct,\n type CanonicalOnlyProduct,\n} from './augment-response';\n\nexport {\n CanonicalFormat,\n audioDaastFormatDeclaration,\n audioHostedFormatDeclaration,\n agentPlacementFormatDeclaration,\n canonicalFormatDeclaration,\n customFormatDeclaration,\n displayTagFormatDeclaration,\n legacyFormatRef,\n legacyFormatRefs,\n html5FormatDeclaration,\n imageCarouselFormatDeclaration,\n imageFormatDeclaration,\n nativeInFeedFormatDeclaration,\n productCard,\n productCardDetailed,\n responsiveCreativeFormatDeclaration,\n sellerRenderedStatefulDisplayFormatDeclaration,\n sponsoredPlacementFormatDeclaration,\n coordinatedPlacementsFormatDeclaration,\n videoHostedFormatDeclaration,\n videoVastFormatDeclaration,\n type CanonicalFormatDeclaration,\n type CanonicalFormatDeclarationFields,\n type CanonicalFormatKind,\n type CanonicalFormatParams,\n type FormatReferenceInput,\n type ProductCardDetailedFields,\n type ProductCardFields,\n} from './builders';\n\nexport {\n packageRefsForFormatOptions,\n packageRefsForCapabilities,\n legacyFormatIdsFromOptions,\n tryLegacyFormatIdsFromOptions,\n legacyFormatIdsForFormatOption,\n legacyFormatIdsForCapability,\n lintPackageFormatSelectorDimensions,\n FormatOptionRefsLookupError,\n CapabilityIdsLookupError,\n type PackageFormatRefs,\n type PackageCapabilityRefs,\n type FormatOptionRef,\n type FormatOptionSelector,\n type FormatOptionRefsLookupErrorCode,\n type CapabilityIdsLookupErrorCode,\n type PackageFormatSelectorInput,\n type PackageFormatSelectorDimensionOptions,\n type FixedSizeDimensions,\n type PackageFormatSelectorDimensionDiagnosticCode,\n type PackageFormatSelectorDimensionDiagnostic,\n} from './write-side';\n\nexport type {\n V1FormatId,\n V2ProductFormatDeclaration,\n V2ProductInput,\n V2Product,\n V1ProductInput,\n V1Product,\n ProjectionProductInput,\n ProjectionDiagnostic,\n} from './types';\nexport { isProjectionProductInput } from './types';\nexport {\n legacyFormatConverterFromCatalogSnapshots,\n canonicalFormatLegacyResolverFromCatalogSnapshots,\n projectionAdaptersFromCatalogSnapshots,\n type ProjectionCatalogAdapters,\n type ProjectionCatalogSnapshot,\n type ProjectionCatalogSource,\n} from './catalog-snapshot';\n\nexport {\n loadCatalog,\n lookupV1Format,\n findCatalogEntryByCanonicalAndSize,\n parseSizedIdTemplate,\n _resetCatalogCache,\n type V1FormatDefinition,\n type CanonicalProjectionRef,\n} from './catalog';\n\nexport { isCanonicalV1Translatable } from './canonical-properties';\n\nexport {\n CreativeFormatProjectionError,\n CreativeFormatCapabilityError,\n projectCreativeForDelivery,\n projectMediaBuyCreativesForDelivery,\n projectSyncCreativesForDelivery,\n stripLegacyCreativeIdentity,\n resolveCreativeFormatWireMode,\n type CreativeFormatSelectorContainer,\n type CanonicalCreativeFormatSelectorContainer,\n type CreativeFormatWireMode,\n type CanonicalCreativeAsset,\n type CanonicalSyncCreativeAsset,\n type CanonicalCreativeResponse,\n type CanonicalGetProductsResponse,\n type CanonicalGetProductsRequest,\n type CanonicalCreateMediaBuyRequest,\n type CanonicalCreateMediaBuyResponse,\n type CanonicalCreativeFilters,\n type CanonicalListCreativesRequest,\n type CanonicalListCreativesResponse,\n type CanonicalGetCreativeDeliveryResponse,\n type CanonicalGetMediaBuyDeliveryResponse,\n type CanonicalGetMediaBuysResponse,\n type CanonicalListedCreative,\n type CanonicalPackageRequest,\n type CanonicalPackageUpdate,\n type CanonicalPackage,\n type CanonicalPlacement,\n type CanonicalPreviewCreativeRequest,\n type CanonicalPreviewCreativeResponse,\n type CanonicalProduct,\n type CanonicalProjectedCreative,\n type CanonicalSyncCreativesRequest,\n type CanonicalSyncCreativesResponse,\n type CanonicalUpdateMediaBuyRequest,\n type CanonicalUpdateMediaBuyResponse,\n type LegacyCreativeAsset,\n type LegacyProjectedCreative,\n type ProjectedMediaBuyCreativeRequest,\n type ProjectedSyncCreativeRequest,\n type SyncCreativeFormatProjection,\n} from './creative-delivery';\n"],"mappings":"AA0CA,SAAS,sBAAsB,gCAAgC,kCAAkC;AAWjG,SAAS,4BAA4B;AAWrC;AAAA,EACE;AAAA,EACA;AAAA,OAEK;AAEP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAIK;AAEP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAQK;AAEP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAYK;AAYP,SAAS,gCAAgC;AACzC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OAIK;AAEP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAGK;AAEP,SAAS,iCAAiC;AAE1C;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAmCK;","names":[]}
1
+ {"version":3,"sources":["../../../../src/lib/v2/projection/index.ts"],"sourcesContent":["/**\n * v1 ↔ v2 Product projection layer (AdCP 3.1).\n *\n * Public surfaces:\n *\n * - `projectV1ProductToV2` / `projectV2ProductToV1` — the symmetric\n * core projections. Read a Product on one side, return a Product\n * on the other plus structured diagnostics (`source: 'sdk'`,\n * normative spec codes + SDK-local codes).\n *\n * - `resolveCanonicalFormatKind` / `canonicalDeclarationFromBareId` —\n * resolve a single bare format-id string (no surrounding Product,\n * no `agent_url`) to its canonical `format_kind` or full declaration.\n * Registry- and catalog-backed; fails closed to `null`.\n *\n * - `withFormatOptions` / `augmentProductWithFormatOptions` —\n * buyer-side response augmentation. Adds `format_options[]` to a\n * v1-shaped get_products response so canonical-format-aware buyers\n * can read the canonical model regardless of the seller's wire\n * version. Additive — `format_ids[]` is preserved.\n *\n * - `toAdditiveCanonicalProduct` — additive projection with URL-free\n * `format_options[]`, preserved top-level `format_ids[]`, and explicit\n * serializable legacy-route sidecars for later forwarding.\n * `withAdditiveCanonicalFormatOptions` is the response-level companion.\n * `toCanonicalFormatOptionsWithRoutes` provides the same safe route-first\n * concealment for callers that hold only a declaration array.\n *\n * - `toCanonicalOnlyProduct` / `toCanonicalOnlyResponse` — the\n * read-side narrowing for a fully-migrated consumer. Returns\n * `format_options[]` with `format_ids[]` dropped, surfacing a\n * diagnostic for any ref that couldn't be carried over.\n *\n * - Catalog + registry primitives (`lookupV1Format`,\n * `findCatalogEntryByCanonicalAndSize`, registry exports) for\n * callers wiring projection into their own code paths.\n *\n * Legacy-preserving and raw wire projection helpers are exposed only from\n * `@adcp/sdk/v2/projection`. The package root exports the canonical authoring\n * surface so ordinary buyers do not accidentally retain legacy identities.\n */\n\nexport { projectV1ProductToV2, canonicalDeclarationFromBareId, resolveCanonicalFormatKind } from './v1-to-v2';\nexport type {\n V1ToV2Result,\n V1ToV2ProjectionOptions,\n BareFormatIdResolveOptions,\n LegacyFormatConversionContext,\n LegacyFormatConverter,\n LegacyFormatResolutionContext,\n LegacyFormatResolver,\n} from './v1-to-v2';\n\nexport { projectV2ProductToV1 } from './v2-to-v1';\nexport type {\n V2ToV1Result,\n V2ToV1ProjectionOptions,\n CanonicalFormatLegacyResolver,\n CanonicalFormatLegacyResolutionContext,\n CanonicalProductFormatLegacyResolutionContext,\n CanonicalCreativeFormatLegacyResolutionContext,\n CanonicalSelectorFormatLegacyResolutionContext,\n} from './v2-to-v1';\n\nexport {\n canonicalFormatLegacyResolverFromRoutes,\n legacyRoutesForProduct,\n type CanonicalFormatLegacyRoute,\n} from './legacy-routes';\n\nexport {\n augmentProductWithFormatOptions,\n withFormatOptions,\n toCanonicalFormatOptionsWithRoutes,\n toAdditiveCanonicalProduct,\n withAdditiveCanonicalFormatOptions,\n toCanonicalOnlyProduct,\n toCanonicalOnlyResponse,\n type V2AugmentedProduct,\n type AdditiveCanonicalProduct,\n type CanonicalOnlyProduct,\n} from './augment-response';\n\nexport {\n CanonicalFormat,\n audioDaastFormatDeclaration,\n audioHostedFormatDeclaration,\n agentPlacementFormatDeclaration,\n canonicalFormatDeclaration,\n customFormatDeclaration,\n displayTagFormatDeclaration,\n legacyFormatRef,\n legacyFormatRefs,\n html5FormatDeclaration,\n imageCarouselFormatDeclaration,\n imageFormatDeclaration,\n nativeInFeedFormatDeclaration,\n productCard,\n productCardDetailed,\n responsiveCreativeFormatDeclaration,\n sellerRenderedStatefulDisplayFormatDeclaration,\n sponsoredPlacementFormatDeclaration,\n coordinatedPlacementsFormatDeclaration,\n videoHostedFormatDeclaration,\n videoVastFormatDeclaration,\n type CanonicalFormatDeclaration,\n type CanonicalFormatDeclarationFields,\n type CanonicalFormatKind,\n type CanonicalFormatParams,\n type FormatReferenceInput,\n type ProductCardDetailedFields,\n type ProductCardFields,\n} from './builders';\n\nexport {\n packageRefsForFormatOptions,\n packageRefsForCapabilities,\n legacyFormatIdsFromOptions,\n tryLegacyFormatIdsFromOptions,\n legacyFormatIdsForFormatOption,\n legacyFormatIdsForCapability,\n lintPackageFormatSelectorDimensions,\n FormatOptionRefsLookupError,\n CapabilityIdsLookupError,\n type PackageFormatRefs,\n type PackageCapabilityRefs,\n type FormatOptionRef,\n type FormatOptionSelector,\n type FormatOptionRefsLookupErrorCode,\n type CapabilityIdsLookupErrorCode,\n type PackageFormatSelectorInput,\n type PackageFormatSelectorDimensionOptions,\n type FixedSizeDimensions,\n type PackageFormatSelectorDimensionDiagnosticCode,\n type PackageFormatSelectorDimensionDiagnostic,\n} from './write-side';\n\nexport type {\n V1FormatId,\n V2ProductFormatDeclaration,\n V2ProductInput,\n V2Product,\n V1ProductInput,\n V1Product,\n ProjectionProductInput,\n ProjectionDiagnostic,\n} from './types';\nexport { isProjectionProductInput } from './types';\nexport {\n legacyFormatConverterFromCatalogSnapshots,\n canonicalFormatLegacyResolverFromCatalogSnapshots,\n projectionAdaptersFromCatalogSnapshots,\n type ProjectionCatalogAdapters,\n type ProjectionCatalogSnapshot,\n type ProjectionCatalogSource,\n} from './catalog-snapshot';\n\nexport {\n loadCatalog,\n lookupV1Format,\n findCatalogEntryByCanonicalAndSize,\n parseSizedIdTemplate,\n _resetCatalogCache,\n type V1FormatDefinition,\n type CanonicalProjectionRef,\n} from './catalog';\n\nexport { isCanonicalV1Translatable } from './canonical-properties';\n\nexport { normalizeLegacyGetProductsResponse } from './legacy-normalization';\nexport type { LegacyProductNormalizationInput, NormalizedLegacyProduct } from './legacy-normalization';\n\nexport {\n CreativeFormatProjectionError,\n CreativeFormatCapabilityError,\n projectCreativeForDelivery,\n projectMediaBuyCreativesForDelivery,\n projectSyncCreativesForDelivery,\n stripLegacyCreativeIdentity,\n resolveCreativeFormatWireMode,\n type CreativeFormatSelectorContainer,\n type CanonicalCreativeFormatSelectorContainer,\n type CreativeFormatWireMode,\n type CanonicalCreativeAsset,\n type CanonicalSyncCreativeAsset,\n type CanonicalCreativeResponse,\n type CanonicalGetProductsResponse,\n type CanonicalGetProductsRequest,\n type CanonicalCreateMediaBuyRequest,\n type CanonicalCreateMediaBuyResponse,\n type CanonicalCreativeFilters,\n type CanonicalListCreativesRequest,\n type CanonicalListCreativesResponse,\n type CanonicalGetCreativeDeliveryResponse,\n type CanonicalGetMediaBuyDeliveryResponse,\n type CanonicalGetMediaBuysResponse,\n type CanonicalListedCreative,\n type CanonicalPackageRequest,\n type CanonicalPackageUpdate,\n type CanonicalPackage,\n type CanonicalPlacement,\n type CanonicalPreviewCreativeRequest,\n type CanonicalPreviewCreativeResponse,\n type CanonicalProduct,\n type CanonicalProjectedCreative,\n type CanonicalSyncCreativesRequest,\n type CanonicalSyncCreativesResponse,\n type CanonicalUpdateMediaBuyRequest,\n type CanonicalUpdateMediaBuyResponse,\n type LegacyCreativeAsset,\n type LegacyProjectedCreative,\n type ProjectedMediaBuyCreativeRequest,\n type ProjectedSyncCreativeRequest,\n type SyncCreativeFormatProjection,\n} from './creative-delivery';\n"],"mappings":"AA0CA,SAAS,sBAAsB,gCAAgC,kCAAkC;AAWjG,SAAS,4BAA4B;AAWrC;AAAA,EACE;AAAA,EACA;AAAA,OAEK;AAEP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAIK;AAEP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAQK;AAEP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAYK;AAYP,SAAS,gCAAgC;AACzC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OAIK;AAEP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAGK;AAEP,SAAS,iCAAiC;AAE1C,SAAS,0CAA0C;AAGnD;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAmCK;","names":[]}
@@ -0,0 +1,24 @@
1
+ import { type PricingOptionV2, type PricingOptionV3 } from '../../utils/pricing-adapter.mjs';
2
+ /** Legacy product fields normalized before v2-to-canonical projection. */
3
+ export type LegacyProductNormalizationInput = object & {
4
+ pricing_options?: readonly (PricingOptionV2 | PricingOptionV3)[];
5
+ channels?: readonly string[];
6
+ forecast?: Record<string, unknown>;
7
+ };
8
+ /** Product shape after pricing, channel, and forecast compatibility cleanup. */
9
+ export type NormalizedLegacyProduct<TProduct extends LegacyProductNormalizationInput> = Omit<TProduct, 'pricing_options' | 'channels' | 'forecast'> & {
10
+ pricing_options?: PricingOptionV3[];
11
+ channels?: string[];
12
+ forecast?: Record<string, unknown>;
13
+ };
14
+ /**
15
+ * Apply the SDK's complete v2.5 `get_products` compatibility normalization
16
+ * before projecting a response recovered through a custom `tasks_get` flow.
17
+ */
18
+ export declare function normalizeLegacyGetProductsResponse<TProduct extends LegacyProductNormalizationInput, TResponse extends object & {
19
+ products: readonly TProduct[];
20
+ }>(response: TResponse): Omit<TResponse, 'products'> & {
21
+ products: NormalizedLegacyProduct<TProduct>[];
22
+ };
23
+ /** Preserve pass-through/error responses when the recovered shape is not yet narrowed. */
24
+ export declare function normalizeLegacyGetProductsResponse(response: unknown): unknown;