@surfside/ads-core 2.0.1 → 2.0.3
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/README.md +15 -15
- package/lib/cjs/Api.js +195 -0
- package/lib/cjs/Api.js.map +1 -0
- package/lib/cjs/helpers/Generator.js +50 -0
- package/lib/cjs/helpers/Generator.js.map +1 -0
- package/lib/cjs/helpers/Handlebars.js +313 -0
- package/lib/cjs/helpers/Handlebars.js.map +1 -0
- package/lib/cjs/helpers/NativeRequestBuilder.js +174 -0
- package/lib/cjs/helpers/NativeRequestBuilder.js.map +1 -0
- package/lib/cjs/helpers/RequestBuilder.js +160 -0
- package/lib/cjs/helpers/RequestBuilder.js.map +1 -0
- package/lib/cjs/helpers/TryGet.js +14 -0
- package/lib/cjs/helpers/TryGet.js.map +1 -0
- package/lib/cjs/helpers/Window.js +24 -0
- package/lib/cjs/helpers/Window.js.map +1 -0
- package/lib/cjs/helpers/index.js +24 -0
- package/lib/cjs/helpers/index.js.map +1 -0
- package/lib/cjs/helpers/response/Banner.js +4 -0
- package/lib/cjs/helpers/response/Banner.js.map +1 -0
- package/lib/cjs/helpers/response/BuiltResponse.js +27 -0
- package/lib/cjs/helpers/response/BuiltResponse.js.map +1 -0
- package/lib/cjs/helpers/response/Carousel.js +282 -0
- package/lib/cjs/helpers/response/Carousel.js.map +1 -0
- package/lib/cjs/helpers/response/Clickthrough.js +24 -0
- package/lib/cjs/helpers/response/Clickthrough.js.map +1 -0
- package/lib/cjs/helpers/response/ProductCard.js +198 -0
- package/lib/cjs/helpers/response/ProductCard.js.map +1 -0
- package/lib/cjs/helpers/response/Video.js +4 -0
- package/lib/cjs/helpers/response/Video.js.map +1 -0
- package/lib/cjs/helpers/response/index.js +23 -0
- package/lib/cjs/helpers/response/index.js.map +1 -0
- package/lib/cjs/index.js +21 -3488
- package/lib/cjs/index.js.map +1 -54
- package/lib/cjs/models/dynamic/DynamicZone.js +12 -0
- package/lib/cjs/models/dynamic/DynamicZone.js.map +1 -0
- package/lib/cjs/models/dynamic/index.js +18 -0
- package/lib/cjs/models/dynamic/index.js.map +1 -0
- package/lib/cjs/models/index.js +22 -0
- package/lib/cjs/models/index.js.map +1 -0
- package/lib/cjs/models/retail/Configuration.js +10 -0
- package/lib/cjs/models/retail/Configuration.js.map +1 -0
- package/lib/cjs/models/retail/Product.js +4 -0
- package/lib/cjs/models/retail/Product.js.map +1 -0
- package/lib/cjs/models/retail/Recommended.js +3 -0
- package/lib/cjs/models/retail/Recommended.js.map +1 -0
- package/lib/cjs/models/retail/index.js +20 -0
- package/lib/cjs/models/retail/index.js.map +1 -0
- package/lib/cjs/models/rtb/BidRequest.js +20 -0
- package/lib/cjs/models/rtb/BidRequest.js.map +1 -0
- package/lib/cjs/models/rtb/BidResponse.js +3 -0
- package/lib/cjs/models/rtb/BidResponse.js.map +1 -0
- package/lib/cjs/models/rtb/NativeRequest.js +122 -0
- package/lib/cjs/models/rtb/NativeRequest.js.map +1 -0
- package/lib/cjs/models/rtb/NativeResponse.js +26 -0
- package/lib/cjs/models/rtb/NativeResponse.js.map +1 -0
- package/lib/cjs/models/rtb/index.js +21 -0
- package/lib/cjs/models/rtb/index.js.map +1 -0
- package/lib/cjs/models/tracking/Geo.js +3 -0
- package/lib/cjs/models/tracking/Geo.js.map +1 -0
- package/lib/cjs/models/tracking/index.js +18 -0
- package/lib/cjs/models/tracking/index.js.map +1 -0
- package/lib/cjs/models/vast/Vast.js +4 -0
- package/lib/cjs/models/vast/Vast.js.map +1 -0
- package/lib/cjs/models/vast/index.js +18 -0
- package/lib/cjs/models/vast/index.js.map +1 -0
- package/lib/cjs/services/Bidder.js +128 -0
- package/lib/cjs/services/Bidder.js.map +1 -0
- package/lib/cjs/services/Configuration.js +93 -0
- package/lib/cjs/services/Configuration.js.map +1 -0
- package/lib/cjs/services/Device.js +236 -0
- package/lib/cjs/services/Device.js.map +1 -0
- package/lib/cjs/services/Dynamic.js +129 -0
- package/lib/cjs/services/Dynamic.js.map +1 -0
- package/lib/cjs/services/Geo.js +35 -0
- package/lib/cjs/services/Geo.js.map +1 -0
- package/lib/cjs/services/Logger.js +57 -0
- package/lib/cjs/services/Logger.js.map +1 -0
- package/lib/cjs/services/Memoization.js +17 -0
- package/lib/cjs/services/Memoization.js.map +1 -0
- package/lib/cjs/services/Product.js +127 -0
- package/lib/cjs/services/Product.js.map +1 -0
- package/lib/cjs/services/Recommender.js +83 -0
- package/lib/cjs/services/Recommender.js.map +1 -0
- package/lib/cjs/services/Result.js +220 -0
- package/lib/cjs/services/Result.js.map +1 -0
- package/lib/cjs/services/Template.js +43 -0
- package/lib/cjs/services/Template.js.map +1 -0
- package/lib/cjs/services/index.js +28 -0
- package/lib/cjs/services/index.js.map +1 -0
- package/lib/cjs/services/mock/Bidder.js +3 -0
- package/lib/cjs/services/mock/Bidder.js.map +1 -0
- package/lib/cjs/services/mock/index.js +18 -0
- package/lib/cjs/services/mock/index.js.map +1 -0
- package/lib/esm/Api.js +183 -0
- package/lib/esm/Api.js.map +1 -0
- package/lib/esm/helpers/Generator.js +42 -0
- package/lib/esm/helpers/Generator.js.map +1 -0
- package/lib/esm/helpers/Handlebars.js +294 -0
- package/lib/esm/helpers/Handlebars.js.map +1 -0
- package/lib/esm/helpers/NativeRequestBuilder.js +169 -0
- package/lib/esm/helpers/NativeRequestBuilder.js.map +1 -0
- package/lib/esm/helpers/RequestBuilder.js +157 -0
- package/lib/esm/helpers/RequestBuilder.js.map +1 -0
- package/lib/esm/helpers/TryGet.js +10 -0
- package/lib/esm/helpers/TryGet.js.map +1 -0
- package/lib/esm/helpers/Window.js +20 -0
- package/lib/esm/helpers/Window.js.map +1 -0
- package/lib/esm/helpers/index.js +8 -0
- package/lib/esm/helpers/index.js.map +1 -0
- package/lib/esm/helpers/response/Banner.js +3 -0
- package/lib/esm/helpers/response/Banner.js.map +1 -0
- package/lib/esm/helpers/response/BuiltResponse.js +22 -0
- package/lib/esm/helpers/response/BuiltResponse.js.map +1 -0
- package/lib/esm/helpers/response/Carousel.js +273 -0
- package/lib/esm/helpers/response/Carousel.js.map +1 -0
- package/lib/esm/helpers/response/Clickthrough.js +20 -0
- package/lib/esm/helpers/response/Clickthrough.js.map +1 -0
- package/lib/esm/helpers/response/ProductCard.js +189 -0
- package/lib/esm/helpers/response/ProductCard.js.map +1 -0
- package/lib/esm/helpers/response/Video.js +3 -0
- package/lib/esm/helpers/response/Video.js.map +1 -0
- package/lib/esm/helpers/response/index.js +7 -0
- package/lib/esm/helpers/response/index.js.map +1 -0
- package/lib/esm/index.js +5 -3460
- package/lib/esm/index.js.map +1 -54
- package/lib/esm/models/dynamic/DynamicZone.js +11 -0
- package/lib/esm/models/dynamic/DynamicZone.js.map +1 -0
- package/lib/esm/models/dynamic/index.js +2 -0
- package/lib/esm/models/dynamic/index.js.map +1 -0
- package/lib/esm/models/index.js +6 -0
- package/lib/esm/models/index.js.map +1 -0
- package/lib/esm/models/retail/Configuration.js +9 -0
- package/lib/esm/models/retail/Configuration.js.map +1 -0
- package/lib/esm/models/retail/Product.js +3 -0
- package/lib/esm/models/retail/Product.js.map +1 -0
- package/lib/esm/models/retail/Recommended.js +2 -0
- package/lib/esm/models/retail/Recommended.js.map +1 -0
- package/lib/esm/models/retail/index.js +4 -0
- package/lib/esm/models/retail/index.js.map +1 -0
- package/lib/esm/models/rtb/BidRequest.js +17 -0
- package/lib/esm/models/rtb/BidRequest.js.map +1 -0
- package/lib/esm/models/rtb/BidResponse.js +2 -0
- package/lib/esm/models/rtb/BidResponse.js.map +1 -0
- package/lib/esm/models/rtb/NativeRequest.js +119 -0
- package/lib/esm/models/rtb/NativeRequest.js.map +1 -0
- package/lib/esm/models/rtb/NativeResponse.js +23 -0
- package/lib/esm/models/rtb/NativeResponse.js.map +1 -0
- package/lib/esm/models/rtb/index.js +5 -0
- package/lib/esm/models/rtb/index.js.map +1 -0
- package/lib/esm/models/tracking/Geo.js +2 -0
- package/lib/esm/models/tracking/Geo.js.map +1 -0
- package/lib/esm/models/tracking/index.js +2 -0
- package/lib/esm/models/tracking/index.js.map +1 -0
- package/lib/esm/models/vast/Vast.js +3 -0
- package/lib/esm/models/vast/Vast.js.map +1 -0
- package/lib/esm/models/vast/index.js +2 -0
- package/lib/esm/models/vast/index.js.map +1 -0
- package/lib/esm/services/Bidder.js +119 -0
- package/lib/esm/services/Bidder.js.map +1 -0
- package/lib/esm/services/Configuration.js +56 -0
- package/lib/esm/services/Configuration.js.map +1 -0
- package/lib/esm/services/Device.js +232 -0
- package/lib/esm/services/Device.js.map +1 -0
- package/lib/esm/services/Dynamic.js +120 -0
- package/lib/esm/services/Dynamic.js.map +1 -0
- package/lib/esm/services/Geo.js +30 -0
- package/lib/esm/services/Geo.js.map +1 -0
- package/lib/esm/services/Logger.js +52 -0
- package/lib/esm/services/Logger.js.map +1 -0
- package/lib/esm/services/Memoization.js +13 -0
- package/lib/esm/services/Memoization.js.map +1 -0
- package/lib/esm/services/Product.js +120 -0
- package/lib/esm/services/Product.js.map +1 -0
- package/lib/esm/services/Recommender.js +78 -0
- package/lib/esm/services/Recommender.js.map +1 -0
- package/lib/esm/services/Result.js +199 -0
- package/lib/esm/services/Result.js.map +1 -0
- package/lib/esm/services/Template.js +38 -0
- package/lib/esm/services/Template.js.map +1 -0
- package/lib/esm/services/index.js +12 -0
- package/lib/esm/services/index.js.map +1 -0
- package/lib/esm/services/mock/Bidder.js +2 -0
- package/lib/esm/services/mock/Bidder.js.map +1 -0
- package/lib/esm/services/mock/index.js +2 -0
- package/lib/esm/services/mock/index.js.map +1 -0
- package/lib/types/Api.d.ts +5 -5
- package/lib/types/helpers/Handlebars.d.ts +58 -15
- package/lib/types/helpers/NativeRequestBuilder.d.ts +1 -1
- package/lib/types/helpers/RequestBuilder.d.ts +1 -1
- package/lib/types/helpers/TryGet.d.ts +1 -1
- package/lib/types/helpers/Window.d.ts +2 -2
- package/lib/types/helpers/response/Banner.d.ts +1 -1
- package/lib/types/helpers/response/BuiltResponse.d.ts +1 -1
- package/lib/types/helpers/response/Carousel.d.ts +1 -1
- package/lib/types/helpers/response/Clickthrough.d.ts +1 -1
- package/lib/types/helpers/response/ProductCard.d.ts +3 -3
- package/lib/types/helpers/response/Video.d.ts +2 -2
- package/lib/types/services/Bidder.d.ts +3 -3
- package/lib/types/services/Configuration.d.ts +1 -1
- package/lib/types/services/Dynamic.d.ts +6 -6
- package/lib/types/services/Geo.d.ts +1 -1
- package/lib/types/services/Product.d.ts +1 -1
- package/lib/types/services/Template.d.ts +3 -3
- package/package.json +41 -33
- package/lib/index.js +0 -1
- package/lib/index.js.map +0 -1
- package/lib/types/constant-values/index.d.ts +0 -46
- package/lib/types/errors/index.d.ts +0 -3
- package/lib/types/helpers/generators/CollectN.d.ts +0 -2
- package/lib/types/helpers/generators/index.d.ts +0 -1
- package/lib/types/helpers/handlebars/index.d.ts +0 -119
- package/lib/types/helpers/requests/RequestBuilder.d.ts +0 -124
- package/lib/types/helpers/requests/SimpleBannerRequest.d.ts +0 -26
- package/lib/types/helpers/requests/index.d.ts +0 -2
- package/lib/types/helpers/responses/BuildBannerResponse.d.ts +0 -10
- package/lib/types/helpers/responses/BuildNativeResponse.d.ts +0 -21
- package/lib/types/helpers/responses/BuildVideoResponse.d.ts +0 -0
- package/lib/types/helpers/responses/ClickthroughHelpers.d.ts +0 -2
- package/lib/types/helpers/responses/VastHelpers.d.ts +0 -4
- package/lib/types/helpers/responses/index.d.ts +0 -4
- package/lib/types/middleware/DeviceMiddleware.d.ts +0 -3
- package/lib/types/middleware/GeoMiddleware.d.ts +0 -3
- package/lib/types/middleware/IdentityMiddleware.d.ts +0 -4
- package/lib/types/middleware/index.d.ts +0 -3
- package/lib/types/models/retail/IProductInformation.d.ts +0 -37
- package/lib/types/models/retail/IPublisherConfiguration.d.ts +0 -64
- package/lib/types/models/retail/IRecommenderResponse.d.ts +0 -10
- package/lib/types/models/rtb/IBidRequest.d.ts +0 -399
- package/lib/types/models/rtb/IBidResponse.d.ts +0 -47
- package/lib/types/models/rtb/native/Constants.d.ts +0 -60
- package/lib/types/models/rtb/native/INativeRequest.d.ts +0 -54
- package/lib/types/models/rtb/native/INativeResponse.d.ts +0 -60
- package/lib/types/models/rtb/native/NativeConstants.d.ts +0 -120
- package/lib/types/models/rtb/native/NativeRequestBuilder.d.ts +0 -158
- package/lib/types/models/rtb/native/index.d.ts +0 -4
- package/lib/types/models/tracking/IEvents.d.ts +0 -82
- package/lib/types/models/tracking/IGeoContext.d.ts +0 -14
- package/lib/types/models/tracking/IUserID.d.ts +0 -1
- package/lib/types/services/OverrideService.d.ts +0 -10
- package/lib/types/services/logger/ILoggerService.d.ts +0 -39
- package/lib/types/services/logger/LocalLoggerService.d.ts +0 -19
- package/lib/types/services/logger/index.d.ts +0 -2
- package/lib/types/services/product-feed/IProductFeedService.d.ts +0 -5
- package/lib/types/services/product-feed/SurfsideProductFeedService.d.ts +0 -11
- package/lib/types/services/product-feed/index.d.ts +0 -2
- package/lib/types/services/recommender/IRecommenderService.d.ts +0 -47
- package/lib/types/services/recommender/SurfsideRecommenderService.d.ts +0 -31
- package/lib/types/services/recommender/index.d.ts +0 -2
- package/lib/types/services/rtb/bidder/IBidderService.d.ts +0 -12
- package/lib/types/services/rtb/bidder/SurfsideBidderService.d.ts +0 -28
- package/lib/types/services/rtb/bidder/index.d.ts +0 -2
- package/lib/types/services/rtb/configuration/IConfigurationService.d.ts +0 -14
- package/lib/types/services/rtb/configuration/SurfsideConfigurationService.d.ts +0 -29
- package/lib/types/services/rtb/configuration/index.d.ts +0 -2
- package/lib/types/services/rtb/index.d.ts +0 -2
- package/lib/types/services/tracking/device/DeviceOverrideService.d.ts +0 -8
- package/lib/types/services/tracking/device/IDeviceService.d.ts +0 -4
- package/lib/types/services/tracking/device/SurfsideDeviceService.d.ts +0 -16
- package/lib/types/services/tracking/device/index.d.ts +0 -3
- package/lib/types/services/tracking/events/IEventService.d.ts +0 -5
- package/lib/types/services/tracking/events/SurfsideEventService.d.ts +0 -42
- package/lib/types/services/tracking/events/index.d.ts +0 -2
- package/lib/types/services/tracking/geo/GeoOverrideService.d.ts +0 -8
- package/lib/types/services/tracking/geo/IGeoService.d.ts +0 -12
- package/lib/types/services/tracking/geo/SurfsideGeoService.d.ts +0 -7
- package/lib/types/services/tracking/geo/index.d.ts +0 -3
- package/lib/types/services/tracking/index.d.ts +0 -4
- package/lib/types/services/tracking/user/IUserIDService.d.ts +0 -4
- package/lib/types/services/tracking/user/SurfsideUserIDService.d.ts +0 -7
- package/lib/types/services/tracking/user/UserOverrideService.d.ts +0 -8
- package/lib/types/services/tracking/user/index.d.ts +0 -3
- package/lib/types/utils/Protocol.d.ts +0 -1
- package/lib/types/utils/Rendering.d.ts +0 -44
- package/lib/types/utils/index.d.ts +0 -2
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
export declare enum HttpStatus {
|
|
2
|
-
OK = 200,
|
|
3
|
-
NO_CONTENT = 204,
|
|
4
|
-
BAD_REQUEST = 400,
|
|
5
|
-
NOT_FOUND = 404,
|
|
6
|
-
UNAUTHORIZED = 401,
|
|
7
|
-
FORBIDDEN = 403
|
|
8
|
-
}
|
|
9
|
-
export declare enum HttpStatusClass {
|
|
10
|
-
SUCCESS = 2,
|
|
11
|
-
CLIENT_ERROR = 4,
|
|
12
|
-
SERVER_ERROR = 5
|
|
13
|
-
}
|
|
14
|
-
export declare enum SurfColors {
|
|
15
|
-
INDIGO = "#331c7a",
|
|
16
|
-
ULTRAMARINE = "#1f69ff",
|
|
17
|
-
AQUAMARINE = "#4ceaaa",
|
|
18
|
-
ELECTRIC_LIME = "#c5f700",
|
|
19
|
-
CRAYOLA = "#f7a800",
|
|
20
|
-
ORANGE = "#f66d18",
|
|
21
|
-
RED = "#e72024",
|
|
22
|
-
LAVENDER = "#c0abff",
|
|
23
|
-
ULTRA_RED = "#f97585",
|
|
24
|
-
SOFT_GOLD = "#f4bd5d",
|
|
25
|
-
MAGIC_MINT = "#baf7db",
|
|
26
|
-
SKY_BLUE = "#7eceeb",
|
|
27
|
-
CARIBBEAN_GREN = "#0dcc91",
|
|
28
|
-
LAVENDER_GRAY = "#d3d3e0"
|
|
29
|
-
}
|
|
30
|
-
export declare enum IPServices {
|
|
31
|
-
IP2LOCATION = 1,
|
|
32
|
-
NEUSTAR = 2,
|
|
33
|
-
MAXMIND = 3,
|
|
34
|
-
NETACUITY = 4
|
|
35
|
-
}
|
|
36
|
-
export declare enum LocationType {
|
|
37
|
-
GPS = 1,
|
|
38
|
-
IP = 2,
|
|
39
|
-
USER = 3
|
|
40
|
-
}
|
|
41
|
-
export declare enum Environment {
|
|
42
|
-
PROD = "PROD",
|
|
43
|
-
STAGING = "STAGING",
|
|
44
|
-
LOCAL = "LOCAL",
|
|
45
|
-
MOCK = "MOCK"
|
|
46
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './CollectN';
|
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Converts the passed string to a slug with the specified options. By default, the slug is hyphenated and only
|
|
3
|
-
* contains alphanumeric characters. You can pass a different hyphenation regex and a different drop regex to
|
|
4
|
-
* customize the slug. For example, {{slug "My Product Name"}} will return "my-product-name".
|
|
5
|
-
*
|
|
6
|
-
* To change which characters are converted to hyphens, you can pass a regular expression to the hyphenate option.
|
|
7
|
-
* For example, {{slug "My Product's Name" hyphenate="[\s']"}} will return "my-product-s-name".
|
|
8
|
-
* The default hyphenate regex is /[\s_\-,]/ig.
|
|
9
|
-
*
|
|
10
|
-
* To remove characters instead of hyphenate them, you can pass a regular expression to the drop option.
|
|
11
|
-
* For example, {{slug "My Product's Name" drop="[^A-Za-z0-9\s']"}} will return "my-product's-name".
|
|
12
|
-
* The default drop regex is /[^A-Za-z0-9\-]/ig.
|
|
13
|
-
*
|
|
14
|
-
* To limit the max number of hyphenated slug components returned, you can pass a length option.
|
|
15
|
-
* For example, {{slug "My Product's Name" length=2}} will return "my-product".
|
|
16
|
-
* The default length is 5.
|
|
17
|
-
*
|
|
18
|
-
* @param name The string to be slugified
|
|
19
|
-
* @param options The options object. Can take "hypenate", "drop", and "length" options.
|
|
20
|
-
* @returns The slugified string
|
|
21
|
-
*/
|
|
22
|
-
export declare function slug(name: string, options: {
|
|
23
|
-
hash: {
|
|
24
|
-
hyphenate: string | undefined;
|
|
25
|
-
drop: string | undefined;
|
|
26
|
-
length: number | undefined;
|
|
27
|
-
};
|
|
28
|
-
}): string;
|
|
29
|
-
/**
|
|
30
|
-
* Converts the passed string to lowercase. For example, {{lower "My Product Name"}} will return "my product name".
|
|
31
|
-
*
|
|
32
|
-
* @param name The string to be converted to lowercase
|
|
33
|
-
* @returns A lowercase version of the passed string
|
|
34
|
-
*/
|
|
35
|
-
export declare function lower(name: string): string;
|
|
36
|
-
/**
|
|
37
|
-
* Returns the path component of the URL at the specified position, 1-indexed
|
|
38
|
-
* For example, if the URL is "https://example.com/foo/bar", {{path 1}} will return "foo".
|
|
39
|
-
*
|
|
40
|
-
* @param position The position of the path component to return, 1-indexed
|
|
41
|
-
* @returns The path component at the specified position
|
|
42
|
-
*/
|
|
43
|
-
export declare function path(position: number): string;
|
|
44
|
-
export declare function global(): any;
|
|
45
|
-
export declare function sed(input: string, searchRegex: string, replacement: string): string;
|
|
46
|
-
/**
|
|
47
|
-
* Returns the value of the specified query parameter from the URL, specified by key.
|
|
48
|
-
* For example, if the URL is "https://example.com?foo=bar", {{search "foo"}} will return "bar".
|
|
49
|
-
*
|
|
50
|
-
* @param name The name of the query parameter to return
|
|
51
|
-
* @returns The value of the query parameter, or an empty string if the parameter is not found
|
|
52
|
-
*/
|
|
53
|
-
export declare function search(name: string): string;
|
|
54
|
-
/**
|
|
55
|
-
* Returns the first truthy argument, or an empty string if all arguments are falsy. Returns false for empty strings
|
|
56
|
-
* For example, {{coalesce false (eq "b" "d") c}} will return "c", because false is falsy, "b" is not equal to "d",
|
|
57
|
-
* and c is truthy.
|
|
58
|
-
*
|
|
59
|
-
* @returns The first truthy argument, or an empty string if all arguments are falsy
|
|
60
|
-
*/
|
|
61
|
-
export declare function coalesce(): string;
|
|
62
|
-
/**
|
|
63
|
-
* Joins the passed arguments with the specified separator.
|
|
64
|
-
* For example, {{join "foo" "bar" "baz"}} will return "foo/bar/baz"..
|
|
65
|
-
*
|
|
66
|
-
* There is an optional "separator" argument that can be passed to change the separator. For example,
|
|
67
|
-
* {{join "foo" "bar" "baz" separator=","}} will return "foo,bar,baz".
|
|
68
|
-
*
|
|
69
|
-
* @returns The joined string
|
|
70
|
-
*/
|
|
71
|
-
export declare function join(): string;
|
|
72
|
-
/**
|
|
73
|
-
* Encodes the passed string for use in a URI component.
|
|
74
|
-
*
|
|
75
|
-
* @param component The string to encode
|
|
76
|
-
* @returns The encoded string, or an empty string if the component is falsy
|
|
77
|
-
*/
|
|
78
|
-
export declare function uri(component: string): string;
|
|
79
|
-
/**
|
|
80
|
-
* Returns true if the two passed arguments are equal (using javascript ===), false otherwise.
|
|
81
|
-
*
|
|
82
|
-
* @param a The first argument
|
|
83
|
-
* @param b The second argument
|
|
84
|
-
* @returns True if the two arguments are equal, false otherwise
|
|
85
|
-
*/
|
|
86
|
-
export declare function eq(a: any, b: any): boolean;
|
|
87
|
-
/**
|
|
88
|
-
* Returns true if either of the passed arguments are truthy, false otherwise.
|
|
89
|
-
*
|
|
90
|
-
* @param a The first argument
|
|
91
|
-
* @param b The second argument
|
|
92
|
-
* @returns True if either of the arguments are truthy, false otherwise
|
|
93
|
-
*/
|
|
94
|
-
export declare function or(a: any, b: any): boolean;
|
|
95
|
-
/**
|
|
96
|
-
* Returns true if both of the passed arguments are truthy, false otherwise.
|
|
97
|
-
*
|
|
98
|
-
* @param a The first argument
|
|
99
|
-
* @param b The second argument
|
|
100
|
-
* @returns True if both of the arguments are truthy, false otherwise
|
|
101
|
-
*/
|
|
102
|
-
export declare function and(a: any, b: any): boolean;
|
|
103
|
-
/**
|
|
104
|
-
* Returns true if the first argument is in the second argument (an array). Otherwise, returns false.
|
|
105
|
-
* If the second argument is not an array, or the array is empty, this will return false.
|
|
106
|
-
*
|
|
107
|
-
* The name of the helper is "in" but the name of the function is "isIn" because "in" is a reserved word in javascript.
|
|
108
|
-
*
|
|
109
|
-
* @param a The value to check
|
|
110
|
-
* @param b The array to check against
|
|
111
|
-
* @returns True if the value is in the array, false otherwise
|
|
112
|
-
*/
|
|
113
|
-
export declare function isIn(a: any, b: any[]): boolean;
|
|
114
|
-
/**
|
|
115
|
-
* Returns an array of the passed arguments. Useful with the "in" helper
|
|
116
|
-
*
|
|
117
|
-
* @returns An array of the passed arguments
|
|
118
|
-
*/
|
|
119
|
-
export declare function array(): any[];
|
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
import type { IApp, IBanner, IBidRequest, IDevice, IImp, INative, IRegs, ISite, IUser, IVideo } from '../../models';
|
|
2
|
-
declare enum BuilderCreativeType {
|
|
3
|
-
BANNER = 0,
|
|
4
|
-
VIDEO = 1,
|
|
5
|
-
NATIVE = 2
|
|
6
|
-
}
|
|
7
|
-
interface IBuilderState<T, U> {
|
|
8
|
-
currentCreative: T;
|
|
9
|
-
type: U;
|
|
10
|
-
imp: IImp;
|
|
11
|
-
}
|
|
12
|
-
export interface IBannerBuilderState extends IBuilderState<IBanner, BuilderCreativeType.BANNER> {
|
|
13
|
-
}
|
|
14
|
-
export interface IVideoBuilderState extends IBuilderState<IVideo, BuilderCreativeType.VIDEO> {
|
|
15
|
-
}
|
|
16
|
-
export interface INativeBuilderState extends IBuilderState<INative, BuilderCreativeType.NATIVE> {
|
|
17
|
-
}
|
|
18
|
-
/** Builds an OpenRTB 2.6 bid request */
|
|
19
|
-
export declare class RequestBuilder {
|
|
20
|
-
private readonly _request;
|
|
21
|
-
private _builderState;
|
|
22
|
-
/**
|
|
23
|
-
*
|
|
24
|
-
* @param id The ID of the request. If not provided, a random ID will be generated.
|
|
25
|
-
*/
|
|
26
|
-
constructor(id?: string);
|
|
27
|
-
/**
|
|
28
|
-
*
|
|
29
|
-
* @returns The built bid request
|
|
30
|
-
*/
|
|
31
|
-
build(): IBidRequest;
|
|
32
|
-
/**
|
|
33
|
-
* Adds surfside-specific information to the top level bid request and all subsequent impression objects
|
|
34
|
-
* @param accountId The account ID of the current store
|
|
35
|
-
* @param siteId The site ID of the current store
|
|
36
|
-
* @param locationId The location ID of the current store (i.e: the ID of the specific brick and mortar store)
|
|
37
|
-
* @param zoneId The ID for the zone on the advertisement
|
|
38
|
-
* @param channelId The channel ID being advertised on
|
|
39
|
-
* @param keywords A set of keywords describing the content of the page.
|
|
40
|
-
* @returns The builder instance
|
|
41
|
-
*/
|
|
42
|
-
withSurfContext(accountId: string, siteId: string, locationId: string, zoneId: string, channelId?: string, keywords?: string[]): this;
|
|
43
|
-
/**
|
|
44
|
-
* Adds a banner impression to the request. If a creative is already being built,
|
|
45
|
-
* it will be appended to the request.
|
|
46
|
-
* @param w The width of the banner being requested
|
|
47
|
-
* @param h The height of the banner being requested
|
|
48
|
-
* @param options Other OpenRTB fields to include in the banner object.
|
|
49
|
-
* @returns The builder instance
|
|
50
|
-
*/
|
|
51
|
-
withBanner(w: number, h: number, options?: Partial<IBanner>): this;
|
|
52
|
-
/**
|
|
53
|
-
* Adds a video impression to the request. If a create is already being built,
|
|
54
|
-
* it will be appended to the request
|
|
55
|
-
* @param w The width of the video being requested
|
|
56
|
-
* @param h The height of the video being requested
|
|
57
|
-
* @param minduration The minimum duration of the video, in seconds
|
|
58
|
-
* @param maxduration The maximum duration of the video, in seconds
|
|
59
|
-
* @param mimes A list of MIME types supported by the video. Defaults to ['video/mp4', 'video/webm']
|
|
60
|
-
* @param options Other OpenRTB fields to include in the video object
|
|
61
|
-
* @returns The builder instance
|
|
62
|
-
*/
|
|
63
|
-
withVideo(w: number, h: number, minduration: number, maxduration: number, mimes?: string[], options?: Partial<IVideo>): this;
|
|
64
|
-
/**
|
|
65
|
-
* Adds a native impression to the request. If a creative is already being built,
|
|
66
|
-
* it will be appended to the request. Native requests are stringified JSON objects
|
|
67
|
-
* in the OpenRTB Native 1.2 format. Use the NativeRequestBuilder to build these objects.
|
|
68
|
-
* @param request The native request object, as a stringified JSON object
|
|
69
|
-
* @param options Other OpenRTB fields to include in the native object
|
|
70
|
-
* @returns The builder instance
|
|
71
|
-
*/
|
|
72
|
-
withNative(request: string, options?: Partial<INative>): this;
|
|
73
|
-
/**
|
|
74
|
-
* Sets the bid floor on the current impression. This operates on each impression,
|
|
75
|
-
* so it needs to be called again for each impression if multiple are present.
|
|
76
|
-
* @param bidfloor The bid floor to set
|
|
77
|
-
* @param bidfloorcur The currency of the bid floor. Defaults to 'USD'
|
|
78
|
-
* @returns The builder instance
|
|
79
|
-
*/
|
|
80
|
-
withBidFloor(bidfloor: number, bidfloorcur?: string): this;
|
|
81
|
-
/**
|
|
82
|
-
* Adds an extension to the current impression. Extensions are dynamically typed dictionaries
|
|
83
|
-
* with options that are specific to the bidder. This operates on each impression, so it needs
|
|
84
|
-
* to be called again for each impression if multiple are present.
|
|
85
|
-
* @param ext The extension to add
|
|
86
|
-
* @returns The builder instance
|
|
87
|
-
*/
|
|
88
|
-
withImpExt(ext: any): this;
|
|
89
|
-
/**
|
|
90
|
-
* The site that the ad appears on.
|
|
91
|
-
* @param site The site object. If not provided, a default site object will be created using the current hostname.
|
|
92
|
-
* @returns The builder instance
|
|
93
|
-
*/
|
|
94
|
-
withSite(site?: ISite): this;
|
|
95
|
-
/**
|
|
96
|
-
* The app that the ad appears in.
|
|
97
|
-
* @param app The app object. If not provided, a default app object will be created using the current hostname.
|
|
98
|
-
* @returns The builder instance
|
|
99
|
-
*/
|
|
100
|
-
withApp(app?: IApp): this;
|
|
101
|
-
/**
|
|
102
|
-
* Information about the current user's device, including useragent, IP, make and model as well as geo information.
|
|
103
|
-
* @param device The device object
|
|
104
|
-
* @returns The builder instance
|
|
105
|
-
*/
|
|
106
|
-
withDevice(device: IDevice): this;
|
|
107
|
-
/**
|
|
108
|
-
* Information about the current user. Geo information can be included here, but is different
|
|
109
|
-
* from the device's geo information; this is the user's home location.
|
|
110
|
-
* @param user The user object
|
|
111
|
-
* @returns The builder instance
|
|
112
|
-
*/
|
|
113
|
-
withUser(user: IUser): this;
|
|
114
|
-
/**
|
|
115
|
-
* Used if any data privacy regulations are relevant to the request (i.e: COPPA, GDPR, etc.)
|
|
116
|
-
* @param regs The regs object
|
|
117
|
-
* @returns The builder instance
|
|
118
|
-
*/
|
|
119
|
-
withRegulations(regs: IRegs): this;
|
|
120
|
-
private _appendBuilderState;
|
|
121
|
-
private _appendImpression;
|
|
122
|
-
private _generateId;
|
|
123
|
-
}
|
|
124
|
-
export {};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import type { IApp, IBidRequest, IDevice, IImp, IRegs, ISite, ISource, IUser } from '../../models';
|
|
2
|
-
export declare class SimpleBannerRequest implements IBidRequest {
|
|
3
|
-
id: string;
|
|
4
|
-
imp: IImp[];
|
|
5
|
-
site?: ISite | undefined;
|
|
6
|
-
app?: IApp | undefined;
|
|
7
|
-
device?: IDevice | undefined;
|
|
8
|
-
user?: IUser | undefined;
|
|
9
|
-
test?: number | undefined;
|
|
10
|
-
at?: number | undefined;
|
|
11
|
-
tmax?: number | undefined;
|
|
12
|
-
wseat?: string[] | undefined;
|
|
13
|
-
bseat?: string[] | undefined;
|
|
14
|
-
allimps?: number | undefined;
|
|
15
|
-
cur?: string[] | undefined;
|
|
16
|
-
wlang?: string[] | undefined;
|
|
17
|
-
wlangb?: string[] | undefined;
|
|
18
|
-
bcat?: string[] | undefined;
|
|
19
|
-
cattax?: number[] | undefined;
|
|
20
|
-
badv?: string[] | undefined;
|
|
21
|
-
bapp?: string[] | undefined;
|
|
22
|
-
source?: ISource | undefined;
|
|
23
|
-
regs?: IRegs | undefined;
|
|
24
|
-
ext?: any;
|
|
25
|
-
constructor(id: string, w: number, h: number);
|
|
26
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { IBid, IBidResponse, ICompiledPublisherConfiguration, IProductInformation } from '../../models';
|
|
2
|
-
interface IBuiltBanner {
|
|
3
|
-
element: HTMLDivElement | null;
|
|
4
|
-
product: IProductInformation | null;
|
|
5
|
-
clickThrough: string | null;
|
|
6
|
-
}
|
|
7
|
-
export declare function BuildBanner(response: IBidResponse | null, config?: ICompiledPublisherConfiguration): IBuiltBanner;
|
|
8
|
-
export declare function BuildBannerFromBid(bid: IBid): HTMLDivElement | null;
|
|
9
|
-
export declare function BuildProductInfoFromElement(element: HTMLDivElement): IProductInformation | null;
|
|
10
|
-
export {};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { type IBidResponse, type ICompiledPublisherConfiguration, type INativeResponse } from '../../models';
|
|
2
|
-
import { ILoggerService, type IProductFeedService } from '../../services';
|
|
3
|
-
export interface ITrackers {
|
|
4
|
-
pixels: string[];
|
|
5
|
-
js: string[];
|
|
6
|
-
}
|
|
7
|
-
export interface IBuiltNative {
|
|
8
|
-
data: INativeResponse;
|
|
9
|
-
clickThrough: string;
|
|
10
|
-
winUrl: string;
|
|
11
|
-
trackers: ITrackers;
|
|
12
|
-
element?: Element;
|
|
13
|
-
}
|
|
14
|
-
export interface IPublisherContext {
|
|
15
|
-
config: ICompiledPublisherConfiguration;
|
|
16
|
-
productService: IProductFeedService;
|
|
17
|
-
accountId: string;
|
|
18
|
-
siteId: string;
|
|
19
|
-
locationId: string;
|
|
20
|
-
}
|
|
21
|
-
export declare function BuildNativeResponse(response: IBidResponse | null, context?: IPublisherContext, logger?: ILoggerService): Promise<IBuiltNative[]>;
|
|
File without changes
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { IBidResponse, IVast } from '../../models';
|
|
2
|
-
import type { ILoggerService } from '../../services';
|
|
3
|
-
export declare function DeserializeVideo(response: IBidResponse, logger?: ILoggerService): IVast | null;
|
|
4
|
-
export declare function DeserializeVast(logger: ILoggerService | undefined, adm: string): IVast;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import type { IBidRequest } from '../models';
|
|
2
|
-
import type { IDeviceService, ILoggerService } from '../services';
|
|
3
|
-
export declare function DeviceMiddleware(logger: ILoggerService | undefined, deviceService: IDeviceService | undefined, request: IBidRequest): Promise<IBidRequest>;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import type { IBidRequest } from '../models';
|
|
2
|
-
import type { IGeoService, ILoggerService } from '../services';
|
|
3
|
-
export declare function GeoMiddlewareImmediate(geoService: IGeoService, logger: ILoggerService | undefined, request: IBidRequest, geoTargetingEnabled: boolean, ipTargetingEnabled: boolean): Promise<IBidRequest>;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { type IBidRequest } from '../models';
|
|
2
|
-
import type { ILoggerService, IUserIDService } from '../services';
|
|
3
|
-
export declare function IdentityMiddleware(userIDService: IUserIDService, logger: ILoggerService | undefined, request: IBidRequest): Promise<IBidRequest>;
|
|
4
|
-
export declare const buildIdentityMiddleware: (userIdService: IUserIDService, logger: ILoggerService | undefined) => (request: IBidRequest) => Promise<IBidRequest>;
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
export interface IProductInformation {
|
|
2
|
-
image: string | null;
|
|
3
|
-
price: string | null;
|
|
4
|
-
salePrice: string | null;
|
|
5
|
-
thc: string | null;
|
|
6
|
-
strain: string | null;
|
|
7
|
-
cbd: string | null;
|
|
8
|
-
name: string | null;
|
|
9
|
-
brand_name: string | null;
|
|
10
|
-
brandName: string | null;
|
|
11
|
-
productType: string | null;
|
|
12
|
-
details: string | null;
|
|
13
|
-
cta: string | null;
|
|
14
|
-
clickthroughUrl: string | null;
|
|
15
|
-
winUrl: string | null;
|
|
16
|
-
pixelUrl: string | null;
|
|
17
|
-
ext?: any;
|
|
18
|
-
}
|
|
19
|
-
export declare class DefaultProductInformation implements IProductInformation {
|
|
20
|
-
image: string | null;
|
|
21
|
-
price: string | null;
|
|
22
|
-
salePrice: string | null;
|
|
23
|
-
thc: string | null;
|
|
24
|
-
strain: string | null;
|
|
25
|
-
cbd: string | null;
|
|
26
|
-
name: string | null;
|
|
27
|
-
brand_name: string | null;
|
|
28
|
-
brandName: string | null;
|
|
29
|
-
productType: string | null;
|
|
30
|
-
details: string | null;
|
|
31
|
-
cta: string | null;
|
|
32
|
-
clickthroughUrl: string | null;
|
|
33
|
-
winUrl: string | null;
|
|
34
|
-
pixelUrl: string | null;
|
|
35
|
-
ext?: any;
|
|
36
|
-
constructor();
|
|
37
|
-
}
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import type { IProductInformation } from '../../models';
|
|
2
|
-
import type Handlebars from 'handlebars/runtime';
|
|
3
|
-
export type ProductCallback = (e: Event, product: IProductInformation) => void;
|
|
4
|
-
export interface ICallbacks extends Record<string, ProductCallback> {
|
|
5
|
-
}
|
|
6
|
-
export interface INativeTemplateDelegateWindow {
|
|
7
|
-
origin: string;
|
|
8
|
-
port: string;
|
|
9
|
-
path: string;
|
|
10
|
-
host: string;
|
|
11
|
-
host_name: string;
|
|
12
|
-
search: string;
|
|
13
|
-
hash: string;
|
|
14
|
-
protocol: string;
|
|
15
|
-
}
|
|
16
|
-
export interface IPublisherConfiguration {
|
|
17
|
-
geoTargeting?: boolean;
|
|
18
|
-
ipTargeting?: boolean;
|
|
19
|
-
clickThroughUrlTemplate?: string;
|
|
20
|
-
productCardTemplate?: string;
|
|
21
|
-
productCardStyleSheet?: string;
|
|
22
|
-
carouselStyleSheet?: string;
|
|
23
|
-
reAuctionEnabled?: boolean;
|
|
24
|
-
reAuctionInterval?: number;
|
|
25
|
-
}
|
|
26
|
-
export interface ICompiledPublisherConfigurationTemplatesDTO {
|
|
27
|
-
productCardTemplate: string;
|
|
28
|
-
productCardStylesheet: string;
|
|
29
|
-
clickThroughUrlTemplate: string;
|
|
30
|
-
carouselStylesheet: string;
|
|
31
|
-
javascriptCallbacks: string;
|
|
32
|
-
}
|
|
33
|
-
export interface IProductContext {
|
|
34
|
-
product: Partial<IProductInformation>;
|
|
35
|
-
window: INativeTemplateDelegateWindow;
|
|
36
|
-
publisher: ICompiledPublisherConfiguration;
|
|
37
|
-
catalog: IProductInformation;
|
|
38
|
-
clickthrough?: string;
|
|
39
|
-
ext: any;
|
|
40
|
-
}
|
|
41
|
-
export interface ICompiledPublisherConfigurationTemplates {
|
|
42
|
-
productCardTemplate: Handlebars.TemplateDelegate<IProductContext>;
|
|
43
|
-
clickThroughUrlTemplate: Handlebars.TemplateDelegate<IProductContext>;
|
|
44
|
-
productCardStylesheet: string;
|
|
45
|
-
carouselStylesheet: string;
|
|
46
|
-
javascriptCallbacks: ICallbacks;
|
|
47
|
-
}
|
|
48
|
-
export interface ICompiledPublisherConfigurationSettingsDTO {
|
|
49
|
-
commerceMediaEnabled: boolean;
|
|
50
|
-
ipTargetingEnabled: boolean;
|
|
51
|
-
geoTargetingEnabled: boolean;
|
|
52
|
-
reauctionEnabled: boolean;
|
|
53
|
-
reauctionIntervalMs: number;
|
|
54
|
-
productFeedEnabled: boolean;
|
|
55
|
-
sponsoredByEnabled?: boolean;
|
|
56
|
-
}
|
|
57
|
-
export interface ICompiledPublisherConfigurationDTO {
|
|
58
|
-
templates: ICompiledPublisherConfigurationTemplatesDTO;
|
|
59
|
-
settings: ICompiledPublisherConfigurationSettingsDTO;
|
|
60
|
-
}
|
|
61
|
-
export interface ICompiledPublisherConfiguration {
|
|
62
|
-
settings: ICompiledPublisherConfigurationSettingsDTO;
|
|
63
|
-
templates: ICompiledPublisherConfigurationTemplates;
|
|
64
|
-
}
|