posthog-node 5.61.1 → 5.61.2

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.
@@ -223,15 +223,11 @@ function prepareSend(options, defaultMaxRetries) {
223
223
  if (void 0 !== idempotencyKey && ('string' != typeof idempotencyKey || !IDEMPOTENCY_KEY_PATTERN.test(idempotencyKey))) throw invalid('invalid_idempotency_key', 'idempotencyKey must be 1 to 255 visible ASCII characters without spaces.', 'idempotencyKey');
224
224
  if (void 0 !== maxRetries && !(Number.isInteger(maxRetries) && maxRetries >= 0)) throw invalid('invalid_max_retries', 'maxRetries must be a nonnegative integer.', 'maxRetries');
225
225
  const payload = {
226
- template: {
227
- id: templateId.toLowerCase()
228
- },
226
+ template_id: templateId.toLowerCase(),
229
227
  to,
230
228
  message_data: templateData ?? {}
231
229
  };
232
- if (void 0 !== distinctId) payload.identifiers = {
233
- distinct_id: distinctId
234
- };
230
+ if (void 0 !== distinctId) payload.distinct_id = distinctId;
235
231
  return {
236
232
  path: SEND_PATH,
237
233
  body: (0, core_namespaceObject.safeJsonStringify)(payload),
@@ -189,15 +189,11 @@ function prepareSend(options, defaultMaxRetries) {
189
189
  if (void 0 !== idempotencyKey && ('string' != typeof idempotencyKey || !IDEMPOTENCY_KEY_PATTERN.test(idempotencyKey))) throw invalid('invalid_idempotency_key', 'idempotencyKey must be 1 to 255 visible ASCII characters without spaces.', 'idempotencyKey');
190
190
  if (void 0 !== maxRetries && !(Number.isInteger(maxRetries) && maxRetries >= 0)) throw invalid('invalid_max_retries', 'maxRetries must be a nonnegative integer.', 'maxRetries');
191
191
  const payload = {
192
- template: {
193
- id: templateId.toLowerCase()
194
- },
192
+ template_id: templateId.toLowerCase(),
195
193
  to,
196
194
  message_data: templateData ?? {}
197
195
  };
198
- if (void 0 !== distinctId) payload.identifiers = {
199
- distinct_id: distinctId
200
- };
196
+ if (void 0 !== distinctId) payload.distinct_id = distinctId;
201
197
  return {
202
198
  path: SEND_PATH,
203
199
  body: safeJsonStringify(payload),
package/dist/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const version = "5.61.1";
1
+ export declare const version = "5.61.2";
2
2
  //# sourceMappingURL=version.d.ts.map
package/dist/version.js CHANGED
@@ -27,7 +27,7 @@ var __webpack_require__ = {};
27
27
  })();
28
28
  var __webpack_exports__ = {};
29
29
  __webpack_require__.r(__webpack_exports__);
30
- const version = "5.61.1";
30
+ const version = "5.61.2";
31
31
  __webpack_require__.d(__webpack_exports__, {}, {
32
32
  version: version
33
33
  });
package/dist/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- const version = "5.61.1";
1
+ const version = "5.61.2";
2
2
  export { version };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "posthog-node",
3
- "version": "5.61.1",
3
+ "version": "5.61.2",
4
4
  "bugs": {
5
5
  "url": "https://github.com/PostHog/posthog-js/issues"
6
6
  },
@@ -44,8 +44,8 @@
44
44
  "rxjs": "^7.8.0",
45
45
  "typescript": "7.0.2",
46
46
  "vitest": "^1.6.1",
47
- "@posthog/types": "^1.418.0",
48
- "@posthog-tooling/tsconfig-base": "1.1.1"
47
+ "@posthog-tooling/tsconfig-base": "1.1.1",
48
+ "@posthog/types": "^1.419.0"
49
49
  },
50
50
  "peerDependencies": {
51
51
  "@opentelemetry/api": "^1.2.0",
@@ -307,12 +307,12 @@ function prepareSend(options: SendEmailOptions, defaultMaxRetries: number): Prep
307
307
  }
308
308
 
309
309
  const payload: Record<string, unknown> = {
310
- template: { id: templateId.toLowerCase() },
310
+ template_id: templateId.toLowerCase(),
311
311
  to,
312
312
  message_data: templateData ?? {},
313
313
  }
314
314
  if (distinctId !== undefined) {
315
- payload.identifiers = { distinct_id: distinctId }
315
+ payload.distinct_id = distinctId
316
316
  }
317
317
  return {
318
318
  path: SEND_PATH,
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const version = "5.61.1"
1
+ export const version = "5.61.2"