@webitel/api-services 1.0.9 → 1.0.10

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webitel/api-services",
3
- "version": "1.0.9",
3
+ "version": "1.0.10",
4
4
  "private": false,
5
5
  "repository": {
6
6
  "type": "git",
@@ -34,8 +34,8 @@ const getStatusConditionsList = async ({
34
34
  parentId,
35
35
  ...rest
36
36
  }: {
37
- statusId: ApiId;
38
- parentId: ApiId;
37
+ statusId?: ApiId;
38
+ parentId?: ApiId;
39
39
  } & ApiParams) => {
40
40
  const fieldsToSend = [
41
41
  'page',
@@ -257,11 +257,14 @@ const addCase = async ({ itemInstance }: AddItemParams) => {
257
257
  };
258
258
 
259
259
  const patchCase = async ({
260
- changes,
260
+ changes = {},
261
261
  etag,
262
262
  }: {
263
- changes: ApiParams;
264
- etag: ApiId;
263
+ id?: ApiId;
264
+ itemId?: ApiId;
265
+ changes?: ApiParams;
266
+ parentId?: ApiId;
267
+ etag?: ApiId;
265
268
  }) => {
266
269
  const body = applyTransform(changes, [
267
270
  sanitizeToWire(getShallowFieldsToSendFromZodSchema(UpdateCase2Body)),
@@ -144,8 +144,8 @@ const deleteAdjunctTypeRecord = async ({
144
144
  parentId,
145
145
  id,
146
146
  }: {
147
- parentId: string;
148
- id: ApiId | ApiId[];
147
+ parentId?: ApiId;
148
+ id?: ApiId | ApiId[];
149
149
  }) => {
150
150
  const ids = (
151
151
  Array.isArray(id)
@@ -155,7 +155,7 @@ const deleteAdjunctTypeRecord = async ({
155
155
  ]
156
156
  ).map(String);
157
157
  try {
158
- await getDictionaries().deleteData2(parentId, ids);
158
+ await getDictionaries().deleteData2(String(parentId), ids);
159
159
  } catch (err) {
160
160
  throw applyTransform(err, [
161
161
  notify,
@@ -154,7 +154,7 @@ const updateAdjunctType = async ({
154
154
  }
155
155
  };
156
156
 
157
- const deleteAdjunctType = async ({ id }: { id: ApiId | ApiId[] }) => {
157
+ const deleteAdjunctType = async ({ id }: { id?: ApiId | ApiId[] }) => {
158
158
  const repo = (
159
159
  Array.isArray(id)
160
160
  ? id