@segment/action-destinations 3.310.0 → 3.312.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 (72) hide show
  1. package/dist/destinations/facebook-conversions-api/addToCart/generated-types.d.ts +1 -0
  2. package/dist/destinations/facebook-conversions-api/custom/generated-types.d.ts +1 -0
  3. package/dist/destinations/facebook-conversions-api/fb-capi-user-data.js +6 -0
  4. package/dist/destinations/facebook-conversions-api/fb-capi-user-data.js.map +1 -1
  5. package/dist/destinations/facebook-conversions-api/initiateCheckout/generated-types.d.ts +1 -0
  6. package/dist/destinations/facebook-conversions-api/pageView/generated-types.d.ts +1 -0
  7. package/dist/destinations/facebook-conversions-api/purchase/generated-types.d.ts +1 -0
  8. package/dist/destinations/facebook-conversions-api/search/generated-types.d.ts +1 -0
  9. package/dist/destinations/facebook-conversions-api/viewContent/generated-types.d.ts +1 -0
  10. package/dist/destinations/google-enhanced-conversions/functions.d.ts +1 -1
  11. package/dist/destinations/google-enhanced-conversions/functions.js +1 -1
  12. package/dist/destinations/google-enhanced-conversions/uploadCallConversion/index.js +2 -2
  13. package/dist/destinations/google-enhanced-conversions/uploadCallConversion2/index.js +2 -2
  14. package/dist/destinations/google-enhanced-conversions/uploadClickConversion/index.js +2 -2
  15. package/dist/destinations/google-enhanced-conversions/uploadClickConversion2/index.js +2 -2
  16. package/dist/destinations/google-enhanced-conversions/userList/index.js +2 -2
  17. package/dist/destinations/google-sheets/googleapis/index.js +2 -0
  18. package/dist/destinations/google-sheets/googleapis/index.js.map +1 -1
  19. package/dist/destinations/hubspot/customEvent/client.d.ts +10 -0
  20. package/dist/destinations/hubspot/customEvent/client.js +39 -0
  21. package/dist/destinations/hubspot/customEvent/client.js.map +1 -0
  22. package/dist/destinations/hubspot/customEvent/common-fields.js +7 -3
  23. package/dist/destinations/hubspot/customEvent/common-fields.js.map +1 -1
  24. package/dist/destinations/hubspot/customEvent/constants.d.ts +4 -0
  25. package/dist/destinations/hubspot/customEvent/constants.js +141 -1
  26. package/dist/destinations/hubspot/customEvent/constants.js.map +1 -1
  27. package/dist/destinations/hubspot/customEvent/dynamic-fields.js +11 -5
  28. package/dist/destinations/hubspot/customEvent/dynamic-fields.js.map +1 -1
  29. package/dist/destinations/hubspot/customEvent/index.d.ts +1 -1
  30. package/dist/destinations/hubspot/customEvent/index.js +54 -16
  31. package/dist/destinations/hubspot/customEvent/index.js.map +1 -1
  32. package/dist/destinations/hubspot/customEvent/types.d.ts +81 -0
  33. package/dist/destinations/hubspot/customEvent/types.js +10 -0
  34. package/dist/destinations/hubspot/customEvent/types.js.map +1 -0
  35. package/dist/destinations/hubspot/customEvent/utils.d.ts +12 -0
  36. package/dist/destinations/hubspot/customEvent/utils.js +296 -0
  37. package/dist/destinations/hubspot/customEvent/utils.js.map +1 -0
  38. package/dist/destinations/hubspot/upsertObject/client.d.ts +11 -0
  39. package/dist/destinations/hubspot/upsertObject/client.js +39 -0
  40. package/dist/destinations/hubspot/upsertObject/client.js.map +1 -0
  41. package/dist/destinations/hubspot/upsertObject/common-fields.js +14 -7
  42. package/dist/destinations/hubspot/upsertObject/common-fields.js.map +1 -1
  43. package/dist/destinations/hubspot/upsertObject/constants.d.ts +1 -0
  44. package/dist/destinations/hubspot/upsertObject/constants.js +2 -1
  45. package/dist/destinations/hubspot/upsertObject/constants.js.map +1 -1
  46. package/dist/destinations/hubspot/upsertObject/dynamic-fields.js.map +1 -1
  47. package/dist/destinations/hubspot/upsertObject/index.js +36 -35
  48. package/dist/destinations/hubspot/upsertObject/index.js.map +1 -1
  49. package/dist/destinations/hubspot/upsertObject/types.d.ts +192 -0
  50. package/dist/destinations/hubspot/upsertObject/types.js +56 -0
  51. package/dist/destinations/hubspot/upsertObject/types.js.map +1 -0
  52. package/dist/destinations/hubspot/upsertObject/utils.d.ts +13 -0
  53. package/dist/destinations/hubspot/upsertObject/utils.js +548 -0
  54. package/dist/destinations/hubspot/upsertObject/utils.js.map +1 -0
  55. package/dist/destinations/iterable/updateUser/generated-types.d.ts +2 -0
  56. package/dist/destinations/iterable/updateUser/index.js +42 -13
  57. package/dist/destinations/iterable/updateUser/index.js.map +1 -1
  58. package/dist/destinations/iterable/utils.d.ts +1 -0
  59. package/dist/destinations/iterable/utils.js +1 -0
  60. package/dist/destinations/iterable/utils.js.map +1 -1
  61. package/dist/destinations/linkedin-conversions/index.js +14 -2
  62. package/dist/destinations/linkedin-conversions/index.js.map +1 -1
  63. package/dist/destinations/loops/createOrUpdateContact/generated-types.d.ts +4 -0
  64. package/dist/destinations/loops/createOrUpdateContact/index.js +48 -2
  65. package/dist/destinations/loops/createOrUpdateContact/index.js.map +1 -1
  66. package/package.json +2 -2
  67. package/dist/destinations/hubspot/customEvent/hubspot-api.d.ts +0 -62
  68. package/dist/destinations/hubspot/customEvent/hubspot-api.js +0 -305
  69. package/dist/destinations/hubspot/customEvent/hubspot-api.js.map +0 -1
  70. package/dist/destinations/hubspot/upsertObject/hubspot-api.d.ts +0 -221
  71. package/dist/destinations/hubspot/upsertObject/hubspot-api.js +0 -617
  72. package/dist/destinations/hubspot/upsertObject/hubspot-api.js.map +0 -1
