starta.apiclient 1.37.921 → 1.37.936
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/lib/services/accounts.d.ts +4 -4
- package/lib/services/accounts.js +4 -4
- package/lib/services/organizations/services.d.ts +15 -3
- package/lib/services/organizations/services.js +4 -2
- package/lib/services/system.d.ts +1 -0
- package/lib/services/system.js +11 -0
- package/lib/types.d.ts +4 -0
- package/package.json +1 -1
|
@@ -10,15 +10,15 @@ export default class Accounts {
|
|
|
10
10
|
}): Promise<import("../types").StartaResponse>;
|
|
11
11
|
getMainData(login: string): Promise<import("../types").StartaResponse>;
|
|
12
12
|
serviceProviders(login: string): Promise<import("../types").StartaResponse>;
|
|
13
|
-
createViaSocialNetwork({ email, login, socialNetworksKey, authMethod, acceptedTermsAndConditions,
|
|
13
|
+
createViaSocialNetwork({ email, login, socialNetworksKey, authMethod, acceptedTermsAndConditions, referralId }: {
|
|
14
14
|
email: any;
|
|
15
15
|
login: any;
|
|
16
16
|
socialNetworksKey: any;
|
|
17
17
|
authMethod: 'cookie' | 'header';
|
|
18
18
|
acceptedTermsAndConditions: any;
|
|
19
|
-
|
|
19
|
+
referralId?: any;
|
|
20
20
|
}): Promise<import("../types").StartaResponse>;
|
|
21
|
-
create({ email, login, password, passwordConfirm, firstName, lastName, phone, authMethod, recaptchaToken, acceptedTermsAndConditions,
|
|
21
|
+
create({ email, login, password, passwordConfirm, firstName, lastName, phone, authMethod, recaptchaToken, acceptedTermsAndConditions, referralId, }: {
|
|
22
22
|
email: any;
|
|
23
23
|
login: any;
|
|
24
24
|
password: any;
|
|
@@ -29,7 +29,7 @@ export default class Accounts {
|
|
|
29
29
|
authMethod: 'cookie' | 'header';
|
|
30
30
|
recaptchaToken: any;
|
|
31
31
|
acceptedTermsAndConditions: any;
|
|
32
|
-
|
|
32
|
+
referralId?: any;
|
|
33
33
|
}): Promise<import("../types").StartaResponse>;
|
|
34
34
|
changePassword(login: string, { currentPassword, newPassword }: {
|
|
35
35
|
currentPassword: any;
|
package/lib/services/accounts.js
CHANGED
|
@@ -26,7 +26,7 @@ var Accounts = /** @class */ (function () {
|
|
|
26
26
|
});
|
|
27
27
|
};
|
|
28
28
|
Accounts.prototype.createViaSocialNetwork = function (_a) {
|
|
29
|
-
var email = _a.email, login = _a.login, socialNetworksKey = _a.socialNetworksKey, _b = _a.authMethod, authMethod = _b === void 0 ? 'cookie' : _b, acceptedTermsAndConditions = _a.acceptedTermsAndConditions,
|
|
29
|
+
var email = _a.email, login = _a.login, socialNetworksKey = _a.socialNetworksKey, _b = _a.authMethod, authMethod = _b === void 0 ? 'cookie' : _b, acceptedTermsAndConditions = _a.acceptedTermsAndConditions, referralId = _a.referralId;
|
|
30
30
|
return this._requestRunner.performRequest({
|
|
31
31
|
url: "accounts/sn",
|
|
32
32
|
method: 'POST',
|
|
@@ -36,12 +36,12 @@ var Accounts = /** @class */ (function () {
|
|
|
36
36
|
socialNetworksKey: socialNetworksKey,
|
|
37
37
|
authMethod: authMethod,
|
|
38
38
|
acceptedTermsAndConditions: acceptedTermsAndConditions,
|
|
39
|
-
|
|
39
|
+
referralId: referralId,
|
|
40
40
|
},
|
|
41
41
|
});
|
|
42
42
|
};
|
|
43
43
|
Accounts.prototype.create = function (_a) {
|
|
44
|
-
var email = _a.email, login = _a.login, password = _a.password, passwordConfirm = _a.passwordConfirm, firstName = _a.firstName, lastName = _a.lastName, phone = _a.phone, _b = _a.authMethod, authMethod = _b === void 0 ? 'cookie' : _b, recaptchaToken = _a.recaptchaToken, acceptedTermsAndConditions = _a.acceptedTermsAndConditions,
|
|
44
|
+
var email = _a.email, login = _a.login, password = _a.password, passwordConfirm = _a.passwordConfirm, firstName = _a.firstName, lastName = _a.lastName, phone = _a.phone, _b = _a.authMethod, authMethod = _b === void 0 ? 'cookie' : _b, recaptchaToken = _a.recaptchaToken, acceptedTermsAndConditions = _a.acceptedTermsAndConditions, referralId = _a.referralId;
|
|
45
45
|
return this._requestRunner.performRequest({
|
|
46
46
|
url: "accounts",
|
|
47
47
|
method: 'POST',
|
|
@@ -56,7 +56,7 @@ var Accounts = /** @class */ (function () {
|
|
|
56
56
|
authMethod: authMethod,
|
|
57
57
|
recaptchaToken: recaptchaToken,
|
|
58
58
|
acceptedTermsAndConditions: acceptedTermsAndConditions,
|
|
59
|
-
|
|
59
|
+
referralId: referralId,
|
|
60
60
|
},
|
|
61
61
|
});
|
|
62
62
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { StartaRequestRunner } from '../../types';
|
|
1
|
+
import { StartaRequestRunner, DraftjsObject } from '../../types';
|
|
2
2
|
export default class Services {
|
|
3
3
|
private _requestRunner;
|
|
4
4
|
constructor(requestRunner: StartaRequestRunner);
|
|
5
|
-
add(organizationLogin: any, { name, image, price, allowCancellationByCustomer, disableCancellationByCustomerPriorHours, disableBookingByCustomerPriorHours, duration, executors }: {
|
|
5
|
+
add(organizationLogin: any, { name, image, price, allowCancellationByCustomer, disableCancellationByCustomerPriorHours, disableBookingByCustomerPriorHours, duration, executors, description, }: {
|
|
6
6
|
name: {
|
|
7
7
|
default: string;
|
|
8
8
|
[key: string]: string;
|
|
@@ -20,8 +20,14 @@ export default class Services {
|
|
|
20
20
|
duration?: number;
|
|
21
21
|
}
|
|
22
22
|
];
|
|
23
|
+
description?: {
|
|
24
|
+
default: DraftjsObject;
|
|
25
|
+
'en-us'?: DraftjsObject;
|
|
26
|
+
'uk-ua'?: DraftjsObject;
|
|
27
|
+
'ru-ru'?: DraftjsObject;
|
|
28
|
+
};
|
|
23
29
|
}): Promise<import("../../types").StartaResponse>;
|
|
24
|
-
update(organizationLogin: any, serviceId: any, { name, image, price, allowCancellationByCustomer, disableCancellationByCustomerPriorHours, disableBookingByCustomerPriorHours, duration, executors }: {
|
|
30
|
+
update(organizationLogin: any, serviceId: any, { name, image, price, allowCancellationByCustomer, disableCancellationByCustomerPriorHours, disableBookingByCustomerPriorHours, duration, executors, description, }: {
|
|
25
31
|
name: {
|
|
26
32
|
default: string;
|
|
27
33
|
[key: string]: string;
|
|
@@ -39,6 +45,12 @@ export default class Services {
|
|
|
39
45
|
duration?: number;
|
|
40
46
|
}
|
|
41
47
|
];
|
|
48
|
+
description?: {
|
|
49
|
+
default: DraftjsObject;
|
|
50
|
+
'en-us'?: DraftjsObject;
|
|
51
|
+
'uk-ua'?: DraftjsObject;
|
|
52
|
+
'ru-ru'?: DraftjsObject;
|
|
53
|
+
};
|
|
42
54
|
}): Promise<import("../../types").StartaResponse>;
|
|
43
55
|
delete(organizationLogin: any, serviceId: any): Promise<import("../../types").StartaResponse>;
|
|
44
56
|
}
|
|
@@ -5,7 +5,7 @@ var Services = /** @class */ (function () {
|
|
|
5
5
|
this._requestRunner = requestRunner;
|
|
6
6
|
}
|
|
7
7
|
Services.prototype.add = function (organizationLogin, _a) {
|
|
8
|
-
var name = _a.name, image = _a.image, price = _a.price, allowCancellationByCustomer = _a.allowCancellationByCustomer, disableCancellationByCustomerPriorHours = _a.disableCancellationByCustomerPriorHours, disableBookingByCustomerPriorHours = _a.disableBookingByCustomerPriorHours, duration = _a.duration, executors = _a.executors;
|
|
8
|
+
var name = _a.name, image = _a.image, price = _a.price, allowCancellationByCustomer = _a.allowCancellationByCustomer, disableCancellationByCustomerPriorHours = _a.disableCancellationByCustomerPriorHours, disableBookingByCustomerPriorHours = _a.disableBookingByCustomerPriorHours, duration = _a.duration, executors = _a.executors, description = _a.description;
|
|
9
9
|
return this._requestRunner.performRequest({
|
|
10
10
|
url: "accounts/".concat(organizationLogin, "/services"),
|
|
11
11
|
method: 'POST',
|
|
@@ -18,11 +18,12 @@ var Services = /** @class */ (function () {
|
|
|
18
18
|
allowCancellationByCustomer: allowCancellationByCustomer,
|
|
19
19
|
disableCancellationByCustomerPriorHours: disableCancellationByCustomerPriorHours,
|
|
20
20
|
disableBookingByCustomerPriorHours: disableBookingByCustomerPriorHours,
|
|
21
|
+
description: description,
|
|
21
22
|
},
|
|
22
23
|
});
|
|
23
24
|
};
|
|
24
25
|
Services.prototype.update = function (organizationLogin, serviceId, _a) {
|
|
25
|
-
var name = _a.name, image = _a.image, price = _a.price, allowCancellationByCustomer = _a.allowCancellationByCustomer, disableCancellationByCustomerPriorHours = _a.disableCancellationByCustomerPriorHours, disableBookingByCustomerPriorHours = _a.disableBookingByCustomerPriorHours, duration = _a.duration, executors = _a.executors;
|
|
26
|
+
var name = _a.name, image = _a.image, price = _a.price, allowCancellationByCustomer = _a.allowCancellationByCustomer, disableCancellationByCustomerPriorHours = _a.disableCancellationByCustomerPriorHours, disableBookingByCustomerPriorHours = _a.disableBookingByCustomerPriorHours, duration = _a.duration, executors = _a.executors, description = _a.description;
|
|
26
27
|
return this._requestRunner.performRequest({
|
|
27
28
|
url: "accounts/".concat(organizationLogin, "/services/").concat(serviceId),
|
|
28
29
|
method: 'PUT',
|
|
@@ -35,6 +36,7 @@ var Services = /** @class */ (function () {
|
|
|
35
36
|
allowCancellationByCustomer: allowCancellationByCustomer,
|
|
36
37
|
disableCancellationByCustomerPriorHours: disableCancellationByCustomerPriorHours,
|
|
37
38
|
disableBookingByCustomerPriorHours: disableBookingByCustomerPriorHours,
|
|
39
|
+
description: description,
|
|
38
40
|
},
|
|
39
41
|
});
|
|
40
42
|
};
|
package/lib/services/system.d.ts
CHANGED
package/lib/services/system.js
CHANGED
|
@@ -15,6 +15,17 @@ var EmailConfirmations = /** @class */ (function () {
|
|
|
15
15
|
},
|
|
16
16
|
});
|
|
17
17
|
};
|
|
18
|
+
EmailConfirmations.prototype.config = function () {
|
|
19
|
+
return this._requestRunner.performRequest({
|
|
20
|
+
url: "config",
|
|
21
|
+
method: 'GET',
|
|
22
|
+
config: {
|
|
23
|
+
rewriteBaseUrl: function (url) {
|
|
24
|
+
return url.replace('/api', '/');
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
});
|
|
28
|
+
};
|
|
18
29
|
return EmailConfirmations;
|
|
19
30
|
}());
|
|
20
31
|
exports.default = EmailConfirmations;
|
package/lib/types.d.ts
CHANGED
|
@@ -3,6 +3,10 @@ export interface StartaRequestRunner {
|
|
|
3
3
|
performRequest: (requestData: StartaRequestData) => Promise<StartaResponse>;
|
|
4
4
|
setAuthHeaderToken: (token: string) => void;
|
|
5
5
|
}
|
|
6
|
+
export declare type DraftjsObject = {
|
|
7
|
+
blocks: any;
|
|
8
|
+
entityMap: any;
|
|
9
|
+
};
|
|
6
10
|
export declare type StartaRequestData = {
|
|
7
11
|
url: string;
|
|
8
12
|
method: Method;
|