@cowliss/sdk 0.3.0 → 0.5.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/dist/types.d.ts CHANGED
@@ -13,7 +13,7 @@
13
13
  * typecheck here rather than at a customer's call site.
14
14
  */
15
15
  /** The API's error-code enum, as the SDK surfaces it on `CowError.code`. */
16
- export type ErrorCode = "malformed_request" | "invalid_key" | "forbidden" | "not_found" | "conflict" | "payload_too_large" | "validation_failed" | "trait_validation_failed" | "event_denied" | "trait_denied" | "over_quota" | "rate_limited" | "dependency_unavailable" | "internal" | "journey_fuel_exceeded" | "journey_timeout" | "journey_memory_exceeded" | "journey_error" | "journey_output_invalid" | "journey_nondeterministic" | "release_invalid" | "release_not_ready" | "project_exists" | "project_missing" | "artifact_too_large" | "deploy_key_scope";
16
+ export type ErrorCode = "malformed_request" | "invalid_key" | "forbidden" | "not_found" | "conflict" | "payload_too_large" | "validation_failed" | "trait_validation_failed" | "event_denied" | "trait_denied" | "over_quota" | "rate_limited" | "dependency_unavailable" | "internal" | "journey_fuel_exceeded" | "journey_timeout" | "journey_memory_exceeded" | "journey_error" | "journey_output_invalid" | "journey_nondeterministic" | "push_invalid" | "version_not_ready" | "project_exists" | "project_missing" | "artifact_too_large";
17
17
  export type Environment = "development" | "production";
18
18
  export type IdentifierKind = "anonymousId" | "userId" | "clerkId" | "email";
19
19
  /**
@@ -60,10 +60,23 @@ export type EventDto = {
60
60
  receivedAt: string;
61
61
  messageId: string | null;
62
62
  };
63
+ /** The fixed consent purposes, as a caller patches them. */
64
+ export type ConsentPatch = {
65
+ emailMarketing?: boolean;
66
+ dataProcessing?: boolean;
67
+ };
63
68
  export type IdentifyInput = {
64
69
  sourceId: string;
65
70
  identifiers: Identifiers;
66
71
  traits?: Record<string, unknown>;
72
+ /**
73
+ * What this person agreed to, as a merge patch: a purpose the call omits
74
+ * keeps the value it had, so a later identify is never an accidental
75
+ * revocation. Omitting it entirely leaves consent untouched, which on a
76
+ * first write means marketing denied and data processing granted. At least
77
+ * one purpose when present.
78
+ */
79
+ consent?: ConsentPatch;
67
80
  /** ISO 8601 UTC. A past timestamp backdates a first-write profile. */
68
81
  timestamp?: string;
69
82
  messageId?: string;
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "0.3.0";
1
+ export declare const SDK_VERSION = "0.5.0";
@@ -1,2 +1,2 @@
1
1
  // Generated by scripts/version.ts from package.json. Do not edit.
2
- export const SDK_VERSION = "0.3.0";
2
+ export const SDK_VERSION = "0.5.0";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cowliss/sdk",
3
- "version": "0.3.0",
3
+ "version": "0.5.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {