@segment/action-destinations 3.134.0 → 3.135.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.
Files changed (91) hide show
  1. package/dist/destinations/blackbaud-raisers-edge-nxt/api/index.d.ts +17 -12
  2. package/dist/destinations/blackbaud-raisers-edge-nxt/api/index.js +299 -32
  3. package/dist/destinations/blackbaud-raisers-edge-nxt/api/index.js.map +1 -1
  4. package/dist/destinations/blackbaud-raisers-edge-nxt/constants/index.d.ts +3 -1
  5. package/dist/destinations/blackbaud-raisers-edge-nxt/constants/index.js +4 -2
  6. package/dist/destinations/blackbaud-raisers-edge-nxt/constants/index.js.map +1 -1
  7. package/dist/destinations/blackbaud-raisers-edge-nxt/createGift/fixtures.d.ts +27 -0
  8. package/dist/destinations/blackbaud-raisers-edge-nxt/createGift/fixtures.js +60 -0
  9. package/dist/destinations/blackbaud-raisers-edge-nxt/createGift/fixtures.js.map +1 -0
  10. package/dist/destinations/blackbaud-raisers-edge-nxt/createGift/generated-types.d.ts +63 -0
  11. package/dist/destinations/blackbaud-raisers-edge-nxt/createGift/generated-types.js +3 -0
  12. package/dist/destinations/blackbaud-raisers-edge-nxt/createGift/generated-types.js.map +1 -0
  13. package/dist/destinations/blackbaud-raisers-edge-nxt/createGift/index.d.ts +5 -0
  14. package/dist/destinations/blackbaud-raisers-edge-nxt/createGift/index.js +242 -0
  15. package/dist/destinations/blackbaud-raisers-edge-nxt/createGift/index.js.map +1 -0
  16. package/dist/destinations/blackbaud-raisers-edge-nxt/createOrUpdateIndividualConstituent/fixtures.js +1 -1
  17. package/dist/destinations/blackbaud-raisers-edge-nxt/createOrUpdateIndividualConstituent/fixtures.js.map +1 -1
  18. package/dist/destinations/blackbaud-raisers-edge-nxt/createOrUpdateIndividualConstituent/generated-types.d.ts +1 -0
  19. package/dist/destinations/blackbaud-raisers-edge-nxt/createOrUpdateIndividualConstituent/index.d.ts +3 -1
  20. package/dist/destinations/blackbaud-raisers-edge-nxt/createOrUpdateIndividualConstituent/index.js +277 -550
  21. package/dist/destinations/blackbaud-raisers-edge-nxt/createOrUpdateIndividualConstituent/index.js.map +1 -1
  22. package/dist/destinations/blackbaud-raisers-edge-nxt/index.js +2 -0
  23. package/dist/destinations/blackbaud-raisers-edge-nxt/index.js.map +1 -1
  24. package/dist/destinations/blackbaud-raisers-edge-nxt/types/index.d.ts +61 -8
  25. package/dist/destinations/blackbaud-raisers-edge-nxt/utils/index.d.ts +6 -1
  26. package/dist/destinations/blackbaud-raisers-edge-nxt/utils/index.js +149 -5
  27. package/dist/destinations/blackbaud-raisers-edge-nxt/utils/index.js.map +1 -1
  28. package/dist/destinations/engage-messaging-sendgrid/sendEmail/generated-types.d.ts +1 -1
  29. package/dist/destinations/engage-messaging-sendgrid/sendEmail/index.js +5 -2
  30. package/dist/destinations/engage-messaging-sendgrid/sendEmail/index.js.map +1 -1
  31. package/dist/destinations/engage-messaging-twilio/sendSms/generated-types.d.ts +1 -1
  32. package/dist/destinations/engage-messaging-twilio/sendSms/index.js +0 -1
  33. package/dist/destinations/engage-messaging-twilio/sendSms/index.js.map +1 -1
  34. package/dist/destinations/engage-messaging-twilio/sendSms/sms-sender.js +4 -1
  35. package/dist/destinations/engage-messaging-twilio/sendSms/sms-sender.js.map +1 -1
  36. package/dist/destinations/google-analytics-4/index.js +1 -1
  37. package/dist/destinations/google-analytics-4/index.js.map +1 -1
  38. package/dist/destinations/index.js +1 -0
  39. package/dist/destinations/index.js.map +1 -1
  40. package/dist/destinations/ironclad/recordAction.types.d.ts +12 -0
  41. package/dist/destinations/ironclad/recordAction.types.js +3 -0
  42. package/dist/destinations/ironclad/recordAction.types.js.map +1 -0
  43. package/dist/destinations/mixpanel/mixpanel-properties.js +0 -8
  44. package/dist/destinations/mixpanel/mixpanel-properties.js.map +1 -1
  45. package/dist/destinations/mixpanel/trackEvent/generated-types.d.ts +0 -3
  46. package/dist/destinations/mixpanel/trackPurchase/generated-types.d.ts +0 -3
  47. package/dist/destinations/outfunnel/forwardGroupEvent/generated-types.d.ts +14 -0
  48. package/dist/destinations/outfunnel/forwardGroupEvent/generated-types.js +3 -0
  49. package/dist/destinations/outfunnel/forwardGroupEvent/generated-types.js.map +1 -0
  50. package/dist/destinations/outfunnel/forwardGroupEvent/index.d.ts +5 -0
  51. package/dist/destinations/outfunnel/forwardGroupEvent/index.js +83 -0
  52. package/dist/destinations/outfunnel/forwardGroupEvent/index.js.map +1 -0
  53. package/dist/destinations/outfunnel/forwardIdentifyEvent/generated-types.d.ts +13 -0
  54. package/dist/destinations/outfunnel/forwardIdentifyEvent/generated-types.js +3 -0
  55. package/dist/destinations/outfunnel/forwardIdentifyEvent/generated-types.js.map +1 -0
  56. package/dist/destinations/outfunnel/forwardIdentifyEvent/index.d.ts +5 -0
  57. package/dist/destinations/outfunnel/forwardIdentifyEvent/index.js +76 -0
  58. package/dist/destinations/outfunnel/forwardIdentifyEvent/index.js.map +1 -0
  59. package/dist/destinations/outfunnel/forwardTrackEvent/generated-types.d.ts +15 -0
  60. package/dist/destinations/outfunnel/forwardTrackEvent/generated-types.js +3 -0
  61. package/dist/destinations/outfunnel/forwardTrackEvent/generated-types.js.map +1 -0
  62. package/dist/destinations/outfunnel/forwardTrackEvent/index.d.ts +5 -0
  63. package/dist/destinations/outfunnel/forwardTrackEvent/index.js +97 -0
  64. package/dist/destinations/outfunnel/forwardTrackEvent/index.js.map +1 -0
  65. package/dist/destinations/outfunnel/generated-types.d.ts +4 -0
  66. package/dist/destinations/outfunnel/generated-types.js +3 -0
  67. package/dist/destinations/outfunnel/generated-types.js.map +1 -0
  68. package/dist/destinations/outfunnel/index.d.ts +4 -0
  69. package/dist/destinations/outfunnel/index.js +54 -0
  70. package/dist/destinations/outfunnel/index.js.map +1 -0
  71. package/dist/destinations/outfunnel/presets.d.ts +2 -0
  72. package/dist/destinations/outfunnel/presets.js +31 -0
  73. package/dist/destinations/outfunnel/presets.js.map +1 -0
  74. package/dist/destinations/outfunnel/utils.d.ts +1 -0
  75. package/dist/destinations/outfunnel/utils.js +7 -0
  76. package/dist/destinations/outfunnel/utils.js.map +1 -0
  77. package/dist/destinations/qualtrics/qualtricsApiClient.js +3 -1
  78. package/dist/destinations/qualtrics/qualtricsApiClient.js.map +1 -1
  79. package/dist/destinations/ripe/group/index.js +0 -1
  80. package/dist/destinations/ripe/group/index.js.map +1 -1
  81. package/dist/destinations/ripe/identify/index.js +0 -1
  82. package/dist/destinations/ripe/identify/index.js.map +1 -1
  83. package/dist/destinations/ripe/page/index.js +0 -1
  84. package/dist/destinations/ripe/page/index.js.map +1 -1
  85. package/dist/destinations/ripe/track/index.js +0 -1
  86. package/dist/destinations/ripe/track/index.js.map +1 -1
  87. package/dist/destinations/segment-profiles/segment-properties.js +1 -1
  88. package/dist/destinations/twilio/sendSMS.types.d.ts +1 -0
  89. package/dist/destinations/voucherify/index.js +1 -1
  90. package/dist/destinations/voucherify/index.js.map +1 -1
  91. package/package.json +2 -2
