@salefony/api-sdk 1.0.11 → 1.0.12
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 +25 -4
- package/dist/index.mjs +25 -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,28 @@ 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
|
+
return this.request({
|
|
1311
|
+
method: "GET",
|
|
1312
|
+
url: "/api/admin/google/analytics/dashboard",
|
|
1313
|
+
params: options
|
|
1298
1314
|
});
|
|
1299
1315
|
}
|
|
1300
1316
|
async updateSitemap(siteUrl, sitemapUrl) {
|
|
@@ -1343,19 +1359,24 @@ var GoogleResource = class extends BaseResource {
|
|
|
1343
1359
|
/**
|
|
1344
1360
|
* Detaylı rapor (ecommerce, demographics).
|
|
1345
1361
|
* propertyId/acc verilmezse Integration Settings kullanılır.
|
|
1362
|
+
* startDate/endDate ile tarih aralığı override edilebilir.
|
|
1346
1363
|
*/
|
|
1347
1364
|
async getDetailedAnalytics(reportType, options) {
|
|
1365
|
+
const data = { reportType };
|
|
1366
|
+
if (options?.propertyId) data.propertyId = options.propertyId;
|
|
1367
|
+
if (options?.startDate) data.startDate = options.startDate;
|
|
1368
|
+
if (options?.endDate) data.endDate = options.endDate;
|
|
1348
1369
|
if (options?.acc) {
|
|
1349
1370
|
return this.request({
|
|
1350
1371
|
method: "POST",
|
|
1351
1372
|
url: `/api/admin/google/analytics/account/${options.acc}`,
|
|
1352
|
-
data
|
|
1373
|
+
data
|
|
1353
1374
|
});
|
|
1354
1375
|
}
|
|
1355
1376
|
return this.request({
|
|
1356
1377
|
method: "POST",
|
|
1357
1378
|
url: "/api/admin/google/analytics/report",
|
|
1358
|
-
data
|
|
1379
|
+
data
|
|
1359
1380
|
});
|
|
1360
1381
|
}
|
|
1361
1382
|
};
|
package/dist/index.mjs
CHANGED
|
@@ -1226,12 +1226,28 @@ 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
|
+
return this.request({
|
|
1248
|
+
method: "GET",
|
|
1249
|
+
url: "/api/admin/google/analytics/dashboard",
|
|
1250
|
+
params: options
|
|
1235
1251
|
});
|
|
1236
1252
|
}
|
|
1237
1253
|
async updateSitemap(siteUrl, sitemapUrl) {
|
|
@@ -1280,19 +1296,24 @@ var GoogleResource = class extends BaseResource {
|
|
|
1280
1296
|
/**
|
|
1281
1297
|
* Detaylı rapor (ecommerce, demographics).
|
|
1282
1298
|
* propertyId/acc verilmezse Integration Settings kullanılır.
|
|
1299
|
+
* startDate/endDate ile tarih aralığı override edilebilir.
|
|
1283
1300
|
*/
|
|
1284
1301
|
async getDetailedAnalytics(reportType, options) {
|
|
1302
|
+
const data = { reportType };
|
|
1303
|
+
if (options?.propertyId) data.propertyId = options.propertyId;
|
|
1304
|
+
if (options?.startDate) data.startDate = options.startDate;
|
|
1305
|
+
if (options?.endDate) data.endDate = options.endDate;
|
|
1285
1306
|
if (options?.acc) {
|
|
1286
1307
|
return this.request({
|
|
1287
1308
|
method: "POST",
|
|
1288
1309
|
url: `/api/admin/google/analytics/account/${options.acc}`,
|
|
1289
|
-
data
|
|
1310
|
+
data
|
|
1290
1311
|
});
|
|
1291
1312
|
}
|
|
1292
1313
|
return this.request({
|
|
1293
1314
|
method: "POST",
|
|
1294
1315
|
url: "/api/admin/google/analytics/report",
|
|
1295
|
-
data
|
|
1316
|
+
data
|
|
1296
1317
|
});
|
|
1297
1318
|
}
|
|
1298
1319
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salefony/api-sdk",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.12",
|
|
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",
|