@parra/parra-js-sdk 0.3.425 → 0.3.427
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 +70 -0
- package/dist/ParraAPI.js +24 -0
- package/package.json +1 -1
package/dist/ParraAPI.d.ts
CHANGED
@@ -650,6 +650,29 @@ export interface FeaturedApplication {
|
|
650
650
|
ios?: ApplicationIosConfig | null;
|
651
651
|
link?: FeaturedApplicationLink | null;
|
652
652
|
}
|
653
|
+
export interface LinkUtmParameters {
|
654
|
+
source?: string | null;
|
655
|
+
medium?: string | null;
|
656
|
+
campaign?: string | null;
|
657
|
+
term?: string | null;
|
658
|
+
content?: string | null;
|
659
|
+
}
|
660
|
+
export interface Link {
|
661
|
+
id: string;
|
662
|
+
created_at: string;
|
663
|
+
updated_at: string;
|
664
|
+
deleted_at?: string | null;
|
665
|
+
tenant_id: string;
|
666
|
+
domain: string;
|
667
|
+
key: string;
|
668
|
+
url: string;
|
669
|
+
short_link: string;
|
670
|
+
title?: string | null;
|
671
|
+
description?: string | null;
|
672
|
+
utm?: LinkUtmParameters | null;
|
673
|
+
proxy: boolean;
|
674
|
+
rewrite: boolean;
|
675
|
+
}
|
653
676
|
export interface CreateCheckoutSessionRequestBody {
|
654
677
|
plan_id: string;
|
655
678
|
success_url?: string | null;
|
@@ -3081,6 +3104,40 @@ export interface SubdomainAvailabilityResponse {
|
|
3081
3104
|
valid: boolean;
|
3082
3105
|
message?: string | null;
|
3083
3106
|
}
|
3107
|
+
export interface LinkCollectionResponse {
|
3108
|
+
page: number;
|
3109
|
+
page_count: number;
|
3110
|
+
page_size: number;
|
3111
|
+
total_count: number;
|
3112
|
+
data: Array<Link>;
|
3113
|
+
}
|
3114
|
+
export interface CreateLinkRequestBody {
|
3115
|
+
domain: string;
|
3116
|
+
key: string;
|
3117
|
+
url: string;
|
3118
|
+
utm_source?: string | null;
|
3119
|
+
utm_medium?: string | null;
|
3120
|
+
utm_campaign?: string | null;
|
3121
|
+
utm_term?: string | null;
|
3122
|
+
utm_content?: string | null;
|
3123
|
+
proxy?: boolean;
|
3124
|
+
rewrite?: boolean;
|
3125
|
+
title?: string;
|
3126
|
+
description?: string;
|
3127
|
+
}
|
3128
|
+
export interface UpdateLinkRequestBody {
|
3129
|
+
url?: string;
|
3130
|
+
short_link?: string;
|
3131
|
+
title?: string;
|
3132
|
+
description?: string;
|
3133
|
+
utm_source?: string | null;
|
3134
|
+
utm_medium?: string | null;
|
3135
|
+
utm_campaign?: string | null;
|
3136
|
+
utm_term?: string | null;
|
3137
|
+
utm_content?: string | null;
|
3138
|
+
proxy?: boolean;
|
3139
|
+
rewrite?: boolean;
|
3140
|
+
}
|
3084
3141
|
export interface LoginTenantUserRequestBody {
|
3085
3142
|
anonymous_token?: string | null;
|
3086
3143
|
}
|
@@ -4371,6 +4428,7 @@ declare class ParraAPI {
|
|
4371
4428
|
uploadAttachmentForCreatorUpdateById: (tenant_id: string, creator_update_id: string, body: UploadImageRequestBody, options?: Options) => Promise<ImageAsset>;
|
4372
4429
|
uploadLogoForTenantById: (tenant_id: string, body: UploadImageRequestBody, options?: Options) => Promise<ImageAsset>;
|
4373
4430
|
listFeaturedApplications: (options?: Options) => Promise<Array<FeaturedApplication>>;
|
4431
|
+
getLinkByDomainAndKey: (link_domain: string, link_key: string, options?: Options) => Promise<Link>;
|
4374
4432
|
createCheckoutSession: (body: CreateCheckoutSessionRequestBody, options?: Options) => Promise<CheckoutSession>;
|
4375
4433
|
getPlansForTenantById: (tenant_id: string, options?: Options) => Promise<TenantPlansResponse>;
|
4376
4434
|
createBillingPortalSession: (tenant_id: string, options?: Options) => Promise<BillingPortalSession>;
|
@@ -4790,6 +4848,18 @@ declare class ParraAPI {
|
|
4790
4848
|
deleteExternalDomainByIdForTenantById: (tenant_id: string, external_domain_id: string, options?: Options) => Promise<Response>;
|
4791
4849
|
checkExternalDomainByIdForTenantById: (tenant_id: string, external_domain_id: string, options?: Options) => Promise<ExternalDomain>;
|
4792
4850
|
checkSubdomainAvailability: (body: SubdomainAvailabilityRequestBody, options?: Options) => Promise<SubdomainAvailabilityResponse>;
|
4851
|
+
paginateLinksForTenantById: (tenant_id: string, query?: {
|
4852
|
+
$select?: string;
|
4853
|
+
$top?: number;
|
4854
|
+
$skip?: number;
|
4855
|
+
$orderby?: string;
|
4856
|
+
$filter?: string;
|
4857
|
+
$expand?: string;
|
4858
|
+
$search?: string;
|
4859
|
+
}, options?: Options) => Promise<LinkCollectionResponse>;
|
4860
|
+
createLinkForTenantById: (tenant_id: string, body: CreateLinkRequestBody, options?: Options) => Promise<Link>;
|
4861
|
+
updateLinkByIdForTenantById: (tenant_id: string, link_id: string, body?: UpdateLinkRequestBody, options?: Options) => Promise<Link>;
|
4862
|
+
deleteLinkByIdForTenantById: (tenant_id: string, link_id: string, options?: Options) => Promise<Response>;
|
4793
4863
|
loginUserForTenant: (tenant_id: string, body?: LoginTenantUserRequestBody, options?: Options) => Promise<TenantUserInfo>;
|
4794
4864
|
getTenantUserInfo: (tenant_id: string, options?: Options) => Promise<TenantUserInfo>;
|
4795
4865
|
logoutUserForTenant: (tenant_id: string, options?: Options) => Promise<AuthLogoutResponseBody>;
|
package/dist/ParraAPI.js
CHANGED
@@ -570,6 +570,10 @@ var ParraAPI = /** @class */ (function () {
|
|
570
570
|
if (options === void 0) { options = {}; }
|
571
571
|
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/applications/featured"), __assign({ method: "get" }, options));
|
572
572
|
};
|
573
|
+
this.getLinkByDomainAndKey = function (link_domain, link_key, options) {
|
574
|
+
if (options === void 0) { options = {}; }
|
575
|
+
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/links/domains/").concat(link_domain, "/keys/").concat(link_key), __assign({ method: "get" }, options));
|
576
|
+
};
|
573
577
|
this.createCheckoutSession = function (body, options) {
|
574
578
|
if (options === void 0) { options = {}; }
|
575
579
|
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/checkout/sessions"), __assign({ method: "post", body: JSON.stringify(body), headers: {
|
@@ -1626,6 +1630,26 @@ var ParraAPI = /** @class */ (function () {
|
|
1626
1630
|
"content-type": "application/json",
|
1627
1631
|
} }, options));
|
1628
1632
|
};
|
1633
|
+
this.paginateLinksForTenantById = function (tenant_id, query, options) {
|
1634
|
+
if (options === void 0) { options = {}; }
|
1635
|
+
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/links"), __assign({ method: "get", query: query }, options));
|
1636
|
+
};
|
1637
|
+
this.createLinkForTenantById = function (tenant_id, body, options) {
|
1638
|
+
if (options === void 0) { options = {}; }
|
1639
|
+
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/links"), __assign({ method: "post", body: JSON.stringify(body), headers: {
|
1640
|
+
"content-type": "application/json",
|
1641
|
+
} }, options));
|
1642
|
+
};
|
1643
|
+
this.updateLinkByIdForTenantById = function (tenant_id, link_id, body, options) {
|
1644
|
+
if (options === void 0) { options = {}; }
|
1645
|
+
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/links/").concat(link_id), __assign({ method: "put", body: JSON.stringify(body), headers: {
|
1646
|
+
"content-type": "application/json",
|
1647
|
+
} }, options));
|
1648
|
+
};
|
1649
|
+
this.deleteLinkByIdForTenantById = function (tenant_id, link_id, options) {
|
1650
|
+
if (options === void 0) { options = {}; }
|
1651
|
+
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/links/").concat(link_id), __assign({ method: "delete" }, options));
|
1652
|
+
};
|
1629
1653
|
this.loginUserForTenant = function (tenant_id, body, options) {
|
1630
1654
|
if (options === void 0) { options = {}; }
|
1631
1655
|
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/auth/login"), __assign({ method: "post", body: JSON.stringify(body), headers: {
|