@cemiar/cemiarlink-sdk 1.0.65 → 1.0.67
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.js +17 -7
- package/dist/models/epic/Vehicle.d.ts +1 -0
- package/dist/models/index.d.ts +0 -2
- package/dist/models/index.js +18 -10
- package/dist/services/index.d.ts +0 -1
- package/dist/services/index.js +0 -1
- package/package.json +2 -2
- package/dist/models/googleads/GoogleAds.d.ts +0 -44
- package/dist/models/googleads/GoogleAds.js +0 -2
- package/dist/models/googleads/index.d.ts +0 -1
- package/dist/models/googleads/index.js +0 -17
- package/dist/services/GoogleAdsService.d.ts +0 -24
- package/dist/services/GoogleAdsService.js +0 -35
package/dist/index.js
CHANGED
|
@@ -18,13 +18,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
18
18
|
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
19
19
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
20
20
|
};
|
|
21
|
-
var __importStar = (this && this.__importStar) || function (
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
};
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
28
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
39
|
exports.Utils = exports.Exceptions = exports.Services = exports.Models = void 0;
|
|
30
40
|
// Services
|
package/dist/models/index.d.ts
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
export * as AdminModels from './admin';
|
|
2
2
|
export * as EpicModels from './epic';
|
|
3
|
-
export * as GoogleAdsModels from './googleads';
|
|
4
3
|
export * as MailModels from './mail';
|
|
5
4
|
export * as SharepointModels from './sharepoint';
|
|
6
5
|
export * from './admin';
|
|
7
6
|
export * from './epic';
|
|
8
|
-
export * from './googleads';
|
|
9
7
|
export * from './mail';
|
|
10
8
|
export * from './sharepoint';
|
package/dist/models/index.js
CHANGED
|
@@ -15,26 +15,34 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
26
36
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
27
37
|
};
|
|
28
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.SharepointModels = exports.MailModels = exports.
|
|
39
|
+
exports.SharepointModels = exports.MailModels = exports.EpicModels = exports.AdminModels = void 0;
|
|
30
40
|
exports.AdminModels = __importStar(require("./admin"));
|
|
31
41
|
exports.EpicModels = __importStar(require("./epic"));
|
|
32
|
-
exports.GoogleAdsModels = __importStar(require("./googleads"));
|
|
33
42
|
exports.MailModels = __importStar(require("./mail"));
|
|
34
43
|
exports.SharepointModels = __importStar(require("./sharepoint"));
|
|
35
44
|
// Re-export all models directly for convenience
|
|
36
45
|
__exportStar(require("./admin"), exports);
|
|
37
46
|
__exportStar(require("./epic"), exports);
|
|
38
|
-
__exportStar(require("./googleads"), exports);
|
|
39
47
|
__exportStar(require("./mail"), exports);
|
|
40
48
|
__exportStar(require("./sharepoint"), exports);
|
package/dist/services/index.d.ts
CHANGED
package/dist/services/index.js
CHANGED
|
@@ -16,6 +16,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./Admin"), exports);
|
|
18
18
|
__exportStar(require("./epic"), exports);
|
|
19
|
-
__exportStar(require("./GoogleAdsService"), exports);
|
|
20
19
|
__exportStar(require("./Mail"), exports);
|
|
21
20
|
__exportStar(require("./SharepointService"), exports);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cemiar/cemiarlink-sdk",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.67",
|
|
4
4
|
"description": "CemiarLink SDK to access CemiarLink API services",
|
|
5
5
|
"engines": {
|
|
6
6
|
"npm": ">=9.5.1",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"dist"
|
|
16
16
|
],
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"axios": "^1.
|
|
18
|
+
"axios": "^1.21.0",
|
|
19
19
|
"nodemailer": "^9.1.1",
|
|
20
20
|
"xlsx": "https://cdn.sheetjs.com/xlsx-0.20.3/xlsx-0.20.3.tgz"
|
|
21
21
|
},
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Google Ads conversion data for upload
|
|
3
|
-
*/
|
|
4
|
-
export interface GoogleAdsConversion {
|
|
5
|
-
gclid: string;
|
|
6
|
-
conversion_action: string;
|
|
7
|
-
conversion_date_time: string;
|
|
8
|
-
conversion_value: number;
|
|
9
|
-
currency_code: string;
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* Response for conversion upload
|
|
13
|
-
*/
|
|
14
|
-
export interface GoogleAdsConversionUploadResponse {
|
|
15
|
-
job_id: string;
|
|
16
|
-
partial_failure_error?: PartialFailureError;
|
|
17
|
-
results?: any[];
|
|
18
|
-
}
|
|
19
|
-
export interface PartialFailureError {
|
|
20
|
-
details: any[];
|
|
21
|
-
code: string;
|
|
22
|
-
message: string;
|
|
23
|
-
}
|
|
24
|
-
export type ConversionAdjustmentType = "RESTATEMENT" | "RETRACTION" | "ENHANCEMENT";
|
|
25
|
-
export interface GoogleAdsConversionAdjustment {
|
|
26
|
-
gclid: string;
|
|
27
|
-
conversion_date_time: string;
|
|
28
|
-
conversion_action: string;
|
|
29
|
-
adjustment_date_time: string;
|
|
30
|
-
adjustment_type: ConversionAdjustmentType;
|
|
31
|
-
restatement_value?: number;
|
|
32
|
-
restatement_currency_code?: string;
|
|
33
|
-
}
|
|
34
|
-
export interface GoogleAdsConversionAdjustmentResponse {
|
|
35
|
-
success: boolean;
|
|
36
|
-
results: {
|
|
37
|
-
gclid: string;
|
|
38
|
-
conversion_action: string;
|
|
39
|
-
adjustment_type: ConversionAdjustmentType;
|
|
40
|
-
status: "success" | "error";
|
|
41
|
-
error?: string;
|
|
42
|
-
}[];
|
|
43
|
-
partial_failure_error?: PartialFailureError;
|
|
44
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './GoogleAds';
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./GoogleAds"), exports);
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { AxiosInstance } from 'axios';
|
|
2
|
-
import { GoogleAdsConversion, GoogleAdsConversionAdjustment, GoogleAdsConversionAdjustmentResponse, GoogleAdsConversionUploadResponse } from '../models/googleads';
|
|
3
|
-
/**
|
|
4
|
-
* GoogleAdsService provides methods to interact with Google Ads API.
|
|
5
|
-
* It offers methods for campaigns, ads, click views, conversion actions, and conversion uploads.
|
|
6
|
-
*/
|
|
7
|
-
export declare class GoogleAdsService {
|
|
8
|
-
axiosInstance: AxiosInstance;
|
|
9
|
-
constructor(baseUrl: string | undefined, headers: object);
|
|
10
|
-
/**
|
|
11
|
-
* Upload offline conversions to Google Ads
|
|
12
|
-
* @param enterprise - The enterprise identifier
|
|
13
|
-
* @param conversions - Array of conversions to upload (each requires gclid, conversion_action, conversion_date_time, conversion_value, currency_code)
|
|
14
|
-
* @returns Upload result including success status and partial failure errors if any
|
|
15
|
-
*/
|
|
16
|
-
uploadConversions(enterprise: string, conversions: GoogleAdsConversion[]): Promise<GoogleAdsConversionUploadResponse>;
|
|
17
|
-
/**
|
|
18
|
-
* Upload offline conversions adjustments to Google Ads
|
|
19
|
-
* @param enterpriseName - The enterprise identifier
|
|
20
|
-
* @param adjustments - Array of conversions adjustments to upload
|
|
21
|
-
* @returns Upload result including success status and partial failure errors if any
|
|
22
|
-
*/
|
|
23
|
-
uploadConversionAdjustments(enterpriseName: string, adjustments: GoogleAdsConversionAdjustment[]): Promise<GoogleAdsConversionAdjustmentResponse>;
|
|
24
|
-
}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.GoogleAdsService = void 0;
|
|
4
|
-
const AxiosClient_1 = require("../utils/AxiosClient");
|
|
5
|
-
const BASE_PATH = 'google-ads';
|
|
6
|
-
/**
|
|
7
|
-
* GoogleAdsService provides methods to interact with Google Ads API.
|
|
8
|
-
* It offers methods for campaigns, ads, click views, conversion actions, and conversion uploads.
|
|
9
|
-
*/
|
|
10
|
-
class GoogleAdsService {
|
|
11
|
-
constructor(baseUrl, headers) {
|
|
12
|
-
this.axiosInstance = new AxiosClient_1.AxiosClient(baseUrl, headers).getInstance();
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Upload offline conversions to Google Ads
|
|
16
|
-
* @param enterprise - The enterprise identifier
|
|
17
|
-
* @param conversions - Array of conversions to upload (each requires gclid, conversion_action, conversion_date_time, conversion_value, currency_code)
|
|
18
|
-
* @returns Upload result including success status and partial failure errors if any
|
|
19
|
-
*/
|
|
20
|
-
async uploadConversions(enterprise, conversions) {
|
|
21
|
-
const { data } = await this.axiosInstance.post(`${BASE_PATH}/${encodeURIComponent(enterprise)}/conversions`, conversions);
|
|
22
|
-
return data;
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* Upload offline conversions adjustments to Google Ads
|
|
26
|
-
* @param enterpriseName - The enterprise identifier
|
|
27
|
-
* @param adjustments - Array of conversions adjustments to upload
|
|
28
|
-
* @returns Upload result including success status and partial failure errors if any
|
|
29
|
-
*/
|
|
30
|
-
async uploadConversionAdjustments(enterpriseName, adjustments) {
|
|
31
|
-
const { data } = await this.axiosInstance.post(`${BASE_PATH}/${encodeURIComponent(enterpriseName)}/conversion-adjustments`, adjustments);
|
|
32
|
-
return data;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
exports.GoogleAdsService = GoogleAdsService;
|