@incomy/platform-sdk 0.2.0 → 0.3.0-alpha.1

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.
@@ -14,7 +14,10 @@ export type { BucketInsert } from './models/BucketInsert';
14
14
  export type { Entry } from './models/Entry';
15
15
  export type { EntryEdit } from './models/EntryEdit';
16
16
  export type { EntryInsert } from './models/EntryInsert';
17
+ export type { EntryOperations } from './models/EntryOperations';
18
+ export type { EntrySettlements } from './models/EntrySettlements';
17
19
  export type { InputFieldDefinition } from './models/InputFieldDefinition';
20
+ export type { LogItem } from './models/LogItem';
18
21
  export type { Member } from './models/Member';
19
22
  export type { MemberBalanceReport } from './models/MemberBalanceReport';
20
23
  export type { MemberEdit } from './models/MemberEdit';
@@ -1,10 +1,10 @@
1
- import type { OperationEdit } from './OperationEdit';
2
- import type { SettlementEdit } from './SettlementEdit';
1
+ import type { EntryOperations } from './EntryOperations';
2
+ import type { EntrySettlements } from './EntrySettlements';
3
3
  import type { TemplateInfo } from './TemplateInfo';
4
4
  export type EntryEdit = {
5
5
  name?: string | null;
6
6
  occurredAt?: string | null;
7
- operations?: Array<OperationEdit> | null;
8
- settlements?: Array<SettlementEdit> | null;
7
+ operations?: EntryOperations;
8
+ settlements?: EntrySettlements;
9
9
  template?: TemplateInfo;
10
10
  };
@@ -1,5 +1,5 @@
1
- import type { OperationInsert } from './OperationInsert';
2
- import type { SettlementInsert } from './SettlementInsert';
1
+ import type { EntryOperations } from './EntryOperations';
2
+ import type { EntrySettlements } from './EntrySettlements';
3
3
  import type { TemplateInfo } from './TemplateInfo';
