@scaleway/sdk-tem 1.3.0 → 2.2.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 +96 -0
- package/dist/v1alpha1/api.gen.d.ts +2 -2
- package/dist/v1alpha1/api.gen.js +1 -1
- package/dist/v1alpha1/validation-rules.gen.d.ts +0 -2
- package/dist/v1alpha1/validation-rules.gen.js +2 -4
- package/package.json +6 -9
- package/dist/index.gen.cjs +0 -4
- package/dist/v1alpha1/api.gen.cjs +0 -538
- package/dist/v1alpha1/content.gen.cjs +0 -9
- package/dist/v1alpha1/index.gen.cjs +0 -36
- package/dist/v1alpha1/marshalling.gen.cjs +0 -600
- package/dist/v1alpha1/validation-rules.gen.cjs +0 -147
package/README.md
ADDED
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
# @scaleway/sdk-tem
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/@scaleway/sdk-tem)
|
|
4
|
+
[](https://www.npmjs.com/package/@scaleway/sdk-tem)
|
|
5
|
+
[](https://github.com/scaleway/scaleway-sdk-js/blob/master/LICENSE)
|
|
6
|
+
|
|
7
|
+
Scaleway SDK for Tem API.
|
|
8
|
+
|
|
9
|
+
> **Note**
|
|
10
|
+
> This is an automatically generated package that is part of the [Scaleway SDK for JavaScript](https://github.com/scaleway/scaleway-sdk-js).
|
|
11
|
+
|
|
12
|
+
## Installation
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
npm install @scaleway/sdk-tem @scaleway/sdk-client
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
or with pnpm:
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
pnpm add @scaleway/sdk-tem @scaleway/sdk-client
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
or with yarn:
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
yarn add @scaleway/sdk-tem @scaleway/sdk-client
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Getting Started
|
|
31
|
+
|
|
32
|
+
You'll need a pair of access and secret keys to connect to Scaleway API. Please check the [documentation](https://www.scaleway.com/en/docs/identity-and-access-management/iam/how-to/create-api-keys/) on how to retrieve them.
|
|
33
|
+
|
|
34
|
+
### Basic Usage
|
|
35
|
+
|
|
36
|
+
```typescript
|
|
37
|
+
import { createClient } from '@scaleway/sdk-client'
|
|
38
|
+
import { Tem } from '@scaleway/sdk-tem'
|
|
39
|
+
|
|
40
|
+
const client = createClient({
|
|
41
|
+
accessKey: 'SCWXXXXXXXXXXXXXXXXX',
|
|
42
|
+
secretKey: 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx',
|
|
43
|
+
defaultProjectId: 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx',
|
|
44
|
+
defaultRegion: 'fr-par',
|
|
45
|
+
defaultZone: 'fr-par-1',
|
|
46
|
+
})
|
|
47
|
+
|
|
48
|
+
const api = new Tem.v1.API(client)
|
|
49
|
+
|
|
50
|
+
// Use the API
|
|
51
|
+
// Example: await api.listServers()
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### Using Configuration Loader
|
|
55
|
+
|
|
56
|
+
For a simpler setup, you can load credentials from the configuration file or environment variables:
|
|
57
|
+
|
|
58
|
+
```typescript
|
|
59
|
+
import { createClient } from '@scaleway/sdk-client'
|
|
60
|
+
import { loadProfileFromConfigurationFile } from '@scaleway/configuration-loader'
|
|
61
|
+
import { Tem } from '@scaleway/sdk-tem'
|
|
62
|
+
|
|
63
|
+
const profile = loadProfileFromConfigurationFile()
|
|
64
|
+
const client = createClient(profile)
|
|
65
|
+
const api = new Tem.v1.API(client)
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## Documentation
|
|
69
|
+
|
|
70
|
+
- 📚 [Scaleway SDK Reference Documentation](https://scaleway.github.io/scaleway-sdk-js)
|
|
71
|
+
- 🌐 [Scaleway Tem API Documentation](https://www.scaleway.com/en/developers/api/tem/)
|
|
72
|
+
- 📖 [Main Repository](https://github.com/scaleway/scaleway-sdk-js)
|
|
73
|
+
- 💡 [Example Projects](https://github.com/scaleway/scaleway-sdk-js/tree/master/examples)
|
|
74
|
+
|
|
75
|
+
## Features
|
|
76
|
+
|
|
77
|
+
- ✅ Full TypeScript support with complete type definitions
|
|
78
|
+
- ✅ Promise-based API
|
|
79
|
+
- ✅ Automatic pagination helpers
|
|
80
|
+
- ✅ Built-in error handling
|
|
81
|
+
- ✅ Compatible with Node.js ≥ 20
|
|
82
|
+
|
|
83
|
+
## Support
|
|
84
|
+
|
|
85
|
+
We love feedback! Feel free to reach us on:
|
|
86
|
+
- [Scaleway Slack community](https://slack.scaleway.com/) - Join us on [#opensource](https://scaleway-community.slack.com/app_redirect?channel=opensource)
|
|
87
|
+
- [GitHub Issues](https://github.com/scaleway/scaleway-sdk-js/issues)
|
|
88
|
+
|
|
89
|
+
## Contributing
|
|
90
|
+
|
|
91
|
+
This repository is at its early stage and is still in active development. If you are looking for a way to contribute, please read [CONTRIBUTING.md](https://github.com/scaleway/scaleway-sdk-js/blob/master/CONTRIBUTING.md).
|
|
92
|
+
|
|
93
|
+
## License
|
|
94
|
+
|
|
95
|
+
This project is Apache 2.0 licensed. See the [LICENSE](https://github.com/scaleway/scaleway-sdk-js/blob/master/LICENSE) file for details.
|
|
96
|
+
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { API as ParentAPI } from '@scaleway/sdk-client';
|
|
2
1
|
import type { ApiLocality, WaitForOptions } from '@scaleway/sdk-client';
|
|
2
|
+
import { API as ParentAPI } from '@scaleway/sdk-client';
|
|
3
3
|
import type { BulkCreateBlocklistsRequest, BulkCreateBlocklistsResponse, CancelEmailRequest, CheckDomainRequest, CreateDomainRequest, CreateEmailRequest, CreateEmailResponse, CreateWebhookRequest, DeleteBlocklistRequest, DeleteWebhookRequest, Domain, DomainLastStatus, Email, GetDomainLastStatusRequest, GetDomainRequest, GetEmailRequest, GetProjectConsumptionRequest, GetProjectSettingsRequest, GetStatisticsRequest, GetWebhookRequest, ListBlocklistsRequest, ListBlocklistsResponse, ListDomainsRequest, ListDomainsResponse, ListEmailsRequest, ListEmailsResponse, ListOfferSubscriptionsRequest, ListOfferSubscriptionsResponse, ListOffersRequest, ListOffersResponse, ListPoolsRequest, ListPoolsResponse, ListWebhookEventsRequest, ListWebhookEventsResponse, ListWebhooksRequest, ListWebhooksResponse, OfferSubscription, ProjectConsumption, ProjectSettings, RevokeDomainRequest, Statistics, UpdateDomainRequest, UpdateOfferSubscriptionRequest, UpdateProjectSettingsRequest, UpdateWebhookRequest, Webhook } from './types.gen.js';
|
|
4
4
|
/**
|
|
5
5
|
* Transactional Email API.
|
|
@@ -13,7 +13,7 @@ export declare class API extends ParentAPI {
|
|
|
13
13
|
*/
|
|
14
14
|
static readonly LOCALITY: ApiLocality;
|
|
15
15
|
/**
|
|
16
|
-
* Send an email. You must specify the `region`, the sender and the recipient's information and the `project_id` to send an email from a checked domain.
|
|
16
|
+
* Send an email. You must specify the `region`, the sender and the recipient's information and the `project_id` to send an email from a checked domain.
|
|
17
17
|
*
|
|
18
18
|
* @param request - The request {@link CreateEmailRequest}
|
|
19
19
|
* @returns A Promise of CreateEmailResponse
|
package/dist/v1alpha1/api.gen.js
CHANGED
|
@@ -13,7 +13,7 @@ class API extends API$1 {
|
|
|
13
13
|
regions: ["fr-par"]
|
|
14
14
|
});
|
|
15
15
|
/**
|
|
16
|
-
* Send an email. You must specify the `region`, the sender and the recipient's information and the `project_id` to send an email from a checked domain.
|
|
16
|
+
* Send an email. You must specify the `region`, the sender and the recipient's information and the `project_id` to send an email from a checked domain.
|
|
17
17
|
*
|
|
18
18
|
* @param request - The request {@link CreateEmailRequest}
|
|
19
19
|
* @returns A Promise of CreateEmailResponse
|
|
@@ -12,7 +12,6 @@ export declare const CreateDomainRequest: {
|
|
|
12
12
|
export declare const CreateEmailRequest: {
|
|
13
13
|
subject: {
|
|
14
14
|
maxLength: number;
|
|
15
|
-
minLength: number;
|
|
16
15
|
};
|
|
17
16
|
};
|
|
18
17
|
export declare const CreateEmailRequestAddress: {
|
|
@@ -78,7 +77,6 @@ export declare const ListEmailsRequest: {
|
|
|
78
77
|
};
|
|
79
78
|
subject: {
|
|
80
79
|
maxLength: number;
|
|
81
|
-
minLength: number;
|
|
82
80
|
};
|
|
83
81
|
};
|
|
84
82
|
export declare const ListPoolsRequest: {
|
|
@@ -11,8 +11,7 @@ const CreateDomainRequest = {
|
|
|
11
11
|
};
|
|
12
12
|
const CreateEmailRequest = {
|
|
13
13
|
subject: {
|
|
14
|
-
maxLength: 998
|
|
15
|
-
minLength: 6
|
|
14
|
+
maxLength: 998
|
|
16
15
|
}
|
|
17
16
|
};
|
|
18
17
|
const CreateEmailRequestAddress = {
|
|
@@ -77,8 +76,7 @@ const ListEmailsRequest = {
|
|
|
77
76
|
minLength: 3
|
|
78
77
|
},
|
|
79
78
|
subject: {
|
|
80
|
-
maxLength: 998
|
|
81
|
-
minLength: 6
|
|
79
|
+
maxLength: 998
|
|
82
80
|
}
|
|
83
81
|
};
|
|
84
82
|
const ListPoolsRequest = {
|
package/package.json
CHANGED
|
@@ -1,23 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scaleway/sdk-tem",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.2.0",
|
|
4
4
|
"description": "Scaleway SDK tem",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"files": [
|
|
7
|
+
"README.md",
|
|
7
8
|
"dist"
|
|
8
9
|
],
|
|
9
10
|
"type": "module",
|
|
10
11
|
"exports": {
|
|
11
12
|
".": {
|
|
12
13
|
"types": "./dist/index.gen.d.ts",
|
|
13
|
-
"import": "./dist/index.gen.js",
|
|
14
|
-
"require": "./dist/index.gen.cjs",
|
|
15
14
|
"default": "./dist/index.gen.js"
|
|
16
15
|
},
|
|
17
16
|
"./*": {
|
|
18
17
|
"types": "./dist/*/index.gen.d.ts",
|
|
19
|
-
"import": "./dist/*/index.gen.js",
|
|
20
|
-
"require": "./dist/*/index.gen.cjs",
|
|
21
18
|
"default": "./dist/*/index.gen.js"
|
|
22
19
|
}
|
|
23
20
|
},
|
|
@@ -26,17 +23,17 @@
|
|
|
26
23
|
"directory": "packages_generated/tem"
|
|
27
24
|
},
|
|
28
25
|
"engines": {
|
|
29
|
-
"node": ">=20.19.
|
|
26
|
+
"node": ">=20.19.6"
|
|
30
27
|
},
|
|
31
28
|
"dependencies": {
|
|
32
29
|
"@scaleway/random-name": "5.1.2",
|
|
33
|
-
"@scaleway/sdk-std": "1.
|
|
30
|
+
"@scaleway/sdk-std": "2.1.0"
|
|
34
31
|
},
|
|
35
32
|
"peerDependencies": {
|
|
36
|
-
"@scaleway/sdk-client": "^1.
|
|
33
|
+
"@scaleway/sdk-client": "^2.1.0"
|
|
37
34
|
},
|
|
38
35
|
"devDependencies": {
|
|
39
|
-
"@scaleway/sdk-client": "^1.
|
|
36
|
+
"@scaleway/sdk-client": "^2.1.0"
|
|
40
37
|
},
|
|
41
38
|
"scripts": {
|
|
42
39
|
"package:check": "pnpm publint",
|
package/dist/index.gen.cjs
DELETED