magicbell
Version:
MagicBell API wrapper
542 lines • 19.4 kB
JavaScript
// This file is generated. Do not update manually!
export const CreateUsersResponseSchema = {
title: 'CreateUsersResponseSchema',
type: 'object',
additionalProperties: false,
properties: {
id: {
type: 'string',
description: 'The unique id for this user.',
readOnly: true,
},
external_id: {
type: 'string',
description: "A unique string that MagicBell can utilize to identify the user uniquely. We recommend setting this attribute to the ID of the user in your database. Provide the external id if the user's email is unavailable.",
maxLength: 255,
nullable: true,
},
email: {
type: 'string',
description: "The user's email.",
maxLength: 255,
nullable: true,
},
first_name: {
type: 'string',
description: "The user's first name.",
maxLength: 50,
nullable: true,
},
last_name: {
type: 'string',
description: "The user's last name.",
maxLength: 50,
nullable: true,
},
custom_attributes: {
type: 'object',
description: "Any customer attributes that you'd like to associate with the user. You may want to use these attributes later when writing email templates, for example.",
additionalProperties: true,
},
phone_numbers: {
type: 'array',
description: 'An array of phone numbers to use for sending SMS notifications.',
maxItems: 50,
items: {
type: 'string',
},
},
},
};
export const CreateUsersPayloadSchema = {
title: 'CreateUsersPayloadSchema',
type: 'object',
additionalProperties: false,
properties: {
external_id: {
type: 'string',
description: "A unique string that MagicBell can utilize to identify the user uniquely. We recommend setting this attribute to the ID of the user in your database. Provide the external id if the user's email is unavailable.",
maxLength: 255,
nullable: true,
},
email: {
type: 'string',
description: "The user's email.",
maxLength: 255,
nullable: true,
},
first_name: {
type: 'string',
description: "The user's first name.",
maxLength: 50,
nullable: true,
},
last_name: {
type: 'string',
description: "The user's last name.",
maxLength: 50,
nullable: true,
},
custom_attributes: {
type: 'object',
description: "Any customer attributes that you'd like to associate with the user. You may want to use these attributes later when writing email templates, for example.",
additionalProperties: true,
},
phone_numbers: {
type: 'array',
description: 'An array of phone numbers to use for sending SMS notifications.',
maxItems: 50,
items: {
type: 'string',
},
},
},
};
export const ListUsersResponseSchema = {
title: 'ListUsersResponseSchema',
type: 'object',
required: ['current_page', 'per_page', 'users'],
properties: {
per_page: {
type: 'integer',
description: 'Number of entities per page.',
readOnly: true,
},
current_page: {
type: 'integer',
description: 'Number of the page returned.',
readOnly: true,
},
users: {
type: 'array',
items: {
type: 'object',
additionalProperties: false,
properties: {
id: {
type: 'string',
description: 'The unique id for this user.',
readOnly: true,
},
external_id: {
type: 'string',
description: "A unique string that MagicBell can utilize to identify the user uniquely. We recommend setting this attribute to the ID of the user in your database. Provide the external id if the user's email is unavailable.",
maxLength: 255,
nullable: true,
},
email: {
type: 'string',
description: "The user's email.",
maxLength: 255,
nullable: true,
},
first_name: {
type: 'string',
description: "The user's first name.",
maxLength: 50,
nullable: true,
},
last_name: {
type: 'string',
description: "The user's last name.",
maxLength: 50,
nullable: true,
},
custom_attributes: {
type: 'object',
description: "Any customer attributes that you'd like to associate with the user. You may want to use these attributes later when writing email templates, for example.",
additionalProperties: true,
},
phone_numbers: {
type: 'array',
description: 'An array of phone numbers to use for sending SMS notifications.',
maxItems: 50,
items: {
type: 'string',
},
},
},
},
},
},
};
export const ListUsersPayloadSchema = {
title: 'ListUsersPayloadSchema',
type: 'object',
properties: {
page: {
title: 'page',
description: 'The page number of the paginated response. Defaults to 1.',
type: 'integer',
},
per_page: {
title: 'per_page',
description: 'The number of items per page. Defaults to 20.',
type: 'integer',
},
'last_seen_at:before': {
title: 'last_seen_at:before',
description: 'Fetch users seen before the specified `last_seen_at` timestamp. Please send it in RFC3339 format',
type: 'string',
},
'last_seen_at:after': {
title: 'last_seen_at:after',
description: 'Fetch users seen after the specified `last_seen_at` timestamp. Please send it in RFC3339 format',
type: 'string',
},
'last_notified_at:before': {
title: 'last_notified_at:before',
description: 'Fetch users last notified before the specified `last_notified_at` timestamp. Please send it in RFC3339 format',
type: 'string',
},
'last_notified_at:after': {
title: 'last_notified_at:after',
description: 'Fetch users last notified after the specified `last_notified_at` timestamp. Please send it in RFC3339 format',
type: 'string',
},
order_by: {
title: 'order_by',
description: 'Use it to order the returned list of users. Defaults to `created_at,DESC`',
type: 'string',
enum: [
'created_at,ASC',
'created_at,DESC',
'last_seen_at,ASC',
'last_seen_at,DESC',
'last_notified_at,ASC',
'last_notified_at,DESC',
],
},
},
additionalProperties: false,
required: [],
};
export const GetUsersResponseSchema = {
title: 'GetUsersResponseSchema',
type: 'object',
additionalProperties: false,
properties: {
id: {
type: 'string',
description: 'The unique id for this user.',
readOnly: true,
},
external_id: {
type: 'string',
description: "A unique string that MagicBell can utilize to identify the user uniquely. We recommend setting this attribute to the ID of the user in your database. Provide the external id if the user's email is unavailable.",
maxLength: 255,
nullable: true,
},
email: {
type: 'string',
description: "The user's email.",
maxLength: 255,
nullable: true,
},
first_name: {
type: 'string',
description: "The user's first name.",
maxLength: 50,
nullable: true,
},
last_name: {
type: 'string',
description: "The user's last name.",
maxLength: 50,
nullable: true,
},
custom_attributes: {
type: 'object',
description: "Any customer attributes that you'd like to associate with the user. You may want to use these attributes later when writing email templates, for example.",
additionalProperties: true,
},
phone_numbers: {
type: 'array',
description: 'An array of phone numbers to use for sending SMS notifications.',
maxItems: 50,
items: {
type: 'string',
},
},
},
};
export const UpdateUsersResponseSchema = {
title: 'UpdateUsersResponseSchema',
type: 'object',
additionalProperties: false,
properties: {
id: {
type: 'string',
description: 'The unique id for this user.',
readOnly: true,
},
external_id: {
type: 'string',
description: "A unique string that MagicBell can utilize to identify the user uniquely. We recommend setting this attribute to the ID of the user in your database. Provide the external id if the user's email is unavailable.",
maxLength: 255,
nullable: true,
},
email: {
type: 'string',
description: "The user's email.",
maxLength: 255,
nullable: true,
},
first_name: {
type: 'string',
description: "The user's first name.",
maxLength: 50,
nullable: true,
},
last_name: {
type: 'string',
description: "The user's last name.",
maxLength: 50,
nullable: true,
},
custom_attributes: {
type: 'object',
description: "Any customer attributes that you'd like to associate with the user. You may want to use these attributes later when writing email templates, for example.",
additionalProperties: true,
},
phone_numbers: {
type: 'array',
description: 'An array of phone numbers to use for sending SMS notifications.',
maxItems: 50,
items: {
type: 'string',
},
},
},
};
export const UpdateUsersPayloadSchema = {
title: 'UpdateUsersPayloadSchema',
type: 'object',
additionalProperties: false,
properties: {
external_id: {
type: 'string',
description: "A unique string that MagicBell can utilize to identify the user uniquely. We recommend setting this attribute to the ID of the user in your database. Provide the external id if the user's email is unavailable.",
maxLength: 255,
nullable: true,
},
email: {
type: 'string',
description: "The user's email.",
maxLength: 255,
nullable: true,
},
first_name: {
type: 'string',
description: "The user's first name.",
maxLength: 50,
nullable: true,
},
last_name: {
type: 'string',
description: "The user's last name.",
maxLength: 50,
nullable: true,
},
custom_attributes: {
type: 'object',
description: "Any customer attributes that you'd like to associate with the user. You may want to use these attributes later when writing email templates, for example.",
additionalProperties: true,
},
phone_numbers: {
type: 'array',
description: 'An array of phone numbers to use for sending SMS notifications.',
maxItems: 50,
items: {
type: 'string',
},
},
},
};
export const UpdateByEmailUsersResponseSchema = {
title: 'UpdateByEmailUsersResponseSchema',
type: 'object',
additionalProperties: false,
properties: {
id: {
type: 'string',
description: 'The unique id for this user.',
readOnly: true,
},
external_id: {
type: 'string',
description: "A unique string that MagicBell can utilize to identify the user uniquely. We recommend setting this attribute to the ID of the user in your database. Provide the external id if the user's email is unavailable.",
maxLength: 255,
nullable: true,
},
email: {
type: 'string',
description: "The user's email.",
maxLength: 255,
nullable: true,
},
first_name: {
type: 'string',
description: "The user's first name.",
maxLength: 50,
nullable: true,
},
last_name: {
type: 'string',
description: "The user's last name.",
maxLength: 50,
nullable: true,
},
custom_attributes: {
type: 'object',
description: "Any customer attributes that you'd like to associate with the user. You may want to use these attributes later when writing email templates, for example.",
additionalProperties: true,
},
phone_numbers: {
type: 'array',
description: 'An array of phone numbers to use for sending SMS notifications.',
maxItems: 50,
items: {
type: 'string',
},
},
},
};
export const UpdateByEmailUsersPayloadSchema = {
title: 'UpdateByEmailUsersPayloadSchema',
type: 'object',
additionalProperties: false,
properties: {
external_id: {
type: 'string',
description: "A unique string that MagicBell can utilize to identify the user uniquely. We recommend setting this attribute to the ID of the user in your database. Provide the external id if the user's email is unavailable.",
maxLength: 255,
nullable: true,
},
email: {
type: 'string',
description: "The user's email.",
maxLength: 255,
nullable: true,
},
first_name: {
type: 'string',
description: "The user's first name.",
maxLength: 50,
nullable: true,
},
last_name: {
type: 'string',
description: "The user's last name.",
maxLength: 50,
nullable: true,
},
custom_attributes: {
type: 'object',
description: "Any customer attributes that you'd like to associate with the user. You may want to use these attributes later when writing email templates, for example.",
additionalProperties: true,
},
phone_numbers: {
type: 'array',
description: 'An array of phone numbers to use for sending SMS notifications.',
maxItems: 50,
items: {
type: 'string',
},
},
},
};
export const UpdateByExternalIdUsersResponseSchema = {
title: 'UpdateByExternalIdUsersResponseSchema',
type: 'object',
additionalProperties: false,
properties: {
id: {
type: 'string',
description: 'The unique id for this user.',
readOnly: true,
},
external_id: {
type: 'string',
description: "A unique string that MagicBell can utilize to identify the user uniquely. We recommend setting this attribute to the ID of the user in your database. Provide the external id if the user's email is unavailable.",
maxLength: 255,
nullable: true,
},
email: {
type: 'string',
description: "The user's email.",
maxLength: 255,
nullable: true,
},
first_name: {
type: 'string',
description: "The user's first name.",
maxLength: 50,
nullable: true,
},
last_name: {
type: 'string',
description: "The user's last name.",
maxLength: 50,
nullable: true,
},
custom_attributes: {
type: 'object',
description: "Any customer attributes that you'd like to associate with the user. You may want to use these attributes later when writing email templates, for example.",
additionalProperties: true,
},
phone_numbers: {
type: 'array',
description: 'An array of phone numbers to use for sending SMS notifications.',
maxItems: 50,
items: {
type: 'string',
},
},
},
};
export const UpdateByExternalIdUsersPayloadSchema = {
title: 'UpdateByExternalIdUsersPayloadSchema',
type: 'object',
additionalProperties: false,
properties: {
external_id: {
type: 'string',
description: "A unique string that MagicBell can utilize to identify the user uniquely. We recommend setting this attribute to the ID of the user in your database. Provide the external id if the user's email is unavailable.",
maxLength: 255,
nullable: true,
},
email: {
type: 'string',
description: "The user's email.",
maxLength: 255,
nullable: true,
},
first_name: {
type: 'string',
description: "The user's first name.",
maxLength: 50,
nullable: true,
},
last_name: {
type: 'string',
description: "The user's last name.",
maxLength: 50,
nullable: true,
},
custom_attributes: {
type: 'object',
description: "Any customer attributes that you'd like to associate with the user. You may want to use these attributes later when writing email templates, for example.",
additionalProperties: true,
},
phone_numbers: {
type: 'array',
description: 'An array of phone numbers to use for sending SMS notifications.',
maxItems: 50,
items: {
type: 'string',
},
},
},
};
//# sourceMappingURL=users.js.map