busroot-sdk 0.0.1 → 0.0.3
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/build/busroot.d.ts +277 -0
- package/build/client.d.ts +8 -6
- package/build/client.js +38 -34
- package/build/client.test.d.ts +0 -1
- package/build/hooks.d.ts +9 -5
- package/build/hooks.js +13 -3
- package/build/index.d.ts +1 -1
- package/package.json +3 -3
- package/build/client.d.ts.map +0 -1
- package/build/client.test.d.ts.map +0 -1
- package/build/common.d.ts +0 -973
- package/build/example.d.ts +0 -2
- package/build/example.d.ts.map +0 -1
- package/build/example.js +0 -31
- package/build/hooks.d.ts.map +0 -1
- package/build/index.d.ts.map +0 -1
package/build/example.d.ts
DELETED
package/build/example.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"example.d.ts","sourceRoot":"","sources":["../src/example.ts"],"names":[],"mappings":""}
|
package/build/example.js
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const moment_1 = __importDefault(require("moment"));
|
|
7
|
-
const client_1 = require("./client");
|
|
8
|
-
async function main() {
|
|
9
|
-
const busrootOiClient = new client_1.Client({ accountId: "account_000", apiKey: "admin_api_key", host: "localhost" });
|
|
10
|
-
// const profile = await busroot.profile.get();
|
|
11
|
-
// console.log(profile);
|
|
12
|
-
const account = await busrootOiClient.account.create("opind.co", "London");
|
|
13
|
-
// console.log(account);
|
|
14
|
-
const busrootClient = new client_1.Client({ accountId: account.account.id, apiKey: account.apiKey, host: "localhost" });
|
|
15
|
-
// const profile = await busrootClient.profile.get();
|
|
16
|
-
// console.log(profile);
|
|
17
|
-
const station1 = await busrootClient.station.createUpdate({ code: "machine1", name: "Machine 1", groupCode: "unknown" });
|
|
18
|
-
const sku1 = await busrootClient.sku.createUpdate({ code: "PRODUCT1", name: "Product 1" });
|
|
19
|
-
const { id: scheduleId } = await busrootClient.schedule.createUpdate({
|
|
20
|
-
stationCode: station1.code,
|
|
21
|
-
skuCode: sku1.code,
|
|
22
|
-
plannedStartAt: (0, moment_1.default)().toISOString(),
|
|
23
|
-
});
|
|
24
|
-
console.log(scheduleId);
|
|
25
|
-
// busrootClient.station.signal(station1.code, { production_complete: 1 });
|
|
26
|
-
const schedule = await busrootClient.schedule.get(scheduleId);
|
|
27
|
-
console.log(schedule[0]);
|
|
28
|
-
busrootOiClient.destroy();
|
|
29
|
-
busrootClient.destroy();
|
|
30
|
-
}
|
|
31
|
-
main();
|
package/build/hooks.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../src/hooks.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,CAAC,MAAM,KAAK,CAAC;AAKpB,eAAO,MAAM,mBAAmB;;;;;;;;;;;;EAI9B,CAAC;AAEH,wBAAgB,UAAU;;;EA6BzB"}
|
package/build/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC"}
|