pyrus-api 2.3.1 → 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.
- package/build/cjs/index.cjs +5 -0
- package/build/esm/index.js +5 -0
- package/build/types/index.d.ts +16 -0
- package/package.json +1 -1
package/build/cjs/index.cjs
CHANGED
|
@@ -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 {
|
package/build/esm/index.js
CHANGED
|
@@ -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 {
|
package/build/types/index.d.ts
CHANGED
|
@@ -1040,6 +1040,13 @@ declare module "pyrus-api" {
|
|
|
1040
1040
|
create(request: AnnouncementRequest): Promise<AnnouncementResponse>;
|
|
1041
1041
|
addComment(id: number, request: AnnouncementCommentRequest): Promise<AnnouncementResponse>;
|
|
1042
1042
|
}
|
|
1043
|
+
export type UpdateCatalogRequest = {
|
|
1044
|
+
id: number;
|
|
1045
|
+
upsert?: {
|
|
1046
|
+
values: string[];
|
|
1047
|
+
}[];
|
|
1048
|
+
delete?: string[];
|
|
1049
|
+
};
|
|
1043
1050
|
export type CatalogInfo = {
|
|
1044
1051
|
catalog_id: number;
|
|
1045
1052
|
name: number;
|
|
@@ -1120,6 +1127,15 @@ declare module "pyrus-api" {
|
|
|
1120
1127
|
* @param request
|
|
1121
1128
|
*/
|
|
1122
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>;
|
|
1123
1139
|
}
|
|
1124
1140
|
export type MembersResponse = {
|
|
1125
1141
|
members: Person[];
|