@incomy/platform-sdk 0.4.0-157 → 0.4.0-163

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.
@@ -15,6 +15,10 @@ export type { BucketBreakdown } from './models/BucketBreakdown';
15
15
  export type { BucketEdit } from './models/BucketEdit';
16
16
  export type { BucketInsert } from './models/BucketInsert';
17
17
  export type { BucketPaginatedList } from './models/BucketPaginatedList';
18
+ export type { Company } from './models/Company';
19
+ export type { CompanyEdit } from './models/CompanyEdit';
20
+ export type { CompanyInsert } from './models/CompanyInsert';
21
+ export type { CompanyPaginatedList } from './models/CompanyPaginatedList';
18
22
  export type { Icon } from './models/Icon';
19
23
  export type { InputFieldDefinition } from './models/InputFieldDefinition';
20
24
  export type { Label } from './models/Label';
@@ -77,6 +81,7 @@ export type { WalletBalancePaginatedList } from './models/WalletBalancePaginated
77
81
  export { AccrualsService } from './services/AccrualsService';
78
82
  export { AuthService } from './services/AuthService';
79
83
  export { BucketsService } from './services/BucketsService';
84
+ export { CompaniesService } from './services/CompaniesService';
80
85
  export { LabelsService } from './services/LabelsService';
81
86
  export { MembersService } from './services/MembersService';
82
87
  export { MultiEventsService } from './services/MultiEventsService';
@@ -8,6 +8,7 @@ export { OpenAPI } from './core/OpenAPI';
8
8
  export { AccrualsService } from './services/AccrualsService';
9
9
  export { AuthService } from './services/AuthService';
10
10
  export { BucketsService } from './services/BucketsService';
11
+ export { CompaniesService } from './services/CompaniesService';
11
12
  export { LabelsService } from './services/LabelsService';
12
13
  export { MembersService } from './services/MembersService';
13
14
  export { MultiEventsService } from './services/MultiEventsService';
