@anvil-works/anvil-pyright 0.0.1 → 0.0.2-canary

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.
Files changed (98) hide show
  1. package/dist/anvil-typeshed/TODOS.md +70 -0
  2. package/dist/anvil-typeshed/client/anvil/__init__.pyi +1291 -0
  3. package/dist/anvil-typeshed/client/anvil/__pycache__/server.cpython-39.pyc +0 -0
  4. package/dist/anvil-typeshed/client/anvil/email.pyi +152 -0
  5. package/dist/anvil-typeshed/client/anvil/facebook/__init__.pyi +8 -0
  6. package/dist/anvil-typeshed/client/anvil/facebook/auth.pyi +30 -0
  7. package/dist/anvil-typeshed/client/anvil/google/__init__.pyi +11 -0
  8. package/dist/anvil-typeshed/client/anvil/google/auth.pyi +37 -0
  9. package/dist/anvil-typeshed/client/anvil/google/drive.pyi +98 -0
  10. package/dist/anvil-typeshed/client/anvil/google/sheets.pyi +98 -0
  11. package/dist/anvil-typeshed/client/anvil/http.pyi +66 -0
  12. package/dist/anvil-typeshed/client/anvil/image.pyi +30 -0
  13. package/dist/anvil-typeshed/client/anvil/js/__init__.pyi +143 -0
  14. package/dist/anvil-typeshed/client/anvil/js/window/__init__.pyi +2935 -0
  15. package/dist/anvil-typeshed/client/anvil/media.pyi +46 -0
  16. package/dist/anvil-typeshed/client/anvil/microsoft/__init__.pyi +8 -0
  17. package/dist/anvil-typeshed/client/anvil/microsoft/auth.pyi +34 -0
  18. package/dist/anvil-typeshed/client/anvil/mpl_util.pyi +29 -0
  19. package/dist/anvil-typeshed/client/anvil/plotly_templates.pyi +15 -0
  20. package/dist/anvil-typeshed/client/anvil/saml/__init__.pyi +8 -0
  21. package/dist/anvil-typeshed/client/anvil/saml/auth.pyi +24 -0
  22. package/dist/anvil-typeshed/client/anvil/secrets.pyi +22 -0
  23. package/dist/anvil-typeshed/client/anvil/server.pyi +376 -0
  24. package/dist/anvil-typeshed/client/anvil/stripe.pyi +23 -0
  25. package/dist/anvil-typeshed/client/anvil/tables/__init__.pyi +297 -0
  26. package/dist/anvil-typeshed/client/anvil/tables/query.pyi +88 -0
  27. package/dist/anvil-typeshed/client/anvil/tz.pyi +92 -0
  28. package/dist/anvil-typeshed/client/anvil/users/__init__.pyi +191 -0
  29. package/dist/anvil-typeshed/client/anvil/users/mfa.pyi +76 -0
  30. package/dist/anvil-typeshed/client/stripe/__init__.pyi +8 -0
  31. package/dist/anvil-typeshed/client/stripe/checkout.pyi +67 -0
  32. package/dist/anvil-typeshed/server/anvil/__init__.pyi +148 -0
  33. package/dist/anvil-typeshed/server/anvil/email.pyi +188 -0
  34. package/dist/anvil-typeshed/server/anvil/facebook/__init__.pyi +8 -0
  35. package/dist/anvil-typeshed/server/anvil/facebook/auth.pyi +27 -0
  36. package/dist/anvil-typeshed/server/anvil/files.pyi +53 -0
  37. package/dist/anvil-typeshed/server/anvil/google/__init__.pyi +11 -0
  38. package/dist/anvil-typeshed/server/anvil/google/auth.pyi +31 -0
  39. package/dist/anvil-typeshed/server/anvil/google/drive.pyi +98 -0
  40. package/dist/anvil-typeshed/server/anvil/google/mail.pyi +24 -0
  41. package/dist/anvil-typeshed/server/anvil/google/sheets.pyi +98 -0
  42. package/dist/anvil-typeshed/server/anvil/http.pyi +66 -0
  43. package/dist/anvil-typeshed/server/anvil/image.pyi +30 -0
  44. package/dist/anvil-typeshed/server/anvil/media.pyi +32 -0
  45. package/dist/anvil-typeshed/server/anvil/microsoft/__init__.pyi +8 -0
  46. package/dist/anvil-typeshed/server/anvil/microsoft/auth.pyi +31 -0
  47. package/dist/anvil-typeshed/server/anvil/mpl_util.pyi +29 -0
  48. package/dist/anvil-typeshed/server/anvil/pdf.pyi +61 -0
  49. package/dist/anvil-typeshed/server/anvil/plotly_templates.pyi +15 -0
  50. package/dist/anvil-typeshed/server/anvil/saml/__init__.pyi +8 -0
  51. package/dist/anvil-typeshed/server/anvil/saml/auth.pyi +21 -0
  52. package/dist/anvil-typeshed/server/anvil/secrets.pyi +22 -0
  53. package/dist/anvil-typeshed/server/anvil/server.pyi +470 -0
  54. package/dist/anvil-typeshed/server/anvil/stripe.pyi +23 -0
  55. package/dist/anvil-typeshed/server/anvil/tables/__init__.pyi +319 -0
  56. package/dist/anvil-typeshed/server/anvil/tables/query.pyi +88 -0
  57. package/dist/anvil-typeshed/server/anvil/tz.pyi +92 -0
  58. package/dist/anvil-typeshed/server/anvil/users/__init__.pyi +83 -0
  59. package/dist/anvil-typeshed/server/anvil/users/mfa.pyi +65 -0
  60. package/dist/anvil-typeshed/server/stripe/__init__.pyi +8 -0
  61. package/dist/anvil-typeshed/server/stripe/checkout.pyi +9 -0
  62. package/dist/anvil-typeshed/source/anvil/__init__.pyi +1306 -0
  63. package/dist/anvil-typeshed/source/anvil/email.pyi +188 -0
  64. package/dist/anvil-typeshed/source/anvil/facebook/__init__.pyi +4 -0
  65. package/dist/anvil-typeshed/source/anvil/facebook/auth.pyi +28 -0
  66. package/dist/anvil-typeshed/source/anvil/files.pyi +50 -0
  67. package/dist/anvil-typeshed/source/anvil/google/__init__.pyi +7 -0
  68. package/dist/anvil-typeshed/source/anvil/google/auth.pyi +35 -0
  69. package/dist/anvil-typeshed/source/anvil/google/drive.pyi +94 -0
  70. package/dist/anvil-typeshed/source/anvil/google/mail.pyi +21 -0
  71. package/dist/anvil-typeshed/source/anvil/google/sheets.pyi +94 -0
  72. package/dist/anvil-typeshed/source/anvil/http.pyi +62 -0
  73. package/dist/anvil-typeshed/source/anvil/image.pyi +26 -0
  74. package/dist/anvil-typeshed/source/anvil/js/__init__.pyi +140 -0
  75. package/dist/anvil-typeshed/source/anvil/js/window/__init__.pyi +2932 -0
  76. package/dist/anvil-typeshed/source/anvil/media.pyi +62 -0
  77. package/dist/anvil-typeshed/source/anvil/microsoft/__init__.pyi +4 -0
  78. package/dist/anvil-typeshed/source/anvil/microsoft/auth.pyi +32 -0
  79. package/dist/anvil-typeshed/source/anvil/mpl_util.pyi +25 -0
  80. package/dist/anvil-typeshed/source/anvil/pdf.pyi +58 -0
  81. package/dist/anvil-typeshed/source/anvil/plotly_templates.pyi +11 -0
  82. package/dist/anvil-typeshed/source/anvil/saml/__init__.pyi +4 -0
  83. package/dist/anvil-typeshed/source/anvil/saml/auth.pyi +22 -0
  84. package/dist/anvil-typeshed/source/anvil/secrets.pyi +18 -0
  85. package/dist/anvil-typeshed/source/anvil/server.pyi +511 -0
  86. package/dist/anvil-typeshed/source/anvil/stripe.pyi +19 -0
  87. package/dist/anvil-typeshed/source/anvil/tables/__init__.pyi +319 -0
  88. package/dist/anvil-typeshed/source/anvil/tables/query.pyi +84 -0
  89. package/dist/anvil-typeshed/source/anvil/tz.pyi +88 -0
  90. package/dist/anvil-typeshed/source/anvil/users/__init__.pyi +196 -0
  91. package/dist/anvil-typeshed/source/anvil/users/mfa.pyi +74 -0
  92. package/dist/anvil-typeshed/source/stripe/__init__.pyi +4 -0
  93. package/dist/anvil-typeshed/source/stripe/checkout.pyi +65 -0
  94. package/dist/pyright-langserver.js +1 -1
  95. package/dist/pyright-langserver.js.map +1 -1
  96. package/dist/pyright.js +1 -1
  97. package/dist/pyright.js.map +1 -1
  98. package/package.json +1 -1
