@vulog/aima-document 1.1.24 → 1.1.26

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/dist/index.d.mts CHANGED
@@ -38,7 +38,7 @@ type DocumentFull = {
38
38
  type DocumentCreate = Partial<Omit<DocumentFull, 'id' | 'fleetId' | 'documentType' | 'files' | 'uploadUrls'>> & {
39
39
  documentType: string;
40
40
  };
41
- type DocumentUpdate = DocumentCreate;
41
+ type DocumentUpdate = Partial<Omit<DocumentFull, 'id' | 'fleetId' | 'documentType' | 'files' | 'uploadUrls'>>;
42
42
  type DocumentByService = {
43
43
  serviceId: string;
44
44
  areMandatoryPresent: boolean;
package/dist/index.d.ts CHANGED
@@ -38,7 +38,7 @@ type DocumentFull = {
38
38
  type DocumentCreate = Partial<Omit<DocumentFull, 'id' | 'fleetId' | 'documentType' | 'files' | 'uploadUrls'>> & {
39
39
  documentType: string;
40
40
  };
41
- type DocumentUpdate = DocumentCreate;
41
+ type DocumentUpdate = Partial<Omit<DocumentFull, 'id' | 'fleetId' | 'documentType' | 'files' | 'uploadUrls'>>;
42
42
  type DocumentByService = {
43
43
  serviceId: string;
44
44
  areMandatoryPresent: boolean;
package/dist/index.js CHANGED
@@ -72,7 +72,7 @@ var updateDocument = async (client, userId, documentId, document) => {
72
72
  cause: result.error.issues
73
73
  });
74
74
  }
75
- return client.post(
75
+ return client.put(
76
76
  `/boapi/proxy/user/fleets/${client.clientOptions.fleetId}/users/${userId}/documents/${documentId}`,
77
77
  document
78
78
  ).then(({ data }) => data);
package/dist/index.mjs CHANGED
@@ -44,7 +44,7 @@ var updateDocument = async (client, userId, documentId, document) => {
44
44
  cause: result.error.issues
45
45
  });
46
46
  }
47
- return client.post(
47
+ return client.put(
48
48
  `/boapi/proxy/user/fleets/${client.clientOptions.fleetId}/users/${userId}/documents/${documentId}`,
49
49
  document
50
50
  ).then(({ data }) => data);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vulog/aima-document",
3
- "version": "1.1.24",
3
+ "version": "1.1.26",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.mjs",
6
6
  "types": "dist/index.d.ts",
@@ -19,8 +19,8 @@
19
19
  "author": "Vulog",
20
20
  "license": "ISC",
21
21
  "dependencies": {
22
- "@vulog/aima-client": "1.1.24",
23
- "@vulog/aima-core": "1.1.24"
22
+ "@vulog/aima-client": "1.1.26",
23
+ "@vulog/aima-core": "1.1.26"
24
24
  },
25
25
  "peerDependencies": {
26
26
  "zod": "^3.24.1"
package/src/types.ts CHANGED
@@ -290,7 +290,7 @@ export type DocumentCreate = Partial<Omit<DocumentFull, 'id' | 'fleetId' | 'docu
290
290
  documentType: string;
291
291
  };
292
292
 
293
- export type DocumentUpdate = DocumentCreate;
293
+ export type DocumentUpdate = Partial<Omit<DocumentFull, 'id' | 'fleetId' | 'documentType' | 'files' | 'uploadUrls'>>;
294
294
 
295
295
  export type DocumentByService = {
296
296
  serviceId: string;
@@ -22,7 +22,7 @@ export const updateDocument = async (
22
22
  }
23
23
 
24
24
  return client
25
- .post<DocumentFull>(
25
+ .put<DocumentFull>(
26
26
  `/boapi/proxy/user/fleets/${client.clientOptions.fleetId}/users/${userId}/documents/${documentId}`,
27
27
  document
28
28
  )