Skip to content

Commit

Permalink
v2.6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
dissfall committed Mar 10, 2020
2 parents 2a8a2f9 + b0fa76d commit 497fca3
Show file tree
Hide file tree
Showing 3 changed files with 95 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "uon-mini",
"version": "2.5.2",
"version": "2.6.0",
"description": "Wrapper for U-ON API",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down
2 changes: 2 additions & 0 deletions src/uon/types.ts → src/uon/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -244,3 +244,5 @@ export interface UONRequestByUserRes {
}

export interface UONUserRes extends UsersIterable<User> {}

export * from './webhook'
92 changes: 92 additions & 0 deletions src/uon/types/webhook.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
interface Webhook {
uon_subdomain: string
datetime: string
type_id: number
}

export interface WHRequestCreate extends Webhook {
type_id: 1
client_id: string
}

export interface WHLeadCreate extends Webhook {
type_id: 2
client_id: string
}

export interface WHClientCreate extends Webhook {
type_id: 3
client_id: string
}

export interface WHClientChange extends Webhook {
type_id: 4
client_id: string
}

export interface WHAddServiceToLead extends Webhook {
type_id: 9
service_id: string
request_id: string
}

export interface WHRemoveServiceFromLead extends Webhook {
type_id: 11
service_id: string
request_id: string
}

export interface WHChangeStatusInRequest extends Webhook {
type_id: 16
request_id: string
status_id_old: string
status_id_new: string
}

export interface WHChangeStatusInLead extends Webhook {
type_id: 17
request_id: string
status_id_old: string
status_id_new: string
}

export interface WHPAddTouristToLead extends Webhook {
type_id: 22
tourist_id: string
r_id: string
}

export interface WHDeleteTouristFromLead extends Webhook {
type_id: 23
r_id: string
tourist_id: string
}

export interface WHPinTouristToLead extends Webhook {
type_id: 25
client_id: string
request_id: string
isLead: 1 | 0
}

export interface WHUnpinTouristFromLead extends Webhook {
type_id: 26
client_id: string
request_id: string
isLead: 1 | 0
}

export interface WHChangeManagerInLead extends Webhook {
type_id: 29
r_id: string
old_manager_id: string
new_manager_id: string
}

export interface WHChangeManagerInRequest extends Webhook {
type_id: 30
r_id: string
old_manager_id: string
new_manager_id: string
}

0 comments on commit 497fca3

Please sign in to comment.