@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.
@@ -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
+ export declare const CHEAT_CODES: {
2
+ readonly returnSome: "iddqd";
3
+ readonly returnNone: "idkfa";
4
+ readonly allSameBrand: "impulse101";
5
+ };
@@ -0,0 +1,2 @@
1
+ import { type ILogger, type AsyncResult, type ICompiledPublisherConfiguration } from '@surfside/ads-core';
2
+ export declare const MockGetConfiguration: (logger: ILogger | undefined) => AsyncResult<ICompiledPublisherConfiguration>;
@@ -0,0 +1,2 @@
1
+ import { type IDevice, type Result } from '@surfside/ads-core';
2
+ export declare const MockGetDevice: () => Result<IDevice>;
@@ -0,0 +1,2 @@
1
+ import { type AsyncResult, type IDynamicZone } from '@surfside/ads-core-client';
2
+ export declare const MockGetDynamicZone: () => AsyncResult<IDynamicZone>;
@@ -0,0 +1,2 @@
1
+ import { type AsyncResult, type IGeoContext } from '@surfside/ads-core';
2
+ export declare const MockGetGeo: () => AsyncResult<IGeoContext>;
@@ -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;
@@ -0,0 +1,3 @@
1
+ export * from './Bidder';
2
+ export * from './Configuration';
3
+ export * from './CheatCodes';
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
+ }