posthog-node 5.71.0 → 5.73.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 (49) hide show
  1. package/dist/client.d.ts +53 -7
  2. package/dist/client.d.ts.map +1 -1
  3. package/dist/client.js +94 -19
  4. package/dist/client.mjs +94 -19
  5. package/dist/emails/attachments.d.ts +23 -0
  6. package/dist/emails/attachments.d.ts.map +1 -0
  7. package/dist/emails/attachments.js +170 -0
  8. package/dist/emails/attachments.mjs +123 -0
  9. package/dist/emails/emails.d.ts +7 -2
  10. package/dist/emails/emails.d.ts.map +1 -1
  11. package/dist/emails/emails.js +193 -37
  12. package/dist/emails/emails.mjs +193 -37
  13. package/dist/emails/errors.d.ts +1 -1
  14. package/dist/emails/errors.d.ts.map +1 -1
  15. package/dist/emails/errors.js +6 -1
  16. package/dist/emails/errors.mjs +6 -1
  17. package/dist/emails/types.d.ts +23 -0
  18. package/dist/emails/types.d.ts.map +1 -1
  19. package/dist/exports.d.ts +1 -1
  20. package/dist/exports.d.ts.map +1 -1
  21. package/dist/feature-flag-evaluations.d.ts +14 -0
  22. package/dist/feature-flag-evaluations.d.ts.map +1 -1
  23. package/dist/feature-flag-evaluations.js +2 -1
  24. package/dist/feature-flag-evaluations.mjs +2 -1
  25. package/dist/flag-events.d.ts +112 -0
  26. package/dist/flag-events.d.ts.map +1 -0
  27. package/dist/flag-events.js +230 -0
  28. package/dist/flag-events.mjs +174 -0
  29. package/dist/flags-response.d.ts +83 -0
  30. package/dist/flags-response.d.ts.map +1 -0
  31. package/dist/flags-response.js +255 -0
  32. package/dist/flags-response.mjs +208 -0
  33. package/dist/types.d.ts +2 -1
  34. package/dist/types.d.ts.map +1 -1
  35. package/dist/version.d.ts +1 -1
  36. package/dist/version.js +1 -1
  37. package/dist/version.mjs +1 -1
  38. package/package.json +4 -3
  39. package/src/client.ts +238 -45
  40. package/src/emails/attachments.ts +209 -0
  41. package/src/emails/emails.ts +243 -35
  42. package/src/emails/errors.ts +7 -2
  43. package/src/emails/types.ts +24 -0
  44. package/src/exports.ts +1 -0
  45. package/src/feature-flag-evaluations.ts +17 -0
  46. package/src/flag-events.ts +280 -0
  47. package/src/flags-response.ts +340 -0
  48. package/src/types.ts +2 -1
  49. package/src/version.ts +1 -1
