@ada-support/embed-types
Advanced tools
| name: "Verify code" | ||
| on: | ||
| pull_request: | ||
| jobs: | ||
| verify: | ||
| name: "Verify code" | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: "Checkout source code" | ||
| uses: "actions/checkout@v3" | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.PUSH_ACCESS_TOKEN }} | ||
| with: | ||
| ref: ${{ github.ref }} | ||
| - uses: actions/setup-node@v3 | ||
| with: | ||
| node-version: "16" | ||
| registry-url: "https://registry.npmjs.org" | ||
| cache: 'npm' | ||
| - run: | | ||
| yarn install | ||
| yarn compile | ||
| yarn lint | ||
| env: | ||
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |
@@ -21,3 +21,3 @@ name: "NPM publish" | ||
| with: | ||
| node-version: "17.x" | ||
| node-version: "16.x" | ||
| registry-url: "https://registry.npmjs.org" | ||
@@ -24,0 +24,0 @@ |
+1
-1
@@ -1,1 +0,1 @@ | ||
| export * from "./src" | ||
| export * from "./src"; |
+1
-1
| { | ||
| "name": "@ada-support/embed-types", | ||
| "version": "1.0.4", | ||
| "version": "1.0.5", | ||
| "main": "./dist/index.js", | ||
@@ -5,0 +5,0 @@ "types": "./dist/index.d.ts", |
+3
-10
@@ -9,4 +9,4 @@ # embed-types | ||
| - We want to call out breaking changes for our customers and colleagues. | ||
| - Embed interface must stay relatively unchanged. Having types defined in a separate package helps to track changes to the Embed public API. | ||
| - We want to call out breaking changes for our Embed consumers (e.g., customers and colleagues). | ||
| - The Embed interface should be stable. Having types defined in a separate package helps to track changes to the Embed public API with more scrutiny. | ||
| - Types described in this package can be used across Ada frontend applications that communicate with Embed. | ||
@@ -27,11 +27,4 @@ | ||
| ## Publishing changes | ||
| You can also import any `export`ed items exposed in our public API. | ||
| In your feature branch | ||
| - Update version in `package.json`. | ||
| After merge to main branch | ||
| - Run `yarn compile` to compile; | ||
| - Run `npm publish` to publish. | ||
| ## ESLint | ||
@@ -38,0 +31,0 @@ |
+10
-10
@@ -73,4 +73,4 @@ import type { AdaEventKey, AdaEventSubscriptionCallback } from "./ada-events"; | ||
| export type MetaFieldValue = string | number | boolean | null; | ||
| export type MetaFieldPayload = Record<string, MetaFieldValue>; | ||
| export type FlatObjectValue = string | number | boolean | null; | ||
| export type FlatObjectPayload = Record<string, FlatObjectValue>; | ||
@@ -87,8 +87,8 @@ export interface WindowInfo { | ||
| language?: string; | ||
| metaFields?: MetaFieldPayload; | ||
| metaFields?: FlatObjectPayload; | ||
| resetChatHistory?: boolean; | ||
| sensitiveMetaFields?: MetaFieldPayload; | ||
| sensitiveMetaFields?: FlatObjectPayload; | ||
| } | ||
| export interface EvaluateCampaignParams { | ||
| export interface CampaignParams { | ||
| ignoreFrequency?: boolean; | ||
@@ -102,7 +102,7 @@ ignoreStatus?: boolean; | ||
| deleteHistory(): Promise<void>; | ||
| evaluateCampaignConditions(options: EvaluateCampaignParams): Promise<void>; | ||
| evaluateCampaignConditions(options: CampaignParams): Promise<void>; | ||
| getInfo(): Promise<WindowInfo>; | ||
| reset(resetParams?: ResetParams): Promise<void>; | ||
| setMetaFields(options: MetaFieldPayload): Promise<void>; | ||
| setSensitiveMetaFields(options: MetaFieldPayload): Promise<void>; | ||
| setMetaFields(options: FlatObjectPayload): Promise<void>; | ||
| setSensitiveMetaFields(options: FlatObjectPayload): Promise<void>; | ||
| start(adaSettings: StartOptions): Promise<void>; | ||
@@ -112,4 +112,4 @@ stop(): Promise<void>; | ||
| toggle(): Promise<void>; | ||
| trackEvent(eventKey: string, value: number, meta: object): Promise<void>; | ||
| triggerCampaign(campaignKey: string, options: object): Promise<void>; | ||
| trackEvent(eventKey: string, value: number, meta: FlatObjectPayload): Promise<void>; | ||
| triggerCampaign(campaignKey: string, options: CampaignParams): Promise<void>; | ||
| unsubscribeEvent(id: number): Promise<void>; | ||
@@ -116,0 +116,0 @@ } |
7512
7.9%11
10%38
-15.56%