seatsio 81.10.0 → 81.12.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 CHANGED
@@ -286,6 +286,16 @@ for (const category of categoryList) {
286
286
  }
287
287
  ```
288
288
 
289
+ ### Updating a category
290
+
291
+ ```js
292
+ import { SeatsioClient, Region } from 'seatsio'
293
+
294
+ let client = new SeatsioClient(Region.EU(), <COMPANY ADMIN KEY>, <WORKSPACE PUBLIC KEY>)
295
+ await client.charts.updateCategory(chart.key, 1, new CategoryUpdateParams()
296
+ .withLabel('New label').withColor('#bbbbbb').withAccessible(true))```
297
+ ```
298
+
289
299
  ## Error Handling
290
300
  When an API call results in an error, a rejected promise is returned with a value that looks like
291
301
 
@@ -0,0 +1,13 @@
1
+ export declare class CategoryUpdateParams {
2
+ label?: string;
3
+ color?: string;
4
+ accessible?: boolean;
5
+ withLabel(label: string): this;
6
+ withColor(color: string): this;
7
+ withAccessible(accessible: boolean): this;
8
+ serialize(): {
9
+ label: string | undefined;
10
+ color: string | undefined;
11
+ accessible: boolean | undefined;
12
+ };
13
+ }
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CategoryUpdateParams = void 0;
4
+ var CategoryUpdateParams = /** @class */ (function () {
5
+ function CategoryUpdateParams() {
6
+ }
7
+ CategoryUpdateParams.prototype.withLabel = function (label) {
8
+ this.label = label;
9
+ return this;
10
+ };
11
+ CategoryUpdateParams.prototype.withColor = function (color) {
12
+ this.color = color;
13
+ return this;
14
+ };
15
+ CategoryUpdateParams.prototype.withAccessible = function (accessible) {
16
+ this.accessible = accessible;
17
+ return this;
18
+ };
19
+ CategoryUpdateParams.prototype.serialize = function () {
20
+ return {
21
+ label: this.label,
22
+ color: this.color,
23
+ accessible: this.accessible
24
+ };
25
+ };
26
+ return CategoryUpdateParams;
27
+ }());
28
+ exports.CategoryUpdateParams = CategoryUpdateParams;
@@ -4,6 +4,7 @@ import { Chart, ChartJson } from './Chart';
4
4
  import { Axios } from 'axios';
5
5
  import { ChartListParams } from './ChartListParams';
6
6
  import { CategoryJson, CategoryKey } from './Category';
