starta.apiclient 1.37.2004 → 1.37.2012
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/index.d.ts +0 -2
- package/lib/services/index.js +0 -8
- package/lib/services/organizations/integrations.d.ts +6 -0
- package/lib/services/organizations/integrations.js +8 -0
- package/lib/services/phoneConfirmations.d.ts +7 -1
- package/lib/services/phoneConfirmations.js +3 -2
- package/package.json +1 -1
- package/lib/services/marketingCampaigns.d.ts +0 -10
- package/lib/services/marketingCampaigns.js +0 -25
package/lib/services/index.d.ts
CHANGED
|
@@ -13,7 +13,6 @@ import Communications from './communications';
|
|
|
13
13
|
import Search from './search';
|
|
14
14
|
import ServiceCategories from './serviceCategories';
|
|
15
15
|
import LogItems from './logItems';
|
|
16
|
-
import MarketingCampaigns from './marketingCampaigns';
|
|
17
16
|
export default class StartaApiClient {
|
|
18
17
|
private _requestRunner;
|
|
19
18
|
constructor(requestRunner: StartaRequestRunner);
|
|
@@ -33,5 +32,4 @@ export default class StartaApiClient {
|
|
|
33
32
|
get healthcheck(): Healthcheck;
|
|
34
33
|
get logItems(): LogItems;
|
|
35
34
|
get chats(): Chats;
|
|
36
|
-
get marketingCampaigns(): MarketingCampaigns;
|
|
37
35
|
}
|
package/lib/services/index.js
CHANGED
|
@@ -14,7 +14,6 @@ var communications_1 = require("./communications");
|
|
|
14
14
|
var search_1 = require("./search");
|
|
15
15
|
var serviceCategories_1 = require("./serviceCategories");
|
|
16
16
|
var logItems_1 = require("./logItems");
|
|
17
|
-
var marketingCampaigns_1 = require("./marketingCampaigns");
|
|
18
17
|
var StartaApiClient = /** @class */ (function () {
|
|
19
18
|
function StartaApiClient(requestRunner) {
|
|
20
19
|
this._requestRunner = requestRunner;
|
|
@@ -130,13 +129,6 @@ var StartaApiClient = /** @class */ (function () {
|
|
|
130
129
|
enumerable: false,
|
|
131
130
|
configurable: true
|
|
132
131
|
});
|
|
133
|
-
Object.defineProperty(StartaApiClient.prototype, "marketingCampaigns", {
|
|
134
|
-
get: function () {
|
|
135
|
-
return new marketingCampaigns_1.default(this._requestRunner);
|
|
136
|
-
},
|
|
137
|
-
enumerable: false,
|
|
138
|
-
configurable: true
|
|
139
|
-
});
|
|
140
132
|
return StartaApiClient;
|
|
141
133
|
}());
|
|
142
134
|
exports.default = StartaApiClient;
|
|
@@ -16,4 +16,10 @@ export default class Integrations {
|
|
|
16
16
|
merchantAccount: any;
|
|
17
17
|
merchantSecretKey: any;
|
|
18
18
|
}): Promise<import("../../types").StartaResponse>;
|
|
19
|
+
setTurboSMS(organizationLogin: string, { enabled, authToken, sender, verified }: {
|
|
20
|
+
enabled: boolean;
|
|
21
|
+
authToken: string;
|
|
22
|
+
sender: string;
|
|
23
|
+
verified: boolean;
|
|
24
|
+
}): Promise<import("../../types").StartaResponse>;
|
|
19
25
|
}
|
|
@@ -28,6 +28,14 @@ var Integrations = /** @class */ (function () {
|
|
|
28
28
|
body: { enabled: enabled, merchantAccount: merchantAccount, merchantSecretKey: merchantSecretKey },
|
|
29
29
|
});
|
|
30
30
|
};
|
|
31
|
+
Integrations.prototype.setTurboSMS = function (organizationLogin, _a) {
|
|
32
|
+
var enabled = _a.enabled, authToken = _a.authToken, sender = _a.sender, verified = _a.verified;
|
|
33
|
+
return this._requestRunner.performRequest({
|
|
34
|
+
url: "accounts/".concat(organizationLogin, "/integrations/turbosms"),
|
|
35
|
+
method: 'PUT',
|
|
36
|
+
body: { enabled: enabled, authToken: authToken, verified: verified, sender: sender },
|
|
37
|
+
});
|
|
38
|
+
};
|
|
31
39
|
return Integrations;
|
|
32
40
|
}());
|
|
33
41
|
exports.default = Integrations;
|
|
@@ -3,7 +3,13 @@ export default class PhoneConfirmations {
|
|
|
3
3
|
private _requestRunner;
|
|
4
4
|
constructor(requestRunner: StartaRequestRunner);
|
|
5
5
|
confirm(confirmPhoneToken: any): Promise<import("../types").StartaResponse>;
|
|
6
|
-
create({ phone }: {
|
|
6
|
+
create({ phone, customVerification }: {
|
|
7
7
|
phone: string;
|
|
8
|
+
customVerification: {
|
|
9
|
+
type: 'provider';
|
|
10
|
+
providerType: 'turbosms';
|
|
11
|
+
turbosmsToken: string;
|
|
12
|
+
turbosmsSender: string;
|
|
13
|
+
};
|
|
8
14
|
}): Promise<import("../types").StartaResponse>;
|
|
9
15
|
}
|
|
@@ -12,12 +12,13 @@ var PhoneConfirmations = /** @class */ (function () {
|
|
|
12
12
|
});
|
|
13
13
|
};
|
|
14
14
|
PhoneConfirmations.prototype.create = function (_a) {
|
|
15
|
-
var phone = _a.phone;
|
|
15
|
+
var phone = _a.phone, customVerification = _a.customVerification;
|
|
16
16
|
return this._requestRunner.performRequest({
|
|
17
17
|
url: "phoneConfirmations",
|
|
18
18
|
method: 'POST',
|
|
19
19
|
body: {
|
|
20
|
-
phone: phone
|
|
20
|
+
phone: phone,
|
|
21
|
+
customVerification: customVerification
|
|
21
22
|
},
|
|
22
23
|
});
|
|
23
24
|
};
|
package/package.json
CHANGED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { StartaRequestRunner } from '../types';
|
|
2
|
-
export default class MarketingCampaigns {
|
|
3
|
-
private _requestRunner;
|
|
4
|
-
constructor(requestRunner: StartaRequestRunner);
|
|
5
|
-
index(): Promise<import("../types").StartaResponse>;
|
|
6
|
-
setCost({ id, cost }: {
|
|
7
|
-
id: string;
|
|
8
|
-
cost: number;
|
|
9
|
-
}): Promise<import("../types").StartaResponse>;
|
|
10
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
var MarketingCampaigns = /** @class */ (function () {
|
|
4
|
-
function MarketingCampaigns(requestRunner) {
|
|
5
|
-
this._requestRunner = requestRunner;
|
|
6
|
-
}
|
|
7
|
-
MarketingCampaigns.prototype.index = function () {
|
|
8
|
-
return this._requestRunner.performRequest({
|
|
9
|
-
url: 'marketingCampaigns',
|
|
10
|
-
method: 'GET',
|
|
11
|
-
});
|
|
12
|
-
};
|
|
13
|
-
MarketingCampaigns.prototype.setCost = function (_a) {
|
|
14
|
-
var id = _a.id, cost = _a.cost;
|
|
15
|
-
return this._requestRunner.performRequest({
|
|
16
|
-
url: "marketingCampaigns/".concat(id, "/cost"),
|
|
17
|
-
method: 'PUT',
|
|
18
|
-
body: {
|
|
19
|
-
cost: cost
|
|
20
|
-
},
|
|
21
|
-
});
|
|
22
|
-
};
|
|
23
|
-
return MarketingCampaigns;
|
|
24
|
-
}());
|
|
25
|
-
exports.default = MarketingCampaigns;
|