@suprsend/web-sdk 4.2.0 → 4.3.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.
@@ -1,6 +1,5 @@
1
1
  import { default as SuprSend } from './main';
2
2
  import { HandleRequest } from './interface';
3
-
4
3
  export default class ApiClient {
5
4
  private config;
6
5
  constructor(config: SuprSend);
@@ -1,7 +1,6 @@
1
1
  import { Emitter } from 'mitt';
2
2
  import { default as SuprSend } from './main';
3
3
  import { IFeedOptions, IInboxFetchOptions, InboxEmitterEvents, ApiResponse, IFeedData } from './interface';
4
-
5
4
  export default class FeedsFactory {
6
5
  private config;
7
6
  feedInstances: Feed[];
@@ -4,7 +4,6 @@ import { default as ApiClient } from './api';
4
4
  import { default as User } from './user';
5
5
  import { default as WebPush } from './webpush';
6
6
  import { default as FeedsFactory } from './feed';
7
-
8
7
  export default class SuprSend {
9
8
  host: string;
10
9
  publicApiKey: string;
@@ -1,6 +1,5 @@
1
1
  import { default as SuprSend } from './main';
2
2
  import { Dictionary, PreferenceData, PreferenceOptions, ChannelLevelPreferenceOptions, IPreferenceConfig } from './interface';
3
-
4
3
  export default class Preferences {
5
4
  private config;
6
5
  private preferenceData;
@@ -1,7 +1,6 @@
1
1
  import { SuprSend } from './index';
2
2
  import { Dictionary } from './interface';
3
3
  import { default as Preferences } from './preferences';
4
-
5
4
  export default class User {
6
5
  private config;
7
6
  preferences: Preferences;
@@ -1,10 +1,9 @@
1
1
  import { ApiResponse, AppInfo, ClientUserAgentConfig, Dictionary, ResponseOptions } from './interface';
2
-
3
2
  export declare function uuid(): string;
4
3
  export declare function epochMs(): number;
5
4
  export declare function isObjectEmpty(objectName: Dictionary): boolean;
6
5
  export declare function isArrayEmpty(arrayName: unknown[]): boolean;
7
- export declare function urlB64ToUint8Array(base64String: string): Uint8Array;
6
+ export declare function urlB64ToUint8Array(base64String: string): Uint8Array<ArrayBuffer>;
8
7
  export declare function debounce<T extends unknown[], U>(callback: (...args: T) => PromiseLike<U> | U, wait: number): (...args: T) => Promise<U>;
9
8
  export declare function debounceByType(func: any, wait: any): (...args: any[]) => any;
10
9
  export declare function getResponsePayload(options: ResponseOptions): ApiResponse;
@@ -1,5 +1,4 @@
1
1
  import { SuprSend } from './index';
2
-
3
2
  export declare const SUPRSEND_ENDPOINT_KEY = "ss_wp_hash";
4
3
  export default class WebPush {
5
4
  private config;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@suprsend/web-sdk",
3
- "version": "4.2.0",
3
+ "version": "4.3.1",
4
4
  "description": "The client side javascript library for interacting with SuprSend",
5
5
  "author": "SuprSend Developers",
6
6
  "type": "module",
@@ -11,10 +11,10 @@
11
11
  "typings": "./dist/types/index.d.ts",
12
12
  "exports": {
13
13
  ".": {
14
- "require": "./dist/cjs/index.cjs",
14
+ "types": "./dist/types/index.d.ts",
15
15
  "import": "./dist/es/index.js",
16
- "default": "./dist/es/index.js",
17
- "types": "./dist/types/index.d.ts"
16
+ "require": "./dist/cjs/index.cjs",
17
+ "default": "./dist/es/index.js"
18
18
  }
19
19
  },
20
20
  "files": [
@@ -48,8 +48,8 @@
48
48
  "rimraf": "4.4.1",
49
49
  "typescript": "^5.5.3",
50
50
  "typescript-eslint": "^7.16.1",
51
- "vite": "^5.3.4",
52
- "vite-plugin-dts": "^3.9.1"
51
+ "vite": "^6.4.2",
52
+ "vite-plugin-dts": "^4.5.4"
53
53
  },
54
54
  "dependencies": {
55
55
  "jwt-decode": "3.1.2",