shipmail 0.4.13 → 0.4.14

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.
@@ -5,6 +5,8 @@ var API_KEY_SCOPES = [
5
5
  "*",
6
6
  "audiences:read",
7
7
  "audiences:write",
8
+ "automations:read",
9
+ "automations:write",
8
10
  "booking_pages:read",
9
11
  "booking_pages:write",
10
12
  "calendar:read",
@@ -41,6 +43,8 @@ var API_KEY_SCOPE_DESCRIPTIONS = {
41
43
  "*": "All non-partner API endpoints in this organization.",
42
44
  "audiences:read": "List and retrieve newsletter audiences and their subscribers.",
43
45
  "audiences:write": "Create audiences and add, update, or remove their subscribers.",
46
+ "automations:read": "List and retrieve assistant automations.",
47
+ "automations:write": "Create, update, and manually run assistant automations.",
44
48
  "booking_pages:read": "List and retrieve booking pages.",
45
49
  "booking_pages:write": "Create, update, and delete booking pages.",
46
50
  "calendar:read": "List and retrieve calendar events and open availability.",
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/api-key-scopes.ts"],"names":[],"mappings":";;;AAAO,IAAM,cAAA,GAAiB;AAAA,EAC5B,GAAA;AAAA,EACA,gBAAA;AAAA,EACA,iBAAA;AAAA,EACA,oBAAA;AAAA,EACA,qBAAA;AAAA,EACA,eAAA;AAAA,EACA,gBAAA;AAAA,EACA,cAAA;AAAA,EACA,eAAA;AAAA,EACA,gBAAA;AAAA,EACA,kBAAA;AAAA,EACA,iBAAA;AAAA,EACA,0BAAA;AAAA,EACA,2BAAA;AAAA,EACA,yBAAA;AAAA,EACA,0BAAA;AAAA,EACA,oBAAA;AAAA,EACA,qBAAA;AAAA,EACA,eAAA;AAAA,EACA,gBAAA;AAAA,EACA,cAAA;AAAA,EACA,eAAA;AAAA,EACA,kBAAA;AAAA,EACA,mBAAA;AAAA,EACA,cAAA;AAAA,EACA,eAAA;AAAA,EACA,gBAAA;AAAA,EACA,mBAAA;AAAA,EACA,oBAAA;AAAA,EACA,4BAAA;AAAA,EACA,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,cAAc,KAAA,EAAqC;AACjE,EAAA,OAAO,cAAA,CAAe,IAAA,CAAK,CAAC,KAAA,KAAU,UAAU,KAAK,CAAA;AACvD;AAEO,SAAS,iBAAA,CACd,eACA,aAAA,EACS;AACT,EAAA,IAAI,aAAA,KAAkB,UAAU,OAAO,IAAA;AACvC,EAAA,IAAI,cAAc,UAAA,CAAW,UAAU,GAAG,OAAO,aAAA,CAAc,SAAS,aAAa,CAAA;AACrF,EAAA,OAAO,cAAc,QAAA,CAAS,GAAG,CAAA,IAAK,aAAA,CAAc,SAAS,aAAa,CAAA;AAC5E","file":"api-key-scopes.cjs","sourcesContent":["export const API_KEY_SCOPES = [\n \"*\",\n \"audiences:read\",\n \"audiences:write\",\n \"booking_pages:read\",\n \"booking_pages:write\",\n \"calendar:read\",\n \"calendar:write\",\n \"domains:read\",\n \"domains:write\",\n \"mailboxes:read\",\n \"mailboxes:export\",\n \"mailboxes:write\",\n \"mailbox_credentials:read\",\n \"mailbox_credentials:write\",\n \"mailbox_forwarding:read\",\n \"mailbox_forwarding:write\",\n \"mailbox_rules:read\",\n \"mailbox_rules:write\",\n \"messages:read\",\n \"messages:write\",\n \"drafts:write\",\n \"messages:send\",\n \"newsletters:read\",\n \"newsletters:write\",\n \"threads:read\",\n \"webhooks:read\",\n \"webhooks:write\",\n \"suppressions:read\",\n \"suppressions:write\",\n \"partner:organizations:read\",\n \"partner:organizations:write\",\n \"partner:organizations:access\",\n \"partner:mailbox_credentials:issue\",\n \"partner:usage:read\",\n] as const;\n\nexport type ApiKeyScope = (typeof API_KEY_SCOPES)[number];\n\nexport const API_KEY_SCOPE_DESCRIPTIONS: Readonly<Record<ApiKeyScope, string>> = {\n \"*\": \"All non-partner API endpoints in this organization.\",\n \"audiences:read\": \"List and retrieve newsletter audiences and their subscribers.\",\n \"audiences:write\": \"Create audiences and add, update, or remove their subscribers.\",\n \"booking_pages:read\": \"List and retrieve booking pages.\",\n \"booking_pages:write\": \"Create, update, and delete booking pages.\",\n \"calendar:read\": \"List and retrieve calendar events and open availability.\",\n \"calendar:write\": \"Create, update, and delete calendar events.\",\n \"domains:read\": \"List, retrieve, and verify domains.\",\n \"domains:write\": \"Create, update, and delete domains.\",\n \"mailboxes:read\": \"List and retrieve mailboxes.\",\n \"mailboxes:export\": \"Create and download mailbox content exports.\",\n \"mailboxes:write\": \"Create, update, suspend, resume, and delete mailboxes.\",\n \"mailbox_credentials:read\": \"List revocable app passwords for allowed mailboxes.\",\n \"mailbox_credentials:write\": \"Create and revoke app passwords for allowed mailboxes.\",\n \"mailbox_forwarding:read\": \"List forwarding destinations for allowed mailboxes.\",\n \"mailbox_forwarding:write\": \"Create and remove forwarding destinations for allowed mailboxes.\",\n \"mailbox_rules:read\": \"List deterministic server-side rules for allowed mailboxes.\",\n \"mailbox_rules:write\": \"Create, replace, and remove deterministic rules for allowed mailboxes.\",\n \"messages:read\": \"List and retrieve messages.\",\n \"messages:write\": \"Update, move, delete, and inject sandbox messages.\",\n \"drafts:write\": \"Create agent-safe reply drafts with server-derived recipients.\",\n \"messages:send\": \"Send messages, replies, and approved reply drafts.\",\n \"newsletters:read\": \"List and retrieve newsletter drafts and campaigns.\",\n \"newsletters:write\": \"Create, update, test, schedule, cancel, and resume newsletters.\",\n \"threads:read\": \"List threads and retrieve thread messages.\",\n \"webhooks:read\": \"List webhooks, retrieve webhooks, and list deliveries.\",\n \"webhooks:write\": \"Create, update, delete, test, and rotate webhooks.\",\n \"suppressions:read\": \"List suppressed recipient addresses.\",\n \"suppressions:write\": \"Remove addresses from the suppression list.\",\n \"partner:organizations:read\": \"List and retrieve this partner's child organizations.\",\n \"partner:organizations:write\": \"Create and manage this partner's child organizations.\",\n \"partner:organizations:access\": \"Act on an active child using the delegated organization header.\",\n \"partner:mailbox_credentials:issue\":\n \"List and consume operator-approved grants for embedded-webmail credentials.\",\n \"partner:usage:read\": \"Read consolidated child and mailbox usage for this partner.\",\n};\n\nexport function isApiKeyScope(value: string): value is ApiKeyScope {\n return API_KEY_SCOPES.some((scope) => scope === value);\n}\n\nexport function apiKeyScopesGrant(\n grantedScopes: readonly string[],\n requiredScope: ApiKeyScope | \"public\",\n): boolean {\n if (requiredScope === \"public\") return true;\n if (requiredScope.startsWith(\"partner:\")) return grantedScopes.includes(requiredScope);\n return grantedScopes.includes(\"*\") || grantedScopes.includes(requiredScope);\n}\n"]}
1
+ {"version":3,"sources":["../src/api-key-scopes.ts"],"names":[],"mappings":";;;AAAO,IAAM,cAAA,GAAiB;AAAA,EAC5B,GAAA;AAAA,EACA,gBAAA;AAAA,EACA,iBAAA;AAAA,EACA,kBAAA;AAAA,EACA,mBAAA;AAAA,EACA,oBAAA;AAAA,EACA,qBAAA;AAAA,EACA,eAAA;AAAA,EACA,gBAAA;AAAA,EACA,cAAA;AAAA,EACA,eAAA;AAAA,EACA,gBAAA;AAAA,EACA,kBAAA;AAAA,EACA,iBAAA;AAAA,EACA,0BAAA;AAAA,EACA,2BAAA;AAAA,EACA,yBAAA;AAAA,EACA,0BAAA;AAAA,EACA,oBAAA;AAAA,EACA,qBAAA;AAAA,EACA,eAAA;AAAA,EACA,gBAAA;AAAA,EACA,cAAA;AAAA,EACA,eAAA;AAAA,EACA,kBAAA;AAAA,EACA,mBAAA;AAAA,EACA,cAAA;AAAA,EACA,eAAA;AAAA,EACA,gBAAA;AAAA,EACA,mBAAA;AAAA,EACA,oBAAA;AAAA,EACA,4BAAA;AAAA,EACA,6BAAA;AAAA,EACA,8BAAA;AAAA,EACA,mCAAA;AAAA,EACA;AACF;AAIO,IAAM,0BAAA,GAAoE;AAAA,EAC/E,GAAA,EAAK,qDAAA;AAAA,EACL,gBAAA,EAAkB,+DAAA;AAAA,EAClB,iBAAA,EAAmB,gEAAA;AAAA,EACnB,kBAAA,EAAoB,0CAAA;AAAA,EACpB,mBAAA,EAAqB,yDAAA;AAAA,EACrB,oBAAA,EAAsB,kCAAA;AAAA,EACtB,qBAAA,EAAuB,2CAAA;AAAA,EACvB,eAAA,EAAiB,0DAAA;A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AA,OAAO,cAAc,QAAA,CAAS,GAAG,CAAA,IAAK,aAAA,CAAc,SAAS,aAAa,CAAA;AAC5E","file":"api-key-scopes.cjs","sourcesContent":["export const API_KEY_SCOPES = [\n \"*\",\n \"audiences:read\",\n \"audiences:write\",\n \"automations:read\",\n \"automations:write\",\n \"booking_pages:read\",\n \"booking_pages:write\",\n \"calendar:read\",\n \"calendar:write\",\n \"domains:read\",\n \"domains:write\",\n \"mailboxes:read\",\n \"mailboxes:export\",\n \"mailboxes:write\",\n \"mailbox_credentials:read\",\n \"mailbox_credentials:write\",\n \"mailbox_forwarding:read\",\n \"mailbox_forwarding:write\",\n \"mailbox_rules:read\",\n \"mailbox_rules:write\",\n \"messages:read\",\n \"messages:write\",\n \"drafts:write\",\n \"messages:send\",\n \"newsletters:read\",\n \"newsletters:write\",\n \"threads:read\",\n \"webhooks:read\",\n \"webhooks:write\",\n \"suppressions:read\",\n \"suppressions:write\",\n \"partner:organizations:read\",\n \"partner:organizations:write\",\n \"partner:organizations:access\",\n \"partner:mailbox_credentials:issue\",\n \"partner:usage:read\",\n] as const;\n\nexport type ApiKeyScope = (typeof API_KEY_SCOPES)[number];\n\nexport const API_KEY_SCOPE_DESCRIPTIONS: Readonly<Record<ApiKeyScope, string>> = {\n \"*\": \"All non-partner API endpoints in this organization.\",\n \"audiences:read\": \"List and retrieve newsletter audiences and their subscribers.\",\n \"audiences:write\": \"Create audiences and add, update, or remove their subscribers.\",\n \"automations:read\": \"List and retrieve assistant automations.\",\n \"automations:write\": \"Create, update, and manually run assistant automations.\",\n \"booking_pages:read\": \"List and retrieve booking pages.\",\n \"booking_pages:write\": \"Create, update, and delete booking pages.\",\n \"calendar:read\": \"List and retrieve calendar events and open availability.\",\n \"calendar:write\": \"Create, update, and delete calendar events.\",\n \"domains:read\": \"List, retrieve, and verify domains.\",\n \"domains:write\": \"Create, update, and delete domains.\",\n \"mailboxes:read\": \"List and retrieve mailboxes.\",\n \"mailboxes:export\": \"Create and download mailbox content exports.\",\n \"mailboxes:write\": \"Create, update, suspend, resume, and delete mailboxes.\",\n \"mailbox_credentials:read\": \"List revocable app passwords for allowed mailboxes.\",\n \"mailbox_credentials:write\": \"Create and revoke app passwords for allowed mailboxes.\",\n \"mailbox_forwarding:read\": \"List forwarding destinations for allowed mailboxes.\",\n \"mailbox_forwarding:write\": \"Create and remove forwarding destinations for allowed mailboxes.\",\n \"mailbox_rules:read\": \"List deterministic server-side rules for allowed mailboxes.\",\n \"mailbox_rules:write\": \"Create, replace, and remove deterministic rules for allowed mailboxes.\",\n \"messages:read\": \"List and retrieve messages.\",\n \"messages:write\": \"Update, move, delete, and inject sandbox messages.\",\n \"drafts:write\": \"Create agent-safe reply drafts with server-derived recipients.\",\n \"messages:send\": \"Send messages, replies, and approved reply drafts.\",\n \"newsletters:read\": \"List and retrieve newsletter drafts and campaigns.\",\n \"newsletters:write\": \"Create, update, test, schedule, cancel, and resume newsletters.\",\n \"threads:read\": \"List threads and retrieve thread messages.\",\n \"webhooks:read\": \"List webhooks, retrieve webhooks, and list deliveries.\",\n \"webhooks:write\": \"Create, update, delete, test, and rotate webhooks.\",\n \"suppressions:read\": \"List suppressed recipient addresses.\",\n \"suppressions:write\": \"Remove addresses from the suppression list.\",\n \"partner:organizations:read\": \"List and retrieve this partner's child organizations.\",\n \"partner:organizations:write\": \"Create and manage this partner's child organizations.\",\n \"partner:organizations:access\": \"Act on an active child using the delegated organization header.\",\n \"partner:mailbox_credentials:issue\":\n \"List and consume operator-approved grants for embedded-webmail credentials.\",\n \"partner:usage:read\": \"Read consolidated child and mailbox usage for this partner.\",\n};\n\nexport function isApiKeyScope(value: string): value is ApiKeyScope {\n return API_KEY_SCOPES.some((scope) => scope === value);\n}\n\nexport function apiKeyScopesGrant(\n grantedScopes: readonly string[],\n requiredScope: ApiKeyScope | \"public\",\n): boolean {\n if (requiredScope === \"public\") return true;\n if (requiredScope.startsWith(\"partner:\")) return grantedScopes.includes(requiredScope);\n return grantedScopes.includes(\"*\") || grantedScopes.includes(requiredScope);\n}\n"]}
@@ -1,4 +1,4 @@
1
- declare const API_KEY_SCOPES: readonly ["*", "audiences:read", "audiences:write", "booking_pages:read", "booking_pages:write", "calendar:read", "calendar:write", "domains:read", "domains:write", "mailboxes:read", "mailboxes:export", "mailboxes:write", "mailbox_credentials:read", "mailbox_credentials:write", "mailbox_forwarding:read", "mailbox_forwarding:write", "mailbox_rules:read", "mailbox_rules:write", "messages:read", "messages:write", "drafts:write", "messages:send", "newsletters:read", "newsletters:write", "threads:read", "webhooks:read", "webhooks:write", "suppressions:read", "suppressions:write", "partner:organizations:read", "partner:organizations:write", "partner:organizations:access", "partner:mailbox_credentials:issue", "partner:usage:read"];
1
+ declare const API_KEY_SCOPES: readonly ["*", "audiences:read", "audiences:write", "automations:read", "automations:write", "booking_pages:read", "booking_pages:write", "calendar:read", "calendar:write", "domains:read", "domains:write", "mailboxes:read", "mailboxes:export", "mailboxes:write", "mailbox_credentials:read", "mailbox_credentials:write", "mailbox_forwarding:read", "mailbox_forwarding:write", "mailbox_rules:read", "mailbox_rules:write", "messages:read", "messages:write", "drafts:write", "messages:send", "newsletters:read", "newsletters:write", "threads:read", "webhooks:read", "webhooks:write", "suppressions:read", "suppressions:write", "partner:organizations:read", "partner:organizations:write", "partner:organizations:access", "partner:mailbox_credentials:issue", "partner:usage:read"];
2
2
  type ApiKeyScope = (typeof API_KEY_SCOPES)[number];
3
3
  declare const API_KEY_SCOPE_DESCRIPTIONS: Readonly<Record<ApiKeyScope, string>>;
4
4
  declare function isApiKeyScope(value: string): value is ApiKeyScope;
@@ -1,4 +1,4 @@
1
- declare const API_KEY_SCOPES: readonly ["*", "audiences:read", "audiences:write", "booking_pages:read", "booking_pages:write", "calendar:read", "calendar:write", "domains:read", "domains:write", "mailboxes:read", "mailboxes:export", "mailboxes:write", "mailbox_credentials:read", "mailbox_credentials:write", "mailbox_forwarding:read", "mailbox_forwarding:write", "mailbox_rules:read", "mailbox_rules:write", "messages:read", "messages:write", "drafts:write", "messages:send", "newsletters:read", "newsletters:write", "threads:read", "webhooks:read", "webhooks:write", "suppressions:read", "suppressions:write", "partner:organizations:read", "partner:organizations:write", "partner:organizations:access", "partner:mailbox_credentials:issue", "partner:usage:read"];
1
+ declare const API_KEY_SCOPES: readonly ["*", "audiences:read", "audiences:write", "automations:read", "automations:write", "booking_pages:read", "booking_pages:write", "calendar:read", "calendar:write", "domains:read", "domains:write", "mailboxes:read", "mailboxes:export", "mailboxes:write", "mailbox_credentials:read", "mailbox_credentials:write", "mailbox_forwarding:read", "mailbox_forwarding:write", "mailbox_rules:read", "mailbox_rules:write", "messages:read", "messages:write", "drafts:write", "messages:send", "newsletters:read", "newsletters:write", "threads:read", "webhooks:read", "webhooks:write", "suppressions:read", "suppressions:write", "partner:organizations:read", "partner:organizations:write", "partner:organizations:access", "partner:mailbox_credentials:issue", "partner:usage:read"];
2
2
  type ApiKeyScope = (typeof API_KEY_SCOPES)[number];
3
3
  declare const API_KEY_SCOPE_DESCRIPTIONS: Readonly<Record<ApiKeyScope, string>>;
4
4
  declare function isApiKeyScope(value: string): value is ApiKeyScope;
@@ -3,6 +3,8 @@ var API_KEY_SCOPES = [
3
3
  "*",
4
4
  "audiences:read",
5
5
  "audiences:write",
6
+ "automations:read",
7
+ "automations:write",
6
8
  "booking_pages:read",
7
9
  "booking_pages:write",
8
10
  "calendar:read",
@@ -39,6 +41,8 @@ var API_KEY_SCOPE_DESCRIPTIONS = {
39
41
  "*": "All non-partner API endpoints in this organization.",
40
42
  "audiences:read": "List and retrieve newsletter audiences and their subscribers.",
41
43
  "audiences:write": "Create audiences and add, update, or remove their subscribers.",
44
+ "automations:read": "List and retrieve assistant automations.",
45
+ "automations:write": "Create, update, and manually run assistant automations.",
42
46
  "booking_pages:read": "List and retrieve booking pages.",
43
47
  "booking_pages:write": "Create, update, and delete booking pages.",
44
48
  "calendar:read": "List and retrieve calendar events and open availability.",
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/api-key-scopes.ts"],"names":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AA;AAAA,EACtB,qBAAA,EAAuB,wEAAA;AAAA,EACvB,eAAA,EAAiB,6BAAA;AAAA,EACjB,gBAAA,EAAkB,oDAAA;AAAA,EAClB,cAAA,EAAgB,gEAAA;AAAA,EAChB,eAAA,EAAiB,oDAAA;AAAA,EACjB,kBAAA,EAAoB,oDAAA;AAAA,EACpB,mBAAA,EAAqB,iEAAA;AAAA,EACrB,cAAA,EAAgB,4CAAA;AAAA,EAChB,eAAA,EAAiB,wDAAA;AAAA,EACjB,gBAAA,EAAkB,oDAAA;AAAA,EAClB,mBAAA,EAAqB,sCAAA;AAAA,EACrB,oBAAA,EAAsB,6CAAA;AAAA,EACtB,4BAAA,EAA8B,uDAAA;AAAA,EAC9B,6BAAA,EAA+B,uDAAA;AAAA,EAC/B,8BAAA,EAAgC,iEAAA;AAAA,EAChC,mCAAA,EACE,6EAAA;AAAA,EACF,oBAAA,EAAsB;AACxB;AAEO,SAAS,cAAc,KAAA,EAAqC;AACjE,EAAA,OAAO,cAAA,CAAe,IAAA,CAAK,CAAC,KAAA,KAAU,UAAU,KAAK,CAAA;AACvD;AAEO,SAAS,iBAAA,CACd,eACA,aAAA,EACS;AACT,EAAA,IAAI,aAAA,KAAkB,UAAU,OAAO,IAAA;AACvC,EAAA,IAAI,cAAc,UAAA,CAAW,UAAU,GAAG,OAAO,aAAA,CAAc,SAAS,aAAa,CAAA;AACrF,EAAA,OAAO,cAAc,QAAA,CAAS,GAAG,CAAA,IAAK,aAAA,CAAc,SAAS,aAAa,CAAA;AAC5E","file":"api-key-scopes.js","sourcesContent":["export const API_KEY_SCOPES = [\n \"*\",\n \"audiences:read\",\n \"audiences:write\",\n \"booking_pages:read\",\n \"booking_pages:write\",\n \"calendar:read\",\n \"calendar:write\",\n \"domains:read\",\n \"domains:write\",\n \"mailboxes:read\",\n \"mailboxes:export\",\n \"mailboxes:write\",\n \"mailbox_credentials:read\",\n \"mailbox_credentials:write\",\n \"mailbox_forwarding:read\",\n \"mailbox_forwarding:write\",\n \"mailbox_rules:read\",\n \"mailbox_rules:write\",\n \"messages:read\",\n \"messages:write\",\n \"drafts:write\",\n \"messages:send\",\n \"newsletters:read\",\n \"newsletters:write\",\n \"threads:read\",\n \"webhooks:read\",\n \"webhooks:write\",\n \"suppressions:read\",\n \"suppressions:write\",\n \"partner:organizations:read\",\n \"partner:organizations:write\",\n \"partner:organizations:access\",\n \"partner:mailbox_credentials:issue\",\n \"partner:usage:read\",\n] as const;\n\nexport type ApiKeyScope = (typeof API_KEY_SCOPES)[number];\n\nexport const API_KEY_SCOPE_DESCRIPTIONS: Readonly<Record<ApiKeyScope, string>> = {\n \"*\": \"All non-partner API endpoints in this organization.\",\n \"audiences:read\": \"List and retrieve newsletter audiences and their subscribers.\",\n \"audiences:write\": \"Create audiences and add, update, or remove their subscribers.\",\n \"booking_pages:read\": \"List and retrieve booking pages.\",\n \"booking_pages:write\": \"Create, update, and delete booking pages.\",\n \"calendar:read\": \"List and retrieve calendar events and open availability.\",\n \"calendar:write\": \"Create, update, and delete calendar events.\",\n \"domains:read\": \"List, retrieve, and verify domains.\",\n \"domains:write\": \"Create, update, and delete domains.\",\n \"mailboxes:read\": \"List and retrieve mailboxes.\",\n \"mailboxes:export\": \"Create and download mailbox content exports.\",\n \"mailboxes:write\": \"Create, update, suspend, resume, and delete mailboxes.\",\n \"mailbox_credentials:read\": \"List revocable app passwords for allowed mailboxes.\",\n \"mailbox_credentials:write\": \"Create and revoke app passwords for allowed mailboxes.\",\n \"mailbox_forwarding:read\": \"List forwarding destinations for allowed mailboxes.\",\n \"mailbox_forwarding:write\": \"Create and remove forwarding destinations for allowed mailboxes.\",\n \"mailbox_rules:read\": \"List deterministic server-side rules for allowed mailboxes.\",\n \"mailbox_rules:write\": \"Create, replace, and remove deterministic rules for allowed mailboxes.\",\n \"messages:read\": \"List and retrieve messages.\",\n \"messages:write\": \"Update, move, delete, and inject sandbox messages.\",\n \"drafts:write\": \"Create agent-safe reply drafts with server-derived recipients.\",\n \"messages:send\": \"Send messages, replies, and approved reply drafts.\",\n \"newsletters:read\": \"List and retrieve newsletter drafts and campaigns.\",\n \"newsletters:write\": \"Create, update, test, schedule, cancel, and resume newsletters.\",\n \"threads:read\": \"List threads and retrieve thread messages.\",\n \"webhooks:read\": \"List webhooks, retrieve webhooks, and list deliveries.\",\n \"webhooks:write\": \"Create, update, delete, test, and rotate webhooks.\",\n \"suppressions:read\": \"List suppressed recipient addresses.\",\n \"suppressions:write\": \"Remove addresses from the suppression list.\",\n \"partner:organizations:read\": \"List and retrieve this partner's child organizations.\",\n \"partner:organizations:write\": \"Create and manage this partner's child organizations.\",\n \"partner:organizations:access\": \"Act on an active child using the delegated organization header.\",\n \"partner:mailbox_credentials:issue\":\n \"List and consume operator-approved grants for embedded-webmail credentials.\",\n \"partner:usage:read\": \"Read consolidated child and mailbox usage for this partner.\",\n};\n\nexport function isApiKeyScope(value: string): value is ApiKeyScope {\n return API_KEY_SCOPES.some((scope) => scope === value);\n}\n\nexport function apiKeyScopesGrant(\n grantedScopes: readonly string[],\n requiredScope: ApiKeyScope | \"public\",\n): boolean {\n if (requiredScope === \"public\") return true;\n if (requiredScope.startsWith(\"partner:\")) return grantedScopes.includes(requiredScope);\n return grantedScopes.includes(\"*\") || grantedScopes.includes(requiredScope);\n}\n"]}
1
+ {"version":3,"sources":["../src/api-key-scopes.ts"],"names":[],"mappings":";AAAO,IAAM,cAAA,GAAiB;AAAA,EAC5B,GAAA;AAAA,EACA,gBAAA;AAAA,EACA,iBAAA;AAAA,EACA,kBAAA;AAAA,EACA,mBAAA;AAAA,EACA,oBAAA;AAAA,EACA,qBAAA;AAAA,EACA,eAAA;AAAA,EACA,gBAAA;AAAA,EACA,cAAA;AAAA,EACA,eAAA;AAAA,EACA,gBAAA;AAAA,EACA,kBAAA;AAAA,EACA,iBAAA;AAAA,EACA,0BAAA;AAAA,EACA,2BAAA;AAAA,EACA,yBAAA;AAAA,EACA,0BAAA;AAAA,EACA,oBAAA;AAAA,EACA,qBAAA;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iB,wDAAA;AAAA,EACjB,gBAAA,EAAkB,oDAAA;AAAA,EAClB,mBAAA,EAAqB,sCAAA;AAAA,EACrB,oBAAA,EAAsB,6CAAA;AAAA,EACtB,4BAAA,EAA8B,uDAAA;AAAA,EAC9B,6BAAA,EAA+B,uDAAA;AAAA,EAC/B,8BAAA,EAAgC,iEAAA;AAAA,EAChC,mCAAA,EACE,6EAAA;AAAA,EACF,oBAAA,EAAsB;AACxB;AAEO,SAAS,cAAc,KAAA,EAAqC;AACjE,EAAA,OAAO,cAAA,CAAe,IAAA,CAAK,CAAC,KAAA,KAAU,UAAU,KAAK,CAAA;AACvD;AAEO,SAAS,iBAAA,CACd,eACA,aAAA,EACS;AACT,EAAA,IAAI,aAAA,KAAkB,UAAU,OAAO,IAAA;AACvC,EAAA,IAAI,cAAc,UAAA,CAAW,UAAU,GAAG,OAAO,aAAA,CAAc,SAAS,aAAa,CAAA;AACrF,EAAA,OAAO,cAAc,QAAA,CAAS,GAAG,CAAA,IAAK,aAAA,CAAc,SAAS,aAAa,CAAA;AAC5E","file":"api-key-scopes.js","sourcesContent":["export const API_KEY_SCOPES = [\n \"*\",\n \"audiences:read\",\n \"audiences:write\",\n \"automations:read\",\n \"automations:write\",\n \"booking_pages:read\",\n \"booking_pages:write\",\n \"calendar:read\",\n \"calendar:write\",\n \"domains:read\",\n \"domains:write\",\n \"mailboxes:read\",\n \"mailboxes:export\",\n \"mailboxes:write\",\n \"mailbox_credentials:read\",\n \"mailbox_credentials:write\",\n \"mailbox_forwarding:read\",\n \"mailbox_forwarding:write\",\n \"mailbox_rules:read\",\n \"mailbox_rules:write\",\n \"messages:read\",\n \"messages:write\",\n \"drafts:write\",\n \"messages:send\",\n \"newsletters:read\",\n \"newsletters:write\",\n \"threads:read\",\n \"webhooks:read\",\n \"webhooks:write\",\n \"suppressions:read\",\n \"suppressions:write\",\n \"partner:organizations:read\",\n \"partner:organizations:write\",\n \"partner:organizations:access\",\n \"partner:mailbox_credentials:issue\",\n \"partner:usage:read\",\n] as const;\n\nexport type ApiKeyScope = (typeof API_KEY_SCOPES)[number];\n\nexport const API_KEY_SCOPE_DESCRIPTIONS: Readonly<Record<ApiKeyScope, string>> = {\n \"*\": \"All non-partner API endpoints in this organization.\",\n \"audiences:read\": \"List and retrieve newsletter audiences and their subscribers.\",\n \"audiences:write\": \"Create audiences and add, update, or remove their subscribers.\",\n \"automations:read\": \"List and retrieve assistant automations.\",\n \"automations:write\": \"Create, update, and manually run assistant automations.\",\n \"booking_pages:read\": \"List and retrieve booking pages.\",\n \"booking_pages:write\": \"Create, update, and delete booking pages.\",\n \"calendar:read\": \"List and retrieve calendar events and open availability.\",\n \"calendar:write\": \"Create, update, and delete calendar events.\",\n \"domains:read\": \"List, retrieve, and verify domains.\",\n \"domains:write\": \"Create, update, and delete domains.\",\n \"mailboxes:read\": \"List and retrieve mailboxes.\",\n \"mailboxes:export\": \"Create and download mailbox content exports.\",\n \"mailboxes:write\": \"Create, update, suspend, resume, and delete mailboxes.\",\n \"mailbox_credentials:read\": \"List revocable app passwords for allowed mailboxes.\",\n \"mailbox_credentials:write\": \"Create and revoke app passwords for allowed mailboxes.\",\n \"mailbox_forwarding:read\": \"List forwarding destinations for allowed mailboxes.\",\n \"mailbox_forwarding:write\": \"Create and remove forwarding destinations for allowed mailboxes.\",\n \"mailbox_rules:read\": \"List deterministic server-side rules for allowed mailboxes.\",\n \"mailbox_rules:write\": \"Create, replace, and remove deterministic rules for allowed mailboxes.\",\n \"messages:read\": \"List and retrieve messages.\",\n \"messages:write\": \"Update, move, delete, and inject sandbox messages.\",\n \"drafts:write\": \"Create agent-safe reply drafts with server-derived recipients.\",\n \"messages:send\": \"Send messages, replies, and approved reply drafts.\",\n \"newsletters:read\": \"List and retrieve newsletter drafts and campaigns.\",\n \"newsletters:write\": \"Create, update, test, schedule, cancel, and resume newsletters.\",\n \"threads:read\": \"List threads and retrieve thread messages.\",\n \"webhooks:read\": \"List webhooks, retrieve webhooks, and list deliveries.\",\n \"webhooks:write\": \"Create, update, delete, test, and rotate webhooks.\",\n \"suppressions:read\": \"List suppressed recipient addresses.\",\n \"suppressions:write\": \"Remove addresses from the suppression list.\",\n \"partner:organizations:read\": \"List and retrieve this partner's child organizations.\",\n \"partner:organizations:write\": \"Create and manage this partner's child organizations.\",\n \"partner:organizations:access\": \"Act on an active child using the delegated organization header.\",\n \"partner:mailbox_credentials:issue\":\n \"List and consume operator-approved grants for embedded-webmail credentials.\",\n \"partner:usage:read\": \"Read consolidated child and mailbox usage for this partner.\",\n};\n\nexport function isApiKeyScope(value: string): value is ApiKeyScope {\n return API_KEY_SCOPES.some((scope) => scope === value);\n}\n\nexport function apiKeyScopesGrant(\n grantedScopes: readonly string[],\n requiredScope: ApiKeyScope | \"public\",\n): boolean {\n if (requiredScope === \"public\") return true;\n if (requiredScope.startsWith(\"partner:\")) return grantedScopes.includes(requiredScope);\n return grantedScopes.includes(\"*\") || grantedScopes.includes(requiredScope);\n}\n"]}
package/dist/index.cjs CHANGED
@@ -7,6 +7,8 @@ var API_KEY_SCOPES = [
7
7
  "*",
8
8
  "audiences:read",
9
9
  "audiences:write",
10
+ "automations:read",
11
+ "automations:write",
10
12
  "booking_pages:read",
11
13
  "booking_pages:write",
12
14
  "calendar:read",
@@ -43,6 +45,8 @@ var API_KEY_SCOPE_DESCRIPTIONS = {
43
45
  "*": "All non-partner API endpoints in this organization.",
44
46
  "audiences:read": "List and retrieve newsletter audiences and their subscribers.",
45
47
  "audiences:write": "Create audiences and add, update, or remove their subscribers.",
48
+ "automations:read": "List and retrieve assistant automations.",
49
+ "automations:write": "Create, update, and manually run assistant automations.",
46
50
  "booking_pages:read": "List and retrieve booking pages.",
47
51
  "booking_pages:write": "Create, update, and delete booking pages.",
48
52
  "calendar:read": "List and retrieve calendar events and open availability.",
@@ -397,6 +401,47 @@ var Audiences = class extends ApiResource {
397
401
  }
398
402
  };
399
403
 
404
+ // src/resources/automations.ts
405
+ var Automations = class extends ApiResource {
406
+ list(options) {
407
+ return this.client.request({
408
+ method: "GET",
409
+ path: "/automations",
410
+ methodOptions: options
411
+ });
412
+ }
413
+ create(params, options) {
414
+ return this.client.request({
415
+ method: "POST",
416
+ path: "/automations",
417
+ body: params,
418
+ methodOptions: options
419
+ });
420
+ }
421
+ get(id, options) {
422
+ return this.client.request({
423
+ method: "GET",
424
+ path: `/automations/${encodeURIComponent(id)}`,
425
+ methodOptions: options
426
+ });
427
+ }
428
+ update(id, params, options) {
429
+ return this.client.request({
430
+ method: "PATCH",
431
+ path: `/automations/${encodeURIComponent(id)}`,
432
+ body: params,
433
+ methodOptions: options
434
+ });
435
+ }
436
+ run(id, options) {
437
+ return this.client.request({
438
+ method: "POST",
439
+ path: `/automations/${encodeURIComponent(id)}/run`,
440
+ methodOptions: options
441
+ });
442
+ }
443
+ };
444
+
400
445
  // src/resources/booking-pages.ts
401
446
  var BookingPages = class extends ApiResource {
402
447
  create(params, options) {
@@ -1568,7 +1613,7 @@ var Webhooks = class extends ApiResource {
1568
1613
  };
1569
1614
 
1570
1615
  // src/version.ts
1571
- var VERSION = "0.4.13";
1616
+ var VERSION = "0.4.14";
1572
1617
 
1573
1618
  // src/client.ts
1574
1619
  var DEFAULT_BASE_URL = "https://shipmail.to/api/v1";
@@ -1622,6 +1667,7 @@ var ShipmailClient = class {
1622
1667
  this.organizationId = config.organizationId;
1623
1668
  }
1624
1669
  this.audiences = new Audiences(this);
1670
+ this.automations = new Automations(this);
1625
1671
  this.bookingPages = new BookingPages(this);
1626
1672
  this.capabilities = new Capabilities(this);
1627
1673
  this.calendar = new Calendar(this);