interface ModelAttributes {
[name: string]: string | number
}
interface Agent {
id: string
created_date: Date
name: string
city: string | null
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Converts an RGB color value to HSL. Conversion formula | |
* adapted from http://en.wikipedia.org/wiki/HSL_color_space. | |
* Assumes r, g, and b are contained in the set [0, 255] and | |
* returns h, s, and l in the set [0, 1]. | |
* | |
* @param Number r The red color value | |
* @param Number g The green color value | |
* @param Number b The blue color value | |
* @return Array The HSL representation |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** Выгрузка контрагентов - agents.csv */ | |
interface AgentExport { | |
/** Идентификатор клиента */ | |
id: string | |
/** Дата создания клиента */ | |
created: string | |
/** Наименование клиента */ | |
user_name?: string |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ec.order = ec.order || {}; | |
ec.order.extraFields = ec.order.extraFields || {}; | |
// A text input that asks a buyer how to sign the package | |
ec.order.extraFields.wrapping_box_signature = { | |
'title': 'How should we sign the package?', | |
'textPlaceholder': 'Package sign', | |
'type': 'text', | |
'tip': 'We will put a label on a box so the recipient knows who it is from', | |
'required': false, |
Parameter | Default | Description |
---|
macOs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import AWS from 'aws-sdk' | |
import { v4 } from 'uuid' | |
const s3 = new AWS.S3({ signatureVersion: 'v4' }) | |
const { AWS_S3_SCREENSHOT_BUCKET } = process.env | |
export default async function getImageTempUrl( | |
prefix: string, | |
imgBuffer: Buffer |