@parra/parra-js-sdk 0.3.448 → 0.3.450
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 +31 -4
- package/dist/ParraAPI.js +6 -0
- package/package.json +2 -2
package/dist/ParraAPI.d.ts
CHANGED
@@ -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;
|
@@ -3212,6 +3213,31 @@ export interface UpdateLinkRequestBody {
|
|
3212
3213
|
proxy?: boolean;
|
3213
3214
|
rewrite?: boolean;
|
3214
3215
|
}
|
3216
|
+
export interface CreateClickRequestBody {
|
3217
|
+
url: string;
|
3218
|
+
continent: string;
|
3219
|
+
country: string;
|
3220
|
+
region: string;
|
3221
|
+
city: string;
|
3222
|
+
latitude: number;
|
3223
|
+
longitude: number;
|
3224
|
+
device: string;
|
3225
|
+
device_model: string;
|
3226
|
+
device_vendor: string;
|
3227
|
+
browser: string;
|
3228
|
+
browser_version: string;
|
3229
|
+
os: string;
|
3230
|
+
os_version: string;
|
3231
|
+
engine: string;
|
3232
|
+
engine_version: string;
|
3233
|
+
cpu_architecture: string;
|
3234
|
+
ua: string;
|
3235
|
+
bot: boolean;
|
3236
|
+
referer: string | null;
|
3237
|
+
referer_url: string | null;
|
3238
|
+
ip: string;
|
3239
|
+
qr: boolean;
|
3240
|
+
}
|
3215
3241
|
export interface LoginTenantUserRequestBody {
|
3216
3242
|
anonymous_token?: string | null;
|
3217
3243
|
}
|
@@ -4966,6 +4992,7 @@ declare class ParraAPI {
|
|
4966
4992
|
createLinkForTenantById: (tenant_id: string, body: CreateLinkRequestBody, options?: Options) => Promise<Link>;
|
4967
4993
|
updateLinkByIdForTenantById: (tenant_id: string, link_id: string, body?: UpdateLinkRequestBody, options?: Options) => Promise<Link>;
|
4968
4994
|
deleteLinkByIdForTenantById: (tenant_id: string, link_id: string, options?: Options) => Promise<Response>;
|
4995
|
+
recordClickForLink: (tenant_id: string, link_id: string, body: CreateClickRequestBody, options?: Options) => Promise<Response>;
|
4969
4996
|
loginUserForTenant: (tenant_id: string, body?: LoginTenantUserRequestBody, options?: Options) => Promise<TenantUserInfo>;
|
4970
4997
|
getTenantUserInfo: (tenant_id: string, options?: Options) => Promise<TenantUserInfo>;
|
4971
4998
|
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.
|
3
|
+
"version": "0.3.450",
|
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.
|
21
|
+
"@types/node": "^22.13.9",
|
22
22
|
"prettier": "^3.3.3",
|
23
23
|
"typescript": "^5.7.3"
|
24
24
|
},
|