@distilled.cloud/resend 1.0.0-rc.17 → 1.0.0-rc.19

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@distilled.cloud/resend",
3
- "version": "1.0.0-rc.17",
3
+ "version": "1.0.0-rc.19",
4
4
  "license": "Apache-2.0",
5
5
  "repository": {
6
6
  "type": "git",
@@ -66,22 +66,23 @@
66
66
  }
67
67
  },
68
68
  "dependencies": {
69
- "@distilled.cloud/core": "1.0.0-rc.17"
69
+ "@distilled.cloud/core": "1.0.0-rc.19"
70
70
  },
71
71
  "devDependencies": {
72
+ "@distilled.cloud/dev": "0.0.0",
72
73
  "@types/node": "26.6.5"
73
74
  },
74
75
  "peerDependencies": {
75
- "effect": "^4.0.5"
76
+ "effect": "^4.1.2"
76
77
  },
77
78
  "distilled": {
78
- "generatedAt": "2026-10-09",
79
- "specUpdatedAt": "2026-10-06"
79
+ "generatedAt": "2026-11-10",
80
+ "specUpdatedAt": "2026-11-06"
80
81
  },
81
82
  "scripts": {
82
83
  "build": "tsrs -b",
83
84
  "convert": "node --conditions=bun scripts/convert.ts",
84
- "generate": "node --conditions=bun scripts/convert.ts && node --conditions=bun scripts/generate.ts",
85
+ "generate": "node --conditions=bun scripts/generate.ts",
85
86
  "typecheck": "tsrs -p tsconfig.json",
86
87
  "specs:fetch": "git submodule update --force --init --depth=1 specs/spec-mirror-resend",
87
88
  "specs:update": "git submodule update --remote --force --depth=1 specs/spec-mirror-resend"
@@ -19,7 +19,7 @@ export interface Config {
19
19
  }
20
20
 
21
21
  export class Credentials
22
- extends /*@__PURE__*/ Context.Service<Credentials, Effect.Effect<Config>>()(
22
+ extends /*@__PURE__*/ Context.Service<Credentials, Effect.Effect<Config, ConfigError>>()(
23
23
  "ResendCredentials",
24
24
  ) {}
25
25
 
@@ -52,5 +52,5 @@ export const CredentialsFromEnv: Layer.Layer<Credentials> = /*@__PURE__*/ Layer.
52
52
  apiKey: Redacted.make(apiKey),
53
53
  apiBaseUrl: process.env.RESEND_API_BASE_URL ?? DEFAULT_API_BASE_URL,
54
54
  };
55
- }).pipe(Effect.orDie),
55
+ }),
56
56
  );
package/src/index.ts CHANGED
@@ -1,9 +1,9 @@
1
1
  /**
2
2
  * @distilled.cloud/resend -- Resend SDK for Effect.
3
3
  *
4
- * `./services` is generated by `scripts/generate.ts` from the Smithy model
5
- * in `.generated-specs` (written by `scripts/convert.ts` from the OpenAPI
6
- * spec). Everything else in this folder is hand-written.
4
+ * `./services` is generated by `scripts/generate.ts` from the Smithy model that
5
+ * `scripts/convert.ts` converts from the OpenAPI spec. Everything else in this
6
+ * folder is hand-written.
7
7
  *
8
8
  * @example
9
9
  * ```ts
package/src/pagination.ts CHANGED
@@ -19,7 +19,7 @@ import * as Stream from "effect/Stream";
19
19
  export const paginateResend: Pagination.PaginationStrategy = (operation, input, pagination) => {
20
20
  const inputToken = pagination.inputToken;
21
21
  if (!inputToken) {
22
- return Stream.die(new Error("Resend cursor pagination requires inputToken"));
22
+ return Pagination.missingPaginationConfig("Resend cursor pagination requires inputToken");
23
23
  }
24
24
  const hasNextPath = pagination.hasNextPage ?? "has_more";
25
25
  const itemsPath = pagination.items ?? "data";
package/src/protocol.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  import type * as API from "@distilled.cloud/core/api";
2
- import type { API_ERRORS, ConfigError } from "@distilled.cloud/core/errors";
2
+ import type { API_ERRORS, ConfigError, InvalidInput } from "@distilled.cloud/core/errors";
3
3
  import { makeRestProtocol } from "@distilled.cloud/core/protocol-rest";
4
+ import type { SdkError } from "@distilled.cloud/core/sdk-error";
4
5
  /**
5
6
  * ResendProtocol -- hand-written.
6
7
  *
@@ -36,7 +37,9 @@ export type ResendOpError =
36
37
  | UnknownResendError
37
38
  | ConfigError
38
39
  | HttpClientError.HttpClientError
39
- | ResendParseError;
40
+ | ResendParseError
41
+ | InvalidInput
42
+ | SdkError;
40
43
 
41
44
  /** Context (requirements) shared by every generated Resend operation. */
42
45
  export type ResendOpContext = Credentials | HttpClient.HttpClient;