7
+ import { CategoryUpdateParams } from './CategoryUpdateParams';
7
8
  export declare class Charts {
8
9
  archive: Lister<Chart, ChartJson>;
9
10
  client: Axios;
@@ -13,6 +14,7 @@ export declare class Charts {
13
14
  addCategory(key: string, category: CategoryJson): Promise<import("axios").AxiosResponse<any, any>>;
14
15
  removeCategory(chartKey: string, categoryKey: CategoryKey): Promise<import("axios").AxiosResponse<any, any>>;
15
16
  listCategories(key: string): Promise<any>;
17
+ updateCategory(chartKey: string, categoryKey: CategoryKey, params: CategoryUpdateParams): Promise<import("axios").AxiosResponse<any, any>>;
16
18
  validatePublishedVersion(key: string): Promise<any>;
17
19
  validateDraftVersion(key: string): Promise<any>;
18
20
  retrieve(key: string): Promise<Chart>;
@@ -51,6 +51,9 @@ var Charts = /** @class */ (function () {
51
51
  return this.client.get("/charts/".concat(key, "/categories"))
52
52
  .then(function (res) { return res.data.categories; });
53
53
  };
54
+ Charts.prototype.updateCategory = function (chartKey, categoryKey, params) {
55
+ return this.client.post("/charts/".concat(chartKey, "/categories/").concat(categoryKey), params);
56
+ };
54
57
  Charts.prototype.validatePublishedVersion = function (key) {
55
58
  return this.client.post("/charts/".concat(key, "/version/published/actions/validate"))
56
59
  .then(function (res) { return res.data; });
@@ -40,5 +40,6 @@ export declare class EventObjectInfo {
40
40
  variableOccupancy?: boolean;
41
41
  minOccupancy?: number;
42
42
  maxOccupancy?: number;
43
+ seasonStatusOverriddenQuantity: number;
43
44
  constructor(json: EventObjectInfoJson);
44
45
  }
@@ -39,6 +39,7 @@ var EventObjectInfo = /** @class */ (function () {
39
39
  this.variableOccupancy = json.variableOccupancy;
40
40
  this.minOccupancy = json.minOccupancy;
41
41
  this.maxOccupancy = json.maxOccupancy;
42
+ this.seasonStatusOverriddenQuantity = json.seasonStatusOverriddenQuantity;
42
43
  }
43
44
  EventObjectInfo.FREE = 'free';
44
45
  EventObjectInfo.BOOKED = 'booked';
@@ -11,5 +11,6 @@ export declare class User {
11
11
  secretKey: string;
12
12
  status: string;
13
13
  workspaces: any;
14
+ nonAdminHasAccessToAllWorkspaces?: boolean;
14
15
  constructor(json: UserJson);
15
16
  }
@@ -13,6 +13,7 @@ var User = /** @class */ (function () {
13
13
  this.isActive = json.isActive;
14
14
  this.status = json.status;
15
15
  this.workspaces = json.workspaces;
16
+ this.nonAdminHasAccessToAllWorkspaces = json.nonAdminHasAccessToAllWorkspaces;
16
17
  }
17
18
  return User;
18
19
  }());
@@ -12,6 +12,7 @@ export * from './Accounts/AccountSettings';
12
12
  export * from './Accounts/ChartValidationSettings';
13
13
  export * from './Accounts/DefaultRendererSettings';
14
14
  export * from './Charts/Category';
15
+ export * from './Charts/CategoryUpdateParams';
15
16
  export * from './Charts/Chart';
16
17
  export * from './Charts/ChartListParams';
17
18
  export * from './Charts/ChartObjectInfo';
package/dist/src/index.js CHANGED
@@ -28,6 +28,7 @@ __exportStar(require("./Accounts/AccountSettings"), exports);
28
28
  __exportStar(require("./Accounts/ChartValidationSettings"), exports);
29
29
  __exportStar(require("./Accounts/DefaultRendererSettings"), exports);
30
30
  __exportStar(require("./Charts/Category"), exports);
31
+ __exportStar(require("./Charts/CategoryUpdateParams"), exports);
31
32
  __exportStar(require("./Charts/Chart"), exports);
32
33
  __exportStar(require("./Charts/ChartListParams"), exports);
33
34
  __exportStar(require("./Charts/ChartObjectInfo"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "seatsio",
3
- "version": "81.10.0",
3
+ "version": "81.12.0",
4
4
  "main": "dist/src/index.js",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "files": [
@@ -18,12 +18,12 @@
18
18
  "url": "https://github.com/seatsio/seatsio-js"
19
19
  },
20
20
  "dependencies": {
21
- "axios": "1.6.7"
21
+ "axios": "1.6.8"
22
22
  },
23
23
  "devDependencies": {
24
24
  "@jest/globals": "29.7.0",
25
25
  "@types/jest": "29.5.12",
26
- "@types/node": "20.11.24",
26
+ "@types/node": "20.12.7",
27
27
  "@types/uuid": "9.0.8",
28
28
  "@typescript-eslint/eslint-plugin": "5.62.0",
29
29
  "@typescript-eslint/parser": "5.62.0",
@@ -35,8 +35,8 @@
35
35
  "jest": "29.7.0",
36
36
  "jest-cli": "29.7.0",
37
37
  "ts-jest": "29.1.2",
38
- "typescript": "5.3.3",
39
- "ctix": "2.4.0",
38
+ "typescript": "5.4.5",
39
+ "ctix": "2.4.4",
40
40
  "uuid": "9.0.1"
41
41
  }
42
42
  }