-
Notifications
You must be signed in to change notification settings - Fork 82
/
Copy pathadd-webhook-request.ts
90 lines (81 loc) · 3.69 KB
/
add-webhook-request.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
/* tslint:disable */
/* eslint-disable */
/**
* Pipedrive API v1
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
*
* @export
* @interface AddWebhookRequest
*/
export interface AddWebhookRequest {
/**
* A full, valid, publicly accessible URL which determines where to send the notifications. Please note that you cannot use Pipedrive API endpoints as the `subscription_url` and the chosen URL must not redirect to another link.
* @type {string}
*/
'subscription_url': string;
/**
* The type of action to receive notifications about. Wildcard will match all supported actions.
* @type {string}
*/
'event_action': AddWebhookRequestEventActionConst;
/**
* The type of object to receive notifications about. Wildcard will match all supported objects.
* @type {string}
*/
'event_object': AddWebhookRequestEventObjectConst;
/**
* The ID of the user that this webhook will be authorized with. You have the option to use a different user\'s `user_id`. If it is not set, the current user\'s `user_id` will be used. As each webhook event is checked against a user\'s permissions, the webhook will only be sent if the user has access to the specified object(s). If you want to receive notifications for all events, please use a top-level admin user’s `user_id`.
* @type {number}
*/
'user_id'?: number;
/**
* The HTTP basic auth username of the subscription URL endpoint (if required)
* @type {string}
*/
'http_auth_user'?: string;
/**
* The HTTP basic auth password of the subscription URL endpoint (if required)
* @type {string}
*/
'http_auth_password'?: string;
/**
* The webhook\'s version. NB! Webhooks v2 is the default from March 17th, 2025. See <a href=\"https://developers.pipedrive.com/changelog/post/breaking-change-webhooks-v2-will-become-the-new-default-version\" target=\"_blank\" rel=\"noopener noreferrer\">this Changelog post</a> for more details.
* @type {string}
*/
'version'?: AddWebhookRequestVersionConst;
}
export const AddWebhookRequestEventActionConst = {
create: 'create',
change: 'change',
delete: 'delete',
Star: '*'
} as const;
export type AddWebhookRequestEventActionConst = typeof AddWebhookRequestEventActionConst[keyof typeof AddWebhookRequestEventActionConst];
export const AddWebhookRequestEventObjectConst = {
activity: 'activity',
deal: 'deal',
lead: 'lead',
note: 'note',
organization: 'organization',
person: 'person',
pipeline: 'pipeline',
product: 'product',
stage: 'stage',
user: 'user',
Star: '*'
} as const;
export type AddWebhookRequestEventObjectConst = typeof AddWebhookRequestEventObjectConst[keyof typeof AddWebhookRequestEventObjectConst];
export const AddWebhookRequestVersionConst = {
_1_0: '1.0',
_2_0: '2.0'
} as const;
export type AddWebhookRequestVersionConst = typeof AddWebhookRequestVersionConst[keyof typeof AddWebhookRequestVersionConst];