@parra/parra-js-sdk 0.3.448 → 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;
@@ -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;
@@ -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.448",
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
  },