@wakata-dev/api-client 0.3.3 → 0.4.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 +283 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1828 -228
- package/dist/index.d.ts +1828 -228
- package/dist/index.js +283 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -115,7 +115,7 @@ function generateIdempotencyKey() {
|
|
|
115
115
|
return `wak_idem_${uuid.replace(/-/g, "")}`;
|
|
116
116
|
}
|
|
117
117
|
var client = clientFetch.createClient(clientFetch.createConfig({
|
|
118
|
-
baseUrl: "https://api.wakata.ai"
|
|
118
|
+
baseUrl: "https://dev-api.wakata.ai"
|
|
119
119
|
}));
|
|
120
120
|
|
|
121
121
|
// src/generated/sdk.gen.ts
|
|
@@ -1029,6 +1029,258 @@ var companyDocumentControllerCreate = (options) => {
|
|
|
1029
1029
|
}
|
|
1030
1030
|
});
|
|
1031
1031
|
};
|
|
1032
|
+
var customerControllerList = (options) => {
|
|
1033
|
+
return (options?.client ?? client).get({
|
|
1034
|
+
security: [
|
|
1035
|
+
{
|
|
1036
|
+
scheme: "bearer",
|
|
1037
|
+
type: "http"
|
|
1038
|
+
}
|
|
1039
|
+
],
|
|
1040
|
+
url: "/customer/list",
|
|
1041
|
+
...options
|
|
1042
|
+
});
|
|
1043
|
+
};
|
|
1044
|
+
var customerControllerDelete = (options) => {
|
|
1045
|
+
return (options.client ?? client).delete({
|
|
1046
|
+
security: [
|
|
1047
|
+
{
|
|
1048
|
+
scheme: "bearer",
|
|
1049
|
+
type: "http"
|
|
1050
|
+
}
|
|
1051
|
+
],
|
|
1052
|
+
url: "/customer/{id}",
|
|
1053
|
+
...options
|
|
1054
|
+
});
|
|
1055
|
+
};
|
|
1056
|
+
var customerControllerGet = (options) => {
|
|
1057
|
+
return (options.client ?? client).get({
|
|
1058
|
+
security: [
|
|
1059
|
+
{
|
|
1060
|
+
scheme: "bearer",
|
|
1061
|
+
type: "http"
|
|
1062
|
+
}
|
|
1063
|
+
],
|
|
1064
|
+
url: "/customer/{id}",
|
|
1065
|
+
...options
|
|
1066
|
+
});
|
|
1067
|
+
};
|
|
1068
|
+
var customerControllerUpdate = (options) => {
|
|
1069
|
+
return (options.client ?? client).patch({
|
|
1070
|
+
security: [
|
|
1071
|
+
{
|
|
1072
|
+
scheme: "bearer",
|
|
1073
|
+
type: "http"
|
|
1074
|
+
}
|
|
1075
|
+
],
|
|
1076
|
+
url: "/customer/{id}",
|
|
1077
|
+
...options,
|
|
1078
|
+
headers: {
|
|
1079
|
+
"Content-Type": "application/json",
|
|
1080
|
+
...options?.headers
|
|
1081
|
+
}
|
|
1082
|
+
});
|
|
1083
|
+
};
|
|
1084
|
+
var customerControllerCreate = (options) => {
|
|
1085
|
+
return (options.client ?? client).post({
|
|
1086
|
+
security: [
|
|
1087
|
+
{
|
|
1088
|
+
scheme: "bearer",
|
|
1089
|
+
type: "http"
|
|
1090
|
+
}
|
|
1091
|
+
],
|
|
1092
|
+
url: "/customer",
|
|
1093
|
+
...options,
|
|
1094
|
+
headers: {
|
|
1095
|
+
"Content-Type": "application/json",
|
|
1096
|
+
...options?.headers
|
|
1097
|
+
}
|
|
1098
|
+
});
|
|
1099
|
+
};
|
|
1100
|
+
var zoneControllerList = (options) => {
|
|
1101
|
+
return (options?.client ?? client).get({
|
|
1102
|
+
security: [
|
|
1103
|
+
{
|
|
1104
|
+
scheme: "bearer",
|
|
1105
|
+
type: "http"
|
|
1106
|
+
}
|
|
1107
|
+
],
|
|
1108
|
+
url: "/zone/list",
|
|
1109
|
+
...options
|
|
1110
|
+
});
|
|
1111
|
+
};
|
|
1112
|
+
var zoneControllerDelete = (options) => {
|
|
1113
|
+
return (options.client ?? client).delete({
|
|
1114
|
+
security: [
|
|
1115
|
+
{
|
|
1116
|
+
scheme: "bearer",
|
|
1117
|
+
type: "http"
|
|
1118
|
+
}
|
|
1119
|
+
],
|
|
1120
|
+
url: "/zone/{id}",
|
|
1121
|
+
...options
|
|
1122
|
+
});
|
|
1123
|
+
};
|
|
1124
|
+
var zoneControllerGet = (options) => {
|
|
1125
|
+
return (options.client ?? client).get({
|
|
1126
|
+
security: [
|
|
1127
|
+
{
|
|
1128
|
+
scheme: "bearer",
|
|
1129
|
+
type: "http"
|
|
1130
|
+
}
|
|
1131
|
+
],
|
|
1132
|
+
url: "/zone/{id}",
|
|
1133
|
+
...options
|
|
1134
|
+
});
|
|
1135
|
+
};
|
|
1136
|
+
var zoneControllerUpdate = (options) => {
|
|
1137
|
+
return (options.client ?? client).patch({
|
|
1138
|
+
security: [
|
|
1139
|
+
{
|
|
1140
|
+
scheme: "bearer",
|
|
1141
|
+
type: "http"
|
|
1142
|
+
}
|
|
1143
|
+
],
|
|
1144
|
+
url: "/zone/{id}",
|
|
1145
|
+
...options,
|
|
1146
|
+
headers: {
|
|
1147
|
+
"Content-Type": "application/json",
|
|
1148
|
+
...options?.headers
|
|
1149
|
+
}
|
|
1150
|
+
});
|
|
1151
|
+
};
|
|
1152
|
+
var zoneControllerCreate = (options) => {
|
|
1153
|
+
return (options.client ?? client).post({
|
|
1154
|
+
security: [
|
|
1155
|
+
{
|
|
1156
|
+
scheme: "bearer",
|
|
1157
|
+
type: "http"
|
|
1158
|
+
}
|
|
1159
|
+
],
|
|
1160
|
+
url: "/zone",
|
|
1161
|
+
...options,
|
|
1162
|
+
headers: {
|
|
1163
|
+
"Content-Type": "application/json",
|
|
1164
|
+
...options?.headers
|
|
1165
|
+
}
|
|
1166
|
+
});
|
|
1167
|
+
};
|
|
1168
|
+
var groupControllerList = (options) => {
|
|
1169
|
+
return (options?.client ?? client).get({
|
|
1170
|
+
security: [
|
|
1171
|
+
{
|
|
1172
|
+
scheme: "bearer",
|
|
1173
|
+
type: "http"
|
|
1174
|
+
}
|
|
1175
|
+
],
|
|
1176
|
+
url: "/group/list",
|
|
1177
|
+
...options
|
|
1178
|
+
});
|
|
1179
|
+
};
|
|
1180
|
+
var groupControllerDelete = (options) => {
|
|
1181
|
+
return (options.client ?? client).delete({
|
|
1182
|
+
security: [
|
|
1183
|
+
{
|
|
1184
|
+
scheme: "bearer",
|
|
1185
|
+
type: "http"
|
|
1186
|
+
}
|
|
1187
|
+
],
|
|
1188
|
+
url: "/group/{id}",
|
|
1189
|
+
...options
|
|
1190
|
+
});
|
|
1191
|
+
};
|
|
1192
|
+
var groupControllerGet = (options) => {
|
|
1193
|
+
return (options.client ?? client).get({
|
|
1194
|
+
security: [
|
|
1195
|
+
{
|
|
1196
|
+
scheme: "bearer",
|
|
1197
|
+
type: "http"
|
|
1198
|
+
}
|
|
1199
|
+
],
|
|
1200
|
+
url: "/group/{id}",
|
|
1201
|
+
...options
|
|
1202
|
+
});
|
|
1203
|
+
};
|
|
1204
|
+
var groupControllerUpdate = (options) => {
|
|
1205
|
+
return (options.client ?? client).patch({
|
|
1206
|
+
security: [
|
|
1207
|
+
{
|
|
1208
|
+
scheme: "bearer",
|
|
1209
|
+
type: "http"
|
|
1210
|
+
}
|
|
1211
|
+
],
|
|
1212
|
+
url: "/group/{id}",
|
|
1213
|
+
...options,
|
|
1214
|
+
headers: {
|
|
1215
|
+
"Content-Type": "application/json",
|
|
1216
|
+
...options?.headers
|
|
1217
|
+
}
|
|
1218
|
+
});
|
|
1219
|
+
};
|
|
1220
|
+
var groupControllerCreate = (options) => {
|
|
1221
|
+
return (options.client ?? client).post({
|
|
1222
|
+
security: [
|
|
1223
|
+
{
|
|
1224
|
+
scheme: "bearer",
|
|
1225
|
+
type: "http"
|
|
1226
|
+
}
|
|
1227
|
+
],
|
|
1228
|
+
url: "/group",
|
|
1229
|
+
...options,
|
|
1230
|
+
headers: {
|
|
1231
|
+
"Content-Type": "application/json",
|
|
1232
|
+
...options?.headers
|
|
1233
|
+
}
|
|
1234
|
+
});
|
|
1235
|
+
};
|
|
1236
|
+
var devicePublicControllerList = (options) => {
|
|
1237
|
+
return (options?.client ?? client).get({
|
|
1238
|
+
security: [
|
|
1239
|
+
{
|
|
1240
|
+
scheme: "bearer",
|
|
1241
|
+
type: "http"
|
|
1242
|
+
}
|
|
1243
|
+
],
|
|
1244
|
+
url: "/device/list",
|
|
1245
|
+
...options
|
|
1246
|
+
});
|
|
1247
|
+
};
|
|
1248
|
+
var devicePublicControllerGet = (options) => {
|
|
1249
|
+
return (options.client ?? client).get({
|
|
1250
|
+
security: [
|
|
1251
|
+
{
|
|
1252
|
+
scheme: "bearer",
|
|
1253
|
+
type: "http"
|
|
1254
|
+
}
|
|
1255
|
+
],
|
|
1256
|
+
url: "/device/{id}",
|
|
1257
|
+
...options
|
|
1258
|
+
});
|
|
1259
|
+
};
|
|
1260
|
+
var timesheetPublicControllerList = (options) => {
|
|
1261
|
+
return (options?.client ?? client).get({
|
|
1262
|
+
security: [
|
|
1263
|
+
{
|
|
1264
|
+
scheme: "bearer",
|
|
1265
|
+
type: "http"
|
|
1266
|
+
}
|
|
1267
|
+
],
|
|
1268
|
+
url: "/timesheet/list",
|
|
1269
|
+
...options
|
|
1270
|
+
});
|
|
1271
|
+
};
|
|
1272
|
+
var timesheetPublicControllerGet = (options) => {
|
|
1273
|
+
return (options.client ?? client).get({
|
|
1274
|
+
security: [
|
|
1275
|
+
{
|
|
1276
|
+
scheme: "bearer",
|
|
1277
|
+
type: "http"
|
|
1278
|
+
}
|
|
1279
|
+
],
|
|
1280
|
+
url: "/timesheet/{id}",
|
|
1281
|
+
...options
|
|
1282
|
+
});
|
|
1283
|
+
};
|
|
1032
1284
|
var siteControllerListSites = (options) => {
|
|
1033
1285
|
return (options?.client ?? client).get({
|
|
1034
1286
|
security: [
|
|
@@ -1088,7 +1340,7 @@ var siteControllerUpdateSite = (options) => {
|
|
|
1088
1340
|
|
|
1089
1341
|
// src/client.ts
|
|
1090
1342
|
var DEFAULT_BASE_URL = "https://api.wakata.ai/api/v1";
|
|
1091
|
-
var PACKAGE_VERSION = "0.
|
|
1343
|
+
var PACKAGE_VERSION = "0.4.0";
|
|
1092
1344
|
function unwrap(result) {
|
|
1093
1345
|
if (result.data === void 0) {
|
|
1094
1346
|
throw new WakataApiError({
|
|
@@ -1312,6 +1564,35 @@ var WakataClient = class {
|
|
|
1312
1564
|
remove: companyDocumentControllerRemove
|
|
1313
1565
|
})
|
|
1314
1566
|
};
|
|
1567
|
+
this.customers = {
|
|
1568
|
+
list: async (opts) => unwrap(await customerControllerList({ ...opts ?? {}, client: client2 })),
|
|
1569
|
+
get: async (opts) => unwrap(await customerControllerGet({ ...opts, client: client2 })),
|
|
1570
|
+
create: async (opts) => unwrap(await customerControllerCreate({ ...opts, client: client2 })),
|
|
1571
|
+
update: async (opts) => unwrap(await customerControllerUpdate({ ...opts, client: client2 })),
|
|
1572
|
+
delete: async (opts) => unwrap(await customerControllerDelete({ ...opts, client: client2 }))
|
|
1573
|
+
};
|
|
1574
|
+
this.zones = {
|
|
1575
|
+
list: async (opts) => unwrap(await zoneControllerList({ ...opts ?? {}, client: client2 })),
|
|
1576
|
+
get: async (opts) => unwrap(await zoneControllerGet({ ...opts, client: client2 })),
|
|
1577
|
+
create: async (opts) => unwrap(await zoneControllerCreate({ ...opts, client: client2 })),
|
|
1578
|
+
update: async (opts) => unwrap(await zoneControllerUpdate({ ...opts, client: client2 })),
|
|
1579
|
+
delete: async (opts) => unwrap(await zoneControllerDelete({ ...opts, client: client2 }))
|
|
1580
|
+
};
|
|
1581
|
+
this.groups = {
|
|
1582
|
+
list: async (opts) => unwrap(await groupControllerList({ ...opts ?? {}, client: client2 })),
|
|
1583
|
+
get: async (opts) => unwrap(await groupControllerGet({ ...opts, client: client2 })),
|
|
1584
|
+
create: async (opts) => unwrap(await groupControllerCreate({ ...opts, client: client2 })),
|
|
1585
|
+
update: async (opts) => unwrap(await groupControllerUpdate({ ...opts, client: client2 })),
|
|
1586
|
+
delete: async (opts) => unwrap(await groupControllerDelete({ ...opts, client: client2 }))
|
|
1587
|
+
};
|
|
1588
|
+
this.devices = {
|
|
1589
|
+
list: async (opts) => unwrap(await devicePublicControllerList({ ...opts ?? {}, client: client2 })),
|
|
1590
|
+
get: async (opts) => unwrap(await devicePublicControllerGet({ ...opts, client: client2 }))
|
|
1591
|
+
};
|
|
1592
|
+
this.timesheets = {
|
|
1593
|
+
list: async (opts) => unwrap(await timesheetPublicControllerList({ ...opts ?? {}, client: client2 })),
|
|
1594
|
+
get: async (opts) => unwrap(await timesheetPublicControllerGet({ ...opts, client: client2 }))
|
|
1595
|
+
};
|
|
1315
1596
|
}
|
|
1316
1597
|
};
|
|
1317
1598
|
|