anchorbrowser 0.5.4__py3-none-any.whl → 0.6.1__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.
Files changed (38) hide show
  1. anchorbrowser/_base_client.py +1 -1
  2. anchorbrowser/_client.py +9 -2
  3. anchorbrowser/_version.py +1 -1
  4. anchorbrowser/resources/__init__.py +14 -0
  5. anchorbrowser/resources/applications/__init__.py +33 -0
  6. anchorbrowser/resources/applications/applications.py +715 -0
  7. anchorbrowser/resources/applications/auth_flows.py +547 -0
  8. anchorbrowser/resources/identities.py +453 -1
  9. anchorbrowser/resources/sessions/sessions.py +14 -0
  10. anchorbrowser/types/__init__.py +20 -0
  11. anchorbrowser/types/application_create_identity_token_params.py +17 -0
  12. anchorbrowser/types/application_create_identity_token_response.py +23 -0
  13. anchorbrowser/types/application_create_params.py +18 -0
  14. anchorbrowser/types/application_create_response.py +25 -0
  15. anchorbrowser/types/application_delete_response.py +12 -0
  16. anchorbrowser/types/application_list_identities_params.py +12 -0
  17. anchorbrowser/types/application_list_identities_response.py +33 -0
  18. anchorbrowser/types/application_list_params.py +12 -0
  19. anchorbrowser/types/application_list_response.py +41 -0
  20. anchorbrowser/types/application_retrieve_response.py +37 -0
  21. anchorbrowser/types/applications/__init__.py +10 -0
  22. anchorbrowser/types/applications/auth_flow_create_params.py +30 -0
  23. anchorbrowser/types/applications/auth_flow_create_response.py +39 -0
  24. anchorbrowser/types/applications/auth_flow_delete_response.py +12 -0
  25. anchorbrowser/types/applications/auth_flow_list_response.py +43 -0
  26. anchorbrowser/types/applications/auth_flow_update_params.py +32 -0
  27. anchorbrowser/types/applications/auth_flow_update_response.py +39 -0
  28. anchorbrowser/types/identity_create_params.py +84 -0
  29. anchorbrowser/types/identity_create_response.py +26 -0
  30. anchorbrowser/types/identity_delete_response.py +12 -0
  31. anchorbrowser/types/identity_retrieve_response.py +32 -0
  32. anchorbrowser/types/identity_update_params.py +70 -0
  33. anchorbrowser/types/identity_update_response.py +22 -0
  34. anchorbrowser/types/session_create_params.py +15 -0
  35. {anchorbrowser-0.5.4.dist-info → anchorbrowser-0.6.1.dist-info}/METADATA +1 -1
  36. {anchorbrowser-0.5.4.dist-info → anchorbrowser-0.6.1.dist-info}/RECORD +38 -12
  37. {anchorbrowser-0.5.4.dist-info → anchorbrowser-0.6.1.dist-info}/licenses/LICENSE +1 -1
  38. {anchorbrowser-0.5.4.dist-info → anchorbrowser-0.6.1.dist-info}/WHEEL +0 -0