@@ -0,0 +1,170 @@
1
+ "use strict";
2
+ var __webpack_require__ = {};
3
+ (()=>{
4
+ __webpack_require__.d = (exports1, getters, values)=>{
5
+ var define = (defs, kind)=>{
6
+ for(var key in defs)if (__webpack_require__.o(defs, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
7
+ enumerable: true,
8
+ [kind]: defs[key]
9
+ });
10
+ };
11
+ define(getters, "get");
12
+ define(values, "value");
13
+ };
14
+ })();
15
+ (()=>{
16
+ __webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
17
+ })();
18
+ (()=>{
19
+ __webpack_require__.r = (exports1)=>{
20
+ if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
21
+ value: 'Module'
22
+ });
23
+ Object.defineProperty(exports1, '__esModule', {
24
+ value: true
25
+ });
26
+ };
27
+ })();
28
+ var __webpack_exports__ = {};
29
+ __webpack_require__.r(__webpack_exports__);
30
+ __webpack_require__.d(__webpack_exports__, {
31
+ attachmentFiles: ()=>attachmentFiles,
32
+ attachmentReference: ()=>attachmentReference,
33
+ hashedFiles: ()=>hashedFiles,
34
+ refuseRenderedMessageOverLimit: ()=>refuseRenderedMessageOverLimit
35
+ });
36
+ const external_errors_js_namespaceObject = require("./errors.js");
37
+ const MAX_ATTACHMENTS = 10;
38
+ const MAX_MESSAGE_BYTES = 40000000;
39
+ const MESSAGE_HEADERS_BYTES = 65536;
40
+ const SUBJECT_BYTES_PER_ENCODED_WORD = 42;
41
+ const ENCODED_WORD_BYTES = 75;
42
+ const MESSAGE_LIMIT = '40 MB after Base64 encoding, about 29 MB of files';
43
+ const BASE64_PATTERN = /^[A-Za-z0-9+/]*={0,2}$/;
44
+ function attachmentFiles(attachments, { html, text, subject }) {
45
+ if (!Array.isArray(attachments)) throw invalid('attachments must be a list of files.', 'attachments');
46
+ if (attachments.length > MAX_ATTACHMENTS) throw new external_errors_js_namespaceObject.EmailError({
47
+ code: 'too_many_attachments',
48
+ message: `An email carries at most ${MAX_ATTACHMENTS} files, so no email was sent.`,
49
+ field: 'attachments',
50
+ fix: `Attach at most ${MAX_ATTACHMENTS} files, and link to any others from the email body.`
51
+ });
52
+ const checked = Array.from(attachments, checkedAttachment);
53
+ refuseMessageOverLimit(checked.map(({ size })=>size), [
54
+ html ?? '',
55
+ text || html || ''
56
+ ], subject);
57
+ return checked.map(({ content, size, ...file })=>({
58
+ ...file,
59
+ bytes: 'string' == typeof content ? bytesOfBase64(content) : new Uint8Array(content)
60
+ }));
61
+ }
62
+ function refuseRenderedMessageOverLimit(files, content) {
63
+ const html = 'string' == typeof content.html ? content.html : '';
64
+ const text = 'string' == typeof content.text ? content.text : '';
65
+ refuseMessageOverLimit(files.map(({ bytes })=>bytes.byteLength), [
66
+ html,
67
+ text || html
68
+ ], 'string' == typeof content.subject ? content.subject : '');
69
+ }
70
+ async function hashedFiles(files) {
71
+ return Promise.all(files.map(async (file, index)=>({
72
+ ...file,
73
+ sha256: await sha256Hex(file.bytes),
74
+ field: `attachments__${index}`
75
+ })));
76
+ }
77
+ function attachmentReference({ sha256, filename, contentType, contentId }) {
78
+ return {
79
+ sha256,
80
+ filename,
81
+ ...void 0 !== contentType && {
82
+ content_type: contentType
83
+ },
84
+ ...void 0 !== contentId && {
85
+ content_id: contentId
86
+ }
87
+ };
88
+ }
89
+ function checkedAttachment(attachment, index) {
90
+ if ('object' != typeof attachment || null === attachment || Array.isArray(attachment) || ArrayBuffer.isView(attachment)) throw invalid("An attachment is an object with filename and content. Pass the file's bytes as its content.", `attachments__${index}`);
91
+ const { filename, content, contentType, contentId, path, ...unsupported } = attachment;
92
+ if (void 0 !== path) throw invalid("PostHog can't fetch an attachment from a path or URL. Read the file and pass its content instead.", `attachments__${index}__path`);
93
+ const unsupportedKey = Object.entries(unsupported).find(([, value])=>void 0 !== value)?.[0];
94
+ if (void 0 !== unsupportedKey) throw invalid(`An attachment takes filename, content, contentType and contentId, not ${unsupportedKey}.`, `attachments__${index}__${unsupportedKey}`);
95
+ if ('string' != typeof filename || '' === filename) throw invalid("An attachment needs a filename, such as 'invoice.pdf'.", `attachments__${index}__filename`);
96
+ if ('string' != typeof content && !(content instanceof Uint8Array)) throw invalid('An attachment needs content: a Buffer, a Uint8Array or a Base64 string.', `attachments__${index}__content`);
97
+ if ('string' == typeof content && !isBase64(content)) throw invalid("An attachment's content string must be Base64. Pass text as a Buffer or a Uint8Array.", `attachments__${index}__content`);
98
+ if (void 0 !== contentType && 'string' != typeof contentType) throw invalid("An attachment's contentType must be a string, such as 'application/pdf'.", `attachments__${index}__contentType`);
99
+ if (void 0 !== contentId && 'string' != typeof contentId) throw invalid("An attachment's contentId must be a string.", `attachments__${index}__contentId`);
100
+ const size = 'string' == typeof content ? base64DecodedBytes(content) : content.byteLength;
101
+ if (0 === size) throw invalid('An attachment needs at least one byte.', `attachments__${index}__content`);
102
+ return {
103
+ filename,
104
+ content,
105
+ size,
106
+ ...void 0 !== contentType && {
107
+ contentType
108
+ },
109
+ ...void 0 !== contentId && {
110
+ contentId
111
+ }
112
+ };
113
+ }
114
+ function isBase64(text) {
115
+ return text.length % 4 === 0 && BASE64_PATTERN.test(text);
116
+ }
117
+ function base64DecodedBytes(text) {
118
+ const padding = text.endsWith('==') ? 2 : text.endsWith('=') ? 1 : 0;
119
+ return text.length / 4 * 3 - padding;
120
+ }
121
+ function bytesOfBase64(text) {
122
+ if ("u" > typeof Buffer) return Buffer.from(text, 'base64');
123
+ const binary = atob(text);
124
+ const bytes = new Uint8Array(binary.length);
125
+ for(let index = 0; index < binary.length; index++)bytes[index] = binary.charCodeAt(index);
126
+ return bytes;
127
+ }
128
+ function refuseMessageOverLimit(fileSizes, bodies, subject) {
129
+ if (0 === fileSizes.length) return;
130
+ const encoder = new TextEncoder();
131
+ const sizes = [
132
+ ...fileSizes,
133
+ ...bodies.map((body)=>encoder.encode(body).byteLength)
134
+ ];
135
+ const headersBytes = MESSAGE_HEADERS_BYTES + Math.ceil(encoder.encode(subject).byteLength / SUBJECT_BYTES_PER_ENCODED_WORD) * ENCODED_WORD_BYTES;
136
+ if (sizes.reduce((total, size)=>total + base64LinesBytes(size), headersBytes) > MAX_MESSAGE_BYTES) throw new external_errors_js_namespaceObject.EmailError({
137
+ code: 'message_too_large',
138
+ message: `These files make the email larger than ${MESSAGE_LIMIT}, so no email was sent.`,
139
+ field: 'attachments',
140
+ why: "PostHog's email provider takes emails up to 40 MB, and Base64 encoding makes each file about a third larger.",
141
+ fix: 'Send fewer or smaller files, or link to large files from the email body.'
142
+ });
143
+ }
144
+ function base64LinesBytes(size) {
145
+ return Math.ceil(4 * Math.ceil(size / 3) * 78 / 76);
146
+ }
147
+ async function sha256Hex(bytes) {
148
+ const digest = new Uint8Array(await globalThis.crypto.subtle.digest('SHA-256', bytes));
149
+ return Array.from(digest, (byte)=>byte.toString(16).padStart(2, '0')).join('');
150
+ }
151
+ function invalid(message, field) {
152
+ return new external_errors_js_namespaceObject.EmailError({
153
+ code: 'invalid_attachment',
154
+ message,
155
+ field
156
+ });
157
+ }
158
+ exports.attachmentFiles = __webpack_exports__.attachmentFiles;
159
+ exports.attachmentReference = __webpack_exports__.attachmentReference;
160
+ exports.hashedFiles = __webpack_exports__.hashedFiles;
161
+ exports.refuseRenderedMessageOverLimit = __webpack_exports__.refuseRenderedMessageOverLimit;
162
+ for(var __rspack_i in __webpack_exports__)if (-1 === [
163
+ "attachmentFiles",
164
+ "attachmentReference",
165
+ "hashedFiles",
166
+ "refuseRenderedMessageOverLimit"
167
+ ].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
168
+ Object.defineProperty(exports, '__esModule', {
169
+ value: true
170
+ });
@@ -0,0 +1,123 @@
1
+ import { EmailError } from "./errors.mjs";
2
+ const MAX_ATTACHMENTS = 10;
3
+ const MAX_MESSAGE_BYTES = 40000000;
4
+ const MESSAGE_HEADERS_BYTES = 65536;
5
+ const SUBJECT_BYTES_PER_ENCODED_WORD = 42;
6
+ const ENCODED_WORD_BYTES = 75;
7
+ const MESSAGE_LIMIT = '40 MB after Base64 encoding, about 29 MB of files';
8
+ const BASE64_PATTERN = /^[A-Za-z0-9+/]*={0,2}$/;
9
+ function attachmentFiles(attachments, { html, text, subject }) {
10
+ if (!Array.isArray(attachments)) throw invalid('attachments must be a list of files.', 'attachments');
11
+ if (attachments.length > MAX_ATTACHMENTS) throw new EmailError({
12
+ code: 'too_many_attachments',
13
+ message: `An email carries at most ${MAX_ATTACHMENTS} files, so no email was sent.`,
14
+ field: 'attachments',
15
+ fix: `Attach at most ${MAX_ATTACHMENTS} files, and link to any others from the email body.`
16
+ });
17
+ const checked = Array.from(attachments, checkedAttachment);
18
+ refuseMessageOverLimit(checked.map(({ size })=>size), [
19
+ html ?? '',
20
+ text || html || ''
21
+ ], subject);
22
+ return checked.map(({ content, size, ...file })=>({
23
+ ...file,
24
+ bytes: 'string' == typeof content ? bytesOfBase64(content) : new Uint8Array(content)
25
+ }));
26
+ }
27
+ function refuseRenderedMessageOverLimit(files, content) {
28
+ const html = 'string' == typeof content.html ? content.html : '';
29
+ const text = 'string' == typeof content.text ? content.text : '';
30
+ refuseMessageOverLimit(files.map(({ bytes })=>bytes.byteLength), [
31
+ html,
32
+ text || html
33
+ ], 'string' == typeof content.subject ? content.subject : '');
34
+ }
35
+ async function hashedFiles(files) {
36
+ return Promise.all(files.map(async (file, index)=>({
37
+ ...file,
38
+ sha256: await sha256Hex(file.bytes),
39
+ field: `attachments__${index}`
40
+ })));
41
+ }
42
+ function attachmentReference({ sha256, filename, contentType, contentId }) {
43
+ return {
44
+ sha256,
45
+ filename,
46
+ ...void 0 !== contentType && {
47
+ content_type: contentType
48
+ },
49
+ ...void 0 !== contentId && {
50
+ content_id: contentId
51
+ }
52
+ };
53
+ }
54
+ function checkedAttachment(attachment, index) {
55
+ if ('object' != typeof attachment || null === attachment || Array.isArray(attachment) || ArrayBuffer.isView(attachment)) throw invalid("An attachment is an object with filename and content. Pass the file's bytes as its content.", `attachments__${index}`);
56
+ const { filename, content, contentType, contentId, path, ...unsupported } = attachment;
57
+ if (void 0 !== path) throw invalid("PostHog can't fetch an attachment from a path or URL. Read the file and pass its content instead.", `attachments__${index}__path`);
58
+ const unsupportedKey = Object.entries(unsupported).find(([, value])=>void 0 !== value)?.[0];
59
+ if (void 0 !== unsupportedKey) throw invalid(`An attachment takes filename, content, contentType and contentId, not ${unsupportedKey}.`, `attachments__${index}__${unsupportedKey}`);
60
+ if ('string' != typeof filename || '' === filename) throw invalid("An attachment needs a filename, such as 'invoice.pdf'.", `attachments__${index}__filename`);
61
+ if ('string' != typeof content && !(content instanceof Uint8Array)) throw invalid('An attachment needs content: a Buffer, a Uint8Array or a Base64 string.', `attachments__${index}__content`);
62
+ if ('string' == typeof content && !isBase64(content)) throw invalid("An attachment's content string must be Base64. Pass text as a Buffer or a Uint8Array.", `attachments__${index}__content`);
63
+ if (void 0 !== contentType && 'string' != typeof contentType) throw invalid("An attachment's contentType must be a string, such as 'application/pdf'.", `attachments__${index}__contentType`);
64
+ if (void 0 !== contentId && 'string' != typeof contentId) throw invalid("An attachment's contentId must be a string.", `attachments__${index}__contentId`);
65
+ const size = 'string' == typeof content ? base64DecodedBytes(content) : content.byteLength;
66
+ if (0 === size) throw invalid('An attachment needs at least one byte.', `attachments__${index}__content`);
67
+ return {
68
+ filename,
69
+ content,
70
+ size,
71
+ ...void 0 !== contentType && {
72
+ contentType
73
+ },
74
+ ...void 0 !== contentId && {
75
+ contentId
76
+ }
77
+ };
78
+ }
79
+ function isBase64(text) {
80
+ return text.length % 4 === 0 && BASE64_PATTERN.test(text);
81
+ }
82
+ function base64DecodedBytes(text) {
83
+ const padding = text.endsWith('==') ? 2 : text.endsWith('=') ? 1 : 0;
84
+ return text.length / 4 * 3 - padding;
85
+ }
86
+ function bytesOfBase64(text) {
87
+ if ("u" > typeof Buffer) return Buffer.from(text, 'base64');
88
+ const binary = atob(text);
89
+ const bytes = new Uint8Array(binary.length);
90
+ for(let index = 0; index < binary.length; index++)bytes[index] = binary.charCodeAt(index);
91
+ return bytes;
92
+ }
93
+ function refuseMessageOverLimit(fileSizes, bodies, subject) {
94
+ if (0 === fileSizes.length) return;
95
+ const encoder = new TextEncoder();
96
+ const sizes = [
97
+ ...fileSizes,
98
+ ...bodies.map((body)=>encoder.encode(body).byteLength)
99
+ ];
100
+ const headersBytes = MESSAGE_HEADERS_BYTES + Math.ceil(encoder.encode(subject).byteLength / SUBJECT_BYTES_PER_ENCODED_WORD) * ENCODED_WORD_BYTES;
101
+ if (sizes.reduce((total, size)=>total + base64LinesBytes(size), headersBytes) > MAX_MESSAGE_BYTES) throw new EmailError({
102
+ code: 'message_too_large',
103
+ message: `These files make the email larger than ${MESSAGE_LIMIT}, so no email was sent.`,
104
+ field: 'attachments',
105
+ why: "PostHog's email provider takes emails up to 40 MB, and Base64 encoding makes each file about a third larger.",
106
+ fix: 'Send fewer or smaller files, or link to large files from the email body.'
107
+ });
108
+ }
109
+ function base64LinesBytes(size) {
110
+ return Math.ceil(4 * Math.ceil(size / 3) * 78 / 76);
111
+ }
112
+ async function sha256Hex(bytes) {
113
+ const digest = new Uint8Array(await globalThis.crypto.subtle.digest('SHA-256', bytes));
114
+ return Array.from(digest, (byte)=>byte.toString(16).padStart(2, '0')).join('');
115
+ }
116
+ function invalid(message, field) {
117
+ return new EmailError({
118
+ code: 'invalid_attachment',
119
+ message,
120
+ field
121
+ });
122
+ }
123
+ export { attachmentFiles, attachmentReference, hashedFiles, refuseRenderedMessageOverLimit };
@@ -1,4 +1,4 @@
1
- import { type FetchLike, type Logger } from '@posthog/core';
1
+ import { type Logger, type PostHogFetchOptions, type PostHogFetchResponse } from '@posthog/core';
2
2
  import type { Emails, GetEmailResponse, SendEmailOptions, SendEmailResponse, SetEmailPreferencesOptions, SetEmailPreferencesResponse } from './types';
3
3
  export declare const DEFAULT_EMAIL_REQUEST_TIMEOUT_MS = 15000;
4
4
  export declare const DEFAULT_EMAIL_REQUEST_MAX_RETRIES = 2;
@@ -11,8 +11,11 @@ export interface EmailSenderConfig {
11
11
  maxRetries: number;
12
12
  migratedFrom?: string;
13
13
  }
14
+ export interface EmailFetchOptions extends PostHogFetchOptions {
15
+ redirect?: 'manual';
16
+ }
14
17
  export interface EmailSenderHooks {
15
- fetch: FetchLike;
18
+ fetch: (url: string, options: EmailFetchOptions) => Promise<PostHogFetchResponse>;
16
19
  isDisabled: () => boolean;
17
20
  isClosed: () => boolean;
18
21
  logger: Logger;
@@ -39,6 +42,8 @@ export declare class EmailSender implements Emails {
39
42
  drain(): Promise<void>;
40
43
  private sendUntracked;
41
44
  private getUntracked;
45
+ private uploadAttachments;
46
+ private uploadFile;
42
47
  private setPreferencesUntracked;
43
48
  private connect;
44
49
  private headers;
@@ -1 +1 @@
1
- {"version":3,"file":"emails.d.ts","sourceRoot":"","sources":["../../src/emails/emails.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,SAAS,EACd,KAAK,MAAM,EAKZ,MAAM,eAAe,CAAA;AAGtB,OAAO,KAAK,EAMV,MAAM,EACN,gBAAgB,EAEhB,gBAAgB,EAChB,iBAAiB,EAGjB,0BAA0B,EAC1B,2BAA2B,EAE5B,MAAM,SAAS,CAAA;AAiEhB,eAAO,MAAM,gCAAgC,QAAS,CAAA;AACtD,eAAO,MAAM,iCAAiC,IAAI,CAAA;AAElD,MAAM,WAAW,iBAAiB;IAChC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,+DAA+D;IAC/D,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,gBAAgB,EAAE,MAAM,CAAA;IACxB,UAAU,EAAE,MAAM,CAAA;IAClB,YAAY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