hcloud-sdk 22.40.2 → 22.41.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/changelog.md CHANGED
@@ -1,5 +1,5 @@
1
- ## [22.40.2](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/compare/v22.40.1...v22.40.2) (2026-09-28)
1
+ ## [22.41.0](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/compare/v22.40.3...v22.41.0) (2026-09-29)
2
2
 
3
- ### Bug Fixes
3
+ ### Features
4
4
 
5
- * rework address book creation process to receive a typed array ([807ace5](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/commit/807ace57b4a58df74b37a07849abe919e8c1668f))
5
+ * add remainingCooldownInSeconds field to users array for search shares response ([5c3dd9e](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/commit/5c3dd9e506ceedfb1bced7e58f000822dad16d8f))
@@ -1,6 +1,4 @@
1
1
  import { ReducedUser } from "../../idp";
2
- /** Members as key-value pairs: mandatory e-mail address -> optional display name (used for create/add input) */
3
- export type AddressBookMembers = Record<string, string | undefined>;
4
2
  export declare enum AddressBookMemberType {
5
3
  /** Existing helmut.cloud user */
6
4
  INTERNAL = "INTERNAL",
@@ -34,8 +32,8 @@ export type AddressBookCreate = {
34
32
  name: string;
35
33
  /** Optional description (max 512 chars) */
36
34
  description?: string;
37
- /** Initial members (e-mail -> optional display name) */
38
- members?: AddressBookMembers;
35
+ /** Initial members */
36
+ members?: AddressBookMemberInput[];
39
37
  /** Initial list of internal team IDs to reference */
40
38
  teamIds?: string[];
41
39
  };
@@ -45,14 +43,12 @@ export type AddressBookUpdate = {
45
43
  /** Updated description (max 512 chars) */
46
44
  description?: string;
47
45
  };
48
- export type AddressBookMemberAddRequest = {
46
+ export type AddressBookMemberInput = {
47
+ /** Mandatory e-mail address */
49
48
  email: string;
49
+ /** Optional display name */
50
50
  name?: string;
51
51
  };
52
- export type AddressBookMemberRemoveRequest = {
53
- /** List of email addresses to remove (min 1) */
54
- emails: string[];
55
- };
56
52
  export type AddressBookTeamRequest = {
57
53
  /** List of internal team IDs to add or remove (min 1) */
58
54
  teamIds: string[];
@@ -56,7 +56,13 @@ export interface Share {
56
56
  expires?: number;
57
57
  password?: string;
58
58
  publicLink?: PublicLink;
59
- users?: (User | ReducedUser | ShareReducedUnlinkedUser)[];
59
+ /**
60
+ * Only present when searching shares of a space.
61
+ * `remainingCooldownInSeconds` is set for users whose share email is in cooldown and cannot be resent yet.
62
+ */
63
+ users?: ((User | ReducedUser | ShareReducedUnlinkedUser) & {
64
+ remainingCooldownInSeconds?: number;
65
+ })[];
60
66
  waiting: boolean;
61
67
  emailStatus?: {
62
68
  email: string;
@@ -1,5 +1,5 @@
1
1
  import Base, { MaybeRaw } from "../../../Base";
2
- import { AddressBook, AddressBookCreate, AddressBookMemberAddRequest, AddressBookUpdate } from "../../../interfaces/cosmo/addressBook";
2
+ import { AddressBook, AddressBookCreate, AddressBookMemberInput, AddressBookUpdate } from "../../../interfaces/cosmo/addressBook";
3
3
  import { SearchFilter, Sorting } from "../../../interfaces/global/SearchFilters";
4
4
  /**
5
5
  * @class CosmoAddressBook
@@ -24,7 +24,7 @@ export declare class CosmoAddressBook extends Base {
24
24
  * @param sorting Optional sorting definition
25
25
  * @param limit Maximum number of results per page (default 100)
26
26
  * @param page Zero-based page number (default 0)
27
- * @returns Paginated result with items and total count
27
+ * @returns List of address books for the requested page
28
28
  */
29
29
  searchAddressBooks<R extends boolean = false>(orgName: string, spaceName: string, { filters, sorting, limit, page }?: {
30
30
  filters?: SearchFilter[];
@@ -90,10 +90,10 @@ export declare class CosmoAddressBook extends Base {
90
90
  * @param orgName Name of the Organization
91
91
  * @param spaceName Name of the Space
92
92
  * @param bookId ID of the Address Book
93
- * @param members Members to add (e-mail -> optional display name)
93
+ * @param members Members to add (e-mail + optional display name, min 1)
94
94
  * @returns The updated AddressBook
95
95
  */
96
- addAddressBookMembers<R extends boolean = false>(orgName: string, spaceName: string, bookId: string, members: AddressBookMemberAddRequest[], raw?: {
96
+ addAddressBookMembers<R extends boolean = false>(orgName: string, spaceName: string, bookId: string, members: AddressBookMemberInput[], raw?: {
97
97
  raw: R;
98
98
  }): Promise<MaybeRaw<R, AddressBook>>;
99
99
  /**
@@ -41,7 +41,7 @@ class CosmoAddressBook extends Base_1.default {
41
41
  * @param sorting Optional sorting definition
42
42
  * @param limit Maximum number of results per page (default 100)
43
43
  * @param page Zero-based page number (default 0)
44
- * @returns Paginated result with items and total count
44
+ * @returns List of address books for the requested page
45
45
  */
46
46
  searchAddressBooks(orgName_1, spaceName_1) {
47
47
  return __awaiter(this, arguments, void 0, function* (orgName, spaceName, { filters, sorting, limit, page } = {}, raw) {
@@ -117,12 +117,14 @@ class CosmoAddressBook extends Base_1.default {
117
117
  * @param orgName Name of the Organization
118
118
  * @param spaceName Name of the Space
119
119
  * @param bookId ID of the Address Book
120
- * @param members Members to add (e-mail -> optional display name)
120
+ * @param members Members to add (e-mail + optional display name, min 1)
121
121
  * @returns The updated AddressBook
122
122
  */
123
123
  addAddressBookMembers(orgName, spaceName, bookId, members, raw) {
124
124
  return __awaiter(this, void 0, void 0, function* () {
125
- const resp = yield this.axios.post(this.getEndpoint(`${this.basePath(orgName, spaceName)}/${bookId}/members`), members);
125
+ const resp = yield this.axios.post(this.getEndpoint(`${this.basePath(orgName, spaceName)}/${bookId}/members`), {
126
+ members: members,
127
+ });
126
128
  return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
127
129
  });
128
130
  }
@@ -138,9 +140,8 @@ class CosmoAddressBook extends Base_1.default {
138
140
  */
139
141
  removeAddressBookMembers(orgName, spaceName, bookId, emails, raw) {
140
142
  return __awaiter(this, void 0, void 0, function* () {
141
- const payload = { emails };
142
143
  const resp = yield this.axios.delete(this.getEndpoint(`${this.basePath(orgName, spaceName)}/${bookId}/members`), {
143
- data: payload,
144
+ data: { emails: emails },
144
145
  });
145
146
  return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
146
147
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hcloud-sdk",
3
- "version": "22.40.2",
3
+ "version": "22.41.0",
4
4
  "description": "hcloud platform sdk",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",