@notifykit/sdk 1.0.1 → 1.0.3

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.
Files changed (2) hide show
  1. package/dist/types.d.ts +15 -10
  2. package/package.json +1 -1
package/dist/types.d.ts CHANGED
@@ -13,20 +13,15 @@ export interface SendEmailOptions {
13
13
  subject: string;
14
14
  body: string;
15
15
  from?: string;
16
- priority?: number;
16
+ priority?: 1 | 5 | 10;
17
17
  idempotencyKey?: string;
18
18
  }
19
- export interface ApiInfo {
20
- name: string;
21
- version: string;
22
- description: string;
23
- documentation: string;
24
- }
25
19
  export interface SendWebhookOptions {
26
20
  url: string;
27
- method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
28
- payload?: any;
21
+ method?: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
22
+ payload: any;
29
23
  headers?: Record<string, string>;
24
+ priority?: 1 | 5 | 10;
30
25
  idempotencyKey?: string;
31
26
  }
32
27
  export interface JobResponse {
@@ -38,10 +33,14 @@ export interface JobResponse {
38
33
  export interface JobStatus {
39
34
  id: string;
40
35
  type: string;
41
- status: 'pending' | 'processing' | 'completed' | 'failed';
36
+ status: "pending" | "processing" | "completed" | "failed";
37
+ priority: number;
38
+ payload: object;
42
39
  attempts: number;
40
+ maxAttempts: number;
43
41
  errorMessage?: string;
44
42
  createdAt: string;
43
+ startedAt?: string;
45
44
  completedAt?: string;
46
45
  }
47
46
  export interface RetryJobResponse {
@@ -49,3 +48,9 @@ export interface RetryJobResponse {
49
48
  status: string;
50
49
  message: string;
51
50
  }
51
+ export interface ApiInfo {
52
+ name: string;
53
+ version: string;
54
+ description: string;
55
+ documentation: string;
56
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@notifykit/sdk",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
4
4
  "description": "Official NotifyKit SDK for Node.js",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",