@@ -0,0 +1,470 @@
1
+ # AUTO-GENERATED FILE - DO NOT EDIT
2
+ # Edit the source file in anvil-typeshed/source/ instead, then run:
3
+ # npm run generate-anvil-stubs
4
+ #
5
+ # Type stubs for anvil.server module
6
+ # Generated files: client/anvil/server.pyi, server/anvil/server.pyi
7
+
8
+ from typing import Any, Callable, TypeVar, overload, ParamSpec, Literal
9
+ from contextlib import contextmanager
10
+
11
+ _T = TypeVar("_T")
12
+ _P = ParamSpec("_P")
13
+
14
+
15
+ # ============================================================================
16
+ # Exceptions
17
+ # ============================================================================
18
+
19
+ class SerializationError(Exception):
20
+ """Raised when serialization fails."""
21
+ ...
22
+
23
+
24
+ class AppOfflineError(Exception):
25
+ """Raised when the app is offline."""
26
+ ...
27
+
28
+
29
+ class SessionExpiredError(Exception):
30
+ """Raised when the session has expired."""
31
+ ...
32
+
33
+
34
+ class UplinkDisconnectedError(Exception):
35
+ """Raised when the uplink connection is lost."""
36
+ ...
37
+
38
+
39
+ class ExecutionTerminatedError(Exception):
40
+ """Raised when execution is terminated."""
41
+ ...
42
+
43
+
44
+ class TimeoutError(Exception):
45
+ """Raised when a server call times out."""
46
+ ...
47
+
48
+
49
+ class InternalError(Exception):
50
+ """Raised when an internal server error occurs."""
51
+ ...
52
+
53
+
54
+ class RuntimeUnavailableError(Exception):
55
+ """Raised when the runtime is unavailable."""
56
+ ...
57
+
58
+
59
+ class QuotaExceededError(Exception):
60
+ """Raised when a quota is exceeded."""
61
+ ...
62
+
63
+
64
+ class NoServerFunctionError(Exception):
65
+ """Raised when a server function is not found."""
66
+ ...
67
+
68
+
69
+ class PermissionDenied(Exception):
70
+ """Raised when permission is denied."""
71
+ ...
72
+
73
+
74
+ class InvalidResponseError(Exception):
75
+ """Raised when an invalid response is received."""
76
+ ...
77
+
78
+
79
+ class ServiceNotAdded(Exception):
80
+ """Raised when a required service is not added to the app."""
81
+ ...
82
+
83
+
84
+ class BackgroundTaskError(Exception):
85
+ """Raised when a background task encounters an error."""
86
+ ...
87
+
88
+
89
+ class BackgroundTaskKilled(Exception):
90
+ """Raised when a background task is killed."""
91
+ ...
92
+
93
+
94
+ class BackgroundTaskNotFound(Exception):
95
+ """Raised when a background task is not found."""
96
+ ...
97
+
98
+
99
+ # ============================================================================
100
+ # Capabilities
101
+ # ============================================================================
102
+
103
+ class Capability:
104
+ """A Capability represents the ability to perform an action.
105
+
106
+ [Anvil Docs](https://anvil.works/docs/server/capabilities)"""
107
+
108
+ ANY: Any
109
+ """Sentinel value for unwrap_capability."""
110
+
111
+ scope: list[Any]
112
+ """A list representing what this capability represents.
113
+
114
+ It can be extended by calling narrow(), but not shortened.
115
+ Eg: ['my_resource', 42, 'foo']"""
116
+
117
+ is_valid: bool
118
+ """True if this Capability is still valid; False if it has been invalidated."""
119
+
120
+ def narrow(self, additional_scope: Any) -> "Capability":
121
+ """Return a new capability that is narrower than this one.
122
+
123
+ Appends additional scope element(s) to it."""
124
+ ...
125
+
126
+ def set_update_handler(
127
+ self,
128
+ apply_update: Callable[..., Any],
129
+ get_update: Callable[..., Any] | None = None,
130
+ ) -> None:
131
+ """Set a handler for what happens when an update is sent to this capability.
132
+
133
+ Optionally provide a function for aggregating updates."""
134
+ ...
135
+
136
+ def send_update(self, update: Any) -> None:
137
+ """Send an update to the update handler for this capability."""
138
+ ...
139
+
140
+
141
+ def unwrap_capability(capability: Capability, scope_pattern: list[Any]) -> list[Any]:
142
+ """Check that the first argument is a valid Capability and its scope matches the pattern.
143
+
144
+ To match, the scope must:
145
+ - Be at least as broad as the pattern (ie the same length or shorter)
146
+ - Contain the same values in the same position as the pattern - unless that
147
+ position in the pattern is Capability.ANY, which matches any value
148
+
149
+ Returns a list of matched scope elements, of the same length as the pattern."""
150
+ ...
151
+
152
+
153
+ # ============================================================================
154
+ # Call Context
155
+ # ============================================================================
156
+
157
+ class _ClientInfo:
158
+ """Information about the client that initiated the current session."""
159
+
160
+ type: str
161
+ """The type of client (e.g., 'browser', 'uplink')."""
162
+
163
+ ip: str | None
164
+ """The IP address of the client."""
165
+
166
+ location: "_Location | None"
167
+ """The location of the client, if available."""
168
+
169
+
170
+ class _Location:
171
+ """Geographic location information."""
172
+
173
+ city: str | None
174
+ country: str | None
175
+ latitude: float | None
176
+ longitude: float | None
177
+
178
+
179
+ class _StackFrame:
180
+ """Information about a call stack frame."""
181
+
182
+ type: str
183
+ """The execution environment type."""
184
+
185
+ is_trusted: bool
186
+ """Whether this call is from trusted (server-side) code."""
187
+
188
+
189
+ class CallContext:
190
+ """Contains information about what triggered the currently running code."""
191
+
192
+ client: _ClientInfo
193
+ """An object that describes the client that initiated the current session."""
194
+
195
+ type: str
196
+ """The execution environment this code is running in.
197
+
198
+ May be 'browser', 'server_module' or 'uplink'."""
199
+
200
+ remote_caller: _StackFrame | None
201
+ """An object describing the code that called this @anvil.server.callable function."""
202
+
203
+ background_task_id: str | None
204
+ """The ID of the currently running background task, if there is one."""
205
+
206
+
207
+ context: CallContext
208
+ """Contains information about what triggered the currently running code."""
209
+
210
+ # Call a server function
211
+ def call(fn_name: str, /, *args: Any, **kwargs: Any) -> Any:
212
+ """Call a server function by name.
213
+
214
+ [Anvil Docs](https://anvil.works/docs/server)"""
215
+ ...
216
+
217
+ def call_s(fn_name: str, /, *args: Any, **kwargs: Any) -> Any:
218
+ """Call a server function by name without showing a loading indicator.
219
+
220
+ [Anvil Docs](https://anvil.works/docs/server)"""
221
+ ...
222
+
223
+ # Callable decorator (server-only - marks functions as callable from client code)
224
+ @overload
225
+ def callable(fn: Callable[_P, _T]) -> Callable[_P, _T]: ...
226
+ @overload
227
+ def callable(*, name: str | None = None, require_user: bool = False) -> Callable[[Callable[_P, _T]], Callable[_P, _T]]: ...
228
+ def callable(fn: Callable[_P, _T] | None = ..., *, name: str | None = None, require_user: bool = False) -> Callable[_P, _T] | Callable[[Callable[_P, _T]], Callable[_P, _T]]:
229
+ """Mark a function as callable from client code.
230
+
231
+ [Anvil Docs](https://anvil.works/docs/server/server-modules)"""
232
+ ...
233
+
234
+ # Server method decorator (for methods in portable classes)
235
+ @overload
236
+ def server_method(fn: Callable[_P, _T]) -> Callable[_P, _T]: ...
237
+ @overload
238
+ def server_method(*, require_user: bool | Callable[..., bool] | None = None) -> Callable[[Callable[_P, _T]], Callable[_P, _T]]: ...
239
+ def server_method(
240
+ fn: Callable[_P, _T] | None = ...,
241
+ *,
242
+ require_user: bool | Callable[..., bool] | None = None
243
+ ) -> Callable[_P, _T] | Callable[[Callable[_P, _T]], Callable[_P, _T]]:
244
+ """Mark a method in a portable class as callable from client code.
245
+
246
+ Methods decorated with @anvil.server.server_method can be called on portable
247
+ class instances from client code, and will execute on the server.
248
+
249
+ [Anvil Docs](https://anvil.works/docs/server/portable-classes#server-methods)"""
250
+ ...
251
+
252
+ # Background task decorator
253
+ @overload
254
+ def background_task(fn: Callable[_P, _T]) -> Callable[_P, _T]: ...
255
+ @overload
256
+ def background_task() -> Callable[[Callable[_P, _T]], Callable[_P, _T]]: ...
257
+ def background_task(fn: Callable[_P, _T] | None = None) -> Callable[_P, _T] | Callable[[Callable[_P, _T]], Callable[_P, _T]]:
258
+ """Mark a function as a background task.
259
+
260
+ [Anvil Docs](https://anvil.works/docs/background-tasks)"""
261
+ ...
262
+
263
+ # Launch a background task
264
+ def launch_background_task(task_name: str, /, *args: Any, **kwargs: Any) -> Any:
265
+ """Launch a background task by name.
266
+
267
+ [Anvil Docs](https://anvil.works/docs/background-tasks)"""
268
+ ...
269
+
270
+ # Request context
271
+ class request:
272
+ """HTTP request context for http_endpoint handlers.
273
+
274
+ [Anvil Docs](https://anvil.works/docs/server/http-endpoints)"""
275
+ method: str
276
+ path: str
277
+ body: bytes
278
+ body_json: Any | None
279
+ remote_address: str
280
+ headers: dict[str, str]
281
+ query_params: dict[str, str]
282
+ form_params: dict[str, str]
283
+ cookies: dict[str, str]
284
+ @staticmethod
285
+ def get_header(name: str) -> str | None: ...
286
+
287
+ # Session handling
288
+ class session:
289
+ """Server-side session storage.
290
+
291
+ [Anvil Docs](https://anvil.works/docs/server/sessions)"""
292
+ @staticmethod
293
+ def get(key: str, default: Any = None) -> Any: ...
294
+ @staticmethod
295
+ def set(key: str, value: Any) -> None: ...
296
+ @staticmethod
297
+ def clear() -> None: ...
298
+
299
+ # HTTP endpoint decorator
300
+ def http_endpoint(path: str, methods: list[str] | None = None, authenticate_users: bool = False, enable_cors: bool = False, cross_site_session: bool = False) -> Callable[[Callable[_P, _T]], Callable[_P, _T]]:
301
+ """Decorator to create an HTTP endpoint.
302
+
303
+ [Anvil Docs](https://anvil.works/docs/server/http-endpoints)"""
304
+ ...
305
+
306
+ # Route decorator
307
+ def route(
308
+ path: str,
309
+ *,
310
+ require_credentials: bool = False,
311
+ authenticate_users: bool = False,
312
+ methods: list[str] | None = None,
313
+ enable_cors: bool = False,
314
+ cross_site_session: bool = False,
315
+ ) -> Callable[[Callable[_P, _T]], Callable[_P, _T]]:
316
+ """Decorator to create a server-side route.
317
+
318
+ [Anvil Docs](https://anvil.works/docs/http-apis/creating-http-endpoints)"""
319
+ ...
320
+
321
+ # Connect to other servers
322
+ def connect(url: str, /, **kwargs: Any) -> Any:
323
+ """Connect to an Anvil Uplink server.
324
+
325
+ [Anvil Docs](https://anvil.works/docs/uplink)"""
326
+ ...
327
+
328
+ # Portable classes
329
+ def portable_class(cls: type[_T], /) -> type[_T]:
330
+ """Decorator to make a class portable across client and server.
331
+
332
+ [Anvil Docs](https://anvil.works/docs/server/portable-classes)"""
333
+ ...
334
+
335
+
336
+ # ============================================================================
337
+ # URL and Origin Functions
338
+ # ============================================================================
339
+
340
+ def get_app_origin(environment_type: Literal["published"] | None = None) -> str:
341
+ """Returns the root URL for the current app.
342
+
343
+ By default, this function returns the URL for the current environment,
344
+ which might be private or temporary. If you want the URL for the published
345
+ branch, pass 'published' as an argument.
346
+
347
+ [Anvil Docs](https://anvil.works/docs/http-apis/creating-http-endpoints#getting-the-url-for-your-api)"""
348
+ ...
349
+
350
+
351
+ def get_api_origin(environment_type: Literal["published"] | None = None) -> str:
352
+ """Returns the root URL of the API for the current app.
353
+
354
+ By default, this function returns the URL for the current environment,
355
+ which might be private or temporary. If you want the URL for the published
356
+ branch, pass 'published' as an argument.
357
+
358
+ [Anvil Docs](https://anvil.works/docs/http-apis/creating-http-endpoints#getting-the-url-for-your-api)"""
359
+ ...
360
+
361
+
362
+ # ============================================================================
363
+ # Session Functions
364
+ # ============================================================================
365
+
366
+ def get_session_id() -> str | None:
367
+ """Get the current session ID, if any."""
368
+ ...
369
+
370
+
371
+ def reset_session() -> None:
372
+ """Reset the current session."""
373
+ ...
374
+
375
+
376
+ # ============================================================================
377
+ # Background Tasks
378
+ # ============================================================================
379
+
380
+ class BackgroundTaskState:
381
+ """Information about a background task."""
382
+
383
+ task_id: str
384
+ """The ID of the background task."""
385
+
386
+ def get_id(self) -> str:
387
+ """Get the ID of this background task."""
388
+ ...
389
+
390
+ def get_state(self) -> dict[str, Any]:
391
+ """Get the current state of this background task."""
392
+ ...
393
+
394
+ def get_return_value(self) -> Any:
395
+ """Get the return value of this background task, if completed."""
396
+ ...
397
+
398
+ def get_error(self) -> Exception | None:
399
+ """Get the error from this background task, if it failed."""
400
+ ...
401
+
402
+ def is_completed(self) -> bool:
403
+ """Check if this background task has completed."""
404
+ ...
405
+
406
+ def is_running(self) -> bool:
407
+ """Check if this background task is still running."""
408
+ ...
409
+
410
+ def kill(self) -> None:
411
+ """Kill this background task."""
412
+ ...
413
+
414
+
415
+ def get_background_task(id: str, /) -> BackgroundTaskState:
416
+ """Returns the Task object of a background task from its id.
417
+
418
+ You can get the task id from task.get_id().
419
+
420
+ [Anvil Docs](https://anvil.works/docs/background-tasks/communicating-back)"""
421
+ ...
422
+
423
+
424
+ def list_background_tasks(all_environments: bool = False) -> list[BackgroundTaskState]:
425
+ """Returns a list of all Tasks running in the current environment.
426
+
427
+ If all_environments is True, this function will return all of the app's
428
+ running Tasks regardless of environment.
429
+
430
+ [Anvil Docs](https://anvil.works/docs/background-tasks#list-background-tasks-from-code)"""
431
+ ...
432
+
433
+
434
+ def is_app_online() -> bool:
435
+ """Check if the app is online."""
436
+ ...
437
+
438
+
439
+ # ============================================================================
440
+ # HTTP Response Classes
441
+ # ============================================================================
442
+
443
+ class HttpResponse:
444
+ """An HTTP response object.
445
+
446
+ [Anvil Docs](https://anvil.works/docs/http-apis/creating-http-endpoints)"""
447
+
448
+ def __init__(
449
+ self,
450
+ status: int = 200,
451
+ body: str | bytes = "",
452
+ headers: dict[str, str] | None = None,
453
+ ) -> None: ...
454
+
455
+
456
+ class HttpRequest:
457
+ """An HTTP request object.
458
+
459
+ [Anvil Docs](https://anvil.works/docs/http-apis/creating-http-endpoints)"""
460
+
461
+ method: str
462
+ path: str
463
+ body: bytes
464
+ body_json: Any | None
465
+ headers: dict[str, str]
466
+ query_params: dict[str, str]
467
+ form_params: dict[str, str]
468
+ username: str | None
469
+ password: str | None
470
+ remote_address: str
@@ -0,0 +1,23 @@
1
+ # AUTO-GENERATED FILE - DO NOT EDIT
2
+ # Edit the source file in anvil-typeshed/source/ instead, then run:
3
+ # npm run generate-anvil-stubs
4
+ #
5
+ # Type stubs for anvil.stripe module
6
+ # Generated files: client/anvil/stripe.pyi, server/anvil/stripe.pyi
7
+
8
+ from typing import Any
9
+
10
+ class Customer:
11
+ """A Stripe Customer object."""
12
+
13
+ id: str
14
+ email: str
15
+ def __getattr__(self, name: str) -> Any: ...
16
+
17
+ def new_customer(email_address: str, token: str | None = None) -> Customer:
18
+ """Create a new Stripe Customer record."""
19
+ ...
20
+
21
+ def get_customer(customer_id: str, /) -> Customer:
22
+ """Retrieve a Stripe Customer record by its ID."""
23
+ ...