growsurf-python 1.1.2__py3-none-any.whl → 1.2.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.
- growsurf/_client.py +45 -8
- growsurf/_version.py +1 -1
- growsurf/resources/__init__.py +14 -0
- growsurf/resources/account.py +45 -432
- growsurf/resources/campaign/campaign.py +2 -2
- growsurf/resources/campaign/participant.py +4 -4
- growsurf/resources/team.py +323 -0
- growsurf/types/__init__.py +2 -2
- growsurf/types/create_account_response.py +8 -6
- growsurf/types/{account.py → team.py} +6 -17
- growsurf/types/team_update_params.py +10 -0
- {growsurf_python-1.1.2.dist-info → growsurf_python-1.2.0.dist-info}/METADATA +1 -1
- {growsurf_python-1.1.2.dist-info → growsurf_python-1.2.0.dist-info}/RECORD +15 -14
- growsurf/types/account_update_params.py +0 -17
- {growsurf_python-1.1.2.dist-info → growsurf_python-1.2.0.dist-info}/WHEEL +0 -0
- {growsurf_python-1.1.2.dist-info → growsurf_python-1.2.0.dist-info}/licenses/LICENSE +0 -0
growsurf/_client.py
CHANGED
|
@@ -28,7 +28,7 @@ from ._compat import cached_property
|
|
|
28
28
|
from ._models import SecurityOptions
|
|
29
29
|
from ._version import __version__
|
|
30
30
|
from ._streaming import Stream as Stream, AsyncStream as AsyncStream
|
|
31
|
-
from ._exceptions import
|
|
31
|
+
from ._exceptions import APIStatusError
|
|
32
32
|
from ._base_client import (
|
|
33
33
|
DEFAULT_MAX_RETRIES,
|
|
34
34
|
SyncAPIClient,
|
|
@@ -36,7 +36,8 @@ from ._base_client import (
|
|
|
36
36
|
)
|
|
37
37
|
|
|
38
38
|
if TYPE_CHECKING:
|
|
39
|
-
from .resources import account, campaign
|
|
39
|
+
from .resources import team, account, campaign
|
|
40
|
+
from .resources.team import TeamResource, AsyncTeamResource
|
|
40
41
|
from .resources.account import AccountResource, AsyncAccountResource
|
|
41
42
|
from .resources.campaign.campaign import CampaignResource, AsyncCampaignResource
|
|
42
43
|
|
|
@@ -86,9 +87,7 @@ class Growsurf(SyncAPIClient):
|
|
|
86
87
|
if api_key is None:
|
|
87
88
|
api_key = os.environ.get("GROWSURF_API_KEY")
|
|
88
89
|
if api_key is None:
|
|
89
|
-
|
|
90
|
-
"The api_key client option must be set either by passing api_key to the client or by setting the GROWSURF_API_KEY environment variable"
|
|
91
|
-
)
|
|
90
|
+
api_key = ""
|
|
92
91
|
self.api_key = api_key
|
|
93
92
|
|
|
94
93
|
if base_url is None:
|
|
@@ -123,6 +122,12 @@ class Growsurf(SyncAPIClient):
|
|
|
123
122
|
|
|
124
123
|
return AccountResource(self)
|
|
125
124
|
|
|
125
|
+
@cached_property
|
|
126
|
+
def team(self) -> TeamResource:
|
|
127
|
+
from .resources.team import TeamResource
|
|
128
|
+
|
|
129
|
+
return TeamResource(self)
|
|
130
|
+
|
|
126
131
|
@cached_property
|
|
127
132
|
def campaign(self) -> CampaignResource:
|
|
128
133
|
from .resources.campaign import CampaignResource
|
|
@@ -153,6 +158,8 @@ class Growsurf(SyncAPIClient):
|
|
|
153
158
|
@property
|
|
154
159
|
def _api_key_auth(self) -> dict[str, str]:
|
|
155
160
|
api_key = self.api_key
|
|
161
|
+
if not api_key:
|
|
162
|
+
return {}
|
|
156
163
|
return {"Authorization": f"Bearer {api_key}"}
|
|
157
164
|
|
|
158
165
|
@property
|
|
@@ -283,9 +290,7 @@ class AsyncGrowsurf(AsyncAPIClient):
|
|
|
283
290
|
if api_key is None:
|
|
284
291
|
api_key = os.environ.get("GROWSURF_API_KEY")
|
|
285
292
|
if api_key is None:
|
|
286
|
-
|
|
287
|
-
"The api_key client option must be set either by passing api_key to the client or by setting the GROWSURF_API_KEY environment variable"
|
|
288
|
-
)
|
|
293
|
+
api_key = ""
|
|
289
294
|
self.api_key = api_key
|
|
290
295
|
|
|
291
296
|
if base_url is None:
|
|
@@ -320,6 +325,12 @@ class AsyncGrowsurf(AsyncAPIClient):
|
|
|
320
325
|
|
|
321
326
|
return AsyncAccountResource(self)
|
|
322
327
|
|
|
328
|
+
@cached_property
|
|
329
|
+
def team(self) -> AsyncTeamResource:
|
|
330
|
+
from .resources.team import AsyncTeamResource
|
|
331
|
+
|
|
332
|
+
return AsyncTeamResource(self)
|
|
333
|
+
|
|
323
334
|
@cached_property
|
|
324
335
|
def campaign(self) -> AsyncCampaignResource:
|
|
325
336
|
from .resources.campaign import AsyncCampaignResource
|
|
@@ -350,6 +361,8 @@ class AsyncGrowsurf(AsyncAPIClient):
|
|
|
350
361
|
@property
|
|
351
362
|
def _api_key_auth(self) -> dict[str, str]:
|
|
352
363
|
api_key = self.api_key
|
|
364
|
+
if not api_key:
|
|
365
|
+
return {}
|
|
353
366
|
return {"Authorization": f"Bearer {api_key}"}
|
|
354
367
|
|
|
355
368
|
@property
|
|
@@ -458,6 +471,12 @@ class GrowsurfWithRawResponse:
|
|
|
458
471
|
|
|
459
472
|
return AccountResourceWithRawResponse(self._client.account)
|
|
460
473
|
|
|
474
|
+
@cached_property
|
|
475
|
+
def team(self) -> team.TeamResourceWithRawResponse:
|
|
476
|
+
from .resources.team import TeamResourceWithRawResponse
|
|
477
|
+
|
|
478
|
+
return TeamResourceWithRawResponse(self._client.team)
|
|
479
|
+
|
|
461
480
|
@cached_property
|
|
462
481
|
def campaign(self) -> campaign.CampaignResourceWithRawResponse:
|
|
463
482
|
from .resources.campaign import CampaignResourceWithRawResponse
|
|
@@ -477,6 +496,12 @@ class AsyncGrowsurfWithRawResponse:
|
|
|
477
496
|
|
|
478
497
|
return AsyncAccountResourceWithRawResponse(self._client.account)
|
|
479
498
|
|
|
499
|
+
@cached_property
|
|
500
|
+
def team(self) -> team.AsyncTeamResourceWithRawResponse:
|
|
501
|
+
from .resources.team import AsyncTeamResourceWithRawResponse
|
|
502
|
+
|
|
503
|
+
return AsyncTeamResourceWithRawResponse(self._client.team)
|
|
504
|
+
|
|
480
505
|
@cached_property
|
|
481
506
|
def campaign(self) -> campaign.AsyncCampaignResourceWithRawResponse:
|
|
482
507
|
from .resources.campaign import AsyncCampaignResourceWithRawResponse
|
|
@@ -496,6 +521,12 @@ class GrowsurfWithStreamedResponse:
|
|
|
496
521
|
|
|
497
522
|
return AccountResourceWithStreamingResponse(self._client.account)
|
|
498
523
|
|
|
524
|
+
@cached_property
|
|
525
|
+
def team(self) -> team.TeamResourceWithStreamingResponse:
|
|
526
|
+
from .resources.team import TeamResourceWithStreamingResponse
|
|
527
|
+
|
|
528
|
+
return TeamResourceWithStreamingResponse(self._client.team)
|
|
529
|
+
|
|
499
530
|
@cached_property
|
|
500
531
|
def campaign(self) -> campaign.CampaignResourceWithStreamingResponse:
|
|
501
532
|
from .resources.campaign import CampaignResourceWithStreamingResponse
|
|
@@ -515,6 +546,12 @@ class AsyncGrowsurfWithStreamedResponse:
|
|
|
515
546
|
|
|
516
547
|
return AsyncAccountResourceWithStreamingResponse(self._client.account)
|
|
517
548
|
|
|
549
|
+
@cached_property
|
|
550
|
+
def team(self) -> team.AsyncTeamResourceWithStreamingResponse:
|
|
551
|
+
from .resources.team import AsyncTeamResourceWithStreamingResponse
|
|
552
|
+
|
|
553
|
+
return AsyncTeamResourceWithStreamingResponse(self._client.team)
|
|
554
|
+
|
|
518
555
|
@cached_property
|
|
519
556
|
def campaign(self) -> campaign.AsyncCampaignResourceWithStreamingResponse:
|
|
520
557
|
from .resources.campaign import AsyncCampaignResourceWithStreamingResponse
|
growsurf/_version.py
CHANGED
growsurf/resources/__init__.py
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
+
from .team import (
|
|
4
|
+
TeamResource,
|
|
5
|
+
AsyncTeamResource,
|
|
6
|
+
TeamResourceWithRawResponse,
|
|
7
|
+
AsyncTeamResourceWithRawResponse,
|
|
8
|
+
TeamResourceWithStreamingResponse,
|
|
9
|
+
AsyncTeamResourceWithStreamingResponse,
|
|
10
|
+
)
|
|
3
11
|
from .account import (
|
|
4
12
|
AccountResource,
|
|
5
13
|
AsyncAccountResource,
|
|
@@ -24,6 +32,12 @@ __all__ = [
|
|
|
24
32
|
"AsyncAccountResourceWithRawResponse",
|
|
25
33
|
"AccountResourceWithStreamingResponse",
|
|
26
34
|
"AsyncAccountResourceWithStreamingResponse",
|
|
35
|
+
"TeamResource",
|
|
36
|
+
"AsyncTeamResource",
|
|
37
|
+
"TeamResourceWithRawResponse",
|
|
38
|
+
"AsyncTeamResourceWithRawResponse",
|
|
39
|
+
"TeamResourceWithStreamingResponse",
|
|
40
|
+
"AsyncTeamResourceWithStreamingResponse",
|
|
27
41
|
"CampaignResource",
|
|
28
42
|
"AsyncCampaignResource",
|
|
29
43
|
"CampaignResourceWithRawResponse",
|
growsurf/resources/account.py
CHANGED
|
@@ -4,7 +4,7 @@ from __future__ import annotations
|
|
|
4
4
|
|
|
5
5
|
import httpx
|
|
6
6
|
|
|
7
|
-
from ..types import account_create_params
|
|
7
|
+
from ..types import account_create_params
|
|
8
8
|
from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
|
|
9
9
|
from .._utils import maybe_transform, async_maybe_transform
|
|
10
10
|
from .._compat import cached_property
|
|
@@ -16,34 +16,22 @@ from .._response import (
|
|
|
16
16
|
async_to_streamed_response_wrapper,
|
|
17
17
|
)
|
|
18
18
|
from .._base_client import make_request_options
|
|
19
|
-
from ..types.account import Account
|
|
20
19
|
from ..types.create_account_response import CreateAccountResponse
|
|
21
|
-
from ..types.rotate_api_key_response import RotateApiKeyResponse
|
|
22
|
-
from ..types.verification_email_response import VerificationEmailResponse
|
|
23
20
|
|
|
24
21
|
__all__ = ["AccountResource", "AsyncAccountResource"]
|
|
25
22
|
|
|
26
23
|
|
|
27
24
|
class AccountResource(SyncAPIResource):
|
|
28
|
-
"""
|
|
25
|
+
"""Create a GrowSurf account and its initial API key."""
|
|
29
26
|
|
|
30
27
|
@cached_property
|
|
31
28
|
def with_raw_response(self) -> AccountResourceWithRawResponse:
|
|
32
|
-
"""
|
|
33
|
-
This property can be used as a prefix for any HTTP method call to return
|
|
34
|
-
the raw response object instead of the parsed content.
|
|
35
|
-
|
|
36
|
-
For more information, see https://www.github.com/growsurf/growsurf-python#accessing-raw-response-data-eg-headers
|
|
37
|
-
"""
|
|
29
|
+
"""Return the raw response object instead of parsed content."""
|
|
38
30
|
return AccountResourceWithRawResponse(self)
|
|
39
31
|
|
|
40
32
|
@cached_property
|
|
41
33
|
def with_streaming_response(self) -> AccountResourceWithStreamingResponse:
|
|
42
|
-
"""
|
|
43
|
-
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
44
|
-
|
|
45
|
-
For more information, see https://www.github.com/growsurf/growsurf-python#with_streaming_response
|
|
46
|
-
"""
|
|
34
|
+
"""Stream the response instead of reading it eagerly."""
|
|
47
35
|
return AccountResourceWithStreamingResponse(self)
|
|
48
36
|
|
|
49
37
|
def create(
|
|
@@ -53,34 +41,25 @@ class AccountResource(SyncAPIResource):
|
|
|
53
41
|
company: str | Omit = omit,
|
|
54
42
|
first_name: str | Omit = omit,
|
|
55
43
|
last_name: str | Omit = omit,
|
|
56
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
57
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
58
44
|
extra_headers: Headers | None = None,
|
|
59
45
|
extra_query: Query | None = None,
|
|
60
46
|
extra_body: Body | None = None,
|
|
61
47
|
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
62
48
|
) -> CreateAccountResponse:
|
|
63
|
-
"""
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
The response includes an API key for the new account, shown once in the
|
|
69
|
-
response. The key is locked until the account's email address is verified:
|
|
70
|
-
authenticated endpoints outside the Accounts group return a `403` with error
|
|
71
|
-
code `EMAIL_NOT_VERIFIED_ERROR`
|
|
72
|
-
until then (resend the email via the resend-verification-email endpoint, then
|
|
73
|
-
retry). A welcome email is sent to the address with the verification link and a
|
|
74
|
-
set-password link for dashboard access. Accounts whose email is never verified
|
|
75
|
-
are deleted automatically after 7 days. For security, the API key is rotated
|
|
76
|
-
the first time the account owner signs in to the GrowSurf dashboard. Some
|
|
77
|
-
actions (such as emailing participants) additionally require the GrowSurf team
|
|
78
|
-
to verify the account first. By creating an account you agree, on behalf of the
|
|
79
|
-
account holder, to GrowSurf's [Terms of Service](https://growsurf.com/terms) and
|
|
80
|
-
[Privacy Policy](https://growsurf.com/privacy).
|
|
49
|
+
"""Create a GrowSurf account and return its one-time API key.
|
|
50
|
+
|
|
51
|
+
The key is locked until the team owner's email address is verified and rotates the
|
|
52
|
+
first time the account owner signs in to the GrowSurf dashboard. Accounts whose
|
|
53
|
+
email is never verified are deleted automatically after 7 days.
|
|
81
54
|
|
|
82
55
|
Args:
|
|
83
|
-
email: The email address for the new account. Personal emails and disposable email addresses are not accepted.
|
|
56
|
+
email: The email address for the new GrowSurf account. Personal emails and disposable email addresses are not accepted.
|
|
57
|
+
|
|
58
|
+
company: Company name for the new account.
|
|
59
|
+
|
|
60
|
+
first_name: First name for the new account owner.
|
|
61
|
+
|
|
62
|
+
last_name: Last name for the new account owner.
|
|
84
63
|
|
|
85
64
|
extra_headers: Send extra headers
|
|
86
65
|
|
|
@@ -102,174 +81,27 @@ class AccountResource(SyncAPIResource):
|
|
|
102
81
|
account_create_params.AccountCreateParams,
|
|
103
82
|
),
|
|
104
83
|
options=make_request_options(
|
|
105
|
-
extra_headers=extra_headers,
|
|
84
|
+
extra_headers=extra_headers,
|
|
85
|
+
extra_query=extra_query,
|
|
86
|
+
extra_body=extra_body,
|
|
87
|
+
timeout=timeout,
|
|
88
|
+
security={"api_key_auth": False},
|
|
106
89
|
),
|
|
107
90
|
cast_to=CreateAccountResponse,
|
|
108
91
|
)
|
|
109
92
|
|
|
110
|
-
def retrieve(
|
|
111
|
-
self,
|
|
112
|
-
*,
|
|
113
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
114
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
115
|
-
extra_headers: Headers | None = None,
|
|
116
|
-
extra_query: Query | None = None,
|
|
117
|
-
extra_body: Body | None = None,
|
|
118
|
-
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
119
|
-
) -> Account:
|
|
120
|
-
"""
|
|
121
|
-
Retrieves your GrowSurf account — profile and GrowSurf-team verification state.
|
|
122
|
-
`verificationStatus` is `VERIFIED` once the GrowSurf team has verified the
|
|
123
|
-
account — this is required before you can send participant emails from a program.
|
|
124
|
-
"""
|
|
125
|
-
return self._get(
|
|
126
|
-
"/account",
|
|
127
|
-
options=make_request_options(
|
|
128
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
129
|
-
),
|
|
130
|
-
cast_to=Account,
|
|
131
|
-
)
|
|
132
|
-
|
|
133
|
-
def update(
|
|
134
|
-
self,
|
|
135
|
-
*,
|
|
136
|
-
company: str | Omit = omit,
|
|
137
|
-
first_name: str | Omit = omit,
|
|
138
|
-
last_name: str | Omit = omit,
|
|
139
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
140
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
141
|
-
extra_headers: Headers | None = None,
|
|
142
|
-
extra_query: Query | None = None,
|
|
143
|
-
extra_body: Body | None = None,
|
|
144
|
-
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
145
|
-
) -> Account:
|
|
146
|
-
"""
|
|
147
|
-
Updates your own account profile (`first_name`, `last_name`, `company`). Any
|
|
148
|
-
other property is rejected with a `400` — in particular, the account `email`
|
|
149
|
-
cannot be changed via the API, and billing/subscription is not editable here.
|
|
150
|
-
|
|
151
|
-
Args:
|
|
152
|
-
extra_headers: Send extra headers
|
|
153
|
-
|
|
154
|
-
extra_query: Add additional query parameters to the request
|
|
155
|
-
|
|
156
|
-
extra_body: Add additional JSON properties to the request
|
|
157
|
-
|
|
158
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
|
159
|
-
"""
|
|
160
|
-
return self._patch(
|
|
161
|
-
"/account",
|
|
162
|
-
body=maybe_transform(
|
|
163
|
-
{
|
|
164
|
-
"company": company,
|
|
165
|
-
"first_name": first_name,
|
|
166
|
-
"last_name": last_name,
|
|
167
|
-
},
|
|
168
|
-
account_update_params.AccountUpdateParams,
|
|
169
|
-
),
|
|
170
|
-
options=make_request_options(
|
|
171
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
172
|
-
),
|
|
173
|
-
cast_to=Account,
|
|
174
|
-
)
|
|
175
|
-
|
|
176
|
-
def rotate_api_key(
|
|
177
|
-
self,
|
|
178
|
-
*,
|
|
179
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
180
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
181
|
-
extra_headers: Headers | None = None,
|
|
182
|
-
extra_query: Query | None = None,
|
|
183
|
-
extra_body: Body | None = None,
|
|
184
|
-
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
185
|
-
) -> RotateApiKeyResponse:
|
|
186
|
-
"""
|
|
187
|
-
Generates a new API key and invalidates the key used for the request.
|
|
188
|
-
|
|
189
|
-
The SDK sends a retry-safe `Idempotency-Key`, so automatic retries return the
|
|
190
|
-
same replacement. Store the returned key, then update every integration that
|
|
191
|
-
used the old key. The account owner is notified by email whenever the key is
|
|
192
|
-
rotated. Requires an API key with `api_key:rotate`. This operation is available
|
|
193
|
-
only through the REST API or a GrowSurf API SDK, not through MCP.
|
|
194
|
-
"""
|
|
195
|
-
return self._post(
|
|
196
|
-
"/account/api-key",
|
|
197
|
-
options=make_request_options(
|
|
198
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
199
|
-
),
|
|
200
|
-
cast_to=RotateApiKeyResponse,
|
|
201
|
-
)
|
|
202
|
-
|
|
203
|
-
def request_verification(
|
|
204
|
-
self,
|
|
205
|
-
*,
|
|
206
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
207
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
208
|
-
extra_headers: Headers | None = None,
|
|
209
|
-
extra_query: Query | None = None,
|
|
210
|
-
extra_body: Body | None = None,
|
|
211
|
-
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
212
|
-
) -> Account:
|
|
213
|
-
"""
|
|
214
|
-
Requests GrowSurf-team verification of your account (required before a program can
|
|
215
|
-
email its participants). Idempotent — calling it again while a request is pending
|
|
216
|
-
does not create a duplicate. Returns the account with its updated
|
|
217
|
-
`verificationStatus`.
|
|
218
|
-
"""
|
|
219
|
-
return self._post(
|
|
220
|
-
"/account/verification-request",
|
|
221
|
-
options=make_request_options(
|
|
222
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
223
|
-
),
|
|
224
|
-
cast_to=Account,
|
|
225
|
-
)
|
|
226
|
-
|
|
227
|
-
def resend_verification_email(
|
|
228
|
-
self,
|
|
229
|
-
*,
|
|
230
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
231
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
232
|
-
extra_headers: Headers | None = None,
|
|
233
|
-
extra_query: Query | None = None,
|
|
234
|
-
extra_body: Body | None = None,
|
|
235
|
-
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
236
|
-
) -> VerificationEmailResponse:
|
|
237
|
-
"""
|
|
238
|
-
Resends the email-verification email to the account's email address.
|
|
239
|
-
|
|
240
|
-
A `200` with `status: 'SENT'` is only returned when an email was actually
|
|
241
|
-
dispatched. Returns a `400` if the email is already verified, or a `429` if a
|
|
242
|
-
verification email was sent too recently — wait a moment, then retry.
|
|
243
|
-
"""
|
|
244
|
-
return self._post(
|
|
245
|
-
"/account/verification-email",
|
|
246
|
-
options=make_request_options(
|
|
247
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
248
|
-
),
|
|
249
|
-
cast_to=VerificationEmailResponse,
|
|
250
|
-
)
|
|
251
|
-
|
|
252
93
|
|
|
253
94
|
class AsyncAccountResource(AsyncAPIResource):
|
|
254
|
-
"""
|
|
95
|
+
"""Create a GrowSurf account and its initial API key."""
|
|
255
96
|
|
|
256
97
|
@cached_property
|
|
257
98
|
def with_raw_response(self) -> AsyncAccountResourceWithRawResponse:
|
|
258
|
-
"""
|
|
259
|
-
This property can be used as a prefix for any HTTP method call to return
|
|
260
|
-
the raw response object instead of the parsed content.
|
|
261
|
-
|
|
262
|
-
For more information, see https://www.github.com/growsurf/growsurf-python#accessing-raw-response-data-eg-headers
|
|
263
|
-
"""
|
|
99
|
+
"""Return the raw response object instead of parsed content."""
|
|
264
100
|
return AsyncAccountResourceWithRawResponse(self)
|
|
265
101
|
|
|
266
102
|
@cached_property
|
|
267
103
|
def with_streaming_response(self) -> AsyncAccountResourceWithStreamingResponse:
|
|
268
|
-
"""
|
|
269
|
-
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
270
|
-
|
|
271
|
-
For more information, see https://www.github.com/growsurf/growsurf-python#with_streaming_response
|
|
272
|
-
"""
|
|
104
|
+
"""Stream the response instead of reading it eagerly."""
|
|
273
105
|
return AsyncAccountResourceWithStreamingResponse(self)
|
|
274
106
|
|
|
275
107
|
async def create(
|
|
@@ -279,34 +111,25 @@ class AsyncAccountResource(AsyncAPIResource):
|
|
|
279
111
|
company: str | Omit = omit,
|
|
280
112
|
first_name: str | Omit = omit,
|
|
281
113
|
last_name: str | Omit = omit,
|
|
282
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
283
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
284
114
|
extra_headers: Headers | None = None,
|
|
285
115
|
extra_query: Query | None = None,
|
|
286
116
|
extra_body: Body | None = None,
|
|
287
117
|
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
288
118
|
) -> CreateAccountResponse:
|
|
289
|
-
"""
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
The response includes an API key for the new account, shown once in the
|
|
295
|
-
response. The key is locked until the account's email address is verified:
|
|
296
|
-
authenticated endpoints outside the Accounts group return a `403` with error
|
|
297
|
-
code `EMAIL_NOT_VERIFIED_ERROR`
|
|
298
|
-
until then (resend the email via the resend-verification-email endpoint, then
|
|
299
|
-
retry). A welcome email is sent to the address with the verification link and a
|
|
300
|
-
set-password link for dashboard access. Accounts whose email is never verified
|
|
301
|
-
are deleted automatically after 7 days. For security, the API key is rotated
|
|
302
|
-
the first time the account owner signs in to the GrowSurf dashboard. Some
|
|
303
|
-
actions (such as emailing participants) additionally require the GrowSurf team
|
|
304
|
-
to verify the account first. By creating an account you agree, on behalf of the
|
|
305
|
-
account holder, to GrowSurf's [Terms of Service](https://growsurf.com/terms) and
|
|
306
|
-
[Privacy Policy](https://growsurf.com/privacy).
|
|
119
|
+
"""Create a GrowSurf account and return its one-time API key.
|
|
120
|
+
|
|
121
|
+
The key is locked until the team owner's email address is verified and rotates the
|
|
122
|
+
first time the account owner signs in to the GrowSurf dashboard. Accounts whose
|
|
123
|
+
email is never verified are deleted automatically after 7 days.
|
|
307
124
|
|
|
308
125
|
Args:
|
|
309
|
-
email: The email address for the new account. Personal emails and disposable email addresses are not accepted.
|
|
126
|
+
email: The email address for the new GrowSurf account. Personal emails and disposable email addresses are not accepted.
|
|
127
|
+
|
|
128
|
+
company: Company name for the new account.
|
|
129
|
+
|
|
130
|
+
first_name: First name for the new account owner.
|
|
131
|
+
|
|
132
|
+
last_name: Last name for the new account owner.
|
|
310
133
|
|
|
311
134
|
extra_headers: Send extra headers
|
|
312
135
|
|
|
@@ -328,245 +151,35 @@ class AsyncAccountResource(AsyncAPIResource):
|
|
|
328
151
|
account_create_params.AccountCreateParams,
|
|
329
152
|
),
|
|
330
153
|
options=make_request_options(
|
|
331
|
-
extra_headers=extra_headers,
|
|
154
|
+
extra_headers=extra_headers,
|
|
155
|
+
extra_query=extra_query,
|
|
156
|
+
extra_body=extra_body,
|
|
157
|
+
timeout=timeout,
|
|
158
|
+
security={"api_key_auth": False},
|
|
332
159
|
),
|
|
333
160
|
cast_to=CreateAccountResponse,
|
|
334
161
|
)
|
|
335
162
|
|
|
336
|
-
async def retrieve(
|
|
337
|
-
self,
|
|
338
|
-
*,
|
|
339
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
340
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
341
|
-
extra_headers: Headers | None = None,
|
|
342
|
-
extra_query: Query | None = None,
|
|
343
|
-
extra_body: Body | None = None,
|
|
344
|
-
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
345
|
-
) -> Account:
|
|
346
|
-
"""
|
|
347
|
-
Retrieves your GrowSurf account — profile and GrowSurf-team verification state.
|
|
348
|
-
`verificationStatus` is `VERIFIED` once the GrowSurf team has verified the
|
|
349
|
-
account — this is required before you can send participant emails from a program.
|
|
350
|
-
"""
|
|
351
|
-
return await self._get(
|
|
352
|
-
"/account",
|
|
353
|
-
options=make_request_options(
|
|
354
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
355
|
-
),
|
|
356
|
-
cast_to=Account,
|
|
357
|
-
)
|
|
358
|
-
|
|
359
|
-
async def update(
|
|
360
|
-
self,
|
|
361
|
-
*,
|
|
362
|
-
company: str | Omit = omit,
|
|
363
|
-
first_name: str | Omit = omit,
|
|
364
|
-
last_name: str | Omit = omit,
|
|
365
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
366
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
367
|
-
extra_headers: Headers | None = None,
|
|
368
|
-
extra_query: Query | None = None,
|
|
369
|
-
extra_body: Body | None = None,
|
|
370
|
-
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
371
|
-
) -> Account:
|
|
372
|
-
"""
|
|
373
|
-
Updates your own account profile (`first_name`, `last_name`, `company`). Any
|
|
374
|
-
other property is rejected with a `400` — in particular, the account `email`
|
|
375
|
-
cannot be changed via the API, and billing/subscription is not editable here.
|
|
376
|
-
|
|
377
|
-
Args:
|
|
378
|
-
extra_headers: Send extra headers
|
|
379
|
-
|
|
380
|
-
extra_query: Add additional query parameters to the request
|
|
381
|
-
|
|
382
|
-
extra_body: Add additional JSON properties to the request
|
|
383
|
-
|
|
384
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
|
385
|
-
"""
|
|
386
|
-
return await self._patch(
|
|
387
|
-
"/account",
|
|
388
|
-
body=await async_maybe_transform(
|
|
389
|
-
{
|
|
390
|
-
"company": company,
|
|
391
|
-
"first_name": first_name,
|
|
392
|
-
"last_name": last_name,
|
|
393
|
-
},
|
|
394
|
-
account_update_params.AccountUpdateParams,
|
|
395
|
-
),
|
|
396
|
-
options=make_request_options(
|
|
397
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
398
|
-
),
|
|
399
|
-
cast_to=Account,
|
|
400
|
-
)
|
|
401
|
-
|
|
402
|
-
async def rotate_api_key(
|
|
403
|
-
self,
|
|
404
|
-
*,
|
|
405
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
406
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
407
|
-
extra_headers: Headers | None = None,
|
|
408
|
-
extra_query: Query | None = None,
|
|
409
|
-
extra_body: Body | None = None,
|
|
410
|
-
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
411
|
-
) -> RotateApiKeyResponse:
|
|
412
|
-
"""
|
|
413
|
-
Generates a new API key and invalidates the key used for the request.
|
|
414
|
-
|
|
415
|
-
The SDK sends a retry-safe `Idempotency-Key`, so automatic retries return the
|
|
416
|
-
same replacement. Store the returned key, then update every integration that
|
|
417
|
-
used the old key. The account owner is notified by email whenever the key is
|
|
418
|
-
rotated. Requires an API key with `api_key:rotate`. This operation is available
|
|
419
|
-
only through the REST API or a GrowSurf API SDK, not through MCP.
|
|
420
|
-
"""
|
|
421
|
-
return await self._post(
|
|
422
|
-
"/account/api-key",
|
|
423
|
-
options=make_request_options(
|
|
424
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
425
|
-
),
|
|
426
|
-
cast_to=RotateApiKeyResponse,
|
|
427
|
-
)
|
|
428
|
-
|
|
429
|
-
async def request_verification(
|
|
430
|
-
self,
|
|
431
|
-
*,
|
|
432
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
433
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
434
|
-
extra_headers: Headers | None = None,
|
|
435
|
-
extra_query: Query | None = None,
|
|
436
|
-
extra_body: Body | None = None,
|
|
437
|
-
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
438
|
-
) -> Account:
|
|
439
|
-
"""
|
|
440
|
-
Requests GrowSurf-team verification of your account (required before a program can
|
|
441
|
-
email its participants). Idempotent — calling it again while a request is pending
|
|
442
|
-
does not create a duplicate. Returns the account with its updated
|
|
443
|
-
`verificationStatus`.
|
|
444
|
-
"""
|
|
445
|
-
return await self._post(
|
|
446
|
-
"/account/verification-request",
|
|
447
|
-
options=make_request_options(
|
|
448
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
449
|
-
),
|
|
450
|
-
cast_to=Account,
|
|
451
|
-
)
|
|
452
|
-
|
|
453
|
-
async def resend_verification_email(
|
|
454
|
-
self,
|
|
455
|
-
*,
|
|
456
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
457
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
458
|
-
extra_headers: Headers | None = None,
|
|
459
|
-
extra_query: Query | None = None,
|
|
460
|
-
extra_body: Body | None = None,
|
|
461
|
-
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
462
|
-
) -> VerificationEmailResponse:
|
|
463
|
-
"""
|
|
464
|
-
Resends the email-verification email to the account's email address.
|
|
465
|
-
|
|
466
|
-
A `200` with `status: 'SENT'` is only returned when an email was actually
|
|
467
|
-
dispatched. Returns a `400` if the email is already verified, or a `429` if a
|
|
468
|
-
verification email was sent too recently — wait a moment, then retry.
|
|
469
|
-
"""
|
|
470
|
-
return await self._post(
|
|
471
|
-
"/account/verification-email",
|
|
472
|
-
options=make_request_options(
|
|
473
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
474
|
-
),
|
|
475
|
-
cast_to=VerificationEmailResponse,
|
|
476
|
-
)
|
|
477
|
-
|
|
478
163
|
|
|
479
164
|
class AccountResourceWithRawResponse:
|
|
480
165
|
def __init__(self, account: AccountResource) -> None:
|
|
481
166
|
self._account = account
|
|
482
|
-
|
|
483
|
-
self.create = to_raw_response_wrapper(
|
|
484
|
-
account.create,
|
|
485
|
-
)
|
|
486
|
-
self.retrieve = to_raw_response_wrapper(
|
|
487
|
-
account.retrieve,
|
|
488
|
-
)
|
|
489
|
-
self.update = to_raw_response_wrapper(
|
|
490
|
-
account.update,
|
|
491
|
-
)
|
|
492
|
-
self.rotate_api_key = to_raw_response_wrapper(
|
|
493
|
-
account.rotate_api_key,
|
|
494
|
-
)
|
|
495
|
-
self.request_verification = to_raw_response_wrapper(
|
|
496
|
-
account.request_verification,
|
|
497
|
-
)
|
|
498
|
-
self.resend_verification_email = to_raw_response_wrapper(
|
|
499
|
-
account.resend_verification_email,
|
|
500
|
-
)
|
|
167
|
+
self.create = to_raw_response_wrapper(account.create)
|
|
501
168
|
|
|
502
169
|
|
|
503
170
|
class AsyncAccountResourceWithRawResponse:
|
|
504
171
|
def __init__(self, account: AsyncAccountResource) -> None:
|
|
505
172
|
self._account = account
|
|
506
|
-
|
|
507
|
-
self.create = async_to_raw_response_wrapper(
|
|
508
|
-
account.create,
|
|
509
|
-
)
|
|
510
|
-
self.retrieve = async_to_raw_response_wrapper(
|
|
511
|
-
account.retrieve,
|
|
512
|
-
)
|
|
513
|
-
self.update = async_to_raw_response_wrapper(
|
|
514
|
-
account.update,
|
|
515
|
-
)
|
|
516
|
-
self.rotate_api_key = async_to_raw_response_wrapper(
|
|
517
|
-
account.rotate_api_key,
|
|
518
|
-
)
|
|
519
|
-
self.request_verification = async_to_raw_response_wrapper(
|
|
520
|
-
account.request_verification,
|
|
521
|
-
)
|
|
522
|
-
self.resend_verification_email = async_to_raw_response_wrapper(
|
|
523
|
-
account.resend_verification_email,
|
|
524
|
-
)
|
|
173
|
+
self.create = async_to_raw_response_wrapper(account.create)
|
|
525
174
|
|
|
526
175
|
|
|
527
176
|
class AccountResourceWithStreamingResponse:
|
|
528
177
|
def __init__(self, account: AccountResource) -> None:
|
|
529
178
|
self._account = account
|
|
530
|
-
|
|
531
|
-
self.create = to_streamed_response_wrapper(
|
|
532
|
-
account.create,
|
|
533
|
-
)
|
|
534
|
-
self.retrieve = to_streamed_response_wrapper(
|
|
535
|
-
account.retrieve,
|
|
536
|
-
)
|
|
537
|
-
self.update = to_streamed_response_wrapper(
|
|
538
|
-
account.update,
|
|
539
|
-
)
|
|
540
|
-
self.rotate_api_key = to_streamed_response_wrapper(
|
|
541
|
-
account.rotate_api_key,
|
|
542
|
-
)
|
|
543
|
-
self.request_verification = to_streamed_response_wrapper(
|
|
544
|
-
account.request_verification,
|
|
545
|
-
)
|
|
546
|
-
self.resend_verification_email = to_streamed_response_wrapper(
|
|
547
|
-
account.resend_verification_email,
|
|
548
|
-
)
|
|
179
|
+
self.create = to_streamed_response_wrapper(account.create)
|
|
549
180
|
|
|
550
181
|
|
|
551
182
|
class AsyncAccountResourceWithStreamingResponse:
|
|
552
183
|
def __init__(self, account: AsyncAccountResource) -> None:
|
|
553
184
|
self._account = account
|
|
554
|
-
|
|
555
|
-
self.create = async_to_streamed_response_wrapper(
|
|
556
|
-
account.create,
|
|
557
|
-
)
|
|
558
|
-
self.retrieve = async_to_streamed_response_wrapper(
|
|
559
|
-
account.retrieve,
|
|
560
|
-
)
|
|
561
|
-
self.update = async_to_streamed_response_wrapper(
|
|
562
|
-
account.update,
|
|
563
|
-
)
|
|
564
|
-
self.rotate_api_key = async_to_streamed_response_wrapper(
|
|
565
|
-
account.rotate_api_key,
|
|
566
|
-
)
|
|
567
|
-
self.request_verification = async_to_streamed_response_wrapper(
|
|
568
|
-
account.request_verification,
|
|
569
|
-
)
|
|
570
|
-
self.resend_verification_email = async_to_streamed_response_wrapper(
|
|
571
|
-
account.resend_verification_email,
|
|
572
|
-
)
|
|
185
|
+
self.create = async_to_streamed_response_wrapper(account.create)
|
|
@@ -198,7 +198,7 @@ class CampaignResource(SyncAPIResource):
|
|
|
198
198
|
"""
|
|
199
199
|
Creates a new program pre-populated with type-appropriate defaults, plus any
|
|
200
200
|
optional inline rewards. The new program is created in `DRAFT` status and owned
|
|
201
|
-
by the API key's
|
|
201
|
+
by the API key's bound team. Requires the team owner's verified email.
|
|
202
202
|
|
|
203
203
|
Args:
|
|
204
204
|
type: The program type. Immutable after creation.
|
|
@@ -900,7 +900,7 @@ class AsyncCampaignResource(AsyncAPIResource):
|
|
|
900
900
|
"""
|
|
901
901
|
Creates a new program pre-populated with type-appropriate defaults, plus any
|
|
902
902
|
optional inline rewards. The new program is created in `DRAFT` status and owned
|
|
903
|
-
by the API key's
|
|
903
|
+
by the API key's bound team. Requires the team owner's verified email.
|
|
904
904
|
|
|
905
905
|
Args:
|
|
906
906
|
type: The program type. Immutable after creation.
|
|
@@ -980,8 +980,8 @@ class ParticipantResource(SyncAPIResource):
|
|
|
980
980
|
the program's configured email templates, OR ``subject`` + ``body`` for a
|
|
981
981
|
free-form email. Free-form emails are sent with the same compliance handling
|
|
982
982
|
(company name, postal address, and an unsubscribe link are added automatically,
|
|
983
|
-
and unsubscribed participants are suppressed). Sending requires the
|
|
984
|
-
verified by
|
|
983
|
+
and unsubscribed participants are suppressed). Sending requires the team to be
|
|
984
|
+
verified by GrowSurf. Requires a verified custom email domain on the
|
|
985
985
|
program (set up in Campaign Editor > 3. Emails > Email Settings). Returns `400`
|
|
986
986
|
until one is verified. The email is accepted for delivery.
|
|
987
987
|
|
|
@@ -2099,8 +2099,8 @@ class AsyncParticipantResource(AsyncAPIResource):
|
|
|
2099
2099
|
the program's configured email templates, OR ``subject`` + ``body`` for a
|
|
2100
2100
|
free-form email. Free-form emails are sent with the same compliance handling
|
|
2101
2101
|
(company name, postal address, and an unsubscribe link are added automatically,
|
|
2102
|
-
and unsubscribed participants are suppressed). Sending requires the
|
|
2103
|
-
verified by
|
|
2102
|
+
and unsubscribed participants are suppressed). Sending requires the team to be
|
|
2103
|
+
verified by GrowSurf. Requires a verified custom email domain on the
|
|
2104
2104
|
program (set up in Campaign Editor > 3. Emails > Email Settings). Returns `400`
|
|
2105
2105
|
until one is verified. The email is accepted for delivery.
|
|
2106
2106
|
|
|
@@ -0,0 +1,323 @@
|
|
|
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 team_update_params
|
|
8
|
+
from .._types import Body, Query, Headers, NotGiven, not_given
|
|
9
|
+
from .._utils import maybe_transform, async_maybe_transform
|
|
10
|
+
from .._compat import cached_property
|
|
11
|
+
from .._resource import SyncAPIResource, AsyncAPIResource
|
|
12
|
+
from .._response import (
|
|
13
|
+
to_raw_response_wrapper,
|
|
14
|
+
to_streamed_response_wrapper,
|
|
15
|
+
async_to_raw_response_wrapper,
|
|
16
|
+
async_to_streamed_response_wrapper,
|
|
17
|
+
)
|
|
18
|
+
from ..types.team import Team
|
|
19
|
+
from .._base_client import make_request_options
|
|
20
|
+
from ..types.rotate_api_key_response import RotateApiKeyResponse
|
|
21
|
+
from ..types.verification_email_response import VerificationEmailResponse
|
|
22
|
+
|
|
23
|
+
__all__ = ["TeamResource", "AsyncTeamResource"]
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
class TeamResource(SyncAPIResource):
|
|
27
|
+
"""Operations for the team bound to the API key or OAuth connection."""
|
|
28
|
+
|
|
29
|
+
@cached_property
|
|
30
|
+
def with_raw_response(self) -> TeamResourceWithRawResponse:
|
|
31
|
+
"""Return the raw response object instead of parsed content."""
|
|
32
|
+
return TeamResourceWithRawResponse(self)
|
|
33
|
+
|
|
34
|
+
@cached_property
|
|
35
|
+
def with_streaming_response(self) -> TeamResourceWithStreamingResponse:
|
|
36
|
+
"""Stream the response instead of reading it eagerly."""
|
|
37
|
+
return TeamResourceWithStreamingResponse(self)
|
|
38
|
+
|
|
39
|
+
def retrieve(
|
|
40
|
+
self,
|
|
41
|
+
*,
|
|
42
|
+
extra_headers: Headers | None = None,
|
|
43
|
+
extra_query: Query | None = None,
|
|
44
|
+
extra_body: Body | None = None,
|
|
45
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
46
|
+
) -> Team:
|
|
47
|
+
"""Retrieve the team bound to the API key or OAuth connection.
|
|
48
|
+
|
|
49
|
+
A credential that can act across multiple teams cannot use this operation because
|
|
50
|
+
it has no single Team resource.
|
|
51
|
+
"""
|
|
52
|
+
return self._get(
|
|
53
|
+
"/team",
|
|
54
|
+
options=make_request_options(
|
|
55
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
56
|
+
),
|
|
57
|
+
cast_to=Team,
|
|
58
|
+
)
|
|
59
|
+
|
|
60
|
+
def update(
|
|
61
|
+
self,
|
|
62
|
+
*,
|
|
63
|
+
name: str,
|
|
64
|
+
extra_headers: Headers | None = None,
|
|
65
|
+
extra_query: Query | None = None,
|
|
66
|
+
extra_body: Body | None = None,
|
|
67
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
68
|
+
) -> Team:
|
|
69
|
+
"""Update the bound team's display name.
|
|
70
|
+
|
|
71
|
+
Any other property is rejected with a `400`.
|
|
72
|
+
|
|
73
|
+
Args:
|
|
74
|
+
name: The team's display name.
|
|
75
|
+
|
|
76
|
+
extra_headers: Send extra headers
|
|
77
|
+
|
|
78
|
+
extra_query: Add additional query parameters to the request
|
|
79
|
+
|
|
80
|
+
extra_body: Add additional JSON properties to the request
|
|
81
|
+
|
|
82
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
83
|
+
"""
|
|
84
|
+
return self._patch(
|
|
85
|
+
"/team",
|
|
86
|
+
body=maybe_transform({"name": name}, team_update_params.TeamUpdateParams),
|
|
87
|
+
options=make_request_options(
|
|
88
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
89
|
+
),
|
|
90
|
+
cast_to=Team,
|
|
91
|
+
)
|
|
92
|
+
|
|
93
|
+
def rotate_api_key(
|
|
94
|
+
self,
|
|
95
|
+
*,
|
|
96
|
+
extra_headers: Headers | None = None,
|
|
97
|
+
extra_query: Query | None = None,
|
|
98
|
+
extra_body: Body | None = None,
|
|
99
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
100
|
+
) -> RotateApiKeyResponse:
|
|
101
|
+
"""Rotate the API key used for this request.
|
|
102
|
+
|
|
103
|
+
The SDK sends a retry-safe `Idempotency-Key`, so automatic retries return the
|
|
104
|
+
same replacement. Store the new key, then update every integration that used the
|
|
105
|
+
old key. This operation is unavailable through MCP.
|
|
106
|
+
"""
|
|
107
|
+
return self._post(
|
|
108
|
+
"/api-key/rotate",
|
|
109
|
+
options=make_request_options(
|
|
110
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
111
|
+
),
|
|
112
|
+
cast_to=RotateApiKeyResponse,
|
|
113
|
+
)
|
|
114
|
+
|
|
115
|
+
def request_verification(
|
|
116
|
+
self,
|
|
117
|
+
*,
|
|
118
|
+
extra_headers: Headers | None = None,
|
|
119
|
+
extra_query: Query | None = None,
|
|
120
|
+
extra_body: Body | None = None,
|
|
121
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
122
|
+
) -> Team:
|
|
123
|
+
"""Request GrowSurf verification for the bound team.
|
|
124
|
+
|
|
125
|
+
Calling this again while a request is pending does not create a duplicate.
|
|
126
|
+
"""
|
|
127
|
+
return self._post(
|
|
128
|
+
"/team/verification-request",
|
|
129
|
+
options=make_request_options(
|
|
130
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
131
|
+
),
|
|
132
|
+
cast_to=Team,
|
|
133
|
+
)
|
|
134
|
+
|
|
135
|
+
def resend_owner_verification_email(
|
|
136
|
+
self,
|
|
137
|
+
*,
|
|
138
|
+
extra_headers: Headers | None = None,
|
|
139
|
+
extra_query: Query | None = None,
|
|
140
|
+
extra_body: Body | None = None,
|
|
141
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
142
|
+
) -> VerificationEmailResponse:
|
|
143
|
+
"""Resend the email-verification message to the bound team's owner.
|
|
144
|
+
|
|
145
|
+
The response never reveals the owner's email address.
|
|
146
|
+
"""
|
|
147
|
+
return self._post(
|
|
148
|
+
"/team/owner/verification-email",
|
|
149
|
+
options=make_request_options(
|
|
150
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
151
|
+
),
|
|
152
|
+
cast_to=VerificationEmailResponse,
|
|
153
|
+
)
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
class AsyncTeamResource(AsyncAPIResource):
|
|
157
|
+
"""Operations for the team bound to the API key or OAuth connection."""
|
|
158
|
+
|
|
159
|
+
@cached_property
|
|
160
|
+
def with_raw_response(self) -> AsyncTeamResourceWithRawResponse:
|
|
161
|
+
"""Return the raw response object instead of parsed content."""
|
|
162
|
+
return AsyncTeamResourceWithRawResponse(self)
|
|
163
|
+
|
|
164
|
+
@cached_property
|
|
165
|
+
def with_streaming_response(self) -> AsyncTeamResourceWithStreamingResponse:
|
|
166
|
+
"""Stream the response instead of reading it eagerly."""
|
|
167
|
+
return AsyncTeamResourceWithStreamingResponse(self)
|
|
168
|
+
|
|
169
|
+
async def retrieve(
|
|
170
|
+
self,
|
|
171
|
+
*,
|
|
172
|
+
extra_headers: Headers | None = None,
|
|
173
|
+
extra_query: Query | None = None,
|
|
174
|
+
extra_body: Body | None = None,
|
|
175
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
176
|
+
) -> Team:
|
|
177
|
+
"""Retrieve the team bound to the API key or OAuth connection.
|
|
178
|
+
|
|
179
|
+
A credential that can act across multiple teams cannot use this operation because
|
|
180
|
+
it has no single Team resource.
|
|
181
|
+
"""
|
|
182
|
+
return await self._get(
|
|
183
|
+
"/team",
|
|
184
|
+
options=make_request_options(
|
|
185
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
186
|
+
),
|
|
187
|
+
cast_to=Team,
|
|
188
|
+
)
|
|
189
|
+
|
|
190
|
+
async def update(
|
|
191
|
+
self,
|
|
192
|
+
*,
|
|
193
|
+
name: str,
|
|
194
|
+
extra_headers: Headers | None = None,
|
|
195
|
+
extra_query: Query | None = None,
|
|
196
|
+
extra_body: Body | None = None,
|
|
197
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
198
|
+
) -> Team:
|
|
199
|
+
"""Update the bound team's display name.
|
|
200
|
+
|
|
201
|
+
Any other property is rejected with a `400`.
|
|
202
|
+
|
|
203
|
+
Args:
|
|
204
|
+
name: The team's display name.
|
|
205
|
+
|
|
206
|
+
extra_headers: Send extra headers
|
|
207
|
+
|
|
208
|
+
extra_query: Add additional query parameters to the request
|
|
209
|
+
|
|
210
|
+
extra_body: Add additional JSON properties to the request
|
|
211
|
+
|
|
212
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
213
|
+
"""
|
|
214
|
+
return await self._patch(
|
|
215
|
+
"/team",
|
|
216
|
+
body=await async_maybe_transform({"name": name}, team_update_params.TeamUpdateParams),
|
|
217
|
+
options=make_request_options(
|
|
218
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
219
|
+
),
|
|
220
|
+
cast_to=Team,
|
|
221
|
+
)
|
|
222
|
+
|
|
223
|
+
async def rotate_api_key(
|
|
224
|
+
self,
|
|
225
|
+
*,
|
|
226
|
+
extra_headers: Headers | None = None,
|
|
227
|
+
extra_query: Query | None = None,
|
|
228
|
+
extra_body: Body | None = None,
|
|
229
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
230
|
+
) -> RotateApiKeyResponse:
|
|
231
|
+
"""Rotate the API key used for this request.
|
|
232
|
+
|
|
233
|
+
The SDK sends a retry-safe `Idempotency-Key`, so automatic retries return the
|
|
234
|
+
same replacement. Store the new key, then update every integration that used the
|
|
235
|
+
old key. This operation is unavailable through MCP.
|
|
236
|
+
"""
|
|
237
|
+
return await self._post(
|
|
238
|
+
"/api-key/rotate",
|
|
239
|
+
options=make_request_options(
|
|
240
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
241
|
+
),
|
|
242
|
+
cast_to=RotateApiKeyResponse,
|
|
243
|
+
)
|
|
244
|
+
|
|
245
|
+
async def request_verification(
|
|
246
|
+
self,
|
|
247
|
+
*,
|
|
248
|
+
extra_headers: Headers | None = None,
|
|
249
|
+
extra_query: Query | None = None,
|
|
250
|
+
extra_body: Body | None = None,
|
|
251
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
252
|
+
) -> Team:
|
|
253
|
+
"""Request GrowSurf verification for the bound team.
|
|
254
|
+
|
|
255
|
+
Calling this again while a request is pending does not create a duplicate.
|
|
256
|
+
"""
|
|
257
|
+
return await self._post(
|
|
258
|
+
"/team/verification-request",
|
|
259
|
+
options=make_request_options(
|
|
260
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
261
|
+
),
|
|
262
|
+
cast_to=Team,
|
|
263
|
+
)
|
|
264
|
+
|
|
265
|
+
async def resend_owner_verification_email(
|
|
266
|
+
self,
|
|
267
|
+
*,
|
|
268
|
+
extra_headers: Headers | None = None,
|
|
269
|
+
extra_query: Query | None = None,
|
|
270
|
+
extra_body: Body | None = None,
|
|
271
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
272
|
+
) -> VerificationEmailResponse:
|
|
273
|
+
"""Resend the email-verification message to the bound team's owner.
|
|
274
|
+
|
|
275
|
+
The response never reveals the owner's email address.
|
|
276
|
+
"""
|
|
277
|
+
return await self._post(
|
|
278
|
+
"/team/owner/verification-email",
|
|
279
|
+
options=make_request_options(
|
|
280
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
281
|
+
),
|
|
282
|
+
cast_to=VerificationEmailResponse,
|
|
283
|
+
)
|
|
284
|
+
|
|
285
|
+
|
|
286
|
+
class TeamResourceWithRawResponse:
|
|
287
|
+
def __init__(self, team: TeamResource) -> None:
|
|
288
|
+
self._team = team
|
|
289
|
+
self.retrieve = to_raw_response_wrapper(team.retrieve)
|
|
290
|
+
self.update = to_raw_response_wrapper(team.update)
|
|
291
|
+
self.rotate_api_key = to_raw_response_wrapper(team.rotate_api_key)
|
|
292
|
+
self.request_verification = to_raw_response_wrapper(team.request_verification)
|
|
293
|
+
self.resend_owner_verification_email = to_raw_response_wrapper(team.resend_owner_verification_email)
|
|
294
|
+
|
|
295
|
+
|
|
296
|
+
class AsyncTeamResourceWithRawResponse:
|
|
297
|
+
def __init__(self, team: AsyncTeamResource) -> None:
|
|
298
|
+
self._team = team
|
|
299
|
+
self.retrieve = async_to_raw_response_wrapper(team.retrieve)
|
|
300
|
+
self.update = async_to_raw_response_wrapper(team.update)
|
|
301
|
+
self.rotate_api_key = async_to_raw_response_wrapper(team.rotate_api_key)
|
|
302
|
+
self.request_verification = async_to_raw_response_wrapper(team.request_verification)
|
|
303
|
+
self.resend_owner_verification_email = async_to_raw_response_wrapper(team.resend_owner_verification_email)
|
|
304
|
+
|
|
305
|
+
|
|
306
|
+
class TeamResourceWithStreamingResponse:
|
|
307
|
+
def __init__(self, team: TeamResource) -> None:
|
|
308
|
+
self._team = team
|
|
309
|
+
self.retrieve = to_streamed_response_wrapper(team.retrieve)
|
|
310
|
+
self.update = to_streamed_response_wrapper(team.update)
|
|
311
|
+
self.rotate_api_key = to_streamed_response_wrapper(team.rotate_api_key)
|
|
312
|
+
self.request_verification = to_streamed_response_wrapper(team.request_verification)
|
|
313
|
+
self.resend_owner_verification_email = to_streamed_response_wrapper(team.resend_owner_verification_email)
|
|
314
|
+
|
|
315
|
+
|
|
316
|
+
class AsyncTeamResourceWithStreamingResponse:
|
|
317
|
+
def __init__(self, team: AsyncTeamResource) -> None:
|
|
318
|
+
self._team = team
|
|
319
|
+
self.retrieve = async_to_streamed_response_wrapper(team.retrieve)
|
|
320
|
+
self.update = async_to_streamed_response_wrapper(team.update)
|
|
321
|
+
self.rotate_api_key = async_to_streamed_response_wrapper(team.rotate_api_key)
|
|
322
|
+
self.request_verification = async_to_streamed_response_wrapper(team.request_verification)
|
|
323
|
+
self.resend_owner_verification_email = async_to_streamed_response_wrapper(team.resend_owner_verification_email)
|
growsurf/types/__init__.py
CHANGED
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
-
from .
|
|
5
|
+
from .team import Team as Team
|
|
6
6
|
from .campaign import Campaign as Campaign
|
|
7
7
|
from .referral_list import ReferralList as ReferralList
|
|
8
8
|
from .participant_list import ParticipantList as ParticipantList
|
|
9
|
+
from .team_update_params import TeamUpdateParams as TeamUpdateParams
|
|
9
10
|
from .commission_structure import CommissionStructure as CommissionStructure
|
|
10
11
|
from .account_create_params import AccountCreateParams as AccountCreateParams
|
|
11
|
-
from .account_update_params import AccountUpdateParams as AccountUpdateParams
|
|
12
12
|
from .campaign_create_params import CampaignCreateParams as CampaignCreateParams
|
|
13
13
|
from .campaign_list_response import CampaignListResponse as CampaignListResponse
|
|
14
14
|
from .campaign_update_params import CampaignUpdateParams as CampaignUpdateParams
|
|
@@ -10,17 +10,19 @@ __all__ = ["CreateAccountResponse"]
|
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
class CreateAccountResponse(BaseModel):
|
|
13
|
-
id: str
|
|
14
|
-
"""The new account's unique identifier."""
|
|
15
|
-
|
|
16
13
|
email: str
|
|
14
|
+
"""Email address for the new account."""
|
|
17
15
|
|
|
18
16
|
api_key: str = FieldInfo(alias="apiKey")
|
|
19
17
|
"""An API key for the new account.
|
|
20
18
|
|
|
21
|
-
Use it as the `Bearer` token on subsequent requests.
|
|
22
|
-
`EMAIL_NOT_VERIFIED_ERROR`) until the account's email is verified, and
|
|
23
|
-
when the account owner first signs in to the GrowSurf dashboard.
|
|
19
|
+
Use it as the `Bearer` token on subsequent requests. It is shown once, locked
|
|
20
|
+
(`403` `EMAIL_NOT_VERIFIED_ERROR`) until the account's email is verified, and
|
|
21
|
+
rotated when the account owner first signs in to the GrowSurf dashboard.
|
|
24
22
|
"""
|
|
25
23
|
|
|
26
24
|
verification_status: Literal["NOT_REQUESTED", "REQUESTED", "VERIFIED"] = FieldInfo(alias="verificationStatus")
|
|
25
|
+
"""GrowSurf team verification state.
|
|
26
|
+
|
|
27
|
+
`VERIFIED` is required before a program can send participant emails.
|
|
28
|
+
"""
|
|
@@ -7,29 +7,18 @@ from pydantic import Field as FieldInfo
|
|
|
7
7
|
|
|
8
8
|
from .._models import BaseModel
|
|
9
9
|
|
|
10
|
-
__all__ = ["
|
|
10
|
+
__all__ = ["Team"]
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
class
|
|
14
|
-
|
|
15
|
-
"""The
|
|
16
|
-
|
|
17
|
-
email: str
|
|
13
|
+
class Team(BaseModel):
|
|
14
|
+
name: str
|
|
15
|
+
"""The team's display name."""
|
|
18
16
|
|
|
19
17
|
verification_status: Literal["NOT_REQUESTED", "REQUESTED", "VERIFIED"] = FieldInfo(alias="verificationStatus")
|
|
20
|
-
"""GrowSurf
|
|
18
|
+
"""GrowSurf team verification state.
|
|
21
19
|
|
|
22
20
|
`VERIFIED` is required before a program can send participant emails.
|
|
23
21
|
"""
|
|
24
22
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
created_at: Optional[int] = FieldInfo(alias="createdAt", default=None)
|
|
28
|
-
"""When the account was created, as a Unix timestamp in milliseconds."""
|
|
29
|
-
|
|
30
|
-
first_name: Optional[str] = FieldInfo(alias="firstName", default=None)
|
|
31
|
-
|
|
32
|
-
last_name: Optional[str] = FieldInfo(alias="lastName", default=None)
|
|
33
|
-
|
|
34
|
-
verification_requested_at: Optional[int] = FieldInfo(alias="verificationRequestedAt", default=None)
|
|
23
|
+
verification_requested_at: Optional[int] = FieldInfo(alias="verificationRequestedAt")
|
|
35
24
|
"""When team verification was last requested, as a Unix timestamp in milliseconds."""
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing_extensions import Required, TypedDict
|
|
4
|
+
|
|
5
|
+
__all__ = ["TeamUpdateParams"]
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class TeamUpdateParams(TypedDict, total=False):
|
|
9
|
+
name: Required[str]
|
|
10
|
+
"""The team's display name."""
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: growsurf-python
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.2.0
|
|
4
4
|
Summary: The official Python library for the growsurf API
|
|
5
5
|
Project-URL: Homepage, https://github.com/growsurf/growsurf-python
|
|
6
6
|
Project-URL: Repository, https://github.com/growsurf/growsurf-python
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
growsurf/__init__.py,sha256=PVU29rH3G7u2LvpyJd5G00W8Saj2Cp_BNzw7JIg8068,2683
|
|
2
2
|
growsurf/_base_client.py,sha256=4kz0Jq20J5tuau3uZ9dLIBp-EotPbXDIJ5AQ4rTE7AA,74561
|
|
3
|
-
growsurf/_client.py,sha256=
|
|
3
|
+
growsurf/_client.py,sha256=hrl6UKIUtUzBwZR-vaQRrZglj5sFz8px-jJ6KVQ7y-0,20315
|
|
4
4
|
growsurf/_compat.py,sha256=_9guQfzYnL3DNtudX5W7T2cdSskx89B5AFfhPQDxMUk,6811
|
|
5
5
|
growsurf/_constants.py,sha256=S14PFzyN9-I31wiV7SmIlL5Ga0MLHxdvegInGdXH7tM,462
|
|
6
6
|
growsurf/_exceptions.py,sha256=3bEzw4WDc3VYTMnwkiOucauRjS8Vhr3L0Qb02P0ZKaE,3224
|
|
@@ -11,7 +11,7 @@ growsurf/_resource.py,sha256=oeDA0FL2ottIchoUi86M_8eUqmtrGQLYTgfKYEzrsWg,1112
|
|
|
11
11
|
growsurf/_response.py,sha256=RTZ8t27W4S6ExkCjzCg4HbcDUTCdOMgiheiMAuAxgu4,28937
|
|
12
12
|
growsurf/_streaming.py,sha256=9aJ_V6JtddntWCon2Cq_MOLMnySnhc7wuqeZx7sUtKU,10558
|
|
13
13
|
growsurf/_types.py,sha256=r8hAVihrutiLUToaJhSDys9T9sMc8BMy2qUrr3W_8Wo,7751
|
|
14
|
-
growsurf/_version.py,sha256=
|
|
14
|
+
growsurf/_version.py,sha256=OWpo4konL_MQCWCiNFp1FuwA_WcSPNEK3iIIKN7x7aM,160
|
|
15
15
|
growsurf/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
16
16
|
growsurf/_utils/__init__.py,sha256=nQq-iFa5YxTaWySaLigatew5rHgTR0M75FNYm4mrO1s,2313
|
|
17
17
|
growsurf/_utils/_compat.py,sha256=33246eDcl3pwL6kWsEhVuT4Akrd8gZEW9LPTm465ohk,1231
|
|
@@ -28,23 +28,22 @@ growsurf/_utils/_transform.py,sha256=NjCzmnfqYrsAikUHQig6N9QfuTVbKipuP3ur9mcNF-E
|
|
|
28
28
|
growsurf/_utils/_typing.py,sha256=N_5PPuFNsaygbtA_npZd98SVN1LQQvFTKL6bkWPBZGU,4786
|
|
29
29
|
growsurf/_utils/_utils.py,sha256=2nPOzDrPe2GADpLCRM4bNQS8Mu7LjEiCG_LJ2AAL6jg,13111
|
|
30
30
|
growsurf/lib/.keep,sha256=wuNrz-5SXo3jJaJOJgz4vFHM41YH_g20F5cRQo0vLes,224
|
|
31
|
-
growsurf/resources/__init__.py,sha256=
|
|
32
|
-
growsurf/resources/account.py,sha256=
|
|
31
|
+
growsurf/resources/__init__.py,sha256=RYj6vjnPpErdBftiCuJtbwqGAnll4jXw6sg4qh6o988,1465
|
|
32
|
+
growsurf/resources/account.py,sha256=dcSGZl3B0zgvDwdb8_RC0rBJXhs6pMwEDePWEiOZuNc,6727
|
|
33
|
+
growsurf/resources/team.py,sha256=D6Qs011ggaeqOHW8aZRAPvgGVG4JRqVPq626ptvWGg4,12339
|
|
33
34
|
growsurf/resources/campaign/__init__.py,sha256=XW5nmnR2dF-wzM0d9aoF5cZDC7c-XyyIOjdmPV8IPZ8,4875
|
|
34
|
-
growsurf/resources/campaign/campaign.py,sha256=
|
|
35
|
+
growsurf/resources/campaign/campaign.py,sha256=pUW-O7y3B5pfuQyv9xsDRWkRKXnuQuFvEIsjAweqURI,75421
|
|
35
36
|
growsurf/resources/campaign/commission.py,sha256=K5HmznRM7nO-VNiP2Jy1rIeW63rAx1Aa2M9DEJ9dB2I,10294
|
|
36
37
|
growsurf/resources/campaign/design.py,sha256=H2Syg6ASogYxrPRB9YG4VhQtGp89FRJm-AQOu5g572U,10762
|
|
37
38
|
growsurf/resources/campaign/emails.py,sha256=wGGP1hTPKGb-O7wRAvkGsMflKaoPMhpXyq2ZPfJ-Xng,11060
|
|
38
39
|
growsurf/resources/campaign/installation.py,sha256=36WbjO6ZDh_dDR4VHLNRxrgjbtkwYb6CbaPSc3KdbSw,11234
|
|
39
40
|
growsurf/resources/campaign/options.py,sha256=OfXOBysKf7VW3IJFv7bSOcPnMXSETolRGiV2n6Ff0pQ,11130
|
|
40
|
-
growsurf/resources/campaign/participant.py,sha256=
|
|
41
|
+
growsurf/resources/campaign/participant.py,sha256=4a8fU_nNTMa1txWG9eNXKybNPrT3N-lwl20BwHpHAoo,106586
|
|
41
42
|
growsurf/resources/campaign/reward.py,sha256=CLRzQywVF6zpjVG2S4OIKyBhaS9B9Obrjk6ENOicb30,14264
|
|
42
43
|
growsurf/resources/campaign/rewards.py,sha256=x-fZvvo0gx--SEw_r1t6HHEr6aU5Ir4kh2pqFTsxiqw,34425
|
|
43
44
|
growsurf/resources/campaign/webhooks.py,sha256=DRJ8-8QDibGEq1hT7MTkrlE5kdbEapZXiZb2z_kKM68,22666
|
|
44
|
-
growsurf/types/__init__.py,sha256=
|
|
45
|
-
growsurf/types/account.py,sha256=Xd4rIMf7cLytYWQW6uCia0wlbKQ1kmsMBoGOe7eHXtU,1121
|
|
45
|
+
growsurf/types/__init__.py,sha256=Au2V8z6APUZOYt-Lyy5X34gODWokEk_4jTWVnCmcZTg,2317
|
|
46
46
|
growsurf/types/account_create_params.py,sha256=BXaWsGsiiSbYvVy6ftPNwu7nA2m1xI4PvE1xGEoGeCo,602
|
|
47
|
-
growsurf/types/account_update_params.py,sha256=FUC-dkZFJcpsWHjJ5iWTF_URSIeTiuNsimKL1oANwsQ,442
|
|
48
47
|
growsurf/types/campaign_create_mobile_participant_token_params.py,sha256=oiyxZZGwlGdBSb-4s8FonLXyl_SIPdLECa4a0vrRXso,1248
|
|
49
48
|
growsurf/types/campaign_create_mobile_participant_token_response.py,sha256=IvIgtizBufLI-p9pk7MnyJj3XydHjLvdoAw-PWpPqdI,769
|
|
50
49
|
growsurf/types/campaign_create_params.py,sha256=JQfKq7xZLIbFRzQvEgtSCNPr3okVLiM1ctIHtcE2ihI,1080
|
|
@@ -58,12 +57,14 @@ growsurf/types/campaign_retrieve_analytics_params.py,sha256=VqYCmKvdz9vVaLFL5jo5
|
|
|
58
57
|
growsurf/types/campaign_retrieve_analytics_response.py,sha256=xBVhUYHD0IHM1ZDLi7kaOXe7Mm21hnTCSrvxpE_Q4Bc,7367
|
|
59
58
|
growsurf/types/campaign_update_params.py,sha256=_MijTVkSXi5nP_k1ch2QXDKnIVxxKT1ChuxhgbmcdMc,681
|
|
60
59
|
growsurf/types/commission_structure.py,sha256=oqAryQHyMPQIM6DjvbPR_mNF5UdtXp_M86P2zrhVi8g,2398
|
|
61
|
-
growsurf/types/create_account_response.py,sha256=
|
|
60
|
+
growsurf/types/create_account_response.py,sha256=sVvx_HUgdL3emzCednvPDOakRRTc-jETgZxrGTOHbjk,912
|
|
62
61
|
growsurf/types/participant_commission_list.py,sha256=NodpaTxYHY30DNfBp3m09BPv0Zu50gJtpjJ0stpE6fk,1896
|
|
63
62
|
growsurf/types/participant_list.py,sha256=5oety8iTXx5anr0W5wAjzCAIMPkQLPeVIc2TNuRbrMY,430
|
|
64
63
|
growsurf/types/participant_payout_list.py,sha256=93fM0_gS3ej8KbEpkEPsU8GHWnV-un0duWkuxePr_IQ,1493
|
|
65
64
|
growsurf/types/referral_list.py,sha256=SOU3s0cjeQLhbZVbeGoeCprVyrPTk-tvmMBMV25uG1o,969
|
|
66
65
|
growsurf/types/rotate_api_key_response.py,sha256=dzF80t7wkpHAso5u9QciHNzYww3qTsEmE9LJ4XAQPGM,376
|
|
66
|
+
growsurf/types/team.py,sha256=m7_7iAbceXcnryJClCOkcUbvG1MeMoIDb9fEy_8JXcA,741
|
|
67
|
+
growsurf/types/team_update_params.py,sha256=BWe-y5FywSFF3z-riG2cd3qkZTqhbjeLBj_wmiMArbc,278
|
|
67
68
|
growsurf/types/verification_email_response.py,sha256=UYhx3DiXpWWgumukaezuiuIq_OME-3QE2_vG0TnwR00,292
|
|
68
69
|
growsurf/types/campaign/__init__.py,sha256=cRjsIrPhEbMXTyyWY0IWanGk1SUgRd1IJUd7_9kOoC8,4944
|
|
69
70
|
growsurf/types/campaign/campaign.py,sha256=Mm2bYeZnGFnghAPxvXPPhrbq8fzqAiqjeyDd-u9tP_E,3111
|
|
@@ -120,7 +121,7 @@ growsurf/types/campaign/webhook_list_response.py,sha256=tSk9nTbcsj5Y-j4RjQwu9SZc
|
|
|
120
121
|
growsurf/types/campaign/webhook_test_params.py,sha256=X1Osg9-4KGJbZauG_7rDqTE7cKCypeSzgumIhnxj9dk,468
|
|
121
122
|
growsurf/types/campaign/webhook_test_response.py,sha256=AahcckKSLUeIgpwlosOOmbkioF62xREXgLbieHAPAdI,576
|
|
122
123
|
growsurf/types/campaign/webhook_update_params.py,sha256=SavKhws8pfybC7O40ovtCreEmOwihEGPOCEX9Iua9cE,598
|
|
123
|
-
growsurf_python-1.
|
|
124
|
-
growsurf_python-1.
|
|
125
|
-
growsurf_python-1.
|
|
126
|
-
growsurf_python-1.
|
|
124
|
+
growsurf_python-1.2.0.dist-info/METADATA,sha256=qGVu3HTUNcU26QnNkT9VzK0nnQllwmV63d6NSG1or5U,13614
|
|
125
|
+
growsurf_python-1.2.0.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
|
|
126
|
+
growsurf_python-1.2.0.dist-info/licenses/LICENSE,sha256=kTHLVE-ra1gtTxcn395uFqcOzcErebE-mDdPNW7b8OU,11338
|
|
127
|
+
growsurf_python-1.2.0.dist-info/RECORD,,
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
|
|
3
|
-
from __future__ import annotations
|
|
4
|
-
|
|
5
|
-
from typing_extensions import Annotated, TypedDict
|
|
6
|
-
|
|
7
|
-
from .._utils import PropertyInfo
|
|
8
|
-
|
|
9
|
-
__all__ = ["AccountUpdateParams"]
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
class AccountUpdateParams(TypedDict, total=False):
|
|
13
|
-
company: str
|
|
14
|
-
|
|
15
|
-
first_name: Annotated[str, PropertyInfo(alias="firstName")]
|
|
16
|
-
|
|
17
|
-
last_name: Annotated[str, PropertyInfo(alias="lastName")]
|
|
File without changes
|
|
File without changes
|