@surfside/ads-core-client 0.1.22 → 0.3.0-0ff9dfa7.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 (37) hide show
  1. package/README.md +15 -15
  2. package/lib/cjs/BuildInfo.js +6 -2
  3. package/lib/cjs/BuildInfo.js.map +1 -1
  4. package/lib/cjs/Init.js +70 -0
  5. package/lib/cjs/Init.js.map +1 -0
  6. package/lib/cjs/helpers/index.js.map +1 -1
  7. package/lib/cjs/helpers/response/Banner.js +15 -4
  8. package/lib/cjs/helpers/response/Banner.js.map +1 -1
  9. package/lib/cjs/helpers/response/BuildAll.js +4 -1
  10. package/lib/cjs/helpers/response/BuildAll.js.map +1 -1
  11. package/lib/cjs/helpers/response/Dynamic.js +46 -14
  12. package/lib/cjs/helpers/response/Dynamic.js.map +1 -1
  13. package/lib/cjs/helpers/response/Video.js +29 -6
  14. package/lib/cjs/helpers/response/Video.js.map +1 -1
  15. package/lib/cjs/helpers/response/index.js.map +1 -1
  16. package/lib/cjs/index.js +29 -6
  17. package/lib/cjs/index.js.map +1 -1
  18. package/lib/esm/BuildInfo.js +5 -1
  19. package/lib/esm/BuildInfo.js.map +1 -1
  20. package/lib/esm/Init.js +63 -0
  21. package/lib/esm/Init.js.map +1 -0
  22. package/lib/esm/helpers/index.js.map +1 -1
  23. package/lib/esm/helpers/response/Banner.js +16 -5
  24. package/lib/esm/helpers/response/Banner.js.map +1 -1
  25. package/lib/esm/helpers/response/BuildAll.js +4 -1
  26. package/lib/esm/helpers/response/BuildAll.js.map +1 -1
  27. package/lib/esm/helpers/response/Dynamic.js +46 -14
  28. package/lib/esm/helpers/response/Dynamic.js.map +1 -1
  29. package/lib/esm/helpers/response/Video.js +29 -6
  30. package/lib/esm/helpers/response/Video.js.map +1 -1
  31. package/lib/esm/helpers/response/index.js.map +1 -1
  32. package/lib/esm/index.js +6 -5
  33. package/lib/esm/index.js.map +1 -1
  34. package/lib/types/BuildInfo.d.ts +1 -1
  35. package/lib/types/Init.d.ts +24 -0
  36. package/lib/types/index.d.ts +2 -1
  37. package/package.json +39 -38
@@ -0,0 +1,24 @@
1
+ import { type AsyncResult, type ILoadSurfAdsCoreConfiguration, type ILogger, type ISurfAdsCoreConfiguration, type ISurfAdsCoreConfigurationOverrides, type ISurfAdsCoreDependencies, type Result } from '@surfside/ads-core';
2
+ import { type ISurfsideClientApi } from './index';
3
+ export interface ISurfAdsClientConfigurationOverrides extends ISurfAdsCoreConfigurationOverrides {
4
+ }
5
+ export interface ISurfAdsClientConfiguration extends ISurfAdsCoreConfiguration {
6
+ overrides?: {
7
+ services?: Partial<ISurfAdsClientConfigurationOverrides>;
8
+ };
9
+ }
10
+ export interface ISurfAdsClientDependencies extends ISurfAdsCoreDependencies {
11
+ }
12
+ export interface ILoadSurfAdsClientConfiguration extends ILoadSurfAdsCoreConfiguration {
13
+ overrides?: {
14
+ services?: Partial<ISurfAdsClientConfigurationOverrides>;
15
+ dependencies?: Partial<ISurfAdsClientDependencies>;
16
+ };
17
+ }
18
+ export declare const LoadSurfAdsClientDependencies: (config: ILoadSurfAdsClientConfiguration) => AsyncResult<ISurfAdsClientDependencies>;
19
+ export declare const CreateSurfAdsClient: (config: ISurfAdsClientConfiguration) => Result<ISurfsideClientApi>;
20
+ export declare const LoadSurfAdsClient: (config: ILoadSurfAdsClientConfiguration) => AsyncResult<ISurfsideClientApi>;
21
+ export declare const LoadSurfAdsClientSimple: (accountId: string, channelId: string, siteId: string, locationId: string, userId?: string, logger?: ILogger, overrides?: {
22
+ services?: Partial<ISurfAdsClientConfigurationOverrides>;
23
+ dependencies?: Partial<ISurfAdsClientDependencies>;
24
+ }) => AsyncResult<ISurfsideClientApi>;
@@ -6,7 +6,8 @@ import { type GenerateCategoriesFn } from '@surfside/ads-core/lib/types/services
6
6
  import { type InitTrackerServiceFn } from '@surfside/ads-core';