4
4
  export type EntryInsert = {
5
5
  name?: string | null;
@@ -7,7 +7,7 @@ export type EntryInsert = {
7
7
  * Server time will be used if left empty
8
8
  */
9
9
  occurredAt?: string | null;
10
- operations?: Array<OperationInsert> | null;
11
- settlements?: Array<SettlementInsert> | null;
10
+ operations?: EntryOperations;
11
+ settlements?: EntrySettlements;
12
12
  template?: TemplateInfo;
13
13
  };
@@ -0,0 +1,6 @@
1
+ import type { OperationEdit } from './OperationEdit';
2
+ import type { OperationInsert } from './OperationInsert';
3
+ export type EntryOperations = {
4
+ create?: Array<OperationInsert> | null;
5
+ update?: Record<string, OperationEdit> | null;
6
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,6 @@
1
+ import type { SettlementEdit } from './SettlementEdit';
2
+ import type { SettlementInsert } from './SettlementInsert';
3
+ export type EntrySettlements = {
4
+ create?: Array<SettlementInsert> | null;
5
+ update?: Record<string, SettlementEdit> | null;
6
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,9 @@
1
+ import type { Entry } from './Entry';
2
+ import type { Operation } from './Operation';
3
+ import type { Settlement } from './Settlement';
4
+ export type LogItem = {
5
+ type?: 'OPERATION' | 'SETTLEMENT' | 'ENTRY';
6
+ operation?: Operation;
7
+ settlement?: Settlement;
8
+ entry?: Entry;
9
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -2,7 +2,6 @@ import type { BucketBreakdown } from './BucketBreakdown';
2
2
  import type { Money } from './Money';
3
3
  export type Operation = {
4
4
  id: string;
5
- entryId: string;
6
5
  name: string;
7
6
  time: string;
8
7
  originWalletId?: string | null;
@@ -10,4 +9,9 @@ export type Operation = {
10
9
  type: 'in' | 'out' | 'transfer';
11
10
  money: Money;
12
11
  bucketBreakdown?: Array<BucketBreakdown> | null;
12
+ entryId?: string | null;
13
+ /**
14
+ * If set, operation will be deleted when unlined from an entry or when linked entry is deleted.
15
+ */
16
+ deleteWithEntryRemoval?: boolean;
13
17
  };
@@ -1,14 +1,25 @@
1
1
  import type { BucketBreakdown } from './BucketBreakdown';
2
2
  import type { Money } from './Money';
3
3
  export type OperationEdit = {
4
- name: string;
4
+ name?: string | null;
5
+ time?: string | null;
5
6
  /**
6
- * Entry time will be used if left empty
7
+ * Set to "" in order to clear.
7
8
  */
8
- time?: string | null;
9
9
  originWalletId?: string | null;
10
+ /**
11
+ * Set to "" in order to clear.
12
+ */
10
13
  targetWalletId?: string | null;
11
- type: 'in' | 'out' | 'transfer';
12
- money: Money;
13
- bucketBreakdown: Array<BucketBreakdown>;
14
+ type?: 'in' | 'out' | 'transfer' | null;
15
+ money?: Money;
16
+ bucketBreakdown?: Array<BucketBreakdown> | null;
17
+ /**
18
+ * Use empty string in order to unlink operation from entry
19
+ */
20
+ entryId?: string | null;
21
+ /**
22
+ * If set, operation will be deleted when unlined from an entry or when linked entry is deleted.
23
+ */
24
+ deleteWithEntryRemoval?: boolean | null;
14
25
  };
@@ -11,4 +11,9 @@ export type OperationInsert = {
11
11
  type: 'in' | 'out' | 'transfer';
12
12
  money: Money;
13
13
  bucketBreakdown: Array<BucketBreakdown>;
14
+ entryId?: string | null;
15
+ /**
16
+ * If set, operation will be deleted when unlined from an entry or when linked entry is deleted.
17
+ */
18
+ deleteWithEntryRemoval?: boolean;
14
19
  };
@@ -2,7 +2,6 @@ import type { BucketBreakdown } from './BucketBreakdown';
2
2
  import type { Money } from './Money';
3
3
  export type Settlement = {
4
4
  id: string;
5
- entryId: string;
6
5
  name: string;
7
6
  description?: string | null;
8
7
  memberId: string;
@@ -10,4 +9,9 @@ export type Settlement = {
10
9
  bucketBreakdown: Array<BucketBreakdown>;
11
10
  compensation: boolean;
12
11
  occurredAt: string;
12
+ entryId?: string | null;
13
+ /**
14
+ * If set, settlement will be deleted when unlined from an entry or when linked entry is deleted.
15
+ */
16
+ deleteWithEntryRemoval?: boolean;
13
17
  };
@@ -1,10 +1,16 @@
1
1
  import type { BucketBreakdown } from './BucketBreakdown';
2
2
  import type { Money } from './Money';
3
3
  export type SettlementEdit = {
4
- name: string;
4
+ name?: string | null;
5
5
  description?: string | null;
6
- memberId: string;
7
- money: Money;
8
- bucketBreakdown: Array<BucketBreakdown>;
9
- compensation: boolean;
6
+ memberId?: string | null;
7
+ money?: Money;
8
+ bucketBreakdown?: Array<BucketBreakdown> | null;
9
+ compensation?: boolean | null;
10
+ occurredAt?: string | null;
11
+ entryId?: string | null;
12
+ /**
13
+ * If set, settlement will be deleted when unlined from an entry or when linked entry is deleted.
14
+ */
15
+ deleteWithEntryRemoval?: boolean | null;
10
16
  };
@@ -7,4 +7,13 @@ export type SettlementInsert = {
7
7
  money: Money;
8
8
  bucketBreakdown: Array<BucketBreakdown>;
9
9
  compensation: boolean;
10
+ /**
11
+ * When left empty: if is linked to an entry its time will be used, otherwise server time at creation
12
+ */
13
+ occurredAt?: string | null;
14
+ entryId?: string | null;
15
+ /**
16
+ * If set, settlement will be deleted when unlined from an entry or when linked entry is deleted.
17
+ */
18
+ deleteWithEntryRemoval?: boolean;
10
19
  };
@@ -1,4 +1,5 @@
1
1
  import type { BalanceReport } from '../models/BalanceReport';
2
+ import type { LogItem } from '../models/LogItem';
2
3
  import type { Member } from '../models/Member';
3
4
  import type { MemberBalanceReport } from '../models/MemberBalanceReport';
4
5
  import type { MemberEdit } from '../models/MemberEdit';
@@ -45,6 +46,12 @@ export declare class ProjectsService {
45
46
  * @throws ApiError
46
47
  */
47
48
  static getProjectsBalance(projectId: string): CancelablePromise<BalanceReport>;
49
+ /**
50
+ * @param projectId
51
+ * @returns LogItem OK
52
+ * @throws ApiError
53
+ */
54
+ static getProjectsLog(projectId: string): CancelablePromise<Array<LogItem>>;
48
55
  /**
49
56
  * @param projectId
50
57
  * @returns Member OK
@@ -83,6 +83,20 @@ export class ProjectsService {
83
83
  },
84
84
  });
85
85
  }
86
+ /**
87
+ * @param projectId
88
+ * @returns LogItem OK
89
+ * @throws ApiError
90
+ */
91
+ static getProjectsLog(projectId) {
92
+ return __request(OpenAPI, {
93
+ method: 'GET',
94
+ url: '/projects/{projectId}/log',
95
+ path: {
96
+ 'projectId': projectId,
97
+ },
98
+ });
99
+ }
86
100
  /**
87
101
  * @param projectId
88
102
  * @returns Member OK
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@incomy/platform-sdk",
3
- "version": "0.2.0",
3
+ "version": "0.3.0-alpha.1+19",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "files": [