@surfside/ads-core-mock 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +15 -0
- package/lib/cjs/index.js +6358 -0
- package/lib/cjs/index.js.map +41 -0
- package/lib/esm/index.js +6330 -0
- package/lib/esm/index.js.map +41 -0
- package/lib/types/index.d.ts +2 -0
- package/lib/types/mock/Bidder.d.ts +3 -0
- package/lib/types/mock/CheatCodes.d.ts +5 -0
- package/lib/types/mock/Configuration.d.ts +2 -0
- package/lib/types/mock/Device.d.ts +2 -0
- package/lib/types/mock/Dynamic.d.ts +2 -0
- package/lib/types/mock/Geo.d.ts +2 -0
- package/lib/types/mock/Product.d.ts +5 -0
- package/lib/types/mock/Recommender.d.ts +4 -0
- package/lib/types/mock/index.d.ts +3 -0
- package/package.json +22 -0
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { type ISurfsideClientApi, type AsyncResult, type ILogger } from '@surfside/ads-core-client';
|
|
2
|
+
export declare const InitSurfAdsCoreMock: (accountId: string, siteId: string, channelId: string, locationId: string, userId: string | undefined, logger?: ILogger) => AsyncResult<ISurfsideClientApi>;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { type AsyncResult, type IBidRequest, type IBidResponse, type ILogger, type INativeTemplateDelegateWindow, type Result } from '@surfside/ads-core';
|
|
2
|
+
export declare const MockRequestBids: (logger: ILogger | undefined, windowInfo: INativeTemplateDelegateWindow, bidRequest: IBidRequest) => AsyncResult<IBidResponse>;
|
|
3
|
+
export declare const makeImage: (width: number, height: number, message?: string) => Result<HTMLElement>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type IBid, type IBuiltProductCardBidResponse, type ICompiledPublisherConfiguration, type ILogger, type INativeTemplateDelegateWindow, type AsyncResult, type IProductInformation } from '@surfside/ads-core';
|
|
2
|
+
export declare function MockGetSposoredProduct(logger: ILogger | undefined, accountId: string): AsyncGenerator<IProductInformation>;
|
|
3
|
+
export declare const MockGetAllSponsoredProducts: () => AsyncResult<IProductInformation[]>;
|
|
4
|
+
export declare const MockGetRecommendedProduct: () => AsyncResult<IProductInformation>;
|
|
5
|
+
export declare function MockGenerateSponsoredProductCard(logger: ILogger | undefined, windowInfo: INativeTemplateDelegateWindow, config: ICompiledPublisherConfiguration, accountId: string, bids: IBid[]): AsyncGenerator<IBuiltProductCardBidResponse>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { type GetRecommendedProductFromProductIdFn, type IProductInformation } from '@surfside/ads-core';
|
|
2
|
+
export declare function MockGenerateTopProducts(productFeed: GetRecommendedProductFromProductIdFn): AsyncGenerator<IProductInformation>;
|
|
3
|
+
export declare const MockGenerateForYou: typeof MockGenerateTopProducts;
|
|
4
|
+
export declare const MockGeneratePastPurchases: typeof MockGenerateTopProducts;
|
package/package.json
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@surfside/ads-core-mock",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"module": "./lib/esm/index.js",
|
|
5
|
+
"main": "./lib/cjs/index.js",
|
|
6
|
+
"types": "./lib/types/index.d.ts",
|
|
7
|
+
"type": "module",
|
|
8
|
+
"license": "UNLICENSED",
|
|
9
|
+
"files": [
|
|
10
|
+
"lib/",
|
|
11
|
+
"README.md"
|
|
12
|
+
],
|
|
13
|
+
"scripts": {
|
|
14
|
+
"build": "bun bun.build.ts",
|
|
15
|
+
"lint": "npx eslint"
|
|
16
|
+
},
|
|
17
|
+
"devDependencies": {
|
|
18
|
+
"@types/bun": "latest",
|
|
19
|
+
"@surfside/ads-core-client": "^0.1.0",
|
|
20
|
+
"typescript": "^5"
|
|
21
|
+
}
|
|
22
|
+
}
|