@bernierllc/nevarmail 0.4.0 → 0.5.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.
package/README.md CHANGED
@@ -149,7 +149,8 @@ yourself can narrow a block; a default the server resolves cannot.
149
149
  | `listLists` / `createList` / `getList` | `/api/v1/lists` | `contacts:read` / `contacts:write` |
150
150
  | `addListContacts` | `POST /api/v1/lists/{id}/contacts` | `contacts:write` |
151
151
  | `listContacts` / `upsertContacts` / `updateContact` / `deleteContact` | `/api/v1/contacts` | `contacts:read` / `contacts:write` |
152
- | `listSenders` / `createSender` / `getSender` / `updateSender` / `deleteSender` | `/api/v1/senders` | `senders:read` / `senders:write` |
152
+ | `listSenders` / `createSender(input)` — `input.projectId?` targets a project when the org has more than one | `/api/v1/senders` | `senders:read` / `senders:write` |
153
+ | `getSender` / `updateSender` / `deleteSender` | `/api/v1/senders/{id}` | `senders:read` / `senders:write` |
153
154
  | `listDomains` / `createDomain(domain, { projectId })` / `getDomain` / `deleteDomain` | `/api/v1/domains` | `domains:read` / `domains:write` |
154
155
  | `getDomainDnsRecords` / `verifyDomain` | `/api/v1/domains/{id}/…` | `domains:read` / `domains:write` |
155
156
  | `listSuppressions` / `addSuppressions` | `/api/v1/suppressions` | `org:read` / `org:write` |
package/dist/index.d.ts CHANGED
@@ -244,8 +244,15 @@ export interface CreateSenderInput {
244
244
  providerSenderId?: string;
245
245
  priority?: number;
246
246
  isDefault?: boolean;
247
+ /**
248
+ * Target project (UUID). Omit it when the org has only one project — it goes there.
249
+ * Several projects and no `projectId`: 400 `PROJECT_REQUIRED`. No project on the org:
250
+ * 422 `NO_PROJECT`. Key's user can't open the named project: 404 `NOT_FOUND`.
251
+ */
252
+ projectId?: string;
247
253
  }
248
- export type UpdateSenderInput = Partial<CreateSenderInput>;
254
+ /** A sender stays in the project it was created in, so `projectId` is create-only. */
255
+ export type UpdateSenderInput = Partial<Omit<CreateSenderInput, "projectId">>;
249
256
  export interface DnsRecord {
250
257
  type: "TXT" | "CNAME" | "MX";
251
258
  host: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bernierllc/nevarmail",
3
- "version": "0.4.0",
3
+ "version": "0.5.0",
4
4
  "description": "Official client for the NevarMail v1 API. Typed, retries 429/5xx, throws NevarMailError on every non-2xx.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",