@ewyn/client 0.3.0 → 0.4.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 +1 -8
- package/dist/__tests__/cli-fetch-config.test.js +0 -2
- package/dist/__tests__/config-types.test-d.js +0 -6
- package/dist/__tests__/dashboard-config.test.js +1 -6
- package/dist/__tests__/ewyn.test.js +1 -8
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +4 -9
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -5
- package/dist/types.d.ts +1 -5
- package/dist/types.d.ts.map +1 -1
- package/package.json +11 -11
package/README.md
CHANGED
|
@@ -25,7 +25,6 @@ yarn add @ewyn/client
|
|
|
25
25
|
import { Ewyn } from '@ewyn/client';
|
|
26
26
|
|
|
27
27
|
const client = new Ewyn({
|
|
28
|
-
workspaceId: 'your-workspace-id',
|
|
29
28
|
apiKey: 'your-api-key',
|
|
30
29
|
});
|
|
31
30
|
|
|
@@ -71,7 +70,6 @@ const config = {
|
|
|
71
70
|
|
|
72
71
|
// 2. Initialize with config
|
|
73
72
|
const client = new Ewyn({
|
|
74
|
-
workspaceId: 'your-workspace-id',
|
|
75
73
|
apiKey: 'your-api-key',
|
|
76
74
|
templates: config,
|
|
77
75
|
});
|
|
@@ -108,7 +106,6 @@ This fetches your workspace’s template config from the API and writes a TypeSc
|
|
|
108
106
|
|
|
109
107
|
**Config file** (`ewyn.config.ts` in project root):
|
|
110
108
|
|
|
111
|
-
- `workspaceId` (required): Your workspace UUID (e.g. `process.env.EWYN_WORKSPACE_ID`)
|
|
112
109
|
- `apiKey` (required): Your API key (e.g. `process.env.EWYN_API_KEY`)
|
|
113
110
|
- `configurationPath` (optional): Where to write the generated file (e.g. `./src/ewynTemplates.ts`). If omitted, the file is written as `./ewynTemplates.ts` in the current directory.
|
|
114
111
|
|
|
@@ -118,7 +115,6 @@ Example `ewyn.config.ts`:
|
|
|
118
115
|
import type { EwynFetchConfig } from '@ewyn/client';
|
|
119
116
|
|
|
120
117
|
const config: EwynFetchConfig = {
|
|
121
|
-
workspaceId: process.env.EWYN_WORKSPACE_ID!,
|
|
122
118
|
apiKey: process.env.EWYN_API_KEY!,
|
|
123
119
|
configurationPath: './src/ewynTemplates.ts', // optional
|
|
124
120
|
};
|
|
@@ -133,7 +129,6 @@ import { Ewyn } from '@ewyn/client';
|
|
|
133
129
|
import { ewynTemplates } from './ewynTemplates'; // or from your configurationPath
|
|
134
130
|
|
|
135
131
|
const client = new Ewyn({
|
|
136
|
-
workspaceId: process.env.EWYN_WORKSPACE_ID!,
|
|
137
132
|
apiKey: process.env.EWYN_API_KEY!,
|
|
138
133
|
templates: ewynTemplates,
|
|
139
134
|
});
|
|
@@ -154,7 +149,6 @@ const config = {
|
|
|
154
149
|
} as const;
|
|
155
150
|
|
|
156
151
|
const client = new Ewyn({
|
|
157
|
-
workspaceId: 'your-workspace-id',
|
|
158
152
|
apiKey: 'your-api-key',
|
|
159
153
|
templates: config, // Now fully type-safe!
|
|
160
154
|
});
|
|
@@ -165,7 +159,7 @@ const client = new Ewyn({
|
|
|
165
159
|
Alternatively, fetch the config programmatically:
|
|
166
160
|
|
|
167
161
|
```bash
|
|
168
|
-
curl -X GET https://www.ewyn.ai/api/v1/
|
|
162
|
+
curl -X GET https://www.ewyn.ai/api/v1/templates/config \
|
|
169
163
|
-H "Authorization: Bearer YOUR_API_KEY"
|
|
170
164
|
```
|
|
171
165
|
|
|
@@ -181,7 +175,6 @@ new Ewyn(options: EwynOptions)
|
|
|
181
175
|
|
|
182
176
|
**Options:**
|
|
183
177
|
|
|
184
|
-
- `workspaceId` (string, required): Your workspace UUID
|
|
185
178
|
- `apiKey` (string, required): Your API key secret
|
|
186
179
|
- `templates` (TemplateConfig, optional): Template configuration for name-based sending
|
|
187
180
|
- `maxRetries` (number, optional): Maximum retries for retryable errors (default: 3)
|
|
@@ -39,7 +39,6 @@ describe('fetch-config CLI', () => {
|
|
|
39
39
|
it('writes ewynTemplates.ts with fetched config when using default path', async () => {
|
|
40
40
|
const configPath = path.join(tempDir, 'ewyn.config.js');
|
|
41
41
|
fs.writeFileSync(configPath, `export default {
|
|
42
|
-
workspaceId: 'test-workspace-id',
|
|
43
42
|
apiKey: 'test-api-key',
|
|
44
43
|
};
|
|
45
44
|
`, 'utf-8');
|
|
@@ -56,7 +55,6 @@ describe('fetch-config CLI', () => {
|
|
|
56
55
|
it('writes to configurationPath when set in config', async () => {
|
|
57
56
|
const configPath = path.join(tempDir, 'ewyn.config.js');
|
|
58
57
|
fs.writeFileSync(configPath, `export default {
|
|
59
|
-
workspaceId: 'ws-1',
|
|
60
58
|
apiKey: 'key-1',
|
|
61
59
|
configurationPath: './src/ewynTemplates.ts',
|
|
62
60
|
};
|
|
@@ -30,7 +30,6 @@ const dashboardConfig = {
|
|
|
30
30
|
};
|
|
31
31
|
test('client with dashboard config has typed send', () => {
|
|
32
32
|
const client = new Ewyn({
|
|
33
|
-
workspaceId: 'ws',
|
|
34
33
|
apiKey: 'key',
|
|
35
34
|
templates: dashboardConfig,
|
|
36
35
|
});
|
|
@@ -39,7 +38,6 @@ test('client with dashboard config has typed send', () => {
|
|
|
39
38
|
});
|
|
40
39
|
test('valid send: required var present, optional omitted', () => {
|
|
41
40
|
const client = new Ewyn({
|
|
42
|
-
workspaceId: 'ws',
|
|
43
41
|
apiKey: 'key',
|
|
44
42
|
templates: dashboardConfig,
|
|
45
43
|
});
|
|
@@ -51,7 +49,6 @@ test('valid send: required var present, optional omitted', () => {
|
|
|
51
49
|
});
|
|
52
50
|
test('valid send: required and optional vars', () => {
|
|
53
51
|
const client = new Ewyn({
|
|
54
|
-
workspaceId: 'ws',
|
|
55
52
|
apiKey: 'key',
|
|
56
53
|
templates: dashboardConfig,
|
|
57
54
|
});
|
|
@@ -63,7 +60,6 @@ test('valid send: required and optional vars', () => {
|
|
|
63
60
|
});
|
|
64
61
|
test('valid send: hyphenated template name', () => {
|
|
65
62
|
const client = new Ewyn({
|
|
66
|
-
workspaceId: 'ws',
|
|
67
63
|
apiKey: 'key',
|
|
68
64
|
templates: dashboardConfig,
|
|
69
65
|
});
|
|
@@ -75,7 +71,6 @@ test('valid send: hyphenated template name', () => {
|
|
|
75
71
|
});
|
|
76
72
|
test('send return type is Promise<SendEmailResponse>', () => {
|
|
77
73
|
const client = new Ewyn({
|
|
78
|
-
workspaceId: 'ws',
|
|
79
74
|
apiKey: 'key',
|
|
80
75
|
templates: dashboardConfig,
|
|
81
76
|
});
|
|
@@ -87,7 +82,6 @@ test('template name is constrained to config keys at type level', () => {
|
|
|
87
82
|
});
|
|
88
83
|
test('missing required variable is rejected by types', () => {
|
|
89
84
|
const client = new Ewyn({
|
|
90
|
-
workspaceId: 'ws',
|
|
91
85
|
apiKey: 'key',
|
|
92
86
|
templates: dashboardConfig,
|
|
93
87
|
});
|
|
@@ -46,7 +46,6 @@ describe('Dashboard config (runtime)', () => {
|
|
|
46
46
|
};
|
|
47
47
|
it('sends with dashboard-shaped config (only required vars)', async () => {
|
|
48
48
|
const client = new Ewyn({
|
|
49
|
-
workspaceId: 'ws-1',
|
|
50
49
|
apiKey: 'key-1',
|
|
51
50
|
templates: configOnlyRequired,
|
|
52
51
|
maxRetries: 1,
|
|
@@ -71,7 +70,7 @@ describe('Dashboard config (runtime)', () => {
|
|
|
71
70
|
},
|
|
72
71
|
});
|
|
73
72
|
expect(result).toEqual(mockResponse);
|
|
74
|
-
expect(global.fetch).toHaveBeenCalledWith('https://www.ewyn.ai/api/v1/
|
|
73
|
+
expect(global.fetch).toHaveBeenCalledWith('https://www.ewyn.ai/api/v1/send', expect.objectContaining({
|
|
75
74
|
method: 'POST',
|
|
76
75
|
body: expect.stringContaining('"templateId":"version-uuid-1"'),
|
|
77
76
|
}));
|
|
@@ -81,7 +80,6 @@ describe('Dashboard config (runtime)', () => {
|
|
|
81
80
|
});
|
|
82
81
|
it('sends with dashboard-shaped config (mixed required/optional, hyphenated key)', async () => {
|
|
83
82
|
const client = new Ewyn({
|
|
84
|
-
workspaceId: 'ws-2',
|
|
85
83
|
apiKey: 'key-2',
|
|
86
84
|
templates: configMixedVars,
|
|
87
85
|
maxRetries: 1,
|
|
@@ -116,7 +114,6 @@ describe('Dashboard config (runtime)', () => {
|
|
|
116
114
|
});
|
|
117
115
|
it('sends with template that has empty vars (dashboard shape)', async () => {
|
|
118
116
|
const client = new Ewyn({
|
|
119
|
-
workspaceId: 'ws-3',
|
|
120
117
|
apiKey: 'key-3',
|
|
121
118
|
templates: configEmptyVars,
|
|
122
119
|
maxRetries: 1,
|
|
@@ -145,7 +142,6 @@ describe('Dashboard config (runtime)', () => {
|
|
|
145
142
|
});
|
|
146
143
|
it('throws when required variable is missing (dashboard config)', async () => {
|
|
147
144
|
const client = new Ewyn({
|
|
148
|
-
workspaceId: 'ws-1',
|
|
149
145
|
apiKey: 'key-1',
|
|
150
146
|
templates: configOnlyRequired,
|
|
151
147
|
maxRetries: 1,
|
|
@@ -162,7 +158,6 @@ describe('Dashboard config (runtime)', () => {
|
|
|
162
158
|
});
|
|
163
159
|
it('throws when template name is not in config (dashboard config)', async () => {
|
|
164
160
|
const client = new Ewyn({
|
|
165
|
-
workspaceId: 'ws-1',
|
|
166
161
|
apiKey: 'key-1',
|
|
167
162
|
templates: configOnlyRequired,
|
|
168
163
|
maxRetries: 1,
|
|
@@ -8,7 +8,6 @@ describe('Ewyn SDK', () => {
|
|
|
8
8
|
vi.clearAllMocks();
|
|
9
9
|
global.fetch.mockReset();
|
|
10
10
|
client = new Ewyn({
|
|
11
|
-
workspaceId: 'test-workspace-id',
|
|
12
11
|
apiKey: 'test-api-key',
|
|
13
12
|
maxRetries: 2, // Allow 1 retry (attempt < maxRetries)
|
|
14
13
|
timeout: 5000,
|
|
@@ -20,7 +19,6 @@ describe('Ewyn SDK', () => {
|
|
|
20
19
|
});
|
|
21
20
|
it('should use default base URL if not provided', () => {
|
|
22
21
|
const defaultClient = new Ewyn({
|
|
23
|
-
workspaceId: 'test-workspace-id',
|
|
24
22
|
apiKey: 'test-api-key',
|
|
25
23
|
});
|
|
26
24
|
expect(defaultClient).toBeInstanceOf(Ewyn);
|
|
@@ -37,7 +35,6 @@ describe('Ewyn SDK', () => {
|
|
|
37
35
|
},
|
|
38
36
|
};
|
|
39
37
|
const configClient = new Ewyn({
|
|
40
|
-
workspaceId: 'test-workspace-id',
|
|
41
38
|
apiKey: 'test-api-key',
|
|
42
39
|
templates: config,
|
|
43
40
|
});
|
|
@@ -64,7 +61,7 @@ describe('Ewyn SDK', () => {
|
|
|
64
61
|
},
|
|
65
62
|
});
|
|
66
63
|
expect(result).toEqual(mockResponse);
|
|
67
|
-
expect(global.fetch).toHaveBeenCalledWith('https://www.ewyn.ai/api/v1/
|
|
64
|
+
expect(global.fetch).toHaveBeenCalledWith('https://www.ewyn.ai/api/v1/send', expect.objectContaining({
|
|
68
65
|
method: 'POST',
|
|
69
66
|
headers: expect.objectContaining({
|
|
70
67
|
'Content-Type': 'application/json',
|
|
@@ -91,7 +88,6 @@ describe('Ewyn SDK', () => {
|
|
|
91
88
|
},
|
|
92
89
|
};
|
|
93
90
|
const configClient = new Ewyn({
|
|
94
|
-
workspaceId: 'test-workspace-id',
|
|
95
91
|
apiKey: 'test-api-key',
|
|
96
92
|
templates: config,
|
|
97
93
|
});
|
|
@@ -202,7 +198,6 @@ describe('Ewyn SDK', () => {
|
|
|
202
198
|
},
|
|
203
199
|
};
|
|
204
200
|
const configClient = new Ewyn({
|
|
205
|
-
workspaceId: 'test-workspace-id',
|
|
206
201
|
apiKey: 'test-api-key',
|
|
207
202
|
templates: config,
|
|
208
203
|
});
|
|
@@ -227,7 +222,6 @@ describe('Ewyn SDK', () => {
|
|
|
227
222
|
},
|
|
228
223
|
};
|
|
229
224
|
const configClient = new Ewyn({
|
|
230
|
-
workspaceId: 'test-workspace-id',
|
|
231
225
|
apiKey: 'test-api-key',
|
|
232
226
|
templates: config,
|
|
233
227
|
});
|
|
@@ -253,7 +247,6 @@ describe('Ewyn SDK', () => {
|
|
|
253
247
|
},
|
|
254
248
|
};
|
|
255
249
|
const configClient = new Ewyn({
|
|
256
|
-
workspaceId: 'test-workspace-id',
|
|
257
250
|
apiKey: 'test-api-key',
|
|
258
251
|
templates: config,
|
|
259
252
|
});
|
package/dist/cli.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AA0GA,4BAA4B;AAC5B,wBAAsB,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAqB/D"}
|
package/dist/cli.js
CHANGED
|
@@ -15,11 +15,10 @@ Commands:
|
|
|
15
15
|
|
|
16
16
|
Config file (in current working directory):
|
|
17
17
|
Look for ewyn.config.ts, ewyn.config.mjs, or ewyn.config.js with default export:
|
|
18
|
-
{
|
|
18
|
+
{ apiKey: string, configurationPath?: string }
|
|
19
19
|
|
|
20
20
|
Example ewyn.config.ts:
|
|
21
21
|
export default {
|
|
22
|
-
workspaceId: process.env.EWYN_WORKSPACE_ID!,
|
|
23
22
|
apiKey: process.env.EWYN_API_KEY!,
|
|
24
23
|
configurationPath: './src/ewynTemplates.ts', // optional
|
|
25
24
|
};
|
|
@@ -54,17 +53,13 @@ async function loadConfig(configPath) {
|
|
|
54
53
|
return config;
|
|
55
54
|
}
|
|
56
55
|
function validateConfig(config, configPath) {
|
|
57
|
-
if (!config.workspaceId || typeof config.workspaceId !== 'string') {
|
|
58
|
-
console.error(`Error: workspaceId is missing or invalid in ${configPath}. You can use process.env.EWYN_WORKSPACE_ID.`);
|
|
59
|
-
process.exit(1);
|
|
60
|
-
}
|
|
61
56
|
if (!config.apiKey || typeof config.apiKey !== 'string') {
|
|
62
57
|
console.error(`Error: apiKey is missing or invalid in ${configPath}. You can use process.env.EWYN_API_KEY.`);
|
|
63
58
|
process.exit(1);
|
|
64
59
|
}
|
|
65
60
|
}
|
|
66
|
-
async function fetchTemplates(
|
|
67
|
-
const url = `${EWYN_API_BASE_URL}/
|
|
61
|
+
async function fetchTemplates(apiKey) {
|
|
62
|
+
const url = `${EWYN_API_BASE_URL}/templates/config`;
|
|
68
63
|
const response = await fetch(url, {
|
|
69
64
|
method: 'GET',
|
|
70
65
|
headers: {
|
|
@@ -107,7 +102,7 @@ export async function runFetchConfig(cwd) {
|
|
|
107
102
|
const outputPath = config.configurationPath
|
|
108
103
|
? path.resolve(cwd, config.configurationPath)
|
|
109
104
|
: path.join(cwd, DEFAULT_OUTPUT_FILE);
|
|
110
|
-
const templates = await fetchTemplates(config.
|
|
105
|
+
const templates = await fetchTemplates(config.apiKey);
|
|
111
106
|
const dir = path.dirname(outputPath);
|
|
112
107
|
fs.mkdirSync(dir, { recursive: true });
|
|
113
108
|
fs.writeFileSync(outputPath, serializeTemplates(templates), 'utf-8');
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { EwynOptions, EwynOptionsTyped, SendEmailOptions, SendEmailOptionsTyped, SendEmailResponse, TemplateConfig } from './types.js';
|
|
2
2
|
export declare class Ewyn<TConfig extends TemplateConfig = TemplateConfig> {
|
|
3
|
-
private readonly workspaceId;
|
|
4
3
|
private readonly apiKey;
|
|
5
4
|
private readonly templates?;
|
|
6
5
|
private readonly maxRetries;
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,WAAW,EACX,gBAAgB,EAChB,gBAAgB,EAChB,qBAAqB,EACrB,iBAAiB,EACjB,cAAc,EACf,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,WAAW,EACX,gBAAgB,EAChB,gBAAgB,EAChB,qBAAqB,EACrB,iBAAiB,EACjB,cAAc,EACf,MAAM,YAAY,CAAC;AAiDpB,qBAAa,IAAI,CAAC,OAAO,SAAS,cAAc,GAAG,cAAc;IAC/D,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAS;IAChC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAU;IACrC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAS;IACpC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAS;gBAErB,OAAO,EAAE,WAAW,GAAG,gBAAgB,CAAC,OAAO,CAAC;IAO5D;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IACG,IAAI,CACR,OAAO,EAAE,OAAO,SAAS,cAAc,GACnC,qBAAqB,CAAC,OAAO,CAAC,GAAG,gBAAgB,GACjD,gBAAgB,GACnB,OAAO,CAAC,iBAAiB,CAAC;IA8C7B;;OAEG;YACW,iBAAiB;IAyB/B;;OAEG;IACH,OAAO,CAAC,iBAAiB;IA2BzB;;OAEG;YACW,gBAAgB;CAuE/B;AAED,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,YAAY,EACV,eAAe,EACf,WAAW,EACX,gBAAgB,EAChB,gBAAgB,EAChB,oBAAoB,EACpB,qBAAqB,EACrB,iBAAiB,EACjB,cAAc,EACd,mBAAmB,EACnB,gBAAgB,EACjB,MAAM,YAAY,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -5,7 +5,6 @@ import { EwynApiError } from './errors.js';
|
|
|
5
5
|
* @example Basic usage without template config
|
|
6
6
|
* ```ts
|
|
7
7
|
* const client = new Ewyn({
|
|
8
|
-
* workspaceId: 'your-workspace-id',
|
|
9
8
|
* apiKey: 'your-api-key',
|
|
10
9
|
* });
|
|
11
10
|
*
|
|
@@ -31,7 +30,6 @@ import { EwynApiError } from './errors.js';
|
|
|
31
30
|
* } as const;
|
|
32
31
|
*
|
|
33
32
|
* const client = new Ewyn({
|
|
34
|
-
* workspaceId: 'your-workspace-id',
|
|
35
33
|
* apiKey: 'your-api-key',
|
|
36
34
|
* templates: config
|
|
37
35
|
* });
|
|
@@ -48,13 +46,11 @@ import { EwynApiError } from './errors.js';
|
|
|
48
46
|
*/
|
|
49
47
|
const EWYN_API_BASE_URL = 'https://www.ewyn.ai/api/v1';
|
|
50
48
|
export class Ewyn {
|
|
51
|
-
workspaceId;
|
|
52
49
|
apiKey;
|
|
53
50
|
templates;
|
|
54
51
|
maxRetries;
|
|
55
52
|
timeout;
|
|
56
53
|
constructor(options) {
|
|
57
|
-
this.workspaceId = options.workspaceId;
|
|
58
54
|
this.apiKey = options.apiKey;
|
|
59
55
|
this.templates = options.templates;
|
|
60
56
|
this.maxRetries = options.maxRetries ?? 3;
|
|
@@ -112,7 +108,7 @@ export class Ewyn {
|
|
|
112
108
|
body.version = options.version;
|
|
113
109
|
}
|
|
114
110
|
// Make request with retries
|
|
115
|
-
return this.requestWithRetry(
|
|
111
|
+
return this.requestWithRetry('/send', {
|
|
116
112
|
method: 'POST',
|
|
117
113
|
headers: {
|
|
118
114
|
'Content-Type': 'application/json',
|
package/dist/types.d.ts
CHANGED
|
@@ -100,8 +100,6 @@ export interface SendEmailResponse {
|
|
|
100
100
|
* Configuration options for the Ewyn client (base)
|
|
101
101
|
*/
|
|
102
102
|
export interface EwynOptionsBase {
|
|
103
|
-
/** Workspace ID (UUID) */
|
|
104
|
-
workspaceId: string;
|
|
105
103
|
/** API key secret */
|
|
106
104
|
apiKey: string;
|
|
107
105
|
/** Maximum number of retries for retryable errors (default: 3) */
|
|
@@ -125,11 +123,9 @@ export type EwynOptions = EwynOptionsBase & {
|
|
|
125
123
|
};
|
|
126
124
|
/**
|
|
127
125
|
* Configuration for the fetch-config CLI (ewyn.config.ts).
|
|
128
|
-
* Used only by the CLI to know which
|
|
126
|
+
* Used only by the CLI to know which API key to use and where to write the generated file.
|
|
129
127
|
*/
|
|
130
128
|
export interface EwynFetchConfig {
|
|
131
|
-
/** Workspace ID (UUID) */
|
|
132
|
-
workspaceId: string;
|
|
133
129
|
/** API key secret (e.g. process.env.EWYN_API_KEY) */
|
|
134
130
|
apiKey: string;
|
|
135
131
|
/** Output path for the generated ewynTemplates file (e.g. ./src/ewynTemplates.ts). If omitted, defaults to ./ewynTemplates.ts in cwd. */
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,oDAAoD;IACpD,EAAE,EAAE,MAAM,CAAC;IACX,mCAAmC;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,2BAA2B;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,2BAA2B;IAC3B,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;CACxC;AAED;;;GAGG;AACH,MAAM,MAAM,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,mBAAmB,CAAC,CAAC;AAEjE;;GAEG;AACH,KAAK,YAAY,CAAC,CAAC,SAAS,mBAAmB,IAAI;KAChD,CAAC,IAAI,MAAM,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,SAAS;QAAE,QAAQ,EAAE,IAAI,CAAA;KAAE,GAAG,CAAC,GAAG,KAAK;CAC5E,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;AAEnB;;GAEG;AACH,KAAK,YAAY,CAAC,CAAC,SAAS,mBAAmB,IAAI;KAChD,CAAC,IAAI,MAAM,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,SAAS;QAAE,QAAQ,EAAE,KAAK,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|
|
4
4
|
"description": "Official TypeScript SDK for Ewyn email service with full type safety",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -17,13 +17,6 @@
|
|
|
17
17
|
"files": [
|
|
18
18
|
"dist"
|
|
19
19
|
],
|
|
20
|
-
"scripts": {
|
|
21
|
-
"build": "tsc",
|
|
22
|
-
"dev": "tsc --watch",
|
|
23
|
-
"lint": "eslint . --max-warnings 0",
|
|
24
|
-
"test": "vitest run --typecheck",
|
|
25
|
-
"test:watch": "vitest"
|
|
26
|
-
},
|
|
27
20
|
"keywords": [
|
|
28
21
|
"ewyn",
|
|
29
22
|
"email",
|
|
@@ -43,9 +36,16 @@
|
|
|
43
36
|
},
|
|
44
37
|
"devDependencies": {
|
|
45
38
|
"@types/node": "^20.11.0",
|
|
46
|
-
"@workspace/eslint-config": "workspace:*",
|
|
47
|
-
"@workspace/typescript-config": "workspace:*",
|
|
48
39
|
"typescript": "^5.7.3",
|
|
49
|
-
"vitest": "^1.2.0"
|
|
40
|
+
"vitest": "^1.2.0",
|
|
41
|
+
"@workspace/eslint-config": "0.0.0",
|
|
42
|
+
"@workspace/typescript-config": "0.0.0"
|
|
43
|
+
},
|
|
44
|
+
"scripts": {
|
|
45
|
+
"build": "tsc",
|
|
46
|
+
"dev": "tsc --watch",
|
|
47
|
+
"lint": "eslint . --max-warnings 0",
|
|
48
|
+
"test": "vitest run --typecheck",
|
|
49
|
+
"test:watch": "vitest"
|
|
50
50
|
}
|
|
51
51
|
}
|