@parra/parra-js-sdk 0.3.447 → 0.3.449

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.
@@ -1170,6 +1170,10 @@ export interface FlagMessageRequestBody {
1170
1170
  export interface CreateReactionRequestBody {
1171
1171
  option_id: string;
1172
1172
  }
1173
+ export interface TenantUserNameStub {
1174
+ id: string;
1175
+ name: string;
1176
+ }
1173
1177
  export interface Reaction {
1174
1178
  id: string;
1175
1179
  created_at: string;
@@ -1177,6 +1181,7 @@ export interface Reaction {
1177
1181
  deleted_at?: string | null;
1178
1182
  option_id: string;
1179
1183
  user_id: string;
1184
+ user: TenantUserNameStub;
1180
1185
  }
1181
1186
  export interface AppFaq {
1182
1187
  id: string;
@@ -1637,10 +1642,6 @@ export interface ReactionOptionGroup {
1637
1642
  description?: string | null;
1638
1643
  options: Array<ReactionOption>;
1639
1644
  }
1640
- export interface TenantUserNameStub {
1641
- id: string;
1642
- name: string;
1643
- }
1644
1645
  export interface ReactionSummary {
1645
1646
  id: string;
1646
1647
  name: string;
@@ -1772,7 +1773,7 @@ export interface SubmitCommentReviewRequestBody {
1772
1773
  }
1773
1774
  export interface SubmitFeedbackFormResponseBody {
1774
1775
  }
1775
- export interface FeedbackFormResponse {
1776
+ export interface FeedbackForm {
1776
1777
  id: string;
1777
1778
  created_at: string;
1778
1779
  updated_at: string;
@@ -1782,7 +1783,7 @@ export interface FeedbackFormResponse {
1782
1783
  description?: string | null;
1783
1784
  data: FeedbackFormData;
1784
1785
  }
1785
- export interface FeedbackFormSubmission {
1786
+ export interface FeedbackFormResponse {
1786
1787
  id: string;
1787
1788
  created_at: string;
1788
1789
  updated_at: string;
@@ -1790,15 +1791,15 @@ export interface FeedbackFormSubmission {
1790
1791
  feedback_form_id: string;
1791
1792
  user_id: string;
1792
1793
  data: SubmitFeedbackFormResponseBody;
1793
- form?: FeedbackFormResponse;
1794
+ form?: FeedbackForm;
1794
1795
  user?: TenantUserStub | null;
1795
1796
  }
1796
- export interface FeedbackFormSubmissionCollectionResponse {
1797
+ export interface FeedbackFormResponseCollectionResponse {
1797
1798
  page: number;
1798
1799
  page_count: number;
1799
1800
  page_size: number;
1800
1801
  total_count: number;
1801
- data: Array<FeedbackFormSubmission>;
1802
+ data: Array<FeedbackFormResponse>;
1802
1803
  }
1803
1804
  export declare enum QuestionType {
1804
1805
  choice = "choice",
@@ -3186,18 +3187,29 @@ export interface LinkCollectionResponse {
3186
3187
  data: Array<Link>;
3187
3188
  }
3188
3189
  export interface CreateLinkRequestBody {
3189
- domain: string;
3190
- key: string;
3191
3190
  url: string;
3192
- utm_source?: string | null;
3193
- utm_medium?: string | null;
3194
- utm_campaign?: string | null;
3195
- utm_term?: string | null;
3196
- utm_content?: string | null;
3197
- proxy?: boolean;
3198
- rewrite?: boolean;
3199
- title?: string;
3200
- description?: string;
3191
+ continent: string;
3192
+ country: string;
3193
+ region: string;
3194
+ city: string;
3195
+ latitude: number;
3196
+ longitude: number;
3197
+ device: string;
3198
+ device_model: string;
3199
+ device_vendor: string;
3200
+ browser: string;
3201
+ browser_version: string;
3202
+ os: string;
3203
+ os_version: string;
3204
+ engine: string;
3205
+ engine_version: string;
3206
+ cpu_architecture: string;
3207
+ ua: string;
3208
+ bot: boolean;
3209
+ referer: string | null;
3210
+ referer_url: string | null;
3211
+ ip: string;
3212
+ qr: boolean;
3201
3213
  }
3202
3214
  export interface UpdateLinkRequestBody {
3203
3215
  url?: string;
@@ -4706,7 +4718,7 @@ declare class ParraAPI {
4706
4718
  $filter?: string;
4707
4719
  $expand?: string;
4708
4720
  $search?: string;
4709
- }, options?: Options) => Promise<FeedbackFormSubmissionCollectionResponse>;
4721
+ }, options?: Options) => Promise<FeedbackFormResponseCollectionResponse>;
4710
4722
  getFormById: (feedback_form_id: string, options?: Options) => Promise<FeedbackFormDataStub>;
4711
4723
  submitFormById: (feedback_form_id: string, body?: SubmitFeedbackFormResponseBody, options?: Options) => Promise<Response>;
4712
4724
  createQuestion: (body: CreateQuestionRequestBody, options?: Options) => Promise<Question>;
@@ -4747,11 +4759,11 @@ declare class ParraAPI {
4747
4759
  $expand?: string;
4748
4760
  $search?: string;
4749
4761
  }, options?: Options) => Promise<FeedbackFormCollectionResponse>;
4750
- createFeedbackFormForTenantById: (tenant_id: string, body?: CreateFeedbackFormRequestBody, options?: Options) => Promise<FeedbackFormResponse>;
4762
+ createFeedbackFormForTenantById: (tenant_id: string, body?: CreateFeedbackFormRequestBody, options?: Options) => Promise<FeedbackForm>;
4751
4763
  getFeedbackFormForTenantById: (tenant_id: string, feedback_form_id: string, query?: {
4752
4764
  include?: string;
4753
- }, options?: Options) => Promise<FeedbackFormResponse>;
4754
- updateFeedbackFormForTenantById: (tenant_id: string, feedback_form_id: string, body: UpdateFeedbackFormRequestBody, options?: Options) => Promise<FeedbackFormResponse>;
4765
+ }, options?: Options) => Promise<FeedbackForm>;
4766
+ updateFeedbackFormForTenantById: (tenant_id: string, feedback_form_id: string, body: UpdateFeedbackFormRequestBody, options?: Options) => Promise<FeedbackForm>;
4755
4767
  deleteFeedbackFormForTenantById: (tenant_id: string, feedback_form_id: string, options?: Options) => Promise<Response>;
4756
4768
  paginateFeedbackFormResponsesForTenantById: (tenant_id: string, feedback_form_id: string, query?: {
4757
4769
  $select?: string;
@@ -4761,7 +4773,7 @@ declare class ParraAPI {
4761
4773
  $filter?: string;
4762
4774
  $expand?: string;
4763
4775
  $search?: string;
4764
- }, options?: Options) => Promise<FeedbackFormSubmissionCollectionResponse>;
4776
+ }, options?: Options) => Promise<FeedbackFormResponseCollectionResponse>;
4765
4777
  deleteFeedbackFormResponseById: (tenant_id: string, feedback_form_id: string, feedback_form_response_id: string, options?: Options) => Promise<Response>;
4766
4778
  createAnalyticEventTypeForTenantById: (tenant_id: string, body: CreateAnalyticEventTypeRequestBody, options?: Options) => Promise<AnalyticEventType>;
4767
4779
  paginateAnalyticEventTypesForTenantById: (tenant_id: string, query?: {
@@ -4966,6 +4978,7 @@ declare class ParraAPI {
4966
4978
  createLinkForTenantById: (tenant_id: string, body: CreateLinkRequestBody, options?: Options) => Promise<Link>;
4967
4979
  updateLinkByIdForTenantById: (tenant_id: string, link_id: string, body?: UpdateLinkRequestBody, options?: Options) => Promise<Link>;
4968
4980
  deleteLinkByIdForTenantById: (tenant_id: string, link_id: string, options?: Options) => Promise<Response>;
4981
+ recordClickForLink: (tenant_id: string, link_id: string, body: CreateLinkRequestBody, options?: Options) => Promise<Response>;
4969
4982
  loginUserForTenant: (tenant_id: string, body?: LoginTenantUserRequestBody, options?: Options) => Promise<TenantUserInfo>;
4970
4983
  getTenantUserInfo: (tenant_id: string, options?: Options) => Promise<TenantUserInfo>;
4971
4984
  logoutUserForTenant: (tenant_id: string, options?: Options) => Promise<AuthLogoutResponseBody>;
package/dist/ParraAPI.js CHANGED
@@ -1722,6 +1722,12 @@ var ParraAPI = /** @class */ (function () {
1722
1722
  if (options === void 0) { options = {}; }
1723
1723
  return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/links/").concat(link_id), __assign({ method: "delete" }, options));
1724
1724
  };
1725
+ this.recordClickForLink = function (tenant_id, link_id, body, options) {
1726
+ if (options === void 0) { options = {}; }
1727
+ return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/links/").concat(link_id, "/clicks"), __assign({ method: "post", body: JSON.stringify(body), headers: {
1728
+ "content-type": "application/json",
1729
+ }, raw: true }, options));
1730
+ };
1725
1731
  this.loginUserForTenant = function (tenant_id, body, options) {
1726
1732
  if (options === void 0) { options = {}; }
1727
1733
  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.447",
3
+ "version": "0.3.449",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -18,7 +18,7 @@
18
18
  "author": "Parra",
19
19
  "license": "ISC",
20
20
  "devDependencies": {
21
- "@types/node": "^22.10.9",
21
+ "@types/node": "^22.13.9",
22
22
  "prettier": "^3.3.3",
23
23
  "typescript": "^5.7.3"
24
24
  },