@@ -1,20 +1,25 @@
1
- import type { RequestClient, ModifiedResponse } from '@segment/actions-core';
1
+ import { ModifiedResponse, RequestClient } from '@segment/actions-core';
2
+ import { Address, Constituent, CreateConstituentResult, Email, ExistingConstituentResult, Gift, OnlinePresence, Phone, UpdateConstituentResult } from '../types';
2
3
  export declare class BlackbaudSkyApi {
3
4
  request: RequestClient;
4
5
  constructor(request: RequestClient);
5
- getExistingConstituents(searchField: string, searchText: string): Promise<ModifiedResponse>;
6
- createConstituent(constituentData: object): Promise<ModifiedResponse>;
7
- updateConstituent(constituentId: string, constituentData: object): Promise<ModifiedResponse>;
6
+ searchForConstituents(searchField: string, searchText: string): Promise<ModifiedResponse>;
7
+ getExistingConstituent(emailData?: Partial<Email>, lookupId?: string): Promise<ExistingConstituentResult>;
8
+ createConstituent(constituentData: Constituent): Promise<ModifiedResponse>;
9
+ createConstituentWithRelatedObjects(constituentData: Constituent, addressData: Partial<Address>, emailData: Partial<Email>, onlinePresenceData: Partial<OnlinePresence>, phoneData: Partial<Phone>): Promise<CreateConstituentResult>;
10
+ updateConstituent(constituentId: string, constituentData: Partial<Constituent>): Promise<ModifiedResponse>;
8
11
  getConstituentAddressList(constituentId: string): Promise<ModifiedResponse>;
9
- createConstituentAddress(constituentId: string, constituentAddressData: object): Promise<ModifiedResponse>;
10
- updateConstituentAddressById(addressId: string, constituentAddressData: object): Promise<ModifiedResponse>;
12
+ createConstituentAddress(constituentId: string, addressData: Address): Promise<ModifiedResponse>;
13
+ updateConstituentAddressById(addressId: string, addressData: Address): Promise<ModifiedResponse>;
11
14
  getConstituentEmailList(constituentId: string): Promise<ModifiedResponse>;
12
- createConstituentEmail(constituentId: string, constituentEmailData: object): Promise<ModifiedResponse>;
13
- updateConstituentEmailById(emailId: string, constituentEmailData: object): Promise<ModifiedResponse>;
15
+ createConstituentEmail(constituentId: string, emailData: Email): Promise<ModifiedResponse>;
16
+ updateConstituentEmailById(emailId: string, emailData: Email): Promise<ModifiedResponse>;
14
17
  getConstituentOnlinePresenceList(constituentId: string): Promise<ModifiedResponse>;
15
- createConstituentOnlinePresence(constituentId: string, constituentOnlinePresenceData: object): Promise<ModifiedResponse>;
16
- updateConstituentOnlinePresenceById(onlinePresenceId: string, constituentOnlinePresenceData: object): Promise<ModifiedResponse>;
18
+ createConstituentOnlinePresence(constituentId: string, onlinePresenceData: OnlinePresence): Promise<ModifiedResponse>;
19
+ updateConstituentOnlinePresenceById(onlinePresenceId: string, onlinePresenceData: OnlinePresence): Promise<ModifiedResponse>;
17
20
  getConstituentPhoneList(constituentId: string): Promise<ModifiedResponse>;
18
- createConstituentPhone(constituentId: string, constituentPhoneData: object): Promise<ModifiedResponse>;
19
- updateConstituentPhoneById(phoneId: string, constituentPhoneData: object): Promise<ModifiedResponse>;
21
+ createConstituentPhone(constituentId: string, phoneData: Phone): Promise<ModifiedResponse>;
22
+ updateConstituentWithRelatedObjects(constituentId: string, constituentData: Partial<Constituent>, addressData: Partial<Address>, emailData: Partial<Email>, onlinePresenceData: Partial<OnlinePresence>, phoneData: Partial<Phone>): Promise<UpdateConstituentResult>;
23
+ updateConstituentPhoneById(phoneId: string, phoneData: Partial<Phone>): Promise<ModifiedResponse>;
24
+ createGift(giftData: Gift): Promise<ModifiedResponse>;
20
25
  }
