bamboohr.com 1.5.5 → 1.5.6

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/package.json CHANGED
@@ -1,16 +1,16 @@
1
1
  {
2
2
  "author": "Florian Imdahl <git@ffflorian.de>",
3
3
  "dependencies": {
4
- "@ffflorian/api-client": "2.2.0",
4
+ "@ffflorian/api-client": "2.5.0",
5
5
  "@hapi/hawk": "8.0.0"
6
6
  },
7
7
  "description": "An bamboohr.com API client",
8
8
  "devDependencies": {
9
9
  "@types/hapi__hawk": "8.0.7",
10
10
  "@types/node": "~24",
11
- "rimraf": "6.1.2",
12
- "typedoc": "0.28.15",
13
- "typescript": "5.9.3"
11
+ "rimraf": "6.1.3",
12
+ "typedoc": "0.28.18",
13
+ "typescript": "6.0.2"
14
14
  },
15
15
  "engines": {
16
16
  "node": ">= 21"
@@ -36,6 +36,5 @@
36
36
  "dist": "yarn clean && yarn build:ts",
37
37
  "test": "exit 0"
38
38
  },
39
- "version": "1.5.5",
40
- "gitHead": "8d7471cbe490305b3e441c27acbc81e36a4bd9df"
39
+ "version": "1.5.6"
41
40
  }