@@ -0,0 +1,715 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ import httpx
6
+
7
+ from ...types import (
8
+ application_list_params,
9
+ application_create_params,
10
+ application_list_identities_params,
11
+ application_create_identity_token_params,
12
+ )
13
+ from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
14
+ from ..._utils import maybe_transform, async_maybe_transform
15
+ from ..._compat import cached_property
16
+ from .auth_flows import (
17
+ AuthFlowsResource,
18
+ AsyncAuthFlowsResource,
19
+ AuthFlowsResourceWithRawResponse,
20
+ AsyncAuthFlowsResourceWithRawResponse,
21
+ AuthFlowsResourceWithStreamingResponse,
22
+ AsyncAuthFlowsResourceWithStreamingResponse,
23
+ )
24
+ from ..._resource import SyncAPIResource, AsyncAPIResource
25
+ from ..._response import (
26
+ to_raw_response_wrapper,
27
+ to_streamed_response_wrapper,
28
+ async_to_raw_response_wrapper,
29
+ async_to_streamed_response_wrapper,
30
+ )
31
+ from ..._base_client import make_request_options
32
+ from ...types.application_list_response import ApplicationListResponse
33
+ from ...types.application_create_response import ApplicationCreateResponse
34
+ from ...types.application_delete_response import ApplicationDeleteResponse
35
+ from ...types.application_retrieve_response import ApplicationRetrieveResponse
36
+ from ...types.application_list_identities_response import ApplicationListIdentitiesResponse
37
+ from ...types.application_create_identity_token_response import ApplicationCreateIdentityTokenResponse
38
+
39
+ __all__ = ["ApplicationsResource", "AsyncApplicationsResource"]
40
+
41
+
42
+ class ApplicationsResource(SyncAPIResource):
43
+ @cached_property
44
+ def auth_flows(self) -> AuthFlowsResource:
45
+ return AuthFlowsResource(self._client)
46
+
47
+ @cached_property
48
+ def with_raw_response(self) -> ApplicationsResourceWithRawResponse:
49
+ """
50
+ This property can be used as a prefix for any HTTP method call to return
51
+ the raw response object instead of the parsed content.
52
+
53
+ For more information, see https://www.github.com/anchorbrowser/AnchorBrowser-SDK-Python#accessing-raw-response-data-eg-headers
54
+ """
55
+ return ApplicationsResourceWithRawResponse(self)
56
+
57
+ @cached_property
58
+ def with_streaming_response(self) -> ApplicationsResourceWithStreamingResponse:
59
+ """
60
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
61
+
62
+ For more information, see https://www.github.com/anchorbrowser/AnchorBrowser-SDK-Python#with_streaming_response
63
+ """
64
+ return ApplicationsResourceWithStreamingResponse(self)
65
+
66
+ def create(
67
+ self,
68
+ *,
69
+ source: str,
70
+ description: str | Omit = omit,
71
+ name: str | Omit = omit,
72
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
73
+ # The extra values given here take precedence over values defined on the client or passed to this method.
74
+ extra_headers: Headers | None = None,
75
+ extra_query: Query | None = None,
76
+ extra_body: Body | None = None,
77
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
78
+ ) -> ApplicationCreateResponse:
79
+ """Creates a new application for identity management.
80
+
81
+ **Beta** Capability.
82
+
83
+ [Contact support](mailto:support@anchorbrowser.io) to
84
+ enable.
85
+
86
+ Args:
87
+ source: The source URL of the application
88
+
89
+ description: Description of the application
90
+
91
+ name: Name of the application
92
+
93
+ extra_headers: Send extra headers
94
+
95
+ extra_query: Add additional query parameters to the request
96
+
97
+ extra_body: Add additional JSON properties to the request
98
+
99
+ timeout: Override the client-level default timeout for this request, in seconds
100
+ """
101
+ return self._post(
102
+ "/v1/applications",
103
+ body=maybe_transform(
104
+ {
105
+ "source": source,
106
+ "description": description,
107
+ "name": name,
108
+ },
109
+ application_create_params.ApplicationCreateParams,
110
+ ),
111
+ options=make_request_options(
112
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
113
+ ),
114
+ cast_to=ApplicationCreateResponse,
115
+ )
116
+
117
+ def retrieve(
118
+ self,
119
+ application_id: str,
120
+ *,
121
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
122
+ # The extra values given here take precedence over values defined on the client or passed to this method.
123
+ extra_headers: Headers | None = None,
124
+ extra_query: Query | None = None,
125
+ extra_body: Body | None = None,
126
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
127
+ ) -> ApplicationRetrieveResponse:
128
+ """Retrieves details of a specific application by its ID.
129
+
130
+ **Beta** Capability.
131
+
132
+ [Contact support](mailto:support@anchorbrowser.io) to
133
+ enable.
134
+
135
+ Args:
136
+ extra_headers: Send extra headers
137
+
138
+ extra_query: Add additional query parameters to the request
139
+
140
+ extra_body: Add additional JSON properties to the request
141
+
142
+ timeout: Override the client-level default timeout for this request, in seconds
143
+ """
144
+ if not application_id:
145
+ raise ValueError(f"Expected a non-empty value for `application_id` but received {application_id!r}")
146
+ return self._get(
147
+ f"/v1/applications/{application_id}",
148
+ options=make_request_options(
149
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
150
+ ),
151
+ cast_to=ApplicationRetrieveResponse,
152
+ )
153
+
154
+ def list(
155
+ self,
156
+ *,
157
+ search: str | Omit = omit,
158
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
159
+ # The extra values given here take precedence over values defined on the client or passed to this method.
160
+ extra_headers: Headers | None = None,
161
+ extra_query: Query | None = None,
162
+ extra_body: Body | None = None,
163
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
164
+ ) -> ApplicationListResponse:
165
+ """Retrieves all applications for the authenticated team.
166
+
167
+ **Beta** Capability.
168
+
169
+ [Contact support](mailto:support@anchorbrowser.io) to
170
+ enable.
171
+
172
+ Args:
173
+ search: Search query to filter applications by name
174
+
175
+ extra_headers: Send extra headers
176
+
177
+ extra_query: Add additional query parameters to the request
178
+
179
+ extra_body: Add additional JSON properties to the request
180
+
181
+ timeout: Override the client-level default timeout for this request, in seconds
182
+ """
183
+ return self._get(
184
+ "/v1/applications",
185
+ options=make_request_options(
186
+ extra_headers=extra_headers,
187
+ extra_query=extra_query,
188
+ extra_body=extra_body,
189
+ timeout=timeout,
190
+ query=maybe_transform({"search": search}, application_list_params.ApplicationListParams),
191
+ ),
192
+ cast_to=ApplicationListResponse,
193
+ )
194
+
195
+ def delete(
196
+ self,
197
+ application_id: str,
198
+ *,
199
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
200
+ # The extra values given here take precedence over values defined on the client or passed to this method.
201
+ extra_headers: Headers | None = None,
202
+ extra_query: Query | None = None,
203
+ extra_body: Body | None = None,
204
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
205
+ ) -> ApplicationDeleteResponse:
206
+ """Deletes an existing application.
207
+
208
+ **Beta** Capability.
209
+
210
+ [Contact support](mailto:support@anchorbrowser.io) to
211
+ enable.
212
+
213
+ Args:
214
+ extra_headers: Send extra headers
215
+
216
+ extra_query: Add additional query parameters to the request
217
+
218
+ extra_body: Add additional JSON properties to the request
219
+
220
+ timeout: Override the client-level default timeout for this request, in seconds
221
+ """
222
+ if not application_id:
223
+ raise ValueError(f"Expected a non-empty value for `application_id` but received {application_id!r}")
224
+ return self._delete(
225
+ f"/v1/applications/{application_id}",
226
+ options=make_request_options(
227
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
228
+ ),
229
+ cast_to=ApplicationDeleteResponse,
230
+ )
231
+
232
+ def create_identity_token(
233
+ self,
234
+ application_id: str,
235
+ *,
236
+ callback_url: str,
237
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
238
+ # The extra values given here take precedence over values defined on the client or passed to this method.
239
+ extra_headers: Headers | None = None,
240
+ extra_query: Query | None = None,
241
+ extra_body: Body | None = None,
242
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
243
+ ) -> ApplicationCreateIdentityTokenResponse:
244
+ """Creates an identity token for a specific application.
245
+
246
+ This token is used to
247
+ initiate an authentication flow for linking user identities to the application.
248
+
249
+ The callback URL must use HTTPS and is where the user will be redirected after
250
+ authentication.
251
+
252
+ Args:
253
+ callback_url: The HTTPS URL where the user will be redirected after authentication. Must use
254
+ HTTPS protocol.
255
+
256
+ extra_headers: Send extra headers
257
+
258
+ extra_query: Add additional query parameters to the request
259
+
260
+ extra_body: Add additional JSON properties to the request
261
+
262
+ timeout: Override the client-level default timeout for this request, in seconds
263
+ """
264
+ if not application_id:
265
+ raise ValueError(f"Expected a non-empty value for `application_id` but received {application_id!r}")
266
+ return self._post(
267
+ f"/v1/applications/{application_id}/tokens",
268
+ body=maybe_transform(
269
+ {"callback_url": callback_url},
270
+ application_create_identity_token_params.ApplicationCreateIdentityTokenParams,
271
+ ),
272
+ options=make_request_options(
273
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
274
+ ),
275
+ cast_to=ApplicationCreateIdentityTokenResponse,
276
+ )
277
+
278
+ def list_identities(
279
+ self,
280
+ application_id: str,
281
+ *,
282
+ search: str | Omit = omit,
283
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
284
+ # The extra values given here take precedence over values defined on the client or passed to this method.
285
+ extra_headers: Headers | None = None,
286
+ extra_query: Query | None = None,
287
+ extra_body: Body | None = None,
288
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
289
+ ) -> ApplicationListIdentitiesResponse:
290
+ """
291
+ Retrieves all identities associated with a specific application.
292
+
293
+ **Beta** Capability. [Contact support](mailto:support@anchorbrowser.io) to
294
+ enable.
295
+
296
+ Args:
297
+ search: Search query to filter identities by name
298
+
299
+ extra_headers: Send extra headers
300
+
301
+ extra_query: Add additional query parameters to the request
302
+
303
+ extra_body: Add additional JSON properties to the request
304
+
305
+ timeout: Override the client-level default timeout for this request, in seconds
306
+ """
307
+ if not application_id:
308
+ raise ValueError(f"Expected a non-empty value for `application_id` but received {application_id!r}")
309
+ return self._get(
310
+ f"/v1/applications/{application_id}/identities",
311
+ options=make_request_options(
312
+ extra_headers=extra_headers,
313
+ extra_query=extra_query,
314
+ extra_body=extra_body,
315
+ timeout=timeout,
316
+ query=maybe_transform(
317
+ {"search": search}, application_list_identities_params.ApplicationListIdentitiesParams
318
+ ),
319
+ ),
320
+ cast_to=ApplicationListIdentitiesResponse,
321
+ )
322
+
323
+
324
+ class AsyncApplicationsResource(AsyncAPIResource):
325
+ @cached_property
326
+ def auth_flows(self) -> AsyncAuthFlowsResource:
327
+ return AsyncAuthFlowsResource(self._client)
328
+
329
+ @cached_property
330
+ def with_raw_response(self) -> AsyncApplicationsResourceWithRawResponse:
331
+ """
332
+ This property can be used as a prefix for any HTTP method call to return
333
+ the raw response object instead of the parsed content.
334
+
335
+ For more information, see https://www.github.com/anchorbrowser/AnchorBrowser-SDK-Python#accessing-raw-response-data-eg-headers
336
+ """
337
+ return AsyncApplicationsResourceWithRawResponse(self)
338
+
339
+ @cached_property
340
+ def with_streaming_response(self) -> AsyncApplicationsResourceWithStreamingResponse:
341
+ """
342
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
343
+
344
+ For more information, see https://www.github.com/anchorbrowser/AnchorBrowser-SDK-Python#with_streaming_response
345
+ """
346
+ return AsyncApplicationsResourceWithStreamingResponse(self)
347
+
348
+ async def create(
349
+ self,
350
+ *,
351
+ source: str,
352
+ description: str | Omit = omit,
353
+ name: str | Omit = omit,
354
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
355
+ # The extra values given here take precedence over values defined on the client or passed to this method.
356
+ extra_headers: Headers | None = None,
357
+ extra_query: Query | None = None,
358
+ extra_body: Body | None = None,
359
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
360
+ ) -> ApplicationCreateResponse:
361
+ """Creates a new application for identity management.
362
+
363
+ **Beta** Capability.
364
+
365
+ [Contact support](mailto:support@anchorbrowser.io) to
366
+ enable.
367
+
368
+ Args:
369
+ source: The source URL of the application
370
+
371
+ description: Description of the application
372
+
373
+ name: Name of the application
374
+
375
+ extra_headers: Send extra headers
376
+
377
+ extra_query: Add additional query parameters to the request
378
+
379
+ extra_body: Add additional JSON properties to the request
380
+
381
+ timeout: Override the client-level default timeout for this request, in seconds
382
+ """
383
+ return await self._post(
384
+ "/v1/applications",
385
+ body=await async_maybe_transform(
386
+ {
387
+ "source": source,
388
+ "description": description,
389
+ "name": name,
390
+ },
391
+ application_create_params.ApplicationCreateParams,
392
+ ),
393
+ options=make_request_options(
394
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
395
+ ),
396
+ cast_to=ApplicationCreateResponse,
397
+ )
398
+
399
+ async def retrieve(
400
+ self,
401
+ application_id: str,
402
+ *,
403
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
404
+ # The extra values given here take precedence over values defined on the client or passed to this method.
405
+ extra_headers: Headers | None = None,
406
+ extra_query: Query | None = None,
407
+ extra_body: Body | None = None,
408
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
409
+ ) -> ApplicationRetrieveResponse:
410
+ """Retrieves details of a specific application by its ID.
411
+
412
+ **Beta** Capability.
413
+
414
+ [Contact support](mailto:support@anchorbrowser.io) to
415
+ enable.
416
+
417
+ Args:
418
+ extra_headers: Send extra headers
419
+
420
+ extra_query: Add additional query parameters to the request
421
+
422
+ extra_body: Add additional JSON properties to the request
423
+
424
+ timeout: Override the client-level default timeout for this request, in seconds
425
+ """
426
+ if not application_id:
427
+ raise ValueError(f"Expected a non-empty value for `application_id` but received {application_id!r}")
428
+ return await self._get(
429
+ f"/v1/applications/{application_id}",
430
+ options=make_request_options(
431
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
432
+ ),
433
+ cast_to=ApplicationRetrieveResponse,
434
+ )
435
+
436
+ async def list(
437
+ self,
438
+ *,
439
+ search: str | Omit = omit,
440
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
441
+ # The extra values given here take precedence over values defined on the client or passed to this method.
442
+ extra_headers: Headers | None = None,
443
+ extra_query: Query | None = None,
444
+ extra_body: Body | None = None,
445
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
446
+ ) -> ApplicationListResponse:
447
+ """Retrieves all applications for the authenticated team.
448
+
449
+ **Beta** Capability.
450
+
451
+ [Contact support](mailto:support@anchorbrowser.io) to
452
+ enable.
453
+
454
+ Args:
455
+ search: Search query to filter applications by name
456
+
457
+ extra_headers: Send extra headers
458
+
459
+ extra_query: Add additional query parameters to the request
460
+
461
+ extra_body: Add additional JSON properties to the request
462
+
463
+ timeout: Override the client-level default timeout for this request, in seconds
464
+ """
465
+ return await self._get(
466
+ "/v1/applications",
467
+ options=make_request_options(
468
+ extra_headers=extra_headers,
469
+ extra_query=extra_query,
470
+ extra_body=extra_body,
471
+ timeout=timeout,
472
+ query=await async_maybe_transform({"search": search}, application_list_params.ApplicationListParams),
473
+ ),
474
+ cast_to=ApplicationListResponse,
475
+ )
476
+
477
+ async def delete(
478
+ self,
479
+ application_id: str,
480
+ *,
481
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
482
+ # The extra values given here take precedence over values defined on the client or passed to this method.
483
+ extra_headers: Headers | None = None,
484
+ extra_query: Query | None = None,
485
+ extra_body: Body | None = None,
486
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
487
+ ) -> ApplicationDeleteResponse:
488
+ """Deletes an existing application.
489
+
490
+ **Beta** Capability.
491
+
492
+ [Contact support](mailto:support@anchorbrowser.io) to
493
+ enable.
494
+
495
+ Args:
496
+ extra_headers: Send extra headers
497
+
498
+ extra_query: Add additional query parameters to the request
499
+
500
+ extra_body: Add additional JSON properties to the request
501
+
502
+ timeout: Override the client-level default timeout for this request, in seconds
503
+ """
504
+ if not application_id:
505
+ raise ValueError(f"Expected a non-empty value for `application_id` but received {application_id!r}")
506
+ return await self._delete(
507
+ f"/v1/applications/{application_id}",
508
+ options=make_request_options(
509
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
510
+ ),
511
+ cast_to=ApplicationDeleteResponse,
512
+ )
513
+
514
+ async def create_identity_token(
515
+ self,
516
+ application_id: str,
517
+ *,
518
+ callback_url: str,
519
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
520
+ # The extra values given here take precedence over values defined on the client or passed to this method.
521
+ extra_headers: Headers | None = None,
522
+ extra_query: Query | None = None,
523
+ extra_body: Body | None = None,
524
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
525
+ ) -> ApplicationCreateIdentityTokenResponse:
526
+ """Creates an identity token for a specific application.
527
+
528
+ This token is used to
529
+ initiate an authentication flow for linking user identities to the application.
530
+
531
+ The callback URL must use HTTPS and is where the user will be redirected after
532
+ authentication.
533
+
534
+ Args:
535
+ callback_url: The HTTPS URL where the user will be redirected after authentication. Must use
536
+ HTTPS protocol.
537
+
538
+ extra_headers: Send extra headers
539
+
540
+ extra_query: Add additional query parameters to the request
541
+
542
+ extra_body: Add additional JSON properties to the request
543
+
544
+ timeout: Override the client-level default timeout for this request, in seconds
545
+ """
546
+ if not application_id:
547
+ raise ValueError(f"Expected a non-empty value for `application_id` but received {application_id!r}")
548
+ return await self._post(
549
+ f"/v1/applications/{application_id}/tokens",
550
+ body=await async_maybe_transform(
551
+ {"callback_url": callback_url},
552
+ application_create_identity_token_params.ApplicationCreateIdentityTokenParams,
553
+ ),
554
+ options=make_request_options(
555
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
556
+ ),
557
+ cast_to=ApplicationCreateIdentityTokenResponse,
558
+ )
559
+
560
+ async def list_identities(
561
+ self,
562
+ application_id: str,
563
+ *,
564
+ search: str | Omit = omit,
565
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
566
+ # The extra values given here take precedence over values defined on the client or passed to this method.
567
+ extra_headers: Headers | None = None,
568
+ extra_query: Query | None = None,
569
+ extra_body: Body | None = None,
570
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
571
+ ) -> ApplicationListIdentitiesResponse:
572
+ """
573
+ Retrieves all identities associated with a specific application.
574
+
575
+ **Beta** Capability. [Contact support](mailto:support@anchorbrowser.io) to
576
+ enable.
577
+
578
+ Args:
579
+ search: Search query to filter identities by name
580
+
581
+ extra_headers: Send extra headers
582
+
583
+ extra_query: Add additional query parameters to the request
584
+
585
+ extra_body: Add additional JSON properties to the request
586
+
587
+ timeout: Override the client-level default timeout for this request, in seconds
588
+ """
589
+ if not application_id:
590
+ raise ValueError(f"Expected a non-empty value for `application_id` but received {application_id!r}")
591
+ return await self._get(
592
+ f"/v1/applications/{application_id}/identities",
593
+ options=make_request_options(
594
+ extra_headers=extra_headers,
595
+ extra_query=extra_query,
596
+ extra_body=extra_body,
597
+ timeout=timeout,
598
+ query=await async_maybe_transform(
599
+ {"search": search}, application_list_identities_params.ApplicationListIdentitiesParams
600
+ ),
601
+ ),
602
+ cast_to=ApplicationListIdentitiesResponse,
603
+ )
604
+
605
+
606
+ class ApplicationsResourceWithRawResponse:
607
+ def __init__(self, applications: ApplicationsResource) -> None:
608
+ self._applications = applications
609
+
610
+ self.create = to_raw_response_wrapper(
611
+ applications.create,
612
+ )
613
+ self.retrieve = to_raw_response_wrapper(
614
+ applications.retrieve,
615
+ )
616
+ self.list = to_raw_response_wrapper(
617
+ applications.list,
618
+ )
619
+ self.delete = to_raw_response_wrapper(
620
+ applications.delete,
621
+ )
622
+ self.create_identity_token = to_raw_response_wrapper(
623
+ applications.create_identity_token,
624
+ )
625
+ self.list_identities = to_raw_response_wrapper(
626
+ applications.list_identities,
627
+ )
628
+
629
+ @cached_property
630
+ def auth_flows(self) -> AuthFlowsResourceWithRawResponse:
631
+ return AuthFlowsResourceWithRawResponse(self._applications.auth_flows)
632
+
633
+
634
+ class AsyncApplicationsResourceWithRawResponse:
635
+ def __init__(self, applications: AsyncApplicationsResource) -> None:
636
+ self._applications = applications
637
+
638
+ self.create = async_to_raw_response_wrapper(
639
+ applications.create,
640
+ )
641
+ self.retrieve = async_to_raw_response_wrapper(
642
+ applications.retrieve,
643
+ )
644
+ self.list = async_to_raw_response_wrapper(
645
+ applications.list,
646
+ )
647
+ self.delete = async_to_raw_response_wrapper(
648
+ applications.delete,
649
+ )
650
+ self.create_identity_token = async_to_raw_response_wrapper(
651
+ applications.create_identity_token,
652
+ )
653
+ self.list_identities = async_to_raw_response_wrapper(
654
+ applications.list_identities,
655
+ )
656
+
657
+ @cached_property
658
+ def auth_flows(self) -> AsyncAuthFlowsResourceWithRawResponse:
659
+ return AsyncAuthFlowsResourceWithRawResponse(self._applications.auth_flows)
660
+
661
+
662
+ class ApplicationsResourceWithStreamingResponse:
663
+ def __init__(self, applications: ApplicationsResource) -> None:
664
+ self._applications = applications
665
+
666
+ self.create = to_streamed_response_wrapper(
667
+ applications.create,
668
+ )
669
+ self.retrieve = to_streamed_response_wrapper(
670
+ applications.retrieve,
671
+ )
672
+ self.list = to_streamed_response_wrapper(
673
+ applications.list,
674
+ )
675
+ self.delete = to_streamed_response_wrapper(
676
+ applications.delete,
677
+ )
678
+ self.create_identity_token = to_streamed_response_wrapper(
679
+ applications.create_identity_token,
680
+ )
681
+ self.list_identities = to_streamed_response_wrapper(
682
+ applications.list_identities,
683
+ )
684
+
685
+ @cached_property
686
+ def auth_flows(self) -> AuthFlowsResourceWithStreamingResponse:
687
+ return AuthFlowsResourceWithStreamingResponse(self._applications.auth_flows)
688
+
689
+
690
+ class AsyncApplicationsResourceWithStreamingResponse:
691
+ def __init__(self, applications: AsyncApplicationsResource) -> None:
692
+ self._applications = applications
693
+
694
+ self.create = async_to_streamed_response_wrapper(
695
+ applications.create,
696
+ )
697
+ self.retrieve = async_to_streamed_response_wrapper(
698
+ applications.retrieve,
699
+ )
700
+ self.list = async_to_streamed_response_wrapper(
701
+ applications.list,
702
+ )
703
+ self.delete = async_to_streamed_response_wrapper(
704
+ applications.delete,
705
+ )
706
+ self.create_identity_token = async_to_streamed_response_wrapper(
707
+ applications.create_identity_token,
708
+ )
709
+ self.list_identities = async_to_streamed_response_wrapper(
710
+ applications.list_identities,
711
+ )
712
+
713
+ @cached_property
714
+ def auth_flows(self) -> AsyncAuthFlowsResourceWithStreamingResponse:
715
+ return AsyncAuthFlowsResourceWithStreamingResponse(self._applications.auth_flows)