@adcp/sdk 14.4.0 → 15.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/adcp-grade.js +46 -2
- package/bin/adcp.js +13 -3
- package/dist/lib/auth/oauth/ClientCredentialsFlow.js +4 -1
- package/dist/lib/auth/oauth/ClientCredentialsFlow.mjs +4 -1
- package/dist/lib/auth/oauth/MCPOAuthProvider.d.mts +19 -6
- package/dist/lib/auth/oauth/MCPOAuthProvider.d.ts +19 -6
- package/dist/lib/auth/oauth/MCPOAuthProvider.js +95 -30
- package/dist/lib/auth/oauth/MCPOAuthProvider.mjs +96 -30
- package/dist/lib/auth/oauth/NonInteractiveFlowHandler.d.mts +1 -1
- package/dist/lib/auth/oauth/NonInteractiveFlowHandler.d.ts +1 -1
- package/dist/lib/auth/oauth/NonInteractiveFlowHandler.js +1 -1
- package/dist/lib/auth/oauth/NonInteractiveFlowHandler.mjs +1 -1
- package/dist/lib/auth/oauth/client-credentials-schema.d.mts +17 -0
- package/dist/lib/auth/oauth/client-credentials-schema.d.ts +17 -0
- package/dist/lib/auth/oauth/client-credentials-schema.js +37 -0
- package/dist/lib/auth/oauth/client-credentials-schema.mjs +13 -0
- package/dist/lib/auth/oauth/file-storage.d.mts +3 -3
- package/dist/lib/auth/oauth/file-storage.d.ts +3 -3
- package/dist/lib/auth/oauth/file-storage.js +12 -5
- package/dist/lib/auth/oauth/file-storage.mjs +12 -5
- package/dist/lib/auth/oauth/index.d.mts +10 -6
- package/dist/lib/auth/oauth/index.d.ts +10 -6
- package/dist/lib/auth/oauth/index.js +9 -3
- package/dist/lib/auth/oauth/index.mjs +8 -3
- package/dist/lib/auth/oauth/types.d.mts +9 -2
- package/dist/lib/auth/oauth/types.d.ts +9 -2
- package/dist/lib/auth/oauth/types.js +3 -2
- package/dist/lib/auth/oauth/types.mjs +3 -2
- package/dist/lib/auth/oauth/web-flow.d.mts +2 -0
- package/dist/lib/auth/oauth/web-flow.d.ts +2 -0
- package/dist/lib/auth/oauth/web-flow.js +42 -9
- package/dist/lib/auth/oauth/web-flow.mjs +42 -9
- package/dist/lib/canonical-references/index.d.mts +19 -1
- package/dist/lib/canonical-references/index.d.ts +19 -1
- package/dist/lib/canonical-references/index.js +81 -9
- package/dist/lib/canonical-references/index.mjs +80 -9
- package/dist/lib/client/core.d.mts +1 -0
- package/dist/lib/client/core.d.ts +1 -0
- package/dist/lib/core/AgentClient.d.mts +9 -1
- package/dist/lib/core/AgentClient.d.ts +9 -1
- package/dist/lib/core/AgentClient.js +10 -0
- package/dist/lib/core/AgentClient.mjs +10 -0
- package/dist/lib/core/SingleAgentClient.d.mts +13 -2
- package/dist/lib/core/SingleAgentClient.d.ts +13 -2
- package/dist/lib/core/SingleAgentClient.js +23 -5
- package/dist/lib/core/SingleAgentClient.mjs +23 -5
- package/dist/lib/index.d.mts +2 -2
- package/dist/lib/index.d.ts +2 -2
- package/dist/lib/index.js +2 -0
- package/dist/lib/index.mjs +3 -1
- package/dist/lib/reporting/gcs/adapter.d.mts +31 -0
- package/dist/lib/reporting/gcs/adapter.d.ts +31 -0
- package/dist/lib/reporting/gcs/adapter.js +342 -0
- package/dist/lib/reporting/gcs/adapter.mjs +325 -0
- package/dist/lib/reporting/gcs/bucket-policy.d.mts +3 -0
- package/dist/lib/reporting/gcs/bucket-policy.d.ts +3 -0
- package/dist/lib/reporting/gcs/bucket-policy.js +31 -0
- package/dist/lib/reporting/gcs/bucket-policy.mjs +7 -0
- package/dist/lib/reporting/gcs/errors.d.mts +5 -0
- package/dist/lib/reporting/gcs/errors.d.ts +5 -0
- package/dist/lib/reporting/gcs/errors.js +41 -0
- package/dist/lib/reporting/gcs/errors.mjs +16 -0
- package/dist/lib/reporting/gcs/fence.d.mts +36 -0
- package/dist/lib/reporting/gcs/fence.d.ts +36 -0
- package/dist/lib/reporting/gcs/fence.js +250 -0
- package/dist/lib/reporting/gcs/fence.mjs +230 -0
- package/dist/lib/reporting/gcs/index.d.mts +7 -0
- package/dist/lib/reporting/gcs/index.d.ts +7 -0
- package/dist/lib/reporting/gcs/index.js +41 -0
- package/dist/lib/reporting/gcs/index.mjs +12 -0
- package/dist/lib/reporting/gcs/io.d.mts +7 -0
- package/dist/lib/reporting/gcs/io.d.ts +7 -0
- package/dist/lib/reporting/gcs/io.js +95 -0
- package/dist/lib/reporting/gcs/io.mjs +69 -0
- package/dist/lib/reporting/gcs/reader.d.mts +43 -0
- package/dist/lib/reporting/gcs/reader.d.ts +43 -0
- package/dist/lib/reporting/gcs/reader.js +193 -0
- package/dist/lib/reporting/gcs/reader.mjs +169 -0
- package/dist/lib/reporting/gcs/validation.d.mts +5 -0
- package/dist/lib/reporting/gcs/validation.d.ts +5 -0
- package/dist/lib/reporting/gcs/validation.js +49 -0
- package/dist/lib/reporting/gcs/validation.mjs +25 -0
- package/dist/lib/reporting/ledger/handler.d.mts +1 -0
- package/dist/lib/reporting/ledger/handler.d.ts +1 -0
- package/dist/lib/reporting/ledger/index.d.mts +1 -0
- package/dist/lib/reporting/ledger/index.d.ts +1 -0
- package/dist/lib/reporting/ledger/index.js +2 -0
- package/dist/lib/reporting/ledger/index.mjs +1 -0
- package/dist/lib/reporting/ledger/managed-postgres.d.mts +16 -1
- package/dist/lib/reporting/ledger/managed-postgres.d.ts +16 -1
- package/dist/lib/reporting/ledger/managed-postgres.js +243 -2
- package/dist/lib/reporting/ledger/managed-postgres.mjs +248 -2
- package/dist/lib/reporting/ledger/object-writes.d.mts +69 -0
- package/dist/lib/reporting/ledger/object-writes.d.ts +69 -0
- package/dist/lib/reporting/ledger/object-writes.js +147 -0
- package/dist/lib/reporting/ledger/object-writes.mjs +114 -0
- package/dist/lib/schemas/index.d.mts +2 -0
- package/dist/lib/schemas/index.d.ts +2 -0
- package/dist/lib/schemas/index.js +3 -0
- package/dist/lib/schemas/index.mjs +2 -0
- package/dist/lib/schemas-data/v2.5/_provenance.json +1 -1
- package/dist/lib/server/a2a-adapter.d.mts +50 -1
- package/dist/lib/server/a2a-adapter.d.ts +50 -1
- package/dist/lib/server/a2a-adapter.js +230 -7
- package/dist/lib/server/a2a-adapter.mjs +237 -7
- package/dist/lib/server/auth-signature.d.mts +84 -46
- package/dist/lib/server/auth-signature.d.ts +84 -46
- package/dist/lib/server/auth-signature.js +48 -14
- package/dist/lib/server/auth-signature.mjs +58 -15
- package/dist/lib/server/create-adcp-server.js +5 -16
- package/dist/lib/server/create-adcp-server.mjs +5 -16
- package/dist/lib/server/index.d.mts +1 -1
- package/dist/lib/server/index.d.ts +1 -1
- package/dist/lib/server/index.js +2 -0
- package/dist/lib/server/index.mjs +3 -1
- package/dist/lib/signing/agent-fetch.js +3 -33
- package/dist/lib/signing/agent-fetch.mjs +3 -33
- package/dist/lib/signing/middleware.d.mts +9 -1
- package/dist/lib/signing/middleware.d.ts +9 -1
- package/dist/lib/signing/operation-resolution.d.mts +37 -0
- package/dist/lib/signing/operation-resolution.d.ts +37 -0
- package/dist/lib/signing/operation-resolution.js +154 -0
- package/dist/lib/signing/operation-resolution.mjs +125 -0
- package/dist/lib/signing/postgres-replay-store.d.mts +1 -1
- package/dist/lib/signing/postgres-replay-store.d.ts +1 -1
- package/dist/lib/signing/redis-replay-store.d.mts +1 -1
- package/dist/lib/signing/redis-replay-store.d.ts +1 -1
- package/dist/lib/signing/server.d.mts +1 -0
- package/dist/lib/signing/server.d.ts +1 -0
- package/dist/lib/signing/server.js +7 -0
- package/dist/lib/signing/server.mjs +8 -0
- package/dist/lib/signing/verifier.d.mts +36 -1
- package/dist/lib/signing/verifier.d.ts +36 -1
- package/dist/lib/signing/verifier.js +66 -34
- package/dist/lib/signing/verifier.mjs +61 -34
- package/dist/lib/testing/client.js +8 -3
- package/dist/lib/testing/client.mjs +8 -3
- package/dist/lib/testing/storyboard/request-signing/a2a-dispatch.d.mts +12 -0
- package/dist/lib/testing/storyboard/request-signing/a2a-dispatch.d.ts +12 -0
- package/dist/lib/testing/storyboard/request-signing/a2a-dispatch.js +29 -2
- package/dist/lib/testing/storyboard/request-signing/a2a-dispatch.mjs +27 -1
- package/dist/lib/testing/storyboard/request-signing/a2a-operation-resolution.d.mts +61 -0
- package/dist/lib/testing/storyboard/request-signing/a2a-operation-resolution.d.ts +61 -0
- package/dist/lib/testing/storyboard/request-signing/a2a-operation-resolution.js +298 -0
- package/dist/lib/testing/storyboard/request-signing/a2a-operation-resolution.mjs +276 -0
- package/dist/lib/testing/storyboard/request-signing/grader.d.mts +31 -1
- package/dist/lib/testing/storyboard/request-signing/grader.d.ts +31 -1
- package/dist/lib/testing/storyboard/request-signing/grader.js +11 -0
- package/dist/lib/testing/storyboard/request-signing/grader.mjs +11 -0
- package/dist/lib/testing/storyboard/request-signing/index.d.mts +5 -4
- package/dist/lib/testing/storyboard/request-signing/index.d.ts +5 -4
- package/dist/lib/testing/storyboard/request-signing/index.js +13 -0
- package/dist/lib/testing/storyboard/request-signing/index.mjs +18 -2
- package/dist/lib/testing/storyboard/request-signing/types.d.mts +43 -0
- package/dist/lib/testing/storyboard/request-signing/types.d.ts +43 -0
- package/dist/lib/testing/storyboard/request-signing/types.js +3 -0
- package/dist/lib/testing/storyboard/request-signing/types.mjs +2 -0
- package/dist/lib/testing/storyboard/request-signing/vector-loader.d.mts +42 -1
- package/dist/lib/testing/storyboard/request-signing/vector-loader.d.ts +42 -1
- package/dist/lib/testing/storyboard/request-signing/vector-loader.js +100 -1
- package/dist/lib/testing/storyboard/request-signing/vector-loader.mjs +104 -3
- package/dist/lib/testing/storyboard/validations.d.mts +1 -1
- package/dist/lib/testing/storyboard/validations.d.ts +1 -1
- package/dist/lib/testing/types.d.mts +10 -1
- package/dist/lib/testing/types.d.ts +10 -1
- package/dist/lib/version.d.mts +3 -3
- package/dist/lib/version.d.ts +3 -3
- package/dist/lib/version.js +3 -3
- package/dist/lib/version.mjs +3 -3
- package/docs/TYPE-SUMMARY.md +2 -2
- package/docs/ZOD-SCHEMAS.md +19 -0
- package/docs/guides/BUILD-AN-AGENT.md +9 -4
- package/docs/guides/CREATIVE-DELIVERY.md +34 -0
- package/docs/guides/OAUTH-ISSUER-BINDING.md +46 -0
- package/docs/guides/REPORTING-GCS-FENCE.md +52 -0
- package/docs/guides/REPORTING-GCS-MANAGED.md +56 -0
- package/docs/guides/REPORTING-OPERATIONS.md +4 -0
- package/docs/guides/SIGNING-GUIDE.md +20 -6
- package/docs/guides/VALIDATE-YOUR-AGENT.md +4 -0
- package/docs/guides/WEB-OAUTH.md +58 -163
- package/docs/guides/account-resolution.md +1 -1
- package/docs/llms.txt +2 -2
- package/docs/migration-14.0-to-14.1.md +1 -1
- package/docs/migration-14.x-rc-worksheet.md +8 -7
- package/docs/migration-buyer-agent-registry.md +1 -1
- package/docs/migration-oauth-issuer-bindings.md +14 -79
- package/package.json +19 -1
- package/skills/build-seller-agent/specialisms/signed-requests.md +2 -0
|
@@ -18,6 +18,18 @@ import {
|
|
|
18
18
|
} from "../v2/format-schema/sandbox-refs.mjs";
|
|
19
19
|
import { findUnsafeRegexPattern, unsafeRegexDetails } from "../v2/format-schema/regex-safety.mjs";
|
|
20
20
|
import { rejectDuplicateJsonKeys } from "../signing/agent-resolver/strict-json.mjs";
|
|
21
|
+
class CanonicalDocumentReadError extends Error {
|
|
22
|
+
constructor(code) {
|
|
23
|
+
super(`Canonical document read: ${code}`);
|
|
24
|
+
this.code = code;
|
|
25
|
+
this.name = "CanonicalDocumentReadError";
|
|
26
|
+
Object.defineProperty(this, /* @__PURE__ */ Symbol.for("adcp.canonicalDocumentReadError"), { value: true });
|
|
27
|
+
}
|
|
28
|
+
code;
|
|
29
|
+
}
|
|
30
|
+
function isCanonicalDocumentReadError(error) {
|
|
31
|
+
return !!error && typeof error === "object" && error[/* @__PURE__ */ Symbol.for("adcp.canonicalDocumentReadError")] === true;
|
|
32
|
+
}
|
|
21
33
|
const DEFAULT_TIMEOUT_MS = 5e3;
|
|
22
34
|
const DEFAULT_MAX_BODY_BYTES = 1024 * 1024;
|
|
23
35
|
const DEFAULT_MAX_TOTAL_REF_BYTES = 8 * 1024 * 1024;
|
|
@@ -123,10 +135,13 @@ function exceedsJsonDocumentDepth(value) {
|
|
|
123
135
|
return false;
|
|
124
136
|
}
|
|
125
137
|
function createCanonicalReferenceResolver(defaults = {}) {
|
|
138
|
+
if (defaults.documentReader && (!Number.isSafeInteger(defaults.timeoutMs ?? DEFAULT_TIMEOUT_MS) || (defaults.timeoutMs ?? DEFAULT_TIMEOUT_MS) < 1 || (defaults.timeoutMs ?? DEFAULT_TIMEOUT_MS) > 6e4 || !Number.isSafeInteger(defaults.maxBodyBytes ?? DEFAULT_MAX_BODY_BYTES) || (defaults.maxBodyBytes ?? DEFAULT_MAX_BODY_BYTES) < 1 || (defaults.maxBodyBytes ?? DEFAULT_MAX_BODY_BYTES) > 8 * 1024 * 1024))
|
|
139
|
+
throw new RangeError("Private canonical document transport limits are invalid");
|
|
126
140
|
const cache = defaults.cache ?? createCanonicalReferenceCache();
|
|
127
141
|
const merge = (options = {}) => ({
|
|
128
142
|
...defaults,
|
|
129
143
|
...options,
|
|
144
|
+
documentReader: defaults.documentReader ?? options.documentReader,
|
|
130
145
|
cache
|
|
131
146
|
});
|
|
132
147
|
return {
|
|
@@ -179,7 +194,7 @@ async function fetchJsonReference(ref, options) {
|
|
|
179
194
|
const kind = options.kind ?? "generic";
|
|
180
195
|
const valid = validateRef(ref, kind, options);
|
|
181
196
|
if (!valid.ok) return valid.result;
|
|
182
|
-
const cache = options.cache;
|
|
197
|
+
const cache = options.documentReader ? void 0 : options.cache;
|
|
183
198
|
const cacheKey = canonicalReferenceCacheKey(ref, options);
|
|
184
199
|
const cached = cache?.get(cacheKey);
|
|
185
200
|
if (cached) {
|
|
@@ -197,15 +212,70 @@ async function fetchJsonReference(ref, options) {
|
|
|
197
212
|
}
|
|
198
213
|
let response;
|
|
199
214
|
try {
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
215
|
+
if (options.documentReader) {
|
|
216
|
+
const timeoutMs = options.timeoutMs ?? DEFAULT_TIMEOUT_MS;
|
|
217
|
+
const maxBytes = options.maxBodyBytes ?? DEFAULT_MAX_BODY_BYTES;
|
|
218
|
+
if (!Number.isSafeInteger(timeoutMs) || timeoutMs < 1 || timeoutMs > 6e4 || !Number.isSafeInteger(maxBytes) || maxBytes < 1 || maxBytes > 8 * 1024 * 1024)
|
|
219
|
+
throw new CanonicalDocumentReadError("invalid_options");
|
|
220
|
+
const controller = new AbortController();
|
|
221
|
+
const onAbort = () => controller.abort(new CanonicalDocumentReadError("aborted"));
|
|
222
|
+
options.signal?.addEventListener("abort", onAbort, { once: true });
|
|
223
|
+
if (options.signal?.aborted) onAbort();
|
|
224
|
+
let abortListener;
|
|
225
|
+
const timer = setTimeout(() => controller.abort(new CanonicalDocumentReadError("network_error")), timeoutMs);
|
|
226
|
+
try {
|
|
227
|
+
controller.signal.throwIfAborted();
|
|
228
|
+
const read = await Promise.race([
|
|
229
|
+
options.documentReader.read({ uri: ref.uri, maxBytes, signal: controller.signal }),
|
|
230
|
+
new Promise((_, reject) => {
|
|
231
|
+
abortListener = () => reject(controller.signal.reason);
|
|
232
|
+
controller.signal.addEventListener("abort", abortListener, { once: true });
|
|
233
|
+
if (controller.signal.aborted) abortListener();
|
|
234
|
+
})
|
|
235
|
+
]);
|
|
236
|
+
controller.signal.throwIfAborted();
|
|
237
|
+
if (!(read?.body instanceof Uint8Array) || read.body.byteLength > maxBytes)
|
|
238
|
+
throw new CanonicalDocumentReadError("body_too_large");
|
|
239
|
+
response = {
|
|
240
|
+
status: 200,
|
|
241
|
+
body: Uint8Array.from(read.body),
|
|
242
|
+
headers: { "content-type": read.contentType ?? "" }
|
|
243
|
+
};
|
|
244
|
+
} finally {
|
|
245
|
+
clearTimeout(timer);
|
|
246
|
+
options.signal?.removeEventListener("abort", onAbort);
|
|
247
|
+
if (abortListener) controller.signal.removeEventListener("abort", abortListener);
|
|
248
|
+
}
|
|
249
|
+
} else {
|
|
250
|
+
response = await ssrfSafeFetch(ref.uri, {
|
|
251
|
+
method: "GET",
|
|
252
|
+
headers: { accept: "application/json, application/schema+json" },
|
|
253
|
+
timeoutMs: options.timeoutMs ?? DEFAULT_TIMEOUT_MS,
|
|
254
|
+
maxBodyBytes: options.maxBodyBytes ?? DEFAULT_MAX_BODY_BYTES,
|
|
255
|
+
allowPrivateIp: options.allowPrivateNetwork === true,
|
|
256
|
+
signal: options.signal
|
|
257
|
+
});
|
|
258
|
+
}
|
|
208
259
|
} catch (err) {
|
|
260
|
+
if (isCanonicalDocumentReadError(err)) {
|
|
261
|
+
const code = [
|
|
262
|
+
"access_denied",
|
|
263
|
+
"unsafe_url",
|
|
264
|
+
"body_too_large",
|
|
265
|
+
"network_error",
|
|
266
|
+
"invalid_options",
|
|
267
|
+
"aborted"
|
|
268
|
+
].includes(err.code) ? err.code : "network_error";
|
|
269
|
+
return fail(
|
|
270
|
+
kind,
|
|
271
|
+
ref,
|
|
272
|
+
cacheKey,
|
|
273
|
+
code === "unsafe_url" ? "blocked_unsafe_url" : "unresolvable",
|
|
274
|
+
code,
|
|
275
|
+
`Canonical document read failed: ${code}`,
|
|
276
|
+
{ retryable: code === "network_error" }
|
|
277
|
+
);
|
|
278
|
+
}
|
|
209
279
|
if (err instanceof SsrfRefusedError) {
|
|
210
280
|
if (err.code === "body_exceeds_limit") {
|
|
211
281
|
return fail(
|
|
@@ -726,6 +796,7 @@ function countSchemaKeywords(root) {
|
|
|
726
796
|
return walk(root);
|
|
727
797
|
}
|
|
728
798
|
export {
|
|
799
|
+
CanonicalDocumentReadError,
|
|
729
800
|
canonicalReferenceCacheKey,
|
|
730
801
|
createCanonicalReferenceCache,
|
|
731
802
|
createCanonicalReferenceResolver,
|
|
@@ -7,3 +7,4 @@ export { InMemoryWebhookRegistrationStore, type InMemoryWebhookRegistrationStore
|
|
|
7
7
|
export type { ConversationConfig, ConversationContext, InputHandler, InputHandlerResponse, InputRequest, Message, TaskInfo, TaskOptions, TaskResult, TaskResultCompleted, TaskResultFailure, TaskResultIntermediate, TaskResultMetadata, } from '../core/ConversationTypes.mjs';
|
|
8
8
|
export type { AgentConfig } from '../types/adcp.mjs';
|
|
9
9
|
export type { ResolveAccountOptions, ListedAccount } from '../core/account-resolution.mjs';
|
|
10
|
+
export type { CreativeFormatWireMode } from '../v2/projection/creative-delivery.mjs';
|
|
@@ -7,3 +7,4 @@ export { InMemoryWebhookRegistrationStore, type InMemoryWebhookRegistrationStore
|
|
|
7
7
|
export type { ConversationConfig, ConversationContext, InputHandler, InputHandlerResponse, InputRequest, Message, TaskInfo, TaskOptions, TaskResult, TaskResultCompleted, TaskResultFailure, TaskResultIntermediate, TaskResultMetadata, } from '../core/ConversationTypes';
|
|
8
8
|
export type { AgentConfig } from '../types/adcp';
|
|
9
9
|
export type { ResolveAccountOptions, ListedAccount } from '../core/account-resolution';
|
|
10
|
+
export type { CreativeFormatWireMode } from '../v2/projection/creative-delivery';
|
|
@@ -14,7 +14,7 @@ import type { MediaBuyLifecycleCoordinator, MediaBuyLifecycleCoordinatorOptions
|
|
|
14
14
|
import type { ProposalRefinementCapabilities, RefineProposalsInput, RefineProposalsResponse } from '../negotiation/types.mjs';
|
|
15
15
|
import type { LegacyFormatConverter } from '../v2/projection/v1-to-v2.mjs';
|
|
16
16
|
import type { ProjectionCatalogSnapshot } from '../v2/projection/catalog-snapshot.mjs';
|
|
17
|
-
import type { CanonicalCreateMediaBuyInput, CanonicalCreativeResponse, CanonicalGetProductsRequest, CanonicalGetProductsResponse, CanonicalListCreativesRequest, CanonicalListCreativesResponse, CanonicalPreviewCreativeRequest, CanonicalPreviewCreativeResponse, CanonicalSyncCreativesRequest, CanonicalUpdateMediaBuyRequest } from '../v2/projection/creative-delivery.mjs';
|
|
17
|
+
import type { CanonicalCreateMediaBuyInput, CanonicalCreativeResponse, CanonicalGetProductsRequest, CanonicalGetProductsResponse, CanonicalListCreativesRequest, CanonicalListCreativesResponse, CanonicalPreviewCreativeRequest, CanonicalPreviewCreativeResponse, CanonicalSyncCreativesRequest, CanonicalUpdateMediaBuyRequest, CreativeFormatWireMode } from '../v2/projection/creative-delivery.mjs';
|
|
18
18
|
export type { CanonicalGetProductsResponse } from '../v2/projection/creative-delivery.mjs';
|
|
19
19
|
export type CanonicalProjectionTaskOptions = TaskOptions & {
|
|
20
20
|
/** Migration escape hatch for seller-specific legacy refs absent from the bundled registry. */
|
|
@@ -533,6 +533,14 @@ export declare class AgentClient {
|
|
|
533
533
|
* For v2 servers: builds synthetic capabilities from tool list
|
|
534
534
|
*/
|
|
535
535
|
getCapabilities(options?: Pick<TaskOptions, 'signal' | 'transport'>): Promise<AdcpCapabilities>;
|
|
536
|
+
/**
|
|
537
|
+
* Resolve the creative wire mode used by canonical writes without sending a
|
|
538
|
+
* mutation. Uses capabilities, this tool's input schema, and the client wire
|
|
539
|
+
* pin. Older peers with insufficient evidence return `unknown` and require
|
|
540
|
+
* an unambiguous legacy reference during projection; conflicting evidence
|
|
541
|
+
* or unproven support with a 3.2+ buyer pin throws `CreativeFormatCapabilityError`.
|
|
542
|
+
*/
|
|
543
|
+
resolveCreativeFormatWireMode(taskType: 'sync_creatives' | 'create_media_buy' | 'update_media_buy', options?: Pick<TaskOptions, 'signal' | 'transport'>): Promise<CreativeFormatWireMode>;
|
|
536
544
|
/** Scope token for a tenant-bound, application-owned capability preflight. */
|
|
537
545
|
getCapabilityEvidenceScope(): import('./SingleAgentClient.mjs').CapabilityEvidenceScope;
|
|
538
546
|
/** Install fresh capability evidence without making a redundant probe. */
|
|
@@ -14,7 +14,7 @@ import type { MediaBuyLifecycleCoordinator, MediaBuyLifecycleCoordinatorOptions
|
|
|
14
14
|
import type { ProposalRefinementCapabilities, RefineProposalsInput, RefineProposalsResponse } from '../negotiation/types';
|
|
15
15
|
import type { LegacyFormatConverter } from '../v2/projection/v1-to-v2';
|
|
16
16
|
import type { ProjectionCatalogSnapshot } from '../v2/projection/catalog-snapshot';
|
|
17
|
-
import type { CanonicalCreateMediaBuyInput, CanonicalCreativeResponse, CanonicalGetProductsRequest, CanonicalGetProductsResponse, CanonicalListCreativesRequest, CanonicalListCreativesResponse, CanonicalPreviewCreativeRequest, CanonicalPreviewCreativeResponse, CanonicalSyncCreativesRequest, CanonicalUpdateMediaBuyRequest } from '../v2/projection/creative-delivery';
|
|
17
|
+
import type { CanonicalCreateMediaBuyInput, CanonicalCreativeResponse, CanonicalGetProductsRequest, CanonicalGetProductsResponse, CanonicalListCreativesRequest, CanonicalListCreativesResponse, CanonicalPreviewCreativeRequest, CanonicalPreviewCreativeResponse, CanonicalSyncCreativesRequest, CanonicalUpdateMediaBuyRequest, CreativeFormatWireMode } from '../v2/projection/creative-delivery';
|
|
18
18
|
export type { CanonicalGetProductsResponse } from '../v2/projection/creative-delivery';
|
|
19
19
|
export type CanonicalProjectionTaskOptions = TaskOptions & {
|
|
20
20
|
/** Migration escape hatch for seller-specific legacy refs absent from the bundled registry. */
|
|
@@ -533,6 +533,14 @@ export declare class AgentClient {
|
|
|
533
533
|
* For v2 servers: builds synthetic capabilities from tool list
|
|
534
534
|
*/
|
|
535
535
|
getCapabilities(options?: Pick<TaskOptions, 'signal' | 'transport'>): Promise<AdcpCapabilities>;
|
|
536
|
+
/**
|
|
537
|
+
* Resolve the creative wire mode used by canonical writes without sending a
|
|
538
|
+
* mutation. Uses capabilities, this tool's input schema, and the client wire
|
|
539
|
+
* pin. Older peers with insufficient evidence return `unknown` and require
|
|
540
|
+
* an unambiguous legacy reference during projection; conflicting evidence
|
|
541
|
+
* or unproven support with a 3.2+ buyer pin throws `CreativeFormatCapabilityError`.
|
|
542
|
+
*/
|
|
543
|
+
resolveCreativeFormatWireMode(taskType: 'sync_creatives' | 'create_media_buy' | 'update_media_buy', options?: Pick<TaskOptions, 'signal' | 'transport'>): Promise<CreativeFormatWireMode>;
|
|
536
544
|
/** Scope token for a tenant-bound, application-owned capability preflight. */
|
|
537
545
|
getCapabilityEvidenceScope(): import('./SingleAgentClient').CapabilityEvidenceScope;
|
|
538
546
|
/** Install fresh capability evidence without making a redundant probe. */
|
|
@@ -791,6 +791,16 @@ class AgentClient {
|
|
|
791
791
|
async getCapabilities(options) {
|
|
792
792
|
return this.client.getCapabilities(options);
|
|
793
793
|
}
|
|
794
|
+
/**
|
|
795
|
+
* Resolve the creative wire mode used by canonical writes without sending a
|
|
796
|
+
* mutation. Uses capabilities, this tool's input schema, and the client wire
|
|
797
|
+
* pin. Older peers with insufficient evidence return `unknown` and require
|
|
798
|
+
* an unambiguous legacy reference during projection; conflicting evidence
|
|
799
|
+
* or unproven support with a 3.2+ buyer pin throws `CreativeFormatCapabilityError`.
|
|
800
|
+
*/
|
|
801
|
+
async resolveCreativeFormatWireMode(taskType, options) {
|
|
802
|
+
return this.client.resolveCreativeFormatWireMode(taskType, options);
|
|
803
|
+
}
|
|
794
804
|
/** Scope token for a tenant-bound, application-owned capability preflight. */
|
|
795
805
|
getCapabilityEvidenceScope() {
|
|
796
806
|
return this.client.getCapabilityEvidenceScope();
|
|
@@ -759,6 +759,16 @@ class AgentClient {
|
|
|
759
759
|
async getCapabilities(options) {
|
|
760
760
|
return this.client.getCapabilities(options);
|
|
761
761
|
}
|
|
762
|
+
/**
|
|
763
|
+
* Resolve the creative wire mode used by canonical writes without sending a
|
|
764
|
+
* mutation. Uses capabilities, this tool's input schema, and the client wire
|
|
765
|
+
* pin. Older peers with insufficient evidence return `unknown` and require
|
|
766
|
+
* an unambiguous legacy reference during projection; conflicting evidence
|
|
767
|
+
* or unproven support with a 3.2+ buyer pin throws `CreativeFormatCapabilityError`.
|
|
768
|
+
*/
|
|
769
|
+
async resolveCreativeFormatWireMode(taskType, options) {
|
|
770
|
+
return this.client.resolveCreativeFormatWireMode(taskType, options);
|
|
771
|
+
}
|
|
762
772
|
/** Scope token for a tenant-bound, application-owned capability preflight. */
|
|
763
773
|
getCapabilityEvidenceScope() {
|
|
764
774
|
return this.client.getCapabilityEvidenceScope();
|
|
@@ -19,7 +19,7 @@ import type { ProductCache } from './product-cache.mjs';
|
|
|
19
19
|
import { type ResolveAccountOptions } from './account-resolution.mjs';
|
|
20
20
|
import { type BuyerPropertyPolicy, type ProductPropertyPolicyMode } from '../media-buy/property-policy.mjs';
|
|
21
21
|
import { type ResolveListOptions } from '../server/targeting-helpers.mjs';
|
|
22
|
-
import { type CanonicalCreateMediaBuyInput, type CanonicalCreativeResponse, type CanonicalGetProductsRequest, type CanonicalGetProductsResponse, type CanonicalListCreativesRequest, type CanonicalListCreativesResponse, type CanonicalPreviewCreativeRequest, type CanonicalPreviewCreativeResponse, type CanonicalSyncCreativesRequest, type CanonicalUpdateMediaBuyRequest, type SyncCreativeFormatProjection } from '../v2/projection/creative-delivery.mjs';
|
|
22
|
+
import { type CanonicalCreateMediaBuyInput, type CanonicalCreativeResponse, type CanonicalGetProductsRequest, type CanonicalGetProductsResponse, type CanonicalListCreativesRequest, type CanonicalListCreativesResponse, type CanonicalPreviewCreativeRequest, type CanonicalPreviewCreativeResponse, type CanonicalSyncCreativesRequest, type CanonicalUpdateMediaBuyRequest, type CreativeFormatWireMode, type SyncCreativeFormatProjection } from '../v2/projection/creative-delivery.mjs';
|
|
23
23
|
import type { LegacyFormatConverter } from '../v2/projection/v1-to-v2.mjs';
|
|
24
24
|
import { type ProjectionCatalogSnapshot } from '../v2/projection/catalog-snapshot.mjs';
|
|
25
25
|
import type { CanonicalFormatLegacyResolver } from '../v2/projection/v2-to-v1.mjs';
|
|
@@ -927,7 +927,18 @@ export declare class SingleAgentClient {
|
|
|
927
927
|
* Projection-only options are ignored because this method preserves the caller's legacy wire payload.
|
|
928
928
|
*/
|
|
929
929
|
syncCreativesLegacy(params: MutatingRequestInput<SyncCreativesRequest>, inputHandler?: InputHandler, options?: SyncCreativesTaskOptions): Promise<TaskResult<SyncCreativesResponse>>;
|
|
930
|
-
|
|
930
|
+
/**
|
|
931
|
+
* Resolve the creative wire mode used by the canonical write methods without
|
|
932
|
+
* sending a mutation. Discovers capabilities and the current tool's input
|
|
933
|
+
* schema, or reuses fresh cached/primed evidence, with this client's wire pin.
|
|
934
|
+
*
|
|
935
|
+
* `unknown` preserves the conservative legacy projection for older peers
|
|
936
|
+
* whose capabilities and schema do not establish support. Projection still
|
|
937
|
+
* requires an unambiguous legacy reference for each creative in that case.
|
|
938
|
+
* Conflicting evidence and unproven support with a 3.2+ buyer pin throw
|
|
939
|
+
* `CreativeFormatCapabilityError`, just as they do during a write.
|
|
940
|
+
*/
|
|
941
|
+
resolveCreativeFormatWireMode(taskType: 'sync_creatives' | 'create_media_buy' | 'update_media_buy', options?: ReadRequestOptions): Promise<CreativeFormatWireMode>;
|
|
931
942
|
/** Validate malformed creative payloads before capability discovery can perform I/O. */
|
|
932
943
|
private validateBeforeCreativeCapabilityProbe;
|
|
933
944
|
/**
|
|
@@ -19,7 +19,7 @@ import type { ProductCache } from './product-cache';
|
|
|
19
19
|
import { type ResolveAccountOptions } from './account-resolution';
|
|
20
20
|
import { type BuyerPropertyPolicy, type ProductPropertyPolicyMode } from '../media-buy/property-policy';
|
|
21
21
|
import { type ResolveListOptions } from '../server/targeting-helpers';
|
|
22
|
-
import { type CanonicalCreateMediaBuyInput, type CanonicalCreativeResponse, type CanonicalGetProductsRequest, type CanonicalGetProductsResponse, type CanonicalListCreativesRequest, type CanonicalListCreativesResponse, type CanonicalPreviewCreativeRequest, type CanonicalPreviewCreativeResponse, type CanonicalSyncCreativesRequest, type CanonicalUpdateMediaBuyRequest, type SyncCreativeFormatProjection } from '../v2/projection/creative-delivery';
|
|
22
|
+
import { type CanonicalCreateMediaBuyInput, type CanonicalCreativeResponse, type CanonicalGetProductsRequest, type CanonicalGetProductsResponse, type CanonicalListCreativesRequest, type CanonicalListCreativesResponse, type CanonicalPreviewCreativeRequest, type CanonicalPreviewCreativeResponse, type CanonicalSyncCreativesRequest, type CanonicalUpdateMediaBuyRequest, type CreativeFormatWireMode, type SyncCreativeFormatProjection } from '../v2/projection/creative-delivery';
|
|
23
23
|
import type { LegacyFormatConverter } from '../v2/projection/v1-to-v2';
|
|
24
24
|
import { type ProjectionCatalogSnapshot } from '../v2/projection/catalog-snapshot';
|
|
25
25
|
import type { CanonicalFormatLegacyResolver } from '../v2/projection/v2-to-v1';
|
|
@@ -927,7 +927,18 @@ export declare class SingleAgentClient {
|
|
|
927
927
|
* Projection-only options are ignored because this method preserves the caller's legacy wire payload.
|
|
928
928
|
*/
|
|
929
929
|
syncCreativesLegacy(params: MutatingRequestInput<SyncCreativesRequest>, inputHandler?: InputHandler, options?: SyncCreativesTaskOptions): Promise<TaskResult<SyncCreativesResponse>>;
|
|
930
|
-
|
|
930
|
+
/**
|
|
931
|
+
* Resolve the creative wire mode used by the canonical write methods without
|
|
932
|
+
* sending a mutation. Discovers capabilities and the current tool's input
|
|
933
|
+
* schema, or reuses fresh cached/primed evidence, with this client's wire pin.
|
|
934
|
+
*
|
|
935
|
+
* `unknown` preserves the conservative legacy projection for older peers
|
|
936
|
+
* whose capabilities and schema do not establish support. Projection still
|
|
937
|
+
* requires an unambiguous legacy reference for each creative in that case.
|
|
938
|
+
* Conflicting evidence and unproven support with a 3.2+ buyer pin throw
|
|
939
|
+
* `CreativeFormatCapabilityError`, just as they do during a write.
|
|
940
|
+
*/
|
|
941
|
+
resolveCreativeFormatWireMode(taskType: 'sync_creatives' | 'create_media_buy' | 'update_media_buy', options?: ReadRequestOptions): Promise<CreativeFormatWireMode>;
|
|
931
942
|
/** Validate malformed creative payloads before capability discovery can perform I/O. */
|
|
932
943
|
private validateBeforeCreativeCapabilityProbe;
|
|
933
944
|
/**
|
|
@@ -4566,7 +4566,7 @@ Hint: this usually means agent_uri does not include the MCP endpoint path. The S
|
|
|
4566
4566
|
if (hasCreativeFormatData) {
|
|
4567
4567
|
this.validateBeforeCreativeCapabilityProbe("create_media_buy", params, taskOptions);
|
|
4568
4568
|
}
|
|
4569
|
-
const wireMode = hasCreativeFormatData ? this.resolveCreativeFormatWireMode("create_media_buy",
|
|
4569
|
+
const wireMode = hasCreativeFormatData ? await this.resolveCreativeFormatWireMode("create_media_buy", taskOptions) : "canonical";
|
|
4570
4570
|
const wireParams = params;
|
|
4571
4571
|
const result = await this.executeAndHandle(
|
|
4572
4572
|
"create_media_buy",
|
|
@@ -4648,7 +4648,7 @@ Hint: this usually means agent_uri does not include the MCP endpoint path. The S
|
|
|
4648
4648
|
if (hasCreativeFormatData) {
|
|
4649
4649
|
this.validateBeforeCreativeCapabilityProbe("update_media_buy", params, taskOptions);
|
|
4650
4650
|
}
|
|
4651
|
-
const wireMode = hasCreativeFormatData ? this.resolveCreativeFormatWireMode("update_media_buy",
|
|
4651
|
+
const wireMode = hasCreativeFormatData ? await this.resolveCreativeFormatWireMode("update_media_buy", taskOptions) : "canonical";
|
|
4652
4652
|
const result = await this.executeAndHandle(
|
|
4653
4653
|
"update_media_buy",
|
|
4654
4654
|
"onUpdateMediaBuyStatusChange",
|
|
@@ -4731,7 +4731,7 @@ Hint: this usually means agent_uri does not include the MCP endpoint path. The S
|
|
|
4731
4731
|
projectionCatalogs ?? this.config.projectionCatalogs
|
|
4732
4732
|
);
|
|
4733
4733
|
this.validateBeforeCreativeCapabilityProbe("sync_creatives", params, taskOptions);
|
|
4734
|
-
const wireMode = this.resolveCreativeFormatWireMode("sync_creatives",
|
|
4734
|
+
const wireMode = await this.resolveCreativeFormatWireMode("sync_creatives", taskOptions);
|
|
4735
4735
|
const configuredSelectorContainers = [
|
|
4736
4736
|
...creativeFormatProjection?.selectorContainers ?? []
|
|
4737
4737
|
];
|
|
@@ -4775,10 +4775,28 @@ Hint: this usually means agent_uri does not include the MCP endpoint path. The S
|
|
|
4775
4775
|
"onSyncCreativesStatusChange"
|
|
4776
4776
|
);
|
|
4777
4777
|
}
|
|
4778
|
-
|
|
4778
|
+
/**
|
|
4779
|
+
* Resolve the creative wire mode used by the canonical write methods without
|
|
4780
|
+
* sending a mutation. Discovers capabilities and the current tool's input
|
|
4781
|
+
* schema, or reuses fresh cached/primed evidence, with this client's wire pin.
|
|
4782
|
+
*
|
|
4783
|
+
* `unknown` preserves the conservative legacy projection for older peers
|
|
4784
|
+
* whose capabilities and schema do not establish support. Projection still
|
|
4785
|
+
* requires an unambiguous legacy reference for each creative in that case.
|
|
4786
|
+
* Conflicting evidence and unproven support with a 3.2+ buyer pin throw
|
|
4787
|
+
* `CreativeFormatCapabilityError`, just as they do during a write.
|
|
4788
|
+
*/
|
|
4789
|
+
async resolveCreativeFormatWireMode(taskType, options) {
|
|
4790
|
+
const discoveryContext = {};
|
|
4791
|
+
const capabilities = await this.getCapabilities({
|
|
4792
|
+
...options,
|
|
4793
|
+
[CAPABILITY_DISCOVERY_CONTEXT]: discoveryContext
|
|
4794
|
+
});
|
|
4795
|
+
const usesScopedFetch = (0, import_protocols.normalizeTransportOptions)(options?.transport ?? this.config.transport)?.trustedFetchFn !== void 0;
|
|
4796
|
+
const toolSchemas = discoveryContext.toolSchemas ?? (usesScopedFetch ? void 0 : this.cachedToolSchemas);
|
|
4779
4797
|
const wireRelease = this.config.wireAdcpVersion ?? this.resolvedAdcpVersion;
|
|
4780
4798
|
const declared = (0, import_creative_delivery.resolveCreativeFormatWireMode)(capabilities, wireRelease);
|
|
4781
|
-
const schema = creativeSchemaSupport(
|
|
4799
|
+
const schema = creativeSchemaSupport(toolSchemas?.get(taskType));
|
|
4782
4800
|
if (declared !== "unknown" && schema !== "unknown" && declared !== schema) {
|
|
4783
4801
|
throw new import_creative_delivery.CreativeFormatCapabilityError(
|
|
4784
4802
|
`Seller capability and ${taskType} input schema disagree about canonical creative support`
|
|
@@ -4636,7 +4636,7 @@ Hint: this usually means agent_uri does not include the MCP endpoint path. The S
|
|
|
4636
4636
|
if (hasCreativeFormatData) {
|
|
4637
4637
|
this.validateBeforeCreativeCapabilityProbe("create_media_buy", params, taskOptions);
|
|
4638
4638
|
}
|
|
4639
|
-
const wireMode = hasCreativeFormatData ? this.resolveCreativeFormatWireMode("create_media_buy",
|
|
4639
|
+
const wireMode = hasCreativeFormatData ? await this.resolveCreativeFormatWireMode("create_media_buy", taskOptions) : "canonical";
|
|
4640
4640
|
const wireParams = params;
|
|
4641
4641
|
const result = await this.executeAndHandle(
|
|
4642
4642
|
"create_media_buy",
|
|
@@ -4718,7 +4718,7 @@ Hint: this usually means agent_uri does not include the MCP endpoint path. The S
|
|
|
4718
4718
|
if (hasCreativeFormatData) {
|
|
4719
4719
|
this.validateBeforeCreativeCapabilityProbe("update_media_buy", params, taskOptions);
|
|
4720
4720
|
}
|
|
4721
|
-
const wireMode = hasCreativeFormatData ? this.resolveCreativeFormatWireMode("update_media_buy",
|
|
4721
|
+
const wireMode = hasCreativeFormatData ? await this.resolveCreativeFormatWireMode("update_media_buy", taskOptions) : "canonical";
|
|
4722
4722
|
const result = await this.executeAndHandle(
|
|
4723
4723
|
"update_media_buy",
|
|
4724
4724
|
"onUpdateMediaBuyStatusChange",
|
|
@@ -4801,7 +4801,7 @@ Hint: this usually means agent_uri does not include the MCP endpoint path. The S
|
|
|
4801
4801
|
projectionCatalogs ?? this.config.projectionCatalogs
|
|
4802
4802
|
);
|
|
4803
4803
|
this.validateBeforeCreativeCapabilityProbe("sync_creatives", params, taskOptions);
|
|
4804
|
-
const wireMode = this.resolveCreativeFormatWireMode("sync_creatives",
|
|
4804
|
+
const wireMode = await this.resolveCreativeFormatWireMode("sync_creatives", taskOptions);
|
|
4805
4805
|
const configuredSelectorContainers = [
|
|
4806
4806
|
...creativeFormatProjection?.selectorContainers ?? []
|
|
4807
4807
|
];
|
|
@@ -4845,10 +4845,28 @@ Hint: this usually means agent_uri does not include the MCP endpoint path. The S
|
|
|
4845
4845
|
"onSyncCreativesStatusChange"
|
|
4846
4846
|
);
|
|
4847
4847
|
}
|
|
4848
|
-
|
|
4848
|
+
/**
|
|
4849
|
+
* Resolve the creative wire mode used by the canonical write methods without
|
|
4850
|
+
* sending a mutation. Discovers capabilities and the current tool's input
|
|
4851
|
+
* schema, or reuses fresh cached/primed evidence, with this client's wire pin.
|
|
4852
|
+
*
|
|
4853
|
+
* `unknown` preserves the conservative legacy projection for older peers
|
|
4854
|
+
* whose capabilities and schema do not establish support. Projection still
|
|
4855
|
+
* requires an unambiguous legacy reference for each creative in that case.
|
|
4856
|
+
* Conflicting evidence and unproven support with a 3.2+ buyer pin throw
|
|
4857
|
+
* `CreativeFormatCapabilityError`, just as they do during a write.
|
|
4858
|
+
*/
|
|
4859
|
+
async resolveCreativeFormatWireMode(taskType, options) {
|
|
4860
|
+
const discoveryContext = {};
|
|
4861
|
+
const capabilities = await this.getCapabilities({
|
|
4862
|
+
...options,
|
|
4863
|
+
[CAPABILITY_DISCOVERY_CONTEXT]: discoveryContext
|
|
4864
|
+
});
|
|
4865
|
+
const usesScopedFetch = normalizeTransportOptions(options?.transport ?? this.config.transport)?.trustedFetchFn !== void 0;
|
|
4866
|
+
const toolSchemas = discoveryContext.toolSchemas ?? (usesScopedFetch ? void 0 : this.cachedToolSchemas);
|
|
4849
4867
|
const wireRelease = this.config.wireAdcpVersion ?? this.resolvedAdcpVersion;
|
|
4850
4868
|
const declared = resolveCreativeFormatWireMode(capabilities, wireRelease);
|
|
4851
|
-
const schema = creativeSchemaSupport(
|
|
4869
|
+
const schema = creativeSchemaSupport(toolSchemas?.get(taskType));
|
|
4852
4870
|
if (declared !== "unknown" && schema !== "unknown" && declared !== schema) {
|
|
4853
4871
|
throw new CreativeFormatCapabilityError(
|
|
4854
4872
|
`Seller capability and ${taskType} input schema disagree about canonical creative support`
|
package/dist/lib/index.d.mts
CHANGED
|
@@ -186,7 +186,7 @@ export { getAuthToken, createAdCPHeaders, createMCPAuthHeaders, createAuthentica
|
|
|
186
186
|
export { parseWWWAuthenticate, decodeAccessTokenClaims, validateTokenAudience, type WWWAuthenticateChallenge, type DecodedJWTHeader, type DecodedJWTClaims, type DecodedAccessToken, type TokenAudienceResult, InvalidTokenError, InsufficientScopeError, } from './auth/oauth/index.mjs';
|
|
187
187
|
export { runAuthDiagnosis, AUTH_DIAGNOSIS_SCHEMA_VERSION, type DiagnoseOptions, type HttpCapture as DiagnosisHttpCapture, type DiagnosisStep, type Hypothesis as DiagnosisHypothesis, type HypothesisVerdict as DiagnosisHypothesisVerdict, type AuthDiagnosisReport, } from './auth/oauth/index.mjs';
|
|
188
188
|
export { NeedsAuthorizationError, discoverAuthorizationRequirements, hasValidatedMcpAuthorizationRequirements, createFileOAuthStorage, bindAgentStorage, getAgentStorage, unbindAgentStorage, type AuthorizationRequirements, type DiscoverAuthorizationOptions, type FileOAuthStorageOptions, } from './auth/oauth/index.mjs';
|
|
189
|
-
export { exchangeClientCredentials, ensureClientCredentialsTokens, ClientCredentialsExchangeError, MissingEnvSecretError, resolveSecret, isEnvSecretReference, toEnvSecretReference, extractEnvSecretName, type ExchangeClientCredentialsOptions, type EnsureClientCredentialsOptions, type AgentOAuthClientCredentials, } from './auth/oauth/index.mjs';
|
|
189
|
+
export { exchangeClientCredentials, ensureClientCredentialsTokens, ClientCredentialsExchangeError, MissingEnvSecretError, resolveSecret, isEnvSecretReference, toEnvSecretReference, extractEnvSecretName, type ExchangeClientCredentialsOptions, type EnsureClientCredentialsOptions, type AgentOAuthClientCredentials, AgentOAuthClientCredentialsSchema, } from './auth/oauth/index.mjs';
|
|
190
190
|
export { validateAgentUrl, validateAdCPResponse, getExpectedSchema, handleAdCPResponse } from './validation/index.mjs';
|
|
191
191
|
export { ProtocolClient, callMCPTool, callA2ATool, createA2AClientFromCardUrl, createMCPClient, createA2AClient, closeMCPConnections, closeOAuthConnections, bundleSupportsAdcpVersionField, BODY_SNIPPET_TIMEOUT_MS, OBSERVER_FLUSH_TIMEOUT_MS, sanitizeTransportHeaders, sanitizeTransportUrl, } from './protocols/index.mjs';
|
|
192
192
|
export { toReleasePrecisionWire, validateAdcpVersionWire } from './validation/schema-loader.mjs';
|
|
@@ -214,7 +214,7 @@ export { FormatAsset, imageAssetSlot, videoAssetSlot, audioAssetSlot, textAssetS
|
|
|
214
214
|
export { Render, urlRender, htmlRender, bothRender } from './utils/render-builders.mjs';
|
|
215
215
|
export { FormatRender, displayRender, parameterizedRender, templateRender, type DimensionsRender, type ParameterizedRender, type RenderItem, } from './utils/format-render-builders.mjs';
|
|
216
216
|
export { CanonicalFormat, canonicalFormatDeclaration, type CanonicalFormatDeclaration, type CanonicalFormatDeclaration as Format, type CanonicalFormatDeclarationFields, type CanonicalFormatKind, type CanonicalFormatParams, type ProductCardDetailedFields, type ProductCardFields, } from './v2/projection/index.mjs';
|
|
217
|
-
export { toCanonicalFormatOptionsWithRoutes, toAdditiveCanonicalProduct, withAdditiveCanonicalFormatOptions, toCanonicalOnlyProduct, toCanonicalOnlyResponse, packageRefsForFormatOptions, FormatOptionRefsLookupError, CreativeFormatCapabilityError, CreativeFormatProjectionError, type LegacyFormatConversionContext, type LegacyFormatConverter, type LegacyFormatResolutionContext, type LegacyFormatResolver, legacyFormatConverterFromCatalogSnapshots, canonicalFormatLegacyResolverFromCatalogSnapshots, canonicalFormatLegacyResolverFromRoutes, legacyRoutesForProduct, projectionAdaptersFromCatalogSnapshots, type ProjectionCatalogAdapters, type ProjectionCatalogSnapshot, type ProjectionCatalogSource, type CanonicalFormatLegacyResolver, type CanonicalFormatLegacyResolutionContext, type CanonicalFormatLegacyRoute, type AdditiveCanonicalProduct, type CanonicalOnlyProduct, type CanonicalCreativeAsset, type CanonicalCreativeAsset as CreativeAsset, type CanonicalSyncCreativeAsset, type CanonicalCreateMediaBuyInput, type CanonicalCreateMediaBuyRequest, type CanonicalCreateMediaBuyRequest as CreateMediaBuyRequest, type CanonicalCreateMediaBuyResponse, type CanonicalCreateMediaBuyResponse as CreateMediaBuyResponse, type CanonicalCreativeResponse, type CanonicalCreativeFilters, type CanonicalCreativeFilters as CreativeFilters, type CanonicalGetCreativeDeliveryResponse, type CanonicalGetCreativeDeliveryResponse as GetCreativeDeliveryResponse, type CanonicalGetMediaBuyDeliveryResponse, type CanonicalGetMediaBuyDeliveryResponse as GetMediaBuyDeliveryResponse, type CanonicalGetMediaBuysResponse, type CanonicalGetMediaBuysResponse as GetMediaBuysResponse, type CanonicalGetProductsResponse as GetProductsResponse, type CanonicalGetProductsRequest, type CanonicalGetProductsRequest as GetProductsRequest, type CanonicalListCreativesRequest, type CanonicalListCreativesRequest as ListCreativesRequest, type CanonicalListCreativesResponse, type CanonicalListCreativesResponse as ListCreativesResponse, type CanonicalListedCreative, type CanonicalPackageRequest, type CanonicalPackageRequest as PackageRequest, type CanonicalPackageUpdate, type CanonicalPackageUpdate as PackageUpdate, type CanonicalPackage, type CanonicalPackage as Package, type CanonicalPlacement, type CanonicalPlacement as Placement, type CanonicalPreviewCreativeRequest, type CanonicalPreviewCreativeRequest as PreviewCreativeRequest, type CanonicalPreviewCreativeResponse, type CanonicalPreviewCreativeResponse as PreviewCreativeResponse, type CanonicalProduct, type CanonicalProduct as Product, type CanonicalProjectedCreative, type CanonicalSyncCreativesRequest, type CanonicalSyncCreativesRequest as SyncCreativesRequest, type CanonicalSyncCreativesResponse, type CanonicalSyncCreativesResponse as SyncCreativesResponse, type CanonicalUpdateMediaBuyRequest, type CanonicalUpdateMediaBuyRequest as UpdateMediaBuyRequest, type CanonicalUpdateMediaBuyResponse, type CanonicalUpdateMediaBuyResponse as UpdateMediaBuyResponse, type LegacyCreativeAsset, type CanonicalCreativeFormatSelectorContainer, type PackageFormatRefs, type ProjectionDiagnostic, type SyncCreativeFormatProjection, } from './v2/projection/index.mjs';
|
|
217
|
+
export { toCanonicalFormatOptionsWithRoutes, toAdditiveCanonicalProduct, withAdditiveCanonicalFormatOptions, toCanonicalOnlyProduct, toCanonicalOnlyResponse, packageRefsForFormatOptions, FormatOptionRefsLookupError, CreativeFormatCapabilityError, CreativeFormatProjectionError, type CreativeFormatWireMode, type LegacyFormatConversionContext, type LegacyFormatConverter, type LegacyFormatResolutionContext, type LegacyFormatResolver, legacyFormatConverterFromCatalogSnapshots, canonicalFormatLegacyResolverFromCatalogSnapshots, canonicalFormatLegacyResolverFromRoutes, legacyRoutesForProduct, projectionAdaptersFromCatalogSnapshots, type ProjectionCatalogAdapters, type ProjectionCatalogSnapshot, type ProjectionCatalogSource, type CanonicalFormatLegacyResolver, type CanonicalFormatLegacyResolutionContext, type CanonicalFormatLegacyRoute, type AdditiveCanonicalProduct, type CanonicalOnlyProduct, type CanonicalCreativeAsset, type CanonicalCreativeAsset as CreativeAsset, type CanonicalSyncCreativeAsset, type CanonicalCreateMediaBuyInput, type CanonicalCreateMediaBuyRequest, type CanonicalCreateMediaBuyRequest as CreateMediaBuyRequest, type CanonicalCreateMediaBuyResponse, type CanonicalCreateMediaBuyResponse as CreateMediaBuyResponse, type CanonicalCreativeResponse, type CanonicalCreativeFilters, type CanonicalCreativeFilters as CreativeFilters, type CanonicalGetCreativeDeliveryResponse, type CanonicalGetCreativeDeliveryResponse as GetCreativeDeliveryResponse, type CanonicalGetMediaBuyDeliveryResponse, type CanonicalGetMediaBuyDeliveryResponse as GetMediaBuyDeliveryResponse, type CanonicalGetMediaBuysResponse, type CanonicalGetMediaBuysResponse as GetMediaBuysResponse, type CanonicalGetProductsResponse as GetProductsResponse, type CanonicalGetProductsRequest, type CanonicalGetProductsRequest as GetProductsRequest, type CanonicalListCreativesRequest, type CanonicalListCreativesRequest as ListCreativesRequest, type CanonicalListCreativesResponse, type CanonicalListCreativesResponse as ListCreativesResponse, type CanonicalListedCreative, type CanonicalPackageRequest, type CanonicalPackageRequest as PackageRequest, type CanonicalPackageUpdate, type CanonicalPackageUpdate as PackageUpdate, type CanonicalPackage, type CanonicalPackage as Package, type CanonicalPlacement, type CanonicalPlacement as Placement, type CanonicalPreviewCreativeRequest, type CanonicalPreviewCreativeRequest as PreviewCreativeRequest, type CanonicalPreviewCreativeResponse, type CanonicalPreviewCreativeResponse as PreviewCreativeResponse, type CanonicalProduct, type CanonicalProduct as Product, type CanonicalProjectedCreative, type CanonicalSyncCreativesRequest, type CanonicalSyncCreativesRequest as SyncCreativesRequest, type CanonicalSyncCreativesResponse, type CanonicalSyncCreativesResponse as SyncCreativesResponse, type CanonicalUpdateMediaBuyRequest, type CanonicalUpdateMediaBuyRequest as UpdateMediaBuyRequest, type CanonicalUpdateMediaBuyResponse, type CanonicalUpdateMediaBuyResponse as UpdateMediaBuyResponse, type LegacyCreativeAsset, type CanonicalCreativeFormatSelectorContainer, type PackageFormatRefs, type ProjectionDiagnostic, type SyncCreativeFormatProjection, } from './v2/projection/index.mjs';
|
|
218
218
|
export { activationKey, segmentIdActivationKey, keyValueActivationKey } from './utils/activation-key-builders.mjs';
|
|
219
219
|
export { signalId, catalogSignalId, agentSignalId, getSignalId, getSignalIssuer } from './utils/signal-id-builders.mjs';
|
|
220
220
|
export { buildActivateSignalRequest, getSignalActivationId, getSignalPricingOptionIds, normalizeDiscoveredSignal, } from './utils/signal-discovery-helpers.mjs';
|
package/dist/lib/index.d.ts
CHANGED
|
@@ -186,7 +186,7 @@ export { getAuthToken, createAdCPHeaders, createMCPAuthHeaders, createAuthentica
|
|
|
186
186
|
export { parseWWWAuthenticate, decodeAccessTokenClaims, validateTokenAudience, type WWWAuthenticateChallenge, type DecodedJWTHeader, type DecodedJWTClaims, type DecodedAccessToken, type TokenAudienceResult, InvalidTokenError, InsufficientScopeError, } from './auth/oauth';
|
|
187
187
|
export { runAuthDiagnosis, AUTH_DIAGNOSIS_SCHEMA_VERSION, type DiagnoseOptions, type HttpCapture as DiagnosisHttpCapture, type DiagnosisStep, type Hypothesis as DiagnosisHypothesis, type HypothesisVerdict as DiagnosisHypothesisVerdict, type AuthDiagnosisReport, } from './auth/oauth';
|
|
188
188
|
export { NeedsAuthorizationError, discoverAuthorizationRequirements, hasValidatedMcpAuthorizationRequirements, createFileOAuthStorage, bindAgentStorage, getAgentStorage, unbindAgentStorage, type AuthorizationRequirements, type DiscoverAuthorizationOptions, type FileOAuthStorageOptions, } from './auth/oauth';
|
|
189
|
-
export { exchangeClientCredentials, ensureClientCredentialsTokens, ClientCredentialsExchangeError, MissingEnvSecretError, resolveSecret, isEnvSecretReference, toEnvSecretReference, extractEnvSecretName, type ExchangeClientCredentialsOptions, type EnsureClientCredentialsOptions, type AgentOAuthClientCredentials, } from './auth/oauth';
|
|
189
|
+
export { exchangeClientCredentials, ensureClientCredentialsTokens, ClientCredentialsExchangeError, MissingEnvSecretError, resolveSecret, isEnvSecretReference, toEnvSecretReference, extractEnvSecretName, type ExchangeClientCredentialsOptions, type EnsureClientCredentialsOptions, type AgentOAuthClientCredentials, AgentOAuthClientCredentialsSchema, } from './auth/oauth';
|
|
190
190
|
export { validateAgentUrl, validateAdCPResponse, getExpectedSchema, handleAdCPResponse } from './validation';
|
|
191
191
|
export { ProtocolClient, callMCPTool, callA2ATool, createA2AClientFromCardUrl, createMCPClient, createA2AClient, closeMCPConnections, closeOAuthConnections, bundleSupportsAdcpVersionField, BODY_SNIPPET_TIMEOUT_MS, OBSERVER_FLUSH_TIMEOUT_MS, sanitizeTransportHeaders, sanitizeTransportUrl, } from './protocols';
|
|
192
192
|
export { toReleasePrecisionWire, validateAdcpVersionWire } from './validation/schema-loader';
|
|
@@ -214,7 +214,7 @@ export { FormatAsset, imageAssetSlot, videoAssetSlot, audioAssetSlot, textAssetS
|
|
|
214
214
|
export { Render, urlRender, htmlRender, bothRender } from './utils/render-builders';
|
|
215
215
|
export { FormatRender, displayRender, parameterizedRender, templateRender, type DimensionsRender, type ParameterizedRender, type RenderItem, } from './utils/format-render-builders';
|
|
216
216
|
export { CanonicalFormat, canonicalFormatDeclaration, type CanonicalFormatDeclaration, type CanonicalFormatDeclaration as Format, type CanonicalFormatDeclarationFields, type CanonicalFormatKind, type CanonicalFormatParams, type ProductCardDetailedFields, type ProductCardFields, } from './v2/projection';
|
|
217
|
-
export { toCanonicalFormatOptionsWithRoutes, toAdditiveCanonicalProduct, withAdditiveCanonicalFormatOptions, toCanonicalOnlyProduct, toCanonicalOnlyResponse, packageRefsForFormatOptions, FormatOptionRefsLookupError, CreativeFormatCapabilityError, CreativeFormatProjectionError, type LegacyFormatConversionContext, type LegacyFormatConverter, type LegacyFormatResolutionContext, type LegacyFormatResolver, legacyFormatConverterFromCatalogSnapshots, canonicalFormatLegacyResolverFromCatalogSnapshots, canonicalFormatLegacyResolverFromRoutes, legacyRoutesForProduct, projectionAdaptersFromCatalogSnapshots, type ProjectionCatalogAdapters, type ProjectionCatalogSnapshot, type ProjectionCatalogSource, type CanonicalFormatLegacyResolver, type CanonicalFormatLegacyResolutionContext, type CanonicalFormatLegacyRoute, type AdditiveCanonicalProduct, type CanonicalOnlyProduct, type CanonicalCreativeAsset, type CanonicalCreativeAsset as CreativeAsset, type CanonicalSyncCreativeAsset, type CanonicalCreateMediaBuyInput, type CanonicalCreateMediaBuyRequest, type CanonicalCreateMediaBuyRequest as CreateMediaBuyRequest, type CanonicalCreateMediaBuyResponse, type CanonicalCreateMediaBuyResponse as CreateMediaBuyResponse, type CanonicalCreativeResponse, type CanonicalCreativeFilters, type CanonicalCreativeFilters as CreativeFilters, type CanonicalGetCreativeDeliveryResponse, type CanonicalGetCreativeDeliveryResponse as GetCreativeDeliveryResponse, type CanonicalGetMediaBuyDeliveryResponse, type CanonicalGetMediaBuyDeliveryResponse as GetMediaBuyDeliveryResponse, type CanonicalGetMediaBuysResponse, type CanonicalGetMediaBuysResponse as GetMediaBuysResponse, type CanonicalGetProductsResponse as GetProductsResponse, type CanonicalGetProductsRequest, type CanonicalGetProductsRequest as GetProductsRequest, type CanonicalListCreativesRequest, type CanonicalListCreativesRequest as ListCreativesRequest, type CanonicalListCreativesResponse, type CanonicalListCreativesResponse as ListCreativesResponse, type CanonicalListedCreative, type CanonicalPackageRequest, type CanonicalPackageRequest as PackageRequest, type CanonicalPackageUpdate, type CanonicalPackageUpdate as PackageUpdate, type CanonicalPackage, type CanonicalPackage as Package, type CanonicalPlacement, type CanonicalPlacement as Placement, type CanonicalPreviewCreativeRequest, type CanonicalPreviewCreativeRequest as PreviewCreativeRequest, type CanonicalPreviewCreativeResponse, type CanonicalPreviewCreativeResponse as PreviewCreativeResponse, type CanonicalProduct, type CanonicalProduct as Product, type CanonicalProjectedCreative, type CanonicalSyncCreativesRequest, type CanonicalSyncCreativesRequest as SyncCreativesRequest, type CanonicalSyncCreativesResponse, type CanonicalSyncCreativesResponse as SyncCreativesResponse, type CanonicalUpdateMediaBuyRequest, type CanonicalUpdateMediaBuyRequest as UpdateMediaBuyRequest, type CanonicalUpdateMediaBuyResponse, type CanonicalUpdateMediaBuyResponse as UpdateMediaBuyResponse, type LegacyCreativeAsset, type CanonicalCreativeFormatSelectorContainer, type PackageFormatRefs, type ProjectionDiagnostic, type SyncCreativeFormatProjection, } from './v2/projection';
|
|
217
|
+
export { toCanonicalFormatOptionsWithRoutes, toAdditiveCanonicalProduct, withAdditiveCanonicalFormatOptions, toCanonicalOnlyProduct, toCanonicalOnlyResponse, packageRefsForFormatOptions, FormatOptionRefsLookupError, CreativeFormatCapabilityError, CreativeFormatProjectionError, type CreativeFormatWireMode, type LegacyFormatConversionContext, type LegacyFormatConverter, type LegacyFormatResolutionContext, type LegacyFormatResolver, legacyFormatConverterFromCatalogSnapshots, canonicalFormatLegacyResolverFromCatalogSnapshots, canonicalFormatLegacyResolverFromRoutes, legacyRoutesForProduct, projectionAdaptersFromCatalogSnapshots, type ProjectionCatalogAdapters, type ProjectionCatalogSnapshot, type ProjectionCatalogSource, type CanonicalFormatLegacyResolver, type CanonicalFormatLegacyResolutionContext, type CanonicalFormatLegacyRoute, type AdditiveCanonicalProduct, type CanonicalOnlyProduct, type CanonicalCreativeAsset, type CanonicalCreativeAsset as CreativeAsset, type CanonicalSyncCreativeAsset, type CanonicalCreateMediaBuyInput, type CanonicalCreateMediaBuyRequest, type CanonicalCreateMediaBuyRequest as CreateMediaBuyRequest, type CanonicalCreateMediaBuyResponse, type CanonicalCreateMediaBuyResponse as CreateMediaBuyResponse, type CanonicalCreativeResponse, type CanonicalCreativeFilters, type CanonicalCreativeFilters as CreativeFilters, type CanonicalGetCreativeDeliveryResponse, type CanonicalGetCreativeDeliveryResponse as GetCreativeDeliveryResponse, type CanonicalGetMediaBuyDeliveryResponse, type CanonicalGetMediaBuyDeliveryResponse as GetMediaBuyDeliveryResponse, type CanonicalGetMediaBuysResponse, type CanonicalGetMediaBuysResponse as GetMediaBuysResponse, type CanonicalGetProductsResponse as GetProductsResponse, type CanonicalGetProductsRequest, type CanonicalGetProductsRequest as GetProductsRequest, type CanonicalListCreativesRequest, type CanonicalListCreativesRequest as ListCreativesRequest, type CanonicalListCreativesResponse, type CanonicalListCreativesResponse as ListCreativesResponse, type CanonicalListedCreative, type CanonicalPackageRequest, type CanonicalPackageRequest as PackageRequest, type CanonicalPackageUpdate, type CanonicalPackageUpdate as PackageUpdate, type CanonicalPackage, type CanonicalPackage as Package, type CanonicalPlacement, type CanonicalPlacement as Placement, type CanonicalPreviewCreativeRequest, type CanonicalPreviewCreativeRequest as PreviewCreativeRequest, type CanonicalPreviewCreativeResponse, type CanonicalPreviewCreativeResponse as PreviewCreativeResponse, type CanonicalProduct, type CanonicalProduct as Product, type CanonicalProjectedCreative, type CanonicalSyncCreativesRequest, type CanonicalSyncCreativesRequest as SyncCreativesRequest, type CanonicalSyncCreativesResponse, type CanonicalSyncCreativesResponse as SyncCreativesResponse, type CanonicalUpdateMediaBuyRequest, type CanonicalUpdateMediaBuyRequest as UpdateMediaBuyRequest, type CanonicalUpdateMediaBuyResponse, type CanonicalUpdateMediaBuyResponse as UpdateMediaBuyResponse, type LegacyCreativeAsset, type CanonicalCreativeFormatSelectorContainer, type PackageFormatRefs, type ProjectionDiagnostic, type SyncCreativeFormatProjection, } from './v2/projection';
|
|
218
218
|
export { activationKey, segmentIdActivationKey, keyValueActivationKey } from './utils/activation-key-builders';
|
|
219
219
|
export { signalId, catalogSignalId, agentSignalId, getSignalId, getSignalIssuer } from './utils/signal-id-builders';
|
|
220
220
|
export { buildActivateSignalRequest, getSignalActivationId, getSignalPricingOptionIds, normalizeDiscoveredSignal, } from './utils/signal-discovery-helpers';
|
package/dist/lib/index.js
CHANGED
|
@@ -48,6 +48,7 @@ __export(index_exports, {
|
|
|
48
48
|
AdagentsJsonSchema: () => import_wellknown_schemas.AdagentsJsonSchema,
|
|
49
49
|
AgentClient: () => import_AgentClient.AgentClient,
|
|
50
50
|
AgentNotFoundError: () => import_errors.AgentNotFoundError,
|
|
51
|
+
AgentOAuthClientCredentialsSchema: () => import_oauth4.AgentOAuthClientCredentialsSchema,
|
|
51
52
|
Asset: () => import_asset_builders.Asset,
|
|
52
53
|
AsyncHandler: () => import_AsyncHandler.AsyncHandler,
|
|
53
54
|
AuthenticationCredentialsRejectedError: () => import_errors.AuthenticationCredentialsRejectedError,
|
|
@@ -888,6 +889,7 @@ function createAdCPClientFromEnv() {
|
|
|
888
889
|
AdagentsJsonSchema,
|
|
889
890
|
AgentClient,
|
|
890
891
|
AgentNotFoundError,
|
|
892
|
+
AgentOAuthClientCredentialsSchema,
|
|
891
893
|
Asset,
|
|
892
894
|
AsyncHandler,
|
|
893
895
|
AuthenticationCredentialsRejectedError,
|
package/dist/lib/index.mjs
CHANGED
|
@@ -445,7 +445,8 @@ import {
|
|
|
445
445
|
resolveSecret,
|
|
446
446
|
isEnvSecretReference,
|
|
447
447
|
toEnvSecretReference,
|
|
448
|
-
extractEnvSecretName
|
|
448
|
+
extractEnvSecretName,
|
|
449
|
+
AgentOAuthClientCredentialsSchema
|
|
449
450
|
} from "./auth/oauth/index.mjs";
|
|
450
451
|
import { validateAgentUrl, validateAdCPResponse, getExpectedSchema, handleAdCPResponse } from "./validation/index.mjs";
|
|
451
452
|
import {
|
|
@@ -847,6 +848,7 @@ export {
|
|
|
847
848
|
AdagentsJsonSchema,
|
|
848
849
|
AgentClient,
|
|
849
850
|
AgentNotFoundError,
|
|
851
|
+
AgentOAuthClientCredentialsSchema,
|
|
850
852
|
Asset,
|
|
851
853
|
AsyncHandler,
|
|
852
854
|
AuthenticationCredentialsRejectedError,
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { Storage } from '@google-cloud/storage';
|
|
2
|
+
import type { ExpectedReportingPeriod } from '../reconciliation.mjs';
|
|
3
|
+
import type { ReportingManagedDeliveryAdapterV1, ReportingManagedDeliveryStore } from '../ledger/managed.mjs';
|
|
4
|
+
import type { ReportingLedgerStore } from '../ledger/types.mjs';
|
|
5
|
+
import { type ReportingObjectWriteAuthorityStoreV1 } from '../ledger/object-writes.mjs';
|
|
6
|
+
import { type GcsReportingReaderOptionsV1 } from './reader.mjs';
|
|
7
|
+
type DeliveryInput = Parameters<ReportingManagedDeliveryAdapterV1['deliver']>[0];
|
|
8
|
+
export interface CreateGcsReportingManagedDeliveryAdapterOptionsV1 {
|
|
9
|
+
storage: Storage;
|
|
10
|
+
coreStore: ReportingLedgerStore;
|
|
11
|
+
store: ReportingManagedDeliveryStore & ReportingObjectWriteAuthorityStoreV1;
|
|
12
|
+
bucket: string;
|
|
13
|
+
namespace: string;
|
|
14
|
+
/** Bucket was dedicated and safe before any reporting bytes existed; its policy remains host-controlled. */
|
|
15
|
+
acknowledgeDedicatedFreshBucket: true;
|
|
16
|
+
/** Independently selected contract from authenticated saved host configuration, not returned producer evidence. */
|
|
17
|
+
resolveExpectedPeriod(input: DeliveryInput, context: {
|
|
18
|
+
signal: AbortSignal;
|
|
19
|
+
}): Promise<ExpectedReportingPeriod>;
|
|
20
|
+
/** Exact saved private-contract scope, with principal and bucket/prefix ownership checks. */
|
|
21
|
+
resolveContractReader(input: DeliveryInput, context: {
|
|
22
|
+
signal: AbortSignal;
|
|
23
|
+
}): Promise<GcsReportingReaderOptionsV1>;
|
|
24
|
+
operationDeadlineMilliseconds?: number;
|
|
25
|
+
minimumResourceRetentionDays?: number;
|
|
26
|
+
}
|
|
27
|
+
/** Complete file-transfer adapter. Availability and cleanup lease commits remain with the managed runtime. */
|
|
28
|
+
export declare function createGcsReportingManagedDeliveryAdapterV1(options: CreateGcsReportingManagedDeliveryAdapterOptionsV1, context?: {
|
|
29
|
+
signal?: AbortSignal;
|
|
30
|
+
}): Promise<ReportingManagedDeliveryAdapterV1>;
|
|
31
|
+
export {};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { Storage } from '@google-cloud/storage';
|
|
2
|
+
import type { ExpectedReportingPeriod } from '../reconciliation';
|
|
3
|
+
import type { ReportingManagedDeliveryAdapterV1, ReportingManagedDeliveryStore } from '../ledger/managed';
|
|
4
|
+
import type { ReportingLedgerStore } from '../ledger/types';
|
|
5
|
+
import { type ReportingObjectWriteAuthorityStoreV1 } from '../ledger/object-writes';
|
|
6
|
+
import { type GcsReportingReaderOptionsV1 } from './reader';
|
|
7
|
+
type DeliveryInput = Parameters<ReportingManagedDeliveryAdapterV1['deliver']>[0];
|
|
8
|
+
export interface CreateGcsReportingManagedDeliveryAdapterOptionsV1 {
|
|
9
|
+
storage: Storage;
|
|
10
|
+
coreStore: ReportingLedgerStore;
|
|
11
|
+
store: ReportingManagedDeliveryStore & ReportingObjectWriteAuthorityStoreV1;
|
|
12
|
+
bucket: string;
|
|
13
|
+
namespace: string;
|
|
14
|
+
/** Bucket was dedicated and safe before any reporting bytes existed; its policy remains host-controlled. */
|
|
15
|
+
acknowledgeDedicatedFreshBucket: true;
|
|
16
|
+
/** Independently selected contract from authenticated saved host configuration, not returned producer evidence. */
|
|
17
|
+
resolveExpectedPeriod(input: DeliveryInput, context: {
|
|
18
|
+
signal: AbortSignal;
|
|
19
|
+
}): Promise<ExpectedReportingPeriod>;
|
|
20
|
+
/** Exact saved private-contract scope, with principal and bucket/prefix ownership checks. */
|
|
21
|
+
resolveContractReader(input: DeliveryInput, context: {
|
|
22
|
+
signal: AbortSignal;
|
|
23
|
+
}): Promise<GcsReportingReaderOptionsV1>;
|
|
24
|
+
operationDeadlineMilliseconds?: number;
|
|
25
|
+
minimumResourceRetentionDays?: number;
|
|
26
|
+
}
|
|
27
|
+
/** Complete file-transfer adapter. Availability and cleanup lease commits remain with the managed runtime. */
|
|
28
|
+
export declare function createGcsReportingManagedDeliveryAdapterV1(options: CreateGcsReportingManagedDeliveryAdapterOptionsV1, context?: {
|
|
29
|
+
signal?: AbortSignal;
|
|
30
|
+
}): Promise<ReportingManagedDeliveryAdapterV1>;
|
|
31
|
+
export {};
|