hcloud-sdk 20.4.0 → 21.0.1

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 (41) hide show
  1. package/changelog.md +3 -3
  2. package/lib/helper/ValidationHelper.js +1 -1
  3. package/lib/interfaces/cosmo/asset/index.d.ts +16 -3
  4. package/lib/interfaces/cosmo/asset/index.js +1 -0
  5. package/lib/interfaces/cosmo/comment/index.d.ts +19 -2
  6. package/lib/interfaces/cosmo/comment/index.js +17 -1
  7. package/lib/interfaces/cosmo/share/index.d.ts +19 -0
  8. package/lib/interfaces/cosmo/share/index.js +13 -1
  9. package/lib/interfaces/cosmo/space/index.d.ts +32 -0
  10. package/lib/interfaces/cosmo/space/index.js +6 -0
  11. package/lib/interfaces/high5/space/database/document/index.d.ts +14 -6
  12. package/lib/interfaces/high5/space/database/document/index.js +1 -0
  13. package/lib/interfaces/high5/space/job/index.d.ts +9 -10
  14. package/lib/interfaces/high5/space/job/index.js +2 -1
  15. package/lib/interfaces/idp/organization/index.d.ts +1 -1
  16. package/lib/interfaces/idp/organization/index.js +1 -1
  17. package/lib/interfaces/mailer/index.d.ts +77 -21
  18. package/lib/interfaces/mailer/index.js +247 -50
  19. package/lib/interfaces/nats/index.d.ts +4 -0
  20. package/lib/interfaces/nats/index.js +5 -0
  21. package/lib/service/cosmo/asset/index.d.ts +54 -1
  22. package/lib/service/cosmo/asset/index.js +62 -0
  23. package/lib/service/cosmo/comment/index.d.ts +2 -2
  24. package/lib/service/cosmo/comment/index.js +2 -2
  25. package/lib/service/cosmo/index.d.ts +3 -0
  26. package/lib/service/cosmo/index.js +7 -0
  27. package/lib/service/cosmo/share/index.d.ts +15 -7
  28. package/lib/service/cosmo/share/index.js +17 -7
  29. package/lib/service/cosmo/space/index.d.ts +25 -1
  30. package/lib/service/cosmo/space/index.js +30 -0
  31. package/lib/service/cosmo/stack/index.d.ts +68 -0
  32. package/lib/service/cosmo/stack/index.js +102 -0
  33. package/lib/service/high5/space/database/document/{array → collection}/index.d.ts +25 -1
  34. package/lib/service/high5/space/database/document/{array → collection}/index.js +33 -3
  35. package/lib/service/high5/space/database/document/index.d.ts +16 -4
  36. package/lib/service/high5/space/database/document/index.js +20 -5
  37. package/lib/service/high5/space/job/index.d.ts +3 -2
  38. package/lib/service/high5/space/job/index.js +3 -2
  39. package/lib/service/mailer/internal/index.d.ts +12 -3
  40. package/lib/service/mailer/internal/index.js +13 -1
  41. package/package.json +3 -2
@@ -1,13 +1,13 @@
1
1
  import Base, { MaybeRaw } from "../../../Base";
2
- import { HtmlMail, MailjetMailDTO, MailjetResponse, MustacheMail, TemplateMail } from "../../../interfaces/mailer";
2
+ import { HtmlMail, MailDTO, MailjetResponse, MustacheMail, ResendResponse, TemplateMail } from "../../../interfaces/mailer";
3
3
  export default class MailerInternal extends Base {
4
4
  /**
5
5
  * Sends a new mail based on a mailjet template.
6
6
  *
7
7
  * THIS IS AN INTERNAL ENDPOINT AND CAN ONLY BE USED FROM BACKENDS WITHIN THE HCLOUD DEPLOYMENT
8
- * @param mail MailjetMailDTO
8
+ * @param mail MailDTO
9
9
  */
10
- sendMailMailjet<R extends boolean = false>(mail: MailjetMailDTO, raw?: {
10
+ sendMailMailjet<R extends boolean = false>(mail: MailDTO, raw?: {
11
11
  raw: R;
12
12
  }): Promise<MaybeRaw<R, MailjetResponse>>;
13
13
  /**
@@ -40,5 +40,14 @@ export default class MailerInternal extends Base {
40
40
  sendMailTemplate<R extends boolean = false>(mail: TemplateMail, raw?: {
41
41
  raw: R;
42
42
  }): Promise<MaybeRaw<R, void>>;
43
+ /**
44
+ * Sends a new mail based on an existing react-mail template using resend.com
45
+ *
46
+ * THIS IS AN INTERNAL ENDPOINT AND CAN ONLY BE USED FROM BACKENDS WITHIN THE HCLOUD DEPLOYMENT
47
+ * @param mail MailDTO
48
+ */
49
+ sendMailResend<R extends boolean = false>(mail: MailDTO, raw?: {
50
+ raw: R;
51
+ }): Promise<MaybeRaw<R, ResendResponse>>;
43
52
  protected getEndpoint(endpoint: string): string;
44
53
  }
@@ -18,7 +18,7 @@ class MailerInternal extends Base_1.default {
18
18
  * Sends a new mail based on a mailjet template.
19
19
  *
20
20
  * THIS IS AN INTERNAL ENDPOINT AND CAN ONLY BE USED FROM BACKENDS WITHIN THE HCLOUD DEPLOYMENT
21
- * @param mail MailjetMailDTO
21
+ * @param mail MailDTO
22
22
  */
23
23
  sendMailMailjet(mail, raw) {
24
24
  return __awaiter(this, void 0, void 0, function* () {
@@ -65,6 +65,18 @@ class MailerInternal extends Base_1.default {
65
65
  return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : undefined);
66
66
  });
67
67
  }
68
+ /**
69
+ * Sends a new mail based on an existing react-mail template using resend.com
70
+ *
71
+ * THIS IS AN INTERNAL ENDPOINT AND CAN ONLY BE USED FROM BACKENDS WITHIN THE HCLOUD DEPLOYMENT
72
+ * @param mail MailDTO
73
+ */
74
+ sendMailResend(mail, raw) {
75
+ return __awaiter(this, void 0, void 0, function* () {
76
+ const resp = yield this.axios.post(this.getEndpoint("/v1/send/resend"), mail);
77
+ return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
78
+ });
79
+ }
68
80
  getEndpoint(endpoint) {
69
81
  return `${this.options.server}/api/mailer/internal${endpoint}`;
70
82
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hcloud-sdk",
3
- "version": "20.4.0",
3
+ "version": "21.0.1",
4
4
  "description": "hcloud platform sdk",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -27,6 +27,7 @@
27
27
  "author": "moovit-sp-gmbh",
28
28
  "homepage": "https://github.com/moovit-sp-gmbh/hcloud-sdk-js#readme",
29
29
  "devDependencies": {
30
+ "@amanda-mitchell/semantic-release-npm-multiple": "^3.17.0",
30
31
  "@commitlint/cli": "^19.8.1",
31
32
  "@commitlint/config-conventional": "^19.8.1",
32
33
  "@eslint/compat": "^1.2.9",
@@ -44,7 +45,7 @@
44
45
  "eslint-plugin-import": "^2.31.0",
45
46
  "globals": "^16.1.0",
46
47
  "prettier": "^3.5.3",
47
- "semantic-release": "^24.2.4",
48
+ "semantic-release": "^25.0.5",
48
49
  "semantic-release-telegram": "^1.6.2",
49
50
  "ts-node": "^10.9.2",
50
51
  "typescript": "^5.8.3"