@oursprivacy/platform-sdk 1.45.0 → 1.46.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.
Files changed (43) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/client.d.mts +5 -2
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +5 -2
  5. package/client.d.ts.map +1 -1
  6. package/client.js +3 -0
  7. package/client.js.map +1 -1
  8. package/client.mjs +3 -0
  9. package/client.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/index.d.mts +2 -1
  12. package/resources/index.d.mts.map +1 -1
  13. package/resources/index.d.ts +2 -1
  14. package/resources/index.d.ts.map +1 -1
  15. package/resources/index.js +3 -1
  16. package/resources/index.js.map +1 -1
  17. package/resources/index.mjs +1 -0
  18. package/resources/index.mjs.map +1 -1
  19. package/resources/personalization-properties.d.mts +547 -0
  20. package/resources/personalization-properties.d.mts.map +1 -0
  21. package/resources/personalization-properties.d.ts +547 -0
  22. package/resources/personalization-properties.d.ts.map +1 -0
  23. package/resources/personalization-properties.js +100 -0
  24. package/resources/personalization-properties.js.map +1 -0
  25. package/resources/personalization-properties.mjs +96 -0
  26. package/resources/personalization-properties.mjs.map +1 -0
  27. package/resources/versions.d.mts +52 -1
  28. package/resources/versions.d.mts.map +1 -1
  29. package/resources/versions.d.ts +52 -1
  30. package/resources/versions.d.ts.map +1 -1
  31. package/resources/versions.js +20 -0
  32. package/resources/versions.js.map +1 -1
  33. package/resources/versions.mjs +20 -0
  34. package/resources/versions.mjs.map +1 -1
  35. package/src/client.ts +31 -0
  36. package/src/resources/index.ts +14 -0
  37. package/src/resources/personalization-properties.ts +662 -0
  38. package/src/resources/versions.ts +95 -0
  39. package/src/version.ts +1 -1
  40. package/version.d.mts +1 -1
  41. package/version.d.ts +1 -1
  42. package/version.js +1 -1
  43. package/version.mjs +1 -1
@@ -107,6 +107,31 @@ export class Versions extends APIResource {
107
107
  return this._client.get(path`/rest/v1/versions/${id}/diff`, { query, ...options });
108
108
  }
109
109
 
