@wakata-dev/api-client 0.3.3 → 0.5.0
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.cjs +384 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2754 -489
- package/dist/index.d.ts +2754 -489
- package/dist/index.js +384 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -113,7 +113,7 @@ function generateIdempotencyKey() {
|
|
|
113
113
|
return `wak_idem_${uuid.replace(/-/g, "")}`;
|
|
114
114
|
}
|
|
115
115
|
var client = createClient(createConfig({
|
|
116
|
-
baseUrl: "https://api.wakata.ai"
|
|
116
|
+
baseUrl: "https://dev-api.wakata.ai"
|
|
117
117
|
}));
|
|
118
118
|
|
|
119
119
|
// src/generated/sdk.gen.ts
|
|
@@ -1027,6 +1027,350 @@ var companyDocumentControllerCreate = (options) => {
|
|
|
1027
1027
|
}
|
|
1028
1028
|
});
|
|
1029
1029
|
};
|
|
1030
|
+
var projectControllerList = (options) => {
|
|
1031
|
+
return (options?.client ?? client).get({
|
|
1032
|
+
security: [
|
|
1033
|
+
{
|
|
1034
|
+
scheme: "bearer",
|
|
1035
|
+
type: "http"
|
|
1036
|
+
}
|
|
1037
|
+
],
|
|
1038
|
+
url: "/project/list",
|
|
1039
|
+
...options
|
|
1040
|
+
});
|
|
1041
|
+
};
|
|
1042
|
+
var projectControllerDelete = (options) => {
|
|
1043
|
+
return (options.client ?? client).delete({
|
|
1044
|
+
security: [
|
|
1045
|
+
{
|
|
1046
|
+
scheme: "bearer",
|
|
1047
|
+
type: "http"
|
|
1048
|
+
}
|
|
1049
|
+
],
|
|
1050
|
+
url: "/project/{id}",
|
|
1051
|
+
...options
|
|
1052
|
+
});
|
|
1053
|
+
};
|
|
1054
|
+
var projectControllerGet = (options) => {
|
|
1055
|
+
return (options.client ?? client).get({
|
|
1056
|
+
security: [
|
|
1057
|
+
{
|
|
1058
|
+
scheme: "bearer",
|
|
1059
|
+
type: "http"
|
|
1060
|
+
}
|
|
1061
|
+
],
|
|
1062
|
+
url: "/project/{id}",
|
|
1063
|
+
...options
|
|
1064
|
+
});
|
|
1065
|
+
};
|
|
1066
|
+
var projectControllerUpdate = (options) => {
|
|
1067
|
+
return (options.client ?? client).patch({
|
|
1068
|
+
security: [
|
|
1069
|
+
{
|
|
1070
|
+
scheme: "bearer",
|
|
1071
|
+
type: "http"
|
|
1072
|
+
}
|
|
1073
|
+
],
|
|
1074
|
+
url: "/project/{id}",
|
|
1075
|
+
...options,
|
|
1076
|
+
headers: {
|
|
1077
|
+
"Content-Type": "application/json",
|
|
1078
|
+
...options?.headers
|
|
1079
|
+
}
|
|
1080
|
+
});
|
|
1081
|
+
};
|
|
1082
|
+
var projectControllerListAssets = (options) => {
|
|
1083
|
+
return (options.client ?? client).get({
|
|
1084
|
+
security: [
|
|
1085
|
+
{
|
|
1086
|
+
scheme: "bearer",
|
|
1087
|
+
type: "http"
|
|
1088
|
+
}
|
|
1089
|
+
],
|
|
1090
|
+
url: "/project/{id}/assets",
|
|
1091
|
+
...options
|
|
1092
|
+
});
|
|
1093
|
+
};
|
|
1094
|
+
var projectControllerListUsers = (options) => {
|
|
1095
|
+
return (options.client ?? client).get({
|
|
1096
|
+
security: [
|
|
1097
|
+
{
|
|
1098
|
+
scheme: "bearer",
|
|
1099
|
+
type: "http"
|
|
1100
|
+
}
|
|
1101
|
+
],
|
|
1102
|
+
url: "/project/{id}/users",
|
|
1103
|
+
...options
|
|
1104
|
+
});
|
|
1105
|
+
};
|
|
1106
|
+
var projectControllerCreate = (options) => {
|
|
1107
|
+
return (options.client ?? client).post({
|
|
1108
|
+
security: [
|
|
1109
|
+
{
|
|
1110
|
+
scheme: "bearer",
|
|
1111
|
+
type: "http"
|
|
1112
|
+
}
|
|
1113
|
+
],
|
|
1114
|
+
url: "/project",
|
|
1115
|
+
...options,
|
|
1116
|
+
headers: {
|
|
1117
|
+
"Content-Type": "application/json",
|
|
1118
|
+
...options?.headers
|
|
1119
|
+
}
|
|
1120
|
+
});
|
|
1121
|
+
};
|
|
1122
|
+
var customerControllerList = (options) => {
|
|
1123
|
+
return (options?.client ?? client).get({
|
|
1124
|
+
security: [
|
|
1125
|
+
{
|
|
1126
|
+
scheme: "bearer",
|
|
1127
|
+
type: "http"
|
|
1128
|
+
}
|
|
1129
|
+
],
|
|
1130
|
+
url: "/customer/list",
|
|
1131
|
+
...options
|
|
1132
|
+
});
|
|
1133
|
+
};
|
|
1134
|
+
var customerControllerDelete = (options) => {
|
|
1135
|
+
return (options.client ?? client).delete({
|
|
1136
|
+
security: [
|
|
1137
|
+
{
|
|
1138
|
+
scheme: "bearer",
|
|
1139
|
+
type: "http"
|
|
1140
|
+
}
|
|
1141
|
+
],
|
|
1142
|
+
url: "/customer/{id}",
|
|
1143
|
+
...options
|
|
1144
|
+
});
|
|
1145
|
+
};
|
|
1146
|
+
var customerControllerGet = (options) => {
|
|
1147
|
+
return (options.client ?? client).get({
|
|
1148
|
+
security: [
|
|
1149
|
+
{
|
|
1150
|
+
scheme: "bearer",
|
|
1151
|
+
type: "http"
|
|
1152
|
+
}
|
|
1153
|
+
],
|
|
1154
|
+
url: "/customer/{id}",
|
|
1155
|
+
...options
|
|
1156
|
+
});
|
|
1157
|
+
};
|
|
1158
|
+
var customerControllerUpdate = (options) => {
|
|
1159
|
+
return (options.client ?? client).patch({
|
|
1160
|
+
security: [
|
|
1161
|
+
{
|
|
1162
|
+
scheme: "bearer",
|
|
1163
|
+
type: "http"
|
|
1164
|
+
}
|
|
1165
|
+
],
|
|
1166
|
+
url: "/customer/{id}",
|
|
1167
|
+
...options,
|
|
1168
|
+
headers: {
|
|
1169
|
+
"Content-Type": "application/json",
|
|
1170
|
+
...options?.headers
|
|
1171
|
+
}
|
|
1172
|
+
});
|
|
1173
|
+
};
|
|
1174
|
+
var customerControllerCreate = (options) => {
|
|
1175
|
+
return (options.client ?? client).post({
|
|
1176
|
+
security: [
|
|
1177
|
+
{
|
|
1178
|
+
scheme: "bearer",
|
|
1179
|
+
type: "http"
|
|
1180
|
+
}
|
|
1181
|
+
],
|
|
1182
|
+
url: "/customer",
|
|
1183
|
+
...options,
|
|
1184
|
+
headers: {
|
|
1185
|
+
"Content-Type": "application/json",
|
|
1186
|
+
...options?.headers
|
|
1187
|
+
}
|
|
1188
|
+
});
|
|
1189
|
+
};
|
|
1190
|
+
var zoneControllerList = (options) => {
|
|
1191
|
+
return (options?.client ?? client).get({
|
|
1192
|
+
security: [
|
|
1193
|
+
{
|
|
1194
|
+
scheme: "bearer",
|
|
1195
|
+
type: "http"
|
|
1196
|
+
}
|
|
1197
|
+
],
|
|
1198
|
+
url: "/zone/list",
|
|
1199
|
+
...options
|
|
1200
|
+
});
|
|
1201
|
+
};
|
|
1202
|
+
var zoneControllerDelete = (options) => {
|
|
1203
|
+
return (options.client ?? client).delete({
|
|
1204
|
+
security: [
|
|
1205
|
+
{
|
|
1206
|
+
scheme: "bearer",
|
|
1207
|
+
type: "http"
|
|
1208
|
+
}
|
|
1209
|
+
],
|
|
1210
|
+
url: "/zone/{id}",
|
|
1211
|
+
...options
|
|
1212
|
+
});
|
|
1213
|
+
};
|
|
1214
|
+
var zoneControllerGet = (options) => {
|
|
1215
|
+
return (options.client ?? client).get({
|
|
1216
|
+
security: [
|
|
1217
|
+
{
|
|
1218
|
+
scheme: "bearer",
|
|
1219
|
+
type: "http"
|
|
1220
|
+
}
|
|
1221
|
+
],
|
|
1222
|
+
url: "/zone/{id}",
|
|
1223
|
+
...options
|
|
1224
|
+
});
|
|
1225
|
+
};
|
|
1226
|
+
var zoneControllerUpdate = (options) => {
|
|
1227
|
+
return (options.client ?? client).patch({
|
|
1228
|
+
security: [
|
|
1229
|
+
{
|
|
1230
|
+
scheme: "bearer",
|
|
1231
|
+
type: "http"
|
|
1232
|
+
}
|
|
1233
|
+
],
|
|
1234
|
+
url: "/zone/{id}",
|
|
1235
|
+
...options,
|
|
1236
|
+
headers: {
|
|
1237
|
+
"Content-Type": "application/json",
|
|
1238
|
+
...options?.headers
|
|
1239
|
+
}
|
|
1240
|
+
});
|
|
1241
|
+
};
|
|
1242
|
+
var zoneControllerCreate = (options) => {
|
|
1243
|
+
return (options.client ?? client).post({
|
|
1244
|
+
security: [
|
|
1245
|
+
{
|
|
1246
|
+
scheme: "bearer",
|
|
1247
|
+
type: "http"
|
|
1248
|
+
}
|
|
1249
|
+
],
|
|
1250
|
+
url: "/zone",
|
|
1251
|
+
...options,
|
|
1252
|
+
headers: {
|
|
1253
|
+
"Content-Type": "application/json",
|
|
1254
|
+
...options?.headers
|
|
1255
|
+
}
|
|
1256
|
+
});
|
|
1257
|
+
};
|
|
1258
|
+
var groupControllerList = (options) => {
|
|
1259
|
+
return (options?.client ?? client).get({
|
|
1260
|
+
security: [
|
|
1261
|
+
{
|
|
1262
|
+
scheme: "bearer",
|
|
1263
|
+
type: "http"
|
|
1264
|
+
}
|
|
1265
|
+
],
|
|
1266
|
+
url: "/group/list",
|
|
1267
|
+
...options
|
|
1268
|
+
});
|
|
1269
|
+
};
|
|
1270
|
+
var groupControllerDelete = (options) => {
|
|
1271
|
+
return (options.client ?? client).delete({
|
|
1272
|
+
security: [
|
|
1273
|
+
{
|
|
1274
|
+
scheme: "bearer",
|
|
1275
|
+
type: "http"
|
|
1276
|
+
}
|
|
1277
|
+
],
|
|
1278
|
+
url: "/group/{id}",
|
|
1279
|
+
...options
|
|
1280
|
+
});
|
|
1281
|
+
};
|
|
1282
|
+
var groupControllerGet = (options) => {
|
|
1283
|
+
return (options.client ?? client).get({
|
|
1284
|
+
security: [
|
|
1285
|
+
{
|
|
1286
|
+
scheme: "bearer",
|
|
1287
|
+
type: "http"
|
|
1288
|
+
}
|
|
1289
|
+
],
|
|
1290
|
+
url: "/group/{id}",
|
|
1291
|
+
...options
|
|
1292
|
+
});
|
|
1293
|
+
};
|
|
1294
|
+
var groupControllerUpdate = (options) => {
|
|
1295
|
+
return (options.client ?? client).patch({
|
|
1296
|
+
security: [
|
|
1297
|
+
{
|
|
1298
|
+
scheme: "bearer",
|
|
1299
|
+
type: "http"
|
|
1300
|
+
}
|
|
1301
|
+
],
|
|
1302
|
+
url: "/group/{id}",
|
|
1303
|
+
...options,
|
|
1304
|
+
headers: {
|
|
1305
|
+
"Content-Type": "application/json",
|
|
1306
|
+
...options?.headers
|
|
1307
|
+
}
|
|
1308
|
+
});
|
|
1309
|
+
};
|
|
1310
|
+
var groupControllerCreate = (options) => {
|
|
1311
|
+
return (options.client ?? client).post({
|
|
1312
|
+
security: [
|
|
1313
|
+
{
|
|
1314
|
+
scheme: "bearer",
|
|
1315
|
+
type: "http"
|
|
1316
|
+
}
|
|
1317
|
+
],
|
|
1318
|
+
url: "/group",
|
|
1319
|
+
...options,
|
|
1320
|
+
headers: {
|
|
1321
|
+
"Content-Type": "application/json",
|
|
1322
|
+
...options?.headers
|
|
1323
|
+
}
|
|
1324
|
+
});
|
|
1325
|
+
};
|
|
1326
|
+
var devicePublicControllerList = (options) => {
|
|
1327
|
+
return (options?.client ?? client).get({
|
|
1328
|
+
security: [
|
|
1329
|
+
{
|
|
1330
|
+
scheme: "bearer",
|
|
1331
|
+
type: "http"
|
|
1332
|
+
}
|
|
1333
|
+
],
|
|
1334
|
+
url: "/device/list",
|
|
1335
|
+
...options
|
|
1336
|
+
});
|
|
1337
|
+
};
|
|
1338
|
+
var devicePublicControllerGet = (options) => {
|
|
1339
|
+
return (options.client ?? client).get({
|
|
1340
|
+
security: [
|
|
1341
|
+
{
|
|
1342
|
+
scheme: "bearer",
|
|
1343
|
+
type: "http"
|
|
1344
|
+
}
|
|
1345
|
+
],
|
|
1346
|
+
url: "/device/{id}",
|
|
1347
|
+
...options
|
|
1348
|
+
});
|
|
1349
|
+
};
|
|
1350
|
+
var timesheetPublicControllerList = (options) => {
|
|
1351
|
+
return (options?.client ?? client).get({
|
|
1352
|
+
security: [
|
|
1353
|
+
{
|
|
1354
|
+
scheme: "bearer",
|
|
1355
|
+
type: "http"
|
|
1356
|
+
}
|
|
1357
|
+
],
|
|
1358
|
+
url: "/timesheet/list",
|
|
1359
|
+
...options
|
|
1360
|
+
});
|
|
1361
|
+
};
|
|
1362
|
+
var timesheetPublicControllerGet = (options) => {
|
|
1363
|
+
return (options.client ?? client).get({
|
|
1364
|
+
security: [
|
|
1365
|
+
{
|
|
1366
|
+
scheme: "bearer",
|
|
1367
|
+
type: "http"
|
|
1368
|
+
}
|
|
1369
|
+
],
|
|
1370
|
+
url: "/timesheet/{id}",
|
|
1371
|
+
...options
|
|
1372
|
+
});
|
|
1373
|
+
};
|
|
1030
1374
|
var siteControllerListSites = (options) => {
|
|
1031
1375
|
return (options?.client ?? client).get({
|
|
1032
1376
|
security: [
|
|
@@ -1086,7 +1430,7 @@ var siteControllerUpdateSite = (options) => {
|
|
|
1086
1430
|
|
|
1087
1431
|
// src/client.ts
|
|
1088
1432
|
var DEFAULT_BASE_URL = "https://api.wakata.ai/api/v1";
|
|
1089
|
-
var PACKAGE_VERSION = "0.
|
|
1433
|
+
var PACKAGE_VERSION = "0.5.0";
|
|
1090
1434
|
function unwrap(result) {
|
|
1091
1435
|
if (result.data === void 0) {
|
|
1092
1436
|
throw new WakataApiError({
|
|
@@ -1310,6 +1654,44 @@ var WakataClient = class {
|
|
|
1310
1654
|
remove: companyDocumentControllerRemove
|
|
1311
1655
|
})
|
|
1312
1656
|
};
|
|
1657
|
+
this.customers = {
|
|
1658
|
+
list: async (opts) => unwrap(await customerControllerList({ ...opts ?? {}, client: client2 })),
|
|
1659
|
+
get: async (opts) => unwrap(await customerControllerGet({ ...opts, client: client2 })),
|
|
1660
|
+
create: async (opts) => unwrap(await customerControllerCreate({ ...opts, client: client2 })),
|
|
1661
|
+
update: async (opts) => unwrap(await customerControllerUpdate({ ...opts, client: client2 })),
|
|
1662
|
+
delete: async (opts) => unwrap(await customerControllerDelete({ ...opts, client: client2 }))
|
|
1663
|
+
};
|
|
1664
|
+
this.zones = {
|
|
1665
|
+
list: async (opts) => unwrap(await zoneControllerList({ ...opts ?? {}, client: client2 })),
|
|
1666
|
+
get: async (opts) => unwrap(await zoneControllerGet({ ...opts, client: client2 })),
|
|
1667
|
+
create: async (opts) => unwrap(await zoneControllerCreate({ ...opts, client: client2 })),
|
|
1668
|
+
update: async (opts) => unwrap(await zoneControllerUpdate({ ...opts, client: client2 })),
|
|
1669
|
+
delete: async (opts) => unwrap(await zoneControllerDelete({ ...opts, client: client2 }))
|
|
1670
|
+
};
|
|
1671
|
+
this.groups = {
|
|
1672
|
+
list: async (opts) => unwrap(await groupControllerList({ ...opts ?? {}, client: client2 })),
|
|
1673
|
+
get: async (opts) => unwrap(await groupControllerGet({ ...opts, client: client2 })),
|
|
1674
|
+
create: async (opts) => unwrap(await groupControllerCreate({ ...opts, client: client2 })),
|
|
1675
|
+
update: async (opts) => unwrap(await groupControllerUpdate({ ...opts, client: client2 })),
|
|
1676
|
+
delete: async (opts) => unwrap(await groupControllerDelete({ ...opts, client: client2 }))
|
|
1677
|
+
};
|
|
1678
|
+
this.devices = {
|
|
1679
|
+
list: async (opts) => unwrap(await devicePublicControllerList({ ...opts ?? {}, client: client2 })),
|
|
1680
|
+
get: async (opts) => unwrap(await devicePublicControllerGet({ ...opts, client: client2 }))
|
|
1681
|
+
};
|
|
1682
|
+
this.timesheets = {
|
|
1683
|
+
list: async (opts) => unwrap(await timesheetPublicControllerList({ ...opts ?? {}, client: client2 })),
|
|
1684
|
+
get: async (opts) => unwrap(await timesheetPublicControllerGet({ ...opts, client: client2 }))
|
|
1685
|
+
};
|
|
1686
|
+
this.projects = {
|
|
1687
|
+
list: async (opts) => unwrap(await projectControllerList({ ...opts ?? {}, client: client2 })),
|
|
1688
|
+
get: async (opts) => unwrap(await projectControllerGet({ ...opts, client: client2 })),
|
|
1689
|
+
create: async (opts) => unwrap(await projectControllerCreate({ ...opts, client: client2 })),
|
|
1690
|
+
update: async (opts) => unwrap(await projectControllerUpdate({ ...opts, client: client2 })),
|
|
1691
|
+
delete: async (opts) => unwrap(await projectControllerDelete({ ...opts, client: client2 })),
|
|
1692
|
+
assets: async (opts) => unwrap(await projectControllerListAssets({ ...opts, client: client2 })),
|
|
1693
|
+
users: async (opts) => unwrap(await projectControllerListUsers({ ...opts, client: client2 }))
|
|
1694
|
+
};
|
|
1313
1695
|
}
|
|
1314
1696
|
};
|
|
1315
1697
|
|