@attrkit/mcp 1.0.0 → 1.1.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/CHANGELOG.md +10 -0
- package/dist/cli.js +31 -5
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.1.0 (unreleased: not yet published to npm)
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
|
|
7
|
+
- `send_server_event` accepts an optional `consent.dma` object: `eea`, and optionally
|
|
8
|
+
`ad_user_data` and `ad_personalization`, the user's answers to Google's EU consent questions. It
|
|
9
|
+
is forwarded to the API as `consent.dma` with `source: "manual"`, and only when you give it; a
|
|
10
|
+
call without it sends exactly what 1.0.0 sent. A key the object does not define (`adUserData`
|
|
11
|
+
for `ad_user_data`) is refused before any request, as the API refuses it.
|
|
12
|
+
|
|
3
13
|
## 1.0.0 (2026-09-30)
|
|
4
14
|
|
|
5
15
|
Major version release with input contract formalization, bug fixes, and security hardening.
|
package/dist/cli.js
CHANGED
|
@@ -13876,6 +13876,13 @@ var consentStateSchema = z3.object({
|
|
|
13876
13876
|
policy_version: z3.number().int().positive(),
|
|
13877
13877
|
framework_string: z3.string().max(512).optional()
|
|
13878
13878
|
}).strict();
|
|
13879
|
+
var dmaConsentSchema = z3.object({
|
|
13880
|
+
eea: z3.boolean(),
|
|
13881
|
+
ad_user_data: z3.boolean().optional(),
|
|
13882
|
+
ad_personalization: z3.boolean().optional(),
|
|
13883
|
+
source: z3.enum(["tcf", "manual"])
|
|
13884
|
+
}).strict();
|
|
13885
|
+
var firstOpenConsentSchema = consentStateSchema.extend({ dma: dmaConsentSchema.optional() }).strict();
|
|
13879
13886
|
var coarseContextSchema = z3.object({
|
|
13880
13887
|
country_code: z3.string().regex(/^[A-Z]{2}$/).optional(),
|
|
13881
13888
|
region_code: z3.string().max(16).optional(),
|
|
@@ -13940,7 +13947,7 @@ var firstOpenEnvelopeSchema = z3.object({
|
|
|
13940
13947
|
occurred_at: z3.string().datetime({ offset: true }),
|
|
13941
13948
|
app_version: z3.string().min(1).max(128),
|
|
13942
13949
|
coarse_context: coarseContextSchema,
|
|
13943
|
-
consent:
|
|
13950
|
+
consent: firstOpenConsentSchema,
|
|
13944
13951
|
app_transaction_jws: z3.string().min(16).max(32768).optional(),
|
|
13945
13952
|
asa_token: z3.string().min(8).max(8192).optional(),
|
|
13946
13953
|
exact_token_ref: exactTokenReferenceSchema.optional(),
|
|
@@ -13969,7 +13976,8 @@ var identifyEnvelopeSchema = z3.object({
|
|
|
13969
13976
|
var eventConsentSchema = z3.object({
|
|
13970
13977
|
measurement: z3.enum(["granted", "denied", "unknown"]),
|
|
13971
13978
|
tracking: z3.enum(["granted", "denied", "unknown"]),
|
|
13972
|
-
policy_version: z3.number().int().positive()
|
|
13979
|
+
policy_version: z3.number().int().positive(),
|
|
13980
|
+
dma: dmaConsentSchema.optional()
|
|
13973
13981
|
}).strict();
|
|
13974
13982
|
var propertyScalarSchema = z3.union([
|
|
13975
13983
|
z3.string().max(1024),
|
|
@@ -15047,7 +15055,7 @@ ${body}`
|
|
|
15047
15055
|
structuredContent: structured
|
|
15048
15056
|
}, result.nextCursor);
|
|
15049
15057
|
}
|
|
15050
|
-
var SERVER_VERSION = "1.
|
|
15058
|
+
var SERVER_VERSION = "1.1.0";
|
|
15051
15059
|
var periodSchema = z5.enum(["7d", "30d", "90d", "all"]).describe("Reporting window. Omit to use the endpoint's documented default.").optional();
|
|
15052
15060
|
var appIdSchema = z5.string().describe("Optional app id to scope the result to one app.").optional();
|
|
15053
15061
|
var requiredAppIdSchema = z5.string().min(1).describe("The AttriKit app id.");
|
|
@@ -15802,13 +15810,31 @@ function createServer(config, fetchImpl) {
|
|
|
15802
15810
|
consent: z5.object({
|
|
15803
15811
|
measurement: z5.enum(["granted", "denied", "unknown"]),
|
|
15804
15812
|
tracking: z5.enum(["granted", "denied", "unknown"]),
|
|
15805
|
-
policy_version: z5.number().int().positive()
|
|
15813
|
+
policy_version: z5.number().int().positive(),
|
|
15814
|
+
dma: z5.object({
|
|
15815
|
+
eea: z5.boolean().describe("Whether EEA, UK or Swiss rules apply to this user."),
|
|
15816
|
+
ad_user_data: z5.boolean().optional().describe("The user's ad_user_data consent."),
|
|
15817
|
+
ad_personalization: z5.boolean().optional().describe("The user's ad_personalization consent.")
|
|
15818
|
+
}).strict().optional().describe("Optional. The user's answers to Google's EU consent questions, sent to Google with this event. A value left out is derived from tracking; an unknown key is refused, as the API refuses it.")
|
|
15806
15819
|
}).describe("The per-event consent SDK events carry. An event whose measurement is not granted is not collected."),
|
|
15807
15820
|
properties: z5.record(z5.string(), z5.union([z5.string().max(1024), z5.number(), z5.boolean(), z5.null()])).optional().describe("Scalar values only, at most 64 keys. Revenue is value (major units) or price_minor_units with currency, an ISO 4217 code."),
|
|
15808
15821
|
idempotency_key: idempotencyKeySchema
|
|
15809
15822
|
}
|
|
15810
15823
|
}, async ({ app_id, customer_user_id, event_id, event_name, event_version, occurred_at, consent, properties, idempotency_key }) => {
|
|
15811
|
-
const
|
|
15824
|
+
const forwardedConsent = {
|
|
15825
|
+
measurement: consent.measurement,
|
|
15826
|
+
tracking: consent.tracking,
|
|
15827
|
+
policy_version: consent.policy_version
|
|
15828
|
+
};
|
|
15829
|
+
if (consent.dma !== undefined) {
|
|
15830
|
+
const dma = { eea: consent.dma.eea, source: "manual" };
|
|
15831
|
+
if (consent.dma.ad_user_data !== undefined)
|
|
15832
|
+
dma.ad_user_data = consent.dma.ad_user_data;
|
|
15833
|
+
if (consent.dma.ad_personalization !== undefined)
|
|
15834
|
+
dma.ad_personalization = consent.dma.ad_personalization;
|
|
15835
|
+
forwardedConsent.dma = dma;
|
|
15836
|
+
}
|
|
15837
|
+
const body = { customer_user_id, event_id, event_name, event_version, occurred_at, consent: forwardedConsent };
|
|
15812
15838
|
if (properties !== undefined)
|
|
15813
15839
|
body.properties = properties;
|
|
15814
15840
|
return toToolResult(await call(`/api/v1/apps/${encodeOpaquePathSegment(app_id)}/events`, {
|