@parra/parra-js-sdk 0.3.159 → 0.3.161
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 +147 -37
- package/dist/ParraAPI.js +40 -16
- package/package.json +1 -1
package/dist/ParraAPI.d.ts
CHANGED
|
@@ -168,11 +168,63 @@ export interface NewInstalledVersionInfo {
|
|
|
168
168
|
release: AppRelease;
|
|
169
169
|
}
|
|
170
170
|
export interface AppInfo {
|
|
171
|
-
version_token: string;
|
|
171
|
+
version_token: string | null;
|
|
172
172
|
new_installed_version_info?: NewInstalledVersionInfo;
|
|
173
|
+
tenant: TenantAppInfoStub;
|
|
173
174
|
auth: AppAuthInfo;
|
|
174
175
|
legal: AppLegalInfo;
|
|
175
176
|
}
|
|
177
|
+
export declare enum DomainType {
|
|
178
|
+
managed = "managed",
|
|
179
|
+
external = "external",
|
|
180
|
+
subdomain = "subdomain",
|
|
181
|
+
fallback = "fallback"
|
|
182
|
+
}
|
|
183
|
+
export declare enum DomainStatus {
|
|
184
|
+
setup = "setup",
|
|
185
|
+
pending = "pending",
|
|
186
|
+
error = "error",
|
|
187
|
+
disabled = "disabled",
|
|
188
|
+
deleted = "deleted"
|
|
189
|
+
}
|
|
190
|
+
export interface ExternalDomainData {
|
|
191
|
+
status: DomainStatus;
|
|
192
|
+
domain: string;
|
|
193
|
+
disabled: boolean;
|
|
194
|
+
}
|
|
195
|
+
export type DomainData = ExternalDomainData;
|
|
196
|
+
export interface Domain {
|
|
197
|
+
id: string;
|
|
198
|
+
type: DomainType;
|
|
199
|
+
name: string;
|
|
200
|
+
title: string;
|
|
201
|
+
host: string;
|
|
202
|
+
url: string;
|
|
203
|
+
data?: DomainData | null;
|
|
204
|
+
}
|
|
205
|
+
export interface Entitlement {
|
|
206
|
+
}
|
|
207
|
+
export interface CreateTenantRequestBody {
|
|
208
|
+
name: string;
|
|
209
|
+
subdomain?: string | null;
|
|
210
|
+
is_test: boolean;
|
|
211
|
+
parent_tenant_id?: string | null;
|
|
212
|
+
}
|
|
213
|
+
export interface TenantAppInfoStub {
|
|
214
|
+
id: string;
|
|
215
|
+
created_at: string;
|
|
216
|
+
updated_at: string;
|
|
217
|
+
deleted_at?: string | null;
|
|
218
|
+
name: string;
|
|
219
|
+
subdomain?: string | null;
|
|
220
|
+
is_test: boolean;
|
|
221
|
+
parent_tenant_id?: string | null;
|
|
222
|
+
logo?: ImageAssetStub | null;
|
|
223
|
+
issuer?: string;
|
|
224
|
+
domains?: Array<Domain> | null;
|
|
225
|
+
urls?: Array<string> | null;
|
|
226
|
+
entitlements?: Array<Entitlement> | null;
|
|
227
|
+
}
|
|
176
228
|
export interface PasswordRule {
|
|
177
229
|
regular_expression?: string;
|
|
178
230
|
error_message?: string;
|
|
@@ -1525,18 +1577,6 @@ export interface ExternalDomainDnsRecord {
|
|
|
1525
1577
|
verified_at?: string | null;
|
|
1526
1578
|
required: boolean;
|
|
1527
1579
|
}
|
|
1528
|
-
export declare enum DomainStatus {
|
|
1529
|
-
setup = "setup",
|
|
1530
|
-
pending = "pending",
|
|
1531
|
-
error = "error",
|
|
1532
|
-
disabled = "disabled",
|
|
1533
|
-
deleted = "deleted"
|
|
1534
|
-
}
|
|
1535
|
-
export interface ExternalDomainData {
|
|
1536
|
-
status: DomainStatus;
|
|
1537
|
-
domain: string;
|
|
1538
|
-
disabled: boolean;
|
|
1539
|
-
}
|
|
1540
1580
|
export interface ExternalDomain {
|
|
1541
1581
|
id: string;
|
|
1542
1582
|
created_at: string;
|
|
@@ -1663,6 +1703,90 @@ export interface UpdatePasswordlessConnectionBody {
|
|
|
1663
1703
|
signup_disabled?: boolean;
|
|
1664
1704
|
disabled?: boolean;
|
|
1665
1705
|
}
|
|
1706
|
+
export interface WebauthnChallengeRequest {
|
|
1707
|
+
username?: string | null;
|
|
1708
|
+
}
|
|
1709
|
+
export interface AuthenticatorSelection {
|
|
1710
|
+
authenticatorAttachment?: string;
|
|
1711
|
+
requireResidentKey?: boolean;
|
|
1712
|
+
residentKey?: string;
|
|
1713
|
+
userVerification?: string;
|
|
1714
|
+
}
|
|
1715
|
+
export interface PublicKeyCredentialDescriptor {
|
|
1716
|
+
type: string;
|
|
1717
|
+
id: string;
|
|
1718
|
+
transports?: Array<string> | null;
|
|
1719
|
+
}
|
|
1720
|
+
export interface PublicKeyCredParam {
|
|
1721
|
+
type: string;
|
|
1722
|
+
alg: number;
|
|
1723
|
+
}
|
|
1724
|
+
export interface RelyingParty {
|
|
1725
|
+
id: string;
|
|
1726
|
+
name?: string;
|
|
1727
|
+
}
|
|
1728
|
+
export interface PublicKeyCredentialUser {
|
|
1729
|
+
id: string;
|
|
1730
|
+
name: string;
|
|
1731
|
+
displayName: string;
|
|
1732
|
+
}
|
|
1733
|
+
export interface PublicKeyCredentialCreationOptions {
|
|
1734
|
+
attestation?: string;
|
|
1735
|
+
attestationFormats?: Array<string>;
|
|
1736
|
+
authenticatorSelection?: AuthenticatorSelection;
|
|
1737
|
+
challenge: string;
|
|
1738
|
+
excludeCredentials?: Array<PublicKeyCredentialDescriptor>;
|
|
1739
|
+
extensions?: object | null;
|
|
1740
|
+
pubKeyCredParams: Array<PublicKeyCredParam>;
|
|
1741
|
+
rp: RelyingParty;
|
|
1742
|
+
user: PublicKeyCredentialUser;
|
|
1743
|
+
timeout?: number;
|
|
1744
|
+
hints?: Array<string>;
|
|
1745
|
+
}
|
|
1746
|
+
export interface PublicKeyCredentialRequestOptions {
|
|
1747
|
+
challenge: string;
|
|
1748
|
+
allowCredentials?: Array<PublicKeyCredentialDescriptor>;
|
|
1749
|
+
extensions?: object | null;
|
|
1750
|
+
rpId?: string;
|
|
1751
|
+
timeout?: number;
|
|
1752
|
+
userVerification?: string;
|
|
1753
|
+
}
|
|
1754
|
+
export interface AuthenticatorResponse {
|
|
1755
|
+
clientDataJSON: string;
|
|
1756
|
+
}
|
|
1757
|
+
export interface AuthenticatorAttestationResponse {
|
|
1758
|
+
clientDataJSON: string;
|
|
1759
|
+
attestationObject: string;
|
|
1760
|
+
}
|
|
1761
|
+
export interface WebauthnRegisterRequestBody {
|
|
1762
|
+
id: string;
|
|
1763
|
+
rawId: string;
|
|
1764
|
+
response: AuthenticatorAttestationResponse;
|
|
1765
|
+
type: string;
|
|
1766
|
+
user?: PublicKeyCredentialUser;
|
|
1767
|
+
}
|
|
1768
|
+
export interface WebauthnRegisterResponseBody {
|
|
1769
|
+
status: string;
|
|
1770
|
+
message: string;
|
|
1771
|
+
}
|
|
1772
|
+
export interface AuthenticatorAssertionResponse {
|
|
1773
|
+
clientDataJSON: string;
|
|
1774
|
+
authenticatorData: string;
|
|
1775
|
+
signature: string;
|
|
1776
|
+
userHandle: string;
|
|
1777
|
+
}
|
|
1778
|
+
export interface WebauthnAuthenticateRequestBody {
|
|
1779
|
+
id: string;
|
|
1780
|
+
rawId: string;
|
|
1781
|
+
response: AuthenticatorAssertionResponse;
|
|
1782
|
+
type: string;
|
|
1783
|
+
authenticatorAttachment?: string;
|
|
1784
|
+
}
|
|
1785
|
+
export interface WebauthnAuthenticateResponseBody {
|
|
1786
|
+
status: string;
|
|
1787
|
+
message: string;
|
|
1788
|
+
token: string;
|
|
1789
|
+
}
|
|
1666
1790
|
export declare enum GrantType {
|
|
1667
1791
|
authorizationCode = "authorization_code",
|
|
1668
1792
|
clientCredentials = "client_credentials",
|
|
@@ -1754,6 +1878,7 @@ export declare enum ApplicationType {
|
|
|
1754
1878
|
}
|
|
1755
1879
|
export interface ApplicationIosConfig {
|
|
1756
1880
|
app_id?: string | null;
|
|
1881
|
+
team_id?: string | null;
|
|
1757
1882
|
bundle_id: string;
|
|
1758
1883
|
}
|
|
1759
1884
|
export interface Application {
|
|
@@ -1778,6 +1903,7 @@ export interface CreateApplicationRequestBody {
|
|
|
1778
1903
|
type: ApplicationType;
|
|
1779
1904
|
ios_app_id?: string | null;
|
|
1780
1905
|
ios_bundle_id?: string | null;
|
|
1906
|
+
ios_team_id?: string | null;
|
|
1781
1907
|
privacy_policy_document_id?: string | null;
|
|
1782
1908
|
terms_of_service_policy_document_id?: string | null;
|
|
1783
1909
|
}
|
|
@@ -1794,6 +1920,7 @@ export interface UpdateApplicationRequestBody {
|
|
|
1794
1920
|
is_new_project?: boolean;
|
|
1795
1921
|
ios_app_id?: string | null;
|
|
1796
1922
|
ios_bundle_id?: string | null;
|
|
1923
|
+
ios_team_id?: string | null;
|
|
1797
1924
|
privacy_policy_document_id?: string | null;
|
|
1798
1925
|
terms_of_service_policy_document_id?: string | null;
|
|
1799
1926
|
icon?: ImageAssetStub | null;
|
|
@@ -1815,23 +1942,6 @@ export interface TenantOnboarding {
|
|
|
1815
1942
|
goal?: TenantOnboardingGoal | null;
|
|
1816
1943
|
application_intent?: TenantOnboardingApplicationIntent | null;
|
|
1817
1944
|
}
|
|
1818
|
-
export declare enum DomainType {
|
|
1819
|
-
managed = "managed",
|
|
1820
|
-
external = "external",
|
|
1821
|
-
subdomain = "subdomain",
|
|
1822
|
-
fallback = "fallback"
|
|
1823
|
-
}
|
|
1824
|
-
export type DomainData = ExternalDomainData;
|
|
1825
|
-
export interface Domain {
|
|
1826
|
-
id: string;
|
|
1827
|
-
type: DomainType;
|
|
1828
|
-
name: string;
|
|
1829
|
-
title: string;
|
|
1830
|
-
url: string;
|
|
1831
|
-
data?: DomainData | null;
|
|
1832
|
-
}
|
|
1833
|
-
export interface Entitlement {
|
|
1834
|
-
}
|
|
1835
1945
|
export interface TenantMetrics {
|
|
1836
1946
|
application_count: number;
|
|
1837
1947
|
child_tenant_count: number;
|
|
@@ -1841,12 +1951,6 @@ export interface TenantMetrics {
|
|
|
1841
1951
|
team_member_pending_invitation_count: number;
|
|
1842
1952
|
user_count: number;
|
|
1843
1953
|
}
|
|
1844
|
-
export interface CreateTenantRequestBody {
|
|
1845
|
-
name: string;
|
|
1846
|
-
subdomain?: string | null;
|
|
1847
|
-
is_test: boolean;
|
|
1848
|
-
parent_tenant_id?: string | null;
|
|
1849
|
-
}
|
|
1850
1954
|
export interface Tenant {
|
|
1851
1955
|
id: string;
|
|
1852
1956
|
created_at: string;
|
|
@@ -1856,10 +1960,12 @@ export interface Tenant {
|
|
|
1856
1960
|
subdomain?: string | null;
|
|
1857
1961
|
is_test: boolean;
|
|
1858
1962
|
parent_tenant_id?: string | null;
|
|
1859
|
-
onboarding?: TenantOnboarding | null;
|
|
1860
1963
|
logo?: ImageAssetStub | null;
|
|
1964
|
+
issuer?: string;
|
|
1861
1965
|
domains?: Array<Domain> | null;
|
|
1966
|
+
urls?: Array<string> | null;
|
|
1862
1967
|
entitlements?: Array<Entitlement> | null;
|
|
1968
|
+
onboarding?: TenantOnboarding | null;
|
|
1863
1969
|
metrics?: TenantMetrics | null;
|
|
1864
1970
|
}
|
|
1865
1971
|
export interface TenantInvitation {
|
|
@@ -2509,6 +2615,10 @@ declare class ParraAPI {
|
|
|
2509
2615
|
listPasswordlessConnectionsForTenant: (tenant_id: string, options?: Options) => Promise<Array<PasswordlessConnection>>;
|
|
2510
2616
|
updatePasswordlessConnectionForTenant: (tenant_id: string, passwordless_connection_id: string, body?: UpdatePasswordlessConnectionBody, options?: Options) => Promise<PasswordlessConnection>;
|
|
2511
2617
|
deletePasswordlessConnectionForTenant: (tenant_id: string, passwordless_connection_id: string, options?: Options) => Promise<Response>;
|
|
2618
|
+
webauthnRegistrationChallenge: (tenant_id: string, body?: WebauthnChallengeRequest, options?: Options) => Promise<PublicKeyCredentialCreationOptions>;
|
|
2619
|
+
webauthnAuthenticationChallenge: (tenant_id: string, body?: WebauthnChallengeRequest, options?: Options) => Promise<PublicKeyCredentialRequestOptions>;
|
|
2620
|
+
webauthnRegister: (tenant_id: string, body: WebauthnRegisterRequestBody, options?: Options) => Promise<WebauthnRegisterResponseBody>;
|
|
2621
|
+
webauthnAuthenticate: (tenant_id: string, body: WebauthnAuthenticateRequestBody, options?: Options) => Promise<WebauthnAuthenticateResponseBody>;
|
|
2512
2622
|
getClientForTenantApplication: (tenant_id: string, application_id: string, options?: Options) => Promise<Client>;
|
|
2513
2623
|
createClientForTenantApplication: (tenant_id: string, application_id: string, options?: Options) => Promise<Client>;
|
|
2514
2624
|
updateClientForTenantApplication: (tenant_id: string, application_id: string, body?: UpdateClientRequestBody, options?: Options) => Promise<Client>;
|
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.
|
|
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.DnsRecordType = exports.DnsRecordStatus = 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.DomainStatus = exports.DomainType = 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";
|
|
@@ -52,6 +52,21 @@ var ReleaseType;
|
|
|
52
52
|
ReleaseType["patch"] = "patch";
|
|
53
53
|
ReleaseType["launch"] = "launch";
|
|
54
54
|
})(ReleaseType || (exports.ReleaseType = ReleaseType = {}));
|
|
55
|
+
var DomainType;
|
|
56
|
+
(function (DomainType) {
|
|
57
|
+
DomainType["managed"] = "managed";
|
|
58
|
+
DomainType["external"] = "external";
|
|
59
|
+
DomainType["subdomain"] = "subdomain";
|
|
60
|
+
DomainType["fallback"] = "fallback";
|
|
61
|
+
})(DomainType || (exports.DomainType = DomainType = {}));
|
|
62
|
+
var DomainStatus;
|
|
63
|
+
(function (DomainStatus) {
|
|
64
|
+
DomainStatus["setup"] = "setup";
|
|
65
|
+
DomainStatus["pending"] = "pending";
|
|
66
|
+
DomainStatus["error"] = "error";
|
|
67
|
+
DomainStatus["disabled"] = "disabled";
|
|
68
|
+
DomainStatus["deleted"] = "deleted";
|
|
69
|
+
})(DomainStatus || (exports.DomainStatus = DomainStatus = {}));
|
|
55
70
|
var PolicyDocumentType;
|
|
56
71
|
(function (PolicyDocumentType) {
|
|
57
72
|
PolicyDocumentType["terms"] = "terms";
|
|
@@ -200,14 +215,6 @@ var DnsRecordType;
|
|
|
200
215
|
DnsRecordType["cname"] = "CNAME";
|
|
201
216
|
DnsRecordType["txt"] = "TXT";
|
|
202
217
|
})(DnsRecordType || (exports.DnsRecordType = DnsRecordType = {}));
|
|
203
|
-
var DomainStatus;
|
|
204
|
-
(function (DomainStatus) {
|
|
205
|
-
DomainStatus["setup"] = "setup";
|
|
206
|
-
DomainStatus["pending"] = "pending";
|
|
207
|
-
DomainStatus["error"] = "error";
|
|
208
|
-
DomainStatus["disabled"] = "disabled";
|
|
209
|
-
DomainStatus["deleted"] = "deleted";
|
|
210
|
-
})(DomainStatus || (exports.DomainStatus = DomainStatus = {}));
|
|
211
218
|
var PasswordlessStrategy;
|
|
212
219
|
(function (PasswordlessStrategy) {
|
|
213
220
|
PasswordlessStrategy["email"] = "email";
|
|
@@ -247,13 +254,6 @@ var TenantOnboardingGoal;
|
|
|
247
254
|
TenantOnboardingGoal["newProject"] = "new_project";
|
|
248
255
|
TenantOnboardingGoal["existingProject"] = "existing_project";
|
|
249
256
|
})(TenantOnboardingGoal || (exports.TenantOnboardingGoal = TenantOnboardingGoal = {}));
|
|
250
|
-
var DomainType;
|
|
251
|
-
(function (DomainType) {
|
|
252
|
-
DomainType["managed"] = "managed";
|
|
253
|
-
DomainType["external"] = "external";
|
|
254
|
-
DomainType["subdomain"] = "subdomain";
|
|
255
|
-
DomainType["fallback"] = "fallback";
|
|
256
|
-
})(DomainType || (exports.DomainType = DomainType = {}));
|
|
257
257
|
var ConnectedAppType;
|
|
258
258
|
(function (ConnectedAppType) {
|
|
259
259
|
ConnectedAppType["parra"] = "parra";
|
|
@@ -867,6 +867,30 @@ var ParraAPI = /** @class */ (function () {
|
|
|
867
867
|
if (options === void 0) { options = {}; }
|
|
868
868
|
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/auth/passwordless/connections/").concat(passwordless_connection_id), __assign({ method: "delete" }, options));
|
|
869
869
|
};
|
|
870
|
+
this.webauthnRegistrationChallenge = function (tenant_id, body, options) {
|
|
871
|
+
if (options === void 0) { options = {}; }
|
|
872
|
+
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/auth/webauthn/register/challenge"), __assign({ method: "post", body: JSON.stringify(body), headers: {
|
|
873
|
+
"content-type": "application/json",
|
|
874
|
+
} }, options));
|
|
875
|
+
};
|
|
876
|
+
this.webauthnAuthenticationChallenge = function (tenant_id, body, options) {
|
|
877
|
+
if (options === void 0) { options = {}; }
|
|
878
|
+
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/auth/webauthn/authenticate/challenge"), __assign({ method: "post", body: JSON.stringify(body), headers: {
|
|
879
|
+
"content-type": "application/json",
|
|
880
|
+
} }, options));
|
|
881
|
+
};
|
|
882
|
+
this.webauthnRegister = function (tenant_id, body, options) {
|
|
883
|
+
if (options === void 0) { options = {}; }
|
|
884
|
+
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/auth/webauthn/register"), __assign({ method: "post", body: JSON.stringify(body), headers: {
|
|
885
|
+
"content-type": "application/json",
|
|
886
|
+
} }, options));
|
|
887
|
+
};
|
|
888
|
+
this.webauthnAuthenticate = function (tenant_id, body, options) {
|
|
889
|
+
if (options === void 0) { options = {}; }
|
|
890
|
+
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/auth/webauthn/authenticate"), __assign({ method: "post", body: JSON.stringify(body), headers: {
|
|
891
|
+
"content-type": "application/json",
|
|
892
|
+
} }, options));
|
|
893
|
+
};
|
|
870
894
|
this.getClientForTenantApplication = function (tenant_id, application_id, options) {
|
|
871
895
|
if (options === void 0) { options = {}; }
|
|
872
896
|
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/applications/").concat(application_id, "/client"), __assign({ method: "get" }, options));
|