@salefony/api-sdk 1.0.11 → 1.0.13
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/index.d.mts +20 -1
- package/dist/index.d.ts +20 -1
- package/dist/index.js +32 -4
- package/dist/index.mjs +32 -4
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1225,8 +1225,24 @@ declare class GoogleResource extends BaseResource {
|
|
|
1225
1225
|
getSites(): Promise<ApiResponse<any>>;
|
|
1226
1226
|
/**
|
|
1227
1227
|
* Temel analytics verisi. propertyId verilmezse Integration Settings'teki activePropertyId kullanılır.
|
|
1228
|
+
* startDate/endDate: YYYY-MM-DD veya 7daysAgo, 30daysAgo, today formatında.
|
|
1228
1229
|
*/
|
|
1229
|
-
getAnalytics(propertyId?: string
|
|
1230
|
+
getAnalytics(propertyId?: string, options?: {
|
|
1231
|
+
startDate?: string;
|
|
1232
|
+
endDate?: string;
|
|
1233
|
+
}): Promise<ApiResponse<any>>;
|
|
1234
|
+
/**
|
|
1235
|
+
* Dashboard analytics - Integration Settings'te seçilen rapor tipleri.
|
|
1236
|
+
* Filtreler: country (virgülle OR), device (desktop|mobile|tablet), source, medium
|
|
1237
|
+
*/
|
|
1238
|
+
getDashboardAnalytics(options?: {
|
|
1239
|
+
startDate?: string;
|
|
1240
|
+
endDate?: string;
|
|
1241
|
+
country?: string;
|
|
1242
|
+
device?: string;
|
|
1243
|
+
source?: string;
|
|
1244
|
+
medium?: string;
|
|
1245
|
+
}): Promise<ApiResponse<any>>;
|
|
1230
1246
|
updateSitemap(siteUrl: string, sitemapUrl: string): Promise<ApiResponse<any>>;
|
|
1231
1247
|
getPerformance(siteUrl: string, startDate: string, endDate: string): Promise<ApiResponse<any>>;
|
|
1232
1248
|
connectGoogleAnalytics(data: {
|
|
@@ -1244,10 +1260,13 @@ declare class GoogleResource extends BaseResource {
|
|
|
1244
1260
|
/**
|
|
1245
1261
|
* Detaylı rapor (ecommerce, demographics).
|
|
1246
1262
|
* propertyId/acc verilmezse Integration Settings kullanılır.
|
|
1263
|
+
* startDate/endDate ile tarih aralığı override edilebilir.
|
|
1247
1264
|
*/
|
|
1248
1265
|
getDetailedAnalytics(reportType: string, options?: {
|
|
1249
1266
|
acc?: string;
|
|
1250
1267
|
propertyId?: string;
|
|
1268
|
+
startDate?: string;
|
|
1269
|
+
endDate?: string;
|
|
1251
1270
|
}): Promise<ApiResponse<any>>;
|
|
1252
1271
|
}
|
|
1253
1272
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1225,8 +1225,24 @@ declare class GoogleResource extends BaseResource {
|
|
|
1225
1225
|
getSites(): Promise<ApiResponse<any>>;
|
|
1226
1226
|
/**
|
|
1227
1227
|
* Temel analytics verisi. propertyId verilmezse Integration Settings'teki activePropertyId kullanılır.
|
|
1228
|
+
* startDate/endDate: YYYY-MM-DD veya 7daysAgo, 30daysAgo, today formatında.
|
|
1228
1229
|
*/
|
|
1229
|
-
getAnalytics(propertyId?: string
|
|
1230
|
+
getAnalytics(propertyId?: string, options?: {
|
|
1231
|
+
startDate?: string;
|
|
1232
|
+
endDate?: string;
|
|
1233
|
+
}): Promise<ApiResponse<any>>;
|
|
1234
|
+
/**
|
|
1235
|
+
* Dashboard analytics - Integration Settings'te seçilen rapor tipleri.
|
|
1236
|
+
* Filtreler: country (virgülle OR), device (desktop|mobile|tablet), source, medium
|
|
1237
|
+
*/
|
|
1238
|
+
getDashboardAnalytics(options?: {
|
|
1239
|
+
startDate?: string;
|
|
1240
|
+
endDate?: string;
|
|
1241
|
+
country?: string;
|
|
1242
|
+
device?: string;
|
|
1243
|
+
source?: string;
|
|
1244
|
+
medium?: string;
|
|
1245
|
+
}): Promise<ApiResponse<any>>;
|
|
1230
1246
|
updateSitemap(siteUrl: string, sitemapUrl: string): Promise<ApiResponse<any>>;
|
|
1231
1247
|
getPerformance(siteUrl: string, startDate: string, endDate: string): Promise<ApiResponse<any>>;
|
|
1232
1248
|
connectGoogleAnalytics(data: {
|
|
@@ -1244,10 +1260,13 @@ declare class GoogleResource extends BaseResource {
|
|
|
1244
1260
|
/**
|
|
1245
1261
|
* Detaylı rapor (ecommerce, demographics).
|
|
1246
1262
|
* propertyId/acc verilmezse Integration Settings kullanılır.
|
|
1263
|
+
* startDate/endDate ile tarih aralığı override edilebilir.
|
|
1247
1264
|
*/
|
|
1248
1265
|
getDetailedAnalytics(reportType: string, options?: {
|
|
1249
1266
|
acc?: string;
|
|
1250
1267
|
propertyId?: string;
|
|
1268
|
+
startDate?: string;
|
|
1269
|
+
endDate?: string;
|
|
1251
1270
|
}): Promise<ApiResponse<any>>;
|
|
1252
1271
|
}
|
|
1253
1272
|
|
package/dist/index.js
CHANGED
|
@@ -1289,12 +1289,35 @@ var GoogleResource = class extends BaseResource {
|
|
|
1289
1289
|
}
|
|
1290
1290
|
/**
|
|
1291
1291
|
* Temel analytics verisi. propertyId verilmezse Integration Settings'teki activePropertyId kullanılır.
|
|
1292
|
+
* startDate/endDate: YYYY-MM-DD veya 7daysAgo, 30daysAgo, today formatında.
|
|
1292
1293
|
*/
|
|
1293
|
-
async getAnalytics(propertyId) {
|
|
1294
|
+
async getAnalytics(propertyId, options) {
|
|
1295
|
+
const params = {};
|
|
1296
|
+
if (propertyId) params.propertyId = propertyId;
|
|
1297
|
+
if (options?.startDate) params.startDate = options.startDate;
|
|
1298
|
+
if (options?.endDate) params.endDate = options.endDate;
|
|
1294
1299
|
return this.request({
|
|
1295
1300
|
method: "GET",
|
|
1296
1301
|
url: "/api/admin/google/analytics",
|
|
1297
|
-
params:
|
|
1302
|
+
params: Object.keys(params).length ? params : void 0
|
|
1303
|
+
});
|
|
1304
|
+
}
|
|
1305
|
+
/**
|
|
1306
|
+
* Dashboard analytics - Integration Settings'te seçilen rapor tipleri.
|
|
1307
|
+
* Filtreler: country (virgülle OR), device (desktop|mobile|tablet), source, medium
|
|
1308
|
+
*/
|
|
1309
|
+
async getDashboardAnalytics(options) {
|
|
1310
|
+
const params = {};
|
|
1311
|
+
if (options?.startDate) params.startDate = options.startDate;
|
|
1312
|
+
if (options?.endDate) params.endDate = options.endDate;
|
|
1313
|
+
if (options?.country) params.country = options.country;
|
|
1314
|
+
if (options?.device) params.device = options.device;
|
|
1315
|
+
if (options?.source) params.source = options.source;
|
|
1316
|
+
if (options?.medium) params.medium = options.medium;
|
|
1317
|
+
return this.request({
|
|
1318
|
+
method: "GET",
|
|
1319
|
+
url: "/api/admin/google/analytics/dashboard",
|
|
1320
|
+
params: Object.keys(params).length ? params : void 0
|
|
1298
1321
|
});
|
|
1299
1322
|
}
|
|
1300
1323
|
async updateSitemap(siteUrl, sitemapUrl) {
|
|
@@ -1343,19 +1366,24 @@ var GoogleResource = class extends BaseResource {
|
|
|
1343
1366
|
/**
|
|
1344
1367
|
* Detaylı rapor (ecommerce, demographics).
|
|
1345
1368
|
* propertyId/acc verilmezse Integration Settings kullanılır.
|
|
1369
|
+
* startDate/endDate ile tarih aralığı override edilebilir.
|
|
1346
1370
|
*/
|
|
1347
1371
|
async getDetailedAnalytics(reportType, options) {
|
|
1372
|
+
const data = { reportType };
|
|
1373
|
+
if (options?.propertyId) data.propertyId = options.propertyId;
|
|
1374
|
+
if (options?.startDate) data.startDate = options.startDate;
|
|
1375
|
+
if (options?.endDate) data.endDate = options.endDate;
|
|
1348
1376
|
if (options?.acc) {
|
|
1349
1377
|
return this.request({
|
|
1350
1378
|
method: "POST",
|
|
1351
1379
|
url: `/api/admin/google/analytics/account/${options.acc}`,
|
|
1352
|
-
data
|
|
1380
|
+
data
|
|
1353
1381
|
});
|
|
1354
1382
|
}
|
|
1355
1383
|
return this.request({
|
|
1356
1384
|
method: "POST",
|
|
1357
1385
|
url: "/api/admin/google/analytics/report",
|
|
1358
|
-
data
|
|
1386
|
+
data
|
|
1359
1387
|
});
|
|
1360
1388
|
}
|
|
1361
1389
|
};
|
package/dist/index.mjs
CHANGED
|
@@ -1226,12 +1226,35 @@ var GoogleResource = class extends BaseResource {
|
|
|
1226
1226
|
}
|
|
1227
1227
|
/**
|
|
1228
1228
|
* Temel analytics verisi. propertyId verilmezse Integration Settings'teki activePropertyId kullanılır.
|
|
1229
|
+
* startDate/endDate: YYYY-MM-DD veya 7daysAgo, 30daysAgo, today formatında.
|
|
1229
1230
|
*/
|
|
1230
|
-
async getAnalytics(propertyId) {
|
|
1231
|
+
async getAnalytics(propertyId, options) {
|
|
1232
|
+
const params = {};
|
|
1233
|
+
if (propertyId) params.propertyId = propertyId;
|
|
1234
|
+
if (options?.startDate) params.startDate = options.startDate;
|
|
1235
|
+
if (options?.endDate) params.endDate = options.endDate;
|
|
1231
1236
|
return this.request({
|
|
1232
1237
|
method: "GET",
|
|
1233
1238
|
url: "/api/admin/google/analytics",
|
|
1234
|
-
params:
|
|
1239
|
+
params: Object.keys(params).length ? params : void 0
|
|
1240
|
+
});
|
|
1241
|
+
}
|
|
1242
|
+
/**
|
|
1243
|
+
* Dashboard analytics - Integration Settings'te seçilen rapor tipleri.
|
|
1244
|
+
* Filtreler: country (virgülle OR), device (desktop|mobile|tablet), source, medium
|
|
1245
|
+
*/
|
|
1246
|
+
async getDashboardAnalytics(options) {
|
|
1247
|
+
const params = {};
|
|
1248
|
+
if (options?.startDate) params.startDate = options.startDate;
|
|
1249
|
+
if (options?.endDate) params.endDate = options.endDate;
|
|
1250
|
+
if (options?.country) params.country = options.country;
|
|
1251
|
+
if (options?.device) params.device = options.device;
|
|
1252
|
+
if (options?.source) params.source = options.source;
|
|
1253
|
+
if (options?.medium) params.medium = options.medium;
|
|
1254
|
+
return this.request({
|
|
1255
|
+
method: "GET",
|
|
1256
|
+
url: "/api/admin/google/analytics/dashboard",
|
|
1257
|
+
params: Object.keys(params).length ? params : void 0
|
|
1235
1258
|
});
|
|
1236
1259
|
}
|
|
1237
1260
|
async updateSitemap(siteUrl, sitemapUrl) {
|
|
@@ -1280,19 +1303,24 @@ var GoogleResource = class extends BaseResource {
|
|
|
1280
1303
|
/**
|
|
1281
1304
|
* Detaylı rapor (ecommerce, demographics).
|
|
1282
1305
|
* propertyId/acc verilmezse Integration Settings kullanılır.
|
|
1306
|
+
* startDate/endDate ile tarih aralığı override edilebilir.
|
|
1283
1307
|
*/
|
|
1284
1308
|
async getDetailedAnalytics(reportType, options) {
|
|
1309
|
+
const data = { reportType };
|
|
1310
|
+
if (options?.propertyId) data.propertyId = options.propertyId;
|
|
1311
|
+
if (options?.startDate) data.startDate = options.startDate;
|
|
1312
|
+
if (options?.endDate) data.endDate = options.endDate;
|
|
1285
1313
|
if (options?.acc) {
|
|
1286
1314
|
return this.request({
|
|
1287
1315
|
method: "POST",
|
|
1288
1316
|
url: `/api/admin/google/analytics/account/${options.acc}`,
|
|
1289
|
-
data
|
|
1317
|
+
data
|
|
1290
1318
|
});
|
|
1291
1319
|
}
|
|
1292
1320
|
return this.request({
|
|
1293
1321
|
method: "POST",
|
|
1294
1322
|
url: "/api/admin/google/analytics/report",
|
|
1295
|
-
data
|
|
1323
|
+
data
|
|
1296
1324
|
});
|
|
1297
1325
|
}
|
|
1298
1326
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salefony/api-sdk",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.13",
|
|
4
4
|
"description": "Salefony API SDK - Official SDK for Salefony Backend API. Full TypeScript support, SSR-ready, Admin & Frontstore resources.",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.mjs",
|