@cinerino/sdk 18.3.0-alpha.6 → 18.3.0-alpha.7
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.
|
@@ -3,11 +3,24 @@ import { Service } from '../service';
|
|
|
3
3
|
type IAccountTitleCategory = Pick<factory.accountTitle.IAccountTitle, 'codeValue' | 'name' | 'project' | 'typeOf'> & {
|
|
4
4
|
additionalProperty?: never;
|
|
5
5
|
};
|
|
6
|
-
type
|
|
6
|
+
type IAccountTitleSetAsFindResult = Pick<factory.accountTitle.IAccountTitle, 'codeValue' | 'name'> & {
|
|
7
|
+
inCodeSet: {
|
|
8
|
+
codeValue: string;
|
|
9
|
+
name?: string;
|
|
10
|
+
};
|
|
7
11
|
additionalProperty?: never;
|
|
8
12
|
};
|
|
9
|
-
type
|
|
10
|
-
|
|
13
|
+
type IAccountTitleAsFindResult = Pick<factory.accountTitle.IAccountTitle, 'additionalProperty' | 'codeValue' | 'name'> & {
|
|
14
|
+
inCodeSet: {
|
|
15
|
+
codeValue: string;
|
|
16
|
+
name?: string;
|
|
17
|
+
inCodeSet: {
|
|
18
|
+
codeValue: string;
|
|
19
|
+
name?: string;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
type ISavingAccountTitle = Pick<IAccountTitleAsFindResult, 'additionalProperty' | 'codeValue' | 'name'> & {
|
|
11
24
|
inCodeSet: {
|
|
12
25
|
codeValue: string;
|
|
13
26
|
inCodeSet: {
|
|
@@ -22,13 +35,11 @@ export declare class AccountTitleService extends Service {
|
|
|
22
35
|
/**
|
|
23
36
|
* 科目分類作成
|
|
24
37
|
*/
|
|
25
|
-
|
|
38
|
+
addAccounTitleCategory(params: Pick<IAccountTitleCategory, 'codeValue' | 'name'>): Promise<void>;
|
|
26
39
|
/**
|
|
27
40
|
* 科目分類検索
|
|
28
41
|
*/
|
|
29
|
-
|
|
30
|
-
data: IAccountTitleCategory[];
|
|
31
|
-
}>;
|
|
42
|
+
findAccountTitleCategories(params: Pick<factory.accountTitle.ISearchConditions, 'codeValue' | 'limit' | 'name' | 'page'>): Promise<IAccountTitleCategory[]>;
|
|
32
43
|
/**
|
|
33
44
|
* 科目分類更新
|
|
34
45
|
*/
|
|
@@ -43,17 +54,29 @@ export declare class AccountTitleService extends Service {
|
|
|
43
54
|
/**
|
|
44
55
|
* 科目追加
|
|
45
56
|
*/
|
|
46
|
-
|
|
57
|
+
addAccounTitleSet(params: Pick<IAccountTitleSetAsFindResult, 'codeValue' | 'name'> & {
|
|
58
|
+
inCodeSet: {
|
|
59
|
+
codeValue: string;
|
|
60
|
+
};
|
|
61
|
+
}): Promise<void>;
|
|
47
62
|
/**
|
|
48
63
|
* 科目検索
|
|
49
64
|
*/
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
65
|
+
findAccountTitleSets(params: Pick<factory.accountTitle.ISearchConditions, 'codeValue' | 'limit' | 'name' | 'page'> & {
|
|
66
|
+
inCodeSet?: {
|
|
67
|
+
codeValue?: string | {
|
|
68
|
+
$eq?: string;
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
}): Promise<Pick<IAccountTitleSetAsFindResult, 'codeValue' | 'inCodeSet' | 'name'>[]>;
|
|
53
72
|
/**
|
|
54
73
|
* 科目更新
|
|
55
74
|
*/
|
|
56
|
-
updateAccounTitleSet(params: Pick<
|
|
75
|
+
updateAccounTitleSet(params: Pick<IAccountTitleSetAsFindResult, 'codeValue' | 'name'> & {
|
|
76
|
+
inCodeSet: {
|
|
77
|
+
codeValue: string;
|
|
78
|
+
};
|
|
79
|
+
}): Promise<void>;
|
|
57
80
|
/**
|
|
58
81
|
* 科目削除
|
|
59
82
|
* 不可逆的な物理削除です
|
|
@@ -67,22 +90,20 @@ export declare class AccountTitleService extends Service {
|
|
|
67
90
|
/**
|
|
68
91
|
* 細目追加
|
|
69
92
|
*/
|
|
70
|
-
|
|
93
|
+
addAccountTitle(params: ISavingAccountTitle): Promise<void>;
|
|
71
94
|
/**
|
|
72
95
|
* 細目更新
|
|
73
96
|
*/
|
|
74
|
-
|
|
97
|
+
updateAccountTitle(params: ISavingAccountTitle): Promise<void>;
|
|
75
98
|
/**
|
|
76
99
|
* 細目検索
|
|
77
100
|
*/
|
|
78
|
-
|
|
79
|
-
data: IAccountTitle[];
|
|
80
|
-
}>;
|
|
101
|
+
findAccountTitles(params: Pick<factory.accountTitle.ISearchConditions, 'codeValue' | 'limit' | 'name' | 'page' | 'project' | 'additionalProperty' | 'inCodeSet'>): Promise<IAccountTitleAsFindResult[]>;
|
|
81
102
|
/**
|
|
82
103
|
* 細目削除
|
|
83
104
|
* 不可逆的な物理削除です
|
|
84
105
|
*/
|
|
85
|
-
|
|
106
|
+
deleteAccountTitleByCodeValue(params: {
|
|
86
107
|
codeValue: string;
|
|
87
108
|
inCodeSet: {
|
|
88
109
|
codeValue: string;
|
|
@@ -2,8 +2,10 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.AccountTitleService = void 0;
|
|
4
4
|
const http_status_1 = require("http-status");
|
|
5
|
-
const factory_1 = require("../factory");
|
|
6
5
|
const service_1 = require("../service");
|
|
6
|
+
const BASE_URI_CATEGORY = '/accountTitles/accountTitleCategory';
|
|
7
|
+
const BASE_URI_SET = '/accountTitles/accountTitleSet';
|
|
8
|
+
const BASE_URI = '/accountTitles';
|
|
7
9
|
/**
|
|
8
10
|
* 勘定科目サービス
|
|
9
11
|
*/
|
|
@@ -11,37 +13,32 @@ class AccountTitleService extends service_1.Service {
|
|
|
11
13
|
/**
|
|
12
14
|
* 科目分類作成
|
|
13
15
|
*/
|
|
14
|
-
async
|
|
15
|
-
|
|
16
|
-
uri:
|
|
16
|
+
async addAccounTitleCategory(params) {
|
|
17
|
+
await this.fetch({
|
|
18
|
+
uri: BASE_URI_CATEGORY,
|
|
17
19
|
method: 'POST',
|
|
18
20
|
body: params,
|
|
19
|
-
expectedStatusCodes: [http_status_1.status.CREATED]
|
|
20
|
-
})
|
|
21
|
-
.then(async (response) => response.json());
|
|
21
|
+
expectedStatusCodes: [http_status_1.status.CREATED, http_status_1.status.NO_CONTENT]
|
|
22
|
+
});
|
|
22
23
|
}
|
|
23
24
|
/**
|
|
24
25
|
* 科目分類検索
|
|
25
26
|
*/
|
|
26
|
-
async
|
|
27
|
+
async findAccountTitleCategories(params) {
|
|
27
28
|
return this.fetch({
|
|
28
|
-
uri:
|
|
29
|
+
uri: BASE_URI_CATEGORY,
|
|
29
30
|
method: 'GET',
|
|
30
31
|
qs: params,
|
|
31
32
|
expectedStatusCodes: [http_status_1.status.OK]
|
|
32
33
|
})
|
|
33
|
-
.then(async (response) =>
|
|
34
|
-
return {
|
|
35
|
-
data: await response.json()
|
|
36
|
-
};
|
|
37
|
-
});
|
|
34
|
+
.then(async (response) => response.json());
|
|
38
35
|
}
|
|
39
36
|
/**
|
|
40
37
|
* 科目分類更新
|
|
41
38
|
*/
|
|
42
39
|
async updateAccounTitleCategory(params) {
|
|
43
40
|
await this.fetch({
|
|
44
|
-
uri:
|
|
41
|
+
uri: `${BASE_URI_CATEGORY}/${encodeURIComponent(String(params.codeValue))}`,
|
|
45
42
|
method: 'PUT',
|
|
46
43
|
body: params,
|
|
47
44
|
expectedStatusCodes: [http_status_1.status.NO_CONTENT]
|
|
@@ -53,7 +50,7 @@ class AccountTitleService extends service_1.Service {
|
|
|
53
50
|
*/
|
|
54
51
|
async deleteAccounTitleCategory(params) {
|
|
55
52
|
await this.fetch({
|
|
56
|
-
uri:
|
|
53
|
+
uri: `${BASE_URI_CATEGORY}/${encodeURIComponent(String(params.codeValue))}`,
|
|
57
54
|
method: 'DELETE',
|
|
58
55
|
body: params,
|
|
59
56
|
expectedStatusCodes: [http_status_1.status.NO_CONTENT]
|
|
@@ -62,40 +59,32 @@ class AccountTitleService extends service_1.Service {
|
|
|
62
59
|
/**
|
|
63
60
|
* 科目追加
|
|
64
61
|
*/
|
|
65
|
-
async
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
}
|
|
69
|
-
return this.fetch({
|
|
70
|
-
uri: '/accountTitles/accountTitleSet',
|
|
62
|
+
async addAccounTitleSet(params) {
|
|
63
|
+
await this.fetch({
|
|
64
|
+
uri: BASE_URI_SET,
|
|
71
65
|
method: 'POST',
|
|
72
66
|
body: params,
|
|
73
|
-
expectedStatusCodes: [http_status_1.status.CREATED]
|
|
74
|
-
})
|
|
75
|
-
.then(async (response) => response.json());
|
|
67
|
+
expectedStatusCodes: [http_status_1.status.CREATED, http_status_1.status.NO_CONTENT]
|
|
68
|
+
});
|
|
76
69
|
}
|
|
77
70
|
/**
|
|
78
71
|
* 科目検索
|
|
79
72
|
*/
|
|
80
|
-
async
|
|
73
|
+
async findAccountTitleSets(params) {
|
|
81
74
|
return this.fetch({
|
|
82
|
-
uri:
|
|
75
|
+
uri: BASE_URI_SET,
|
|
83
76
|
method: 'GET',
|
|
84
77
|
qs: params,
|
|
85
78
|
expectedStatusCodes: [http_status_1.status.OK]
|
|
86
79
|
})
|
|
87
|
-
.then(async (response) =>
|
|
88
|
-
return {
|
|
89
|
-
data: await response.json()
|
|
90
|
-
};
|
|
91
|
-
});
|
|
80
|
+
.then(async (response) => response.json());
|
|
92
81
|
}
|
|
93
82
|
/**
|
|
94
83
|
* 科目更新
|
|
95
84
|
*/
|
|
96
85
|
async updateAccounTitleSet(params) {
|
|
97
86
|
await this.fetch({
|
|
98
|
-
uri:
|
|
87
|
+
uri: `${BASE_URI_SET}/${encodeURIComponent(String(params.codeValue))}`,
|
|
99
88
|
method: 'PUT',
|
|
100
89
|
body: params,
|
|
101
90
|
expectedStatusCodes: [http_status_1.status.NO_CONTENT]
|
|
@@ -107,7 +96,7 @@ class AccountTitleService extends service_1.Service {
|
|
|
107
96
|
*/
|
|
108
97
|
async deleteAccounTitleSet(params) {
|
|
109
98
|
await this.fetch({
|
|
110
|
-
uri:
|
|
99
|
+
uri: `${BASE_URI_SET}/${encodeURIComponent(String(params.codeValue))}`,
|
|
111
100
|
method: 'DELETE',
|
|
112
101
|
body: params,
|
|
113
102
|
expectedStatusCodes: [http_status_1.status.NO_CONTENT]
|
|
@@ -116,21 +105,20 @@ class AccountTitleService extends service_1.Service {
|
|
|
116
105
|
/**
|
|
117
106
|
* 細目追加
|
|
118
107
|
*/
|
|
119
|
-
async
|
|
120
|
-
|
|
121
|
-
uri:
|
|
108
|
+
async addAccountTitle(params) {
|
|
109
|
+
await this.fetch({
|
|
110
|
+
uri: BASE_URI,
|
|
122
111
|
method: 'POST',
|
|
123
112
|
body: params,
|
|
124
|
-
expectedStatusCodes: [http_status_1.status.CREATED]
|
|
125
|
-
})
|
|
126
|
-
.then(async (response) => response.json());
|
|
113
|
+
expectedStatusCodes: [http_status_1.status.CREATED, http_status_1.status.NO_CONTENT]
|
|
114
|
+
});
|
|
127
115
|
}
|
|
128
116
|
/**
|
|
129
117
|
* 細目更新
|
|
130
118
|
*/
|
|
131
|
-
async
|
|
119
|
+
async updateAccountTitle(params) {
|
|
132
120
|
await this.fetch({
|
|
133
|
-
uri:
|
|
121
|
+
uri: `${BASE_URI}/${encodeURIComponent(String(params.codeValue))}`,
|
|
134
122
|
method: 'PUT',
|
|
135
123
|
body: params,
|
|
136
124
|
expectedStatusCodes: [http_status_1.status.NO_CONTENT]
|
|
@@ -139,26 +127,22 @@ class AccountTitleService extends service_1.Service {
|
|
|
139
127
|
/**
|
|
140
128
|
* 細目検索
|
|
141
129
|
*/
|
|
142
|
-
async
|
|
130
|
+
async findAccountTitles(params) {
|
|
143
131
|
return this.fetch({
|
|
144
|
-
uri:
|
|
132
|
+
uri: BASE_URI,
|
|
145
133
|
method: 'GET',
|
|
146
134
|
qs: params,
|
|
147
135
|
expectedStatusCodes: [http_status_1.status.OK]
|
|
148
136
|
})
|
|
149
|
-
.then(async (response) =>
|
|
150
|
-
return {
|
|
151
|
-
data: await response.json()
|
|
152
|
-
};
|
|
153
|
-
});
|
|
137
|
+
.then(async (response) => response.json());
|
|
154
138
|
}
|
|
155
139
|
/**
|
|
156
140
|
* 細目削除
|
|
157
141
|
* 不可逆的な物理削除です
|
|
158
142
|
*/
|
|
159
|
-
async
|
|
143
|
+
async deleteAccountTitleByCodeValue(params) {
|
|
160
144
|
await this.fetch({
|
|
161
|
-
uri:
|
|
145
|
+
uri: `${BASE_URI}/${encodeURIComponent(String(params.codeValue))}`,
|
|
162
146
|
method: 'DELETE',
|
|
163
147
|
body: params,
|
|
164
148
|
expectedStatusCodes: [http_status_1.status.NO_CONTENT]
|