magicbell
Version:
MagicBell API wrapper
227 lines • 9.25 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.GetImportsResponseSchema = exports.CreateImportsPayloadSchema = exports.CreateImportsResponseSchema = void 0;
// This file is generated. Do not update manually!
exports.CreateImportsResponseSchema = {
title: 'CreateImportsResponseSchema',
type: 'object',
additionalProperties: false,
properties: {
id: {
type: 'string',
description: 'ID of the import. This is used to query the status of the import.',
},
status: {
type: 'string',
enum: ['enqueued', 'processing', 'processed'],
},
summary: {
type: 'object',
additionalProperties: false,
properties: {
total: {
type: 'integer',
description: 'The total number of records processed.',
},
failures: {
type: 'integer',
description: 'The total number of failed records.',
},
},
},
errors: {
type: 'array',
description: 'A list of errors (deprecated - please use failures instead)',
deprecated: true,
items: {
type: 'object',
additionalProperties: false,
properties: {
email: {
type: 'string',
description: "The identifying email of the user. If the user's external_id is used as identifier, the email key will not be present",
},
external_id: {
type: 'string',
description: "The identifying external_id of the user. If the user's email is used as identifier, the external_id key will not be present",
},
message: {
type: 'string',
description: 'The error message indicating why importing the user failed',
},
},
},
},
failures: {
type: 'object',
description: 'Contains the entities that could not be imported successfully',
additionalProperties: false,
properties: {
users: {
type: 'array',
items: {
type: 'object',
description: 'User objects that could not be imported successfully',
additionalProperties: false,
properties: {
email: {
nullable: true,
type: 'string',
description: 'The identifying email of the user if supplied in the import request.',
},
external_id: {
nullable: true,
type: 'string',
description: 'The identifying external_id of the user if supplied in the import request.',
},
errors: {
type: 'object',
description: 'The errors object reflecting the structure of the user oject',
},
},
},
},
},
},
},
};
exports.CreateImportsPayloadSchema = {
title: 'CreateImportsPayloadSchema',
type: 'object',
additionalProperties: false,
properties: {
users: {
type: 'array',
items: {
type: 'object',
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',
},
},
channels: {
type: 'object',
additionalProperties: true,
},
},
},
},
},
};
exports.GetImportsResponseSchema = {
title: 'GetImportsResponseSchema',
type: 'object',
additionalProperties: false,
properties: {
id: {
type: 'string',
description: 'ID of the import. This is used to query the status of the import.',
},
status: {
type: 'string',
enum: ['enqueued', 'processing', 'processed'],
},
summary: {
type: 'object',
additionalProperties: false,
properties: {
total: {
type: 'integer',
description: 'The total number of records processed.',
},
failures: {
type: 'integer',
description: 'The total number of failed records.',
},
},
},
errors: {
type: 'array',
description: 'A list of errors (deprecated - please use failures instead)',
deprecated: true,
items: {
type: 'object',
additionalProperties: false,
properties: {
email: {
type: 'string',
description: "The identifying email of the user. If the user's external_id is used as identifier, the email key will not be present",
},
external_id: {
type: 'string',
description: "The identifying external_id of the user. If the user's email is used as identifier, the external_id key will not be present",
},
message: {
type: 'string',
description: 'The error message indicating why importing the user failed',
},
},
},
},
failures: {
type: 'object',
description: 'Contains the entities that could not be imported successfully',
additionalProperties: false,
properties: {
users: {
type: 'array',
items: {
type: 'object',
description: 'User objects that could not be imported successfully',
additionalProperties: false,
properties: {
email: {
nullable: true,
type: 'string',
description: 'The identifying email of the user if supplied in the import request.',
},
external_id: {
nullable: true,
type: 'string',
description: 'The identifying external_id of the user if supplied in the import request.',
},
errors: {
type: 'object',
description: 'The errors object reflecting the structure of the user oject',
},
},
},
},
},
},
},
};
//# sourceMappingURL=imports.js.map