@oursprivacy/platform-sdk 1.19.0 → 1.21.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 (205) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/README.md +8 -12
  3. package/api-promise.d.mts +1 -0
  4. package/api-promise.d.mts.map +1 -1
  5. package/api-promise.d.ts +1 -0
  6. package/api-promise.d.ts.map +1 -1
  7. package/api-promise.mjs +1 -0
  8. package/api-promise.mjs.map +1 -1
  9. package/client.d.mts +21 -6
  10. package/client.d.mts.map +1 -1
  11. package/client.d.ts +21 -6
  12. package/client.d.ts.map +1 -1
  13. package/client.js +17 -2
  14. package/client.js.map +1 -1
  15. package/client.mjs +17 -2
  16. package/client.mjs.map +1 -1
  17. package/core/api-promise.d.mts.map +1 -1
  18. package/core/api-promise.d.ts.map +1 -1
  19. package/core/api-promise.mjs.map +1 -1
  20. package/core/error.mjs.map +1 -1
  21. package/core/pagination.d.mts.map +1 -1
  22. package/core/pagination.d.ts.map +1 -1
  23. package/core/pagination.mjs.map +1 -1
  24. package/core/resource.d.mts.map +1 -1
  25. package/core/resource.d.ts.map +1 -1
  26. package/core/uploads.d.mts.map +1 -1
  27. package/core/uploads.d.ts.map +1 -1
  28. package/core/uploads.mjs.map +1 -1
  29. package/error.d.mts +1 -0
  30. package/error.d.mts.map +1 -1
  31. package/error.d.ts +1 -0
  32. package/error.d.ts.map +1 -1
  33. package/error.mjs +1 -0
  34. package/error.mjs.map +1 -1
  35. package/index.d.mts.map +1 -1
  36. package/index.d.ts.map +1 -1
  37. package/index.mjs.map +1 -1
  38. package/internal/detect-platform.mjs.map +1 -1
  39. package/internal/headers.mjs.map +1 -1
  40. package/internal/parse.d.mts.map +1 -1
  41. package/internal/parse.d.ts.map +1 -1
  42. package/internal/parse.mjs.map +1 -1
  43. package/internal/request-options.d.mts.map +1 -1
  44. package/internal/request-options.d.ts.map +1 -1
  45. package/internal/shims.d.mts +6 -0
  46. package/internal/shims.d.mts.map +1 -1
  47. package/internal/shims.d.ts +6 -0
  48. package/internal/shims.d.ts.map +1 -1
  49. package/internal/to-file.d.mts.map +1 -1
  50. package/internal/to-file.d.ts.map +1 -1
  51. package/internal/to-file.mjs.map +1 -1
  52. package/internal/types.d.mts +4 -4
  53. package/internal/types.d.mts.map +1 -1
  54. package/internal/types.d.ts +4 -4
  55. package/internal/types.d.ts.map +1 -1
  56. package/internal/uploads.d.mts.map +1 -1
  57. package/internal/uploads.d.ts.map +1 -1
  58. package/internal/uploads.mjs.map +1 -1
  59. package/internal/utils/base64.mjs.map +1 -1
  60. package/internal/utils/log.d.mts.map +1 -1
  61. package/internal/utils/log.d.ts.map +1 -1
  62. package/internal/utils/log.mjs.map +1 -1
  63. package/internal/utils/path.mjs.map +1 -1
  64. package/internal/utils/query.mjs.map +1 -1
  65. package/internal/utils/values.mjs.map +1 -1
  66. package/internal/utils.d.mts.map +1 -1
  67. package/internal/utils.d.ts.map +1 -1
  68. package/internal/utils.mjs.map +1 -1
  69. package/package.json +1 -1
  70. package/pagination.d.mts +1 -0
  71. package/pagination.d.mts.map +1 -1
  72. package/pagination.d.ts +1 -0
  73. package/pagination.d.ts.map +1 -1
  74. package/pagination.mjs +1 -0
  75. package/pagination.mjs.map +1 -1
  76. package/resource.d.mts +1 -0
  77. package/resource.d.mts.map +1 -1
  78. package/resource.d.ts +1 -0
  79. package/resource.d.ts.map +1 -1
  80. package/resource.mjs +1 -0
  81. package/resource.mjs.map +1 -1
  82. package/resources/allowed-events.d.mts.map +1 -1
  83. package/resources/allowed-events.d.ts.map +1 -1
  84. package/resources/allowed-events.mjs.map +1 -1
  85. package/resources/consent-settings.d.mts.map +1 -1
  86. package/resources/consent-settings.d.ts.map +1 -1
  87. package/resources/consent-settings.mjs.map +1 -1
  88. package/resources/default-mappings.d.mts +140 -0
  89. package/resources/default-mappings.d.mts.map +1 -0
  90. package/resources/default-mappings.d.ts +140 -0
  91. package/resources/default-mappings.d.ts.map +1 -0
  92. package/resources/default-mappings.js +38 -0
  93. package/resources/default-mappings.js.map +1 -0
  94. package/resources/default-mappings.mjs +34 -0
  95. package/resources/default-mappings.mjs.map +1 -0
  96. package/resources/destination-types.d.mts +21 -13
  97. package/resources/destination-types.d.mts.map +1 -1
  98. package/resources/destination-types.d.ts +21 -13
  99. package/resources/destination-types.d.ts.map +1 -1
  100. package/resources/destination-types.js.map +1 -1
  101. package/resources/destination-types.mjs.map +1 -1
  102. package/resources/destinations.d.mts +61 -98
  103. package/resources/destinations.d.mts.map +1 -1
  104. package/resources/destinations.d.ts +61 -98
  105. package/resources/destinations.d.ts.map +1 -1
  106. package/resources/destinations.js +11 -13
  107. package/resources/destinations.js.map +1 -1
  108. package/resources/destinations.mjs +11 -13
  109. package/resources/destinations.mjs.map +1 -1
  110. package/resources/experiment-settings.d.mts.map +1 -1
  111. package/resources/experiment-settings.d.ts.map +1 -1
  112. package/resources/experiment-settings.mjs.map +1 -1
  113. package/resources/experiment-variants.d.mts.map +1 -1
  114. package/resources/experiment-variants.d.ts.map +1 -1
  115. package/resources/experiment-variants.mjs.map +1 -1
  116. package/resources/experiments.d.mts.map +1 -1
  117. package/resources/experiments.d.ts.map +1 -1
  118. package/resources/experiments.mjs.map +1 -1
  119. package/resources/global-dispatch-centers.d.mts.map +1 -1
  120. package/resources/global-dispatch-centers.d.ts.map +1 -1
  121. package/resources/global-dispatch-centers.mjs.map +1 -1
  122. package/resources/heatmap-pages.d.mts.map +1 -1
  123. package/resources/heatmap-pages.d.ts.map +1 -1
  124. package/resources/heatmap-pages.mjs.map +1 -1
  125. package/resources/index.d.mts +7 -2
  126. package/resources/index.d.mts.map +1 -1
  127. package/resources/index.d.ts +7 -2
  128. package/resources/index.d.ts.map +1 -1
  129. package/resources/index.js +11 -1
  130. package/resources/index.js.map +1 -1
  131. package/resources/index.mjs +5 -0
  132. package/resources/index.mjs.map +1 -1
  133. package/resources/locations.d.mts +270 -0
  134. package/resources/locations.d.mts.map +1 -0
  135. package/resources/locations.d.ts +270 -0
  136. package/resources/locations.d.ts.map +1 -0
  137. package/resources/locations.js +48 -0
  138. package/resources/locations.js.map +1 -0
  139. package/resources/locations.mjs +44 -0
  140. package/resources/locations.mjs.map +1 -0
  141. package/resources/mapping-templates.d.mts +101 -0
  142. package/resources/mapping-templates.d.mts.map +1 -0
  143. package/resources/mapping-templates.d.ts +101 -0
  144. package/resources/mapping-templates.d.ts.map +1 -0
  145. package/resources/mapping-templates.js +22 -0
  146. package/resources/mapping-templates.js.map +1 -0
  147. package/resources/mapping-templates.mjs +18 -0
  148. package/resources/mapping-templates.mjs.map +1 -0
  149. package/resources/mappings.d.mts +186 -6
  150. package/resources/mappings.d.mts.map +1 -1
  151. package/resources/mappings.d.ts +186 -6
  152. package/resources/mappings.d.ts.map +1 -1
  153. package/resources/mappings.js +26 -3
  154. package/resources/mappings.js.map +1 -1
  155. package/resources/mappings.mjs +26 -3
  156. package/resources/mappings.mjs.map +1 -1
  157. package/resources/replay-settings.d.mts.map +1 -1
  158. package/resources/replay-settings.d.ts.map +1 -1
  159. package/resources/replay-settings.mjs.map +1 -1
  160. package/resources/sources.d.mts.map +1 -1
  161. package/resources/sources.d.ts.map +1 -1
  162. package/resources/sources.mjs.map +1 -1
  163. package/resources/versions.d.mts.map +1 -1
  164. package/resources/versions.d.ts.map +1 -1
  165. package/resources/versions.mjs.map +1 -1
  166. package/resources/web-scanner-rules.d.mts +195 -0
  167. package/resources/web-scanner-rules.d.mts.map +1 -0
  168. package/resources/web-scanner-rules.d.ts +195 -0
  169. package/resources/web-scanner-rules.d.ts.map +1 -0
  170. package/resources/web-scanner-rules.js +48 -0
  171. package/resources/web-scanner-rules.js.map +1 -0
  172. package/resources/web-scanner-rules.mjs +44 -0
  173. package/resources/web-scanner-rules.mjs.map +1 -0
  174. package/resources/web-scanners.d.mts +199 -0
  175. package/resources/web-scanners.d.mts.map +1 -0
  176. package/resources/web-scanners.d.ts +199 -0
  177. package/resources/web-scanners.d.ts.map +1 -0
  178. package/resources/web-scanners.js +67 -0
  179. package/resources/web-scanners.js.map +1 -0
  180. package/resources/web-scanners.mjs +63 -0
  181. package/resources/web-scanners.mjs.map +1 -0
  182. package/resources.d.mts.map +1 -1
  183. package/resources.d.ts.map +1 -1
  184. package/resources.mjs.map +1 -1
  185. package/src/client.ts +116 -5
  186. package/src/resources/default-mappings.ts +332 -0
  187. package/src/resources/destination-types.ts +117 -202
  188. package/src/resources/destinations.ts +227 -212
  189. package/src/resources/index.ts +48 -0
  190. package/src/resources/locations.ts +463 -0
  191. package/src/resources/mapping-templates.ts +203 -0
  192. package/src/resources/mappings.ts +320 -5
  193. package/src/resources/web-scanner-rules.ts +304 -0
  194. package/src/resources/web-scanners.ts +333 -0
  195. package/src/version.ts +1 -1
  196. package/uploads.d.mts +1 -0
  197. package/uploads.d.mts.map +1 -1
  198. package/uploads.d.ts +1 -0
  199. package/uploads.d.ts.map +1 -1
  200. package/uploads.mjs +1 -0
  201. package/uploads.mjs.map +1 -1
  202. package/version.d.mts +1 -1
  203. package/version.d.ts +1 -1
  204. package/version.js +1 -1
  205. package/version.mjs +1 -1
