rotacloud 1.0.37 → 1.0.39
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/cjs/interfaces/query-params/users-query-params.interface.d.ts +8 -0
- package/dist/cjs/interfaces/sdk-config.interface.d.ts +1 -0
- package/dist/cjs/services/service.js +8 -0
- package/dist/cjs/version.js +1 -1
- package/dist/mjs/interfaces/query-params/users-query-params.interface.d.ts +8 -0
- package/dist/mjs/interfaces/sdk-config.interface.d.ts +1 -0
- package/dist/mjs/services/service.js +8 -0
- package/dist/mjs/version.js +1 -1
- package/package.json +1 -1
- package/src/interfaces/query-params/users-query-params.interface.ts +8 -0
- package/src/interfaces/sdk-config.interface.ts +1 -0
- package/src/services/service.ts +10 -0
- package/src/version.ts +1 -1
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
export interface UsersQueryParams {
|
|
2
2
|
ids?: number[];
|
|
3
3
|
locations?: number[];
|
|
4
|
+
/**
|
|
5
|
+
* Works different from {UserQueryParams.locations},
|
|
6
|
+
* When filtering out employees for rota, this is more suggested,
|
|
7
|
+
* one scenario would be filtering out employees base on their starting and
|
|
8
|
+
* final working date, using {UserQueryParams.locations} will not work in tandem
|
|
9
|
+
* of {UserQueryParams.start_date} and {UserQueryParams.end_date}
|
|
10
|
+
*/
|
|
11
|
+
location?: number;
|
|
4
12
|
roles?: number[];
|
|
5
13
|
only_managed?: boolean;
|
|
6
14
|
include_self?: boolean;
|
|
@@ -85,6 +85,14 @@ class Service {
|
|
|
85
85
|
Authorization: `Bearer ${rotacloud_js_1.RotaCloud.config.apiKey}`,
|
|
86
86
|
'SDK-Version': version_js_1.Version.version,
|
|
87
87
|
};
|
|
88
|
+
const extraHeaders = rotacloud_js_1.RotaCloud.config.headers;
|
|
89
|
+
if (extraHeaders && typeof extraHeaders === 'object') {
|
|
90
|
+
for (const [key, val] of Object.entries(extraHeaders)) {
|
|
91
|
+
if (typeof key === 'string' && typeof val === 'string') {
|
|
92
|
+
headers[key] = val;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
88
96
|
if (rotacloud_js_1.RotaCloud.config.accountId) {
|
|
89
97
|
headers.Account = String(rotacloud_js_1.RotaCloud.config.accountId);
|
|
90
98
|
}
|
package/dist/cjs/version.js
CHANGED
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
export interface UsersQueryParams {
|
|
2
2
|
ids?: number[];
|
|
3
3
|
locations?: number[];
|
|
4
|
+
/**
|
|
5
|
+
* Works different from {UserQueryParams.locations},
|
|
6
|
+
* When filtering out employees for rota, this is more suggested,
|
|
7
|
+
* one scenario would be filtering out employees base on their starting and
|
|
8
|
+
* final working date, using {UserQueryParams.locations} will not work in tandem
|
|
9
|
+
* of {UserQueryParams.start_date} and {UserQueryParams.end_date}
|
|
10
|
+
*/
|
|
11
|
+
location?: number;
|
|
4
12
|
roles?: number[];
|
|
5
13
|
only_managed?: boolean;
|
|
6
14
|
include_self?: boolean;
|
|
@@ -54,6 +54,14 @@ export class Service {
|
|
|
54
54
|
Authorization: `Bearer ${RotaCloud.config.apiKey}`,
|
|
55
55
|
'SDK-Version': Version.version,
|
|
56
56
|
};
|
|
57
|
+
const extraHeaders = RotaCloud.config.headers;
|
|
58
|
+
if (extraHeaders && typeof extraHeaders === 'object') {
|
|
59
|
+
for (const [key, val] of Object.entries(extraHeaders)) {
|
|
60
|
+
if (typeof key === 'string' && typeof val === 'string') {
|
|
61
|
+
headers[key] = val;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
57
65
|
if (RotaCloud.config.accountId) {
|
|
58
66
|
headers.Account = String(RotaCloud.config.accountId);
|
|
59
67
|
}
|
package/dist/mjs/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const Version = { version: '1.0.
|
|
1
|
+
export const Version = { version: '1.0.39' };
|
package/package.json
CHANGED
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
export interface UsersQueryParams {
|
|
2
2
|
ids?: number[];
|
|
3
3
|
locations?: number[];
|
|
4
|
+
/**
|
|
5
|
+
* Works different from {UserQueryParams.locations},
|
|
6
|
+
* When filtering out employees for rota, this is more suggested,
|
|
7
|
+
* one scenario would be filtering out employees base on their starting and
|
|
8
|
+
* final working date, using {UserQueryParams.locations} will not work in tandem
|
|
9
|
+
* of {UserQueryParams.start_date} and {UserQueryParams.end_date}
|
|
10
|
+
*/
|
|
11
|
+
location?: number;
|
|
4
12
|
roles?: number[];
|
|
5
13
|
only_managed?: boolean;
|
|
6
14
|
include_self?: boolean;
|
package/src/services/service.ts
CHANGED
|
@@ -93,6 +93,16 @@ export abstract class Service<ApiResponse = any> {
|
|
|
93
93
|
Authorization: `Bearer ${RotaCloud.config.apiKey}`,
|
|
94
94
|
'SDK-Version': Version.version,
|
|
95
95
|
};
|
|
96
|
+
|
|
97
|
+
const extraHeaders = RotaCloud.config.headers;
|
|
98
|
+
if (extraHeaders && typeof extraHeaders === 'object') {
|
|
99
|
+
for (const [key, val] of Object.entries(extraHeaders)) {
|
|
100
|
+
if (typeof key === 'string' && typeof val === 'string') {
|
|
101
|
+
headers[key] = val;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
96
106
|
if (RotaCloud.config.accountId) {
|
|
97
107
|
headers.Account = String(RotaCloud.config.accountId);
|
|
98
108
|
} else {
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const Version = { version: '1.0.
|
|
1
|
+
export const Version = { version: '1.0.39' };
|