@parra/parra-js-sdk 0.3.425 → 0.3.426

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.
@@ -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_parameters?: 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,29 @@ export interface SubdomainAvailabilityResponse {
3081
3104
  valid: boolean;
3082
3105
  message?: string | null;
3083
3106
  }
3107
+ export interface CreateLinkRequestBody {
3108
+ domain: string;
3109
+ key: string;
3110
+ url: string;
3111
+ utm_parameters?: LinkUtmParameters | null;
3112
+ proxy?: boolean;
3113
+ rewrite?: boolean;
3114
+ title?: string;
3115
+ description?: string;
3116
+ }
3117
+ export interface UpdateLinkRequestBody {
3118
+ url?: string;
3119
+ short_link?: string;
3120
+ title?: string;
3121
+ description?: string;
3122
+ utm_source?: string | null;
3123
+ utm_medium?: string | null;
3124
+ utm_campaign?: string | null;
3125
+ utm_term?: string | null;
3126
+ utm_content?: string | null;
3127
+ proxy?: boolean;
3128
+ rewrite?: boolean;
3129
+ }
3084
3130
  export interface LoginTenantUserRequestBody {
3085
3131
  anonymous_token?: string | null;
3086
3132
  }
@@ -4371,6 +4417,7 @@ declare class ParraAPI {
4371
4417
  uploadAttachmentForCreatorUpdateById: (tenant_id: string, creator_update_id: string, body: UploadImageRequestBody, options?: Options) => Promise<ImageAsset>;
4372
4418
  uploadLogoForTenantById: (tenant_id: string, body: UploadImageRequestBody, options?: Options) => Promise<ImageAsset>;
4373
4419
  listFeaturedApplications: (options?: Options) => Promise<Array<FeaturedApplication>>;
4420
+ getLinkByDomainAndKey: (link_domain: string, link_key: string, options?: Options) => Promise<Link>;
4374
4421
  createCheckoutSession: (body: CreateCheckoutSessionRequestBody, options?: Options) => Promise<CheckoutSession>;
4375
4422
  getPlansForTenantById: (tenant_id: string, options?: Options) => Promise<TenantPlansResponse>;
4376
4423
  createBillingPortalSession: (tenant_id: string, options?: Options) => Promise<BillingPortalSession>;
@@ -4790,6 +4837,9 @@ declare class ParraAPI {
4790
4837
  deleteExternalDomainByIdForTenantById: (tenant_id: string, external_domain_id: string, options?: Options) => Promise<Response>;
4791
4838
  checkExternalDomainByIdForTenantById: (tenant_id: string, external_domain_id: string, options?: Options) => Promise<ExternalDomain>;
4792
4839
  checkSubdomainAvailability: (body: SubdomainAvailabilityRequestBody, options?: Options) => Promise<SubdomainAvailabilityResponse>;
4840
+ createLinkForTenantById: (tenant_id: string, body: CreateLinkRequestBody, options?: Options) => Promise<Link>;
4841
+ updateLinkByIdForTenantById: (tenant_id: string, link_id: string, body?: UpdateLinkRequestBody, options?: Options) => Promise<Link>;
4842
+ deleteLinkByIdForTenantById: (tenant_id: string, link_id: string, options?: Options) => Promise<Response>;
4793
4843
  loginUserForTenant: (tenant_id: string, body?: LoginTenantUserRequestBody, options?: Options) => Promise<TenantUserInfo>;
4794
4844
  getTenantUserInfo: (tenant_id: string, options?: Options) => Promise<TenantUserInfo>;
4795
4845
  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,22 @@ var ParraAPI = /** @class */ (function () {
1626
1630
  "content-type": "application/json",
1627
1631
  } }, options));
1628
1632
  };
1633
+ this.createLinkForTenantById = function (tenant_id, body, options) {
1634
+ if (options === void 0) { options = {}; }
1635
+ return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/links"), __assign({ method: "post", body: JSON.stringify(body), headers: {
1636
+ "content-type": "application/json",
1637
+ } }, options));
1638
+ };
1639
+ this.updateLinkByIdForTenantById = function (tenant_id, link_id, body, options) {
1640
+ if (options === void 0) { options = {}; }
1641
+ 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: {
1642
+ "content-type": "application/json",
1643
+ } }, options));
1644
+ };
1645
+ this.deleteLinkByIdForTenantById = function (tenant_id, link_id, options) {
1646
+ if (options === void 0) { options = {}; }
1647
+ return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/links/").concat(link_id), __assign({ method: "delete" }, options));
1648
+ };
1629
1649
  this.loginUserForTenant = function (tenant_id, body, options) {
1630
1650
  if (options === void 0) { options = {}; }
1631
1651
  return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/auth/login"), __assign({ method: "post", body: JSON.stringify(body), headers: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@parra/parra-js-sdk",
3
- "version": "0.3.425",
3
+ "version": "0.3.426",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",