@@ -0,0 +1,195 @@
1
+ import { APIResource } from "../core/resource.mjs";
2
+ import { APIPromise } from "../core/api-promise.mjs";
3
+ import { RequestOptions } from "../internal/request-options.mjs";
4
+ export declare class WebScannerRules extends APIResource {
5
+ /**
6
+ * List suppression rules for a single web scanner. Requires the `scannerId` query
7
+ * parameter — rules are always scoped to a parent scanner. Not paginated; the
8
+ * per-scanner rule count is bounded. Requires scope: webScanner:find
9
+ */
10
+ list(query: WebScannerRuleListParams, options?: RequestOptions): APIPromise<WebScannerRuleListResponse>;
11
+ /**
12
+ * Create a suppression rule on a web scanner. Auth is enforced against the parent
13
+ * scanner via `webScanner:update`. At least one of `cookiePatterns`,
14
+ * `domainPatterns`, or `scriptPatterns` should be set for the rule to match
15
+ * anything; omitted pattern arrays default to `[]`. Requires scope:
16
+ * webScanner:update
17
+ */
18
+ create(body: WebScannerRuleCreateParams, options?: RequestOptions): APIPromise<WebScannerRuleCreateResponse>;
19
+ /**
20
+ * Find a single web scanner rule by ID. Requires scope: webScanner:find
21
+ */
22
+ retrieve(id: string, options?: RequestOptions): APIPromise<WebScannerRuleRetrieveResponse>;
23
+ /**
24
+ * Partially update a suppression rule. Only the fields you send are changed.
25
+ * List-valued fields (`cookiePatterns`, `domainPatterns`, `scriptPatterns`) are
26
+ * replaced wholesale when sent. Requires scope: webScanner:update
27
+ */
28
+ update(id: string, body: WebScannerRuleUpdateParams, options?: RequestOptions): APIPromise<WebScannerRuleUpdateResponse>;
29
+ /**
30
+ * Delete a web scanner rule. Requires scope: webScanner:update
31
+ */
32
+ delete(id: string, options?: RequestOptions): APIPromise<WebScannerRuleDeleteResponse>;
33
+ }
34
+ export interface WebScannerRuleListResponse {
35
+ entities: Array<WebScannerRuleListResponse.Entity>;
36
+ }
37
+ export declare namespace WebScannerRuleListResponse {
38
+ interface Entity {
39
+ id: string;
40
+ accountId: string;
41
+ cookiePatterns: Array<string>;
42
+ createdAt: string;
43
+ domainPatterns: Array<string>;
44
+ name: string;
45
+ priority: number;
46
+ scannerId: string;
47
+ scriptPatterns: Array<string>;
48
+ createdByUserId?: string | null;
49
+ notes?: string | null;
50
+ reason?: 'approved' | 'baa' | 'compliant' | 'firstParty' | 'ignore' | 'internal' | 'other' | null;
51
+ updatedAt?: string | null;
52
+ updatedByUserId?: string | null;
53
+ }
54
+ }
55
+ export interface WebScannerRuleCreateResponse {
56
+ id: string;
57
+ accountId: string;
58
+ cookiePatterns: Array<string>;
59
+ createdAt: string;
60
+ domainPatterns: Array<string>;
61
+ name: string;
62
+ priority: number;
63
+ scannerId: string;
64
+ scriptPatterns: Array<string>;
65
+ createdByUserId?: string | null;
66
+ notes?: string | null;
67
+ reason?: 'approved' | 'baa' | 'compliant' | 'firstParty' | 'ignore' | 'internal' | 'other' | null;
68
+ updatedAt?: string | null;
69
+ updatedByUserId?: string | null;
70
+ }
71
+ export interface WebScannerRuleRetrieveResponse {
72
+ id: string;
73
+ accountId: string;
74
+ cookiePatterns: Array<string>;
75
+ createdAt: string;
76
+ domainPatterns: Array<string>;
77
+ name: string;
78
+ priority: number;
79
+ scannerId: string;
80
+ scriptPatterns: Array<string>;
81
+ createdByUserId?: string | null;
82
+ notes?: string | null;
83
+ reason?: 'approved' | 'baa' | 'compliant' | 'firstParty' | 'ignore' | 'internal' | 'other' | null;
84
+ updatedAt?: string | null;
85
+ updatedByUserId?: string | null;
86
+ }
87
+ export interface WebScannerRuleUpdateResponse {
88
+ id: string;
89
+ accountId: string;
90
+ cookiePatterns: Array<string>;
91
+ createdAt: string;
92
+ domainPatterns: Array<string>;
93
+ name: string;
94
+ priority: number;
95
+ scannerId: string;
96
+ scriptPatterns: Array<string>;
97
+ createdByUserId?: string | null;
98
+ notes?: string | null;
99
+ reason?: 'approved' | 'baa' | 'compliant' | 'firstParty' | 'ignore' | 'internal' | 'other' | null;
100
+ updatedAt?: string | null;
101
+ updatedByUserId?: string | null;
102
+ }
103
+ export interface WebScannerRuleDeleteResponse {
104
+ /**
105
+ * The id of the suppression rule that was deleted.
106
+ */
107
+ id: string;
108
+ /**
109
+ * True when the underlying mutation succeeded.
110
+ */
111
+ deleted: boolean;
112
+ }
113
+ export interface WebScannerRuleListParams {
114
+ /**
115
+ * The web scanner whose suppression rules should be returned.
116
+ */
117
+ scannerId: string;
118
+ }
119
+ export interface WebScannerRuleCreateParams {
120
+ /**
121
+ * User-friendly name for the suppression rule.
122
+ */
123
+ name: string;
124
+ /**
125
+ * Rule priority (1–10,000). Lower numbers are evaluated first when multiple rules
126
+ * match.
127
+ */
128
+ priority: number;
129
+ /**
130
+ * The web scanner this rule belongs to.
131
+ */
132
+ scannerId: string;
133
+ /**
134
+ * Glob patterns matched against cookie names (e.g. `_ga*`). Max 100 entries. When
135
+ * sent on PATCH, replaces the existing list wholesale.
136
+ */
137
+ cookiePatterns?: Array<string>;
138
+ /**
139
+ * Glob patterns matched against cookie domain / script hostname (e.g.
140
+ * `*.google-analytics.com`). Max 100 entries. When sent on PATCH, replaces the
141
+ * existing list wholesale.
142
+ */
143
+ domainPatterns?: Array<string>;
144
+ /**
145
+ * Free-form notes about why this rule exists or what it covers. Trimmed
146
+ * server-side; empty strings become `null`.
147
+ */
148
+ notes?: string | null;
149
+ /**
150
+ * Why this rule was added. Surfaced in audit views. Send `null` to clear an
151
+ * existing reason on patch.
152
+ */
153
+ reason?: 'approved' | 'baa' | 'compliant' | 'firstParty' | 'ignore' | 'internal' | 'other' | null;
154
+ /**
155
+ * Glob patterns matched against full script URLs (e.g.
156
+ * `https://www.googletagmanager.com/gtm.js?id=*`). Max 100 entries. When sent on
157
+ * PATCH, replaces the existing list wholesale.
158
+ */
159
+ scriptPatterns?: Array<string>;
160
+ }
161
+ export interface WebScannerRuleUpdateParams {
162
+ /**
163
+ * Glob patterns matched against cookie names (e.g. `_ga*`). Max 100 entries. When
164
+ * sent on PATCH, replaces the existing list wholesale.
165
+ */
166
+ cookiePatterns?: Array<string>;
167
+ /**
168
+ * Glob patterns matched against cookie domain / script hostname (e.g.
169
+ * `*.google-analytics.com`). Max 100 entries. When sent on PATCH, replaces the
170
+ * existing list wholesale.
171
+ */
172
+ domainPatterns?: Array<string>;
173
+ name?: string;
174
+ /**
175
+ * Free-form notes about why this rule exists or what it covers. Trimmed
176
+ * server-side; empty strings become `null`.
177
+ */
178
+ notes?: string | null;
179
+ priority?: number;
180
+ /**
181
+ * Why this rule was added. Surfaced in audit views. Send `null` to clear an
182
+ * existing reason on patch.
183
+ */
184
+ reason?: 'approved' | 'baa' | 'compliant' | 'firstParty' | 'ignore' | 'internal' | 'other' | null;
185
+ /**
186
+ * Glob patterns matched against full script URLs (e.g.
187
+ * `https://www.googletagmanager.com/gtm.js?id=*`). Max 100 entries. When sent on
188
+ * PATCH, replaces the existing list wholesale.
189
+ */
190
+ scriptPatterns?: Array<string>;
191
+ }
192
+ export declare namespace WebScannerRules {
193
+ export { type WebScannerRuleListResponse as WebScannerRuleListResponse, type WebScannerRuleCreateResponse as WebScannerRuleCreateResponse, type WebScannerRuleRetrieveResponse as WebScannerRuleRetrieveResponse, type WebScannerRuleUpdateResponse as WebScannerRuleUpdateResponse, type WebScannerRuleDeleteResponse as WebScannerRuleDeleteResponse, type WebScannerRuleListParams as WebScannerRuleListParams, type WebScannerRuleCreateParams as WebScannerRuleCreateParams, type WebScannerRuleUpdateParams as WebScannerRuleUpdateParams, };
194
+ }
195
+ //# sourceMappingURL=web-scanner-rules.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"web-scanner-rules.d.mts","sourceRoot":"","sources":["../src/resources/web-scanner-rules.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,gCAA4B;AACjD,OAAO,EAAE,cAAc,EAAE,wCAAoC;AAG7D,qBAAa,eAAgB,SAAQ,WAAW;IAC9C;;;;OAIG;IACH,IAAI,CAAC,KAAK,EAAE,wBAAwB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,0BAA0B,CAAC;IAIvG;;;;;;OAMG;IACH,MAAM,CACJ,IAAI,EAAE,0BAA0B,EAChC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,4BAA4B,CAAC;IAI3C;;OAEG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,8BAA8B,CAAC;IAI1F;;;;OAIG;IACH,MAAM,CACJ,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,0BAA0B,EAChC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,4BAA4B,CAAC;IAI3C;;OAEG;IACH,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,4BAA4B,CAAC;CAGvF;AAED,MAAM,WAAW,0BAA0B;IACzC,QAAQ,EAAE,KAAK,CA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M,CAAC,CAAC;IAE/B,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEtB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;;OAGG;IACH,MAAM,CAAC,EAAE,UAAU,GAAG,KAAK,GAAG,WAAW,GAAG,YAAY,GAAG,QAAQ,GAAG,UAAU,GAAG,OAAO,GAAG,IAAI,CAAC;IAElG;;;;OAIG;IACH,cAAc,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;CAChC;AAED,MAAM,CAAC,OAAO,WAAW,eAAe,CAAC;IACvC,OAAO,EACL,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,4BAA4B,IAAI,4BAA4B,EACjE,KAAK,8BAA8B,IAAI,8BAA8B,EACrE,KAAK,4BAA4B,IAAI,4BAA4B,EACjE,KAAK,4BAA4B,IAAI,4BAA4B,EACjE,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,0BAA0B,IAAI,0BAA0B,GAC9D,CAAC;CACH"}
@@ -0,0 +1,195 @@
1
+ import { APIResource } from "../core/resource.js";
2
+ import { APIPromise } from "../core/api-promise.js";
3
+ import { RequestOptions } from "../internal/request-options.js";
4
+ export declare class WebScannerRules extends APIResource {
5
+ /**
6
+ * List suppression rules for a single web scanner. Requires the `scannerId` query
7
+ * parameter — rules are always scoped to a parent scanner. Not paginated; the
8
+ * per-scanner rule count is bounded. Requires scope: webScanner:find
9
+ */
10
+ list(query: WebScannerRuleListParams, options?: RequestOptions): APIPromise<WebScannerRuleListResponse>;
11
+ /**
12
+ * Create a suppression rule on a web scanner. Auth is enforced against the parent
13
+ * scanner via `webScanner:update`. At least one of `cookiePatterns`,
14
+ * `domainPatterns`, or `scriptPatterns` should be set for the rule to match
15
+ * anything; omitted pattern arrays default to `[]`. Requires scope:
16
+ * webScanner:update
17
+ */
18
+ create(body: WebScannerRuleCreateParams, options?: RequestOptions): APIPromise<WebScannerRuleCreateResponse>;
19
+ /**
20
+ * Find a single web scanner rule by ID. Requires scope: webScanner:find
21
+ */
22
+ retrieve(id: string, options?: RequestOptions): APIPromise<WebScannerRuleRetrieveResponse>;
23
+ /**
24
+ * Partially update a suppression rule. Only the fields you send are changed.
25
+ * List-valued fields (`cookiePatterns`, `domainPatterns`, `scriptPatterns`) are
26
+ * replaced wholesale when sent. Requires scope: webScanner:update
27
+ */
28
+ update(id: string, body: WebScannerRuleUpdateParams, options?: RequestOptions): APIPromise<WebScannerRuleUpdateResponse>;
29
+ /**
30
+ * Delete a web scanner rule. Requires scope: webScanner:update
31
+ */
32
+ delete(id: string, options?: RequestOptions): APIPromise<WebScannerRuleDeleteResponse>;
33
+ }
34
+ export interface WebScannerRuleListResponse {
35
+ entities: Array<WebScannerRuleListResponse.Entity>;
36
+ }
37
+ export declare namespace WebScannerRuleListResponse {
38
+ interface Entity {
39
+ id: string;
40
+ accountId: string;
41
+ cookiePatterns: Array<string>;
42
+ createdAt: string;
43
+ domainPatterns: Array<string>;
44
+ name: string;
45
+ priority: number;
46
+ scannerId: string;
47
+ scriptPatterns: Array<string>;
48
+ createdByUserId?: string | null;
49
+ notes?: string | null;
50
+ reason?: 'approved' | 'baa' | 'compliant' | 'firstParty' | 'ignore' | 'internal' | 'other' | null;
51
+ updatedAt?: string | null;
52
+ updatedByUserId?: string | null;
53
+ }
54
+ }
55
+ export interface WebScannerRuleCreateResponse {
56
+ id: string;
57
+ accountId: string;
58
+ cookiePatterns: Array<string>;
59
+ createdAt: string;
60
+ domainPatterns: Array<string>;
61
+ name: string;
62
+ priority: number;
63
+ scannerId: string;
64
+ scriptPatterns: Array<string>;
65
+ createdByUserId?: string | null;
66
+ notes?: string | null;
67
+ reason?: 'approved' | 'baa' | 'compliant' | 'firstParty' | 'ignore' | 'internal' | 'other' | null;
68
+ updatedAt?: string | null;
69
+ updatedByUserId?: string | null;
70
+ }
71
+ export interface WebScannerRuleRetrieveResponse {
72
+ id: string;
73
+ accountId: string;
74
+ cookiePatterns: Array<string>;
75
+ createdAt: string;
76
+ domainPatterns: Array<string>;
77
+ name: string;
78
+ priority: number;
79
+ scannerId: string;
80
+ scriptPatterns: Array<string>;
81
+ createdByUserId?: string | null;
82
+ notes?: string | null;
83
+ reason?: 'approved' | 'baa' | 'compliant' | 'firstParty' | 'ignore' | 'internal' | 'other' | null;
84
+ updatedAt?: string | null;
85
+ updatedByUserId?: string | null;
86
+ }
87
+ export interface WebScannerRuleUpdateResponse {
88
+ id: string;
89
+ accountId: string;
90
+ cookiePatterns: Array<string>;
91
+ createdAt: string;
92
+ domainPatterns: Array<string>;
93
+ name: string;
94
+ priority: number;
95
+ scannerId: string;
96
+ scriptPatterns: Array<string>;
97
+ createdByUserId?: string | null;
98
+ notes?: string | null;
99
+ reason?: 'approved' | 'baa' | 'compliant' | 'firstParty' | 'ignore' | 'internal' | 'other' | null;
100
+ updatedAt?: string | null;
101
+ updatedByUserId?: string | null;
102
+ }
103
+ export interface WebScannerRuleDeleteResponse {
104
+ /**
105
+ * The id of the suppression rule that was deleted.
106
+ */
107
+ id: string;
108
+ /**
109
+ * True when the underlying mutation succeeded.
110
+ */
111
+ deleted: boolean;
112
+ }
113
+ export interface WebScannerRuleListParams {
114
+ /**
115
+ * The web scanner whose suppression rules should be returned.
116
+ */
117
+ scannerId: string;
118
+ }
119
+ export interface WebScannerRuleCreateParams {
120
+ /**
121
+ * User-friendly name for the suppression rule.
122
+ */
123
+ name: string;
124
+ /**
125
+ * Rule priority (1–10,000). Lower numbers are evaluated first when multiple rules
126
+ * match.
127
+ */
128
+ priority: number;
129
+ /**
130
+ * The web scanner this rule belongs to.
131
+ */
132
+ scannerId: string;
133
+ /**
134
+ * Glob patterns matched against cookie names (e.g. `_ga*`). Max 100 entries. When
135
+ * sent on PATCH, replaces the existing list wholesale.
136
+ */
137
+ cookiePatterns?: Array<string>;
138
+ /**
139
+ * Glob patterns matched against cookie domain / script hostname (e.g.
140
+ * `*.google-analytics.com`). Max 100 entries. When sent on PATCH, replaces the
141
+ * existing list wholesale.
142
+ */
143
+ domainPatterns?: Array<string>;
144
+ /**
145
+ * Free-form notes about why this rule exists or what it covers. Trimmed
146
+ * server-side; empty strings become `null`.
147
+ */
148
+ notes?: string | null;
149
+ /**
150
+ * Why this rule was added. Surfaced in audit views. Send `null` to clear an
151
+ * existing reason on patch.
152
+ */
153
+ reason?: 'approved' | 'baa' | 'compliant' | 'firstParty' | 'ignore' | 'internal' | 'other' | null;
154
+ /**
155
+ * Glob patterns matched against full script URLs (e.g.
156
+ * `https://www.googletagmanager.com/gtm.js?id=*`). Max 100 entries. When sent on
157
+ * PATCH, replaces the existing list wholesale.
158
+ */
159
+ scriptPatterns?: Array<string>;
160
+ }
161
+ export interface WebScannerRuleUpdateParams {
162
+ /**
163
+ * Glob patterns matched against cookie names (e.g. `_ga*`). Max 100 entries. When
164
+ * sent on PATCH, replaces the existing list wholesale.
165
+ */
166
+ cookiePatterns?: Array<string>;
167
+ /**
168
+ * Glob patterns matched against cookie domain / script hostname (e.g.
169
+ * `*.google-analytics.com`). Max 100 entries. When sent on PATCH, replaces the
170
+ * existing list wholesale.
171
+ */
172
+ domainPatterns?: Array<string>;
173
+ name?: string;
174
+ /**
175
+ * Free-form notes about why this rule exists or what it covers. Trimmed
176
+ * server-side; empty strings become `null`.
177
+ */
178
+ notes?: string | null;
179
+ priority?: number;
180
+ /**
181
+ * Why this rule was added. Surfaced in audit views. Send `null` to clear an
182
+ * existing reason on patch.
183
+ */
184
+ reason?: 'approved' | 'baa' | 'compliant' | 'firstParty' | 'ignore' | 'internal' | 'other' | null;
185
+ /**
186
+ * Glob patterns matched against full script URLs (e.g.
187
+ * `https://www.googletagmanager.com/gtm.js?id=*`). Max 100 entries. When sent on
188
+ * PATCH, replaces the existing list wholesale.
189
+ */
190
+ scriptPatterns?: Array<string>;
191
+ }
192
+ export declare namespace WebScannerRules {
193
+ export { type WebScannerRuleListResponse as WebScannerRuleListResponse, type WebScannerRuleCreateResponse as WebScannerRuleCreateResponse, type WebScannerRuleRetrieveResponse as WebScannerRuleRetrieveResponse, type WebScannerRuleUpdateResponse as WebScannerRuleUpdateResponse, type WebScannerRuleDeleteResponse as WebScannerRuleDeleteResponse, type WebScannerRuleListParams as WebScannerRuleListParams, type WebScannerRuleCreateParams as WebScannerRuleCreateParams, type WebScannerRuleUpdateParams as WebScannerRuleUpdateParams, };
194
+ }
195
+ //# sourceMappingURL=web-scanner-rules.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"web-scanner-rules.d.ts","sourceRoot":"","sources":["../src/resources/web-scanner-rules.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,4BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,+BAA4B;AACjD,OAAO,EAAE,cAAc,EAAE,uCAAoC;AAG7D,qBAAa,eAAgB,SAAQ,WAAW;IAC9C;;;;OAIG;IACH,IAAI,CAAC,KAAK,EAAE,wBAAwB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,0BAA0B,CAAC;IAIvG;;;;;;OAMG;IACH,MAAM,CACJ,IAAI,EAAE,0BAA0B,EAChC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,4BAA4B,CAAC;IAI3C;;OAEG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,8BAA8B,CAAC;IAI1F;;;;OAIG;IACH,MAAM,CACJ,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,0BAA0B,EAChC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,4BAA4B,CAAC;IAI3C;;OAEG;IACH,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,4BAA4B,CAAC;CAGvF;AAED,MAAM,WAAW,0BAA0B;IACzC,QAAQ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KAAK,CAAC,MAAM,CAAC,CAAC;IAE/B,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEtB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;;OAGG;IACH,MAAM,CAAC,EAAE,UAAU,GAAG,KAAK,GAAG,WAAW,GAAG,YAAY,GAAG,QAAQ,GAAG,UAAU,GAAG,OAAO,GAAG,IAAI,CAAC;IAElG;;;;OAIG;IACH,cAAc,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;CAChC;AAED,MAAM,CAAC,OAAO,WAAW,eAAe,CAAC;IACvC,OAAO,EACL,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,4BAA4B,IAAI,4BAA4B,EACjE,KAAK,8BAA8B,IAAI,8BAA8B,EACrE,KAAK,4BAA4B,IAAI,4BAA4B,EACjE,KAAK,4BAA4B,IAAI,4BAA4B,EACjE,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,0BAA0B,IAAI,0BAA0B,GAC9D,CAAC;CACH"}
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.WebScannerRules = void 0;
5
+ const resource_1 = require("../core/resource.js");
6
+ const path_1 = require("../internal/utils/path.js");
7
+ class WebScannerRules extends resource_1.APIResource {
8
+ /**
9
+ * List suppression rules for a single web scanner. Requires the `scannerId` query
10
+ * parameter — rules are always scoped to a parent scanner. Not paginated; the
11
+ * per-scanner rule count is bounded. Requires scope: webScanner:find
12
+ */
13
+ list(query, options) {
14
+ return this._client.get('/rest/v1/web-scanner-rules', { query, ...options });
15
+ }
16
+ /**
17
+ * Create a suppression rule on a web scanner. Auth is enforced against the parent
18
+ * scanner via `webScanner:update`. At least one of `cookiePatterns`,
19
+ * `domainPatterns`, or `scriptPatterns` should be set for the rule to match
20
+ * anything; omitted pattern arrays default to `[]`. Requires scope:
21
+ * webScanner:update
22
+ */
23
+ create(body, options) {
24
+ return this._client.post('/rest/v1/web-scanner-rules', { body, ...options });
25
+ }
26
+ /**
27
+ * Find a single web scanner rule by ID. Requires scope: webScanner:find
28
+ */
29
+ retrieve(id, options) {
30
+ return this._client.get((0, path_1.path) `/rest/v1/web-scanner-rules/${id}`, options);
31
+ }
32
+ /**
33
+ * Partially update a suppression rule. Only the fields you send are changed.
34
+ * List-valued fields (`cookiePatterns`, `domainPatterns`, `scriptPatterns`) are
35
+ * replaced wholesale when sent. Requires scope: webScanner:update
36
+ */
37
+ update(id, body, options) {
38
+ return this._client.patch((0, path_1.path) `/rest/v1/web-scanner-rules/${id}`, { body, ...options });
39
+ }
40
+ /**
41
+ * Delete a web scanner rule. Requires scope: webScanner:update
42
+ */
43
+ delete(id, options) {
44
+ return this._client.delete((0, path_1.path) `/rest/v1/web-scanner-rules/${id}`, options);
45
+ }
46
+ }
47
+ exports.WebScannerRules = WebScannerRules;
48
+ //# sourceMappingURL=web-scanner-rules.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"web-scanner-rules.js","sourceRoot":"","sources":["../src/resources/web-scanner-rules.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAG/C,oDAA8C;AAE9C,MAAa,eAAgB,SAAQ,sBAAW;IAC9C;;;;OAIG;IACH,IAAI,CAAC,KAA+B,EAAE,OAAwB;QAC5D,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,4BAA4B,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC/E,CAAC;IAED;;;;;;OAMG;IACH,MAAM,CACJ,IAAgC,EAChC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,4BAA4B,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC/E,CAAC;IAED;;OAEG;IACH,QAAQ,CAAC,EAAU,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,8BAA8B,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IAC3E,CAAC;IAED;;;;OAIG;IACH,MAAM,CACJ,EAAU,EACV,IAAgC,EAChC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAA,WAAI,EAAA,8BAA8B,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC1F,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,EAAU,EAAE,OAAwB;QACzC,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAA,WAAI,EAAA,8BAA8B,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IAC9E,CAAC;CACF;AAlDD,0CAkDC"}
@@ -0,0 +1,44 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+ import { APIResource } from "../core/resource.mjs";
3
+ import { path } from "../internal/utils/path.mjs";
4
+ export class WebScannerRules extends APIResource {
5
+ /**
6
+ * List suppression rules for a single web scanner. Requires the `scannerId` query
7
+ * parameter — rules are always scoped to a parent scanner. Not paginated; the
8
+ * per-scanner rule count is bounded. Requires scope: webScanner:find
9
+ */
10
+ list(query, options) {
11
+ return this._client.get('/rest/v1/web-scanner-rules', { query, ...options });
12
+ }
13
+ /**
14
+ * Create a suppression rule on a web scanner. Auth is enforced against the parent
15
+ * scanner via `webScanner:update`. At least one of `cookiePatterns`,
16
+ * `domainPatterns`, or `scriptPatterns` should be set for the rule to match
17
+ * anything; omitted pattern arrays default to `[]`. Requires scope:
18
+ * webScanner:update
19
+ */
20
+ create(body, options) {
21
+ return this._client.post('/rest/v1/web-scanner-rules', { body, ...options });
22
+ }
23
+ /**
24
+ * Find a single web scanner rule by ID. Requires scope: webScanner:find
25
+ */
26
+ retrieve(id, options) {
27
+ return this._client.get(path `/rest/v1/web-scanner-rules/${id}`, options);
28
+ }
29
+ /**
30
+ * Partially update a suppression rule. Only the fields you send are changed.
31
+ * List-valued fields (`cookiePatterns`, `domainPatterns`, `scriptPatterns`) are
32
+ * replaced wholesale when sent. Requires scope: webScanner:update
33
+ */
34
+ update(id, body, options) {
35
+ return this._client.patch(path `/rest/v1/web-scanner-rules/${id}`, { body, ...options });
36
+ }
37
+ /**
38
+ * Delete a web scanner rule. Requires scope: webScanner:update
39
+ */
40
+ delete(id, options) {
41
+ return this._client.delete(path `/rest/v1/web-scanner-rules/${id}`, options);
42
+ }
43
+ }
44
+ //# sourceMappingURL=web-scanner-rules.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"web-scanner-rules.mjs","sourceRoot":"","sources":["../src/resources/web-scanner-rules.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAG/C,OAAO,EAAE,IAAI,EAAE,mCAA+B;AAE9C,MAAM,OAAO,eAAgB,SAAQ,WAAW;IAC9C;;;;OAIG;IACH,IAAI,CAAC,KAA+B,EAAE,OAAwB;QAC5D,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,4BAA4B,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC/E,CAAC;IAED;;;;;;OAMG;IACH,MAAM,CACJ,IAAgC,EAChC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,4BAA4B,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC/E,CAAC;IAED;;OAEG;IACH,QAAQ,CAAC,EAAU,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,8BAA8B,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IAC3E,CAAC;IAED;;;;OAIG;IACH,MAAM,CACJ,EAAU,EACV,IAAgC,EAChC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAA,8BAA8B,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC1F,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,EAAU,EAAE,OAAwB;QACzC,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAA,8BAA8B,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IAC9E,CAAC;CACF"}