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