@unsent/sdk 0.25.5 → 1.0.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
@@ -400,3 +400,9 @@ if (result.data) {
400
400
  ## License
401
401
 
402
402
  MIT
403
+
404
+ ## Support
405
+
406
+ - [Documentation](https://docs.unsent.dev)
407
+ - [GitHub Issues](https://github.com/souravsspace/unsent-typescript/issues)
408
+ - [Discord Community](https://discord.gg/unsent)
package/dist/index.js CHANGED
@@ -206,9 +206,9 @@ var Campaigns = class {
206
206
  };
207
207
 
208
208
  // src/unsent.ts
209
- var defaultBaseUrl = "https://app.unsent.dev";
210
- var baseUrl = `${process?.env?.UNSENT_BASE_URL ?? process?.env?.UNSENT_BASE_URL ?? defaultBaseUrl}/api/v1`;
211
- function isunsentErrorResponse(error) {
209
+ var defaultBaseUrl = "https://api.unsent.dev";
210
+ var baseUrl = `${process?.env?.UNSENT_BASE_URL ?? process?.env?.UNSENT_BASE_URL ?? defaultBaseUrl}/v1`;
211
+ function isUnsentErrorResponse(error) {
212
212
  return error.error.code !== void 0;
213
213
  }
214
214
  var unsent = class {
@@ -216,7 +216,7 @@ var unsent = class {
216
216
  this.key = key;
217
217
  if (!key) {
218
218
  if (typeof process !== "undefined" && process.env) {
219
- this.key = process.env.unsent_API_KEY ?? process.env.UNSENT_API_KEY;
219
+ this.key = process.env.UNSENT_API_KEY ?? process.env.UNSENT_API_KEY;
220
220
  }
221
221
  if (!this.key) {
222
222
  throw new Error(
@@ -247,7 +247,7 @@ var unsent = class {
247
247
  if (!response.ok) {
248
248
  try {
249
249
  const resp = await response.json();
250
- if (isunsentErrorResponse(resp)) {
250
+ if (isUnsentErrorResponse(resp)) {
251
251
  return { data: null, error: resp };
252
252
  }
253
253
  return { data: null, error: resp.error };
package/dist/index.mjs CHANGED
@@ -179,9 +179,9 @@ var Campaigns = class {
179
179
  };
180
180
 
181
181
  // src/unsent.ts
182
- var defaultBaseUrl = "https://app.unsent.dev";
183
- var baseUrl = `${process?.env?.UNSENT_BASE_URL ?? process?.env?.UNSENT_BASE_URL ?? defaultBaseUrl}/api/v1`;
184
- function isunsentErrorResponse(error) {
182
+ var defaultBaseUrl = "https://api.unsent.dev";
183
+ var baseUrl = `${process?.env?.UNSENT_BASE_URL ?? process?.env?.UNSENT_BASE_URL ?? defaultBaseUrl}/v1`;
184
+ function isUnsentErrorResponse(error) {
185
185
  return error.error.code !== void 0;
186
186
  }
187
187
  var unsent = class {
@@ -189,7 +189,7 @@ var unsent = class {
189
189
  this.key = key;
190
190
  if (!key) {
191
191
  if (typeof process !== "undefined" && process.env) {
192
- this.key = process.env.unsent_API_KEY ?? process.env.UNSENT_API_KEY;
192
+ this.key = process.env.UNSENT_API_KEY ?? process.env.UNSENT_API_KEY;
193
193
  }
194
194
  if (!this.key) {
195
195
  throw new Error(
@@ -220,7 +220,7 @@ var unsent = class {
220
220
  if (!response.ok) {
221
221
  try {
222
222
  const resp = await response.json();
223
- if (isunsentErrorResponse(resp)) {
223
+ if (isUnsentErrorResponse(resp)) {
224
224
  return { data: null, error: resp };
225
225
  }
226
226
  return { data: null, error: resp.error };
package/package.json CHANGED
@@ -1,20 +1,39 @@
1
1
  {
2
2
  "name": "@unsent/sdk",
3
- "version": "0.25.5",
4
- "description": "",
3
+ "version": "1.0.0",
4
+ "description": "TypeScript SDK for the Unsent API - Send transactional emails with ease",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
7
7
  "types": "./dist/index.d.ts",
8
- "keywords": [],
9
- "author": "",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "https://github.com/souravsspace/unsent-typescript.git"
11
+ },
12
+ "homepage": "https://unsent.dev",
13
+ "bugs": {
14
+ "url": "https://github.com/souravsspace/unsent-typescript/issues"
15
+ },
16
+ "keywords": [
17
+ "unsent",
18
+ "email",
19
+ "transactional-email",
20
+ "api",
21
+ "sdk",
22
+ "typescript",
23
+ "react-email"
24
+ ],
25
+ "author": "sourav",
10
26
  "license": "MIT",
27
+ "files": [
28
+ "dist"
29
+ ],
11
30
  "devDependencies": {
12
31
  "@types/node": "^24.7.0",
13
32
  "@types/react": "^19.1.2",
14
33
  "openapi-typescript": "^7.6.1",
15
34
  "tsup": "^8.4.0",
16
35
  "typescript": "^5.8.3",
17
- "@workspace/typescript-config": "0.0.0"
36
+ "@unsent/typescript-config": "0.0.0"
18
37
  },
19
38
  "dependencies": {
20
39
  "@react-email/render": "^1.0.6",