110
+ /**
111
+ * Check whether one entity has unpublished changes, without fetching the org-wide
112
+ * draft diff.
113
+ * `GET /rest/v1/versions/draft/status?collection={collection}&entityId={id}`
114
+ * returns `status: "added" | "modified" | "removed" | null` for that entity, with
115
+ * the same semantics as `GET /rest/v1/versions/draft/diff` — it shares the diff's
116
+ * field blacklist, so passive fields (timestamps, sync bookkeeping) do not count
117
+ * as a change.
118
+ *
119
+ * `status` is `null` for every outcome other than a real pending change: the
120
+ * entity already matches the published version, the id is unknown, the id belongs
121
+ * to another account, or the account has never published anything. Use
122
+ * `GET /rest/v1/versions/draft/diff` when you need the full change set instead of
123
+ * one entity. (`draft` is a literal path segment identifying the live draft as the
124
+ * target, which is why the entity is passed as `entityId` rather than `id`.)
125
+ * Requires scope: version:find
126
+ */
127
+ status(
128
+ id: 'draft',
129
+ query: VersionStatusParams,
130
+ options?: RequestOptions,
131
+ ): APIPromise<VersionStatusResponse> {
132
+ return this._client.get(path`/rest/v1/versions/${id}/status`, { query, ...options });
133
+ }
134
+
110
135
  /**
111
136
  * Revert one or more pending draft changes back to the latest published version
112
137
  * (the "abandon a change" action). Send a body listing the entities to revert;
@@ -3077,6 +3102,43 @@ export namespace VersionDiffResponse {
3077
3102
  }
3078
3103
  }
3079
3104
 
3105
+ export interface VersionStatusResponse {
3106
+ /**
3107
+ * Echo of the requested entity id.
3108
+ */
3109
+ id: string;
3110
+
3111
+ /**
3112
+ * Echo of the requested collection.
3113
+ */
3114
+ collection:
3115
+ | 'allowedEvents'
3116
+ | 'consentSettings'
3117
+ | 'dataGovernanceEvents'
3118
+ | 'dataGovernanceRules'
3119
+ | 'destinations'
3120
+ | 'experimentSettings'
3121
+ | 'externalAllowedEventData'
3122
+ | 'globalDispatchCenters'
3123
+ | 'mappings'
3124
+ | 'replaySettings'
3125
+ | 'sources'
3126
+ | 'tagManagerTags'
3127
+ | 'tagManagerTriggers'
3128
+ | 'tagManagerVariables'
3129
+ | 'tagManagers';
3130
+
3131
+ /**
3132
+ * How the entity differs from the latest published version: `added` exists only in
3133
+ * the draft, `modified` exists in both with unpublished edits, `removed` exists
3134
+ * only in the published version. `null` covers every other outcome — the entity
3135
+ * matches the published version, is unknown, belongs to another account, or the
3136
+ * account has never published — so callers cannot use it to probe for entities
3137
+ * outside their account.
3138
+ */
3139
+ status: 'added' | 'modified' | 'removed' | null;
3140
+ }
3141
+
3080
3142
  export interface VersionRevertResponse {
3081
3143
  /**
3082
3144
  * Newly-added draft entities that were deleted.
@@ -3266,6 +3328,37 @@ export interface VersionDiffParams {
3266
3328
  against?: string;
3267
3329
  }
3268
3330
 
3331
+ export interface VersionStatusParams {
3332
+ /**
3333
+ * Entity collection the id belongs to. `experiments` and `experimentVariants` are
3334
+ * not supported — draft experiments never snapshot into a version — but
3335
+ * `experimentSettings` is.
3336
+ */
3337
+ collection:
3338
+ | 'allowedEvents'
3339
+ | 'consentSettings'
3340
+ | 'dataGovernanceEvents'
3341
+ | 'dataGovernanceRules'
3342
+ | 'destinations'
3343
+ | 'experimentSettings'
3344
+ | 'externalAllowedEventData'
3345
+ | 'globalDispatchCenters'
3346
+ | 'mappings'
3347
+ | 'replaySettings'
3348
+ | 'sources'
3349
+ | 'tagManagerTags'
3350
+ | 'tagManagerTriggers'
3351
+ | 'tagManagerVariables'
3352
+ | 'tagManagers';
3353
+
3354
+ /**
3355
+ * Id of the entity to check. Most collections use UUIDs; `allowedEvents`,
3356
+ * `externalAllowedEventData`, `mappings`, `consentSettings`,
3357
+ * `globalDispatchCenters`, and `replaySettings` use slug-like strings.
3358
+ */
3359
+ entityId: string;
3360
+ }
3361
+
3269
3362
  export interface VersionRevertParams {
3270
3363
  /**
3271
3364
  * Draft entities to revert back to the latest published version. Each entry is
@@ -3316,6 +3409,7 @@ export declare namespace Versions {
3316
3409
  type VersionPublishResponse as VersionPublishResponse,
3317
3410
  type VersionSnapshotResponse as VersionSnapshotResponse,
3318
3411
  type VersionDiffResponse as VersionDiffResponse,
3412
+ type VersionStatusResponse as VersionStatusResponse,
3319
3413
  type VersionRevertResponse as VersionRevertResponse,
3320
3414
  type VersionAbandonResponse as VersionAbandonResponse,
3321
3415
  type VersionListResponsesCursor as VersionListResponsesCursor,
@@ -3323,6 +3417,7 @@ export declare namespace Versions {
3323
3417
  type VersionCreateParams as VersionCreateParams,
3324
3418
  type VersionUpdateParams as VersionUpdateParams,
3325
3419
  type VersionDiffParams as VersionDiffParams,
3420
+ type VersionStatusParams as VersionStatusParams,
3326
3421
  type VersionRevertParams as VersionRevertParams,
3327
3422
  };
3328
3423
  }
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '1.45.0'; // x-release-please-version
1
+ export const VERSION = '1.46.0'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "1.45.0";
1
+ export declare const VERSION = "1.46.0";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "1.45.0";
1
+ export declare const VERSION = "1.46.0";
2
2
  //# sourceMappingURL=version.d.ts.map
package/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '1.45.0'; // x-release-please-version
4
+ exports.VERSION = '1.46.0'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '1.45.0'; // x-release-please-version
1
+ export const VERSION = '1.46.0'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map