@distilled.cloud/resend 1.0.0-rc.17 → 1.0.0-rc.18
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/lib/_bundle/sdk.js +1 -1
- package/lib/_bundle/sdk.js.map +1 -1
- package/lib/credentials.d.ts +2 -1
- package/lib/credentials.d.ts.map +1 -1
- package/lib/index.d.ts +3 -3
- package/lib/protocol.d.ts +2 -2
- package/lib/protocol.d.ts.map +1 -1
- package/lib/services/resend.d.ts.map +1 -1
- package/lib/services/resend.js +102 -101
- package/lib/services/resend.js.map +1 -1
- package/lib/services.lazy/resend.js +1 -1
- package/package.json +5 -4
- package/src/credentials.ts +2 -2
- package/src/index.ts +3 -3
- package/src/protocol.ts +3 -2
- package/src/services/resend.ts +171 -0
package/src/credentials.ts
CHANGED
|
@@ -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
|
-
})
|
|
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
|
-
*
|
|
6
|
-
*
|
|
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/protocol.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
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
4
|
/**
|
|
5
5
|
* ResendProtocol -- hand-written.
|
|
@@ -36,7 +36,8 @@ export type ResendOpError =
|
|
|
36
36
|
| UnknownResendError
|
|
37
37
|
| ConfigError
|
|
38
38
|
| HttpClientError.HttpClientError
|
|
39
|
-
| ResendParseError
|
|
39
|
+
| ResendParseError
|
|
40
|
+
| InvalidInput;
|
|
40
41
|
|
|
41
42
|
/** Context (requirements) shared by every generated Resend operation. */
|
|
42
43
|
export type ResendOpContext = Credentials | HttpClient.HttpClient;
|