pulumi-webflow 0.0.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,235 @@
1
+ # coding=utf-8
2
+ # *** WARNING: this file was generated by pulumi-language-python. ***
3
+ # *** Do not edit by hand unless you're certain you know what you are doing! ***
4
+
5
+ import builtins as _builtins
6
+ import warnings
7
+ import sys
8
+ import pulumi
9
+ import pulumi.runtime
10
+ from typing import Any, Mapping, Optional, Sequence, Union, overload
11
+ if sys.version_info >= (3, 11):
12
+ from typing import NotRequired, TypedDict, TypeAlias
13
+ else:
14
+ from typing_extensions import NotRequired, TypedDict, TypeAlias
15
+ from . import _utilities
16
+
17
+ __all__ = ['WebhookArgs', 'Webhook']
18
+
19
+ @pulumi.input_type
20
+ class WebhookArgs:
21
+ def __init__(__self__, *,
22
+ site_id: pulumi.Input[_builtins.str],
23
+ trigger_type: pulumi.Input[_builtins.str],
24
+ url: pulumi.Input[_builtins.str],
25
+ filter: Optional[pulumi.Input[Mapping[str, Any]]] = None):
26
+ """
27
+ The set of arguments for constructing a Webhook resource.
28
+ :param pulumi.Input[_builtins.str] site_id: The Webflow site ID (24-character lowercase hexadecimal string, e.g., '5f0c8c9e1c9d440000e8d8c3'). You can find your site ID in the Webflow dashboard under Site Settings. This field will be validated before making any API calls.
29
+ :param pulumi.Input[_builtins.str] trigger_type: The Webflow event that triggers this webhook. Valid values: form_submission, site_publish, page_created, page_metadata_updated, page_deleted, ecomm_new_order, ecomm_order_changed, ecomm_inventory_changed, memberships_user_account_added, memberships_user_account_updated, memberships_user_account_deleted, collection_item_created, collection_item_changed, collection_item_deleted, collection_item_unpublished. Example: 'form_submission' to receive notifications when forms are submitted.
30
+ :param pulumi.Input[_builtins.str] url: The HTTPS endpoint where Webflow will send webhook events (e.g., 'https://example.com/webhooks/webflow', 'https://api.example.com/events'). Must be a valid HTTPS URL. Webflow requires HTTPS for security. Your endpoint should accept POST requests with JSON payloads containing event data.
31
+ :param pulumi.Input[Mapping[str, Any]] filter: Optional filter for webhook events. The structure depends on the triggerType and allows you to receive only specific events. For example, for collection_item_created, you can filter by collection ID. Refer to Webflow API documentation for filter options for each trigger type.
32
+ """
33
+ pulumi.set(__self__, "site_id", site_id)
34
+ pulumi.set(__self__, "trigger_type", trigger_type)
35
+ pulumi.set(__self__, "url", url)
36
+ if filter is not None:
37
+ pulumi.set(__self__, "filter", filter)
38
+
39
+ @_builtins.property
40
+ @pulumi.getter(name="siteId")
41
+ def site_id(self) -> pulumi.Input[_builtins.str]:
42
+ """
43
+ The Webflow site ID (24-character lowercase hexadecimal string, e.g., '5f0c8c9e1c9d440000e8d8c3'). You can find your site ID in the Webflow dashboard under Site Settings. This field will be validated before making any API calls.
44
+ """
45
+ return pulumi.get(self, "site_id")
46
+
47
+ @site_id.setter
48
+ def site_id(self, value: pulumi.Input[_builtins.str]):
49
+ pulumi.set(self, "site_id", value)
50
+
51
+ @_builtins.property
52
+ @pulumi.getter(name="triggerType")
53
+ def trigger_type(self) -> pulumi.Input[_builtins.str]:
54
+ """
55
+ The Webflow event that triggers this webhook. Valid values: form_submission, site_publish, page_created, page_metadata_updated, page_deleted, ecomm_new_order, ecomm_order_changed, ecomm_inventory_changed, memberships_user_account_added, memberships_user_account_updated, memberships_user_account_deleted, collection_item_created, collection_item_changed, collection_item_deleted, collection_item_unpublished. Example: 'form_submission' to receive notifications when forms are submitted.
56
+ """
57
+ return pulumi.get(self, "trigger_type")
58
+
59
+ @trigger_type.setter
60
+ def trigger_type(self, value: pulumi.Input[_builtins.str]):
61
+ pulumi.set(self, "trigger_type", value)
62
+
63
+ @_builtins.property
64
+ @pulumi.getter
65
+ def url(self) -> pulumi.Input[_builtins.str]:
66
+ """
67
+ The HTTPS endpoint where Webflow will send webhook events (e.g., 'https://example.com/webhooks/webflow', 'https://api.example.com/events'). Must be a valid HTTPS URL. Webflow requires HTTPS for security. Your endpoint should accept POST requests with JSON payloads containing event data.
68
+ """
69
+ return pulumi.get(self, "url")
70
+
71
+ @url.setter
72
+ def url(self, value: pulumi.Input[_builtins.str]):
73
+ pulumi.set(self, "url", value)
74
+
75
+ @_builtins.property
76
+ @pulumi.getter
77
+ def filter(self) -> Optional[pulumi.Input[Mapping[str, Any]]]:
78
+ """
79
+ Optional filter for webhook events. The structure depends on the triggerType and allows you to receive only specific events. For example, for collection_item_created, you can filter by collection ID. Refer to Webflow API documentation for filter options for each trigger type.
80
+ """
81
+ return pulumi.get(self, "filter")
82
+
83
+ @filter.setter
84
+ def filter(self, value: Optional[pulumi.Input[Mapping[str, Any]]]):
85
+ pulumi.set(self, "filter", value)
86
+
87
+
88
+ @pulumi.type_token("webflow:index:Webhook")
89
+ class Webhook(pulumi.CustomResource):
90
+ @overload
91
+ def __init__(__self__,
92
+ resource_name: str,
93
+ opts: Optional[pulumi.ResourceOptions] = None,
94
+ filter: Optional[pulumi.Input[Mapping[str, Any]]] = None,
95
+ site_id: Optional[pulumi.Input[_builtins.str]] = None,
96
+ trigger_type: Optional[pulumi.Input[_builtins.str]] = None,
97
+ url: Optional[pulumi.Input[_builtins.str]] = None,
98
+ __props__=None):
99
+ """
100
+ Manages webhooks for a Webflow site. Webhooks allow you to receive real-time notifications when events occur in your Webflow site, such as form submissions, page updates, e-commerce orders, and more. Note: Webhooks cannot be updated in-place; any change to triggerType, url, or filter requires replacement.
101
+
102
+ :param str resource_name: The name of the resource.
103
+ :param pulumi.ResourceOptions opts: Options for the resource.
104
+ :param pulumi.Input[Mapping[str, Any]] filter: Optional filter for webhook events. The structure depends on the triggerType and allows you to receive only specific events. For example, for collection_item_created, you can filter by collection ID. Refer to Webflow API documentation for filter options for each trigger type.
105
+ :param pulumi.Input[_builtins.str] site_id: The Webflow site ID (24-character lowercase hexadecimal string, e.g., '5f0c8c9e1c9d440000e8d8c3'). You can find your site ID in the Webflow dashboard under Site Settings. This field will be validated before making any API calls.
106
+ :param pulumi.Input[_builtins.str] trigger_type: The Webflow event that triggers this webhook. Valid values: form_submission, site_publish, page_created, page_metadata_updated, page_deleted, ecomm_new_order, ecomm_order_changed, ecomm_inventory_changed, memberships_user_account_added, memberships_user_account_updated, memberships_user_account_deleted, collection_item_created, collection_item_changed, collection_item_deleted, collection_item_unpublished. Example: 'form_submission' to receive notifications when forms are submitted.
107
+ :param pulumi.Input[_builtins.str] url: The HTTPS endpoint where Webflow will send webhook events (e.g., 'https://example.com/webhooks/webflow', 'https://api.example.com/events'). Must be a valid HTTPS URL. Webflow requires HTTPS for security. Your endpoint should accept POST requests with JSON payloads containing event data.
108
+ """
109
+ ...
110
+ @overload
111
+ def __init__(__self__,
112
+ resource_name: str,
113
+ args: WebhookArgs,
114
+ opts: Optional[pulumi.ResourceOptions] = None):
115
+ """
116
+ Manages webhooks for a Webflow site. Webhooks allow you to receive real-time notifications when events occur in your Webflow site, such as form submissions, page updates, e-commerce orders, and more. Note: Webhooks cannot be updated in-place; any change to triggerType, url, or filter requires replacement.
117
+
118
+ :param str resource_name: The name of the resource.
119
+ :param WebhookArgs args: The arguments to use to populate this resource's properties.
120
+ :param pulumi.ResourceOptions opts: Options for the resource.
121
+ """
122
+ ...
123
+ def __init__(__self__, resource_name: str, *args, **kwargs):
124
+ resource_args, opts = _utilities.get_resource_args_opts(WebhookArgs, pulumi.ResourceOptions, *args, **kwargs)
125
+ if resource_args is not None:
126
+ __self__._internal_init(resource_name, opts, **resource_args.__dict__)
127
+ else:
128
+ __self__._internal_init(resource_name, *args, **kwargs)
129
+
130
+ def _internal_init(__self__,
131
+ resource_name: str,
132
+ opts: Optional[pulumi.ResourceOptions] = None,
133
+ filter: Optional[pulumi.Input[Mapping[str, Any]]] = None,
134
+ site_id: Optional[pulumi.Input[_builtins.str]] = None,
135
+ trigger_type: Optional[pulumi.Input[_builtins.str]] = None,
136
+ url: Optional[pulumi.Input[_builtins.str]] = None,
137
+ __props__=None):
138
+ opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
139
+ if not isinstance(opts, pulumi.ResourceOptions):
140
+ raise TypeError('Expected resource options to be a ResourceOptions instance')
141
+ if opts.id is None:
142
+ if __props__ is not None:
143
+ raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
144
+ __props__ = WebhookArgs.__new__(WebhookArgs)
145
+
146
+ __props__.__dict__["filter"] = filter
147
+ if site_id is None and not opts.urn:
148
+ raise TypeError("Missing required property 'site_id'")
149
+ __props__.__dict__["site_id"] = site_id
150
+ if trigger_type is None and not opts.urn:
151
+ raise TypeError("Missing required property 'trigger_type'")
152
+ __props__.__dict__["trigger_type"] = trigger_type
153
+ if url is None and not opts.urn:
154
+ raise TypeError("Missing required property 'url'")
155
+ __props__.__dict__["url"] = url
156
+ __props__.__dict__["created_on"] = None
157
+ __props__.__dict__["last_triggered"] = None
158
+ super(Webhook, __self__).__init__(
159
+ 'webflow:index:Webhook',
160
+ resource_name,
161
+ __props__,
162
+ opts)
163
+
164
+ @staticmethod
165
+ def get(resource_name: str,
166
+ id: pulumi.Input[str],
167
+ opts: Optional[pulumi.ResourceOptions] = None) -> 'Webhook':
168
+ """
169
+ Get an existing Webhook resource's state with the given name, id, and optional extra
170
+ properties used to qualify the lookup.
171
+
172
+ :param str resource_name: The unique name of the resulting resource.
173
+ :param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
174
+ :param pulumi.ResourceOptions opts: Options for the resource.
175
+ """
176
+ opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
177
+
178
+ __props__ = WebhookArgs.__new__(WebhookArgs)
179
+
180
+ __props__.__dict__["created_on"] = None
181
+ __props__.__dict__["filter"] = None
182
+ __props__.__dict__["last_triggered"] = None
183
+ __props__.__dict__["site_id"] = None
184
+ __props__.__dict__["trigger_type"] = None
185
+ __props__.__dict__["url"] = None
186
+ return Webhook(resource_name, opts=opts, __props__=__props__)
187
+
188
+ @_builtins.property
189
+ @pulumi.getter(name="createdOn")
190
+ def created_on(self) -> pulumi.Output[Optional[_builtins.str]]:
191
+ """
192
+ The timestamp when the webhook was created (RFC3339 format). This is automatically set by Webflow when the webhook is created and is read-only.
193
+ """
194
+ return pulumi.get(self, "created_on")
195
+
196
+ @_builtins.property
197
+ @pulumi.getter
198
+ def filter(self) -> pulumi.Output[Optional[Mapping[str, Any]]]:
199
+ """
200
+ Optional filter for webhook events. The structure depends on the triggerType and allows you to receive only specific events. For example, for collection_item_created, you can filter by collection ID. Refer to Webflow API documentation for filter options for each trigger type.
201
+ """
202
+ return pulumi.get(self, "filter")
203
+
204
+ @_builtins.property
205
+ @pulumi.getter(name="lastTriggered")
206
+ def last_triggered(self) -> pulumi.Output[Optional[_builtins.str]]:
207
+ """
208
+ The timestamp when the webhook was last triggered (RFC3339 format). This is automatically updated by Webflow when the webhook fires and is read-only. Will be empty if the webhook has never been triggered.
209
+ """
210
+ return pulumi.get(self, "last_triggered")
211
+
212
+ @_builtins.property
213
+ @pulumi.getter(name="siteId")
214
+ def site_id(self) -> pulumi.Output[_builtins.str]:
215
+ """
216
+ The Webflow site ID (24-character lowercase hexadecimal string, e.g., '5f0c8c9e1c9d440000e8d8c3'). You can find your site ID in the Webflow dashboard under Site Settings. This field will be validated before making any API calls.
217
+ """
218
+ return pulumi.get(self, "site_id")
219
+
220
+ @_builtins.property
221
+ @pulumi.getter(name="triggerType")
222
+ def trigger_type(self) -> pulumi.Output[_builtins.str]:
223
+ """
224
+ The Webflow event that triggers this webhook. Valid values: form_submission, site_publish, page_created, page_metadata_updated, page_deleted, ecomm_new_order, ecomm_order_changed, ecomm_inventory_changed, memberships_user_account_added, memberships_user_account_updated, memberships_user_account_deleted, collection_item_created, collection_item_changed, collection_item_deleted, collection_item_unpublished. Example: 'form_submission' to receive notifications when forms are submitted.
225
+ """
226
+ return pulumi.get(self, "trigger_type")
227
+
228
+ @_builtins.property
229
+ @pulumi.getter
230
+ def url(self) -> pulumi.Output[_builtins.str]:
231
+ """
232
+ The HTTPS endpoint where Webflow will send webhook events (e.g., 'https://example.com/webhooks/webflow', 'https://api.example.com/events'). Must be a valid HTTPS URL. Webflow requires HTTPS for security. Your endpoint should accept POST requests with JSON payloads containing event data.
233
+ """
234
+ return pulumi.get(self, "url")
235
+