@@ -1,133 +1,400 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.BlackbaudSkyApi = void 0;
4
+ const actions_core_1 = require("@segment/actions-core");
4
5
  const constants_1 = require("../constants");
6
+ const utils_1 = require("../utils");
5
7
  class BlackbaudSkyApi {
6
8
  constructor(request) {
7
9
  this.request = request;
8
10
  }
9
- async getExistingConstituents(searchField, searchText) {
10
- return this.request(`${constants_1.SKY_API_BASE_URL}/constituents/search?search_field=${searchField}&search_text=${searchText}`, {
11
+ async searchForConstituents(searchField, searchText) {
12
+ return this.request(`${constants_1.SKY_API_CONSTITUENT_URL}/constituents/search?search_field=${searchField}&search_text=${searchText}`, {
11
13
  method: 'get'
12
14
  });
13
15
  }
16
+ async getExistingConstituent(emailData, lookupId) {
17
+ let constituentId = undefined;
18
+ let searchField = 'email_address';
19
+ let searchText = emailData?.address || '';
20
+ if (lookupId) {
21
+ searchField = 'lookup_id';
22
+ searchText = lookupId;
23
+ }
24
+ const constituentSearchResponse = await this.searchForConstituents(searchField, searchText);
25
+ const constituentSearchResults = await constituentSearchResponse.json();
26
+ if (constituentSearchResults.count > 1) {
27
+ throw new actions_core_1.IntegrationError('Multiple records returned for given traits', 'MULTIPLE_EXISTING_RECORDS', 400);
28
+ }
29
+ else if (constituentSearchResults.count === 1) {
30
+ constituentId = constituentSearchResults.value[0].id;
31
+ }
32
+ else if (constituentSearchResults.count !== 0) {
33
+ throw new actions_core_1.IntegrationError('Unexpected constituent record count for given traits', 'UNEXPECTED_RECORD_COUNT', 500);
34
+ }
35
+ return Promise.resolve({
36
+ id: constituentId
37
+ });
38
+ }
14
39
  async createConstituent(constituentData) {
15
- return this.request(`${constants_1.SKY_API_BASE_URL}/constituents`, {
40
+ return this.request(`${constants_1.SKY_API_CONSTITUENT_URL}/constituents`, {
16
41
  method: 'post',
17
42
  json: constituentData
18
43
  });
19
44
  }
45
+ async createConstituentWithRelatedObjects(constituentData, addressData, emailData, onlinePresenceData, phoneData) {
46
+ constituentData.type = 'Individual';
47
+ if (!constituentData.last) {
48
+ throw new actions_core_1.IntegrationError('Missing last name value', 'MISSING_REQUIRED_FIELD', 400);
49
+ }
50
+ if (Object.keys(addressData).length > 0) {
51
+ constituentData.address = addressData;
52
+ }
53
+ if (Object.keys(emailData).length > 0) {
54
+ constituentData.email = emailData;
55
+ }
56
+ if (Object.keys(onlinePresenceData).length > 0) {
57
+ constituentData.online_presence = onlinePresenceData;
58
+ }
59
+ if (Object.keys(phoneData).length > 0) {
60
+ constituentData.phone = phoneData;
61
+ }
62
+ const createConstituentResponse = await this.createConstituent(constituentData);
63
+ const constituentResult = await createConstituentResponse.json();
64
+ return Promise.resolve({
65
+ id: constituentResult.id
66
+ });
67
+ }
20
68
  async updateConstituent(constituentId, constituentData) {
21
- return this.request(`${constants_1.SKY_API_BASE_URL}/constituents/${constituentId}`, {
69
+ return this.request(`${constants_1.SKY_API_CONSTITUENT_URL}/constituents/${constituentId}`, {
22
70
  method: 'patch',
23
71
  json: constituentData,
24
72
  throwHttpErrors: false
25
73
  });
26
74
  }
27
75
  async getConstituentAddressList(constituentId) {
28
- return this.request(`${constants_1.SKY_API_BASE_URL}/constituents/${constituentId}/addresses?include_inactive=true`, {
76
+ return this.request(`${constants_1.SKY_API_CONSTITUENT_URL}/constituents/${constituentId}/addresses?include_inactive=true`, {
29
77
  method: 'get',
30
78
  throwHttpErrors: false
31
79
  });
32
80
  }
33
- async createConstituentAddress(constituentId, constituentAddressData) {
34
- return this.request(`${constants_1.SKY_API_BASE_URL}/addresses`, {
81
+ async createConstituentAddress(constituentId, addressData) {
82
+ return this.request(`${constants_1.SKY_API_CONSTITUENT_URL}/addresses`, {
35
83
  method: 'post',
36
84
  json: {
37
- ...constituentAddressData,
85
+ ...addressData,
38
86
  constituent_id: constituentId
39
87
  },
40
88
  throwHttpErrors: false
41
89
  });
42
90
  }
43
- async updateConstituentAddressById(addressId, constituentAddressData) {
44
- return this.request(`${constants_1.SKY_API_BASE_URL}/addresses/${addressId}`, {
91
+ async updateConstituentAddressById(addressId, addressData) {
92
+ return this.request(`${constants_1.SKY_API_CONSTITUENT_URL}/addresses/${addressId}`, {
45
93
  method: 'patch',
46
94
  json: {
47
- ...constituentAddressData,
95
+ ...addressData,
48
96
  inactive: false
49
97
  },
50
98
  throwHttpErrors: false
51
99
  });
52
100
  }
53
101
  async getConstituentEmailList(constituentId) {
54
- return this.request(`${constants_1.SKY_API_BASE_URL}/constituents/${constituentId}/emailaddresses?include_inactive=true`, {
102
+ return this.request(`${constants_1.SKY_API_CONSTITUENT_URL}/constituents/${constituentId}/emailaddresses?include_inactive=true`, {
55
103
  method: 'get',
56
104
  throwHttpErrors: false
57
105
  });
58
106
  }
59
- async createConstituentEmail(constituentId, constituentEmailData) {
60
- return this.request(`${constants_1.SKY_API_BASE_URL}/emailaddresses`, {
107
+ async createConstituentEmail(constituentId, emailData) {
108
+ return this.request(`${constants_1.SKY_API_CONSTITUENT_URL}/emailaddresses`, {
61
109
  method: 'post',
62
110
  json: {
63
- ...constituentEmailData,
111
+ ...emailData,
64
112
  constituent_id: constituentId
65
113
  },
66
114
  throwHttpErrors: false
67
115
  });
68
116
  }
69
- async updateConstituentEmailById(emailId, constituentEmailData) {
70
- return this.request(`${constants_1.SKY_API_BASE_URL}/emailaddresses/${emailId}`, {
117
+ async updateConstituentEmailById(emailId, emailData) {
118
+ return this.request(`${constants_1.SKY_API_CONSTITUENT_URL}/emailaddresses/${emailId}`, {
71
119
  method: 'patch',
72
120
  json: {
73
- ...constituentEmailData,
121
+ ...emailData,
74
122
  inactive: false
75
123
  },
76
124
  throwHttpErrors: false
77
125
  });
78
126
  }
79
127
  async getConstituentOnlinePresenceList(constituentId) {
80
- return this.request(`${constants_1.SKY_API_BASE_URL}/constituents/${constituentId}/onlinepresences?include_inactive=true`, {
128
+ return this.request(`${constants_1.SKY_API_CONSTITUENT_URL}/constituents/${constituentId}/onlinepresences?include_inactive=true`, {
81
129
  method: 'get',
82
130
  throwHttpErrors: false
83
131
  });
84
132
  }
85
- async createConstituentOnlinePresence(constituentId, constituentOnlinePresenceData) {
86
- return this.request(`${constants_1.SKY_API_BASE_URL}/onlinepresences`, {
133
+ async createConstituentOnlinePresence(constituentId, onlinePresenceData) {
134
+ return this.request(`${constants_1.SKY_API_CONSTITUENT_URL}/onlinepresences`, {
87
135
  method: 'post',
88
136
  json: {
89
- ...constituentOnlinePresenceData,
137
+ ...onlinePresenceData,
90
138
  constituent_id: constituentId
91
139
  },
92
140
  throwHttpErrors: false
93
141
  });
94
142
  }
95
- async updateConstituentOnlinePresenceById(onlinePresenceId, constituentOnlinePresenceData) {
96
- return this.request(`${constants_1.SKY_API_BASE_URL}/onlinepresences/${onlinePresenceId}`, {
143
+ async updateConstituentOnlinePresenceById(onlinePresenceId, onlinePresenceData) {
144
+ return this.request(`${constants_1.SKY_API_CONSTITUENT_URL}/onlinepresences/${onlinePresenceId}`, {
97
145
  method: 'patch',
98
146
  json: {
99
- ...constituentOnlinePresenceData,
147
+ ...onlinePresenceData,
100
148
  inactive: false
101
149
  },
102
150
  throwHttpErrors: false
103
151
  });
104
152
  }
105
153
  async getConstituentPhoneList(constituentId) {
106
- return this.request(`${constants_1.SKY_API_BASE_URL}/constituents/${constituentId}/phones?include_inactive=true`, {
154
+ return this.request(`${constants_1.SKY_API_CONSTITUENT_URL}/constituents/${constituentId}/phones?include_inactive=true`, {
107
155
  method: 'get',
108
156
  throwHttpErrors: false
109
157
  });
110
158
  }
111
- async createConstituentPhone(constituentId, constituentPhoneData) {
112
- return this.request(`${constants_1.SKY_API_BASE_URL}/phones`, {
159
+ async createConstituentPhone(constituentId, phoneData) {
160
+ return this.request(`${constants_1.SKY_API_CONSTITUENT_URL}/phones`, {
113
161
  method: 'post',
114
162
  json: {
115
- ...constituentPhoneData,
163
+ ...phoneData,
116
164
  constituent_id: constituentId
117
165
  },
118
166
  throwHttpErrors: false
119
167
  });
120
168
  }
121
- async updateConstituentPhoneById(phoneId, constituentPhoneData) {
122
- return this.request(`${constants_1.SKY_API_BASE_URL}/phones/${phoneId}`, {
169
+ async updateConstituentWithRelatedObjects(constituentId, constituentData, addressData, emailData, onlinePresenceData, phoneData) {
170
+ const integrationErrors = [];
171
+ if (Object.keys(constituentData).length > 0) {
172
+ const updateConstituentResponse = await this.updateConstituent(constituentId, constituentData);
173
+ if (updateConstituentResponse.status !== 200) {
174
+ const statusCode = updateConstituentResponse.status;
175
+ const errorMessage = statusCode
176
+ ? `${statusCode} error occurred when updating constituent`
177
+ : 'Error occurred when updating constituent';
178
+ if (utils_1.isRequestErrorRetryable(statusCode)) {
179
+ throw new actions_core_1.RetryableError(errorMessage);
180
+ }
181
+ else {
182
+ integrationErrors.push(errorMessage);
183
+ }
184
+ }
185
+ }
186
+ if (Object.keys(addressData).length > 0) {
187
+ const getConstituentAddressListResponse = await this.getConstituentAddressList(constituentId);
188
+ let updateAddressErrorCode = undefined;
189
+ if (getConstituentAddressListResponse.status !== 200) {
190
+ updateAddressErrorCode = getConstituentAddressListResponse.status;
191
+ }
192
+ else {
193
+ const constituentAddressListResults = await getConstituentAddressListResponse.json();
194
+ let existingAddress = undefined;
195
+ if (constituentAddressListResults.count > 0) {
196
+ existingAddress = utils_1.filterObjectListByMatchFields(constituentAddressListResults.value, addressData, [
197
+ 'address_lines',
198
+ 'city',
199
+ 'postal_code',
200
+ 'state'
201
+ ]);
202
+ }
203
+ if (!existingAddress) {
204
+ if (addressData.primary !== false && constituentAddressListResults.count === 0) {
205
+ addressData.primary = true;
206
+ }
207
+ const createConstituentAddressResponse = await this.createConstituentAddress(constituentId, addressData);
208
+ if (createConstituentAddressResponse.status !== 200) {
209
+ updateAddressErrorCode = createConstituentAddressResponse.status;
210
+ }
211
+ }
212
+ else {
213
+ if (existingAddress.inactive ||
214
+ (addressData.do_not_mail !== undefined && addressData.do_not_mail !== existingAddress.do_not_mail) ||
215
+ (addressData.primary !== undefined &&
216
+ addressData.primary &&
217
+ addressData.primary !== existingAddress.primary) ||
218
+ addressData.type !== existingAddress.type) {
219
+ const updateConstituentAddressByIdResponse = await this.updateConstituentAddressById(existingAddress.id, addressData);
220
+ if (updateConstituentAddressByIdResponse.status !== 200) {
221
+ updateAddressErrorCode = updateConstituentAddressByIdResponse.status;
222
+ }
223
+ }
224
+ }
225
+ }
226
+ if (updateAddressErrorCode) {
227
+ const errorMessage = updateAddressErrorCode
228
+ ? `${updateAddressErrorCode} error occurred when updating constituent address`
229
+ : 'Error occurred when updating constituent address';
230
+ if (utils_1.isRequestErrorRetryable(updateAddressErrorCode)) {
231
+ throw new actions_core_1.RetryableError(errorMessage);
232
+ }
233
+ else {
234
+ integrationErrors.push(errorMessage);
235
+ }
236
+ }
237
+ }
238
+ if (Object.keys(emailData).length > 0) {
239
+ const getConstituentEmailListResponse = await this.getConstituentEmailList(constituentId);
240
+ let updateEmailErrorCode = undefined;
241
+ if (getConstituentEmailListResponse.status !== 200) {
242
+ updateEmailErrorCode = getConstituentEmailListResponse.status;
243
+ }
244
+ else {
245
+ const constituentEmailListResults = await getConstituentEmailListResponse.json();
246
+ let existingEmail = undefined;
247
+ if (constituentEmailListResults.count > 0) {
248
+ existingEmail = utils_1.filterObjectListByMatchFields(constituentEmailListResults.value, emailData, ['address']);
249
+ }
250
+ if (!existingEmail) {
251
+ if (emailData.primary !== false && constituentEmailListResults.count === 0) {
252
+ emailData.primary = true;
253
+ }
254
+ const createConstituentEmailResponse = await this.createConstituentEmail(constituentId, emailData);
255
+ if (createConstituentEmailResponse.status !== 200) {
256
+ updateEmailErrorCode = createConstituentEmailResponse.status;
257
+ }
258
+ }
259
+ else {
260
+ if (existingEmail.inactive ||
261
+ (emailData.do_not_email !== undefined && emailData.do_not_email !== existingEmail.do_not_email) ||
262
+ (emailData.primary !== undefined && emailData.primary && emailData.primary !== existingEmail.primary) ||
263
+ emailData.type !== existingEmail.type) {
264
+ const updateConstituentEmailByIdResponse = await this.updateConstituentEmailById(existingEmail.id, emailData);
265
+ if (updateConstituentEmailByIdResponse.status !== 200) {
266
+ updateEmailErrorCode = updateConstituentEmailByIdResponse.status;
267
+ }
268
+ }
269
+ }
270
+ }
271
+ if (updateEmailErrorCode) {
272
+ const errorMessage = updateEmailErrorCode
273
+ ? `${updateEmailErrorCode} error occurred when updating constituent email`
274
+ : 'Error occurred when updating constituent email';
275
+ if (utils_1.isRequestErrorRetryable(updateEmailErrorCode)) {
276
+ throw new actions_core_1.RetryableError(errorMessage);
277
+ }
278
+ else {
279
+ integrationErrors.push(errorMessage);
280
+ }
281
+ }
282
+ }
283
+ if (Object.keys(onlinePresenceData).length > 0) {
284
+ const getConstituentOnlinePresenceListResponse = await this.getConstituentOnlinePresenceList(constituentId);
285
+ let updateOnlinePresenceErrorCode = undefined;
286
+ if (getConstituentOnlinePresenceListResponse.status !== 200) {
287
+ updateOnlinePresenceErrorCode = getConstituentOnlinePresenceListResponse.status;
288
+ }
289
+ else {
290
+ const constituentOnlinePresenceListResults = await getConstituentOnlinePresenceListResponse.json();
291
+ let existingOnlinePresence = undefined;
292
+ if (constituentOnlinePresenceListResults.count > 0) {
293
+ existingOnlinePresence = utils_1.filterObjectListByMatchFields(constituentOnlinePresenceListResults.value, onlinePresenceData, ['address']);
294
+ }
295
+ if (!existingOnlinePresence) {
296
+ if (onlinePresenceData.primary !== false && constituentOnlinePresenceListResults.count === 0) {
297
+ onlinePresenceData.primary = true;
298
+ }
299
+ const createConstituentOnlinePresenceResponse = await this.createConstituentOnlinePresence(constituentId, onlinePresenceData);
300
+ if (createConstituentOnlinePresenceResponse.status !== 200) {
301
+ updateOnlinePresenceErrorCode = createConstituentOnlinePresenceResponse.status;
302
+ }
303
+ }
304
+ else {
305
+ if (existingOnlinePresence.inactive ||
306
+ (onlinePresenceData.primary !== undefined &&
307
+ onlinePresenceData.primary !== existingOnlinePresence.primary) ||
308
+ onlinePresenceData.type !== existingOnlinePresence.type) {
309
+ const updateConstituentOnlinePresenceByIdResponse = await this.updateConstituentOnlinePresenceById(existingOnlinePresence.id, onlinePresenceData);
310
+ if (updateConstituentOnlinePresenceByIdResponse.status !== 200) {
311
+ updateOnlinePresenceErrorCode = updateConstituentOnlinePresenceByIdResponse.status;
312
+ }
313
+ }
314
+ }
315
+ }
316
+ if (updateOnlinePresenceErrorCode) {
317
+ const errorMessage = updateOnlinePresenceErrorCode
318
+ ? `${updateOnlinePresenceErrorCode} error occurred when updating constituent online presence`
319
+ : 'Error occurred when updating constituent online presence';
320
+ if (utils_1.isRequestErrorRetryable(updateOnlinePresenceErrorCode)) {
321
+ throw new actions_core_1.RetryableError(errorMessage);
322
+ }
323
+ else {
324
+ integrationErrors.push(errorMessage);
325
+ }
326
+ }
327
+ }
328
+ if (Object.keys(phoneData).length > 0) {
329
+ const getConstituentPhoneListResponse = await this.getConstituentPhoneList(constituentId);
330
+ let updatePhoneErrorCode = undefined;
331
+ if (getConstituentPhoneListResponse.status !== 200) {
332
+ updatePhoneErrorCode = getConstituentPhoneListResponse.status;
333
+ }
334
+ else {
335
+ const constituentPhoneListResults = await getConstituentPhoneListResponse.json();
336
+ let existingPhone = undefined;
337
+ if (constituentPhoneListResults.count > 0) {
338
+ existingPhone = utils_1.filterObjectListByMatchFields(constituentPhoneListResults.value, phoneData, [
339
+ 'int:number'
340
+ ]);
341
+ }
342
+ if (!existingPhone) {
343
+ if (phoneData.primary !== false && constituentPhoneListResults.count === 0) {
344
+ phoneData.primary = true;
345
+ }
346
+ const createConstituentPhoneResponse = await this.createConstituentPhone(constituentId, phoneData);
347
+ if (createConstituentPhoneResponse.status !== 200) {
348
+ updatePhoneErrorCode = createConstituentPhoneResponse.status;
349
+ }
350
+ }
351
+ else {
352
+ if (existingPhone.inactive ||
353
+ (phoneData.do_not_call !== undefined && phoneData.do_not_call !== existingPhone.do_not_call) ||
354
+ (phoneData.primary !== undefined && phoneData.primary !== existingPhone.primary) ||
355
+ phoneData.type !== existingPhone.type) {
356
+ const updateConstituentPhoneByIdResponse = await this.updateConstituentPhoneById(existingPhone.id, phoneData);
357
+ if (updateConstituentPhoneByIdResponse.status !== 200) {
358
+ updatePhoneErrorCode = updateConstituentPhoneByIdResponse.status;
359
+ }
360
+ }
361
+ }
362
+ }
363
+ if (updatePhoneErrorCode) {
364
+ const errorMessage = updatePhoneErrorCode
365
+ ? `${updatePhoneErrorCode} error occurred when updating constituent online presence`
366
+ : 'Error occurred when updating constituent online presence';
367
+ if (utils_1.isRequestErrorRetryable(updatePhoneErrorCode)) {
368
+ throw new actions_core_1.RetryableError(errorMessage);
369
+ }
370
+ else {
371
+ integrationErrors.push(errorMessage);
372
+ }
373
+ }
374
+ }
375
+ if (integrationErrors.length > 0) {
376
+ throw new actions_core_1.IntegrationError('One or more errors occurred when updating existing constituent: ' + integrationErrors.join(', '), 'UPDATE_CONSTITUENT_ERROR', 500);
377
+ }
378
+ return Promise.resolve({
379
+ id: constituentId
380
+ });
381
+ }
382
+ async updateConstituentPhoneById(phoneId, phoneData) {
383
+ return this.request(`${constants_1.SKY_API_CONSTITUENT_URL}/phones/${phoneId}`, {
123
384
  method: 'patch',
124
385
  json: {
125
- ...constituentPhoneData,
386
+ ...phoneData,
126
387
  inactive: false
127
388
  },
128
389
  throwHttpErrors: false
129
390
  });
130
391
  }
392
+ async createGift(giftData) {
393
+ return this.request(`${constants_1.SKY_API_GIFTS_URL}/gifts`, {
394
+ method: 'post',
395
+ json: giftData
396
+ });
397
+ }
131
398
  }
132
399
  exports.BlackbaudSkyApi = BlackbaudSkyApi;
133
400
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/blackbaud-raisers-edge-nxt/api/index.ts"],"names":[],"mappings":";;;AACA,4CAA+C;AAE/C,MAAa,eAAe;IAG1B,YAAY,OAAsB;QAChC,I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BAA0B,CAAC,OAAe,EAAE,SAAyB;QACzE,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,mCAAuB,WAAW,OAAO,EAAE,EAAE;YAClE,MAAM,EAAE,OAAO;YACf,IAAI,EAAE;gBACJ,GAAG,SAAS;gBACZ,QAAQ,EAAE,KAAK;aAChB;YACD,eAAe,EAAE,KAAK;SACvB,CAAC,CAAA;IACJ,CAAC;IAED,KAAK,CAAC,UAAU,CAAC,QAAc;QAC7B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,6BAAiB,QAAQ,EAAE;YAChD,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,QAAQ;SACf,CAAC,CAAA;IACJ,CAAC;CACF;AAxhBD,0CAwhBC"}
@@ -1,2 +1,4 @@
1
- export declare const SKY_API_BASE_URL = "https://api.sky.blackbaud.com/constituent/v1";
2
1
  export declare const SKY_OAUTH2_TOKEN_URL = "https://oauth2.sky.blackbaud.com/token";
2
+ export declare const SKY_API_BASE_URL = "https://api.sky.blackbaud.com";
3
+ export declare const SKY_API_CONSTITUENT_URL: string;
4
+ export declare const SKY_API_GIFTS_URL: string;
@@ -1,6 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SKY_OAUTH2_TOKEN_URL = exports.SKY_API_BASE_URL = void 0;
4
- exports.SKY_API_BASE_URL = 'https://api.sky.blackbaud.com/constituent/v1';
3
+ exports.SKY_API_GIFTS_URL = exports.SKY_API_CONSTITUENT_URL = exports.SKY_API_BASE_URL = exports.SKY_OAUTH2_TOKEN_URL = void 0;
5
4
  exports.SKY_OAUTH2_TOKEN_URL = 'https://oauth2.sky.blackbaud.com/token';
5
+ exports.SKY_API_BASE_URL = 'https://api.sky.blackbaud.com';
6
+ exports.SKY_API_CONSTITUENT_URL = `${exports.SKY_API_BASE_URL}/constituent/v1`;
7
+ exports.SKY_API_GIFTS_URL = `${exports.SKY_API_BASE_URL}/gift/v1`;
6
8
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/blackbaud-raisers-edge-nxt/constants/index.ts"],"names":[],"mappings":";;;AAAa,QAAA,gBAAgB,GAAG,8CAA8C,CAAA;AACjE,QAAA,oBAAoB,GAAG,wCAAwC,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/blackbaud-raisers-edge-nxt/constants/index.ts"],"names":[],"mappings":";;;AAAa,QAAA,oBAAoB,GAAG,wCAAwC,CAAA;AAC/D,QAAA,gBAAgB,GAAG,+BAA+B,CAAA;AAClD,QAAA,uBAAuB,GAAG,GAAG,wBAAgB,iBAAiB,CAAA;AAC9D,QAAA,iBAAiB,GAAG,GAAG,wBAAgB,UAAU,CAAA"}
@@ -0,0 +1,27 @@
1
+ import { SegmentEvent } from '@segment/actions-core';
2
+ export declare const trackEventData: Partial<SegmentEvent>;
3
+ export declare const trackEventDataNewConstituent: Partial<SegmentEvent>;
4
+ export declare const trackEventDataNoConstituent: Partial<SegmentEvent>;
5
+ export declare const giftPayload: {
6
+ amount: {
7
+ value: number;
8
+ };
9
+ constituent_id: string;
10
+ gift_splits: {
11
+ amount: {
12
+ value: number;
13
+ };
14
+ fund_id: string;
15
+ }[];
16
+ payments: {
17
+ payment_method: string;
18
+ }[];
19
+ };
20
+ export declare const constituentPayload: {
21
+ email: {
22
+ address: string;
23
+ type: string;
24
+ };
25
+ first: string;
26
+ last: string;
27
+ };
@@ -0,0 +1,60 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.constituentPayload = exports.giftPayload = exports.trackEventDataNoConstituent = exports.trackEventDataNewConstituent = exports.trackEventData = void 0;
4
+ exports.trackEventData = {
5
+ type: 'track',
6
+ properties: {
7
+ constituentId: '123',
8
+ fundId: '1',
9
+ paymentMethod: 'CreditCard',
10
+ revenue: 100
11
+ }
12
+ };
13
+ exports.trackEventDataNewConstituent = {
14
+ type: 'track',
15
+ properties: {
16
+ email: 'john@example.biz',
17
+ emailType: 'Personal',
18
+ firstName: 'John',
19
+ lastName: 'Doe',
20
+ fundId: '1',
21
+ paymentMethod: 'CreditCard',
22
+ revenue: 100
23
+ }
24
+ };
25
+ exports.trackEventDataNoConstituent = {
26
+ type: 'track',
27
+ properties: {
28
+ fundId: '1',
29
+ paymentMethod: 'CreditCard',
30
+ revenue: 100
31
+ }
32
+ };
33
+ exports.giftPayload = {
34
+ amount: {
35
+ value: 100
36
+ },
37
+ constituent_id: '123',
38
+ gift_splits: [
39
+ {
40
+ amount: {
41
+ value: 100
42
+ },
43
+ fund_id: '1'
44
+ }
45
+ ],
46
+ payments: [
47
+ {
48
+ payment_method: 'CreditCard'
49
+ }
50
+ ]
51
+ };
52
+ exports.constituentPayload = {
53
+ email: {
54
+ address: 'john@example.biz',
55
+ type: 'Personal'
56
+ },
57
+ first: 'John',
58
+ last: 'Doe'
59
+ };
60
+ //# sourceMappingURL=fixtures.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fixtures.js","sourceRoot":"","sources":["../../../../src/destinations/blackbaud-raisers-edge-nxt/createGift/fixtures.ts"],"names":[],"mappings":";;;AAGa,QAAA,cAAc,GAA0B;IACnD,IAAI,EAAE,OAAO;IACb,UAAU,EAAE;QACV,aAAa,EAAE,KAAK;QACpB,MAAM,EAAE,GAAG;QACX,aAAa,EAAE,YAAY;QAC3B,OAAO,EAAE,GAAG;KACb;CACF,CAAA;AAEY,QAAA,4BAA4B,GAA0B;IACjE,IAAI,EAAE,OAAO;IACb,UAAU,EAAE;QACV,KAAK,EAAE,kBAAkB;QACzB,SAAS,EAAE,UAAU;QACrB,SAAS,EAAE,MAAM;QACjB,QAAQ,EAAE,KAAK;QACf,MAAM,EAAE,GAAG;QACX,aAAa,EAAE,YAAY;QAC3B,OAAO,EAAE,GAAG;KACb;CACF,CAAA;AAEY,QAAA,2BAA2B,GAA0B;IAChE,IAAI,EAAE,OAAO;IACb,UAAU,EAAE;QACV,MAAM,EAAE,GAAG;QACX,aAAa,EAAE,YAAY;QAC3B,OAAO,EAAE,GAAG;KACb;CACF,CAAA;AAGY,QAAA,WAAW,GAAG;IACzB,MAAM,EAAE;QACN,KAAK,EAAE,GAAG;KACX;IACD,cAAc,EAAE,KAAK;IACrB,WAAW,EAAE;QACX;YACE,MAAM,EAAE;gBACN,KAAK,EAAE,GAAG;aACX;YACD,OAAO,EAAE,GAAG;SACb;KACF;IACD,QAAQ,EAAE;QACR;YACE,cAAc,EAAE,YAAY;SAC7B;KACF;CACF,CAAA;AAGY,QAAA,kBAAkB,GAAG;IAChC,KAAK,EAAE;QACL,OAAO,EAAE,kBAAkB;QAC3B,IAAI,EAAE,UAAU;KACjB;IACD,KAAK,EAAE,MAAM;IACb,IAAI,EAAE,KAAK;CACZ,CAAA"}