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