@@ -1,7 +0,0 @@
1
- import type { API, ClientOptions } from './interfaces';
2
- export declare class BambooHR {
3
- readonly api: API;
4
- private readonly apiClient;
5
- private readonly options;
6
- constructor(options: ClientOptions);
7
- }
package/dist/BambooHR.js DELETED
@@ -1,33 +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
- exports.BambooHR = void 0;
7
- const node_crypto_1 = __importDefault(require("node:crypto"));
8
- const api_client_1 = require("@ffflorian/api-client");
9
- const api_1 = require("./api");
10
- class BambooHR {
11
- constructor(options) {
12
- this.options = options;
13
- const baseURL = `https://api.bamboohr.com/api/gateway.php/${options.companyDomain}/v1/`;
14
- this.apiClient = new api_client_1.APIClient(baseURL, {
15
- auth: {
16
- password: node_crypto_1.default.randomBytes(16).toString('base64').substring(0, 7),
17
- username: this.options.apiKey,
18
- },
19
- headers: {
20
- Accept: 'application/json',
21
- },
22
- });
23
- this.apiClient.interceptors.response.push(response => {
24
- const errorMessage = response.headers.get('x-bamboohr-error-message') || response.statusText;
25
- throw new Error(`HTTP error ${response.status}: ${errorMessage}`);
26
- });
27
- this.api = {
28
- employees: new api_1.EmployeesAPI(this.apiClient),
29
- timeOff: new api_1.TimeOffAPI(this.apiClient),
30
- };
31
- }
32
- }
33
- exports.BambooHR = BambooHR;
@@ -1,21 +0,0 @@
1
- import type { Fields } from './interfaces/Fields';
2
- export declare const Endpoint: {
3
- DIRECTORY: string;
4
- EMPLOYEES: string;
5
- META: string;
6
- POLICIES: string;
7
- REQUESTS: string;
8
- TIME_OFF: string;
9
- TYPES: string;
10
- WHOS_OUT: string;
11
- Employees: {
12
- employees(id?: number, fields?: Array<keyof Fields>): string;
13
- employeeDirectory(): string;
14
- };
15
- TimeOff: {
16
- whosOut(): string;
17
- timeOffTypes(): string;
18
- timeOffPolicies(): string;
19
- timeOffRequests(): string;
20
- };
21
- };
package/dist/Endpoints.js DELETED
@@ -1,44 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Endpoint = void 0;
4
- exports.Endpoint = {
5
- DIRECTORY: 'directory',
6
- EMPLOYEES: 'employees',
7
- META: 'meta',
8
- POLICIES: 'policies',
9
- REQUESTS: 'requests',
10
- TIME_OFF: 'time_off',
11
- TYPES: 'types',
12
- WHOS_OUT: 'whos_out',
13
- Employees: {
14
- employees(id, fields) {
15
- const url = new URL(`/${exports.Endpoint.EMPLOYEES}/`, 'https://example.com');
16
- if (id) {
17
- url.pathname += `${id}/`;
18
- }
19
- if (fields) {
20
- const params = new URLSearchParams();
21
- params.append('fields', fields.join(','));
22
- url.search = params.toString();
23
- }
24
- return `${url.pathname}${url.search}`;
25
- },
26
- employeeDirectory() {
27
- return `/${exports.Endpoint.EMPLOYEES}/${exports.Endpoint.DIRECTORY}/`;
28
- },
29
- },
30
- TimeOff: {
31
- whosOut() {
32
- return `/${exports.Endpoint.TIME_OFF}/${exports.Endpoint.WHOS_OUT}/`;
33
- },
34
- timeOffTypes() {
35
- return `/${exports.Endpoint.META}/${exports.Endpoint.TIME_OFF}/${exports.Endpoint.TYPES}/`;
36
- },
37
- timeOffPolicies() {
38
- return `/${exports.Endpoint.META}/${exports.Endpoint.TIME_OFF}/${exports.Endpoint.POLICIES}/`;
39
- },
40
- timeOffRequests() {
41
- return `/${exports.Endpoint.TIME_OFF}/${exports.Endpoint.REQUESTS}/`;
42
- },
43
- },
44
- };
@@ -1,26 +0,0 @@
1
- import type { APIClient } from '@ffflorian/api-client';
2
- import type { Fields, Employee, WritableFields, EmployeeDirectory } from '../interfaces';
3
- export declare class EmployeesAPI {
4
- private readonly apiClient;
5
- constructor(apiClient: APIClient);
6
- /**
7
- * Update an employee, based on employee id.
8
- * @see https://documentation.bamboohr.com/reference#add-employee-1
9
- */
10
- addEmployee(fields: Pick<Fields, 'firstName' | 'lastName'>): Promise<Employee>;
11
- /**
12
- * Get employee data by specifying a set of fields. This is suitable for getting basic employee information, including current values for fields that are part of a historical table, like job title, or compensation information.
13
- * @see https://documentation.bamboohr.com/reference#get-employee
14
- */
15
- getEmployee(id: number, fields?: Array<keyof Fields>): Promise<Employee>;
16
- /**
17
- * Gets employee directory.
18
- * @see https://documentation.bamboohr.com/reference#get-employees-directory-1
19
- */
20
- getEmployeeDirectory(): Promise<EmployeeDirectory>;
21
- /**
22
- * Update an employee, based on employee id.
23
- * @see https://documentation.bamboohr.com/reference#update-employee
24
- */
25
- updateEmployee(id: number, fields: WritableFields): Promise<Employee>;
26
- }
@@ -1,63 +0,0 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.EmployeesAPI = void 0;
13
- const Endpoints_1 = require("../Endpoints");
14
- class EmployeesAPI {
15
- constructor(apiClient) {
16
- this.apiClient = apiClient;
17
- }
18
- /**
19
- * Update an employee, based on employee id.
20
- * @see https://documentation.bamboohr.com/reference#add-employee-1
21
- */
22
- addEmployee(fields) {
23
- return __awaiter(this, void 0, void 0, function* () {
24
- const endpoint = Endpoints_1.Endpoint.Employees.employees();
25
- const { data } = yield this.apiClient.post(endpoint, fields);
26
- return data;
27
- });
28
- }
29
- /**
30
- * Get employee data by specifying a set of fields. This is suitable for getting basic employee information, including current values for fields that are part of a historical table, like job title, or compensation information.
31
- * @see https://documentation.bamboohr.com/reference#get-employee
32
- */
33
- getEmployee(id, fields) {
34
- return __awaiter(this, void 0, void 0, function* () {
35
- const endpoint = Endpoints_1.Endpoint.Employees.employees(id, fields);
36
- const { data } = yield this.apiClient.get(endpoint);
37
- return data;
38
- });
39
- }
40
- /**
41
- * Gets employee directory.
42
- * @see https://documentation.bamboohr.com/reference#get-employees-directory-1
43
- */
44
- getEmployeeDirectory() {
45
- return __awaiter(this, void 0, void 0, function* () {
46
- const endpoint = Endpoints_1.Endpoint.Employees.employeeDirectory();
47
- const { data } = yield this.apiClient.get(endpoint);
48
- return data;
49
- });
50
- }
51
- /**
52
- * Update an employee, based on employee id.
53
- * @see https://documentation.bamboohr.com/reference#update-employee
54
- */
55
- updateEmployee(id, fields) {
56
- return __awaiter(this, void 0, void 0, function* () {
57
- const endpoint = Endpoints_1.Endpoint.Employees.employees(id);
58
- const { data } = yield this.apiClient.post(endpoint, fields);
59
- return data;
60
- });
61
- }
62
- }
63
- exports.EmployeesAPI = EmployeesAPI;
@@ -1,38 +0,0 @@
1
- import type { APIClient } from '@ffflorian/api-client';
2
- import type { OffEmployee, TimeOffPolicy, TimeOffTypes, TimeOffRequestsOptions, TimeOffRequest } from '../interfaces';
3
- export declare class TimeOffAPI {
4
- private readonly apiClient;
5
- constructor(apiClient: APIClient);
6
- /**
7
- * This endpoint will return a list, sorted by date, of employees who will be out, and company holidays, for a period of time.
8
- * @see https://documentation.bamboohr.com/reference#get-a-list-of-whos-out-1
9
- */
10
- whosOut(start?: string, end?: string): Promise<OffEmployee[]>;
11
- /**
12
- * This endpoint gets a list of time off types.
13
- * @param mode set to 'request' to get a list of all time off types with which this user can create a time off
14
- * request. The default is to return the list of time off types the user has permissions on. This distinction is
15
- * important, as employees can request time off for types that they don't have permission to view balances and
16
- * requests for.
17
- * @see https://documentation.bamboohr.com/reference#get-time-off-types
18
- */
19
- timeOffTypes(mode?: 'request'): Promise<TimeOffTypes>;
20
- /**
21
- * This endpoint gets a list of time off policies.
22
- * @see https://documentation.bamboohr.com/reference#get-time-off-policies
23
- */
24
- timeOffPolicies(): Promise<TimeOffPolicy[]>;
25
- /**
26
- * The response will be limited to those employees and time off types that the owner of the API key used to make the request has view access to.
27
- *
28
- * The start and end date parameters will show time off if any day in the time off request falls within the dates specified, even if part of the time off falls outside of the time specified.
29
- *
30
- * Clients should be ready for any number of "note" elements.
31
- *
32
- * If there are zero notes for a request then the "notes" tag will be still included as an empty array.
33
- *
34
- * Newer time off requests may also include details for each day of the request in a element.
35
- * @see https://documentation.bamboohr.com/reference#time-off-get-time-off-requests-1
36
- */
37
- timeOffRequests(options: TimeOffRequestsOptions): Promise<TimeOffRequest[]>;
38
- }
@@ -1,75 +0,0 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.TimeOffAPI = void 0;
13
- const Endpoints_1 = require("../Endpoints");
14
- class TimeOffAPI {
15
- constructor(apiClient) {
16
- this.apiClient = apiClient;
17
- }
18
- /**
19
- * This endpoint will return a list, sorted by date, of employees who will be out, and company holidays, for a period of time.
20
- * @see https://documentation.bamboohr.com/reference#get-a-list-of-whos-out-1
21
- */
22
- whosOut(start, end) {
23
- return __awaiter(this, void 0, void 0, function* () {
24
- const endpoint = Endpoints_1.Endpoint.TimeOff.whosOut();
25
- const { data } = yield this.apiClient.get(endpoint, { params: { end, start } });
26
- return data;
27
- });
28
- }
29
- /**
30
- * This endpoint gets a list of time off types.
31
- * @param mode set to 'request' to get a list of all time off types with which this user can create a time off
32
- * request. The default is to return the list of time off types the user has permissions on. This distinction is
33
- * important, as employees can request time off for types that they don't have permission to view balances and
34
- * requests for.
35
- * @see https://documentation.bamboohr.com/reference#get-time-off-types
36
- */
37
- timeOffTypes(mode) {
38
- return __awaiter(this, void 0, void 0, function* () {
39
- const endpoint = Endpoints_1.Endpoint.TimeOff.timeOffTypes();
40
- const { data } = yield this.apiClient.get(endpoint, { params: { mode } });
41
- return data;
42
- });
43
- }
44
- /**
45
- * This endpoint gets a list of time off policies.
46
- * @see https://documentation.bamboohr.com/reference#get-time-off-policies
47
- */
48
- timeOffPolicies() {
49
- return __awaiter(this, void 0, void 0, function* () {
50
- const endpoint = Endpoints_1.Endpoint.TimeOff.timeOffPolicies();
51
- const { data } = yield this.apiClient.get(endpoint);
52
- return data;
53
- });
54
- }
55
- /**
56
- * The response will be limited to those employees and time off types that the owner of the API key used to make the request has view access to.
57
- *
58
- * The start and end date parameters will show time off if any day in the time off request falls within the dates specified, even if part of the time off falls outside of the time specified.
59
- *
60
- * Clients should be ready for any number of "note" elements.
61
- *
62
- * If there are zero notes for a request then the "notes" tag will be still included as an empty array.
63
- *
64
- * Newer time off requests may also include details for each day of the request in a element.
65
- * @see https://documentation.bamboohr.com/reference#time-off-get-time-off-requests-1
66
- */
67
- timeOffRequests(options) {
68
- return __awaiter(this, void 0, void 0, function* () {
69
- const endpoint = Endpoints_1.Endpoint.TimeOff.timeOffRequests();
70
- const { data } = yield this.apiClient.get(endpoint, { params: options });
71
- return data;
72
- });
73
- }
74
- }
75
- exports.TimeOffAPI = TimeOffAPI;
@@ -1,2 +0,0 @@
1
- export * from './EmployeesAPI';
2
- export * from './TimeOffAPI';
package/dist/api/index.js DELETED
@@ -1,18 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./EmployeesAPI"), exports);
18
- __exportStar(require("./TimeOffAPI"), exports);
package/dist/index.d.ts DELETED
@@ -1,2 +0,0 @@
1
- export * from './BambooHR';
2
- export * from './interfaces/';
package/dist/index.js DELETED
@@ -1,18 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./BambooHR"), exports);
18
- __exportStar(require("./interfaces/"), exports);
@@ -1,5 +0,0 @@
1
- import type { EmployeesAPI, TimeOffAPI } from '../api/';
2
- export interface API {
3
- employees: EmployeesAPI;
4
- timeOff: TimeOffAPI;
5
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,5 +0,0 @@
1
- export interface ClientOptions {
2
- apiKey: string;
3
- /** The subdomain used to access your account (If you access BambooHR at https://mycompany.bamboohr.com, then the subdomain is "mycompany") */
4
- companyDomain: string;
5
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,4 +0,0 @@
1
- export interface DefaultHour {
2
- amount: string;
3
- name: string;
4
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,27 +0,0 @@
1
- import { Fields } from './Fields';
2
- type PartialNull<T> = {
3
- [P in keyof T]?: T[P] | null;
4
- };
5
- interface BaseEmployee {
6
- firstName: string;
7
- id: string;
8
- lastName: string;
9
- }
10
- export type Employee = BaseEmployee & PartialNull<Fields>;
11
- export interface EmployeeDirectory {
12
- employees: Employee[];
13
- fields: {
14
- id: keyof Fields;
15
- name: string;
16
- type: string;
17
- };
18
- }
19
- export interface OffEmployee {
20
- employeeId: number;
21
- end: string;
22
- id: number;
23
- name: string;
24
- start: string;
25
- type: string;
26
- }
27
- export {};
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,270 +0,0 @@
1
- export type Writeable<T> = {
2
- -readonly [P in keyof T]: T[P];
3
- };
4
- /**
5
- * A complete date with a four-digit year.
6
- *
7
- * Format: yyyy-mm-dd
8
- *
9
- * Example: "2010-03-19"
10
- */
11
- export type DateField = string;
12
- /**
13
- * A standard United States Social Security number, with dashes.
14
- *
15
- * Example: "123-45-6789"
16
- */
17
- export type SSNField = string;
18
- /**
19
- * A plain text string with a phone number, no formatting is enforced.
20
- *
21
- * Example: "1-866-387-9595"
22
- */
23
- export type PhoneField = string;
24
- /**
25
- * The plain text name of the gender.
26
- *
27
- * Example: "Male" or "Female"
28
- */
29
- export type GenderField = string;
30
- /**
31
- * A simple quantity value without thousands separators or currency signs using a period as a decimal point.
32
- * Example: "27000.00"
33
- *
34
- * To add a currency code that is different from the company default, specify the code using the currency tag.
35
- *
36
- * Example: `“payRate”: { “value”: “27000.00”, “currency”: “EUR”}`
37
- */
38
- export type CurrencyField = string | {
39
- currency: string;
40
- value: string;
41
- };
42
- /**
43
- * "yes" or "checkbox" will mark the checkbox checked and everything else will default to unchecked
44
- *
45
- * Example: "yes", "checkbox", "no"
46
- */
47
- export type CheckboxField = 'yes' | 'checkbox' | 'no';
48
- /**
49
- * The name of the country. Must exist in the BambooHR country list.
50
- *
51
- * Example: "Australia", "United States", etc.
52
- */
53
- export type CountryField = string;
54
- /**
55
- * The full name of the state/province.
56
- *
57
- * Example: "Florida"
58
- */
59
- export type StateField = string;
60
- /**
61
- * Plain text status of marriage.
62
- *
63
- * Example: "Single" or "Married"
64
- */
65
- export type MaritalStatusField = string;
66
- /**
67
- * The employee's employment status as used to filter employees in BambooHR.
68
- *
69
- * Example: "Active" or "Inactive"
70
- */
71
- export type StatusField = 'Active' | 'Inactive';
72
- /**
73
- * One of several predefined options for the unit of pay.
74
- *
75
- * Example: "Hourly", "Salary", "Commission", "Exception Hourly", "Monthly", "Piece Rate", "Contract" or "Daily"
76
- */
77
- export type PayTypeField = string;
78
- /**
79
- * A reference to another employee expressed as preferred name-space-last name.
80
- *
81
- * Example: "Robert Smith"
82
- */
83
- export type EmployeeField = string;
84
- /**
85
- * The UTC time that an event occurred.
86
- *
87
- * Format: ####-##-##T##:##:##+##:##
88
- *
89
- * Example: "2012-10-17T20:27:17+00:00"
90
- */
91
- export type TimestampField = string;
92
- /**
93
- * A larger section of text that can include line feed characters.
94
- */
95
- export type TextareaField = string;
96
- /**
97
- * The exact text for an option from a list.
98
- *
99
- * Example: "Marketing"
100
- */
101
- export type ListField = string;
102
- /**
103
- * An email address.
104
- *
105
- * Example: "support@bamboohr.com"
106
- */
107
- export type EmailField = string;
108
- export interface Fields {
109
- /** @deprecated please use ‘acaStatusCategory’ */
110
- acaStatus: string;
111
- /** The employee's ACA (Affordable Care Act) status. This field can not be updated directly but is calculated based on mappings for employment statuses found on the employmentStatus table. Options are: contractor, full-time, intern-eligible, intern-ineligible, part-time-eligible, part-time-ineligible, and seasonal. */
112
- acaStatusCategory: string;
113
- /** The employee's first address line. */
114
- address1: string;
115
- /** The employee's second address line. */
116
- address2: string;
117
- /** The employee's age. To change age, update dateOfBirth field. */
118
- age: number;
119
- /** The employee's work email if set, otherwise their home email. */
120
- bestEmail: EmailField;
121
- /** The employee's month and day of birth. To change birthday, update dateOfBirth field. */
122
- birthday: string;
123
- /** The amount of the most recent bonus. */
124
- bonusAmount: CurrencyField;
125
- /** Comment about the most recent bonus. */
126
- bonusComment: string;
127
- /** The date of the last bonus. */
128
- bonusDate: DateField;
129
- /** The reason for the most recent bonus. */
130
- bonusReason: ListField;
131
- /** The employee's city. */
132
- city: string;
133
- /** This field name contains a typo, and exists for backwards compatibility. */
134
- commisionDate: DateField;
135
- /** The amount of the most recent commission. */
136
- commissionAmount: CurrencyField;
137
- /** Comment about the most recent commission. */
138
- commissionComment: string;
139
- /** The date of the last commission. */
140
- commissionDate: DateField;
141
- /** The employee's country. */
142
- country: CountryField;
143
- /** The id of the user who created the employee. Read only. May be null if employee was created before the release of this field. */
144
- readonly createdByUserId: number;
145
- /** The date the employee was born. */
146
- dateOfBirth: DateField;
147
- /** The employee's **current* department. */
148
- department: ListField;
149
- /** The employee's name displayed in a format configured by the user. Read only. */
150
- readonly displayName: string;
151
- /** The employee's **current* division. */
152
- division: ListField;
153
- /** The employee's EEO job category. These are defined by the U.S. Equal Employment Opportunity Commission. */
154
- eeo: ListField;
155
- /** Employee number (assigned by your company). */
156
- employeeNumber: string;
157
- /** The employee's **current* employment status. Options are customized by account. Read-only starting with version 1.1; update using the `employmentStatus` table. */
158
- readonly employmentHistoryStatus: ListField;
159
- /** The employee's ethnicity. */
160
- ethnicity: ListField;
161
- /** The FLSA Overtime Status (Exempt or Non-exempt). */
162
- exempt: ListField;
163
- /** The employee's first name. */
164
- firstName: string;
165
- /** Deprecated please use 'exempt' */
166
- flsaCode: ListField;
167
- /** The employee's first and last name. (e.g., John Doe). Read only. */
168
- readonly fullName1: string;
169
- /** The employee's last and first name. (e.g., Doe, John). Read only. */
170
- readonly fullName2: string;
171
- /** The employee's full name and their preferred name. (e.g., Doe, John Quentin (JDog)). Read only. */
172
- readonly fullName3: string;
173
- /** The employee's full name without their preferred name, last name first. (e.g., Doe, John Quentin). Read only. */
174
- readonly fullName4: string;
175
- /** The employee's full name without their preferred name, first name first. (e.g., John Quentin Doe). Read only. */
176
- readonly fullName5: string;
177
- /** The employee's gender (Male or Female). */
178
- gender: GenderField;
179
- /** The date the employee was hired. */
180
- hireDate: DateField;
181
- /** The employee's home email address. */
182
- homeEmail: EmailField;
183
- /** The employee's home phone number. */
184
- homePhone: PhoneField;
185
- /** The employee ID automatically assigned by BambooHR. Read only. */
186
- readonly id: number;
187
- /** Should employee be included in payroll (Yes or No) */
188
- includeInPayroll: boolean;
189
- /** Whether a photo has been uploaded for the employee. Read only. */
190
- readonly isPhotoUploaded: boolean;
191
- /** The **current** value of the employee's job title, updating this field will create a new row in position history. */
192
- jobTitle: ListField;
193
- /** The date and time that the employee record was last changed. */
194
- lastChanged: TimestampField;
195
- /** The employee's last name. */
196
- lastName: string;
197
- /** The employee's **current** location. */
198
- location: ListField;
199
- /** The employee's marital status (Single, Married, or Domestic Partnership). */
200
- maritalStatus: ListField;
201
- /** The employee's middle name. */
202
- middleName: string;
203
- /** The employee's mobile phone number. */
204
- mobilePhone: PhoneField;
205
- /** The employee's National ID number */
206
- nationalId: string;
207
- /** The employee's nationality */
208
- nationality: ListField;
209
- /** The employee's NIN number */
210
- nin: string;
211
- /** The date the employee was originally hired. Available starting with version 1.1. */
212
- originalHireDate: DateField;
213
- /** The employee's **current** pay per. ie: "Hour", "Day", "Week", "Month", "Quarter", "Year". */
214
- paidPer: string;
215
- /** The reason for the employee's last pay rate change. */
216
- payChangeReason: ListField;
217
- /** The employee's **current** pay frequency. ie: "Weekly", "Every other week", "Twice a month", "Monthly", "Quarterly", "Twice a year", or "Yearly" */
218
- payFrequency: ListField;
219
- /** The custom pay group that the employee belongs to. */
220
- payGroup: ListField;
221
- /** The ID value corresponding to the pay group that an employee belongs to. */
222
- payGroupId: number;
223
- /** The employee's **current** pay rate (e.g., $8.25). */
224
- payRate: CurrencyField;
225
- /** The day the most recent change was made. */
226
- payRateEffectiveDate: DateField;
227
- /** The employee's **current** pay schedule. */
228
- paySchedule: ListField;
229
- /** The ID value corresponding to the pay schedule that an employee belongs to. */
230
- payScheduleId: number;
231
- /** The employee's **current** pay type. ie: "hourly","salary","commission","exception hourly","monthly","weekly","piece rate","contract","daily","pro rata". */
232
- payType: PayTypeField;
233
- /** The employee's preferred name. */
234
- preferredName: string;
235
- /** The employee's Canadian Social Insurance Number. */
236
- sin: string;
237
- /** The employee's Social Security number. */
238
- ssn: SSNField;
239
- /** The number of hours the employee works in a standard week. */
240
- standardHoursPerWeek: number;
241
- /** The employee's state/province. */
242
- state: StateField;
243
- /** The 2 character abbreviation for the employee's state (US only). Read only. */
244
- readonly stateCode: string;
245
- /** The employee's employee status (Active or Inactive). */
246
- status: StatusField;
247
- /** The employee’s **current** supervisor. Read only. */
248
- readonly supervisor: EmployeeField;
249
- /** The ID of the employee's **current** supervisor. Read only. */
250
- readonly supervisorEId: number;
251
- /** The email of the employee's **current** supervisor. Read only. */
252
- readonly supervisorEmail: string;
253
- /** The 'employeeNumber' of the employee's **current** supervisor. Read only. */
254
- readonly supervisorId: number;
255
- /** The date the employee was terminated. Read-only starting with version 1.1; update using the employmentStatus table. */
256
- readonly terminationDate: DateField;
257
- /** Should time tracking be enabled for the employee (Yes or No) */
258
- timeTrackingEnabled: boolean;
259
- /** The employee's work email address. */
260
- workEmail: EmailField;
261
- /** The employee's work phone number, without extension. */
262
- workPhone: PhoneField;
263
- /** The employee's work phone extension (if any). */
264
- workPhoneExtension: string;
265
- /** The employee's work phone and extension. Read only */
266
- readonly workPhonePlusExtension: string;
267
- /** The employee's ZIP code. */
268
- zipcode: string;
269
- }
270
- export type WritableFields = Partial<Writeable<Fields>>;
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,7 +0,0 @@
1
- export interface TimeOffPolicy {
2
- effectiveDate: string;
3
- id: number;
4
- name: string;
5
- timeOffTypeId: number;
6
- type: string;
7
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,33 +0,0 @@
1
- import { TimeOffType } from './TimeOffType';
2
- interface TimeOffRequestActions {
3
- approve: boolean;
4
- bypass: boolean;
5
- cancel: boolean;
6
- deny: boolean;
7
- edit: boolean;
8
- view: boolean;
9
- }
10
- interface TimeOffRequestAmount {
11
- amount: string;
12
- unit: string;
13
- }
14
- interface TimeOffRequestStatus {
15
- lastChanged: string;
16
- lastChangedByUserId: string;
17
- status: string;
18
- }
19
- export interface TimeOffRequest {
20
- actions: TimeOffRequestActions;
21
- amount: TimeOffRequestAmount;
22
- created: string;
23
- dates: Record<string, string>;
24
- employeeId: string;
25
- end: string;
26
- id: string;
27
- name: string;
28
- notes: [];
29
- start: string;
30
- status: TimeOffRequestStatus;
31
- type: TimeOffType;
32
- }
33
- export {};
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,16 +0,0 @@
1
- export interface TimeOffRequestsOptions {
2
- /** Limit to requests that the user has a particular level of access to. Legal values are: "view" or "approve". Defaults to view. */
3
- action?: string;
4
- /** A particular employee ID to limit the response to. */
5
- employeeId?: string;
6
- /** YYYY-MM-DD. Only show time off that occurs on/before the specified end date. */
7
- end: string;
8
- /** A particular request ID to limit the response to. */
9
- id?: number;
10
- /** YYYY-MM-DD. Only show time off that occurs on/after the specified start date. */
11
- start: string;
12
- /** A comma separated list of request status values to include. If omitted, requests of all status values are included. Legal values are "approved", "denied", "superceded", "requested", "canceled". */
13
- status?: string;
14
- /** A comma separated list of time off types IDs to include limit the response to. If omitted, requests of all types are included. */
15
- type?: string;
16
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,7 +0,0 @@
1
- export interface TimeOffType {
2
- color: string | null;
3
- icon: string;
4
- id: string;
5
- name: string;
6
- units: string;
7
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,5 +0,0 @@
1
- import { DefaultHour, TimeOffType } from './';
2
- export interface TimeOffTypes {
3
- defaultHours: DefaultHour[];
4
- timeOffTypes: TimeOffType[];
5
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,10 +0,0 @@
1
- export * from './API';
2
- export * from './ClientOptions';
3
- export * from './DefaultHour';
4
- export * from './Employee';
5
- export * from './Fields';
6
- export * from './TimeOffPolicy';
7
- export * from './TimeOffRequest';
8
- export * from './TimeOffRequestsOptions';
9
- export * from './TimeOffType';
10
- export * from './TimeOffTypes';
@@ -1,26 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./API"), exports);
18
- __exportStar(require("./ClientOptions"), exports);
19
- __exportStar(require("./DefaultHour"), exports);
20
- __exportStar(require("./Employee"), exports);
21
- __exportStar(require("./Fields"), exports);
22
- __exportStar(require("./TimeOffPolicy"), exports);
23
- __exportStar(require("./TimeOffRequest"), exports);
24
- __exportStar(require("./TimeOffRequestsOptions"), exports);
25
- __exportStar(require("./TimeOffType"), exports);
26
- __exportStar(require("./TimeOffTypes"), exports);