🕷
Kintone Webhookの型定義
すぐにコピって使えるよう備忘メモ✍
定義はこちら
import { Record, Comment } from '@kintone/rest-api-client/lib/client/types';
export interface AppInfo {
id: string;
name: string;
}
export interface UserInfo {
code: string;
name: string;
}
export interface ModifyRecordKintoneWebhookPayload {
id: string;
type: 'ADD_RECORD' | 'UPDATE_RECORD' | 'UPDATE_STATUS';
app: AppInfo;
record: Record;
recordTitle: string;
url: string;
}
export interface DeleteRecordKintoneWebhookPayload {
id: string;
type: 'DELETE_RECORD';
app: AppInfo;
recordId: string;
deletedBy: UserInfo;
deletedAt: string;
}
export interface WriteCommentKintoneWebhookPayload {
id: string;
type: 'ADD_RECORD_COMMENT';
app: AppInfo;
comment: Comment;
recordId: string;
url: string;
}
export type KintoneWebhookPayload =
| ModifyRecordKintoneWebhookPayload
| DeleteRecordKintoneWebhookPayload
| WriteCommentKintoneWebhookPayload;
そんだけ😌
Discussion