pyrus-api 2.3.0 → 2.4.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.
@@ -758,6 +758,11 @@ class CatalogsApi extends BaseApi {
758
758
  return yield this.fetchApi((yield this.getModulePath()) + `/${request.id}`, "POST", JSON.stringify(apiRequest));
759
759
  });
760
760
  }
761
+ update(request) {
762
+ return __awaiter(this, void 0, void 0, function* () {
763
+ return yield this.fetchApi((yield this.getModulePath()) + `/${request.id}/diff`, "POST", JSON.stringify(request));
764
+ });
765
+ }
761
766
  }
762
767
 
763
768
  class MembersApi extends BaseApi {
@@ -756,6 +756,11 @@ class CatalogsApi extends BaseApi {
756
756
  return yield this.fetchApi((yield this.getModulePath()) + `/${request.id}`, "POST", JSON.stringify(apiRequest));
757
757
  });
758
758
  }
759
+ update(request) {
760
+ return __awaiter(this, void 0, void 0, function* () {
761
+ return yield this.fetchApi((yield this.getModulePath()) + `/${request.id}/diff`, "POST", JSON.stringify(request));
762
+ });
763
+ }
759
764
  }
760
765
 
761
766
  class MembersApi extends BaseApi {
@@ -671,6 +671,7 @@ declare module "pyrus-api" {
671
671
  parent_task_id?: number;
672
672
  last_note_id?: number;
673
673
  subject?: string;
674
+ current_step?: number;
674
675
  is_closed: boolean;
675
676
  };
676
677
  export type Role = {
@@ -1039,6 +1040,13 @@ declare module "pyrus-api" {
1039
1040
  create(request: AnnouncementRequest): Promise<AnnouncementResponse>;
1040
1041
  addComment(id: number, request: AnnouncementCommentRequest): Promise<AnnouncementResponse>;
1041
1042
  }
1043
+ export type UpdateCatalogRequest = {
1044
+ id: number;
1045
+ upsert?: {
1046
+ values: string[];
1047
+ }[];
1048
+ delete?: string[];
1049
+ };
1042
1050
  export type CatalogInfo = {
1043
1051
  catalog_id: number;
1044
1052
  name: number;
@@ -1119,6 +1127,15 @@ declare module "pyrus-api" {
1119
1127
  * @param request
1120
1128
  */
1121
1129
  sync(request: SyncCatalogRequest): Promise<SyncCatalogResponse>;
1130
+ /**
1131
+ * This method allows you to insert new catalog items, modify or delete existing ones.
1132
+ * The first column of the catalog is the key parameter.
1133
+ * To insert or modify a row (also called as upsert) please pass an array of values for each item.
1134
+ * To delete items you need only an array of keys
1135
+ *
1136
+ * @param request
1137
+ */
1138
+ update(request: UpdateCatalogRequest): Promise<SyncCatalogResponse>;
1122
1139
  }
1123
1140
  export type MembersResponse = {
1124
1141
  members: Person[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pyrus-api",
3
- "version": "2.3.0",
3
+ "version": "2.4.0",
4
4
  "description": "Pyrus API client for TypeScript",
5
5
  "repository": {
6
6
  "type": "git",