gizmovsky 1.0.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/.gitattributes +2 -0
- package/README.md +50 -0
- package/docs v1.json +29969 -0
- package/docs v2.json +38054 -0
- package/docs v3.json +90422 -0
- package/package.json +36 -0
- package/src/GizmoClient.js +32 -0
- package/src/index.js +118 -0
- package/src/v1/Apps.js +38 -0
- package/src/v1/Attributes.js +19 -0
- package/src/v1/Export.js +10 -0
- package/src/v1/HostComputers.js +40 -0
- package/src/v1/HostGroups.js +16 -0
- package/src/v1/Hosts.js +49 -0
- package/src/v1/Invoices.js +19 -0
- package/src/v1/Licenses.js +10 -0
- package/src/v1/MonetaryUnit.js +19 -0
- package/src/v1/Points.js +22 -0
- package/src/v1/Products.js +22 -0
- package/src/v1/Registration.js +16 -0
- package/src/v1/Reports.js +172 -0
- package/src/v1/Reservations.js +34 -0
- package/src/v1/Service.js +34 -0
- package/src/v1/Stats.js +28 -0
- package/src/v1/Stock.js +22 -0
- package/src/v1/UserGroups.js +28 -0
- package/src/v1/UserSessions.js +16 -0
- package/src/v1/Users.js +196 -0
- package/src/v1/Verifications.js +25 -0
- package/src/v2/ApplicationCategories.js +22 -0
- package/src/v2/ApplicationDeployments.js +22 -0
- package/src/v2/ApplicationEnterprises.js +22 -0
- package/src/v2/ApplicationExecutables.js +100 -0
- package/src/v2/ApplicationGroups.js +33 -0
- package/src/v2/ApplicationPersonalFiles.js +22 -0
- package/src/v2/ApplicationTasks.js +22 -0
- package/src/v2/AssetTypes.js +22 -0
- package/src/v2/Assets.js +22 -0
- package/src/v2/Attributes.js +22 -0
- package/src/v2/BillingProfiles.js +22 -0
- package/src/v2/Devices.js +22 -0
- package/src/v2/HostGroups.js +22 -0
- package/src/v2/Hosts.js +22 -0
- package/src/v2/Invoices.js +13 -0
- package/src/v2/MonetaryUnits.js +22 -0
- package/src/v2/Operators.js +22 -0
- package/src/v2/Orders.js +53 -0
- package/src/v2/PaymentMethods.js +22 -0
- package/src/v2/ProductGroups.js +33 -0
- package/src/v2/Products.js +118 -0
- package/src/v2/Reservations.js +22 -0
- package/src/v2/Service.js +13 -0
- package/src/v2/UserGroups.js +36 -0
- package/src/v2/Users.js +80 -0
- package/src/v2/Variables.js +22 -0
- package/src/v2/Verifications.js +27 -0
- package/src/v3/Agerestrictions.js +53 -0
- package/src/v3/Apikeys.js +22 -0
- package/src/v3/Applicationcategories.js +13 -0
- package/src/v3/Applicationdeployments.js +19 -0
- package/src/v3/Applicationenterprises.js +13 -0
- package/src/v3/Applicationexecutables.js +31 -0
- package/src/v3/Applicationgroups.js +16 -0
- package/src/v3/Applicationlicenses.js +13 -0
- package/src/v3/Applicationlinks.js +13 -0
- package/src/v3/Applicationpersonalfiles.js +19 -0
- package/src/v3/Applicationstats.js +13 -0
- package/src/v3/Applicationtasks.js +19 -0
- package/src/v3/Apps.js +45 -0
- package/src/v3/Assets.js +43 -0
- package/src/v3/AssetsTransactions.js +33 -0
- package/src/v3/Assettypes.js +33 -0
- package/src/v3/Assistancerequests.js +44 -0
- package/src/v3/Attributes.js +26 -0
- package/src/v3/Billingprofiles.js +16 -0
- package/src/v3/Branches.js +16 -0
- package/src/v3/BranchesName.js +35 -0
- package/src/v3/DepositTransactions.js +35 -0
- package/src/v3/Devices.js +53 -0
- package/src/v3/Discountgroups.js +13 -0
- package/src/v3/Discounts.js +55 -0
- package/src/v3/Documents.js +22 -0
- package/src/v3/Documenttypes.js +16 -0
- package/src/v3/Events.js +16 -0
- package/src/v3/Feeds.js +35 -0
- package/src/v3/FeedsBranches.js +24 -0
- package/src/v3/Files.js +22 -0
- package/src/v3/HostGroups.js +36 -0
- package/src/v3/Hostcomputers.js +52 -0
- package/src/v3/Hosticons.js +13 -0
- package/src/v3/Hostlayoutgroups.js +16 -0
- package/src/v3/Hosts.js +36 -0
- package/src/v3/Inventories.js +25 -0
- package/src/v3/Inventoryadjustmentreasons.js +19 -0
- package/src/v3/Invoicepayments.js +33 -0
- package/src/v3/Invoices.js +35 -0
- package/src/v3/InvoicesUser.js +13 -0
- package/src/v3/Logs.js +19 -0
- package/src/v3/Mappings.js +25 -0
- package/src/v3/MonetaryUnits.js +26 -0
- package/src/v3/MonetaryunitsName.js +10 -0
- package/src/v3/News.js +16 -0
- package/src/v3/Notifications.js +25 -0
- package/src/v3/Operators.js +41 -0
- package/src/v3/OperatorsCurrent.js +50 -0
- package/src/v3/Paymentmethods.js +16 -0
- package/src/v3/Paymentproviders.js +16 -0
- package/src/v3/PaymentsTransactions.js +10 -0
- package/src/v3/Pluginlibrary.js +10 -0
- package/src/v3/Pointstransactions.js +13 -0
- package/src/v3/Presetreservationtime.js +13 -0
- package/src/v3/Presettimesale.js +13 -0
- package/src/v3/Presettimesalemoney.js +13 -0
- package/src/v3/Presettopup.js +13 -0
- package/src/v3/Productgroups.js +16 -0
- package/src/v3/Productorders.js +131 -0
- package/src/v3/Products.js +64 -0
- package/src/v3/ProductsBundle.js +46 -0
- package/src/v3/ProductsGroups.js +27 -0
- package/src/v3/ProductsTime.js +34 -0
- package/src/v3/Productstock.js +87 -0
- package/src/v3/Publicoptions.js +32 -0
- package/src/v3/Recoveries.js +16 -0
- package/src/v3/Registers.js +74 -0
- package/src/v3/Registertransactions.js +33 -0
- package/src/v3/Remotecontrol.js +24 -0
- package/src/v3/Reportmodules.js +34 -0
- package/src/v3/Reportpresets.js +65 -0
- package/src/v3/ReportpresetsName.js +23 -0
- package/src/v3/Reports.js +191 -0
- package/src/v3/ReportsProduct.js +22 -0
- package/src/v3/ReportsProducts.js +23 -0
- package/src/v3/ReportsTopusers.js +22 -0
- package/src/v3/ReportsUser.js +22 -0
- package/src/v3/Reservations.js +55 -0
- package/src/v3/Schedules.js +88 -0
- package/src/v3/Securityprofiles.js +52 -0
- package/src/v3/Sessions.js +17 -0
- package/src/v3/Shifts.js +62 -0
- package/src/v3/Skins.js +17 -0
- package/src/v3/Stock.js +35 -0
- package/src/v3/Tasks.js +26 -0
- package/src/v3/UserGroups.js +36 -0
package/src/v2/Assets.js
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { GizmoClient } from '../GizmoClient.js';
|
|
2
|
+
|
|
3
|
+
export class Assets {
|
|
4
|
+
constructor(client) {
|
|
5
|
+
this.client = client;
|
|
6
|
+
}
|
|
7
|
+
getAll(params = {}) {
|
|
8
|
+
return this.client.request('get', '/v2.0/assets', {}, params);
|
|
9
|
+
}
|
|
10
|
+
getById(id) {
|
|
11
|
+
return this.client.request('get', `/v2.0/assets/${id}`);
|
|
12
|
+
}
|
|
13
|
+
create(data) {
|
|
14
|
+
return this.client.request('post', '/v2.0/assets', data);
|
|
15
|
+
}
|
|
16
|
+
update(data) {
|
|
17
|
+
return this.client.request('put', '/v2.0/assets', data);
|
|
18
|
+
}
|
|
19
|
+
delete(id) {
|
|
20
|
+
return this.client.request('delete', `/v2.0/assets/${id}`);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { GizmoClient } from '../GizmoClient.js';
|
|
2
|
+
|
|
3
|
+
export class Attributes {
|
|
4
|
+
constructor(client) {
|
|
5
|
+
this.client = client;
|
|
6
|
+
}
|
|
7
|
+
getAll(params = {}) {
|
|
8
|
+
return this.client.request('get', '/v2.0/attributes', {}, params);
|
|
9
|
+
}
|
|
10
|
+
getById(id) {
|
|
11
|
+
return this.client.request('get', `/v2.0/attributes/${id}`);
|
|
12
|
+
}
|
|
13
|
+
create(data) {
|
|
14
|
+
return this.client.request('post', '/v2.0/attributes', data);
|
|
15
|
+
}
|
|
16
|
+
update(data) {
|
|
17
|
+
return this.client.request('put', '/v2.0/attributes', data);
|
|
18
|
+
}
|
|
19
|
+
delete(id) {
|
|
20
|
+
return this.client.request('delete', `/v2.0/attributes/${id}`);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { GizmoClient } from '../GizmoClient.js';
|
|
2
|
+
|
|
3
|
+
export class BillingProfiles {
|
|
4
|
+
constructor(client) {
|
|
5
|
+
this.client = client;
|
|
6
|
+
}
|
|
7
|
+
getAll(params = {}) {
|
|
8
|
+
return this.client.request('get', '/v2.0/billingprofiles', {}, params);
|
|
9
|
+
}
|
|
10
|
+
getById(id) {
|
|
11
|
+
return this.client.request('get', `/v2.0/billingprofiles/${id}`);
|
|
12
|
+
}
|
|
13
|
+
create(data) {
|
|
14
|
+
return this.client.request('post', '/v2.0/billingprofiles', data);
|
|
15
|
+
}
|
|
16
|
+
update(data) {
|
|
17
|
+
return this.client.request('put', '/v2.0/billingprofiles', data);
|
|
18
|
+
}
|
|
19
|
+
delete(id) {
|
|
20
|
+
return this.client.request('delete', `/v2.0/billingprofiles/${id}`);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { GizmoClient } from '../GizmoClient.js';
|
|
2
|
+
|
|
3
|
+
export class Devices {
|
|
4
|
+
constructor(client) {
|
|
5
|
+
this.client = client;
|
|
6
|
+
}
|
|
7
|
+
getAll(params = {}) {
|
|
8
|
+
return this.client.request('get', '/v2.0/devices', {}, params);
|
|
9
|
+
}
|
|
10
|
+
getById(id) {
|
|
11
|
+
return this.client.request('get', `/v2.0/devices/${id}`);
|
|
12
|
+
}
|
|
13
|
+
create(data) {
|
|
14
|
+
return this.client.request('post', '/v2.0/devices', data);
|
|
15
|
+
}
|
|
16
|
+
update(data) {
|
|
17
|
+
return this.client.request('put', '/v2.0/devices', data);
|
|
18
|
+
}
|
|
19
|
+
delete(id) {
|
|
20
|
+
return this.client.request('delete', `/v2.0/devices/${id}`);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { GizmoClient } from '../GizmoClient.js';
|
|
2
|
+
|
|
3
|
+
export class HostGroups {
|
|
4
|
+
constructor(client) {
|
|
5
|
+
this.client = client;
|
|
6
|
+
}
|
|
7
|
+
getAll(params = {}) {
|
|
8
|
+
return this.client.request('get', '/v2.0/hostgroups', {}, params);
|
|
9
|
+
}
|
|
10
|
+
getById(id) {
|
|
11
|
+
return this.client.request('get', `/v2.0/hostgroups/${id}`);
|
|
12
|
+
}
|
|
13
|
+
create(data) {
|
|
14
|
+
return this.client.request('post', '/v2.0/hostgroups', data);
|
|
15
|
+
}
|
|
16
|
+
update(data) {
|
|
17
|
+
return this.client.request('put', '/v2.0/hostgroups', data);
|
|
18
|
+
}
|
|
19
|
+
delete(id) {
|
|
20
|
+
return this.client.request('delete', `/v2.0/hostgroups/${id}`);
|
|
21
|
+
}
|
|
22
|
+
}
|
package/src/v2/Hosts.js
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { GizmoClient } from '../GizmoClient.js';
|
|
2
|
+
|
|
3
|
+
export class Hosts {
|
|
4
|
+
constructor(client) {
|
|
5
|
+
this.client = client;
|
|
6
|
+
}
|
|
7
|
+
getAll(params = {}) {
|
|
8
|
+
return this.client.request('get', '/v2.0/hosts', {}, params);
|
|
9
|
+
}
|
|
10
|
+
getById(id) {
|
|
11
|
+
return this.client.request('get', `/v2.0/hosts/${id}`);
|
|
12
|
+
}
|
|
13
|
+
create(data) {
|
|
14
|
+
return this.client.request('post', '/v2.0/hosts', data);
|
|
15
|
+
}
|
|
16
|
+
update(data) {
|
|
17
|
+
return this.client.request('put', '/v2.0/hosts', data);
|
|
18
|
+
}
|
|
19
|
+
delete(id) {
|
|
20
|
+
return this.client.request('delete', `/v2.0/hosts/${id}`);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { GizmoClient } from '../GizmoClient.js';
|
|
2
|
+
|
|
3
|
+
export class Invoices {
|
|
4
|
+
constructor(client) {
|
|
5
|
+
this.client = client;
|
|
6
|
+
}
|
|
7
|
+
getAll(params = {}) {
|
|
8
|
+
return this.client.request('get', '/v2.0/invoices', {}, params);
|
|
9
|
+
}
|
|
10
|
+
getById(id) {
|
|
11
|
+
return this.client.request('get', `/v2.0/invoices/${id}`);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { GizmoClient } from '../GizmoClient.js';
|
|
2
|
+
|
|
3
|
+
export class MonetaryUnits {
|
|
4
|
+
constructor(client) {
|
|
5
|
+
this.client = client;
|
|
6
|
+
}
|
|
7
|
+
getAll(params = {}) {
|
|
8
|
+
return this.client.request('get', '/v2.0/monetaryunits', {}, params);
|
|
9
|
+
}
|
|
10
|
+
getById(id) {
|
|
11
|
+
return this.client.request('get', `/v2.0/monetaryunits/${id}`);
|
|
12
|
+
}
|
|
13
|
+
create(data) {
|
|
14
|
+
return this.client.request('post', '/v2.0/monetaryunits', data);
|
|
15
|
+
}
|
|
16
|
+
update(data) {
|
|
17
|
+
return this.client.request('put', '/v2.0/monetaryunits', data);
|
|
18
|
+
}
|
|
19
|
+
delete(id) {
|
|
20
|
+
return this.client.request('delete', `/v2.0/monetaryunits/${id}`);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { GizmoClient } from '../GizmoClient.js';
|
|
2
|
+
|
|
3
|
+
export class Operators {
|
|
4
|
+
constructor(client) {
|
|
5
|
+
this.client = client;
|
|
6
|
+
}
|
|
7
|
+
getAll(params = {}) {
|
|
8
|
+
return this.client.request('get', '/v2.0/operators', {}, params);
|
|
9
|
+
}
|
|
10
|
+
getById(id) {
|
|
11
|
+
return this.client.request('get', `/v2.0/operators/${id}`);
|
|
12
|
+
}
|
|
13
|
+
create(data) {
|
|
14
|
+
return this.client.request('post', '/v2.0/operators', data);
|
|
15
|
+
}
|
|
16
|
+
update(data) {
|
|
17
|
+
return this.client.request('put', '/v2.0/operators', data);
|
|
18
|
+
}
|
|
19
|
+
delete(id) {
|
|
20
|
+
return this.client.request('delete', `/v2.0/operators/${id}`);
|
|
21
|
+
}
|
|
22
|
+
}
|
package/src/v2/Orders.js
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { GizmoClient } from '../GizmoClient.js';
|
|
2
|
+
|
|
3
|
+
export class Orders {
|
|
4
|
+
constructor(client) {
|
|
5
|
+
this.client = client;
|
|
6
|
+
}
|
|
7
|
+
getAll(params = {}) {
|
|
8
|
+
return this.client.request('get', '/v2.0/orders', {}, params);
|
|
9
|
+
}
|
|
10
|
+
getById(id) {
|
|
11
|
+
return this.client.request('get', `/v2.0/orders/${id}`);
|
|
12
|
+
}
|
|
13
|
+
create(data) {
|
|
14
|
+
return this.client.request('post', '/v2.0/orders', data);
|
|
15
|
+
}
|
|
16
|
+
update(data) {
|
|
17
|
+
return this.client.request('put', '/v2.0/orders', data);
|
|
18
|
+
}
|
|
19
|
+
delete(id) {
|
|
20
|
+
return this.client.request('delete', `/v2.0/orders/${id}`);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
// Invoice
|
|
24
|
+
createInvoice(id, data) {
|
|
25
|
+
return this.client.request('post', `/v2.0/orders/${id}/invoice`, data);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
// Complete
|
|
29
|
+
complete(id, data) {
|
|
30
|
+
return this.client.request('put', `/v2.0/orders/${id}/complete`, data);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
// Cancel
|
|
34
|
+
cancel(id, data) {
|
|
35
|
+
return this.client.request('put', `/v2.0/orders/${id}/cancel`, data);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// Delivered
|
|
39
|
+
getDelivered(id) {
|
|
40
|
+
return this.client.request('get', `/v2.0/orders/${id}/delivered`);
|
|
41
|
+
}
|
|
42
|
+
setDelivered(id, data) {
|
|
43
|
+
return this.client.request('put', `/v2.0/orders/${id}/delivered`, data);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
// OrderLines Delivered
|
|
47
|
+
getOrderLineDelivered(id, orderLineId) {
|
|
48
|
+
return this.client.request('get', `/v2.0/orders/${id}/orderlines/${orderLineId}/delivered`);
|
|
49
|
+
}
|
|
50
|
+
setOrderLineDelivered(id, orderLineId, data) {
|
|
51
|
+
return this.client.request('put', `/v2.0/orders/${id}/orderlines/${orderLineId}/delivered`, data);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { GizmoClient } from '../GizmoClient.js';
|
|
2
|
+
|
|
3
|
+
export class PaymentMethods {
|
|
4
|
+
constructor(client) {
|
|
5
|
+
this.client = client;
|
|
6
|
+
}
|
|
7
|
+
getAll(params = {}) {
|
|
8
|
+
return this.client.request('get', '/v2.0/paymentmethods', {}, params);
|
|
9
|
+
}
|
|
10
|
+
getById(id) {
|
|
11
|
+
return this.client.request('get', `/v2.0/paymentmethods/${id}`);
|
|
12
|
+
}
|
|
13
|
+
create(data) {
|
|
14
|
+
return this.client.request('post', '/v2.0/paymentmethods', data);
|
|
15
|
+
}
|
|
16
|
+
update(data) {
|
|
17
|
+
return this.client.request('put', '/v2.0/paymentmethods', data);
|
|
18
|
+
}
|
|
19
|
+
delete(id) {
|
|
20
|
+
return this.client.request('delete', `/v2.0/paymentmethods/${id}`);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { GizmoClient } from '../GizmoClient.js';
|
|
2
|
+
|
|
3
|
+
export class ProductGroups {
|
|
4
|
+
constructor(client) {
|
|
5
|
+
this.client = client;
|
|
6
|
+
}
|
|
7
|
+
getAll(params = {}) {
|
|
8
|
+
return this.client.request('get', '/v2.0/productgroups', {}, params);
|
|
9
|
+
}
|
|
10
|
+
getById(id) {
|
|
11
|
+
return this.client.request('get', `/v2.0/productgroups/${id}`);
|
|
12
|
+
}
|
|
13
|
+
create(data) {
|
|
14
|
+
return this.client.request('post', '/v2.0/productgroups', data);
|
|
15
|
+
}
|
|
16
|
+
update(data) {
|
|
17
|
+
return this.client.request('put', '/v2.0/productgroups', data);
|
|
18
|
+
}
|
|
19
|
+
delete(id) {
|
|
20
|
+
return this.client.request('delete', `/v2.0/productgroups/${id}`);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
// Работа с приложениями внутри группы
|
|
24
|
+
getApplications(id, params = {}) {
|
|
25
|
+
return this.client.request('get', `/v2.0/productgroups/${id}/applications`, {}, params);
|
|
26
|
+
}
|
|
27
|
+
addApplication(id, data) {
|
|
28
|
+
return this.client.request('post', `/v2.0/productgroups/${id}/applications`, data);
|
|
29
|
+
}
|
|
30
|
+
deleteApplication(id, applicationId) {
|
|
31
|
+
return this.client.request('delete', `/v2.0/productgroups/${id}/applications/${applicationId}`);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import { GizmoClient } from '../GizmoClient.js';
|
|
2
|
+
|
|
3
|
+
export class Products {
|
|
4
|
+
constructor(client) {
|
|
5
|
+
this.client = client;
|
|
6
|
+
}
|
|
7
|
+
getAll(params = {}) {
|
|
8
|
+
return this.client.request('get', '/v2.0/products', {}, params);
|
|
9
|
+
}
|
|
10
|
+
getById(id) {
|
|
11
|
+
return this.client.request('get', `/v2.0/products/${id}`);
|
|
12
|
+
}
|
|
13
|
+
create(data) {
|
|
14
|
+
return this.client.request('post', '/v2.0/products', data);
|
|
15
|
+
}
|
|
16
|
+
update(data) {
|
|
17
|
+
return this.client.request('put', '/v2.0/products', data);
|
|
18
|
+
}
|
|
19
|
+
delete(id) {
|
|
20
|
+
return this.client.request('delete', `/v2.0/products/${id}`);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
// Доступность покупки
|
|
24
|
+
getPurchaseAvailability(id) {
|
|
25
|
+
return this.client.request('get', `/v2.0/products/${id}/purchaseavailability`);
|
|
26
|
+
}
|
|
27
|
+
updatePurchaseAvailability(id, data) {
|
|
28
|
+
return this.client.request('put', `/v2.0/products/${id}/purchaseavailability`, data);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
// Картинки
|
|
32
|
+
getImages(id, params = {}) {
|
|
33
|
+
return this.client.request('get', `/v2.0/products/${id}/images`, {}, params);
|
|
34
|
+
}
|
|
35
|
+
addImage(id, data) {
|
|
36
|
+
return this.client.request('post', `/v2.0/products/${id}/images`, data);
|
|
37
|
+
}
|
|
38
|
+
updateImages(data) {
|
|
39
|
+
return this.client.request('put', '/v2.0/products/images', data);
|
|
40
|
+
}
|
|
41
|
+
deleteImage(id, productImageId) {
|
|
42
|
+
return this.client.request('delete', `/v2.0/products/${id}/images/${productImageId}`);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
// UserPrices
|
|
46
|
+
getUserPrices(id, params = {}) {
|
|
47
|
+
return this.client.request('get', `/v2.0/products/${id}/userprices`, {}, params);
|
|
48
|
+
}
|
|
49
|
+
addUserPrice(id, data) {
|
|
50
|
+
return this.client.request('post', `/v2.0/products/${id}/userprices`, data);
|
|
51
|
+
}
|
|
52
|
+
updateUserPrices(data) {
|
|
53
|
+
return this.client.request('put', '/v2.0/products/userprices', data);
|
|
54
|
+
}
|
|
55
|
+
deleteUserPrice(id, userPriceId) {
|
|
56
|
+
return this.client.request('delete', `/v2.0/products/${id}/userprices/${userPriceId}`);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
// DisallowedUserGroups
|
|
60
|
+
getDisallowedUserGroups(id, params = {}) {
|
|
61
|
+
return this.client.request('get', `/v2.0/products/${id}/disallowedusergroups`, {}, params);
|
|
62
|
+
}
|
|
63
|
+
addDisallowedUserGroup(id, data) {
|
|
64
|
+
return this.client.request('post', `/v2.0/products/${id}/disallowedusergroups`, data);
|
|
65
|
+
}
|
|
66
|
+
updateDisallowedUserGroups(data) {
|
|
67
|
+
return this.client.request('put', '/v2.0/products/disallowedusergroups', data);
|
|
68
|
+
}
|
|
69
|
+
deleteDisallowedUserGroup(id, productDisallowedUserGroupId) {
|
|
70
|
+
return this.client.request('delete', `/v2.0/products/${id}/disallowedusergroups/${productDisallowedUserGroupId}`);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
// Bundle
|
|
74
|
+
getBundledProducts(id, params = {}) {
|
|
75
|
+
return this.client.request('get', `/v2.0/products/bundle/${id}/bundledproducts`, {}, params);
|
|
76
|
+
}
|
|
77
|
+
addBundledProduct(id, data) {
|
|
78
|
+
return this.client.request('post', `/v2.0/products/bundle/${id}/bundledproducts`, data);
|
|
79
|
+
}
|
|
80
|
+
updateBundledProducts(data) {
|
|
81
|
+
return this.client.request('put', '/v2.0/products/bundle/bundledproducts', data);
|
|
82
|
+
}
|
|
83
|
+
deleteBundledProduct(id, bundledProductId) {
|
|
84
|
+
return this.client.request('delete', `/v2.0/products/bundle/${id}/bundledproducts/${bundledProductId}`);
|
|
85
|
+
}
|
|
86
|
+
getBundledProductUserPrices(id, bundledProductId, params = {}) {
|
|
87
|
+
return this.client.request('get', `/v2.0/products/bundle/${id}/bundledproducts/${bundledProductId}/userprices`, {}, params);
|
|
88
|
+
}
|
|
89
|
+
addBundledProductUserPrice(id, bundledProductId, data) {
|
|
90
|
+
return this.client.request('post', `/v2.0/products/bundle/${id}/bundledproducts/${bundledProductId}/userprices`, data);
|
|
91
|
+
}
|
|
92
|
+
updateBundledProductUserPrices(data) {
|
|
93
|
+
return this.client.request('put', '/v2.0/products/bundle/bundledproducts/userprices', data);
|
|
94
|
+
}
|
|
95
|
+
deleteBundledProductUserPrice(id, bundledProductId, userPriceId) {
|
|
96
|
+
return this.client.request('delete', `/v2.0/products/bundle/${id}/bundledproducts/${bundledProductId}/userprices/${userPriceId}`);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
// Time
|
|
100
|
+
getUsageAvailability(id) {
|
|
101
|
+
return this.client.request('get', `/v2.0/products/time/${id}/usageavailability`);
|
|
102
|
+
}
|
|
103
|
+
updateUsageAvailability(id, data) {
|
|
104
|
+
return this.client.request('put', `/v2.0/products/time/${id}/usageavailability`, data);
|
|
105
|
+
}
|
|
106
|
+
getDisallowedHostGroupsTime(id, params = {}) {
|
|
107
|
+
return this.client.request('get', `/v2.0/products/time/${id}/disallowedhostgroups`, {}, params);
|
|
108
|
+
}
|
|
109
|
+
addDisallowedHostGroupTime(id, data) {
|
|
110
|
+
return this.client.request('post', `/v2.0/products/time/${id}/disallowedhostgroups`, data);
|
|
111
|
+
}
|
|
112
|
+
updateDisallowedHostGroupsTime(data) {
|
|
113
|
+
return this.client.request('put', '/v2.0/products/time/disallowedhostgroups', data);
|
|
114
|
+
}
|
|
115
|
+
deleteDisallowedHostGroupTime(id, timeProductDisallowedHostGroupId) {
|
|
116
|
+
return this.client.request('delete', `/v2.0/products/time/${id}/disallowedhostgroups/${timeProductDisallowedHostGroupId}`);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { GizmoClient } from '../GizmoClient.js';
|
|
2
|
+
|
|
3
|
+
export class Reservations {
|
|
4
|
+
constructor(client) {
|
|
5
|
+
this.client = client;
|
|
6
|
+
}
|
|
7
|
+
getAll(params = {}) {
|
|
8
|
+
return this.client.request('get', '/v2.0/reservations', {}, params);
|
|
9
|
+
}
|
|
10
|
+
getById(id) {
|
|
11
|
+
return this.client.request('get', `/v2.0/reservations/${id}`);
|
|
12
|
+
}
|
|
13
|
+
create(data) {
|
|
14
|
+
return this.client.request('post', '/v2.0/reservations', data);
|
|
15
|
+
}
|
|
16
|
+
update(data) {
|
|
17
|
+
return this.client.request('put', '/v2.0/reservations', data);
|
|
18
|
+
}
|
|
19
|
+
delete(id) {
|
|
20
|
+
return this.client.request('delete', `/v2.0/reservations/${id}`);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { GizmoClient } from '../GizmoClient.js';
|
|
2
|
+
|
|
3
|
+
export class Service {
|
|
4
|
+
constructor(client) {
|
|
5
|
+
this.client = client;
|
|
6
|
+
}
|
|
7
|
+
getInfo() {
|
|
8
|
+
return this.client.request('get', '/v2.0/service');
|
|
9
|
+
}
|
|
10
|
+
getVersion() {
|
|
11
|
+
return this.client.request('get', '/v2.0/service/version');
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { GizmoClient } from '../GizmoClient.js';
|
|
2
|
+
|
|
3
|
+
export class UserGroups {
|
|
4
|
+
constructor(client) {
|
|
5
|
+
this.client = client;
|
|
6
|
+
}
|
|
7
|
+
getAll(params = {}) {
|
|
8
|
+
return this.client.request('get', '/v2.0/usergroups', {}, params);
|
|
9
|
+
}
|
|
10
|
+
getById(id) {
|
|
11
|
+
return this.client.request('get', `/v2.0/usergroups/${id}`);
|
|
12
|
+
}
|
|
13
|
+
create(data) {
|
|
14
|
+
return this.client.request('post', '/v2.0/usergroups', data);
|
|
15
|
+
}
|
|
16
|
+
update(data) {
|
|
17
|
+
return this.client.request('put', '/v2.0/usergroups', data);
|
|
18
|
+
}
|
|
19
|
+
delete(id) {
|
|
20
|
+
return this.client.request('delete', `/v2.0/usergroups/${id}`);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
// Disallowed Host Groups
|
|
24
|
+
getDisallowedHostGroups(id, params = {}) {
|
|
25
|
+
return this.client.request('get', `/v2.0/usergroups/${id}/disallowedhostgroups`, {}, params);
|
|
26
|
+
}
|
|
27
|
+
addDisallowedHostGroup(id, data) {
|
|
28
|
+
return this.client.request('post', `/v2.0/usergroups/${id}/disallowedhostgroups`, data);
|
|
29
|
+
}
|
|
30
|
+
updateDisallowedHostGroups(data) {
|
|
31
|
+
return this.client.request('put', '/v2.0/usergroups/disallowedhostgroups', data);
|
|
32
|
+
}
|
|
33
|
+
deleteDisallowedHostGroup(id, userGroupDisallowedHostGroupId) {
|
|
34
|
+
return this.client.request('delete', `/v2.0/usergroups/${id}/disallowedhostgroups/${userGroupDisallowedHostGroupId}`);
|
|
35
|
+
}
|
|
36
|
+
}
|
package/src/v2/Users.js
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { GizmoClient } from '../GizmoClient.js';
|
|
2
|
+
|
|
3
|
+
export class Users {
|
|
4
|
+
constructor(client) {
|
|
5
|
+
this.client = client;
|
|
6
|
+
}
|
|
7
|
+
getAll(params = {}) {
|
|
8
|
+
return this.client.request('get', '/v2.0/users', {}, params);
|
|
9
|
+
}
|
|
10
|
+
getById(id) {
|
|
11
|
+
return this.client.request('get', `/v2.0/users/${id}`);
|
|
12
|
+
}
|
|
13
|
+
create(data) {
|
|
14
|
+
return this.client.request('post', '/v2.0/users', data);
|
|
15
|
+
}
|
|
16
|
+
update(data) {
|
|
17
|
+
return this.client.request('put', '/v2.0/users', data);
|
|
18
|
+
}
|
|
19
|
+
delete(id) {
|
|
20
|
+
return this.client.request('delete', `/v2.0/users/${id}`);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
// Атрибуты пользователя
|
|
24
|
+
getAttributes(id, params = {}) {
|
|
25
|
+
return this.client.request('get', `/v2.0/users/${id}/attributes`, {}, params);
|
|
26
|
+
}
|
|
27
|
+
addAttribute(id, data) {
|
|
28
|
+
return this.client.request('post', `/v2.0/users/${id}/attributes`, data);
|
|
29
|
+
}
|
|
30
|
+
updateAttributes(data) {
|
|
31
|
+
return this.client.request('put', '/v2.0/users/attributes', data);
|
|
32
|
+
}
|
|
33
|
+
deleteAttribute(id, userAttributeId) {
|
|
34
|
+
return this.client.request('delete', `/v2.0/users/${id}/attributes/${userAttributeId}`);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
// Заметки пользователя
|
|
38
|
+
getNotes(id, params = {}) {
|
|
39
|
+
return this.client.request('get', `/v2.0/users/${id}/notes`, {}, params);
|
|
40
|
+
}
|
|
41
|
+
addNote(id, data) {
|
|
42
|
+
return this.client.request('post', `/v2.0/users/${id}/notes`, data);
|
|
43
|
+
}
|
|
44
|
+
updateNotes(data) {
|
|
45
|
+
return this.client.request('put', '/v2.0/users/notes', data);
|
|
46
|
+
}
|
|
47
|
+
getNoteById(id, userNoteId) {
|
|
48
|
+
return this.client.request('get', `/v2.0/users/${id}/notes/${userNoteId}`);
|
|
49
|
+
}
|
|
50
|
+
deleteNote(id, userNoteId) {
|
|
51
|
+
return this.client.request('delete', `/v2.0/users/${id}/notes/${userNoteId}`);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
// Картинка пользователя
|
|
55
|
+
getPicture(id) {
|
|
56
|
+
return this.client.request('get', `/v2.0/users/${id}/picture`);
|
|
57
|
+
}
|
|
58
|
+
updatePicture(id, data) {
|
|
59
|
+
return this.client.request('put', `/v2.0/users/${id}/picture`, data);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
// Соглашения пользователя
|
|
63
|
+
getUserAgreements(id) {
|
|
64
|
+
return this.client.request('get', `/v2.0/users/${id}/useragreements`);
|
|
65
|
+
}
|
|
66
|
+
acceptUserAgreement(id, userAgreementId) {
|
|
67
|
+
return this.client.request('put', `/v2.0/users/${id}/useragreements/${userAgreementId}/accept`);
|
|
68
|
+
}
|
|
69
|
+
rejectUserAgreement(id, userAgreementId) {
|
|
70
|
+
return this.client.request('put', `/v2.0/users/${id}/useragreements/${userAgreementId}/reject`);
|
|
71
|
+
}
|
|
72
|
+
getPendingUserAgreements(id) {
|
|
73
|
+
return this.client.request('get', `/v2.0/users/${id}/useragreements/pending`);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
// Время использования
|
|
77
|
+
getUserUsageTime(id) {
|
|
78
|
+
return this.client.request('get', `/v2.0/users/${id}/userusagetime`);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { GizmoClient } from '../GizmoClient.js';
|
|
2
|
+
|
|
3
|
+
export class Variables {
|
|
4
|
+
constructor(client) {
|
|
5
|
+
this.client = client;
|
|
6
|
+
}
|
|
7
|
+
getAll(params = {}) {
|
|
8
|
+
return this.client.request('get', '/v2.0/variables', {}, params);
|
|
9
|
+
}
|
|
10
|
+
getById(id) {
|
|
11
|
+
return this.client.request('get', `/v2.0/variables/${id}`);
|
|
12
|
+
}
|
|
13
|
+
create(data) {
|
|
14
|
+
return this.client.request('post', '/v2.0/variables', data);
|
|
15
|
+
}
|
|
16
|
+
update(data) {
|
|
17
|
+
return this.client.request('put', '/v2.0/variables', data);
|
|
18
|
+
}
|
|
19
|
+
delete(id) {
|
|
20
|
+
return this.client.request('delete', `/v2.0/variables/${id}`);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { GizmoClient } from '../GizmoClient.js';
|
|
2
|
+
|
|
3
|
+
export class Verifications {
|
|
4
|
+
constructor(client) {
|
|
5
|
+
this.client = client;
|
|
6
|
+
}
|
|
7
|
+
// Email
|
|
8
|
+
verifyEmail(userId, emailAddress, data) {
|
|
9
|
+
return this.client.request('post', `/v2.0/verifications/email/${userId}/${emailAddress}`, data);
|
|
10
|
+
}
|
|
11
|
+
verifyEmailSimple(emailAddress, data) {
|
|
12
|
+
return this.client.request('post', `/v2.0/verifications/email/${emailAddress}`, data);
|
|
13
|
+
}
|
|
14
|
+
completeEmailVerification(token, confirmationCode, data) {
|
|
15
|
+
return this.client.request('post', `/v2.0/verifications/email/${token}/${confirmationCode}/complete`, data);
|
|
16
|
+
}
|
|
17
|
+
// Mobile
|
|
18
|
+
verifyMobile(userId, mobilePhoneNumber, data) {
|
|
19
|
+
return this.client.request('post', `/v2.0/verifications/mobilephone/${userId}/${mobilePhoneNumber}`, data);
|
|
20
|
+
}
|
|
21
|
+
verifyMobileSimple(mobilePhoneNumber, data) {
|
|
22
|
+
return this.client.request('post', `/v2.0/verifications/mobilephone/${mobilePhoneNumber}`, data);
|
|
23
|
+
}
|
|
24
|
+
completeMobileVerification(token, confirmationCode, data) {
|
|
25
|
+
return this.client.request('post', `/v2.0/verifications/mobilephone/${token}/${confirmationCode}/complete`, data);
|
|
26
|
+
}
|
|
27
|
+
}
|