@konversi/konversi-client 1.5.7 → 1.5.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/README.md CHANGED
@@ -1,47 +1,47 @@
1
- # Konversi Client
2
-
3
- ## Automations Examples
4
-
5
- ### Basic Automation Example
6
- ```ts
7
- import K from '@konversi/konversi-client';
8
-
9
- export async function execute(input) {
10
- console.log(input);
11
- }
12
- ```
13
-
14
- ### Base Objects CRUD
15
-
16
- ```ts
17
- import K, { Entity } from '@konversi/konversi-client';
18
-
19
- export async function execute(input) {
20
- let result = await K.createObject(Entity.SALES_ORDER, {})
21
- console.log(result);
22
-
23
- result = await K.getAllObjects(Entity.SALES_ORDER)
24
- console.log(result);
25
-
26
- result = await K.updateObject(Entity.SALES_ORDER, result[0].id, { memo: 'New memo' })
27
- console.log(result);
28
- }
29
- ```
30
-
31
- ### Custom Objects CRUD
32
-
33
- ```ts
34
- import K, { Entity } from '@konversi/konversi-client';
35
-
36
- export async function execute(input) {
37
- let createdObject = await K.createCustomObject('ticket', {numEntries: 100, amount: 500000, code: "TICKET-123456"})
38
- console.log(`created object`, createdObject);
39
-
40
- let allObjects = await K.getAllCustomObjects('ticket');
41
-
42
- console.log(`all objects`, allObjects);
43
-
44
- let updateResult = await K.updateCustomObject('ticket', createdObject.id, {numEntries: 200});
45
- console.log(`updated object`, updateResult);
46
- }
1
+ # Konversi Client
2
+
3
+ ## Automations Examples
4
+
5
+ ### Basic Automation Example
6
+ ```ts
7
+ import K from '@konversi/konversi-client';
8
+
9
+ export async function execute(input) {
10
+ console.log(input);
11
+ }
12
+ ```
13
+
14
+ ### Base Objects CRUD
15
+
16
+ ```ts
17
+ import K, { Entity } from '@konversi/konversi-client';
18
+
19
+ export async function execute(input) {
20
+ let result = await K.createObject(Entity.SALES_ORDER, {})
21
+ console.log(result);
22
+
23
+ result = await K.getAllObjects(Entity.SALES_ORDER)
24
+ console.log(result);
25
+
26
+ result = await K.updateObject(Entity.SALES_ORDER, result[0].id, { memo: 'New memo' })
27
+ console.log(result);
28
+ }
29
+ ```
30
+
31
+ ### Custom Objects CRUD
32
+
33
+ ```ts
34
+ import K, { Entity } from '@konversi/konversi-client';
35
+
36
+ export async function execute(input) {
37
+ let createdObject = await K.createCustomObject('ticket', {numEntries: 100, amount: 500000, code: "TICKET-123456"})
38
+ console.log(`created object`, createdObject);
39
+
40
+ let allObjects = await K.getAllCustomObjects('ticket');
41
+
42
+ console.log(`all objects`, allObjects);
43
+
44
+ let updateResult = await K.updateCustomObject('ticket', createdObject.id, {numEntries: 200});
45
+ console.log(`updated object`, updateResult);
46
+ }
47
47
  ```