@@ -0,0 +1,4 @@
1
+ export type Company = {
2
+ id: string;
3
+ name: string;
4
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,3 @@
1
+ export type CompanyEdit = {
2
+ name?: string | null;
3
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,3 @@
1
+ export type CompanyInsert = {
2
+ name: string;
3
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,16 @@
1
+ import type { Company } from './Company';
2
+ export type CompanyPaginatedList = {
3
+ /**
4
+ * Token item to start the next query from; Empty start from the beginning
5
+ */
6
+ next: string;
7
+ /**
8
+ * Estimated total count over all pages. -1 means the total count could not be determined.
9
+ */
10
+ totalCount?: number;
11
+ /**
12
+ * Results for the current query
13
+ */
14
+ items: Array<Company>;
15
+ meta?: Record<string, string | null> | null;
16
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -10,5 +10,5 @@ export type Member = {
10
10
  /**
11
11
  * Reason code why the member cannot be deleted. Null when it can be deleted or when not requested.
12
12
  */
13
- deleteBlockedReason?: 'hasAccruals' | 'ownsWalletWithEvents' | null;
13
+ deleteBlockedReason?: 'hasAccruals' | null;
14
14
  };
@@ -4,6 +4,7 @@ export type ProjectWallet = {
4
4
  name: string;
5
5
  ownerId?: string | null;
6
6
  defaultCurrency?: string | null;
7
+ defaultCompanyId?: string | null;
7
8
  balance?: Array<Money> | null;
8
9
  /**
9
10
  * Whether the wallet can be deleted. Null when not requested (see includeDeletability query param).
@@ -8,4 +8,8 @@ export type ProjectWalletEdit = {
8
8
  * Pass empty string in order to clear the owner.
9
9
  */
10
10
  ownerId?: string | null;
11
+ /**
12
+ * Pass empty string in order to clear the default company.
13
+ */
14
+ defaultCompanyId?: string | null;
11
15
  };
@@ -2,4 +2,5 @@ export type ProjectWalletInsert = {
2
2
  name: string;
3
3
  defaultCurrency?: string | null;
4
4
  ownerId?: string | null;
5
+ defaultCompanyId?: string | null;
5
6
  };
@@ -0,0 +1,46 @@
1
+ import type { Company } from '../models/Company';
2
+ import type { CompanyEdit } from '../models/CompanyEdit';
3
+ import type { CompanyInsert } from '../models/CompanyInsert';
4
+ import type { CompanyPaginatedList } from '../models/CompanyPaginatedList';
5
+ import type { CancelablePromise } from '../core/CancelablePromise';
6
+ export declare class CompaniesService {
7
+ /**
8
+ * @param projectId
9
+ * @param query
10
+ * @param orderByName
11
+ * @param limit
12
+ * @param next
13
+ * @returns CompanyPaginatedList OK
14
+ * @throws ApiError
15
+ */
16
+ static getProjectsCompanies(projectId: string, query?: string, orderByName?: 'Desc' | 'Asc', limit?: number, next?: string): CancelablePromise<CompanyPaginatedList>;
17
+ /**
18
+ * @param projectId
19
+ * @param requestBody
20
+ * @returns Company OK
21
+ * @throws ApiError
22
+ */
23
+ static postProjectsCompanies(projectId: string, requestBody?: CompanyInsert): CancelablePromise<Company>;
24
+ /**
25
+ * @param projectId
26
+ * @param companyId
27
+ * @returns Company OK
28
+ * @throws ApiError
29
+ */
30
+ static getProjectsCompanies1(projectId: string, companyId: string): CancelablePromise<Company>;
31
+ /**
32
+ * @param projectId
33
+ * @param companyId
34
+ * @param requestBody
35
+ * @returns Company OK
36
+ * @throws ApiError
37
+ */
38
+ static patchProjectsCompanies(projectId: string, companyId: string, requestBody?: CompanyEdit): CancelablePromise<Company>;
39
+ /**
40
+ * @param projectId
41
+ * @param companyId
42
+ * @returns any OK
43
+ * @throws ApiError
44
+ */
45
+ static deleteProjectsCompanies(projectId: string, companyId: string): CancelablePromise<any>;
46
+ }
@@ -0,0 +1,96 @@
1
+ import { OpenAPI } from '../core/OpenAPI';
2
+ import { request as __request } from '../core/request';
3
+ export class CompaniesService {
4
+ /**
5
+ * @param projectId
6
+ * @param query
7
+ * @param orderByName
8
+ * @param limit
9
+ * @param next
10
+ * @returns CompanyPaginatedList OK
11
+ * @throws ApiError
12
+ */
13
+ static getProjectsCompanies(projectId, query, orderByName, limit = 10, next) {
14
+ return __request(OpenAPI, {
15
+ method: 'GET',
16
+ url: '/projects/{projectId}/companies',
17
+ path: {
18
+ 'projectId': projectId,
19
+ },
20
+ query: {
21
+ 'query': query,
22
+ 'orderByName': orderByName,
23
+ 'limit': limit,
24
+ 'next': next,
25
+ },
26
+ });
27
+ }
28
+ /**
29
+ * @param projectId
30
+ * @param requestBody
31
+ * @returns Company OK
32
+ * @throws ApiError
33
+ */
34
+ static postProjectsCompanies(projectId, requestBody) {
35
+ return __request(OpenAPI, {
36
+ method: 'POST',
37
+ url: '/projects/{projectId}/companies',
38
+ path: {
39
+ 'projectId': projectId,
40
+ },
41
+ body: requestBody,
42
+ mediaType: 'application/json;odata.metadata=minimal;odata.streaming=true',
43
+ });
44
+ }
45
+ /**
46
+ * @param projectId
47
+ * @param companyId
48
+ * @returns Company OK
49
+ * @throws ApiError
50
+ */
51
+ static getProjectsCompanies1(projectId, companyId) {
52
+ return __request(OpenAPI, {
53
+ method: 'GET',
54
+ url: '/projects/{projectId}/companies/{companyId}',
55
+ path: {
56
+ 'projectId': projectId,
57
+ 'companyId': companyId,
58
+ },
59
+ });
60
+ }
61
+ /**
62
+ * @param projectId
63
+ * @param companyId
64
+ * @param requestBody
65
+ * @returns Company OK
66
+ * @throws ApiError
67
+ */
68
+ static patchProjectsCompanies(projectId, companyId, requestBody) {
69
+ return __request(OpenAPI, {
70
+ method: 'PATCH',
71
+ url: '/projects/{projectId}/companies/{companyId}',
72
+ path: {
73
+ 'projectId': projectId,
74
+ 'companyId': companyId,
75
+ },
76
+ body: requestBody,
77
+ mediaType: 'application/json;odata.metadata=minimal;odata.streaming=true',
78
+ });
79
+ }
80
+ /**
81
+ * @param projectId
82
+ * @param companyId
83
+ * @returns any OK
84
+ * @throws ApiError
85
+ */
86
+ static deleteProjectsCompanies(projectId, companyId) {
87
+ return __request(OpenAPI, {
88
+ method: 'DELETE',
89
+ url: '/projects/{projectId}/companies/{companyId}',
90
+ path: {
91
+ 'projectId': projectId,
92
+ 'companyId': companyId,
93
+ },
94
+ });
95
+ }
96
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@incomy/platform-sdk",
3
- "version": "0.4.0-157",
3
+ "version": "0.4.0-163",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "files": [