Reference — Data Types
The Waymark SDK ships with TypeScript typings. The following types are available:
AccountInfo
The full info for a Waymark account returned by Waymark.loginAccount
and Waymark.getAccountInfo
.
{
/**
* The unique identifier for the account.
*/
id: string;
/**
* A custom 3rd-party identifier which can be used
* to log into the account via the Waymark Plugin SDK.
* This will be an empty string if not set.
*/
externalID: string;
/**
* An ISO timestamp string for the date and time.
* when the account was created.
*/
createdAt: string;
/**
* An ISO timestamp string for the date and time.
* when the account was last updated.
*/
updatedAt: string;
/**
* The user's first name.
* This will be an empty string if not set.
*/
firstName: string;
/**
* The user's last name.
* This will be an empty string if not set.
*/
lastName: string;
/**
* The user's email address.
* This will be an empty string if not set.
*/
emailAddress: string;
/**
* The name of the user's company.
* This will be an empty string if not set.
*/
companyName: string;
/**
* The user's business phone number.
* This will be an empty string if not set.
*/
phone: string;
/**
* The name of the city that the user's company is in
* This will be an empty string if not set.
*/
city: string;
/**
* The abbreviation for the US state that the
* user's company is in, if applicable.
* This will be an empty string if not set.
*/
state: string;
}
Example:
{
"id": "1234-ABCD-1234-ABCD",
"externalID": "1234567890ABC",
"createdAt": "2019-08-08T16:22:38.924635Z",
"updatedAt": "2020-12-01T18:15:06.501702Z",
"firstName": "Mabel",
"lastName": "Tierney",
"emailAddress": "mtierney@example.com",
"companyName": "Tierney Auto, Inc.",
"phone": "248-555-1212",
"city": "Dearborn",
"state": "MI"
}
UpdatableAccountInfo
The subset of AccountInfo fields which can be set by Waymark.createAccount
or updated by Waymark.updateAccountInfo
{
externalID?: string;
firstName?: string;
lastName?: string;
emailAddress?: string;
companyName?: string;
phone?: string;
city?: string;
state?: string;
}
VideoData
The data for a saved Waymark video returned by Waymark.getVideos
and Waymark.getVideoData
, and
included as the detail on many Plugin Events.
{
/**
* The unique identifier for the video
*/
id: string;
/**
* An ISO timestamp string for the date and time
* when the video was created.
*/
createdAt: string;
/**
* An ISO timestamp string for the date and time
* when the video was last updated.
*/
updatedAt: string;
/**
* The name of the video
*/
name: string;
/**
* The ID of the Waymark template which this video
* is based on.
*/
templateID: string;
/**
* Whether the video has been purchased
* or "completed" by the user
*/
isPurchased: boolean;
/**
* A list of renders for the video. Renders will not
* be created until the user has completed the video.
*/
renders: Array<{
/**
* The format of the render.
* - The "email" format is lower-quality
* and intended for digital use.
* - The "broadcast_quality" format is higher quality
* and appropriate for TV broadcast.
*/
format: 'broadcast_quality' | 'email';
/**
* The current status of the render. Renders may take
* several minutes to complete where their status will
* be "in_progress".
*
* A completed render will have a "succeeded" status.
*/
status: 'initial' | 'in_progress' | 'succeeded' | 'failed' | 'aborted';
/**
* The URL for the completed rendered video file.
* This will be an empty string if the render's status is not "succeeded".
*/
url: string;
/**
* An ISO timestamp string for the date and time
* when the render completed, if the status
* is "succeeded"
*/
renderedAt?: string | null;
}>;
}
Example of an un-completed video:
{
"id": "1234-ABCD-1234-ABCD",
"createdAt": "2023-11-21T16:22:38.924635Z",
"updatedAt": "2023-11-22T18:15:06.501702Z",
"name": "Black Friday Promo 2023",
"templateID": "1234-ABCD-1234-ABCD",
"isPurchased": false,
"renders": []
}
Example of a completed video with renders in progress:
{
"id": "1234-ABCD-1234-ABCD",
"createdAt": "2023-11-21T16:22:38.924635Z",
"updatedAt": "2023-11-22T18:15:06.501702Z",
"name": "Black Friday Promo 2023",
"templateID": "1234-ABCD-1234-ABCD",
"isPurchased": true,
"renders": [
{
"renderedAt": null,
"format": "broadcast_quality",
"url": "",
"status": "in_progress"
},
{
"renderedAt": null,
"format": "email",
"url": "",
"status": "in_progress"
}
]
}
Example of a completed video with completed renders:
{
"id": "1234-ABCD-1234-ABCD",
"createdAt": "2023-11-21T16:22:38.924635Z",
"updatedAt": "2023-11-22T18:15:06.501702Z",
"name": "Black Friday Promo 2023",
"templateID": "1234-ABCD-1234-ABCD",
"isPurchased": true,
"renders": [
{
"renderedAt": "2023-11-22T18:18:00.201702Z",
"format": "broadcast_quality",
"url": "https://abcd.s3.amazonaws.com/path/to/broadcast-render-file.mp4",
"status": "in_progress"
},
{
"renderedAt": "2023-11-22T18:17:12.401802Z",
"format": "email",
"url": "https://abcd.s3.amazonaws.com/path/to/email-render-file.mp4",
"status": "in_progress"
}
]
}