hcloud-sdk 19.3.0 → 20.1.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
- ## [19.3.0](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/compare/v19.2.1...v19.3.0) (2026-05-12)
1
+ ## [20.1.0](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/compare/v20.0.1...v20.1.0) (2026-05-18)
2
2
 
3
3
  ### Features
4
4
 
5
- * new public version ([d33d2c1](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/commit/d33d2c1f48e1e0aa3e1559d730dea1802e112fd9))
5
+ * bump version ([6f33221](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/commit/6f33221ecc027e08ba1b1df397605025a2f6b341))
@@ -16,6 +16,8 @@ export interface BaseAsset {
16
16
  space: ReducedSpace;
17
17
  permissions?: string[];
18
18
  breadcrumb?: (Asset | CosmoSpace)[];
19
+ purgeAt?: number;
20
+ deletedAt?: number;
19
21
  }
20
22
  export type Asset = BaseAsset & ({
21
23
  type: ItemType.MEDIA_ASSET;
@@ -6,7 +6,6 @@ export interface CreateComment {
6
6
  annotation?: string;
7
7
  mentions?: string[];
8
8
  mentionsTeams?: string[];
9
- visibility?: CommentVisibility;
10
9
  }
11
10
  export interface EditComment {
12
11
  text: string;
@@ -15,7 +14,6 @@ export interface EditComment {
15
14
  mentions?: string[];
16
15
  mentionsTeams?: string[];
17
16
  completed?: boolean;
18
- visibility?: CommentVisibility;
19
17
  }
20
18
  export declare enum CommentType {
21
19
  COMMENT = "COMMENT",
@@ -31,10 +29,6 @@ export declare enum CommentSortDirection {
31
29
  ASC = "ASC",
32
30
  DESC = "DESC"
33
31
  }
34
- export declare enum CommentVisibility {
35
- INTERNAL = "internal",
36
- EXTERNAL = "external"
37
- }
38
32
  export interface Comment {
39
33
  _id: string;
40
34
  text: string;
@@ -50,7 +44,6 @@ export interface Comment {
50
44
  completed: boolean;
51
45
  completedBy?: ReducedUser;
52
46
  completedAt?: number;
53
- visibility?: CommentVisibility;
54
47
  }
55
48
  export interface Reply extends Omit<Comment, "timestamp" | "replies"> {
56
49
  commentRef: string;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CommentVisibility = exports.CommentSortDirection = exports.CommentSortField = exports.CommentType = void 0;
3
+ exports.CommentSortDirection = exports.CommentSortField = exports.CommentType = void 0;
4
4
  var CommentType;
5
5
  (function (CommentType) {
6
6
  CommentType["COMMENT"] = "COMMENT";
@@ -18,8 +18,3 @@ var CommentSortDirection;
18
18
  CommentSortDirection["ASC"] = "ASC";
19
19
  CommentSortDirection["DESC"] = "DESC";
20
20
  })(CommentSortDirection || (exports.CommentSortDirection = CommentSortDirection = {}));
21
- var CommentVisibility;
22
- (function (CommentVisibility) {
23
- CommentVisibility["INTERNAL"] = "internal";
24
- CommentVisibility["EXTERNAL"] = "external";
25
- })(CommentVisibility || (exports.CommentVisibility = CommentVisibility = {}));
@@ -13,6 +13,7 @@ export interface PublicLink {
13
13
  * Represents a share entity containing shared items and permissions.
14
14
  * @property _id - Unique identifier for the share.
15
15
  * @property name - Name of the share.
16
+ * @property active - Whether the share is currently active.
16
17
  * @property creator - The user who created the share.
17
18
  * @property createDate - Timestamp of when the share was created (in milliseconds since epoch).
18
19
  * @property items - Array of item IDs included in the share.
@@ -27,6 +28,7 @@ export interface PublicLink {
27
28
  export interface Share {
28
29
  _id: string;
29
30
  name: string;
31
+ active: boolean;
30
32
  creator: ReducedUser;
31
33
  createDate: number;
32
34
  items?: ({
@@ -91,7 +93,7 @@ export type ShareWithUsers = Share & {
91
93
  * @property public - (Optional) Whether the share is public.
92
94
  * @property visitsLimit - (Optional) New maximum number of allowed visits (only applicable for public shares).
93
95
  */
94
- export type SharePatch = Partial<Pick<ShareCreate, "name" | "users"> & {
96
+ export type SharePatch = Partial<Pick<ShareCreate, "name" | "users" | "active"> & {
95
97
  items: string[];
96
98
  permissions?: string[];
97
99
  assetPermissionGroups?: ShareAssetPermissionGroup[];
@@ -31,3 +31,21 @@ export declare enum GrantType {
31
31
  AUTHORIZATION_CODE = "authorization_code",
32
32
  REFRESH_TOKEN = "refresh_token"
33
33
  }
34
+ export interface OAuthMetadata {
35
+ issuer: string;
36
+ authorization_endpoint: string;
37
+ token_endpoint: string;
38
+ device_authorization_endpoint: string;
39
+ device_token_endpoint: string;
40
+ jwks_uri?: string;
41
+ userinfo_endpoint?: string;
42
+ http_logout_supported: boolean;
43
+ end_session_endpoint?: string;
44
+ scopes_supported: Scope[];
45
+ response_types_supported: string[];
46
+ grant_types_supported: string[];
47
+ token_endpoint_auth_methods_supported: string[];
48
+ token_endpoint_auth_signing_alg_values_supported: string[];
49
+ service_documentation: string[];
50
+ ui_locales_supported: string[];
51
+ }
@@ -122,7 +122,7 @@ export declare class CosmoSpace extends Base {
122
122
  * Updates the trashbin auto-delete policy for the specified Cosmo space.
123
123
  * @param orgName Name of the organization
124
124
  * @param spaceName Name of the space
125
- * @param policy Trash policy to apply. When `enabled` is `true`, `ttlDays` (1–365) must be provided. When `enabled` is `false`, `ttlDays` must be omitted.
125
+ * @param policy Trash policy to apply. If enabled, items in the trash will be automatically deleted after the specified TTL (in days).
126
126
  * @returns The updated Space
127
127
  */
128
128
  updateTrashbinPolicy<R extends boolean = false>(orgName: string, spaceName: string, policy: TrashPolicy, raw?: {
@@ -177,7 +177,7 @@ class CosmoSpace extends Base_1.default {
177
177
  * Updates the trashbin auto-delete policy for the specified Cosmo space.
178
178
  * @param orgName Name of the organization
179
179
  * @param spaceName Name of the space
180
- * @param policy Trash policy to apply. When `enabled` is `true`, `ttlDays` (1–365) must be provided. When `enabled` is `false`, `ttlDays` must be omitted.
180
+ * @param policy Trash policy to apply. If enabled, items in the trash will be automatically deleted after the specified TTL (in days).
181
181
  * @returns The updated Space
182
182
  */
183
183
  updateTrashbinPolicy(orgName, spaceName, policy, raw) {
@@ -1,5 +1,5 @@
1
1
  import Base, { MaybeRaw } from "../../../Base";
2
- import { OAuthToken, OAuthTokenRequest } from "../../../interfaces/idp/oauth";
2
+ import { OAuthMetadata, OAuthToken, OAuthTokenRequest } from "../../../interfaces/idp/oauth";
3
3
  import { OAuthAppPublicInfo } from "../../../interfaces/idp/organization/settings/oauthApp";
4
4
  import IdpOAuthDevice from "./device";
5
5
  export declare class IdpOAuth extends Base {
@@ -58,5 +58,13 @@ export declare class IdpOAuth extends Base {
58
58
  getOAuthAppInfo<R extends boolean = false>(clientId: string, raw?: {
59
59
  raw: R;
60
60
  }): Promise<MaybeRaw<R, OAuthAppPublicInfo>>;
61
+ /**
62
+ * Retrieves the OAuth 2.0 authorization server metadata
63
+ * This method enables dynamic discovery of endpoint locations and server capabilities as defined in RFC 8414
64
+ * @returns Authorization server metadata
65
+ */
66
+ getMetadata<R extends boolean = false>(raw?: {
67
+ raw: R;
68
+ }): Promise<MaybeRaw<R, OAuthMetadata>>;
61
69
  protected getEndpoint(endpoint: string): string;
62
70
  }
@@ -119,6 +119,17 @@ class IdpOAuth extends Base_1.default {
119
119
  return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? response : response.data);
120
120
  });
121
121
  }
122
+ /**
123
+ * Retrieves the OAuth 2.0 authorization server metadata
124
+ * This method enables dynamic discovery of endpoint locations and server capabilities as defined in RFC 8414
125
+ * @returns Authorization server metadata
126
+ */
127
+ getMetadata(raw) {
128
+ return __awaiter(this, void 0, void 0, function* () {
129
+ const response = yield this.axios.get(this.getEndpoint("/v1/.well-known/oauth-authorization-server"));
130
+ return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? response : response.data);
131
+ });
132
+ }
122
133
  getEndpoint(endpoint) {
123
134
  return `${this.options.server}/api/account${endpoint}`;
124
135
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hcloud-sdk",
3
- "version": "19.3.0",
3
+ "version": "20.1.0",
4
4
  "description": "hcloud platform sdk",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",