@segment/action-destinations 3.118.1-staging.90 → 3.119.0
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/destinations/actable-predictive/index.js +1 -1
- package/dist/destinations/actable-predictive/index.js.map +1 -1
- package/dist/destinations/actable-predictive/sendCustomEvent/index.js +12 -12
- package/dist/destinations/actable-predictive/sendCustomEvent/index.js.map +1 -1
- package/dist/destinations/actable-predictive/sendEmailEvent/index.js +20 -20
- package/dist/destinations/actable-predictive/sendEmailEvent/index.js.map +1 -1
- package/dist/destinations/actable-predictive/sendTransactionEvent/index.js +28 -28
- package/dist/destinations/actable-predictive/sendTransactionEvent/index.js.map +1 -1
- package/dist/destinations/actable-predictive/sendWebEvent/index.js +25 -25
- package/dist/destinations/actable-predictive/sendWebEvent/index.js.map +1 -1
- package/dist/destinations/braze/trackEvent/generated-types.d.ts +1 -0
- package/dist/destinations/braze/trackEvent/index.js +11 -35
- package/dist/destinations/braze/trackEvent/index.js.map +1 -1
- package/dist/destinations/braze/trackPurchase/index.js +2 -43
- package/dist/destinations/braze/trackPurchase/index.js.map +1 -1
- package/dist/destinations/braze/updateUserProfile/index.js +0 -1
- package/dist/destinations/braze/updateUserProfile/index.js.map +1 -1
- package/dist/destinations/braze/utils.d.ts +6 -0
- package/dist/destinations/braze/utils.js +81 -0
- package/dist/destinations/braze/utils.js.map +1 -0
- package/dist/destinations/clevertap/userDelete/index.js +4 -4
- package/dist/destinations/clevertap/userDelete/index.js.map +1 -1
- package/dist/destinations/hubspot/errors.js +1 -1
- package/dist/destinations/hubspot/errors.js.map +1 -1
- package/dist/destinations/hubspot/upsertCompany/generated-types.d.ts +4 -2
- package/dist/destinations/hubspot/upsertCompany/index.js +24 -7
- package/dist/destinations/hubspot/upsertCompany/index.js.map +1 -1
- package/dist/destinations/index.js +0 -3
- package/dist/destinations/index.js.map +1 -1
- package/dist/destinations/mixpanel/index.js +1 -1
- package/dist/destinations/mixpanel/mixpanel-properties.js.map +1 -1
- package/dist/destinations/mixpanel/trackEvent/functions.js +1 -1
- package/dist/destinations/mixpanel/trackEvent/functions.js.map +1 -1
- package/dist/destinations/mixpanel/trackEvent/index.js.map +1 -1
- package/dist/destinations/mixpanel/trackPurchase/index.js.map +1 -1
- package/dist/destinations/mixpanel/utils.js +1 -1
- package/dist/destinations/mixpanel/utils.js.map +1 -1
- package/dist/destinations/pipedrive/createUpdateOrganization/index.js +1 -1
- package/dist/destinations/pipedrive/createUpdateOrganization/index.js.map +1 -1
- package/dist/destinations/salesforce/account/generated-types.d.ts +0 -1
- package/dist/destinations/salesforce/account/index.js +0 -1
- package/dist/destinations/salesforce/account/index.js.map +1 -1
- package/dist/destinations/salesforce/cases/generated-types.d.ts +0 -1
- package/dist/destinations/salesforce/cases/index.js +0 -1
- package/dist/destinations/salesforce/cases/index.js.map +1 -1
- package/dist/destinations/salesforce/contact/generated-types.d.ts +0 -1
- package/dist/destinations/salesforce/contact/index.js +0 -1
- package/dist/destinations/salesforce/contact/index.js.map +1 -1
- package/dist/destinations/salesforce/customObject/generated-types.d.ts +0 -1
- package/dist/destinations/salesforce/customObject/index.js +0 -1
- package/dist/destinations/salesforce/customObject/index.js.map +1 -1
- package/dist/destinations/salesforce/lead/generated-types.d.ts +0 -1
- package/dist/destinations/salesforce/lead/index.js +0 -1
- package/dist/destinations/salesforce/lead/index.js.map +1 -1
- package/dist/destinations/salesforce/opportunity/generated-types.d.ts +0 -1
- package/dist/destinations/salesforce/opportunity/index.js +0 -1
- package/dist/destinations/salesforce/opportunity/index.js.map +1 -1
- package/dist/destinations/salesforce/sf-operations.js +6 -6
- package/dist/destinations/salesforce/sf-operations.js.map +1 -1
- package/dist/destinations/salesforce/sf-properties.d.ts +0 -2
- package/dist/destinations/salesforce/sf-properties.js +1 -11
- package/dist/destinations/salesforce/sf-properties.js.map +1 -1
- package/dist/destinations/salesforce/sf-utils.js +3 -6
- package/dist/destinations/salesforce/sf-utils.js.map +1 -1
- package/dist/destinations/segment/segment-properties.js +2 -1
- package/dist/destinations/segment/segment-properties.js.map +1 -1
- package/dist/destinations/segment/sendTrack/generated-types.d.ts +1 -1
- package/package.json +2 -2
- package/dist/destinations/actions-bingads/functions.d.ts +0 -0
- package/dist/destinations/actions-bingads/functions.js +0 -2
- package/dist/destinations/actions-bingads/functions.js.map +0 -1
- package/dist/destinations/actions-bingads/generated-types.d.ts +0 -10
- package/dist/destinations/actions-bingads/generated-types.js +0 -3
- package/dist/destinations/actions-bingads/generated-types.js.map +0 -1
- package/dist/destinations/actions-bingads/index.d.ts +0 -4
- package/dist/destinations/actions-bingads/index.js +0 -77
- package/dist/destinations/actions-bingads/index.js.map +0 -1
- package/dist/destinations/actions-bingads/offlineConversions/formatter.d.ts +0 -8
- package/dist/destinations/actions-bingads/offlineConversions/formatter.js +0 -33
- package/dist/destinations/actions-bingads/offlineConversions/formatter.js.map +0 -1
- package/dist/destinations/actions-bingads/offlineConversions/generated-types.d.ts +0 -7
- package/dist/destinations/actions-bingads/offlineConversions/generated-types.js +0 -3
- package/dist/destinations/actions-bingads/offlineConversions/generated-types.js.map +0 -1
- package/dist/destinations/actions-bingads/offlineConversions/index.d.ts +0 -5
- package/dist/destinations/actions-bingads/offlineConversions/index.js +0 -131
- package/dist/destinations/actions-bingads/offlineConversions/index.js.map +0 -1
- package/dist/destinations/google-sheets-partner/constants.d.ts +0 -3
- package/dist/destinations/google-sheets-partner/constants.js +0 -7
- package/dist/destinations/google-sheets-partner/constants.js.map +0 -1
- package/dist/destinations/google-sheets-partner/generated-types.d.ts +0 -2
- package/dist/destinations/google-sheets-partner/generated-types.js +0 -3
- package/dist/destinations/google-sheets-partner/generated-types.js.map +0 -1
- package/dist/destinations/google-sheets-partner/googleapis/index.d.ts +0 -17
- package/dist/destinations/google-sheets-partner/googleapis/index.js +0 -34
- package/dist/destinations/google-sheets-partner/googleapis/index.js.map +0 -1
- package/dist/destinations/google-sheets-partner/index.d.ts +0 -4
- package/dist/destinations/google-sheets-partner/index.js +0 -43
- package/dist/destinations/google-sheets-partner/index.js.map +0 -1
- package/dist/destinations/google-sheets-partner/postSheet/generated-types.d.ts +0 -11
- package/dist/destinations/google-sheets-partner/postSheet/generated-types.js +0 -3
- package/dist/destinations/google-sheets-partner/postSheet/generated-types.js.map +0 -1
- package/dist/destinations/google-sheets-partner/postSheet/index.d.ts +0 -5
- package/dist/destinations/google-sheets-partner/postSheet/index.js +0 -79
- package/dist/destinations/google-sheets-partner/postSheet/index.js.map +0 -1
- package/dist/destinations/google-sheets-partner/postSheet/operations.d.ts +0 -10
- package/dist/destinations/google-sheets-partner/postSheet/operations.js +0 -96
- package/dist/destinations/google-sheets-partner/postSheet/operations.js.map +0 -1
|
@@ -1,131 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const formatter_1 = require("./formatter");
|
|
4
|
-
let authenticationToken = 'XXXXXXXX';
|
|
5
|
-
const action = {
|
|
6
|
-
title: 'Offline Conversions',
|
|
7
|
-
description: 'TODO',
|
|
8
|
-
fields: {
|
|
9
|
-
ConversionCurrencyCode: {
|
|
10
|
-
label: 'Conversion Currency Code',
|
|
11
|
-
description: 'Conversion Currency Code',
|
|
12
|
-
type: 'string',
|
|
13
|
-
required: true,
|
|
14
|
-
default: {
|
|
15
|
-
'@path': '$.properties.conversionCurrency'
|
|
16
|
-
}
|
|
17
|
-
},
|
|
18
|
-
ConversionName: {
|
|
19
|
-
label: 'Conversion Name',
|
|
20
|
-
description: 'Conversion Name',
|
|
21
|
-
type: 'string',
|
|
22
|
-
required: true,
|
|
23
|
-
default: {
|
|
24
|
-
'@path': '$.properties.conversionName'
|
|
25
|
-
}
|
|
26
|
-
},
|
|
27
|
-
ConversionTime: {
|
|
28
|
-
label: 'Conversion Time',
|
|
29
|
-
description: 'Conversion Time',
|
|
30
|
-
type: 'string',
|
|
31
|
-
required: true,
|
|
32
|
-
default: {
|
|
33
|
-
'@path': '$.properties.conversionTime'
|
|
34
|
-
}
|
|
35
|
-
},
|
|
36
|
-
ConversionValue: {
|
|
37
|
-
label: 'Conversion Value',
|
|
38
|
-
description: 'Conversion Value',
|
|
39
|
-
type: 'string',
|
|
40
|
-
required: true,
|
|
41
|
-
default: {
|
|
42
|
-
'@path': '$.properties.conversionValue'
|
|
43
|
-
}
|
|
44
|
-
},
|
|
45
|
-
MicrosoftClickId: {
|
|
46
|
-
label: 'Microsoft Click Id',
|
|
47
|
-
description: 'Microsoft Click Id',
|
|
48
|
-
type: 'string',
|
|
49
|
-
required: true,
|
|
50
|
-
default: {
|
|
51
|
-
'@path': '$.properties.msCId'
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
},
|
|
55
|
-
perform: async (request, data) => {
|
|
56
|
-
const response_data = await formatter_1.getAccessToken({
|
|
57
|
-
client_id: data.settings.client_id,
|
|
58
|
-
scope: data.settings.scope,
|
|
59
|
-
redirect_uri: data.settings.redirect_uri,
|
|
60
|
-
grant_type: 'refresh_token',
|
|
61
|
-
client_secret: data.settings.client_secret,
|
|
62
|
-
refresh_token: data.settings.refreshToken
|
|
63
|
-
});
|
|
64
|
-
authenticationToken = response_data.access_token;
|
|
65
|
-
console.log('Access Token retrieved using Refresh Token ');
|
|
66
|
-
let conversionTime = data.payload.ConversionTime;
|
|
67
|
-
if (conversionTime.includes('UTC')) {
|
|
68
|
-
const val2 = conversionTime.replace(' UTC', '');
|
|
69
|
-
conversionTime = val2.replace(' ', 'T');
|
|
70
|
-
}
|
|
71
|
-
const conversionCurrency = data.payload.ConversionCurrencyCode;
|
|
72
|
-
const msCId = data.payload.MicrosoftClickId;
|
|
73
|
-
const conversionValue = data.payload.ConversionValue;
|
|
74
|
-
const conversionName = data.payload.ConversionName;
|
|
75
|
-
console.log('Conversion Goal: ', conversionName);
|
|
76
|
-
const endpoint = 'https://campaign.api.bingads.microsoft.com/Api/Advertiser/CampaignManagement/V13/CampaignManagementService.svc?singleWsdl';
|
|
77
|
-
const sr = '<s:Envelope xmlns:i="http://www.w3.org/2001/XMLSchema-instance" ' +
|
|
78
|
-
'xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">' +
|
|
79
|
-
'<s:Header xmlns="https://bingads.microsoft.com/CampaignManagement/v13">' +
|
|
80
|
-
'<Action mustUnderstand="1">ApplyOfflineConversions</Action>' +
|
|
81
|
-
'<AuthenticationToken i:nil="false">' +
|
|
82
|
-
authenticationToken +
|
|
83
|
-
'</AuthenticationToken>' +
|
|
84
|
-
'<CustomerAccountId i:nil="false">' +
|
|
85
|
-
data.settings.customer_account_id +
|
|
86
|
-
'</CustomerAccountId>' +
|
|
87
|
-
'<CustomerId i:nil="false">' +
|
|
88
|
-
data.settings.customer_id +
|
|
89
|
-
'</CustomerId>' +
|
|
90
|
-
'<DeveloperToken i:nil="false">' +
|
|
91
|
-
data.settings.developer_token +
|
|
92
|
-
'</DeveloperToken>' +
|
|
93
|
-
'</s:Header>' +
|
|
94
|
-
'<s:Body>' +
|
|
95
|
-
'<ApplyOfflineConversionsRequest xmlns="https://bingads.microsoft.com/CampaignManagement/v13">' +
|
|
96
|
-
'<OfflineConversions i:nil="false"><OfflineConversion><ConversionCurrencyCode i:nil="false">' +
|
|
97
|
-
conversionCurrency +
|
|
98
|
-
'</ConversionCurrencyCode>' +
|
|
99
|
-
'<ConversionName i:nil="false">' +
|
|
100
|
-
conversionName +
|
|
101
|
-
'</ConversionName>' +
|
|
102
|
-
'<ConversionTime>' +
|
|
103
|
-
conversionTime +
|
|
104
|
-
'</ConversionTime>' +
|
|
105
|
-
'<ConversionValue i:nil="false">' +
|
|
106
|
-
conversionValue +
|
|
107
|
-
'</ConversionValue>' +
|
|
108
|
-
'<MicrosoftClickId i:nil="false">' +
|
|
109
|
-
msCId +
|
|
110
|
-
'</MicrosoftClickId></OfflineConversion></OfflineConversions>' +
|
|
111
|
-
'</ApplyOfflineConversionsRequest></s:Body></s:Envelope>';
|
|
112
|
-
try {
|
|
113
|
-
const response = await request(endpoint, {
|
|
114
|
-
method: 'post',
|
|
115
|
-
headers: {
|
|
116
|
-
SOAPAction: 'ApplyOfflineConversions',
|
|
117
|
-
'Content-Type': 'text/xml;charset=utf-8'
|
|
118
|
-
},
|
|
119
|
-
body: sr,
|
|
120
|
-
redirect: 'follow'
|
|
121
|
-
});
|
|
122
|
-
console.log('***** Conversion Attributed successfully! *****');
|
|
123
|
-
console.log(response);
|
|
124
|
-
}
|
|
125
|
-
catch (error) {
|
|
126
|
-
console.log(error.message);
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
};
|
|
130
|
-
exports.default = action;
|
|
131
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/actions-bingads/offlineConversions/index.ts"],"names":[],"mappings":";;AAIA,2CAA4C;AAE5C,IAAI,mBAAmB,GAAG,UAAU,CAAA;AAEpC,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,qBAAqB;IAC5B,WAAW,EAAE,MAAM;IACnB,MAAM,EAAE;QACN,sBAAsB,EAAE;YACtB,KAAK,EAAE,0BAA0B;YACjC,WAAW,EAAE,0BAA0B;YACvC,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE;gBACP,OAAO,EAAE,iCAAiC;aAC3C;SACF;QACD,cAAc,EAAE;YACd,KAAK,EAAE,iBAAiB;YACxB,WAAW,EAAE,iBAAiB;YAC9B,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE;gBACP,OAAO,EAAE,6BAA6B;aACvC;SACF;QACD,cAAc,EAAE;YACd,KAAK,EAAE,iBAAiB;YACxB,WAAW,EAAE,iBAAiB;YAC9B,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE;gBACP,OAAO,EAAE,6BAA6B;aACvC;SACF;QACD,eAAe,EAAE;YACf,KAAK,EAAE,k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B;IACH,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/destinations/google-sheets-partner/constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,SAAS,GAAG;IAIvB,SAAS,EAAE,MAAM;CAClB,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../src/destinations/google-sheets-partner/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { ModifiedResponse, RequestClient } from '@segment/actions-core';
|
|
2
|
-
import type { MappingSettings } from '../postSheet/operations';
|
|
3
|
-
export declare type GetResponse = {
|
|
4
|
-
range: string;
|
|
5
|
-
majorDimension: string;
|
|
6
|
-
values: string[][];
|
|
7
|
-
};
|
|
8
|
-
export declare class GoogleSheets {
|
|
9
|
-
request: RequestClient;
|
|
10
|
-
constructor(request: RequestClient);
|
|
11
|
-
get: (mappingSettings: MappingSettings, range: string) => Promise<ModifiedResponse<GetResponse>>;
|
|
12
|
-
batchUpdate: (mappingSettings: MappingSettings, batchPayload: {
|
|
13
|
-
range: string;
|
|
14
|
-
values: string[][];
|
|
15
|
-
}[]) => Promise<ModifiedResponse<unknown>>;
|
|
16
|
-
append: (mappingSettings: MappingSettings, range: string, values: string[][]) => Promise<ModifiedResponse<unknown>>;
|
|
17
|
-
}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.GoogleSheets = void 0;
|
|
4
|
-
const API_VERSION = 'v4';
|
|
5
|
-
class GoogleSheets {
|
|
6
|
-
constructor(request) {
|
|
7
|
-
this.get = async (mappingSettings, range) => {
|
|
8
|
-
return this.request(`https://sheets.googleapis.com/${API_VERSION}/spreadsheets/${mappingSettings.spreadsheetId}/values/${mappingSettings.spreadsheetName}!${range}`, {
|
|
9
|
-
method: 'get',
|
|
10
|
-
skipResponseCloning: true
|
|
11
|
-
});
|
|
12
|
-
};
|
|
13
|
-
this.batchUpdate = async (mappingSettings, batchPayload) => {
|
|
14
|
-
return this.request(`https://sheets.googleapis.com/${API_VERSION}/spreadsheets/${mappingSettings.spreadsheetId}/values:batchUpdate`, {
|
|
15
|
-
method: 'post',
|
|
16
|
-
json: {
|
|
17
|
-
valueInputOption: mappingSettings.dataFormat,
|
|
18
|
-
data: batchPayload
|
|
19
|
-
}
|
|
20
|
-
});
|
|
21
|
-
};
|
|
22
|
-
this.append = async (mappingSettings, range, values) => {
|
|
23
|
-
return this.request(`https://sheets.googleapis.com/${API_VERSION}/spreadsheets/${mappingSettings.spreadsheetId}/values/${mappingSettings.spreadsheetName}!${range}:append?valueInputOption=${mappingSettings.dataFormat}&insertDataOption=INSERT_ROWS`, {
|
|
24
|
-
method: 'post',
|
|
25
|
-
json: {
|
|
26
|
-
values: values
|
|
27
|
-
}
|
|
28
|
-
});
|
|
29
|
-
};
|
|
30
|
-
this.request = request;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
exports.GoogleSheets = GoogleSheets;
|
|
34
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/google-sheets-partner/googleapis/index.ts"],"names":[],"mappings":";;;AAGA,MAAM,WAAW,GAAG,IAAI,CAAA;AAOxB,MAAa,YAAY;IAGvB,YAAY,OAAsB;QAIlC,QAAG,GAAG,KAAK,EAAE,eAAgC,EAAE,KAAa,EAA0C,EAAE;YACtG,OAAO,IAAI,CAAC,OAAO,CACjB,iCAAiC,WAAW,iBAAiB,eAAe,CAAC,aAAa,WAAW,eAAe,CAAC,eAAe,IAAI,KAAK,EAAE,EAC/I;gBACE,MAAM,EAAE,KAAK;gBACb,mBAAmB,EAAE,IAAI;aAC1B,CACF,CAAA;QACH,CAAC,CAAA;QAED,gBAAW,GAAG,KAAK,EAAE,eAAgC,EAAE,YAAqD,EAAE,EAAE;YAC9G,OAAO,IAAI,CAAC,OAAO,CACjB,iCAAiC,WAAW,iBAAiB,eAAe,CAAC,aAAa,qBAAqB,EAC/G;gBACE,MAAM,EAAE,MAAM;gBACd,IAAI,EAAE;oBACJ,gBAAgB,EAAE,eAAe,CAAC,UAAU;oBAC5C,IAAI,EAAE,YAAY;iBACnB;aACF,CACF,CAAA;QACH,CAAC,CAAA;QAeD,WAAM,GAAG,KAAK,EAAE,eAAgC,EAAE,KAAa,EAAE,MAAkB,EAAE,EAAE;YACrF,OAAO,IAAI,CAAC,OAAO,CACjB,iCAAiC,WAAW,iBAAiB,eAAe,CAAC,aAAa,WAAW,eAAe,CAAC,eAAe,IAAI,KAAK,4BAA4B,eAAe,CAAC,UAAU,+BAA+B,EAClO;gBACE,MAAM,EAAE,MAAM;gBACd,IAAI,EAAE;oBACJ,MAAM,EAAE,MAAM;iBACf;aACF,CACF,CAAA;QACH,CAAC,CAAA;QAjDC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;IACxB,CAAC;CAiDF;AAtDD,oCAsDC"}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const postSheet_1 = __importDefault(require("./postSheet"));
|
|
7
|
-
const destination = {
|
|
8
|
-
name: 'Google Sheets (Partner Test)',
|
|
9
|
-
slug: 'actions-google-sheets-partner',
|
|
10
|
-
mode: 'cloud',
|
|
11
|
-
authentication: {
|
|
12
|
-
scheme: 'oauth-managed',
|
|
13
|
-
fields: {},
|
|
14
|
-
refreshAccessToken: async (request, { auth }) => {
|
|
15
|
-
if (!auth.refreshTokenUrl) {
|
|
16
|
-
console.log('Could not find refresh token Url');
|
|
17
|
-
auth.refreshTokenUrl = 'https://www.googleapis.com/oauth2/v4/token';
|
|
18
|
-
}
|
|
19
|
-
const res = await request(auth.refreshTokenUrl, {
|
|
20
|
-
method: 'POST',
|
|
21
|
-
body: new URLSearchParams({
|
|
22
|
-
refresh_token: auth.refreshToken,
|
|
23
|
-
client_id: auth.clientId,
|
|
24
|
-
client_secret: auth.clientSecret,
|
|
25
|
-
grant_type: 'refresh_token'
|
|
26
|
-
})
|
|
27
|
-
});
|
|
28
|
-
return { accessToken: res.data.access_token };
|
|
29
|
-
}
|
|
30
|
-
},
|
|
31
|
-
extendRequest({ auth }) {
|
|
32
|
-
return {
|
|
33
|
-
headers: {
|
|
34
|
-
authorization: `Bearer ${auth?.accessToken}`
|
|
35
|
-
}
|
|
36
|
-
};
|
|
37
|
-
},
|
|
38
|
-
actions: {
|
|
39
|
-
postSheet: postSheet_1.default
|
|
40
|
-
}
|
|
41
|
-
};
|
|
42
|
-
exports.default = destination;
|
|
43
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/destinations/google-sheets-partner/index.ts"],"names":[],"mappings":";;;;;AAGA,4DAAmC;AAQnC,MAAM,WAAW,GAAoC;IACnD,IAAI,EAAE,8BAA8B;IACpC,IAAI,EAAE,+BAA+B;IACrC,IAAI,EAAE,OAAO;IAEb,cAAc,EAAE;QACd,MAAM,EAAE,eAAe;QACvB,MAAM,EAAE,EAAE;QAMV,kBAAkB,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE;YAC9C,IAAI,CAAC,IAAI,CAAC,eAAe,EAAE;gBACzB,OAAO,CAAC,GAAG,CAAC,kCAAkC,CAAC,CAAA;gBAC/C,IAAI,CAAC,eAAe,GAAG,4CAA4C,CAAA;aACpE;YACD,MAAM,GAAG,GAAG,MAAM,OAAO,CAAuB,IAAI,CAAC,eAAe,EAAE;gBACpE,MAAM,EAAE,MAAM;gBACd,IAAI,EAAE,IAAI,eAAe,CAAC;oBACxB,aAAa,EAAE,IAAI,CAAC,YAAY;oBAChC,SAAS,EAAE,IAAI,CAAC,QAAQ;oBACxB,aAAa,EAAE,IAAI,CAAC,YAAY;oBAChC,UAAU,EAAE,eAAe;iBAC5B,CAAC;aACH,CAAC,CAAA;YAEF,OAAO,EAAE,WAAW,EAAE,GAAG,CAAC,IAAI,CAAC,YAAY,EAAE,CAAA;QAC/C,CAAC;KACF;IACD,aAAa,CAAC,EAAE,IAAI,EAAE;QACpB,OAAO;YACL,OAAO,EAAE;gBACP,aAAa,EAAE,UAAU,IAAI,EAAE,WAAW,EAAE;aAC7C;SACF,CAAA;IACH,CAAC;IAQD,OAAO,EAAE;QACP,SAAS,EAAT,mBAAS;KACV;CACF,CAAA;AAED,kBAAe,WAAW,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/google-sheets-partner/postSheet/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const operations_1 = require("./operations");
|
|
4
|
-
const action = {
|
|
5
|
-
title: 'Post Sheet',
|
|
6
|
-
description: 'Write values to a Google Sheets spreadsheet.',
|
|
7
|
-
defaultSubscription: 'event = "updated" or event = "new"',
|
|
8
|
-
fields: {
|
|
9
|
-
record_identifier: {
|
|
10
|
-
label: 'Record Identifier',
|
|
11
|
-
description: 'Property which uniquely identifies each row in the spreadsheet.',
|
|
12
|
-
type: 'string',
|
|
13
|
-
required: true,
|
|
14
|
-
default: { '@path': '$.__segment_id' }
|
|
15
|
-
},
|
|
16
|
-
operation_type: {
|
|
17
|
-
label: 'Operation Type',
|
|
18
|
-
description: "Describes the nature of the operation being performed. Only supported values are 'new' and 'updated'.",
|
|
19
|
-
type: 'hidden',
|
|
20
|
-
required: true,
|
|
21
|
-
default: { '@path': '$.event' }
|
|
22
|
-
},
|
|
23
|
-
spreadsheet_id: {
|
|
24
|
-
label: 'Spreadsheet ID',
|
|
25
|
-
description: 'The identifier of the spreadsheet. You can find this value in the URL of the spreadsheet. e.g. https://docs.google.com/spreadsheets/d/{SPREADSHEET_ID}/edit',
|
|
26
|
-
type: 'string',
|
|
27
|
-
required: true,
|
|
28
|
-
default: ''
|
|
29
|
-
},
|
|
30
|
-
spreadsheet_name: {
|
|
31
|
-
label: 'Spreadsheet Name',
|
|
32
|
-
description: 'The name of the spreadsheet. You can find this value on the tab at the bottom of the spreadsheet. Please provide a valid name of a sheet that already exists.',
|
|
33
|
-
type: 'string',
|
|
34
|
-
required: true,
|
|
35
|
-
default: 'Sheet1'
|
|
36
|
-
},
|
|
37
|
-
data_format: {
|
|
38
|
-
label: 'Data Format',
|
|
39
|
-
description: 'The way Google will interpret values. If you select raw, values will not be parsed and will be stored as-is. If you select user entered, values will be parsed as if you typed them into the UI. Numbers will stay as numbers, but strings may be converted to numbers, dates, etc. following the same rules that are applied when entering text into a cell via the Google Sheets UI.',
|
|
40
|
-
type: 'string',
|
|
41
|
-
required: true,
|
|
42
|
-
default: 'RAW',
|
|
43
|
-
choices: [
|
|
44
|
-
{ label: 'Raw', value: 'RAW' },
|
|
45
|
-
{ label: 'User Entered', value: 'USER_ENTERED' }
|
|
46
|
-
]
|
|
47
|
-
},
|
|
48
|
-
fields: {
|
|
49
|
-
label: 'Fields',
|
|
50
|
-
description: `
|
|
51
|
-
The fields to write to the spreadsheet.
|
|
52
|
-
|
|
53
|
-
On the left-hand side, input the name of the field as it will appear in the Google Sheet.
|
|
54
|
-
|
|
55
|
-
On the right-hand side, select the field from your data model that maps to the given field in your sheet.
|
|
56
|
-
|
|
57
|
-
---
|
|
58
|
-
|
|
59
|
-
`,
|
|
60
|
-
type: 'object',
|
|
61
|
-
required: true,
|
|
62
|
-
defaultObjectUI: 'keyvalue:only'
|
|
63
|
-
},
|
|
64
|
-
enable_batching: {
|
|
65
|
-
type: 'boolean',
|
|
66
|
-
label: 'Batch Data to Google Sheets',
|
|
67
|
-
description: 'Set as true to ensure Segment sends data to Google Sheets in batches. Please do not set to false.',
|
|
68
|
-
default: true
|
|
69
|
-
}
|
|
70
|
-
},
|
|
71
|
-
perform: (request, { payload }) => {
|
|
72
|
-
return operations_1.processData(request, [payload]);
|
|
73
|
-
},
|
|
74
|
-
performBatch: (request, { payload }) => {
|
|
75
|
-
return operations_1.processData(request, payload);
|
|
76
|
-
}
|
|
77
|
-
};
|
|
78
|
-
exports.default = action;
|
|
79
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/google-sheets-partner/postSheet/index.ts"],"names":[],"mappings":";;AAIA,6CAA0C;AAE1C,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,YAAY;IACnB,WAAW,EAAE,8CAA8C;IAC3D,mBAAmB,EAAE,oCAAoC;IAEzD,MAAM,EAAE;QACN,iBAAiB,EAAE;YACjB,KAAK,EAAE,mBAAmB;YAC1B,WAAW,EAAE,iEAAiE;YAC9E,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE,EAAE,OAAO,EAAE,gBAAgB,EAAE;SACvC;QACD,cAAc,EAAE;YACd,KAAK,EAAE,gBAAgB;YACvB,WAAW,EACT,uGAAuG;YACzG,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE;SAChC;QACD,cAAc,EAAE;YACd,KAAK,EAAE,gBAAgB;YACvB,WAAW,EACT,6JAA6J;YAC/J,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE,EAAE;SACZ;QACD,gBAAgB,EAAE;YAChB,KAAK,EAAE,kBAAkB;YACzB,WAAW,EACT,+JAA+J;YACjK,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE,QAAQ;SAClB;QACD,WAAW,EAAE;YACX,KAAK,EAAE,aAAa;YACpB,WAAW,EACT,wXAAwX;YAC1X,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE,KAAK;YACd,OAAO,EAAE;gBACP,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE;gBAC9B,EAAE,KAAK,EAAE,cAAc,EAAE,KAAK,EAAE,cAAc,EAAE;aACjD;SACF;QACD,MAAM,EAAE;YACN,KAAK,EAAE,QAAQ;YACf,WAAW,EAAE;;;;;;;;;GAShB;YACG,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,eAAe,EAAE,eAAe;SACjC;QACD,eAAe,EAAE;YACf,IAAI,EAAE,SAAS;YACf,KAAK,EAAE,6BAA6B;YACpC,WAAW,EAAE,mGAAmG;YAChH,OAAO,EAAE,IAAI;SACd;KACF;IACD,OAAO,EAAE,CAAC,OAAO,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE;QAChC,OAAO,wBAAW,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,CAAC,CAAA;IACxC,CAAC;IACD,YAAY,EAAE,CAAC,OAAO,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE;QACrC,OAAO,wBAAW,CAAC,OAAO,EAAE,OAAO,CAAC,CAAA;IACtC,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { Payload } from './generated-types';
|
|
2
|
-
import { RequestClient } from '@segment/actions-core';
|
|
3
|
-
export declare type MappingSettings = {
|
|
4
|
-
spreadsheetId: string;
|
|
5
|
-
spreadsheetName: string;
|
|
6
|
-
dataFormat: string;
|
|
7
|
-
columns: string[];
|
|
8
|
-
};
|
|
9
|
-
declare function processData(request: RequestClient, events: Payload[]): Promise<(import("@segment/actions-core").ModifiedResponse<unknown> | undefined)[]>;
|
|
10
|
-
export { processData };
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.processData = void 0;
|
|
7
|
-
const actions_core_1 = require("@segment/actions-core");
|
|
8
|
-
const index_1 = require("../googleapis/index");
|
|
9
|
-
const constants_1 = require("../constants");
|
|
10
|
-
const a1_notation_1 = __importDefault(require("@segment/a1-notation"));
|
|
11
|
-
const DATA_ROW_OFFSET = 2;
|
|
12
|
-
const generateColumnValuesFromFields = (identifier, fields, columns) => {
|
|
13
|
-
const retVal = columns.map((col) => fields[col] ?? '');
|
|
14
|
-
retVal.unshift(identifier);
|
|
15
|
-
return retVal;
|
|
16
|
-
};
|
|
17
|
-
function processGetSpreadsheetResponse(response, events, mappingSettings) {
|
|
18
|
-
const numColumns = mappingSettings.columns.length;
|
|
19
|
-
const numRows = response.values?.length;
|
|
20
|
-
if (numRows * numColumns > constants_1.CONSTANTS.MAX_CELLS) {
|
|
21
|
-
throw new actions_core_1.IntegrationError('Sheet has reached maximum limit', 'INVALID_REQUEST_DATA', 400);
|
|
22
|
-
}
|
|
23
|
-
const updateBatch = [];
|
|
24
|
-
const appendBatch = [];
|
|
25
|
-
const eventMap = new Map(events.map((e) => [e.record_identifier, e]));
|
|
26
|
-
if (response.values && response.values.length > 0) {
|
|
27
|
-
for (let i = 0; i < response.values.length; i++) {
|
|
28
|
-
const targetIdentifier = response.values[i][0];
|
|
29
|
-
if (eventMap.has(targetIdentifier)) {
|
|
30
|
-
const targetEvent = eventMap.get(targetIdentifier);
|
|
31
|
-
if (targetEvent.operation_type != 'deleted') {
|
|
32
|
-
updateBatch.push({
|
|
33
|
-
identifier: targetIdentifier,
|
|
34
|
-
event: targetEvent.fields,
|
|
35
|
-
index: i
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
eventMap.delete(targetIdentifier);
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
eventMap.forEach((value, key) => {
|
|
43
|
-
if (value.operation_type != 'deleted') {
|
|
44
|
-
appendBatch.push({
|
|
45
|
-
identifier: key,
|
|
46
|
-
event: value.fields
|
|
47
|
-
});
|
|
48
|
-
}
|
|
49
|
-
});
|
|
50
|
-
return { appendBatch, updateBatch };
|
|
51
|
-
}
|
|
52
|
-
async function processUpdateBatch(mappingSettings, updateBatch, gs) {
|
|
53
|
-
const getRange = (targetIndex, columnCount) => {
|
|
54
|
-
const targetRange = new a1_notation_1.default(1, targetIndex);
|
|
55
|
-
targetRange.addX(columnCount);
|
|
56
|
-
return targetRange.toString();
|
|
57
|
-
};
|
|
58
|
-
const batchPayload = updateBatch.map(({ identifier, event, index }) => {
|
|
59
|
-
const values = generateColumnValuesFromFields(identifier, event, mappingSettings.columns);
|
|
60
|
-
return {
|
|
61
|
-
range: `${mappingSettings.spreadsheetName}!${getRange(index + DATA_ROW_OFFSET, values.length)}`,
|
|
62
|
-
values: [values]
|
|
63
|
-
};
|
|
64
|
-
});
|
|
65
|
-
const headerRowRange = new a1_notation_1.default(1, 1, 1, mappingSettings.columns.length + 1);
|
|
66
|
-
batchPayload.push({
|
|
67
|
-
range: `${mappingSettings.spreadsheetName}!${headerRowRange.toString()}`,
|
|
68
|
-
values: [['id', ...mappingSettings.columns]]
|
|
69
|
-
});
|
|
70
|
-
return gs.batchUpdate(mappingSettings, batchPayload);
|
|
71
|
-
}
|
|
72
|
-
async function processAppendBatch(mappingSettings, appendBatch, gs) {
|
|
73
|
-
if (appendBatch.length <= 0) {
|
|
74
|
-
return;
|
|
75
|
-
}
|
|
76
|
-
const values = appendBatch.map(({ identifier, event }) => generateColumnValuesFromFields(identifier, event, mappingSettings.columns));
|
|
77
|
-
return gs.append(mappingSettings, `A${DATA_ROW_OFFSET}`, values);
|
|
78
|
-
}
|
|
79
|
-
async function processData(request, events) {
|
|
80
|
-
const mappingSettings = {
|
|
81
|
-
spreadsheetId: events[0].spreadsheet_id,
|
|
82
|
-
spreadsheetName: events[0].spreadsheet_name,
|
|
83
|
-
dataFormat: events[0].data_format,
|
|
84
|
-
columns: Object.getOwnPropertyNames(events[0].fields)
|
|
85
|
-
};
|
|
86
|
-
const gs = new index_1.GoogleSheets(request);
|
|
87
|
-
const response = await gs.get(mappingSettings, `A${DATA_ROW_OFFSET}:A`);
|
|
88
|
-
const { appendBatch, updateBatch } = processGetSpreadsheetResponse(response.data, events, mappingSettings);
|
|
89
|
-
const promises = [
|
|
90
|
-
processUpdateBatch(mappingSettings, updateBatch, gs),
|
|
91
|
-
processAppendBatch(mappingSettings, appendBatch, gs)
|
|
92
|
-
];
|
|
93
|
-
return await Promise.all(promises);
|
|
94
|
-
}
|
|
95
|
-
exports.processData = processData;
|
|
96
|
-
//# sourceMappingURL=operations.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"operations.js","sourceRoot":"","sources":["../../../../src/destinations/google-sheets-partner/postSheet/operations.ts"],"names":[],"mappings":";;;;;;AACA,wDAAuE;AACvE,+CAA+D;AAC/D,4CAAwC;AAExC,uEAAqC;AA4BrC,MAAM,eAAe,GAAG,CAAC,CAAA;AAwBzB,MAAM,8BAA8B,GAAG,CAAC,UAAkB,EAAE,MAAc,EAAE,OAAiB,EAAE,EAAE;IAC/F,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,CAAA;IACtD,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,CAAA;IAC1B,OAAO,MAAM,CAAA;AACf,CAAC,CAAA;AAQD,SAAS,6BAA6B,CAAC,QAAqB,EAAE,MAAiB,EAAE,eAAgC;IAC/G,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