@@ -365,13 +365,16 @@ export class Objects extends APIResource {
365365 * __persistence_strategy__: 'merge',
366366 * categories: {
367367 * marketing: false,
368- * transactional: { channel_types: { email: false } },
368+ * transactional: { ... },
369369 * },
370370 * channel_types: { email: true },
371+ * channels: {
372+ * '2f641633-95d3-4555-9222-9f1eb7888a80': { ... },
373+ * 'aef6e715-df82-4ab6-b61e-b743e249f7b6': true,
374+ * },
375+ * commercial_subscribed: true,
371376 * workflows: {
372- * 'dinosaurs-loose': {
373- * channel_types: { email: false },
374- * },
377+ * 'dinosaurs-loose': { ... },
375378 * },
376379 * },
377380 * );
@@ -703,25 +706,45 @@ export interface ObjectSetChannelDataParams {
703706 * Channel data for a given channel type.
704707 */
705708 data :
706- | ChannelDataAPI . PushChannelData
707- | ChannelDataAPI . OneSignalChannelData
708- | ObjectSetChannelDataParams . AwsSnsPushChannelData
709+ | ObjectSetChannelDataParams . PushChannelDataTokensOnly
710+ | ObjectSetChannelDataParams . AwssnsPushChannelDataTargetArNsOnly
711+ | ObjectSetChannelDataParams . OneSignalChannelDataPlayerIDsOnly
709712 | ChannelDataAPI . SlackChannelData
710713 | ChannelDataAPI . MsTeamsChannelData
711714 | ChannelDataAPI . DiscordChannelData ;
712715}
713716
714717export namespace ObjectSetChannelDataParams {
718+ /**
719+ * Push channel data.
720+ */
721+ export interface PushChannelDataTokensOnly {
722+ /**
723+ * A list of push channel tokens.
724+ */
725+ tokens : Array < string > ;
726+ }
727+
715728 /**
716729 * AWS SNS push channel data.
717730 */
718- export interface AwsSnsPushChannelData {
731+ export interface AwssnsPushChannelDataTargetArNsOnly {
719732 /**
720733 * A list of platform endpoint ARNs. See
721734 * [Setting up an Amazon SNS platform endpoint for mobile notifications](https://docs.aws.amazon.com/sns/latest/dg/mobile-platform-endpoint.html).
722735 */
723736 target_arns : Array < string > ;
724737 }
738+
739+ /**
740+ * OneSignal channel data.
741+ */
742+ export interface OneSignalChannelDataPlayerIDsOnly {
743+ /**
744+ * A list of OneSignal player IDs.
745+ */
746+ player_ids : Array < string > ;
747+ }
725748}
726749
727750export interface ObjectSetPreferencesParams {
@@ -744,6 +767,17 @@ export interface ObjectSetPreferencesParams {
744767 */
745768 channel_types ?: PreferencesAPI . PreferenceSetChannelTypes | null ;
746769
770+ /**
771+ * Channel preferences.
772+ */
773+ channels ?: { [ key : string ] : boolean | ObjectSetPreferencesParams . PreferenceSetChannelSetting } | null ;
774+
775+ /**
776+ * Whether the recipient is subscribed to commercial communications. When false,
777+ * the recipient will not receive commercial workflow notifications.
778+ */
779+ commercial_subscribed ?: boolean | null ;
780+
747781 /**
748782 * An object where the key is the workflow key and the values are the preference
749783 * settings for that workflow.
@@ -764,12 +798,43 @@ export namespace ObjectSetPreferencesParams {
764798 */
765799 channel_types ?: PreferencesAPI . PreferenceSetChannelTypes | null ;
766800
801+ /**
802+ * Channel preferences.
803+ */
804+ channels ?: {
805+ [ key : string ] : boolean | PreferenceSetWorkflowCategorySettingObject . PreferenceSetChannelSetting ;
806+ } | null ;
807+
767808 /**
768809 * A list of conditions to apply to a channel type.
769810 */
770811 conditions ?: Array < Shared . Condition > | null ;
771812 }
772813
814+ export namespace PreferenceSetWorkflowCategorySettingObject {
815+ /**
816+ * A set of settings for a specific channel. Currently, this can only be a list of
817+ * conditions to apply.
818+ */
819+ export interface PreferenceSetChannelSetting {
820+ /**
821+ * A list of conditions to apply to a specific channel.
822+ */
823+ conditions : Array < Shared . Condition > ;
824+ }
825+ }
826+
827+ /**
828+ * A set of settings for a specific channel. Currently, this can only be a list of
829+ * conditions to apply.
830+ */
831+ export interface PreferenceSetChannelSetting {
832+ /**
833+ * A list of conditions to apply to a specific channel.
834+ */
835+ conditions : Array < Shared . Condition > ;
836+ }
837+
773838 /**
774839 * The settings object for a workflow or category, where you can specify channel
775840 * types or conditions.
@@ -780,11 +845,31 @@ export namespace ObjectSetPreferencesParams {
780845 */
781846 channel_types ?: PreferencesAPI . PreferenceSetChannelTypes | null ;
782847
848+ /**
849+ * Channel preferences.
850+ */
851+ channels ?: {
852+ [ key : string ] : boolean | PreferenceSetWorkflowCategorySettingObject . PreferenceSetChannelSetting ;
853+ } | null ;
854+
783855 /**
784856 * A list of conditions to apply to a channel type.
785857 */
786858 conditions ?: Array < Shared . Condition > | null ;
787859 }
860+
861+ export namespace PreferenceSetWorkflowCategorySettingObject {
862+ /**
863+ * A set of settings for a specific channel. Currently, this can only be a list of
864+ * conditions to apply.
865+ */
866+ export interface PreferenceSetChannelSetting {
867+ /**
868+ * A list of conditions to apply to a specific channel.
869+ */
870+ conditions : Array < Shared . Condition > ;
871+ }
872+ }
788873}
789874
790875Objects . Bulk = Bulk ;
0 commit comments