7
7
  export * from '@surfside/ads-core';
8
8
  export * from './helpers';
9
- export * from './BuildInfo';
9
+ export * as SurfsideAdsCoreClientVersionInfo from './BuildInfo';
10
+ export * from './Init';
10
11
  export interface ISurfsideClientApi extends ISurfsideApi {
11
12
  buildBannerResponse: BuildBannerResponseFn;
12
13
  buildVideoResponse: BuildVideoResponseFn;
package/package.json CHANGED
@@ -1,38 +1,39 @@
1
- {
2
- "name": "@surfside/ads-core-client",
3
- "module": "./lib/esm/index.js",
4
- "main": "./lib/cjs/index.js",
5
- "types": "./lib/types/index.d.ts",
6
- "exports": {
7
- ".": {
8
- "import": "./lib/esm/index.js",
9
- "require": "./lib/cjs/index.js",
10
- "types": "./lib/types/index.d.ts"
11
- }
12
- },
13
- "version": "0.1.22",
14
- "license": "UNLICENSED",
15
- "files": [
16
- "lib/",
17
- "README.md"
18
- ],
19
- "type": "module",
20
- "scripts": {
21
- "clean": "rm -rf ./lib",
22
- "prebuild": "echo \"export const SurfsideAdsCoreClientVersionInfo = { buildBranch: '$(git rev-parse --abbrev-ref HEAD)', buildHash: '$(git rev-parse --short HEAD)', buildVer: '$(bun -e 'console.log(require(\"./package.json\").version)')'};\" > src/BuildInfo.ts",
23
- "build": "bunx npm-run-all --parallel \"types\" \"esm\" \"cjs\"",
24
- "types": "tsc -p ./tsconfig.types.json",
25
- "esm": "tsc -p ./tsconfig.esm.json",
26
- "cjs": "tsc -p tsconfig.cjs.json",
27
- "lint": "npx eslint"
28
- },
29
- "dependencies": {
30
- "@surfside/ads-core": "^2.0.22"
31
- },
32
- "devDependencies": {
33
- "@types/bun": "latest"
34
- },
35
- "peerDependencies": {
36
- "typescript": "^5"
37
- }
38
- }
1
+ {
2
+ "name": "@surfside/ads-core-client",
3
+ "module": "./lib/esm/index.js",
4
+ "main": "./lib/cjs/index.js",
5
+ "types": "./lib/types/index.d.ts",
6
+ "exports": {
7
+ ".": {
8
+ "import": "./lib/esm/index.js",
9
+ "require": "./lib/cjs/index.js",
10
+ "types": "./lib/types/index.d.ts"
11
+ }
12
+ },
13
+ "version": "0.3.0-0ff9dfa7.0",
14
+ "license": "UNLICENSED",
15
+ "files": [
16
+ "lib/",
17
+ "README.md"
18
+ ],
19
+ "type": "module",
20
+ "scripts": {
21
+ "clean": "rm -rf ./lib",
22
+ "build": "bun x npm-run-all --parallel \"types\" \"esm\" \"cjs\"",
23
+ "build:debug": "bun ./debug.build.ts",
24
+ "types": "tsc -p ./tsconfig.types.json",
25
+ "esm": "tsc -p ./tsconfig.esm.json",
26
+ "cjs": "tsc -p tsconfig.cjs.json",
27
+ "lint": "npx eslint"
28
+ },
29
+ "dependencies": {
30
+ "@surfside/ads-core": "2.3.0-0ff9dfa7.0"
31
+ },
32
+ "devDependencies": {
33
+ "@happy-dom/global-registrator": "^20.10.2",
34
+ "@types/bun": "latest"
35
+ },
36
+ "peerDependencies": {
37
+ "typescript": "^5"
38
+ }
39
+ }