@remit/backend 0.0.154 → 0.0.156

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.
@@ -1,15 +1,3 @@
1
- /**
2
- * Build the public CloudFront URL that fetches a single body part for a
3
- * message. The path layout is what the Lambda@Edge JWT verifier expects
4
- * (PR 1 of #224): `/content/accounts/{accountConfigId}/{accountId}/messages/
5
- * {messageId}/parts/{partPath}`.
6
- *
7
- * The function is intentionally pure — domain comes from configuration so
8
- * tests can pin the output without env vars. `partPath` is passed through
9
- * `encodeURIComponent` because IMAP section paths are dot-separated digits
10
- * (e.g. `1`, `1.2`, `2.1.3`) but a defensive encode keeps the builder safe
11
- * if the path ever carries unexpected characters.
12
- */
13
1
  import type { ContentSigner } from "./contentSignature.js";
14
2
  export interface BuildContentUrlInput {
15
3
  domain: string;
@@ -1,3 +1,16 @@
1
+ /**
2
+ * Build the public CloudFront URL that fetches a single body part for a
3
+ * message. The path layout is what the Lambda@Edge JWT verifier expects
4
+ * (PR 1 of #224): `/content/accounts/{accountConfigId}/{accountId}/messages/
5
+ * {messageId}/parts/{partPath}`.
6
+ *
7
+ * The function is intentionally pure — domain comes from configuration so
8
+ * tests can pin the output without env vars. `partPath` is passed through
9
+ * `encodeURIComponent` because IMAP section paths are dot-separated digits
10
+ * (e.g. `1`, `1.2`, `2.1.3`) but a defensive encode keeps the builder safe
11
+ * if the path ever carries unexpected characters.
12
+ */
13
+ import { buildBodyPartKey } from "@remit/storage-service";
1
14
  export const buildStorageContentUrl = (input) => {
2
15
  const { domain, storageKey, sign } = input;
3
16
  const normalizedDomain = domain.replace(/\/+$/, "");
@@ -21,7 +34,7 @@ export const buildContentUrl = (input) => {
21
34
  const { domain, accountConfigId, accountId, messageId, partPath, sign } = input;
22
35
  return buildStorageContentUrl({
23
36
  domain,
24
- storageKey: `accounts/${accountConfigId}/${accountId}/messages/${messageId}/parts/${partPath}`,
37
+ storageKey: buildBodyPartKey(accountConfigId, accountId, messageId, partPath),
25
38
  sign,
26
39
  });
27
40
  };
@@ -18,7 +18,7 @@ export declare const buildListThreadsOptions: (query: {
18
18
  order: "asc" | "desc";
19
19
  continuationToken: string | undefined;
20
20
  limit: number;
21
- attributes: ("mailboxId" | "messageId" | "referenceOrder" | "createdAt" | "updatedAt" | "accountConfigId" | "uid" | "category" | "subject" | "internalDate" | "inReplyTo" | "fromName" | "threadMessageId" | "star" | "threadId" | "sentDate" | "isRead" | "hasAttachment" | "hasStars" | "isDeleted" | "messageIdHeader" | "fromEmail" | "listId" | "snippet")[];
21
+ attributes: ("mailboxId" | "messageId" | "accountConfigId" | "createdAt" | "updatedAt" | "threadMessageId" | "threadId" | "uid" | "messageIdHeader" | "inReplyTo" | "referenceOrder" | "fromEmail" | "fromName" | "subject" | "listId" | "internalDate" | "sentDate" | "isRead" | "hasAttachment" | "star" | "hasStars" | "isDeleted" | "snippet" | "category")[];
22
22
  excludeDeleted: boolean;
23
23
  };
24
24
  /**
@@ -34,7 +34,7 @@ export declare const buildSearchThreadsOptions: (query: {
34
34
  order: "asc" | "desc";
35
35
  continuationToken: string | undefined;
36
36
  limit: number | undefined;
37
- attributes: ("mailboxId" | "messageId" | "referenceOrder" | "createdAt" | "updatedAt" | "accountConfigId" | "uid" | "category" | "subject" | "internalDate" | "inReplyTo" | "fromName" | "threadMessageId" | "star" | "threadId" | "sentDate" | "isRead" | "hasAttachment" | "hasStars" | "isDeleted" | "messageIdHeader" | "fromEmail" | "listId" | "snippet")[];
37
+ attributes: ("mailboxId" | "messageId" | "accountConfigId" | "createdAt" | "updatedAt" | "threadMessageId" | "threadId" | "uid" | "messageIdHeader" | "inReplyTo" | "referenceOrder" | "fromEmail" | "fromName" | "subject" | "listId" | "internalDate" | "sentDate" | "isRead" | "hasAttachment" | "star" | "hasStars" | "isDeleted" | "snippet" | "category")[];
38
38
  excludeDeleted: boolean;
39
39
  };
40
40
  type WindowOptions = {
@@ -1,4 +1,4 @@
1
- import { BETTER_SQLITE3_LIMITS, createSqliteRepositories, DEFAULT_MESSAGE_OBJECT_DELETE_CONCURRENCY, openSqliteDatabases, sqliteDatabasePathsFromEnv, } from "@remit/drizzle-service";
1
+ import { BETTER_SQLITE3_LIMITS, createSqliteRepositories, openSqliteDatabases, sqliteDatabasePathsFromEnv, } from "@remit/drizzle-service";
2
2
  import { createRemitClient, } from "./create-remit-client.js";
3
3
  import { buildSharedDeps, sqsQueues, sqsQueueUrlsFromEnv, } from "./shared-deps.js";
4
4
  // The SQLite adapter composition (RFC 036). Every repo runs on the database
@@ -8,7 +8,6 @@ export const composeSqliteClient = async (shared) => {
8
8
  return createRemitClient({
9
9
  repositories: createSqliteRepositories(databases, BETTER_SQLITE3_LIMITS, {
10
10
  storage: shared.storage,
11
- messageObjectDeleteConcurrency: DEFAULT_MESSAGE_OBJECT_DELETE_CONCURRENCY,
12
11
  }),
13
12
  ...shared,
14
13
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remit/backend",
3
- "version": "0.0.154",
3
+ "version": "0.0.156",
4
4
  "description": "Remit Mail Inspector API backend",
5
5
  "license": "MIT",
6
6
  "author": "",
@@ -123,7 +123,7 @@
123
123
  "@types/better-sqlite3": "^7.6.13",
124
124
  "@remit/logger": "*",
125
125
  "@remit/api-openapi-spec": "*",
126
- "zod": "^3.25.0"
126
+ "zod": "^4.6.7"
127
127
  },
128
128
  "publishConfig": {
129
129
  "access": "public"