@parra/parra-js-sdk 0.3.141 → 0.3.143
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/ParraAPI.d.ts +63 -2
- package/dist/ParraAPI.js +24 -1
- package/package.json +1 -1
package/dist/ParraAPI.d.ts
CHANGED
|
@@ -1461,6 +1461,46 @@ export interface TenantUserInfo {
|
|
|
1461
1461
|
roles: Array<string>;
|
|
1462
1462
|
user: TenantUser;
|
|
1463
1463
|
}
|
|
1464
|
+
export interface PasswordlessSmsConnectionData {
|
|
1465
|
+
connected_app_connection_id: string;
|
|
1466
|
+
otp_length: number;
|
|
1467
|
+
otp_expires_in: number;
|
|
1468
|
+
message: string;
|
|
1469
|
+
from?: string | null;
|
|
1470
|
+
}
|
|
1471
|
+
export interface CreatePasswordlessSmsConnectionBody {
|
|
1472
|
+
connected_app_connection_id: string;
|
|
1473
|
+
otp_length: number;
|
|
1474
|
+
otp_expires_in: number;
|
|
1475
|
+
message: string;
|
|
1476
|
+
from?: string | null;
|
|
1477
|
+
name: string;
|
|
1478
|
+
signup_disabled?: boolean;
|
|
1479
|
+
}
|
|
1480
|
+
export declare enum PasswordlessStrategy {
|
|
1481
|
+
email = "email",
|
|
1482
|
+
sms = "sms",
|
|
1483
|
+
phone = "phone"
|
|
1484
|
+
}
|
|
1485
|
+
export type PasswordlessConnectionData = PasswordlessSmsConnectionData;
|
|
1486
|
+
export interface PasswordlessConnection {
|
|
1487
|
+
id: string;
|
|
1488
|
+
created_at: string;
|
|
1489
|
+
updated_at: string;
|
|
1490
|
+
deleted_at?: string | null;
|
|
1491
|
+
strategy: PasswordlessStrategy;
|
|
1492
|
+
tenant_id: string;
|
|
1493
|
+
name: string;
|
|
1494
|
+
data: PasswordlessConnectionData;
|
|
1495
|
+
}
|
|
1496
|
+
export interface UpdatePasswordlessConnectionBody {
|
|
1497
|
+
name?: string;
|
|
1498
|
+
sms_otp_length?: number;
|
|
1499
|
+
sms_otp_expires_in?: number;
|
|
1500
|
+
sms_message?: string;
|
|
1501
|
+
sms_from?: string | null;
|
|
1502
|
+
signup_disabled?: boolean;
|
|
1503
|
+
}
|
|
1464
1504
|
export declare enum GrantType {
|
|
1465
1505
|
authorizationCode = "authorization_code",
|
|
1466
1506
|
clientCredentials = "client_credentials",
|
|
@@ -1692,6 +1732,7 @@ export declare enum ConnectedAppType {
|
|
|
1692
1732
|
parra = "parra",
|
|
1693
1733
|
appStoreConnectApi = "app-store-connect-api",
|
|
1694
1734
|
slack = "slack",
|
|
1735
|
+
twilio = "twilio",
|
|
1695
1736
|
x = "x"
|
|
1696
1737
|
}
|
|
1697
1738
|
export declare enum ConnectedAppConnectionStatus {
|
|
@@ -1711,11 +1752,17 @@ export interface ConnectedAppSlackConnectionData {
|
|
|
1711
1752
|
app_id: string;
|
|
1712
1753
|
user_id: string;
|
|
1713
1754
|
}
|
|
1755
|
+
export interface ConnectedAppTwilioConnectionData {
|
|
1756
|
+
account_sid: string;
|
|
1757
|
+
auth_token: string;
|
|
1758
|
+
messaging_service_sid?: string | null;
|
|
1759
|
+
from_number?: string | null;
|
|
1760
|
+
}
|
|
1714
1761
|
export interface ConnectedAppXConnectionData {
|
|
1715
1762
|
handle: string;
|
|
1716
1763
|
name: string;
|
|
1717
1764
|
}
|
|
1718
|
-
export type ConnectedAppConnectionData = ConnectedAppAppStoreConnectApiConnectionData | ConnectedAppSlackConnectionData | ConnectedAppXConnectionData;
|
|
1765
|
+
export type ConnectedAppConnectionData = ConnectedAppAppStoreConnectApiConnectionData | ConnectedAppSlackConnectionData | ConnectedAppTwilioConnectionData | ConnectedAppXConnectionData;
|
|
1719
1766
|
export interface ConnectedAppConnection {
|
|
1720
1767
|
id: string;
|
|
1721
1768
|
created_at: string;
|
|
@@ -1758,6 +1805,10 @@ export interface UpdateConnectedAppConnectionRequestBody {
|
|
|
1758
1805
|
app_store_connect_api_issuer?: string;
|
|
1759
1806
|
app_store_connect_api_key_id?: string;
|
|
1760
1807
|
app_store_connect_api_private_key?: string;
|
|
1808
|
+
twilio_account_sid?: string;
|
|
1809
|
+
twilio_auth_token?: string;
|
|
1810
|
+
twilio_messaging_service_sid?: string;
|
|
1811
|
+
twilio_from_number?: string;
|
|
1761
1812
|
}
|
|
1762
1813
|
export interface CreateAppStoreConnectConnectedAppConnectionRequestBody {
|
|
1763
1814
|
issuer: string;
|
|
@@ -1767,11 +1818,17 @@ export interface CreateAppStoreConnectConnectedAppConnectionRequestBody {
|
|
|
1767
1818
|
export interface CreateSlackConnectedAppConnectionRequestBody {
|
|
1768
1819
|
code: string;
|
|
1769
1820
|
}
|
|
1821
|
+
export interface CreateTwilioConnectedAppConnectionRequestBody {
|
|
1822
|
+
account_sid: string;
|
|
1823
|
+
auth_token: string;
|
|
1824
|
+
messaging_service_sid?: string;
|
|
1825
|
+
from_number?: string;
|
|
1826
|
+
}
|
|
1770
1827
|
export interface CreateXConnectedAppConnectionRequestBody {
|
|
1771
1828
|
code: string;
|
|
1772
1829
|
code_verifier: string;
|
|
1773
1830
|
}
|
|
1774
|
-
export type CreateConnectedAppConnectionRequestBody = CreateAppStoreConnectConnectedAppConnectionRequestBody | CreateSlackConnectedAppConnectionRequestBody | CreateXConnectedAppConnectionRequestBody;
|
|
1831
|
+
export type CreateConnectedAppConnectionRequestBody = CreateAppStoreConnectConnectedAppConnectionRequestBody | CreateSlackConnectedAppConnectionRequestBody | CreateTwilioConnectedAppConnectionRequestBody | CreateXConnectedAppConnectionRequestBody;
|
|
1775
1832
|
export declare enum IntegrationType {
|
|
1776
1833
|
parraFeedbackFormBoard = "parra-feedback-form-board",
|
|
1777
1834
|
slackFeedbackForm = "slack-feedback-form",
|
|
@@ -2261,6 +2318,9 @@ declare class ParraAPI {
|
|
|
2261
2318
|
loginUserForTenant: (tenant_id: string, options?: Options) => Promise<TenantUserInfo>;
|
|
2262
2319
|
getTenantUserInfo: (tenant_id: string, options?: Options) => Promise<TenantUserInfo>;
|
|
2263
2320
|
logoutUserForTenant: (tenant_id: string, options?: Options) => Promise<Response>;
|
|
2321
|
+
createPasswordlessSmsConnectionForTenant: (tenant_id: string, body: CreatePasswordlessSmsConnectionBody, options?: Options) => Promise<PasswordlessConnection>;
|
|
2322
|
+
listPasswordlessConnectionsForTenant: (tenant_id: string, options?: Options) => Promise<Array<PasswordlessConnection>>;
|
|
2323
|
+
updatePasswordlessConnectionForTenant: (tenant_id: string, passwordless_connection_id: string, body?: UpdatePasswordlessConnectionBody, options?: Options) => Promise<PasswordlessConnection>;
|
|
2264
2324
|
getClientForTenantApplication: (tenant_id: string, application_id: string, options?: Options) => Promise<Client>;
|
|
2265
2325
|
createClientForTenantApplication: (tenant_id: string, application_id: string, options?: Options) => Promise<Client>;
|
|
2266
2326
|
updateClientForTenantApplication: (tenant_id: string, application_id: string, body?: UpdateClientRequestBody, options?: Options) => Promise<Client>;
|
|
@@ -2287,6 +2347,7 @@ declare class ParraAPI {
|
|
|
2287
2347
|
getApiKeysForTenantById: (tenant_id: string, options?: Options) => Promise<ApiKeyCollectionResponse>;
|
|
2288
2348
|
listConnectedAppsForTenantById: (tenant_id: string, query?: {
|
|
2289
2349
|
include?: string;
|
|
2350
|
+
group?: string;
|
|
2290
2351
|
}, options?: Options) => Promise<Array<TenantConnectedApp>>;
|
|
2291
2352
|
updateConnectedAppConnectionById: (tenant_id: string, connected_app_connection_id: string, body?: UpdateConnectedAppConnectionRequestBody, options?: Options) => Promise<ConnectedAppConnection>;
|
|
2292
2353
|
deleteConnectedAppConnectionById: (tenant_id: string, connected_app_connection_id: string, options?: Options) => Promise<ConnectedAppConnection>;
|
package/dist/ParraAPI.js
CHANGED
|
@@ -11,7 +11,7 @@ var __assign = (this && this.__assign) || function () {
|
|
|
11
11
|
return __assign.apply(this, arguments);
|
|
12
12
|
};
|
|
13
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
-
exports.PolicyDocumentVersionStatus = exports.PolicyDocumentStatus = exports.IntegrationScope = exports.IntegrationConnectionStatus = exports.IntegrationType = exports.ConnectedAppConnectionStatus = exports.ConnectedAppType = exports.TenantOnboardingGoal = exports.ApplicationType = exports.RefreshTokenRotationType = exports.RefreshTokenExpirationType = exports.JwtAlgorithm = exports.GrantType = exports.ApnsPushType = exports.ApnsEnvironment = exports.ChannelType = exports.AppVersionStatus = exports.TicketDisplayStatus = exports.UserNoteStatus = exports.TemplateType = exports.CampaignStatus = exports.CampaignActionDisplayType = exports.CampaignActionType = exports.CardItemDisplayType = exports.CardItemType = exports.QuestionKind = exports.QuestionType = exports.FeedbackFormFieldType = exports.SubscriptionStatus = exports.Currency = exports.Interval = exports.IdentityType = exports.PolicyDocumentType = exports.ReleaseType = exports.ReleaseStatus = exports.TicketIconType = exports.TicketPriority = exports.TicketStatus = exports.TicketType = void 0;
|
|
14
|
+
exports.PolicyDocumentVersionStatus = exports.PolicyDocumentStatus = exports.IntegrationScope = exports.IntegrationConnectionStatus = exports.IntegrationType = exports.ConnectedAppConnectionStatus = exports.ConnectedAppType = exports.TenantOnboardingGoal = exports.ApplicationType = exports.RefreshTokenRotationType = exports.RefreshTokenExpirationType = exports.JwtAlgorithm = exports.GrantType = exports.PasswordlessStrategy = exports.ApnsPushType = exports.ApnsEnvironment = exports.ChannelType = exports.AppVersionStatus = exports.TicketDisplayStatus = exports.UserNoteStatus = exports.TemplateType = exports.CampaignStatus = exports.CampaignActionDisplayType = exports.CampaignActionType = exports.CardItemDisplayType = exports.CardItemType = exports.QuestionKind = exports.QuestionType = exports.FeedbackFormFieldType = exports.SubscriptionStatus = exports.Currency = exports.Interval = exports.IdentityType = exports.PolicyDocumentType = exports.ReleaseType = exports.ReleaseStatus = exports.TicketIconType = exports.TicketPriority = exports.TicketStatus = exports.TicketType = void 0;
|
|
15
15
|
var TicketType;
|
|
16
16
|
(function (TicketType) {
|
|
17
17
|
TicketType["bug"] = "bug";
|
|
@@ -187,6 +187,12 @@ var ApnsPushType;
|
|
|
187
187
|
ApnsPushType["voip"] = "voip";
|
|
188
188
|
ApnsPushType["mdm"] = "mdm";
|
|
189
189
|
})(ApnsPushType || (exports.ApnsPushType = ApnsPushType = {}));
|
|
190
|
+
var PasswordlessStrategy;
|
|
191
|
+
(function (PasswordlessStrategy) {
|
|
192
|
+
PasswordlessStrategy["email"] = "email";
|
|
193
|
+
PasswordlessStrategy["sms"] = "sms";
|
|
194
|
+
PasswordlessStrategy["phone"] = "phone";
|
|
195
|
+
})(PasswordlessStrategy || (exports.PasswordlessStrategy = PasswordlessStrategy = {}));
|
|
190
196
|
var GrantType;
|
|
191
197
|
(function (GrantType) {
|
|
192
198
|
GrantType["authorizationCode"] = "authorization_code";
|
|
@@ -223,6 +229,7 @@ var ConnectedAppType;
|
|
|
223
229
|
ConnectedAppType["parra"] = "parra";
|
|
224
230
|
ConnectedAppType["appStoreConnectApi"] = "app-store-connect-api";
|
|
225
231
|
ConnectedAppType["slack"] = "slack";
|
|
232
|
+
ConnectedAppType["twilio"] = "twilio";
|
|
226
233
|
ConnectedAppType["x"] = "x";
|
|
227
234
|
})(ConnectedAppType || (exports.ConnectedAppType = ConnectedAppType = {}));
|
|
228
235
|
var ConnectedAppConnectionStatus;
|
|
@@ -776,6 +783,22 @@ var ParraAPI = /** @class */ (function () {
|
|
|
776
783
|
if (options === void 0) { options = {}; }
|
|
777
784
|
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/auth/logout"), __assign({ method: "post" }, options));
|
|
778
785
|
};
|
|
786
|
+
this.createPasswordlessSmsConnectionForTenant = function (tenant_id, body, options) {
|
|
787
|
+
if (options === void 0) { options = {}; }
|
|
788
|
+
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/auth/passwordless/connections/sms"), __assign({ method: "post", body: JSON.stringify(body), headers: {
|
|
789
|
+
"content-type": "application/json",
|
|
790
|
+
} }, options));
|
|
791
|
+
};
|
|
792
|
+
this.listPasswordlessConnectionsForTenant = function (tenant_id, options) {
|
|
793
|
+
if (options === void 0) { options = {}; }
|
|
794
|
+
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/auth/passwordless/connections"), __assign({ method: "get" }, options));
|
|
795
|
+
};
|
|
796
|
+
this.updatePasswordlessConnectionForTenant = function (tenant_id, passwordless_connection_id, body, options) {
|
|
797
|
+
if (options === void 0) { options = {}; }
|
|
798
|
+
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/auth/passwordless/connections/").concat(passwordless_connection_id), __assign({ method: "put", body: JSON.stringify(body), headers: {
|
|
799
|
+
"content-type": "application/json",
|
|
800
|
+
} }, options));
|
|
801
|
+
};
|
|
779
802
|
this.getClientForTenantApplication = function (tenant_id, application_id, options) {
|
|
780
803
|
if (options === void 0) { options = {}; }
|
|
781
804
|
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/applications/").concat(application_id, "/client"), __assign({ method: "get" }, options));
|