@hostlink/hostlink-cli 1.0.4 → 1.0.5

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.
Files changed (2) hide show
  1. package/dist/bundle.js +5 -19
  2. package/package.json +1 -1
package/dist/bundle.js CHANGED
@@ -65486,29 +65486,15 @@ var require_leave = __commonJS({
65486
65486
  }
65487
65487
  const submitData = await promptLeaveRequest();
65488
65488
  const mutation = gql`
65489
- mutation AddLeave($data: AddStaffLeaveRequestInput!) {
65490
- addStaffLeaveRequest(data: $data) {
65491
- leave_request_id
65492
- type
65493
- from_date
65494
- to_date
65495
- status
65496
- remark
65497
- }
65489
+ mutation AddLeave($data: CreateStaffLeaveInput!) {
65490
+ addStaffLeaveRequest(data: $data)
65498
65491
  }
65499
65492
  `;
65500
65493
  try {
65501
65494
  const result = await client.request(mutation, { data: submitData });
65502
- const req = result?.addStaffLeaveRequest;
65495
+ const leaveRequestId = result?.addStaffLeaveRequest;
65503
65496
  console.log("\n\u2705 Leave request submitted successfully!");
65504
- if (req) {
65505
- console.log(` ID: ${req.leave_request_id}`);
65506
- console.log(` Type: ${LEAVE_TYPE_LABELS[req.type] ?? req.type}`);
65507
- console.log(` From: ${req.from_date}`);
65508
- if (req.to_date) console.log(` To: ${req.to_date}`);
65509
- console.log(` Status: ${req.status}`);
65510
- if (req.remark) console.log(` Remark: ${req.remark}`);
65511
- }
65497
+ console.log(` ID: ${leaveRequestId}`);
65512
65498
  } catch (err) {
65513
65499
  const message = err?.response?.errors?.[0]?.message ?? err.message;
65514
65500
  console.error(`
@@ -66391,7 +66377,7 @@ var require_package = __commonJS({
66391
66377
  "package.json"(exports2, module2) {
66392
66378
  module2.exports = {
66393
66379
  name: "@hostlink/hostlink-cli",
66394
- version: "1.0.4",
66380
+ version: "1.0.5",
66395
66381
  description: "CLI tool for the HostLink platform",
66396
66382
  main: "index.js",
66397
66383
  bin: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hostlink/hostlink-cli",
3
- "version": "1.0.4",
3
+ "version": "1.0.5",
4
4
  "description": "CLI tool for the HostLink platform",
5
5
  "main": "index.js",
6
6
  "bin": {