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,82 @@
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
+ from . import outputs
17
+
18
+ __all__ = [
19
+ 'GetTokenInfoResult',
20
+ 'AwaitableGetTokenInfoResult',
21
+ 'get_token_info',
22
+ 'get_token_info_output',
23
+ ]
24
+
25
+ @pulumi.output_type
26
+ class GetTokenInfoResult:
27
+ def __init__(__self__, application=None, authorization=None):
28
+ if application and not isinstance(application, dict):
29
+ raise TypeError("Expected argument 'application' to be a dict")
30
+ pulumi.set(__self__, "application", application)
31
+ if authorization and not isinstance(authorization, dict):
32
+ raise TypeError("Expected argument 'authorization' to be a dict")
33
+ pulumi.set(__self__, "authorization", authorization)
34
+
35
+ @_builtins.property
36
+ @pulumi.getter
37
+ def application(self) -> 'outputs.GetTokenInfoApplication':
38
+ """
39
+ Application details for the token owner.
40
+ """
41
+ return pulumi.get(self, "application")
42
+
43
+ @_builtins.property
44
+ @pulumi.getter
45
+ def authorization(self) -> 'outputs.GetTokenInfoAuthorization':
46
+ """
47
+ Authorization details for the API token, including scopes and authorized resources.
48
+ """
49
+ return pulumi.get(self, "authorization")
50
+
51
+
52
+ class AwaitableGetTokenInfoResult(GetTokenInfoResult):
53
+ # pylint: disable=using-constant-test
54
+ def __await__(self):
55
+ if False:
56
+ yield self
57
+ return GetTokenInfoResult(
58
+ application=self.application,
59
+ authorization=self.authorization)
60
+
61
+
62
+ def get_token_info(opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetTokenInfoResult:
63
+ """
64
+ Retrieves information about the current Webflow API token, including authorization details, scopes, rate limits, and the authorized resources. This is useful for validating your API token configuration and understanding what resources it can access.
65
+ """
66
+ __args__ = dict()
67
+ opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
68
+ __ret__ = pulumi.runtime.invoke('webflow:index:getTokenInfo', __args__, opts=opts, typ=GetTokenInfoResult).value
69
+
70
+ return AwaitableGetTokenInfoResult(
71
+ application=pulumi.get(__ret__, 'application'),
72
+ authorization=pulumi.get(__ret__, 'authorization'))
73
+ def get_token_info_output(opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetTokenInfoResult]:
74
+ """
75
+ Retrieves information about the current Webflow API token, including authorization details, scopes, rate limits, and the authorized resources. This is useful for validating your API token configuration and understanding what resources it can access.
76
+ """
77
+ __args__ = dict()
78
+ opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
79
+ __ret__ = pulumi.runtime.invoke_output('webflow:index:getTokenInfo', __args__, opts=opts, typ=GetTokenInfoResult)
80
+ return __ret__.apply(lambda __response__: GetTokenInfoResult(
81
+ application=pulumi.get(__response__, 'application'),
82
+ authorization=pulumi.get(__response__, 'authorization')))
@@ -0,0 +1,455 @@
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
+ from . import outputs
17
+
18
+ __all__ = [
19
+ 'CustomScriptArgs',
20
+ 'GetTokenInfoApplication',
21
+ 'GetTokenInfoAuthorization',
22
+ 'GetTokenInfoAuthorizedTo',
23
+ 'NodeContentUpdate',
24
+ 'PageCustomCodeScript',
25
+ 'PageInfo',
26
+ ]
27
+
28
+ @pulumi.output_type
29
+ class CustomScriptArgs(dict):
30
+ def __init__(__self__, *,
31
+ id: _builtins.str,
32
+ location: _builtins.str,
33
+ version: _builtins.str,
34
+ attributes: Optional[Mapping[str, Any]] = None):
35
+ """
36
+ :param _builtins.str id: The unique identifier of the registered custom code script. The script must first be registered to the site using the RegisterScript resource. Examples: 'cms_slider', 'analytics', 'custom_widget'
37
+ :param _builtins.str location: The location where the script is placed on the page. Valid values: 'header' (placed in the <head> section), 'footer' (placed before </body>). Scripts in the header execute before page content loads, while footer scripts execute after the page has loaded.
38
+ :param _builtins.str version: The semantic version string for the registered script (e.g., '1.0.0', '0.1.2'). This version must exist for the registered script ID. When you update the version, a different version of the script will be applied.
39
+ :param Mapping[str, Any] attributes: Optional developer-specified key/value pairs applied as HTML attributes to the script tag. Example: {'data-config': 'my-value'}. These attributes are passed directly to the script tag.
40
+ """
41
+ pulumi.set(__self__, "id", id)
42
+ pulumi.set(__self__, "location", location)
43
+ pulumi.set(__self__, "version", version)
44
+ if attributes is not None:
45
+ pulumi.set(__self__, "attributes", attributes)
46
+
47
+ @_builtins.property
48
+ @pulumi.getter
49
+ def id(self) -> _builtins.str:
50
+ """
51
+ The unique identifier of the registered custom code script. The script must first be registered to the site using the RegisterScript resource. Examples: 'cms_slider', 'analytics', 'custom_widget'
52
+ """
53
+ return pulumi.get(self, "id")
54
+
55
+ @_builtins.property
56
+ @pulumi.getter
57
+ def location(self) -> _builtins.str:
58
+ """
59
+ The location where the script is placed on the page. Valid values: 'header' (placed in the <head> section), 'footer' (placed before </body>). Scripts in the header execute before page content loads, while footer scripts execute after the page has loaded.
60
+ """
61
+ return pulumi.get(self, "location")
62
+
63
+ @_builtins.property
64
+ @pulumi.getter
65
+ def version(self) -> _builtins.str:
66
+ """
67
+ The semantic version string for the registered script (e.g., '1.0.0', '0.1.2'). This version must exist for the registered script ID. When you update the version, a different version of the script will be applied.
68
+ """
69
+ return pulumi.get(self, "version")
70
+
71
+ @_builtins.property
72
+ @pulumi.getter
73
+ def attributes(self) -> Optional[Mapping[str, Any]]:
74
+ """
75
+ Optional developer-specified key/value pairs applied as HTML attributes to the script tag. Example: {'data-config': 'my-value'}. These attributes are passed directly to the script tag.
76
+ """
77
+ return pulumi.get(self, "attributes")
78
+
79
+
80
+ @pulumi.output_type
81
+ class GetTokenInfoApplication(dict):
82
+ def __init__(__self__, *,
83
+ description: _builtins.str,
84
+ display_name: _builtins.str,
85
+ homepage: _builtins.str,
86
+ id: _builtins.str):
87
+ """
88
+ :param _builtins.str description: The application description.
89
+ :param _builtins.str display_name: The human-readable name of the application.
90
+ :param _builtins.str homepage: The application homepage URL.
91
+ :param _builtins.str id: The unique identifier for the application.
92
+ """
93
+ pulumi.set(__self__, "description", description)
94
+ pulumi.set(__self__, "display_name", display_name)
95
+ pulumi.set(__self__, "homepage", homepage)
96
+ pulumi.set(__self__, "id", id)
97
+
98
+ @_builtins.property
99
+ @pulumi.getter
100
+ def description(self) -> _builtins.str:
101
+ """
102
+ The application description.
103
+ """
104
+ return pulumi.get(self, "description")
105
+
106
+ @_builtins.property
107
+ @pulumi.getter(name="displayName")
108
+ def display_name(self) -> _builtins.str:
109
+ """
110
+ The human-readable name of the application.
111
+ """
112
+ return pulumi.get(self, "display_name")
113
+
114
+ @_builtins.property
115
+ @pulumi.getter
116
+ def homepage(self) -> _builtins.str:
117
+ """
118
+ The application homepage URL.
119
+ """
120
+ return pulumi.get(self, "homepage")
121
+
122
+ @_builtins.property
123
+ @pulumi.getter
124
+ def id(self) -> _builtins.str:
125
+ """
126
+ The unique identifier for the application.
127
+ """
128
+ return pulumi.get(self, "id")
129
+
130
+
131
+ @pulumi.output_type
132
+ class GetTokenInfoAuthorization(dict):
133
+ def __init__(__self__, *,
134
+ authorized_to: 'outputs.GetTokenInfoAuthorizedTo',
135
+ created_on: _builtins.str,
136
+ grant_type: _builtins.str,
137
+ id: _builtins.str,
138
+ last_used: _builtins.str,
139
+ rate_limit: _builtins.int,
140
+ scope: _builtins.str):
141
+ """
142
+ :param 'GetTokenInfoAuthorizedTo' authorized_to: The resources this token is authorized to access.
143
+ :param _builtins.str created_on: The timestamp when this authorization was created (RFC3339 format).
144
+ :param _builtins.str grant_type: The OAuth grant type used to obtain this token (e.g., 'authorization_code').
145
+ :param _builtins.str id: The unique identifier for this authorization.
146
+ :param _builtins.str last_used: The timestamp when this token was last used (RFC3339 format).
147
+ :param _builtins.int rate_limit: The rate limit for this token in requests per minute.
148
+ :param _builtins.str scope: The OAuth scopes granted to this token (space or comma separated).
149
+ """
150
+ pulumi.set(__self__, "authorized_to", authorized_to)
151
+ pulumi.set(__self__, "created_on", created_on)
152
+ pulumi.set(__self__, "grant_type", grant_type)
153
+ pulumi.set(__self__, "id", id)
154
+ pulumi.set(__self__, "last_used", last_used)
155
+ pulumi.set(__self__, "rate_limit", rate_limit)
156
+ pulumi.set(__self__, "scope", scope)
157
+
158
+ @_builtins.property
159
+ @pulumi.getter(name="authorizedTo")
160
+ def authorized_to(self) -> 'outputs.GetTokenInfoAuthorizedTo':
161
+ """
162
+ The resources this token is authorized to access.
163
+ """
164
+ return pulumi.get(self, "authorized_to")
165
+
166
+ @_builtins.property
167
+ @pulumi.getter(name="createdOn")
168
+ def created_on(self) -> _builtins.str:
169
+ """
170
+ The timestamp when this authorization was created (RFC3339 format).
171
+ """
172
+ return pulumi.get(self, "created_on")
173
+
174
+ @_builtins.property
175
+ @pulumi.getter(name="grantType")
176
+ def grant_type(self) -> _builtins.str:
177
+ """
178
+ The OAuth grant type used to obtain this token (e.g., 'authorization_code').
179
+ """
180
+ return pulumi.get(self, "grant_type")
181
+
182
+ @_builtins.property
183
+ @pulumi.getter
184
+ def id(self) -> _builtins.str:
185
+ """
186
+ The unique identifier for this authorization.
187
+ """
188
+ return pulumi.get(self, "id")
189
+
190
+ @_builtins.property
191
+ @pulumi.getter(name="lastUsed")
192
+ def last_used(self) -> _builtins.str:
193
+ """
194
+ The timestamp when this token was last used (RFC3339 format).
195
+ """
196
+ return pulumi.get(self, "last_used")
197
+
198
+ @_builtins.property
199
+ @pulumi.getter(name="rateLimit")
200
+ def rate_limit(self) -> _builtins.int:
201
+ """
202
+ The rate limit for this token in requests per minute.
203
+ """
204
+ return pulumi.get(self, "rate_limit")
205
+
206
+ @_builtins.property
207
+ @pulumi.getter
208
+ def scope(self) -> _builtins.str:
209
+ """
210
+ The OAuth scopes granted to this token (space or comma separated).
211
+ """
212
+ return pulumi.get(self, "scope")
213
+
214
+
215
+ @pulumi.output_type
216
+ class GetTokenInfoAuthorizedTo(dict):
217
+ def __init__(__self__, *,
218
+ site_ids: Sequence[_builtins.str],
219
+ user_ids: Sequence[_builtins.str],
220
+ workspace_ids: Sequence[_builtins.str]):
221
+ """
222
+ :param Sequence[_builtins.str] site_ids: List of site IDs this token is authorized to access.
223
+ :param Sequence[_builtins.str] user_ids: List of user IDs this token is authorized to access.
224
+ :param Sequence[_builtins.str] workspace_ids: List of workspace IDs this token is authorized to access.
225
+ """
226
+ pulumi.set(__self__, "site_ids", site_ids)
227
+ pulumi.set(__self__, "user_ids", user_ids)
228
+ pulumi.set(__self__, "workspace_ids", workspace_ids)
229
+
230
+ @_builtins.property
231
+ @pulumi.getter(name="siteIds")
232
+ def site_ids(self) -> Sequence[_builtins.str]:
233
+ """
234
+ List of site IDs this token is authorized to access.
235
+ """
236
+ return pulumi.get(self, "site_ids")
237
+
238
+ @_builtins.property
239
+ @pulumi.getter(name="userIds")
240
+ def user_ids(self) -> Sequence[_builtins.str]:
241
+ """
242
+ List of user IDs this token is authorized to access.
243
+ """
244
+ return pulumi.get(self, "user_ids")
245
+
246
+ @_builtins.property
247
+ @pulumi.getter(name="workspaceIds")
248
+ def workspace_ids(self) -> Sequence[_builtins.str]:
249
+ """
250
+ List of workspace IDs this token is authorized to access.
251
+ """
252
+ return pulumi.get(self, "workspace_ids")
253
+
254
+
255
+ @pulumi.output_type
256
+ class NodeContentUpdate(dict):
257
+ @staticmethod
258
+ def __key_warning(key: str):
259
+ suggest = None
260
+ if key == "nodeId":
261
+ suggest = "node_id"
262
+
263
+ if suggest:
264
+ pulumi.log.warn(f"Key '{key}' not found in NodeContentUpdate. Access the value via the '{suggest}' property getter instead.")
265
+
266
+ def __getitem__(self, key: str) -> Any:
267
+ NodeContentUpdate.__key_warning(key)
268
+ return super().__getitem__(key)
269
+
270
+ def get(self, key: str, default = None) -> Any:
271
+ NodeContentUpdate.__key_warning(key)
272
+ return super().get(key, default)
273
+
274
+ def __init__(__self__, *,
275
+ node_id: _builtins.str,
276
+ text: _builtins.str):
277
+ """
278
+ :param _builtins.str node_id: The unique identifier for the DOM node to update. This ID comes from the page's DOM structure and must exist on the page. Retrieve node IDs using GET /pages/{page_id}/dom endpoint.
279
+ :param _builtins.str text: The new text content for the node. This will replace the existing text content in the specified node. Only applicable to text nodes or elements containing text.
280
+ """
281
+ pulumi.set(__self__, "node_id", node_id)
282
+ pulumi.set(__self__, "text", text)
283
+
284
+ @_builtins.property
285
+ @pulumi.getter(name="nodeId")
286
+ def node_id(self) -> _builtins.str:
287
+ """
288
+ The unique identifier for the DOM node to update. This ID comes from the page's DOM structure and must exist on the page. Retrieve node IDs using GET /pages/{page_id}/dom endpoint.
289
+ """
290
+ return pulumi.get(self, "node_id")
291
+
292
+ @_builtins.property
293
+ @pulumi.getter
294
+ def text(self) -> _builtins.str:
295
+ """
296
+ The new text content for the node. This will replace the existing text content in the specified node. Only applicable to text nodes or elements containing text.
297
+ """
298
+ return pulumi.get(self, "text")
299
+
300
+
301
+ @pulumi.output_type
302
+ class PageCustomCodeScript(dict):
303
+ def __init__(__self__, *,
304
+ attributes: Mapping[str, Any],
305
+ id: _builtins.str,
306
+ location: _builtins.str,
307
+ version: _builtins.str):
308
+ """
309
+ :param Mapping[str, Any] attributes: Optional developer-specified key/value pairs for script attributes. These attributes can be used by the script to customize its behavior on this page.
310
+ :param _builtins.str id: The unique identifier of a registered custom code script. This must be a script that was previously registered using the RegisteredScript resource. Script IDs are assigned by Webflow when the script is registered.
311
+ :param _builtins.str location: Where the script should be applied on the page. Must be either 'header' (loaded in page header) or 'footer' (loaded at end of page). Use 'header' for scripts that don't depend on DOM elements. Use 'footer' for scripts that need to run after DOM is fully loaded.
312
+ :param _builtins.str version: The semantic version string for the registered script (e.g., '1.0.0'). This version must match a registered version of the script. You can have multiple versions of the same script registered.
313
+ """
314
+ pulumi.set(__self__, "attributes", attributes)
315
+ pulumi.set(__self__, "id", id)
316
+ pulumi.set(__self__, "location", location)
317
+ pulumi.set(__self__, "version", version)
318
+
319
+ @_builtins.property
320
+ @pulumi.getter
321
+ def attributes(self) -> Mapping[str, Any]:
322
+ """
323
+ Optional developer-specified key/value pairs for script attributes. These attributes can be used by the script to customize its behavior on this page.
324
+ """
325
+ return pulumi.get(self, "attributes")
326
+
327
+ @_builtins.property
328
+ @pulumi.getter
329
+ def id(self) -> _builtins.str:
330
+ """
331
+ The unique identifier of a registered custom code script. This must be a script that was previously registered using the RegisteredScript resource. Script IDs are assigned by Webflow when the script is registered.
332
+ """
333
+ return pulumi.get(self, "id")
334
+
335
+ @_builtins.property
336
+ @pulumi.getter
337
+ def location(self) -> _builtins.str:
338
+ """
339
+ Where the script should be applied on the page. Must be either 'header' (loaded in page header) or 'footer' (loaded at end of page). Use 'header' for scripts that don't depend on DOM elements. Use 'footer' for scripts that need to run after DOM is fully loaded.
340
+ """
341
+ return pulumi.get(self, "location")
342
+
343
+ @_builtins.property
344
+ @pulumi.getter
345
+ def version(self) -> _builtins.str:
346
+ """
347
+ The semantic version string for the registered script (e.g., '1.0.0'). This version must match a registered version of the script. You can have multiple versions of the same script registered.
348
+ """
349
+ return pulumi.get(self, "version")
350
+
351
+
352
+ @pulumi.output_type
353
+ class PageInfo(dict):
354
+ @staticmethod
355
+ def __key_warning(key: str):
356
+ suggest = None
357
+ if key == "createdOn":
358
+ suggest = "created_on"
359
+ elif key == "lastUpdated":
360
+ suggest = "last_updated"
361
+ elif key == "pageId":
362
+ suggest = "page_id"
363
+ elif key == "siteId":
364
+ suggest = "site_id"
365
+ elif key == "collectionId":
366
+ suggest = "collection_id"
367
+ elif key == "parentId":
368
+ suggest = "parent_id"
369
+
370
+ if suggest:
371
+ pulumi.log.warn(f"Key '{key}' not found in PageInfo. Access the value via the '{suggest}' property getter instead.")
372
+
373
+ def __getitem__(self, key: str) -> Any:
374
+ PageInfo.__key_warning(key)
375
+ return super().__getitem__(key)
376
+
377
+ def get(self, key: str, default = None) -> Any:
378
+ PageInfo.__key_warning(key)
379
+ return super().get(key, default)
380
+
381
+ def __init__(__self__, *,
382
+ archived: _builtins.bool,
383
+ created_on: _builtins.str,
384
+ draft: _builtins.bool,
385
+ last_updated: _builtins.str,
386
+ page_id: _builtins.str,
387
+ site_id: _builtins.str,
388
+ slug: _builtins.str,
389
+ title: _builtins.str,
390
+ collection_id: Optional[_builtins.str] = None,
391
+ parent_id: Optional[_builtins.str] = None):
392
+ pulumi.set(__self__, "archived", archived)
393
+ pulumi.set(__self__, "created_on", created_on)
394
+ pulumi.set(__self__, "draft", draft)
395
+ pulumi.set(__self__, "last_updated", last_updated)
396
+ pulumi.set(__self__, "page_id", page_id)
397
+ pulumi.set(__self__, "site_id", site_id)
398
+ pulumi.set(__self__, "slug", slug)
399
+ pulumi.set(__self__, "title", title)
400
+ if collection_id is not None:
401
+ pulumi.set(__self__, "collection_id", collection_id)
402
+ if parent_id is not None:
403
+ pulumi.set(__self__, "parent_id", parent_id)
404
+
405
+ @_builtins.property
406
+ @pulumi.getter
407
+ def archived(self) -> _builtins.bool:
408
+ return pulumi.get(self, "archived")
409
+
410
+ @_builtins.property
411
+ @pulumi.getter(name="createdOn")
412
+ def created_on(self) -> _builtins.str:
413
+ return pulumi.get(self, "created_on")
414
+
415
+ @_builtins.property
416
+ @pulumi.getter
417
+ def draft(self) -> _builtins.bool:
418
+ return pulumi.get(self, "draft")
419
+
420
+ @_builtins.property
421
+ @pulumi.getter(name="lastUpdated")
422
+ def last_updated(self) -> _builtins.str:
423
+ return pulumi.get(self, "last_updated")
424
+
425
+ @_builtins.property
426
+ @pulumi.getter(name="pageId")
427
+ def page_id(self) -> _builtins.str:
428
+ return pulumi.get(self, "page_id")
429
+
430
+ @_builtins.property
431
+ @pulumi.getter(name="siteId")
432
+ def site_id(self) -> _builtins.str:
433
+ return pulumi.get(self, "site_id")
434
+
435
+ @_builtins.property
436
+ @pulumi.getter
437
+ def slug(self) -> _builtins.str:
438
+ return pulumi.get(self, "slug")
439
+
440
+ @_builtins.property
441
+ @pulumi.getter
442
+ def title(self) -> _builtins.str:
443
+ return pulumi.get(self, "title")
444
+
445
+ @_builtins.property
446
+ @pulumi.getter(name="collectionId")
447
+ def collection_id(self) -> Optional[_builtins.str]:
448
+ return pulumi.get(self, "collection_id")
449
+
450
+ @_builtins.property
451
+ @pulumi.getter(name="parentId")
452
+ def parent_id(self) -> Optional[_builtins.str]:
453
+ return pulumi.get(self, "parent_id")
454
+
455
+