@knocklabs/client
Advanced tools
Comparing version 0.10.14 to 0.10.15
# Changelog | ||
## 0.10.15 | ||
### Patch Changes | ||
- 26166e3: fix: update preference set types | ||
- Updated dependencies [26166e3] | ||
- @knocklabs/types@0.1.5 | ||
## 0.10.14 | ||
@@ -4,0 +12,0 @@ |
@@ -1,9 +0,12 @@ | ||
import { ChannelType } from '@knocklabs/types'; | ||
import { ChannelType, Condition } from '@knocklabs/types'; | ||
export type ConditionalPreferenceSettings = { | ||
conditions: Condition[]; | ||
}; | ||
export type ChannelTypePreferences = { | ||
[_K in ChannelType]?: boolean; | ||
[_K in ChannelType]?: boolean | ConditionalPreferenceSettings; | ||
}; | ||
export type WorkflowPreferenceSetting = boolean | { | ||
channel_types: ChannelTypePreferences; | ||
}; | ||
} | ConditionalPreferenceSettings; | ||
export type WorkflowPreferences = Partial<Record<string, WorkflowPreferenceSetting>>; | ||
@@ -17,5 +20,5 @@ export interface SetPreferencesProperties { | ||
id: string; | ||
categories: WorkflowPreferences; | ||
workflows: WorkflowPreferences; | ||
channel_types: ChannelTypePreferences; | ||
categories: WorkflowPreferences | null; | ||
workflows: WorkflowPreferences | null; | ||
channel_types: ChannelTypePreferences | null; | ||
} | ||
@@ -22,0 +25,0 @@ export interface PreferenceOptions { |
{ | ||
"name": "@knocklabs/client", | ||
"version": "0.10.14", | ||
"version": "0.10.15", | ||
"description": "The clientside library for interacting with Knock", | ||
@@ -51,3 +51,3 @@ "homepage": "https://github.com/knocklabs/javascript/tree/main/packages/client", | ||
"@babel/cli": "^7.25.7", | ||
"@babel/core": "^7.25.7", | ||
"@babel/core": "^7.26.0", | ||
"@babel/plugin-proposal-class-properties": "^7.16.7", | ||
@@ -67,10 +67,10 @@ "@babel/plugin-proposal-object-rest-spread": "^7.16.7", | ||
"rimraf": "^6.0.1", | ||
"rollup": "^4.22.5", | ||
"typescript": "^5.6.2", | ||
"rollup": "^4.24.2", | ||
"typescript": "^5.6.3", | ||
"vite": "^5.0.0", | ||
"vitest": "^2.0.5" | ||
"vitest": "^2.1.4" | ||
}, | ||
"dependencies": { | ||
"@babel/runtime": "^7.25.6", | ||
"@knocklabs/types": "^0.1.4", | ||
"@knocklabs/types": "^0.1.5", | ||
"@types/phoenix": "^1.5.4", | ||
@@ -77,0 +77,0 @@ "axios": "^1.7.4", |
@@ -1,5 +0,9 @@ | ||
import { ChannelType } from "@knocklabs/types"; | ||
import { ChannelType, Condition } from "@knocklabs/types"; | ||
export type ConditionalPreferenceSettings = { | ||
conditions: Condition[]; | ||
}; | ||
export type ChannelTypePreferences = { | ||
[_K in ChannelType]?: boolean; | ||
[_K in ChannelType]?: boolean | ConditionalPreferenceSettings; | ||
}; | ||
@@ -9,3 +13,4 @@ | ||
| boolean | ||
| { channel_types: ChannelTypePreferences }; | ||
| { channel_types: ChannelTypePreferences } | ||
| ConditionalPreferenceSettings; | ||
@@ -24,5 +29,5 @@ export type WorkflowPreferences = Partial< | ||
id: string; | ||
categories: WorkflowPreferences; | ||
workflows: WorkflowPreferences; | ||
channel_types: ChannelTypePreferences; | ||
categories: WorkflowPreferences | null; | ||
workflows: WorkflowPreferences | null; | ||
channel_types: ChannelTypePreferences | null; | ||
} | ||
@@ -29,0 +34,0 @@ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
345305
3635
Updated@knocklabs/types@^0.1.5