@@ -1,221 +0,0 @@
1
- import { RequestClient, ModifiedResponse } from '@segment/actions-core';
2
- import { Payload } from './generated-types';
3
- export declare const SyncMode: {
4
- readonly Upsert: "upsert";
5
- readonly Add: "add";
6
- readonly Update: "update";
7
- };
8
- export declare type SyncMode = typeof SyncMode[keyof typeof SyncMode];
9
- export declare const AssociationSyncMode: {
10
- readonly Upsert: "upsert";
11
- readonly Read: "read";
12
- };
13
- export declare type AssociationSyncMode = typeof AssociationSyncMode[keyof typeof AssociationSyncMode];
14
- declare const BatchRequestType: {
15
- readonly Upsert: "upsert";
16
- readonly Create: "create";
17
- readonly Update: "update";
18
- readonly Read: "read";
19
- };
20
- declare type BatchRequestType = typeof BatchRequestType[keyof typeof BatchRequestType];
21
- declare const HSPropTypeFieldType: {
22
- readonly StringText: "string:text";
23
- readonly NumberNumber: "number:number";
24
- readonly DateTimeDate: "datetime:date";
25
- readonly DateDate: "date:date";
26
- readonly EnumerationBooleanCheckbox: "enumeration:booleancheckbox";
27
- };
28
- declare type HSPropTypeFieldType = typeof HSPropTypeFieldType[keyof typeof HSPropTypeFieldType];
29
- declare const HSPropType: {
30
- readonly Date: "date";
31
- readonly String: "string";
32
- readonly DateTime: "datetime";
33
- readonly Number: "number";
34
- readonly Enumeration: "enumeration";
35
- };
36
- declare type HSPropType = typeof HSPropType[keyof typeof HSPropType];
37
- declare const HSPropFieldType: {
38
- readonly Text: "text";
39
- readonly Number: "number";
40
- readonly Date: "date";
41
- readonly BooleanCheckbox: "booleancheckbox";
42
- readonly Select: "select";
43
- };
44
- declare type HSPropFieldType = typeof HSPropFieldType[keyof typeof HSPropFieldType];
45
- export declare const SchemaMatch: {
46
- readonly FullMatch: "full_match";
47
- readonly PropertiesMissing: "properties_missing";
48
- readonly NoMatch: "no_match";
49
- readonly Mismatch: "mismatch";
50
- };
51
- export declare type SchemaMatch = typeof SchemaMatch[keyof typeof SchemaMatch];
52
- declare const ReadType: {
53
- readonly ReturnRecordsWithIds: "return_records_with_ids";
54
- readonly ReturnRecordsWithoutIds: "return_records_without_ids";
55
- };
56
- declare type ReadType = typeof ReadType[keyof typeof ReadType];
57
- interface Prop {
58
- name: string;
59
- type: HSPropType;
60
- fieldType: HSPropFieldType;
61
- typeFieldType: HSPropTypeFieldType;
62
- }
63
- interface Schema {
64
- object_details: {
65
- object_type: string;
66
- id_field_name: string;
67
- };
68
- properties: Prop[];
69
- sensitiveProperties: Prop[];
70
- }
71
- interface SchemaDiff {
72
- match: SchemaMatch;
73
- object_details: {
74
- object_type: string;
75
- id_field_name: string;
76
- };
77
- missingProperties: Prop[];
78
- missingSensitiveProperties: Prop[];
79
- }
80
- interface ResponseType {
81
- status: 'fulfilled' | 'rejected';
82
- value?: {
83
- data: {
84
- results: Result[];
85
- };
86
- };
87
- reason?: {
88
- message: string;
89
- };
90
- }
91
- interface Result {
92
- name: string;
93
- type: HSPropType;
94
- fieldType: HSPropFieldType;
95
- hasUniqueValue: boolean;
96
- }
97
- interface ReadJSON {
98
- idProperty: string;
99
- properties: string[];
100
- inputs: Array<{
101
- id: string;
102
- }>;
103
- }
104
- interface UpsertJSON {
105
- inputs: Array<{
106
- idProperty: string;
107
- id: string;
108
- properties: Record<string, string>;
109
- }>;
110
- }
111
- interface CreateJSON {
112
- inputs: Array<{
113
- idProperty: string;
114
- properties: Record<string, string>;
115
- }>;
116
- }
117
- interface RespJSON {
118
- status: string;
119
- results: Array<{
120
- id: string;
121
- properties: Record<string, string | null>;
122
- }>;
123
- }
124
- interface OmitPayload extends Omit<Payload, 'enable_batching' | 'batch_size' | 'association_sync_mode'> {
125
- }
126
- interface PayloadWithFromId extends OmitPayload {
127
- object_details: OmitPayload['object_details'] & {
128
- record_id: string;
129
- };
130
- associations?: Array<{
131
- object_type: string;
132
- association_label: string;
133
- id_field_name: string;
134
- id_field_value: string;
135
- from_record_id: string;
136
- }>;
137
- }
138
- interface AssociationPayload extends OmitPayload {
139
- object_details: OmitPayload['object_details'] & {
140
- from_record_id: string;
141
- };
142
- association_details: {
143
- association_label: string;
144
- };
145
- }
146
- interface AssociationPayloadWithId extends AssociationPayload {
147
- object_details: AssociationPayload['object_details'] & {
148
- record_id: string;
149
- };
150
- }
151
- interface AssociationType {
152
- associationCategory: AssociationCategory;
153
- associationTypeId: string;
154
- }
155
- declare enum AssociationCategory {
156
- HUBSPOT_DEFINED = "HUBSPOT_DEFINED",
157
- USER_DEFINED = "USER_DEFINED",
158
- INTEGRATOR_DEFINED = "INTEGRATOR_DEFINED"
159
- }
160
- interface BatchAssociationsRequestBody {
161
- inputs: {
162
- types: AssociationType[];
163
- from: {
164
- id: string;
165
- };
166
- to: {
167
- id: string;
168
- };
169
- }[];
170
- }
171
- interface GroupableFields {
172
- object_type: string;
173
- id_field_name: string;
174
- }
175
- export declare class HubspotClient {
176
- request: RequestClient;
177
- objectType: string;
178
- syncMode: SyncMode;
179
- associationSyncMode: AssociationSyncMode;
180
- propertyGroup?: string;
181
- constructor(request: RequestClient, objectType: string, syncMode: SyncMode, associationSyncMode: AssociationSyncMode, propertyGroup: string | undefined);
182
- cleanProp(str: string): string;
183
- cleanPropObj(obj: {
184
- [k: string]: unknown;
185
- } | undefined): {
186
- [k: string]: string | number | boolean;
187
- } | undefined;
188
- validate(payloads: Payload[]): Payload[];
189
- format(value: unknown): {
190
- type: HSPropType;
191
- fieldType: HSPropFieldType;
192
- };
193
- formatHS(type: HSPropType, fieldType: HSPropFieldType): HSPropTypeFieldType;
194
- schema(payloads: Payload[]): Schema;
195
- schemaDiffCache(schema: Schema): Promise<SchemaDiff>;
196
- saveSchemaToCache(schema: Schema): Promise<void>;
197
- checkForIncompatiblePropTypes(prop: Prop, hubspotProp?: Result): void;
198
- determineMissingPropsAndMatchType(response: ResponseType, properties: Prop[]): {
199
- missingProps: Prop[];
200
- match: SchemaMatch;
201
- };
202
- schemaDiffHubspot(schema: Schema): Promise<SchemaDiff>;
203
- createProperties(schemaDiff: SchemaDiff): Promise<void>;
204
- batchObjectRequest(action: BatchRequestType, objectType: string, data: ReadJSON | UpsertJSON | CreateJSON): Promise<ModifiedResponse<RespJSON>>;
205
- sendFromRecords(payloads: Payload[]): Promise<PayloadWithFromId[]>;
206
- readRecords(payloads: Payload[], objectType: string, readType: ReadType): Promise<PayloadWithFromId[] | Payload[]>;
207
- upsertRecords(payloads: Payload[], objectType: string): Promise<PayloadWithFromId[]>;
208
- updateRecords(payloads: Payload[], objectType: string): Promise<PayloadWithFromId[]>;
209
- addRecords(payloads: Payload[], objectType: string): Promise<PayloadWithFromId[]>;
210
- returnRecordsWithIds(payloads: Payload[], response: ModifiedResponse<RespJSON>): PayloadWithFromId[];
211
- returnRecordsWithoutIds(payloads: Payload[], response: ModifiedResponse<RespJSON>): Payload[];
212
- createAssociationPayloads(payloads: PayloadWithFromId[]): AssociationPayload[][];
213
- groupPayloads(associations: AssociationPayload[], groupBy: (keyof GroupableFields)[]): AssociationPayload[][];
214
- sendAssociatedRecords(payloads: AssociationPayload[][]): Promise<AssociationPayloadWithId[]>;
215
- readAssociatedRecords(groupedPayloads: AssociationPayload[][]): Promise<AssociationPayloadWithId[]>;
216
- upsertAssociatedRecords(groupedPayloads: AssociationPayload[][]): Promise<AssociationPayloadWithId[]>;
217
- returnAssociatedRecordsWithIds(groupedPayloads: AssociationPayload[][], responses: ModifiedResponse<RespJSON>[]): AssociationPayloadWithId[];
218
- batchAssociationsRequest(body: BatchAssociationsRequestBody, toObjectType: string): Promise<ModifiedResponse<unknown>>;
219
- sendAssociations(payloads: AssociationPayloadWithId[]): Promise<void>;
220
- }
221
- export {};