@adcp/sdk 15.5.0 → 15.6.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/README.md +15 -0
- package/dist/lib/auth/oauth/index.d.mts +1 -0
- package/dist/lib/auth/oauth/index.d.ts +1 -0
- package/dist/lib/auth/oauth/index.js +5 -0
- package/dist/lib/auth/oauth/index.mjs +3 -0
- package/dist/lib/auth/oauth/pending-web-flow.d.mts +16 -0
- package/dist/lib/auth/oauth/pending-web-flow.d.ts +16 -0
- package/dist/lib/auth/oauth/pending-web-flow.js +66 -0
- package/dist/lib/auth/oauth/pending-web-flow.mjs +41 -0
- package/dist/lib/auth/oauth/web-flow.js +3 -3
- package/dist/lib/auth/oauth/web-flow.mjs +3 -3
- package/dist/lib/registry/types.generated.d.mts +63 -1
- package/dist/lib/registry/types.generated.d.ts +63 -1
- package/dist/lib/reporting/azure/index.d.mts +26 -0
- package/dist/lib/reporting/azure/index.d.ts +26 -0
- package/dist/lib/reporting/azure/index.js +247 -0
- package/dist/lib/reporting/azure/index.mjs +230 -0
- package/dist/lib/reporting/bigquery/index.d.mts +127 -0
- package/dist/lib/reporting/bigquery/index.d.ts +127 -0
- package/dist/lib/reporting/bigquery/index.js +379 -0
- package/dist/lib/reporting/bigquery/index.mjs +341 -0
- package/dist/lib/reporting/ledger/postgres.d.mts +10 -0
- package/dist/lib/reporting/ledger/postgres.d.ts +10 -0
- package/dist/lib/reporting/ledger/postgres.js +23 -2
- package/dist/lib/reporting/ledger/postgres.mjs +23 -2
- package/dist/lib/reporting/ledger/row-storage-object.js +31 -8
- package/dist/lib/reporting/ledger/row-storage-object.mjs +32 -9
- package/dist/lib/reporting/ledger/row-storage-provider-io.d.mts +0 -7
- package/dist/lib/reporting/ledger/row-storage-provider-io.d.ts +0 -7
- package/dist/lib/reporting/ledger/row-storage-provider-io.js +0 -10
- package/dist/lib/reporting/ledger/row-storage-provider-io.mjs +0 -8
- package/dist/lib/reporting/s3/index.d.mts +29 -0
- package/dist/lib/reporting/s3/index.d.ts +29 -0
- package/dist/lib/reporting/s3/index.js +324 -0
- package/dist/lib/reporting/s3/index.mjs +317 -0
- package/dist/lib/reporting/service/index.d.mts +3 -1
- package/dist/lib/reporting/service/index.d.ts +3 -1
- package/dist/lib/reporting/service/index.js +1 -0
- package/dist/lib/reporting/service/index.mjs +1 -0
- package/dist/lib/schemas/browser.d.mts +14 -0
- package/dist/lib/schemas/browser.d.ts +14 -0
- package/dist/lib/schemas/browser.js +48 -0
- package/dist/lib/schemas/browser.mjs +20 -0
- package/dist/lib/schemas/index.d.mts +2 -120
- package/dist/lib/schemas/index.d.ts +2 -120
- package/dist/lib/schemas/index.js +3 -11
- package/dist/lib/schemas/index.mjs +1 -9
- package/dist/lib/schemas-data/v2.5/_provenance.json +1 -1
- package/dist/lib/testing/index.d.mts +1 -0
- package/dist/lib/testing/index.d.ts +1 -0
- package/dist/lib/testing/index.js +3 -0
- package/dist/lib/testing/index.mjs +2 -0
- package/dist/lib/testing/pending-web-flow-store.d.mts +20 -0
- package/dist/lib/testing/pending-web-flow-store.d.ts +20 -0
- package/dist/lib/testing/pending-web-flow-store.js +132 -0
- package/dist/lib/testing/pending-web-flow-store.mjs +98 -0
- package/dist/lib/testing/storyboard/validations.d.mts +1 -1
- package/dist/lib/testing/storyboard/validations.d.ts +1 -1
- package/dist/lib/validation/get-products-request.d.mts +122 -0
- package/dist/lib/validation/get-products-request.d.ts +122 -0
- package/dist/lib/validation/get-products-request.js +39 -0
- package/dist/lib/validation/get-products-request.mjs +14 -0
- 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 +1 -1
- package/docs/ZOD-SCHEMAS.md +13 -1
- package/docs/guides/OAUTH-ISSUER-BINDING.md +6 -0
- package/docs/guides/REPORTING-LEDGER.md +165 -0
- package/docs/guides/REPORTING-OPERATIONS.md +76 -1
- package/docs/guides/WEB-OAUTH.md +48 -1
- package/docs/llms.txt +1 -1
- package/docs/migration-14.x-rc-worksheet.md +6 -4
- package/package.json +64 -1
|
@@ -0,0 +1,317 @@
|
|
|
1
|
+
import { randomUUID } from "node:crypto";
|
|
2
|
+
import {
|
|
3
|
+
DeleteObjectCommand,
|
|
4
|
+
GetBucketLifecycleConfigurationCommand,
|
|
5
|
+
GetBucketPolicyStatusCommand,
|
|
6
|
+
GetBucketVersioningCommand,
|
|
7
|
+
GetObjectCommand,
|
|
8
|
+
HeadBucketCommand,
|
|
9
|
+
HeadObjectCommand,
|
|
10
|
+
PutObjectCommand
|
|
11
|
+
} from "@aws-sdk/client-s3";
|
|
12
|
+
import { ReportingRowStoreError } from "../ledger/row-storage-errors.mjs";
|
|
13
|
+
import {
|
|
14
|
+
assertReportingRowLocationKeys,
|
|
15
|
+
assertReportingRowReadBounds,
|
|
16
|
+
readReportingRowStream,
|
|
17
|
+
reportingRowClientMap,
|
|
18
|
+
reportingRowPrefixFilterOverlaps,
|
|
19
|
+
runReportingRowProviderOperation,
|
|
20
|
+
selectReportingRowClient
|
|
21
|
+
} from "../ledger/row-storage-provider-io.mjs";
|
|
22
|
+
const BUCKET = /^[a-z0-9][a-z0-9.-]{1,61}[a-z0-9]$/;
|
|
23
|
+
const REGION = /^[a-z0-9][a-z0-9-]{0,30}[a-z0-9]$/;
|
|
24
|
+
const VERSION_ID = /^[\x21\x23-\x7e]{1,1024}$/;
|
|
25
|
+
function statusOf(error) {
|
|
26
|
+
const status = Number(error?.$metadata?.httpStatusCode);
|
|
27
|
+
return Number.isInteger(status) ? status : void 0;
|
|
28
|
+
}
|
|
29
|
+
function nameOf(error) {
|
|
30
|
+
const value = error?.name ?? error?.Code;
|
|
31
|
+
return typeof value === "string" ? value : "";
|
|
32
|
+
}
|
|
33
|
+
const isPreconditionFailed = (error) => statusOf(error) === 412 || nameOf(error) === "PreconditionFailed";
|
|
34
|
+
const isConditionalConflict = (error) => statusOf(error) === 409 || nameOf(error) === "ConditionalRequestConflict";
|
|
35
|
+
const isNotFound = (error) => statusOf(error) === 404 || ["NoSuchKey", "NotFound", "NoSuchVersion", "NoSuchBucket"].includes(nameOf(error));
|
|
36
|
+
const isNotImplemented = (error) => statusOf(error) === 501 || nameOf(error) === "NotImplemented";
|
|
37
|
+
const isForbidden = (error) => statusOf(error) === 401 || statusOf(error) === 403;
|
|
38
|
+
const isRangeError = (error) => statusOf(error) === 416 || nameOf(error) === "InvalidRange";
|
|
39
|
+
function versionOf(output) {
|
|
40
|
+
const id = output.VersionId;
|
|
41
|
+
if (typeof id !== "string" || id === "null" || !VERSION_ID.test(id)) {
|
|
42
|
+
throw new ReportingRowStoreError(
|
|
43
|
+
"UNSAFE_BINDING",
|
|
44
|
+
"store returned no object VersionId; S3 bucket versioning must be enabled so deletes are fenced to one write"
|
|
45
|
+
);
|
|
46
|
+
}
|
|
47
|
+
return id;
|
|
48
|
+
}
|
|
49
|
+
function selectorOf(nativeVersion) {
|
|
50
|
+
if (typeof nativeVersion !== "string" || nativeVersion === "null") return null;
|
|
51
|
+
return VERSION_ID.test(nativeVersion) ? { VersionId: nativeVersion } : null;
|
|
52
|
+
}
|
|
53
|
+
function servedVersion(output, selector) {
|
|
54
|
+
return output.VersionId === selector.VersionId;
|
|
55
|
+
}
|
|
56
|
+
function liveExpirationCovers(rule, prefix) {
|
|
57
|
+
if (rule.Status !== "Enabled") return false;
|
|
58
|
+
if (rule.Expiration?.Days === void 0 && rule.Expiration?.Date === void 0) return false;
|
|
59
|
+
if (rule.Filter?.Tag !== void 0 || (rule.Filter?.And?.Tags?.length ?? 0) > 0) return false;
|
|
60
|
+
const filter = rule.Filter?.Prefix ?? rule.Filter?.And?.Prefix ?? rule.Prefix;
|
|
61
|
+
return reportingRowPrefixFilterOverlaps(filter, prefix);
|
|
62
|
+
}
|
|
63
|
+
function createS3ReportingRowObjectProviderV1(options) {
|
|
64
|
+
if (!options || typeof options !== "object") {
|
|
65
|
+
throw new ReportingRowStoreError("INVALID_INPUT", "S3 row provider options are required");
|
|
66
|
+
}
|
|
67
|
+
const clients = reportingRowClientMap(options.clients);
|
|
68
|
+
const isClient = (value) => !!value && typeof value === "object" && typeof value.send === "function";
|
|
69
|
+
if (options.client !== void 0 && !isClient(options.client) || [...clients.values()].some((client) => !isClient(client)) || options.client === void 0 && clients.size === 0) {
|
|
70
|
+
throw new ReportingRowStoreError("INVALID_INPUT", "inject an official S3Client as client or clients");
|
|
71
|
+
}
|
|
72
|
+
const validateLocation = (location) => {
|
|
73
|
+
assertReportingRowLocationKeys(location, ["bucket"], ["region"]);
|
|
74
|
+
const bucket = location.bucket;
|
|
75
|
+
if (!BUCKET.test(bucket) || bucket.includes("..") || /^\d+\.\d+\.\d+\.\d+$/.test(bucket)) {
|
|
76
|
+
throw new ReportingRowStoreError("INVALID_INPUT", "S3 bucket name is invalid");
|
|
77
|
+
}
|
|
78
|
+
if (location.region !== void 0 && !REGION.test(location.region)) {
|
|
79
|
+
throw new ReportingRowStoreError("INVALID_INPUT", "S3 region is invalid");
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
const target = (input) => {
|
|
83
|
+
validateLocation(input.location);
|
|
84
|
+
return {
|
|
85
|
+
client: selectReportingRowClient(options.client, clients, input.credentialRef),
|
|
86
|
+
Bucket: input.location.bucket
|
|
87
|
+
};
|
|
88
|
+
};
|
|
89
|
+
const assertKey = (key) => {
|
|
90
|
+
if (typeof key !== "string" || key.length === 0 || Buffer.byteLength(key) > 1024) {
|
|
91
|
+
throw new ReportingRowStoreError("INVALID_INPUT", "object key is invalid");
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
async function putCreateOnly(client, params, signal) {
|
|
95
|
+
for (let attempt = 0; ; attempt++) {
|
|
96
|
+
try {
|
|
97
|
+
return await client.send(new PutObjectCommand({ ...params, IfNoneMatch: "*" }), { abortSignal: signal });
|
|
98
|
+
} catch (error) {
|
|
99
|
+
if (attempt === 0 && isConditionalConflict(error) && !signal.aborted) continue;
|
|
100
|
+
throw error;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
async function assertVersioningEnabled(client, Bucket, signal) {
|
|
105
|
+
let status;
|
|
106
|
+
try {
|
|
107
|
+
status = (await client.send(new GetBucketVersioningCommand({ Bucket }), { abortSignal: signal })).Status;
|
|
108
|
+
} catch (error) {
|
|
109
|
+
if (isForbidden(error) || isNotImplemented(error)) {
|
|
110
|
+
throw new ReportingRowStoreError("UNSAFE_BINDING", "bucket versioning status cannot be verified");
|
|
111
|
+
}
|
|
112
|
+
throw error;
|
|
113
|
+
}
|
|
114
|
+
if (status !== "Enabled") {
|
|
115
|
+
throw new ReportingRowStoreError(
|
|
116
|
+
"UNSAFE_BINDING",
|
|
117
|
+
"S3 bucket versioning must be enabled so row object deletes are fenced to one write"
|
|
118
|
+
);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
async function assertCreateOnlyEnforced(client, Bucket, prefix, signal) {
|
|
122
|
+
const Key = `${prefix}/.adcp-probe/${randomUUID()}`;
|
|
123
|
+
const written = [];
|
|
124
|
+
const put = async (body) => {
|
|
125
|
+
const output = await putCreateOnly(
|
|
126
|
+
client,
|
|
127
|
+
{ Bucket, Key, Body: Buffer.from(body), ContentType: "application/x-ndjson", CacheControl: "no-store" },
|
|
128
|
+
signal
|
|
129
|
+
);
|
|
130
|
+
written.push(output);
|
|
131
|
+
versionOf(output);
|
|
132
|
+
};
|
|
133
|
+
try {
|
|
134
|
+
try {
|
|
135
|
+
await put('{"probe":1}\n');
|
|
136
|
+
} catch (error) {
|
|
137
|
+
if (isNotImplemented(error) || isPreconditionFailed(error)) {
|
|
138
|
+
throw new ReportingRowStoreError("UNSAFE_BINDING", "store does not support create-only writes");
|
|
139
|
+
}
|
|
140
|
+
throw error;
|
|
141
|
+
}
|
|
142
|
+
try {
|
|
143
|
+
await put('{"probe":2}\n');
|
|
144
|
+
} catch (error) {
|
|
145
|
+
if (isPreconditionFailed(error)) return;
|
|
146
|
+
if (isNotImplemented(error)) {
|
|
147
|
+
throw new ReportingRowStoreError("UNSAFE_BINDING", "store does not support create-only writes");
|
|
148
|
+
}
|
|
149
|
+
throw error;
|
|
150
|
+
}
|
|
151
|
+
throw new ReportingRowStoreError("UNSAFE_BINDING", "store ignores If-None-Match and replaces objects");
|
|
152
|
+
} finally {
|
|
153
|
+
const versionIds = written.map((output) => output.VersionId).filter((id) => !!id);
|
|
154
|
+
const deletes = versionIds.length > 0 ? versionIds.map((VersionId) => ({ VersionId })) : written.length ? [{}] : [];
|
|
155
|
+
for (const selector of deletes) {
|
|
156
|
+
if (signal.aborted) break;
|
|
157
|
+
await client.send(new DeleteObjectCommand({ Bucket, Key, ...selector }), { abortSignal: signal }).catch(() => void 0);
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
return {
|
|
162
|
+
name: "s3",
|
|
163
|
+
rangedReads: true,
|
|
164
|
+
validateLocation,
|
|
165
|
+
probe(input, context) {
|
|
166
|
+
return runReportingRowProviderOperation(context.signal, async () => {
|
|
167
|
+
const { client, Bucket } = target(input);
|
|
168
|
+
const signal = context.signal;
|
|
169
|
+
try {
|
|
170
|
+
await client.send(new HeadBucketCommand({ Bucket }), { abortSignal: signal });
|
|
171
|
+
} catch (error) {
|
|
172
|
+
if (isNotFound(error)) throw new ReportingRowStoreError("UNSAFE_BINDING", "bucket does not exist");
|
|
173
|
+
if (isForbidden(error)) throw new ReportingRowStoreError("UNSAFE_BINDING", "bucket is not accessible");
|
|
174
|
+
if (statusOf(error) === 301) {
|
|
175
|
+
throw new ReportingRowStoreError("UNSAFE_BINDING", "bucket is in a different region");
|
|
176
|
+
}
|
|
177
|
+
throw error;
|
|
178
|
+
}
|
|
179
|
+
if (input.location.region !== void 0) {
|
|
180
|
+
const configured = client.config?.region;
|
|
181
|
+
const region = typeof configured === "function" ? await configured() : configured;
|
|
182
|
+
if (region !== input.location.region) {
|
|
183
|
+
throw new ReportingRowStoreError("UNSAFE_BINDING", "client region does not match the binding");
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
const policy = await client.send(new GetBucketPolicyStatusCommand({ Bucket }), { abortSignal: signal }).catch(() => void 0);
|
|
187
|
+
if (policy?.PolicyStatus?.IsPublic === true) {
|
|
188
|
+
throw new ReportingRowStoreError("UNSAFE_BINDING", "bucket policy makes objects public");
|
|
189
|
+
}
|
|
190
|
+
let rules = [];
|
|
191
|
+
try {
|
|
192
|
+
const lifecycle = await client.send(new GetBucketLifecycleConfigurationCommand({ Bucket }), {
|
|
193
|
+
abortSignal: signal
|
|
194
|
+
});
|
|
195
|
+
rules = lifecycle.Rules ?? [];
|
|
196
|
+
} catch (error) {
|
|
197
|
+
if (isForbidden(error)) {
|
|
198
|
+
throw new ReportingRowStoreError("UNSAFE_BINDING", "bucket lifecycle cannot be read with this client");
|
|
199
|
+
}
|
|
200
|
+
if (!isNotFound(error) && !isNotImplemented(error) && nameOf(error) !== "NoSuchLifecycleConfiguration") {
|
|
201
|
+
throw error;
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
if (rules.some((rule) => liveExpirationCovers(rule, input.prefix))) {
|
|
205
|
+
throw new ReportingRowStoreError("UNSAFE_BINDING", "a bucket lifecycle rule can expire live row objects");
|
|
206
|
+
}
|
|
207
|
+
await assertVersioningEnabled(client, Bucket, signal);
|
|
208
|
+
await assertCreateOnlyEnforced(client, Bucket, input.prefix, signal);
|
|
209
|
+
});
|
|
210
|
+
},
|
|
211
|
+
putIfAbsent(input, context) {
|
|
212
|
+
return runReportingRowProviderOperation(context.signal, async () => {
|
|
213
|
+
const { client, Bucket } = target(input);
|
|
214
|
+
assertKey(input.key);
|
|
215
|
+
const bytes = Buffer.from(input.bytes);
|
|
216
|
+
try {
|
|
217
|
+
const output = await putCreateOnly(
|
|
218
|
+
client,
|
|
219
|
+
{
|
|
220
|
+
Bucket,
|
|
221
|
+
Key: input.key,
|
|
222
|
+
Body: bytes,
|
|
223
|
+
ContentLength: bytes.byteLength,
|
|
224
|
+
ContentType: input.contentType,
|
|
225
|
+
CacheControl: "no-store",
|
|
226
|
+
Metadata: { ...input.metadata }
|
|
227
|
+
},
|
|
228
|
+
context.signal
|
|
229
|
+
);
|
|
230
|
+
return { created: true, nativeVersion: versionOf(output) };
|
|
231
|
+
} catch (error) {
|
|
232
|
+
if (!isPreconditionFailed(error)) throw error;
|
|
233
|
+
}
|
|
234
|
+
const head = await client.send(new HeadObjectCommand({ Bucket, Key: input.key }), {
|
|
235
|
+
abortSignal: context.signal
|
|
236
|
+
});
|
|
237
|
+
return { created: false, nativeVersion: versionOf(head) };
|
|
238
|
+
});
|
|
239
|
+
},
|
|
240
|
+
get(input, context) {
|
|
241
|
+
return runReportingRowProviderOperation(context.signal, async () => {
|
|
242
|
+
const { client, Bucket } = target(input);
|
|
243
|
+
assertKey(input.key);
|
|
244
|
+
assertReportingRowReadBounds(input);
|
|
245
|
+
const selector = selectorOf(input.nativeVersion);
|
|
246
|
+
if (selector === null) return null;
|
|
247
|
+
const Key = input.key;
|
|
248
|
+
try {
|
|
249
|
+
if (input.range?.length === 0) {
|
|
250
|
+
const head = await client.send(new HeadObjectCommand({ Bucket, Key, ...selector }), {
|
|
251
|
+
abortSignal: context.signal
|
|
252
|
+
});
|
|
253
|
+
if (!servedVersion(head, selector)) return null;
|
|
254
|
+
if (input.range.offset > Number(head.ContentLength ?? 0)) {
|
|
255
|
+
throw new ReportingRowStoreError("ROWS_INTEGRITY_FAILED", "requested range exceeds the stored object");
|
|
256
|
+
}
|
|
257
|
+
return Buffer.alloc(0);
|
|
258
|
+
}
|
|
259
|
+
const output = await client.send(
|
|
260
|
+
new GetObjectCommand({
|
|
261
|
+
Bucket,
|
|
262
|
+
Key,
|
|
263
|
+
...selector,
|
|
264
|
+
...input.range ? { Range: `bytes=${input.range.offset}-${input.range.offset + input.range.length - 1}` } : {}
|
|
265
|
+
}),
|
|
266
|
+
{ abortSignal: context.signal }
|
|
267
|
+
);
|
|
268
|
+
const body = output.Body;
|
|
269
|
+
if (!body || typeof body[Symbol.asyncIterator] !== "function") {
|
|
270
|
+
throw new ReportingRowStoreError("PROVIDER_UNAVAILABLE", "object body is not a stream");
|
|
271
|
+
}
|
|
272
|
+
if (!servedVersion(output, selector)) {
|
|
273
|
+
body.destroy?.();
|
|
274
|
+
return null;
|
|
275
|
+
}
|
|
276
|
+
if (typeof output.ContentLength === "number" && output.ContentLength > input.maxBytes) {
|
|
277
|
+
body.destroy?.();
|
|
278
|
+
throw new ReportingRowStoreError("ROWS_INTEGRITY_FAILED", "stored object exceeds its recorded size");
|
|
279
|
+
}
|
|
280
|
+
return await readReportingRowStream(body, input.maxBytes, context.signal);
|
|
281
|
+
} catch (error) {
|
|
282
|
+
if (isNotFound(error) || isPreconditionFailed(error)) return null;
|
|
283
|
+
if (statusOf(error) === 400 && nameOf(error) !== "InvalidRange") return null;
|
|
284
|
+
if (isRangeError(error)) {
|
|
285
|
+
throw new ReportingRowStoreError("ROWS_INTEGRITY_FAILED", "requested range exceeds the stored object");
|
|
286
|
+
}
|
|
287
|
+
throw error;
|
|
288
|
+
}
|
|
289
|
+
});
|
|
290
|
+
},
|
|
291
|
+
delete(input, context) {
|
|
292
|
+
return runReportingRowProviderOperation(context.signal, async () => {
|
|
293
|
+
const { client, Bucket } = target(input);
|
|
294
|
+
assertKey(input.key);
|
|
295
|
+
const selector = selectorOf(input.nativeVersion);
|
|
296
|
+
if (selector === null) return "absent";
|
|
297
|
+
const Key = input.key;
|
|
298
|
+
const signal = context.signal;
|
|
299
|
+
try {
|
|
300
|
+
const head = await client.send(new HeadObjectCommand({ Bucket, Key, ...selector }), { abortSignal: signal });
|
|
301
|
+
if (!servedVersion(head, selector)) return "absent";
|
|
302
|
+
} catch (error) {
|
|
303
|
+
if (isNotFound(error) || isPreconditionFailed(error)) return "absent";
|
|
304
|
+
if (statusOf(error) === 400 || statusOf(error) === 405) return "absent";
|
|
305
|
+
throw error;
|
|
306
|
+
}
|
|
307
|
+
await client.send(new DeleteObjectCommand({ Bucket, Key, VersionId: selector.VersionId }), {
|
|
308
|
+
abortSignal: signal
|
|
309
|
+
});
|
|
310
|
+
return "deleted";
|
|
311
|
+
});
|
|
312
|
+
}
|
|
313
|
+
};
|
|
314
|
+
}
|
|
315
|
+
export {
|
|
316
|
+
createS3ReportingRowObjectProviderV1
|
|
317
|
+
};
|
|
@@ -207,7 +207,9 @@ export type CreatePostgresReliableReportingProductionServiceOptionsV1<TCtxMeta =
|
|
|
207
207
|
* periods once `max(statusRetentionDays, recordRetentionDays)` has elapsed
|
|
208
208
|
* since both the period end and its latest publication, deleting their
|
|
209
209
|
* rows and ledger records and leaving a tombstone. Abandoned row uploads
|
|
210
|
-
* and expired cursor snapshots are always swept.
|
|
210
|
+
* and expired cursor snapshots are always swept. With `changeFeed`, a
|
|
211
|
+
* period is also held until every live registered feed consumer (updated
|
|
212
|
+
* within `changeFeed.maxFeedHoldDays`, default 7) has read its changes.
|
|
211
213
|
*/
|
|
212
214
|
retention?: {
|
|
213
215
|
enabled: true;
|
|
@@ -207,7 +207,9 @@ export type CreatePostgresReliableReportingProductionServiceOptionsV1<TCtxMeta =
|
|
|
207
207
|
* periods once `max(statusRetentionDays, recordRetentionDays)` has elapsed
|
|
208
208
|
* since both the period end and its latest publication, deleting their
|
|
209
209
|
* rows and ledger records and leaving a tombstone. Abandoned row uploads
|
|
210
|
-
* and expired cursor snapshots are always swept.
|
|
210
|
+
* and expired cursor snapshots are always swept. With `changeFeed`, a
|
|
211
|
+
* period is also held until every live registered feed consumer (updated
|
|
212
|
+
* within `changeFeed.maxFeedHoldDays`, default 7) has read its changes.
|
|
211
213
|
*/
|
|
212
214
|
retention?: {
|
|
213
215
|
enabled: true;
|
|
@@ -526,6 +526,7 @@ async function createPostgresReliableReportingProductionService(options) {
|
|
|
526
526
|
coreStore.retireExpiredPeriods({
|
|
527
527
|
statusRetentionDays: options.statusRetentionDays,
|
|
528
528
|
...options.retention.recordRetentionDays !== void 0 ? { recordRetentionDays: options.retention.recordRetentionDays } : {},
|
|
529
|
+
...typeof options.changeFeed === "object" && options.changeFeed.maxFeedHoldDays !== void 0 ? { maxFeedHoldDays: options.changeFeed.maxFeedHoldDays } : {},
|
|
529
530
|
limit: options.retention.limit ?? 100,
|
|
530
531
|
signal
|
|
531
532
|
})
|
|
@@ -535,6 +535,7 @@ async function createPostgresReliableReportingProductionService(options) {
|
|
|
535
535
|
coreStore.retireExpiredPeriods({
|
|
536
536
|
statusRetentionDays: options.statusRetentionDays,
|
|
537
537
|
...options.retention.recordRetentionDays !== void 0 ? { recordRetentionDays: options.retention.recordRetentionDays } : {},
|
|
538
|
+
...typeof options.changeFeed === "object" && options.changeFeed.maxFeedHoldDays !== void 0 ? { maxFeedHoldDays: options.changeFeed.maxFeedHoldDays } : {},
|
|
538
539
|
limit: options.retention.limit ?? 100,
|
|
539
540
|
signal
|
|
540
541
|
})
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Browser-safe Zod schemas for validating AdCP objects in widgets and UIs.
|
|
3
|
+
*
|
|
4
|
+
* Import from `@adcp/sdk/schemas/browser`. This entry exposes the generated
|
|
5
|
+
* schemas and portable cross-field validators without loading the Node-only
|
|
6
|
+
* JSON Schema loader or bundled schema store.
|
|
7
|
+
*/
|
|
8
|
+
export * from '../types/schemas.generated.mjs';
|
|
9
|
+
export { GetProductsRequestSchema, LegacyGetProductsRequestSchema } from '../validation/get-products-request.mjs';
|
|
10
|
+
export type { LooseObjectSchemaFor } from '../validation/get-products-request.mjs';
|
|
11
|
+
export { BiddingPolicySchema } from '../validation/bidding-policy.mjs';
|
|
12
|
+
export { CanonicalBudgetAllocationSchema } from '../validation/budget-allocation.mjs';
|
|
13
|
+
export { SyncCreativesItemSchema, SyncCreativesSuccessStrictSchema, SyncCreativesResponseStrictSchema, SyncCreativesActionSchema, } from '../validation/sync-creatives.mjs';
|
|
14
|
+
export type { SyncCreativesItem, SyncCreativesSuccessStrict } from '../validation/sync-creatives.mjs';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Browser-safe Zod schemas for validating AdCP objects in widgets and UIs.
|
|
3
|
+
*
|
|
4
|
+
* Import from `@adcp/sdk/schemas/browser`. This entry exposes the generated
|
|
5
|
+
* schemas and portable cross-field validators without loading the Node-only
|
|
6
|
+
* JSON Schema loader or bundled schema store.
|
|
7
|
+
*/
|
|
8
|
+
export * from '../types/schemas.generated';
|
|
9
|
+
export { GetProductsRequestSchema, LegacyGetProductsRequestSchema } from '../validation/get-products-request';
|
|
10
|
+
export type { LooseObjectSchemaFor } from '../validation/get-products-request';
|
|
11
|
+
export { BiddingPolicySchema } from '../validation/bidding-policy';
|
|
12
|
+
export { CanonicalBudgetAllocationSchema } from '../validation/budget-allocation';
|
|
13
|
+
export { SyncCreativesItemSchema, SyncCreativesSuccessStrictSchema, SyncCreativesResponseStrictSchema, SyncCreativesActionSchema, } from '../validation/sync-creatives';
|
|
14
|
+
export type { SyncCreativesItem, SyncCreativesSuccessStrict } from '../validation/sync-creatives';
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
19
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
|
+
var browser_exports = {};
|
|
21
|
+
__export(browser_exports, {
|
|
22
|
+
BiddingPolicySchema: () => import_bidding_policy.BiddingPolicySchema,
|
|
23
|
+
CanonicalBudgetAllocationSchema: () => import_budget_allocation.CanonicalBudgetAllocationSchema,
|
|
24
|
+
GetProductsRequestSchema: () => import_get_products_request.GetProductsRequestSchema,
|
|
25
|
+
LegacyGetProductsRequestSchema: () => import_get_products_request.LegacyGetProductsRequestSchema,
|
|
26
|
+
SyncCreativesActionSchema: () => import_sync_creatives.SyncCreativesActionSchema,
|
|
27
|
+
SyncCreativesItemSchema: () => import_sync_creatives.SyncCreativesItemSchema,
|
|
28
|
+
SyncCreativesResponseStrictSchema: () => import_sync_creatives.SyncCreativesResponseStrictSchema,
|
|
29
|
+
SyncCreativesSuccessStrictSchema: () => import_sync_creatives.SyncCreativesSuccessStrictSchema
|
|
30
|
+
});
|
|
31
|
+
module.exports = __toCommonJS(browser_exports);
|
|
32
|
+
__reExport(browser_exports, require('../types/schemas.generated.js'), module.exports);
|
|
33
|
+
var import_get_products_request = require('../validation/get-products-request.js');
|
|
34
|
+
var import_bidding_policy = require('../validation/bidding-policy.js');
|
|
35
|
+
var import_budget_allocation = require('../validation/budget-allocation.js');
|
|
36
|
+
var import_sync_creatives = require('../validation/sync-creatives.js');
|
|
37
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
38
|
+
0 && (module.exports = {
|
|
39
|
+
BiddingPolicySchema,
|
|
40
|
+
CanonicalBudgetAllocationSchema,
|
|
41
|
+
GetProductsRequestSchema,
|
|
42
|
+
LegacyGetProductsRequestSchema,
|
|
43
|
+
SyncCreativesActionSchema,
|
|
44
|
+
SyncCreativesItemSchema,
|
|
45
|
+
SyncCreativesResponseStrictSchema,
|
|
46
|
+
SyncCreativesSuccessStrictSchema,
|
|
47
|
+
...require('../types/schemas.generated.js')
|
|
48
|
+
});
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export * from "../types/schemas.generated.mjs";
|
|
2
|
+
import { GetProductsRequestSchema, LegacyGetProductsRequestSchema } from "../validation/get-products-request.mjs";
|
|
3
|
+
import { BiddingPolicySchema } from "../validation/bidding-policy.mjs";
|
|
4
|
+
import { CanonicalBudgetAllocationSchema } from "../validation/budget-allocation.mjs";
|
|
5
|
+
import {
|
|
6
|
+
SyncCreativesItemSchema,
|
|
7
|
+
SyncCreativesSuccessStrictSchema,
|
|
8
|
+
SyncCreativesResponseStrictSchema,
|
|
9
|
+
SyncCreativesActionSchema
|
|
10
|
+
} from "../validation/sync-creatives.mjs";
|
|
11
|
+
export {
|
|
12
|
+
BiddingPolicySchema,
|
|
13
|
+
CanonicalBudgetAllocationSchema,
|
|
14
|
+
GetProductsRequestSchema,
|
|
15
|
+
LegacyGetProductsRequestSchema,
|
|
16
|
+
SyncCreativesActionSchema,
|
|
17
|
+
SyncCreativesItemSchema,
|
|
18
|
+
SyncCreativesResponseStrictSchema,
|
|
19
|
+
SyncCreativesSuccessStrictSchema
|
|
20
|
+
};
|
|
@@ -41,7 +41,6 @@
|
|
|
41
41
|
*/
|
|
42
42
|
import { z } from 'zod';
|
|
43
43
|
import * as schemas from '../types/schemas.generated.mjs';
|
|
44
|
-
import type { CanonicalGetProductsRequest } from '../v2/projection/creative-delivery.mjs';
|
|
45
44
|
import type { KnownToolRequestSchemas } from '../utils/tool-request-schemas.mjs';
|
|
46
45
|
import { getSchemaDocumentByRef, type Direction, type ResolvedToolSchemaDocument, type ResponseVariant } from '../validation/schema-loader.mjs';
|
|
47
46
|
import type { ValidateFunction } from 'ajv';
|
|
@@ -49,125 +48,8 @@ export * from '../types/schemas.generated.mjs';
|
|
|
49
48
|
export { AgentOAuthClientCredentialsSchema } from '../auth/oauth/client-credentials-schema.mjs';
|
|
50
49
|
export type { AgentOAuthClientCredentials } from '../types/adcp.mjs';
|
|
51
50
|
export type { PlacementPresentationDocument, PlacementPresentationReference } from '../types/core.generated.mjs';
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
};
|
|
55
|
-
type ZodShapeOutput<U extends z.core.$ZodShape> = {
|
|
56
|
-
[K in keyof U as undefined extends z.output<U[K]> ? never : K]: z.output<U[K]>;
|
|
57
|
-
} & {
|
|
58
|
-
[K in keyof U as undefined extends z.output<U[K]> ? K : never]?: z.output<U[K]>;
|
|
59
|
-
};
|
|
60
|
-
/** Portable loose-object facade retained across adopter declaration emit. */
|
|
61
|
-
export type LooseObjectSchemaFor<T extends object> = {
|
|
62
|
-
extend<U extends z.core.$ZodShape>(shape: U): LooseObjectSchemaFor<Omit<T, keyof U> & ZodShapeOutput<U>>;
|
|
63
|
-
} & z.ZodObject<LooseObjectShapeFor<T>, z.core.$loose> & z.ZodType<T & Record<string, unknown>, T & Record<string, unknown>>;
|
|
64
|
-
/** Wire-compatible request schema, including the legacy `format_ids` selector. */
|
|
65
|
-
export declare const LegacyGetProductsRequestSchema: z.ZodObject<{
|
|
66
|
-
adcp_version: z.ZodOptional<z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>>;
|
|
67
|
-
adcp_major_version: z.ZodOptional<z.ZodType<number, number, z.core.$ZodTypeInternals<number, number>>>;
|
|
68
|
-
idempotency_key: z.ZodOptional<z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>>;
|
|
69
|
-
buying_mode: z.ZodType<"brief" | "wholesale" | "refine", "brief" | "wholesale" | "refine", z.core.$ZodTypeInternals<"brief" | "wholesale" | "refine", "brief" | "wholesale" | "refine">>;
|
|
70
|
-
brief: z.ZodOptional<z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>>;
|
|
71
|
-
refine: z.ZodOptional<z.ZodType<({
|
|
72
|
-
scope: "request";
|
|
73
|
-
ask: string;
|
|
74
|
-
} | {
|
|
75
|
-
scope: "product";
|
|
76
|
-
product_id: string;
|
|
77
|
-
action?: "include" | "omit" | "more_like_this";
|
|
78
|
-
ask?: string;
|
|
79
|
-
} | {
|
|
80
|
-
scope: "proposal";
|
|
81
|
-
proposal_id: string;
|
|
82
|
-
action?: "include" | "omit" | "finalize";
|
|
83
|
-
ask?: string;
|
|
84
|
-
})[], ({
|
|
85
|
-
scope: "request";
|
|
86
|
-
ask: string;
|
|
87
|
-
} | {
|
|
88
|
-
scope: "product";
|
|
89
|
-
product_id: string;
|
|
90
|
-
action?: "include" | "omit" | "more_like_this";
|
|
91
|
-
ask?: string;
|
|
92
|
-
} | {
|
|
93
|
-
scope: "proposal";
|
|
94
|
-
proposal_id: string;
|
|
95
|
-
action?: "include" | "omit" | "finalize";
|
|
96
|
-
ask?: string;
|
|
97
|
-
})[], z.core.$ZodTypeInternals<({
|
|
98
|
-
scope: "request";
|
|
99
|
-
ask: string;
|
|
100
|
-
} | {
|
|
101
|
-
scope: "product";
|
|
102
|
-
product_id: string;
|
|
103
|
-
action?: "include" | "omit" | "more_like_this";
|
|
104
|
-
ask?: string;
|
|
105
|
-
} | {
|
|
106
|
-
scope: "proposal";
|
|
107
|
-
proposal_id: string;
|
|
108
|
-
action?: "include" | "omit" | "finalize";
|
|
109
|
-
ask?: string;
|
|
110
|
-
})[], ({
|
|
111
|
-
scope: "request";
|
|
112
|
-
ask: string;
|
|
113
|
-
} | {
|
|
114
|
-
scope: "product";
|
|
115
|
-
product_id: string;
|
|
116
|
-
action?: "include" | "omit" | "more_like_this";
|
|
117
|
-
ask?: string;
|
|
118
|
-
} | {
|
|
119
|
-
scope: "proposal";
|
|
120
|
-
proposal_id: string;
|
|
121
|
-
action?: "include" | "omit" | "finalize";
|
|
122
|
-
ask?: string;
|
|
123
|
-
})[]>>>;
|
|
124
|
-
brand: z.ZodOptional<z.ZodType<import("../types/core.generated.mjs").BrandReference, import("../types/core.generated.mjs").BrandReference, z.core.$ZodTypeInternals<import("../types/core.generated.mjs").BrandReference, import("../types/core.generated.mjs").BrandReference>>>;
|
|
125
|
-
acceptance_context: z.ZodOptional<z.ZodType<import("../types/tools.generated.mjs").AcceptanceContext, import("../types/tools.generated.mjs").AcceptanceContext, z.core.$ZodTypeInternals<import("../types/tools.generated.mjs").AcceptanceContext, import("../types/tools.generated.mjs").AcceptanceContext>>>;
|
|
126
|
-
catalog: z.ZodOptional<z.ZodType<import("../index.mjs").Catalog, import("../index.mjs").Catalog, z.core.$ZodTypeInternals<import("../index.mjs").Catalog, import("../index.mjs").Catalog>>>;
|
|
127
|
-
account: z.ZodOptional<z.ZodType<import("../types/core.generated.mjs").AccountReference, import("../types/core.generated.mjs").AccountReference, z.core.$ZodTypeInternals<import("../types/core.generated.mjs").AccountReference, import("../types/core.generated.mjs").AccountReference>>>;
|
|
128
|
-
preferred_delivery_types: z.ZodOptional<z.ZodType<import("../types/core.generated.mjs").DeliveryType[], import("../types/core.generated.mjs").DeliveryType[], z.core.$ZodTypeInternals<import("../types/core.generated.mjs").DeliveryType[], import("../types/core.generated.mjs").DeliveryType[]>>>;
|
|
129
|
-
filters: z.ZodOptional<z.ZodType<import("../types/tools.generated.mjs").ProductFilters, import("../types/tools.generated.mjs").ProductFilters, z.core.$ZodTypeInternals<import("../types/tools.generated.mjs").ProductFilters, import("../types/tools.generated.mjs").ProductFilters>>>;
|
|
130
|
-
targeting_overlay: z.ZodOptional<z.ZodType<import("../index.mjs").TargetingOverlay, import("../index.mjs").TargetingOverlay, z.core.$ZodTypeInternals<import("../index.mjs").TargetingOverlay, import("../index.mjs").TargetingOverlay>>>;
|
|
131
|
-
media_buy_frequency_cap: z.ZodOptional<z.ZodType<{
|
|
132
|
-
suppress?: import("../index.mjs").Duration;
|
|
133
|
-
suppress_minutes?: number;
|
|
134
|
-
max_impressions?: number;
|
|
135
|
-
per?: import("../types/core.generated.mjs").ReachUnit;
|
|
136
|
-
window?: import("../index.mjs").Duration;
|
|
137
|
-
}, {
|
|
138
|
-
suppress?: import("../index.mjs").Duration;
|
|
139
|
-
suppress_minutes?: number;
|
|
140
|
-
max_impressions?: number;
|
|
141
|
-
per?: import("../types/core.generated.mjs").ReachUnit;
|
|
142
|
-
window?: import("../index.mjs").Duration;
|
|
143
|
-
}, z.core.$ZodTypeInternals<{
|
|
144
|
-
suppress?: import("../index.mjs").Duration;
|
|
145
|
-
suppress_minutes?: number;
|
|
146
|
-
max_impressions?: number;
|
|
147
|
-
per?: import("../types/core.generated.mjs").ReachUnit;
|
|
148
|
-
window?: import("../index.mjs").Duration;
|
|
149
|
-
}, {
|
|
150
|
-
suppress?: import("../index.mjs").Duration;
|
|
151
|
-
suppress_minutes?: number;
|
|
152
|
-
max_impressions?: number;
|
|
153
|
-
per?: import("../types/core.generated.mjs").ReachUnit;
|
|
154
|
-
window?: import("../index.mjs").Duration;
|
|
155
|
-
}>>>;
|
|
156
|
-
required_overlay_support: z.ZodOptional<z.ZodType<import("../types/core.generated.mjs").TargetingOverlayRequirements, import("../types/core.generated.mjs").TargetingOverlayRequirements, z.core.$ZodTypeInternals<import("../types/core.generated.mjs").TargetingOverlayRequirements, import("../types/core.generated.mjs").TargetingOverlayRequirements>>>;
|
|
157
|
-
required_media_buy_support: z.ZodOptional<z.ZodType<import("../types/tools.generated.mjs").ProductMediaBuySupportRequirements, import("../types/tools.generated.mjs").ProductMediaBuySupportRequirements, z.core.$ZodTypeInternals<import("../types/tools.generated.mjs").ProductMediaBuySupportRequirements, import("../types/tools.generated.mjs").ProductMediaBuySupportRequirements>>>;
|
|
158
|
-
property_list: z.ZodOptional<z.ZodType<import("../types/tools.generated.mjs").PropertyListReference, import("../types/tools.generated.mjs").PropertyListReference, z.core.$ZodTypeInternals<import("../types/tools.generated.mjs").PropertyListReference, import("../types/tools.generated.mjs").PropertyListReference>>>;
|
|
159
|
-
fields: z.ZodOptional<z.ZodType<("name" | "identity" | "forecast" | "description" | "publisher_properties" | "audience_evidence" | "product_id" | "channels" | "video_placement_types" | "audio_distribution_types" | "sponsored_placement_types" | "social_placement_surfaces" | "format_options" | "placements" | "delivery_type" | "exclusivity" | "pricing_options" | "reporting_capabilities" | "measurement_terms" | "performance_standards" | "catalog_types" | "signal_targeting_allowed" | "signal_targeting_rules" | "demographic_targeting" | "overlay_support" | "collections" | "collection_targeting_allowed" | "media_buy_support" | "audience_evidence_selections" | "max_optimization_goals" | "catalog_match" | "list_applications" | "brief_relevance" | "targeting_resolution" | "acceptance_policy_profile_ids" | "execution_requirements" | "expires_at" | "allowed_actions" | "product_card" | "format_ids" | "outcome_measurement" | "delivery_measurement" | "creative_policy" | "metric_optimization" | "conversion_tracking" | "data_provider_signals" | "included_signals" | "signal_targeting_options" | "installments" | "is_custom" | "product_card_detailed" | "enforced_policies" | "trusted_match")[], ("name" | "identity" | "forecast" | "description" | "publisher_properties" | "audience_evidence" | "product_id" | "channels" | "video_placement_types" | "audio_distribution_types" | "sponsored_placement_types" | "social_placement_surfaces" | "format_options" | "placements" | "delivery_type" | "exclusivity" | "pricing_options" | "reporting_capabilities" | "measurement_terms" | "performance_standards" | "catalog_types" | "signal_targeting_allowed" | "signal_targeting_rules" | "demographic_targeting" | "overlay_support" | "collections" | "collection_targeting_allowed" | "media_buy_support" | "audience_evidence_selections" | "max_optimization_goals" | "catalog_match" | "list_applications" | "brief_relevance" | "targeting_resolution" | "acceptance_policy_profile_ids" | "execution_requirements" | "expires_at" | "allowed_actions" | "product_card" | "format_ids" | "outcome_measurement" | "delivery_measurement" | "creative_policy" | "metric_optimization" | "conversion_tracking" | "data_provider_signals" | "included_signals" | "signal_targeting_options" | "installments" | "is_custom" | "product_card_detailed" | "enforced_policies" | "trusted_match")[], z.core.$ZodTypeInternals<("name" | "identity" | "forecast" | "description" | "publisher_properties" | "audience_evidence" | "product_id" | "channels" | "video_placement_types" | "audio_distribution_types" | "sponsored_placement_types" | "social_placement_surfaces" | "format_options" | "placements" | "delivery_type" | "exclusivity" | "pricing_options" | "reporting_capabilities" | "measurement_terms" | "performance_standards" | "catalog_types" | "signal_targeting_allowed" | "signal_targeting_rules" | "demographic_targeting" | "overlay_support" | "collections" | "collection_targeting_allowed" | "media_buy_support" | "audience_evidence_selections" | "max_optimization_goals" | "catalog_match" | "list_applications" | "brief_relevance" | "targeting_resolution" | "acceptance_policy_profile_ids" | "execution_requirements" | "expires_at" | "allowed_actions" | "product_card" | "format_ids" | "outcome_measurement" | "delivery_measurement" | "creative_policy" | "metric_optimization" | "conversion_tracking" | "data_provider_signals" | "included_signals" | "signal_targeting_options" | "installments" | "is_custom" | "product_card_detailed" | "enforced_policies" | "trusted_match")[], ("name" | "identity" | "forecast" | "description" | "publisher_properties" | "audience_evidence" | "product_id" | "channels" | "video_placement_types" | "audio_distribution_types" | "sponsored_placement_types" | "social_placement_surfaces" | "format_options" | "placements" | "delivery_type" | "exclusivity" | "pricing_options" | "reporting_capabilities" | "measurement_terms" | "performance_standards" | "catalog_types" | "signal_targeting_allowed" | "signal_targeting_rules" | "demographic_targeting" | "overlay_support" | "collections" | "collection_targeting_allowed" | "media_buy_support" | "audience_evidence_selections" | "max_optimization_goals" | "catalog_match" | "list_applications" | "brief_relevance" | "targeting_resolution" | "acceptance_policy_profile_ids" | "execution_requirements" | "expires_at" | "allowed_actions" | "product_card" | "format_ids" | "outcome_measurement" | "delivery_measurement" | "creative_policy" | "metric_optimization" | "conversion_tracking" | "data_provider_signals" | "included_signals" | "signal_targeting_options" | "installments" | "is_custom" | "product_card_detailed" | "enforced_policies" | "trusted_match")[]>>>;
|
|
160
|
-
time_budget: z.ZodOptional<z.ZodType<import("../index.mjs").Duration, import("../index.mjs").Duration, z.core.$ZodTypeInternals<import("../index.mjs").Duration, import("../index.mjs").Duration>>>;
|
|
161
|
-
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>>>;
|
|
162
|
-
pagination: z.ZodOptional<z.ZodType<import("../index.mjs").PaginationRequest, import("../index.mjs").PaginationRequest, z.core.$ZodTypeInternals<import("../index.mjs").PaginationRequest, import("../index.mjs").PaginationRequest>>>;
|
|
163
|
-
if_wholesale_feed_version: z.ZodOptional<z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>>;
|
|
164
|
-
if_pricing_version: z.ZodOptional<z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>>;
|
|
165
|
-
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>>>;
|
|
166
|
-
required_policies: z.ZodOptional<z.ZodType<string[], string[], z.core.$ZodTypeInternals<string[], string[]>>>;
|
|
167
|
-
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>>>;
|
|
168
|
-
}, z.core.$loose> & z.ZodType<import("../index.mjs").LegacyGetProductsRequest & Record<string, unknown>, import("../index.mjs").LegacyGetProductsRequest & Record<string, unknown>, z.core.$ZodTypeInternals<import("../index.mjs").LegacyGetProductsRequest & Record<string, unknown>, import("../index.mjs").LegacyGetProductsRequest & Record<string, unknown>>>;
|
|
169
|
-
/** Primary request schema; legacy `format_ids` selection is rejected. */
|
|
170
|
-
export declare const GetProductsRequestSchema: LooseObjectSchemaFor<CanonicalGetProductsRequest>;
|
|
51
|
+
export { GetProductsRequestSchema, LegacyGetProductsRequestSchema } from '../validation/get-products-request.mjs';
|
|
52
|
+
export type { LooseObjectSchemaFor } from '../validation/get-products-request.mjs';
|
|
171
53
|
export { BiddingPolicySchema } from '../validation/bidding-policy.mjs';
|
|
172
54
|
export { CanonicalBudgetAllocationSchema } from '../validation/budget-allocation.mjs';
|
|
173
55
|
export { TOOL_REQUEST_SCHEMAS } from '../utils/tool-request-schemas.mjs';
|