@seeka-labs/sdk-apps-server 1.0.1
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/LICENSE +19 -0
- package/README.md +1 -0
- package/dist/sdk-apps-server.js +2 -0
- package/dist/sdk-apps-server.js.map +1 -0
- package/dist/sdk-apps-server.module.js +2 -0
- package/dist/sdk-apps-server.module.js.map +1 -0
- package/dist/types/src/api/helper/auth/index.d.ts +8 -0
- package/dist/types/src/api/helper/auth/index.d.ts.map +1 -0
- package/dist/types/src/api/helper/config/index.d.ts +8 -0
- package/dist/types/src/api/helper/config/index.d.ts.map +1 -0
- package/dist/types/src/api/helper/index.d.ts +23 -0
- package/dist/types/src/api/helper/index.d.ts.map +1 -0
- package/dist/types/src/api/helper/serviceResolver/index.d.ts +6 -0
- package/dist/types/src/api/helper/serviceResolver/index.d.ts.map +1 -0
- package/dist/types/src/api/models/index.d.ts +23 -0
- package/dist/types/src/api/models/index.d.ts.map +1 -0
- package/dist/types/src/api/services/index.d.ts +751 -0
- package/dist/types/src/api/services/index.d.ts.map +1 -0
- package/dist/types/src/api/webhooks/index.d.ts +11 -0
- package/dist/types/src/api/webhooks/index.d.ts.map +1 -0
- package/dist/types/src/cache/appCacheManager/index.d.ts +12 -0
- package/dist/types/src/cache/appCacheManager/index.d.ts.map +1 -0
- package/dist/types/src/helpers/app/index.d.ts +24 -0
- package/dist/types/src/helpers/app/index.d.ts.map +1 -0
- package/dist/types/src/helpers/util/index.d.ts +10 -0
- package/dist/types/src/helpers/util/index.d.ts.map +1 -0
- package/dist/types/src/index.d.ts +8 -0
- package/dist/types/src/index.d.ts.map +1 -0
- package/package.json +57 -0
|
@@ -0,0 +1,751 @@
|
|
|
1
|
+
import { Logger } from 'winston';
|
|
2
|
+
import type { AxiosInstance, AxiosRequestConfig, AxiosResponse, CancelToken } from 'axios';
|
|
3
|
+
export declare class SeekaAppConfig {
|
|
4
|
+
appId: string;
|
|
5
|
+
appSecret: string;
|
|
6
|
+
ingestUrl: string;
|
|
7
|
+
issuerUrl: string;
|
|
8
|
+
organisationId: string;
|
|
9
|
+
applicationInstallId: string;
|
|
10
|
+
runtime: AppRuntimeInfo;
|
|
11
|
+
logger?: Logger;
|
|
12
|
+
grantedPermissions: string[];
|
|
13
|
+
transformApiRequest: (options: AxiosRequestConfig) => Promise<AxiosRequestConfig>;
|
|
14
|
+
transformApiResponse: (url: string, response: AxiosResponse<any, any>, processor: (response: AxiosResponse<any, any>) => any) => any;
|
|
15
|
+
hasAnyPermissions: (permissionKeys: string[]) => boolean;
|
|
16
|
+
hasAllPermissions: (permissionKeys: string[]) => boolean;
|
|
17
|
+
hasPermission: (permissionKey: string) => boolean;
|
|
18
|
+
}
|
|
19
|
+
export declare class ApiServiceProxyBase {
|
|
20
|
+
private readonly config;
|
|
21
|
+
protected constructor(config: SeekaAppConfig);
|
|
22
|
+
protected transformOptions: (options: AxiosRequestConfig) => Promise<AxiosRequestConfig>;
|
|
23
|
+
protected transformResult: (url: string, response: AxiosResponse<any, any>, processor: (response: AxiosResponse<any, any>) => any) => Promise<any>;
|
|
24
|
+
}
|
|
25
|
+
export declare class IdentityServiceProxy extends ApiServiceProxyBase {
|
|
26
|
+
protected instance: AxiosInstance;
|
|
27
|
+
protected baseUrl: string;
|
|
28
|
+
protected jsonParseReviver: ((key: string, value: any) => any) | undefined;
|
|
29
|
+
constructor(configuration: SeekaAppConfig, baseUrl?: string, instance?: AxiosInstance);
|
|
30
|
+
/**
|
|
31
|
+
* Merge identity
|
|
32
|
+
*/
|
|
33
|
+
merge(payload: PersonIdentificationRequest, cancelToken?: CancelToken): Promise<ApiResponseDtoOfPersonIdentificationResolutionResponse>;
|
|
34
|
+
protected processMerge(response: AxiosResponse): Promise<ApiResponseDtoOfPersonIdentificationResolutionResponse>;
|
|
35
|
+
}
|
|
36
|
+
export declare class IngestServiceProxy extends ApiServiceProxyBase {
|
|
37
|
+
protected instance: AxiosInstance;
|
|
38
|
+
protected baseUrl: string;
|
|
39
|
+
protected jsonParseReviver: ((key: string, value: any) => any) | undefined;
|
|
40
|
+
constructor(configuration: SeekaAppConfig, baseUrl?: string, instance?: AxiosInstance);
|
|
41
|
+
/**
|
|
42
|
+
* Track activity
|
|
43
|
+
*/
|
|
44
|
+
batch(payload: DataIngestBatchHttpRequest, cancelToken?: CancelToken): Promise<void>;
|
|
45
|
+
protected processBatch(response: AxiosResponse): Promise<void>;
|
|
46
|
+
}
|
|
47
|
+
export interface ApiResponseDtoOfPersonIdentificationResolutionResponse {
|
|
48
|
+
result?: PersonIdentificationResolutionResponse;
|
|
49
|
+
}
|
|
50
|
+
export interface PersonIdentificationResolutionResponse {
|
|
51
|
+
personId?: string;
|
|
52
|
+
}
|
|
53
|
+
export interface ApiResponseDtoOfObject {
|
|
54
|
+
result?: any;
|
|
55
|
+
}
|
|
56
|
+
export interface DetailedApiResponseDtoOfObject extends ApiResponseDtoOfObject {
|
|
57
|
+
type?: ResponseResultType;
|
|
58
|
+
error?: ErrorInfo;
|
|
59
|
+
success?: boolean;
|
|
60
|
+
}
|
|
61
|
+
export interface ApiResponseErrorDtoOfObject extends DetailedApiResponseDtoOfObject {
|
|
62
|
+
}
|
|
63
|
+
export interface ApiResponseError extends ApiResponseErrorDtoOfObject {
|
|
64
|
+
}
|
|
65
|
+
export declare enum ResponseResultType {
|
|
66
|
+
Undefined = "undefined",
|
|
67
|
+
Success = "success",
|
|
68
|
+
Failed = "failed"
|
|
69
|
+
}
|
|
70
|
+
export interface ErrorInfo {
|
|
71
|
+
message?: string;
|
|
72
|
+
code?: number;
|
|
73
|
+
correlationId?: string;
|
|
74
|
+
validation?: ValidationSummary;
|
|
75
|
+
}
|
|
76
|
+
export interface ValidationSummary {
|
|
77
|
+
properties?: PropertyValidationError[];
|
|
78
|
+
}
|
|
79
|
+
export interface PropertyValidationError {
|
|
80
|
+
errorKey?: string;
|
|
81
|
+
helpActions?: HelpAction[];
|
|
82
|
+
propertyName?: string;
|
|
83
|
+
attemptedValue?: any;
|
|
84
|
+
errorMessage?: string;
|
|
85
|
+
children?: PropertyValidationError[];
|
|
86
|
+
}
|
|
87
|
+
export interface HelpAction {
|
|
88
|
+
helpActionUrl?: string;
|
|
89
|
+
helpActionTitle?: string;
|
|
90
|
+
}
|
|
91
|
+
export interface PersonIdentificationRequest {
|
|
92
|
+
/** Collection of identifiers used to calculate the identity graph. */
|
|
93
|
+
id: PersonIdentifiers;
|
|
94
|
+
/** Source of the identification request. */
|
|
95
|
+
src: TrackingEventSource;
|
|
96
|
+
}
|
|
97
|
+
export interface PersonIdentifiersBase {
|
|
98
|
+
/** Browser user agent */
|
|
99
|
+
ua?: string[];
|
|
100
|
+
/** IP Address */
|
|
101
|
+
ip?: string[];
|
|
102
|
+
/** Seeka Person ID - Identity graph ID */
|
|
103
|
+
seekaPId?: string;
|
|
104
|
+
/** Seeka Browser ID */
|
|
105
|
+
seekaBId?: string[];
|
|
106
|
+
/** Email address */
|
|
107
|
+
email?: string[];
|
|
108
|
+
/** Gender */
|
|
109
|
+
gender?: string[];
|
|
110
|
+
/** Phone number. Recommended to provide in E.164 format. */
|
|
111
|
+
phone?: string[];
|
|
112
|
+
/** First name */
|
|
113
|
+
firstName?: string[];
|
|
114
|
+
/** Last name / surname */
|
|
115
|
+
lastName?: string[];
|
|
116
|
+
/** Shipping, mailing or residential address */
|
|
117
|
+
address?: PlaceAddress[];
|
|
118
|
+
/** Date of birth */
|
|
119
|
+
dob?: Date[];
|
|
120
|
+
/** Shopify identifiers */
|
|
121
|
+
shopify?: ShopifyPersonIdentifiers;
|
|
122
|
+
/** WooCommerce identifiers */
|
|
123
|
+
wooCommerce?: WooCommercePersonIdentifiers;
|
|
124
|
+
/** BigCommerce identifiers */
|
|
125
|
+
bigCommerce?: BigCommercePersonIdentifiers;
|
|
126
|
+
/** Magento identifiers */
|
|
127
|
+
magento?: MagentoPersonIdentifiers;
|
|
128
|
+
/** Klaviyo identifiers scoped by Klaviyo account ID */
|
|
129
|
+
klaviyo?: ScopedIdentifiersOfKlaviyoPersonIdentifiersDtoAndString;
|
|
130
|
+
/** Arbitrary traits */
|
|
131
|
+
traits?: {
|
|
132
|
+
[key: string]: any;
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
export interface PersonIdentifiers extends PersonIdentifiersBase {
|
|
136
|
+
/** Facebook identifiers */
|
|
137
|
+
facebook?: FacebookPersonIdentifiers;
|
|
138
|
+
/** Snapchat identifiers */
|
|
139
|
+
snapchat?: SnapchatPersonIdentifiers;
|
|
140
|
+
/** TikTok identifiers */
|
|
141
|
+
tiktok?: TikTokPersonIdentifiers;
|
|
142
|
+
/** Google identifiers */
|
|
143
|
+
google?: GooglePersonIdentifiers;
|
|
144
|
+
/** Pinterest identifiers */
|
|
145
|
+
pinterest?: PinterestPersonIdentifiers;
|
|
146
|
+
/** Marketing, analytics and other third-party opt in/consent information */
|
|
147
|
+
consent?: PersonConsentInfo;
|
|
148
|
+
}
|
|
149
|
+
export interface BrandScopedFacebookPersonIdentifiers {
|
|
150
|
+
/** Facebook user login ID */
|
|
151
|
+
login?: string[];
|
|
152
|
+
/** Facebook click ID */
|
|
153
|
+
fbc?: string[];
|
|
154
|
+
/** Facebook lead ID */
|
|
155
|
+
lead?: string[];
|
|
156
|
+
}
|
|
157
|
+
export interface FacebookPersonIdentifiers extends BrandScopedFacebookPersonIdentifiers {
|
|
158
|
+
/** Facebook pixel / browser ID */
|
|
159
|
+
fbp?: string[];
|
|
160
|
+
}
|
|
161
|
+
export interface BrandScopedSnapchatPersonIdentifiers {
|
|
162
|
+
/** Snapchat click ID */
|
|
163
|
+
sccid?: string[];
|
|
164
|
+
}
|
|
165
|
+
export interface SnapchatPersonIdentifiers extends BrandScopedSnapchatPersonIdentifiers {
|
|
166
|
+
/** Snapchat pixel / browser ID */
|
|
167
|
+
scid?: string[];
|
|
168
|
+
}
|
|
169
|
+
export interface BrandScopedTikTokPersonIdentifiers {
|
|
170
|
+
/** TikTok click ID */
|
|
171
|
+
ttclid?: string[];
|
|
172
|
+
/** TikTok lead ID */
|
|
173
|
+
lead?: string[];
|
|
174
|
+
}
|
|
175
|
+
export interface TikTokPersonIdentifiers extends BrandScopedTikTokPersonIdentifiers {
|
|
176
|
+
/** TikTok pixel / browser ID */
|
|
177
|
+
ttp?: string[];
|
|
178
|
+
}
|
|
179
|
+
export interface BrandScopedGooglePersonIdentifiers {
|
|
180
|
+
/** Google click ID */
|
|
181
|
+
gclid?: string[];
|
|
182
|
+
}
|
|
183
|
+
export interface GooglePersonIdentifiers extends BrandScopedGooglePersonIdentifiers {
|
|
184
|
+
/** Google user client ID */
|
|
185
|
+
userClientId?: string[];
|
|
186
|
+
}
|
|
187
|
+
export interface BrandScopedPinterestPersonIdentifiers {
|
|
188
|
+
/** Pinterest click ID / epik ID */
|
|
189
|
+
epik?: string[];
|
|
190
|
+
}
|
|
191
|
+
export interface PinterestPersonIdentifiers extends BrandScopedPinterestPersonIdentifiers {
|
|
192
|
+
}
|
|
193
|
+
export interface PersonConsentInfo {
|
|
194
|
+
/** Grant for sending data to 3rd party analytics and marketing platforms. */
|
|
195
|
+
analytics?: ConsentInfo;
|
|
196
|
+
/** Grant for marketing via re-marketing campaigns, EDMs etc. */
|
|
197
|
+
marketing?: MarketingConsentInfo;
|
|
198
|
+
/** Grant for enrolling and participating in loyalty programs. */
|
|
199
|
+
loyalty?: ConsentInfo;
|
|
200
|
+
}
|
|
201
|
+
export interface ConsentInfo {
|
|
202
|
+
type?: PrivacyConsentType;
|
|
203
|
+
/** When the consent was granted. */
|
|
204
|
+
consentGrantedAt?: Date | undefined;
|
|
205
|
+
/** The name of the source that provided the grant information. Set to the source platform like Shopify, Wordpress or your custom integration client name. */
|
|
206
|
+
consentGrantedSourceName?: string;
|
|
207
|
+
/** When the consent was not granted. */
|
|
208
|
+
consentNotGrantedAt?: Date | undefined;
|
|
209
|
+
/** The name of the source that provided the grant information. Set to the source platform like Shopify, Wordpress or your custom integration client name. */
|
|
210
|
+
consentNotGrantedSourceName?: string;
|
|
211
|
+
}
|
|
212
|
+
export declare enum PrivacyConsentType {
|
|
213
|
+
Unknown = "unknown",
|
|
214
|
+
Informed = "informed",
|
|
215
|
+
Implied = "implied",
|
|
216
|
+
Explicit = "explicit",
|
|
217
|
+
Active = "active",
|
|
218
|
+
Passive = "passive"
|
|
219
|
+
}
|
|
220
|
+
export interface MarketingConsentInfo {
|
|
221
|
+
email?: ConsentInfo;
|
|
222
|
+
sms?: ConsentInfo;
|
|
223
|
+
}
|
|
224
|
+
export interface PlaceAddress {
|
|
225
|
+
description?: string;
|
|
226
|
+
addressLine1?: string;
|
|
227
|
+
addressLine2?: string;
|
|
228
|
+
streetName?: string;
|
|
229
|
+
locality?: string;
|
|
230
|
+
/** Full name of the state / province / territory */
|
|
231
|
+
state?: string;
|
|
232
|
+
/** ISO 3166-2 - Two or three character subdivision code */
|
|
233
|
+
stateCode?: string;
|
|
234
|
+
postcode?: string;
|
|
235
|
+
/** Full name of the country */
|
|
236
|
+
country?: string;
|
|
237
|
+
/** ISO 3166-2 - Two character country code */
|
|
238
|
+
countryCode?: string;
|
|
239
|
+
googlePlaceId?: string;
|
|
240
|
+
timeZone?: TimeZoneInfo;
|
|
241
|
+
geoLocation?: GeographicalCoordinate;
|
|
242
|
+
}
|
|
243
|
+
export interface TimeZoneInfo {
|
|
244
|
+
/** IANA timezone ID */
|
|
245
|
+
friendlyId?: string;
|
|
246
|
+
description?: string;
|
|
247
|
+
}
|
|
248
|
+
export interface GeographicalCoordinate {
|
|
249
|
+
longitude?: number;
|
|
250
|
+
latitude?: number;
|
|
251
|
+
}
|
|
252
|
+
export interface ShopifyPersonIdentifiers {
|
|
253
|
+
customerId?: string[];
|
|
254
|
+
uniqueToken?: string[];
|
|
255
|
+
microSessionId?: string[];
|
|
256
|
+
visitToken?: string[];
|
|
257
|
+
cartToken?: string[];
|
|
258
|
+
checkoutToken?: string[];
|
|
259
|
+
cartId?: string[];
|
|
260
|
+
deviceId?: string[];
|
|
261
|
+
checkoutId?: string[];
|
|
262
|
+
orderId?: string[];
|
|
263
|
+
sessionHash?: string[];
|
|
264
|
+
}
|
|
265
|
+
export interface WooCommercePersonIdentifiers {
|
|
266
|
+
customerId?: string[];
|
|
267
|
+
orderId?: string[];
|
|
268
|
+
cartHash?: string[];
|
|
269
|
+
}
|
|
270
|
+
export interface BigCommercePersonIdentifiers {
|
|
271
|
+
/** BigCommerce */
|
|
272
|
+
customerId?: string[];
|
|
273
|
+
/** BigCommerce */
|
|
274
|
+
cartId?: string[];
|
|
275
|
+
/** BigCommerce */
|
|
276
|
+
orderId?: string[];
|
|
277
|
+
}
|
|
278
|
+
export interface MagentoPersonIdentifiers {
|
|
279
|
+
/** Magento customer */
|
|
280
|
+
customerId?: string[];
|
|
281
|
+
/** Magento cart */
|
|
282
|
+
cartId?: string[];
|
|
283
|
+
/** Magento order unique identifier */
|
|
284
|
+
orderId?: string[];
|
|
285
|
+
/** Magento order number / incremental ID */
|
|
286
|
+
orderNumber?: string[];
|
|
287
|
+
/** Magento checkout */
|
|
288
|
+
checkoutId?: string[];
|
|
289
|
+
}
|
|
290
|
+
export interface ScopedIdentifiersOfKlaviyoPersonIdentifiersDtoAndString {
|
|
291
|
+
data?: {
|
|
292
|
+
[key: string]: KlaviyoPersonIdentifiers;
|
|
293
|
+
};
|
|
294
|
+
}
|
|
295
|
+
export interface KlaviyoPersonIdentifiers {
|
|
296
|
+
/** Klaviyo profile ID */
|
|
297
|
+
profileId?: string[] | undefined;
|
|
298
|
+
}
|
|
299
|
+
export interface TrackingEventSource {
|
|
300
|
+
/** Source method that requested the tracking. */
|
|
301
|
+
method: string;
|
|
302
|
+
/** Type of origin that generated the tracking request.
|
|
303
|
+
This is not the same as where the tracking event originated from, this property specifies where the tracking event was tracked from. */
|
|
304
|
+
origin?: TrackingEventSourceOriginType | undefined;
|
|
305
|
+
/** Time occurred. Do not provide to use server time (recommended) */
|
|
306
|
+
time?: Date | undefined;
|
|
307
|
+
/** URL where the tracking event originated from. */
|
|
308
|
+
loc: string;
|
|
309
|
+
/** Session ID where the tracking event originated from. UTC date.time and then random digits.
|
|
310
|
+
Format YYYYMMDD.HHMMSS.{random 10 digits} */
|
|
311
|
+
sess?: string | undefined;
|
|
312
|
+
/** Diagnosis session ID. UTC date.time and then random digits.
|
|
313
|
+
Format YYYYMMDD.HHMMSS.{random 10 digits} */
|
|
314
|
+
diag?: string | undefined;
|
|
315
|
+
runtime?: SeekaSdkRuntimeInfo;
|
|
316
|
+
/** Context of the pipeline integration that raised the tracking event. */
|
|
317
|
+
pipeline?: SeekaPipelineIntegrationSource | undefined;
|
|
318
|
+
}
|
|
319
|
+
export declare enum TrackingEventSourceOriginType {
|
|
320
|
+
Browser = "browser",
|
|
321
|
+
Server = "server",
|
|
322
|
+
Mobile = "mobile",
|
|
323
|
+
Desktop = "desktop",
|
|
324
|
+
PhysicalStore = "physicalStore",
|
|
325
|
+
Email = "email",
|
|
326
|
+
Phone = "phone",
|
|
327
|
+
Chat = "chat",
|
|
328
|
+
Automatic = "automatic"
|
|
329
|
+
}
|
|
330
|
+
export interface SeekaSdkRuntimeInfo {
|
|
331
|
+
/** Version of the package or library being used to interact with the SDK */
|
|
332
|
+
ver?: string;
|
|
333
|
+
/** Type of the package or library being used to interact with the SDK */
|
|
334
|
+
type?: string;
|
|
335
|
+
config?: any;
|
|
336
|
+
client?: SeekaSdkClientRuntimeInfo;
|
|
337
|
+
}
|
|
338
|
+
export interface SeekaSdkClientRuntimeInfo {
|
|
339
|
+
/** Client version used to identify the implementation of the SDK */
|
|
340
|
+
ver?: string;
|
|
341
|
+
/** Name or type used to identify the implementation of the SDK. This could be specified as 'backend' for a backend integration with the SDK or 'website' for integrations placed on a website. */
|
|
342
|
+
type?: string;
|
|
343
|
+
}
|
|
344
|
+
export interface SeekaPipelineIntegrationSource {
|
|
345
|
+
convergePipelineIntegrationInstanceId?: string;
|
|
346
|
+
/** The IntegrationVendorNameKey could be set to "Klaviyo" for all Klaviyo pipeline integration classes so that the rate limit for certain operations are shared across all Klaviyo integration instances that share the same IntegrationInstanceUniqueKey
|
|
347
|
+
Alpha only
|
|
348
|
+
Max length of 12 characters */
|
|
349
|
+
integrationVendorNameKey?: string;
|
|
350
|
+
/** In format of IntegrationPublisherCompany.IntegrationVendorNameKey.IntegrationName. Eg. Seeka.Klaviyo.Identity */
|
|
351
|
+
convergePipelineIntegrationTypeKey?: string;
|
|
352
|
+
}
|
|
353
|
+
export interface DataIngestBatchHttpRequest {
|
|
354
|
+
/** Max batch size is 50 */
|
|
355
|
+
data?: DataIngestBatchHttpItem[];
|
|
356
|
+
}
|
|
357
|
+
export interface DataIngestBatchHttpItem {
|
|
358
|
+
ev?: ActivityTrackingRequest;
|
|
359
|
+
id?: PersonIdentificationRequest;
|
|
360
|
+
bot?: BotMetricTrackingRequest;
|
|
361
|
+
log?: ActivityLogRequest;
|
|
362
|
+
}
|
|
363
|
+
export interface ActivityTrackingRequest {
|
|
364
|
+
/** Collection of identifiers used to calculate the identity graph. */
|
|
365
|
+
id: PersonIdentifiers;
|
|
366
|
+
/** Source of the identification request. */
|
|
367
|
+
src: TrackingEventSource;
|
|
368
|
+
/** Custom properties to attach to tracking event */
|
|
369
|
+
props?: {
|
|
370
|
+
[key: string]: string;
|
|
371
|
+
};
|
|
372
|
+
/** UTM tracking information */
|
|
373
|
+
utm?: UtmTrackingEvent[];
|
|
374
|
+
/** Activity tracking information */
|
|
375
|
+
payload?: ActivityPayload;
|
|
376
|
+
}
|
|
377
|
+
export interface UtmTrackingEvent {
|
|
378
|
+
/** UTM ID */
|
|
379
|
+
id?: string;
|
|
380
|
+
/** UTM content */
|
|
381
|
+
content?: string;
|
|
382
|
+
/** UTM source */
|
|
383
|
+
source?: string;
|
|
384
|
+
/** UTM campaign */
|
|
385
|
+
campaign?: string;
|
|
386
|
+
/** UTM term */
|
|
387
|
+
term?: string;
|
|
388
|
+
/** UTM medium */
|
|
389
|
+
medium?: string;
|
|
390
|
+
}
|
|
391
|
+
export interface ActivityPayloadBase {
|
|
392
|
+
/** Standard or custom activity / behavior activity name. */
|
|
393
|
+
activityName?: TrackingActivityNames;
|
|
394
|
+
/** Required if ActivityName is set to Custom.
|
|
395
|
+
When setting this parameter in conjunction with setting ActivityName to a standard event name, Seeka will process the event
|
|
396
|
+
as a standard event with the exception of conversion based data destinations being sent the event as the ActivityNameCustom value
|
|
397
|
+
with the parameters of the standard event. */
|
|
398
|
+
activityNameCustom?: string;
|
|
399
|
+
/** Unique identifier used to de-duplicate activities */
|
|
400
|
+
activityId?: string;
|
|
401
|
+
/** E-Commerce specific activity properties */
|
|
402
|
+
commerce?: CommerceActivityTrackingEventMetadata;
|
|
403
|
+
/** Search function specific activity properties */
|
|
404
|
+
search?: SearchActivityTrackingEventMetadata;
|
|
405
|
+
/** Sign up / newsletter function specific activity properties */
|
|
406
|
+
signUp?: SignUpActivityTrackingEventMetadata;
|
|
407
|
+
/** User account specific activity properties */
|
|
408
|
+
userAccount?: UserAccountActivityTrackingEventMetadata;
|
|
409
|
+
/** Promotion specific activity properties */
|
|
410
|
+
promotion?: PromotionalActivityTrackingEventMetadata;
|
|
411
|
+
/** Content behavior specific activity properties */
|
|
412
|
+
contentBehaviour?: ContentBehaviourActivityTrackingEventMetadata;
|
|
413
|
+
/** Lead activity properties */
|
|
414
|
+
lead?: LeadActivityTrackingEventMetadata;
|
|
415
|
+
/** Content item activity properties */
|
|
416
|
+
contentItem?: ContentItemActivityTrackingEventMetadata;
|
|
417
|
+
/** Custom properties attached to the tracking event */
|
|
418
|
+
properties?: {
|
|
419
|
+
[key: string]: string;
|
|
420
|
+
};
|
|
421
|
+
}
|
|
422
|
+
export interface ActivityPayload extends ActivityPayloadBase {
|
|
423
|
+
/** Time activity occurred. Do not provide to use server time (recommended) */
|
|
424
|
+
time?: Date | undefined;
|
|
425
|
+
}
|
|
426
|
+
export declare enum TrackingActivityNames {
|
|
427
|
+
Undefined = "undefined",
|
|
428
|
+
PageViewOrganic = "pageViewOrganic",
|
|
429
|
+
PageViewUtmAttributed = "pageViewUtmAttributed",
|
|
430
|
+
AddPaymentMethod = "addPaymentMethod",
|
|
431
|
+
AddToWishlist = "addToWishlist",
|
|
432
|
+
ContactMessage = "contactMessage",
|
|
433
|
+
Custom = "custom",
|
|
434
|
+
SyncCart = "syncCart",
|
|
435
|
+
Order = "order",
|
|
436
|
+
InitiateCheckout = "initiateCheckout",
|
|
437
|
+
AddToCart = "addToCart",
|
|
438
|
+
RemoveFromCart = "removeFromCart",
|
|
439
|
+
OneTimeItemPurchase = "oneTimeItemPurchase",
|
|
440
|
+
SubscriptionItemPurchase = "subscriptionItemPurchase",
|
|
441
|
+
ViewProduct = "viewProduct",
|
|
442
|
+
ViewPage = "viewPage",
|
|
443
|
+
ApplyPromotionalCode = "applyPromotionalCode",
|
|
444
|
+
KeywordSearch = "keywordSearch",
|
|
445
|
+
UserLoginSignup = "userLoginSignup",
|
|
446
|
+
UserLogin = "userLogin",
|
|
447
|
+
NewsletterSignup = "newsletterSignup",
|
|
448
|
+
Lead = "lead",
|
|
449
|
+
ChangeProductAttribute = "changeProductAttribute",
|
|
450
|
+
FilterItemsByAttribute = "filterItemsByAttribute",
|
|
451
|
+
Schedule = "schedule",
|
|
452
|
+
ViewContentItem = "viewContentItem",
|
|
453
|
+
StartTrial = "startTrial"
|
|
454
|
+
}
|
|
455
|
+
export interface CommerceActivityTrackingEventMetadata {
|
|
456
|
+
products?: CommerceActivityTrackingEventProductMetadata[];
|
|
457
|
+
checkoutIdentifier?: string;
|
|
458
|
+
cartIdentifier?: string;
|
|
459
|
+
orderIdentifier?: string;
|
|
460
|
+
orderNumber?: string;
|
|
461
|
+
customerIdentifier?: string;
|
|
462
|
+
sourceChannelName?: string;
|
|
463
|
+
platformType?: ECommercePlatform;
|
|
464
|
+
paymentMethodName?: string;
|
|
465
|
+
currencyCode?: string;
|
|
466
|
+
isTest?: boolean;
|
|
467
|
+
totalRefunds?: number | undefined;
|
|
468
|
+
totalDiscounts?: number | undefined;
|
|
469
|
+
totalLineItemsPrice?: number | undefined;
|
|
470
|
+
totalPrice?: number | undefined;
|
|
471
|
+
totalTax?: number | undefined;
|
|
472
|
+
totalShippingPrice?: number | undefined;
|
|
473
|
+
fulfillmentStatus?: ECommerceFulfillmentStatus | undefined;
|
|
474
|
+
financialStatus?: ECommerceFinancialStatus | undefined;
|
|
475
|
+
}
|
|
476
|
+
export interface CommerceActivityTrackingEventProductMetadata {
|
|
477
|
+
/** ISO 4217 currency code */
|
|
478
|
+
currencyCode?: string;
|
|
479
|
+
productIdentifier?: string;
|
|
480
|
+
variantIdentifier?: string;
|
|
481
|
+
sku?: string;
|
|
482
|
+
lineItemIdentifier?: string;
|
|
483
|
+
productName?: string;
|
|
484
|
+
variantName?: string;
|
|
485
|
+
categoryName?: string;
|
|
486
|
+
brandName?: string;
|
|
487
|
+
unitPrice?: number | undefined;
|
|
488
|
+
quantity?: number | undefined;
|
|
489
|
+
totalDiscount?: number | undefined;
|
|
490
|
+
type?: ECommerceContentType | undefined;
|
|
491
|
+
attributes?: {
|
|
492
|
+
[key: string]: any;
|
|
493
|
+
};
|
|
494
|
+
}
|
|
495
|
+
export declare enum ECommerceContentType {
|
|
496
|
+
Undefined = "undefined",
|
|
497
|
+
SingleProduct = "singleProduct",
|
|
498
|
+
SingleVariant = "singleVariant",
|
|
499
|
+
Collection = "collection"
|
|
500
|
+
}
|
|
501
|
+
export declare enum ECommercePlatform {
|
|
502
|
+
None = "none",
|
|
503
|
+
BigCommerce = "bigCommerce",
|
|
504
|
+
Shopify = "shopify",
|
|
505
|
+
OrderGroove = "orderGroove",
|
|
506
|
+
Magento = "magento",
|
|
507
|
+
Generic = "generic",
|
|
508
|
+
WooCommerce = "wooCommerce",
|
|
509
|
+
Demandware = "demandware"
|
|
510
|
+
}
|
|
511
|
+
/** https://shopify.dev/api/admin-rest/2022-01/resources/order#resource-object */
|
|
512
|
+
export declare enum ECommerceFulfillmentStatus {
|
|
513
|
+
Undefined = "undefined",
|
|
514
|
+
Fulfilled = "fulfilled",
|
|
515
|
+
NoneFulfilled = "noneFulfilled",
|
|
516
|
+
PartiallyFulfilled = "partiallyFulfilled",
|
|
517
|
+
RestockedOrCancelled = "restockedOrCancelled"
|
|
518
|
+
}
|
|
519
|
+
/** https://shopify.dev/api/admin-rest/2022-01/resources/order#resource-object */
|
|
520
|
+
export declare enum ECommerceFinancialStatus {
|
|
521
|
+
Undefined = "undefined",
|
|
522
|
+
Pending = "pending",
|
|
523
|
+
Authorized = "authorized",
|
|
524
|
+
PartiallyPaid = "partiallyPaid",
|
|
525
|
+
Paid = "paid",
|
|
526
|
+
PartiallyRefunded = "partiallyRefunded",
|
|
527
|
+
Refunded = "refunded",
|
|
528
|
+
Voided = "voided"
|
|
529
|
+
}
|
|
530
|
+
export interface SearchActivityTrackingEventMetadata {
|
|
531
|
+
searchText?: string;
|
|
532
|
+
}
|
|
533
|
+
export interface UserAccountActivityTrackingEventMetadata {
|
|
534
|
+
emailAddress?: string | undefined;
|
|
535
|
+
userAccountIdentifierValue?: string | undefined;
|
|
536
|
+
userAccountIdentifierTypeName?: string | undefined;
|
|
537
|
+
}
|
|
538
|
+
export interface SignUpActivityTrackingEventMetadata extends UserAccountActivityTrackingEventMetadata {
|
|
539
|
+
}
|
|
540
|
+
export interface PromotionalActivityTrackingEventMetadata {
|
|
541
|
+
code?: string;
|
|
542
|
+
}
|
|
543
|
+
export interface ContentBehaviourActivityTrackingEventMetadata {
|
|
544
|
+
/** Behavior that changes or customised a product via an attribute. */
|
|
545
|
+
changeProduct?: ChangeProductAttributeActivityTrackingEventMetadata;
|
|
546
|
+
/** Behavior that filters a list of items or content via an attribute. */
|
|
547
|
+
filterItems?: FilterItemsByAttributeActivityTrackingEventMetadata;
|
|
548
|
+
}
|
|
549
|
+
export interface ChangeProductAttributeActivityTrackingEventMetadata {
|
|
550
|
+
/** Name of the type of attribute. */
|
|
551
|
+
attributeTypeName?: string;
|
|
552
|
+
/** Previous value of the attribute before the change. */
|
|
553
|
+
previousAttributeValue?: string;
|
|
554
|
+
/** Value the attribute was changed to. */
|
|
555
|
+
newAttributeValue?: string;
|
|
556
|
+
/** Product that relates to attribute change. */
|
|
557
|
+
product?: CommerceActivityTrackingEventProductMetadata;
|
|
558
|
+
}
|
|
559
|
+
export interface FilterItemsByAttributeActivityTrackingEventMetadata {
|
|
560
|
+
/** Name of the type of attribute that is being filtered by. */
|
|
561
|
+
attributeTypeName?: string;
|
|
562
|
+
/** String value of the filter. Use only one of StringValue, NumericValue, BooleanValue or DateValue properties. */
|
|
563
|
+
stringValue?: string;
|
|
564
|
+
/** Numerical value of the filter. Use only one of StringValue, NumericValue, BooleanValue or DateValue properties. */
|
|
565
|
+
numericValue?: number | undefined;
|
|
566
|
+
/** Date value of the filter. Use only one of StringValue, NumericValue, BooleanValue or DateValue properties. */
|
|
567
|
+
dateValue?: Date | undefined;
|
|
568
|
+
/** Boolean (true/false) value of the filter. Use only one of StringValue, NumericValue, BooleanValue or DateValue properties. */
|
|
569
|
+
booleanValue?: boolean | undefined;
|
|
570
|
+
}
|
|
571
|
+
export interface LeadActivityTrackingEventMetadata {
|
|
572
|
+
sourceContentName?: string;
|
|
573
|
+
companySize?: string;
|
|
574
|
+
companyName?: string;
|
|
575
|
+
predictedLtv?: number | undefined;
|
|
576
|
+
predictedValue?: number | undefined;
|
|
577
|
+
/** ISO 4217 currency code */
|
|
578
|
+
currencyCode?: string;
|
|
579
|
+
}
|
|
580
|
+
export interface ContentItemActivityTrackingEventMetadata {
|
|
581
|
+
contentName?: string;
|
|
582
|
+
identifiers?: string[];
|
|
583
|
+
categoryName?: string;
|
|
584
|
+
/** ISO 4217 currency code */
|
|
585
|
+
currencyCode?: string;
|
|
586
|
+
value?: number | undefined;
|
|
587
|
+
contentType?: ECommerceContentType | undefined;
|
|
588
|
+
items?: CommerceActivityTrackingEventProductMetadata[];
|
|
589
|
+
}
|
|
590
|
+
export interface BotMetricTrackingRequest extends PersonIdentificationRequest {
|
|
591
|
+
}
|
|
592
|
+
export interface ActivityTrackingBase {
|
|
593
|
+
id?: string;
|
|
594
|
+
source?: TrackingEventSource;
|
|
595
|
+
properties?: {
|
|
596
|
+
[key: string]: string;
|
|
597
|
+
};
|
|
598
|
+
utm?: UtmTrackingEvent;
|
|
599
|
+
}
|
|
600
|
+
export interface ActivityLogRequest extends ActivityTrackingBase {
|
|
601
|
+
logType?: ConvergePipelineLoggableActivityType;
|
|
602
|
+
logLevel?: SdkLogEventLevel;
|
|
603
|
+
messageTemplate?: string;
|
|
604
|
+
identifiers?: PersonIdentifiers;
|
|
605
|
+
}
|
|
606
|
+
export declare enum ConvergePipelineLoggableActivityType {
|
|
607
|
+
Generic = "generic",
|
|
608
|
+
ActivityIngress = "activityIngress",
|
|
609
|
+
ActivityEgress = "activityEgress",
|
|
610
|
+
UserProfile = "userProfile",
|
|
611
|
+
SdkLog = "sdkLog",
|
|
612
|
+
Detections = "detections",
|
|
613
|
+
ActivityEgressFilter = "activityEgressFilter",
|
|
614
|
+
Diagnosis = "diagnosis",
|
|
615
|
+
PipelineIntegrationOutput = "pipelineIntegrationOutput"
|
|
616
|
+
}
|
|
617
|
+
export declare enum SdkLogEventLevel {
|
|
618
|
+
Information = "information",
|
|
619
|
+
Warning = "warning",
|
|
620
|
+
Error = "error",
|
|
621
|
+
Verbose = "verbose"
|
|
622
|
+
}
|
|
623
|
+
export declare enum SeekaWebhookCallType {
|
|
624
|
+
None = "none",
|
|
625
|
+
Probe = "probe",
|
|
626
|
+
AppInstalled = "appInstalled",
|
|
627
|
+
IdentityChanged = "identityChanged",
|
|
628
|
+
ActivityAccepted = "activityAccepted",
|
|
629
|
+
AppInstallSettingsUpdated = "appInstallSettingsUpdated",
|
|
630
|
+
AppUninstalled = "appUninstalled"
|
|
631
|
+
}
|
|
632
|
+
export interface SeekaWebhookPayload {
|
|
633
|
+
type?: SeekaWebhookCallType;
|
|
634
|
+
/** Determines if the webhook is sent as a result of a test call */
|
|
635
|
+
isTest?: boolean;
|
|
636
|
+
/** Unique identifier for the webhook request */
|
|
637
|
+
requestId?: string;
|
|
638
|
+
causationId?: string | undefined;
|
|
639
|
+
}
|
|
640
|
+
export interface SeekaProbeWebhookPayload {
|
|
641
|
+
type?: SeekaWebhookCallType;
|
|
642
|
+
/** Determines if the webhook is sent as a result of a test call */
|
|
643
|
+
isTest?: boolean;
|
|
644
|
+
/** Unique identifier for the webhook request */
|
|
645
|
+
requestId?: string;
|
|
646
|
+
causationId?: string | undefined;
|
|
647
|
+
}
|
|
648
|
+
export interface SeekaWebhookPayloadOfSeekaAppWebhookContext extends SeekaWebhookPayload {
|
|
649
|
+
context?: SeekaAppWebhookContext;
|
|
650
|
+
}
|
|
651
|
+
export interface SeekaWebhookPayloadOfSeekaAppWebhookContextAndSeekaAppInstalledWebhookContent extends SeekaWebhookPayloadOfSeekaAppWebhookContext {
|
|
652
|
+
content?: SeekaAppInstalledWebhookContent | undefined;
|
|
653
|
+
}
|
|
654
|
+
export interface SeekaAppInstalledWebhookContent {
|
|
655
|
+
installationSettings?: {
|
|
656
|
+
[key: string]: any;
|
|
657
|
+
};
|
|
658
|
+
/** The permissions granted to the app install by the user that installed the app. */
|
|
659
|
+
grantedPermissions?: string[];
|
|
660
|
+
}
|
|
661
|
+
export interface SeekaAppWebhookContext {
|
|
662
|
+
/** ID of the organisation that installed the app */
|
|
663
|
+
organisationId?: string;
|
|
664
|
+
/** ID of the brand that installed the app */
|
|
665
|
+
organisationBrandId?: string;
|
|
666
|
+
/** Pipeline integration ID / ID of the installation of the app */
|
|
667
|
+
applicationInstallId?: string;
|
|
668
|
+
/** The client / application ID */
|
|
669
|
+
applicationId?: string;
|
|
670
|
+
}
|
|
671
|
+
export interface SeekaAppInstalledWebhookPayload extends SeekaWebhookPayloadOfSeekaAppWebhookContext {
|
|
672
|
+
content?: SeekaAppInstalledWebhookContent | undefined;
|
|
673
|
+
}
|
|
674
|
+
export interface SeekaWebhookPayloadOfSeekaAppWebhookContextAndSeekaAppUninstalledWebhookContent extends SeekaWebhookPayloadOfSeekaAppWebhookContext {
|
|
675
|
+
content?: SeekaAppUninstalledWebhookContent | undefined;
|
|
676
|
+
}
|
|
677
|
+
export interface SeekaAppUninstalledWebhookContent {
|
|
678
|
+
installationSettings?: {
|
|
679
|
+
[key: string]: any;
|
|
680
|
+
};
|
|
681
|
+
}
|
|
682
|
+
export interface SeekaAppUninstalledWebhookPayload extends SeekaWebhookPayloadOfSeekaAppWebhookContext {
|
|
683
|
+
content?: SeekaAppUninstalledWebhookContent | undefined;
|
|
684
|
+
}
|
|
685
|
+
export interface SeekaWebhookPayloadOfSeekaAppWebhookContextAndSeekaAppInstallSettingsUpdatedWebhookContent extends SeekaWebhookPayloadOfSeekaAppWebhookContext {
|
|
686
|
+
content?: SeekaAppInstallSettingsUpdatedWebhookContent | undefined;
|
|
687
|
+
}
|
|
688
|
+
export interface SeekaAppInstallSettingsUpdatedWebhookContent {
|
|
689
|
+
installationSettings?: {
|
|
690
|
+
[key: string]: any;
|
|
691
|
+
};
|
|
692
|
+
/** The permissions granted to the app install by the user that installed the app. */
|
|
693
|
+
grantedPermissions?: string[];
|
|
694
|
+
}
|
|
695
|
+
export interface SeekaAppInstallSettingsUpdatedWebhookPayload extends SeekaWebhookPayloadOfSeekaAppWebhookContext {
|
|
696
|
+
content?: SeekaAppInstallSettingsUpdatedWebhookContent | undefined;
|
|
697
|
+
}
|
|
698
|
+
export interface SeekaWebhookPayloadOfSeekaAppWebhookContextAndSeekaActivityAcceptedWebhookContent extends SeekaWebhookPayloadOfSeekaAppWebhookContext {
|
|
699
|
+
content?: SeekaActivityAcceptedWebhookContent | undefined;
|
|
700
|
+
}
|
|
701
|
+
export interface SeekaActivityAcceptedWebhookContent {
|
|
702
|
+
source?: TrackingEventSource;
|
|
703
|
+
identifiers?: PersonIdentifiers;
|
|
704
|
+
activity?: ActivityPayload2;
|
|
705
|
+
personId?: string;
|
|
706
|
+
}
|
|
707
|
+
export interface ActivityPayload2 extends ActivityPayloadBase {
|
|
708
|
+
/** Time activity occurred */
|
|
709
|
+
time?: Date;
|
|
710
|
+
}
|
|
711
|
+
export interface SeekaActivityAcceptedWebhookPayload extends SeekaWebhookPayloadOfSeekaAppWebhookContext {
|
|
712
|
+
content?: SeekaActivityAcceptedWebhookContent | undefined;
|
|
713
|
+
}
|
|
714
|
+
export interface SeekaWebhookPayloadOfSeekaAppWebhookContextAndSeekaIdentityChangedWebhookContent extends SeekaWebhookPayloadOfSeekaAppWebhookContext {
|
|
715
|
+
content?: SeekaIdentityChangedWebhookContent | undefined;
|
|
716
|
+
}
|
|
717
|
+
export interface SeekaIdentityChangedWebhookContent {
|
|
718
|
+
identifiers?: PersonIdentifiers;
|
|
719
|
+
personId?: string;
|
|
720
|
+
}
|
|
721
|
+
export interface SeekaIdentityChangedWebhookPayload extends SeekaWebhookPayloadOfSeekaAppWebhookContext {
|
|
722
|
+
content?: SeekaIdentityChangedWebhookContent | undefined;
|
|
723
|
+
}
|
|
724
|
+
export declare class ApiException extends Error {
|
|
725
|
+
message: string;
|
|
726
|
+
status: number;
|
|
727
|
+
response: string;
|
|
728
|
+
headers: {
|
|
729
|
+
[key: string]: any;
|
|
730
|
+
};
|
|
731
|
+
result: any;
|
|
732
|
+
constructor(message: string, status: number, response: string, headers: {
|
|
733
|
+
[key: string]: any;
|
|
734
|
+
}, result: any);
|
|
735
|
+
protected isApiException: boolean;
|
|
736
|
+
static isApiException(obj: any): obj is ApiException;
|
|
737
|
+
}
|
|
738
|
+
export interface AppClientRuntimeInfo {
|
|
739
|
+
/** Client version used to identify the implementation of the SDK */
|
|
740
|
+
ver: string;
|
|
741
|
+
/** Name or type used to identify the implementation of the SDK. This could be specified as 'backend' for a backend integration with the SDK or 'website' for integrations placed on a website. */
|
|
742
|
+
type: string;
|
|
743
|
+
}
|
|
744
|
+
export interface AppRuntimeInfo {
|
|
745
|
+
/** Version of the package or library being used to interact with the SDK */
|
|
746
|
+
ver: string;
|
|
747
|
+
/** Type of the package or library being used to interact with the SDK */
|
|
748
|
+
type: string;
|
|
749
|
+
client: AppClientRuntimeInfo;
|
|
750
|
+
}
|
|
751
|
+
//# sourceMappingURL=index.d.ts.map
|