growsurf-python 1.3.0__py3-none-any.whl → 1.5.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/_base_client.py +1 -3
- growsurf/_version.py +1 -1
- growsurf/resources/account.py +34 -22
- growsurf/resources/campaign/__init__.py +28 -0
- growsurf/resources/campaign/campaign.py +296 -14
- growsurf/resources/campaign/design.py +8 -4
- growsurf/resources/campaign/integrations.py +181 -0
- growsurf/resources/campaign/options.py +4 -2
- growsurf/resources/campaign/participant.py +60 -22
- growsurf/resources/campaign/program_resources.py +427 -0
- growsurf/resources/campaign/rewards.py +36 -8
- growsurf/resources/team.py +14 -10
- growsurf/types/__init__.py +9 -0
- growsurf/types/analytics_availability.py +7 -0
- growsurf/types/analytics_unavailable_reason.py +15 -0
- growsurf/types/campaign/__init__.py +17 -1
- growsurf/types/campaign/campaign.py +8 -1
- growsurf/types/campaign/campaign_design.py +52 -6
- growsurf/types/campaign/campaign_emails.py +4 -2
- growsurf/types/campaign/campaign_options.py +6 -5
- growsurf/types/campaign/delete_program_resource_response.py +12 -0
- growsurf/types/campaign/integration.py +38 -0
- growsurf/types/campaign/integration_list_response.py +16 -0
- growsurf/types/campaign/participant_activation_analytics.py +84 -0
- growsurf/types/campaign/participant_analytics_params.py +14 -8
- growsurf/types/campaign/participant_analytics_response.py +16 -0
- growsurf/types/campaign/participant_get_payout_destination_response.py +10 -10
- growsurf/types/campaign/participant_list_rewards_response.py +1 -1
- growsurf/types/campaign/participant_record_transaction_params.py +7 -1
- growsurf/types/campaign/participant_refund_transaction_params.py +15 -0
- growsurf/types/campaign/participant_request_payout_destination_confirmation_response.py +4 -4
- growsurf/types/campaign/participant_reward.py +5 -1
- growsurf/types/campaign/participant_update_params.py +1 -3
- growsurf/types/campaign/program_resource.py +36 -0
- growsurf/types/campaign/program_resource_list_response.py +12 -0
- growsurf/types/campaign/program_resource_upload_result.py +24 -0
- growsurf/types/campaign/program_resource_upload_ticket.py +19 -0
- growsurf/types/campaign/reward.py +7 -0
- growsurf/types/campaign/reward_create_params.py +10 -2
- growsurf/types/campaign/reward_update_params.py +10 -2
- growsurf/types/campaign_activation_analytics_response.py +174 -0
- growsurf/types/campaign_create_params.py +23 -0
- growsurf/types/campaign_engagement_analytics.py +201 -0
- growsurf/types/campaign_retrieve_activation_analytics_params.py +26 -0
- growsurf/types/campaign_retrieve_analytics_params.py +11 -2
- growsurf/types/campaign_retrieve_analytics_response.py +7 -3
- growsurf/types/commission_structure.py +7 -1
- growsurf/types/create_account_response.py +4 -3
- growsurf/types/participant_commission_list.py +6 -3
- growsurf/types/participant_list.py +1 -1
- growsurf/types/participant_payout_list.py +1 -1
- {growsurf_python-1.3.0.dist-info → growsurf_python-1.5.0.dist-info}/METADATA +10 -5
- {growsurf_python-1.3.0.dist-info → growsurf_python-1.5.0.dist-info}/RECORD +55 -40
- {growsurf_python-1.3.0.dist-info → growsurf_python-1.5.0.dist-info}/WHEEL +0 -0
- {growsurf_python-1.3.0.dist-info → growsurf_python-1.5.0.dist-info}/licenses/LICENSE +0 -0
growsurf/_base_client.py
CHANGED
|
@@ -794,9 +794,7 @@ class BaseClient(Generic[_HttpxClientT, _DefaultStreamT]):
|
|
|
794
794
|
method = options.method.lower()
|
|
795
795
|
url = URL(str(options.url))
|
|
796
796
|
path = url.path.rstrip("/")
|
|
797
|
-
return method in {"get", "head"} or (
|
|
798
|
-
method == "post" and url.is_relative_url and path == "/api-key/rotate"
|
|
799
|
-
)
|
|
797
|
+
return method in {"get", "head"} or (method == "post" and url.is_relative_url and path == "/api-key/rotate")
|
|
800
798
|
|
|
801
799
|
def _should_retry(self, response: httpx.Response) -> bool:
|
|
802
800
|
# Note: this is not a standard header
|
growsurf/_version.py
CHANGED
growsurf/resources/account.py
CHANGED
|
@@ -48,19 +48,25 @@ class AccountResource(SyncAPIResource):
|
|
|
48
48
|
) -> CreateAccountResponse:
|
|
49
49
|
"""
|
|
50
50
|
Creates a new GrowSurf account. This is the only endpoint that does not require
|
|
51
|
-
an API key.
|
|
52
|
-
|
|
51
|
+
an API key. Before calling it, an authorized account owner must review and
|
|
52
|
+
approve GrowSurf's [Terms of Service](https://growsurf.com/terms) and [Privacy
|
|
53
|
+
Policy](https://growsurf.com/privacy). The account starts a 14-day Business
|
|
54
|
+
trial without a credit card. The response includes an API key for the new
|
|
55
|
+
account, shown once in the response. The key is a secret: store it in a secret
|
|
56
|
+
manager and do not put it in logs, screenshots, URLs, model context, analytics,
|
|
57
|
+
or generated output. The key is locked until the team owner's email address is
|
|
53
58
|
verified: authenticated program and resource endpoints return a `403` with error
|
|
54
59
|
code `EMAIL_NOT_VERIFIED_ERROR` until then (resend the email via `POST
|
|
55
|
-
/team/owner/verification-email`, then retry).
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
60
|
+
/team/owner/verification-email`, then retry). Verification unlocks this same key
|
|
61
|
+
- keep it and retry rather than requesting a replacement. A welcome email is
|
|
62
|
+
sent to the address with the verification link and a set-password link for
|
|
63
|
+
dashboard access. Accounts whose email is never verified are deleted
|
|
64
|
+
automatically after 7 days. Separately, for security, the API key is replaced
|
|
65
|
+
the first time the account owner signs in to the GrowSurf dashboard; email
|
|
66
|
+
verification does not trigger that, and the previous key then returns a `403`
|
|
67
|
+
with error code `NOT_AUTHORIZED_ERROR`. Some actions (such as emailing participants)
|
|
68
|
+
additionally require GrowSurf to verify the team first. Calling this endpoint
|
|
69
|
+
accepts those policies on the account holder's behalf.
|
|
64
70
|
|
|
65
71
|
Args:
|
|
66
72
|
email: The email address for the new GrowSurf account. Personal emails and disposable email addresses are not accepted.
|
|
@@ -128,19 +134,25 @@ class AsyncAccountResource(AsyncAPIResource):
|
|
|
128
134
|
) -> CreateAccountResponse:
|
|
129
135
|
"""
|
|
130
136
|
Creates a new GrowSurf account. This is the only endpoint that does not require
|
|
131
|
-
an API key.
|
|
132
|
-
|
|
137
|
+
an API key. Before calling it, an authorized account owner must review and
|
|
138
|
+
approve GrowSurf's [Terms of Service](https://growsurf.com/terms) and [Privacy
|
|
139
|
+
Policy](https://growsurf.com/privacy). The account starts a 14-day Business
|
|
140
|
+
trial without a credit card. The response includes an API key for the new
|
|
141
|
+
account, shown once in the response. The key is a secret: store it in a secret
|
|
142
|
+
manager and do not put it in logs, screenshots, URLs, model context, analytics,
|
|
143
|
+
or generated output. The key is locked until the team owner's email address is
|
|
133
144
|
verified: authenticated program and resource endpoints return a `403` with error
|
|
134
145
|
code `EMAIL_NOT_VERIFIED_ERROR` until then (resend the email via `POST
|
|
135
|
-
/team/owner/verification-email`, then retry).
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
146
|
+
/team/owner/verification-email`, then retry). Verification unlocks this same key
|
|
147
|
+
- keep it and retry rather than requesting a replacement. A welcome email is
|
|
148
|
+
sent to the address with the verification link and a set-password link for
|
|
149
|
+
dashboard access. Accounts whose email is never verified are deleted
|
|
150
|
+
automatically after 7 days. Separately, for security, the API key is replaced
|
|
151
|
+
the first time the account owner signs in to the GrowSurf dashboard; email
|
|
152
|
+
verification does not trigger that, and the previous key then returns a `403`
|
|
153
|
+
with error code `NOT_AUTHORIZED_ERROR`. Some actions (such as emailing participants)
|
|
154
|
+
additionally require GrowSurf to verify the team first. Calling this endpoint
|
|
155
|
+
accepts those policies on the account holder's behalf.
|
|
144
156
|
|
|
145
157
|
Args:
|
|
146
158
|
email: The email address for the new GrowSurf account. Personal emails and disposable email addresses are not accepted.
|
|
@@ -80,6 +80,22 @@ from .installation import (
|
|
|
80
80
|
InstallationResourceWithStreamingResponse,
|
|
81
81
|
AsyncInstallationResourceWithStreamingResponse,
|
|
82
82
|
)
|
|
83
|
+
from .integrations import (
|
|
84
|
+
IntegrationsResource,
|
|
85
|
+
AsyncIntegrationsResource,
|
|
86
|
+
IntegrationsResourceWithRawResponse,
|
|
87
|
+
AsyncIntegrationsResourceWithRawResponse,
|
|
88
|
+
IntegrationsResourceWithStreamingResponse,
|
|
89
|
+
AsyncIntegrationsResourceWithStreamingResponse,
|
|
90
|
+
)
|
|
91
|
+
from .program_resources import (
|
|
92
|
+
ProgramResourcesResource,
|
|
93
|
+
AsyncProgramResourcesResource,
|
|
94
|
+
ProgramResourcesResourceWithRawResponse,
|
|
95
|
+
AsyncProgramResourcesResourceWithRawResponse,
|
|
96
|
+
ProgramResourcesResourceWithStreamingResponse,
|
|
97
|
+
AsyncProgramResourcesResourceWithStreamingResponse,
|
|
98
|
+
)
|
|
83
99
|
|
|
84
100
|
__all__ = [
|
|
85
101
|
"ParticipantResource",
|
|
@@ -100,6 +116,18 @@ __all__ = [
|
|
|
100
116
|
"AsyncRewardsResourceWithRawResponse",
|
|
101
117
|
"RewardsResourceWithStreamingResponse",
|
|
102
118
|
"AsyncRewardsResourceWithStreamingResponse",
|
|
119
|
+
"ProgramResourcesResource",
|
|
120
|
+
"AsyncProgramResourcesResource",
|
|
121
|
+
"ProgramResourcesResourceWithRawResponse",
|
|
122
|
+
"AsyncProgramResourcesResourceWithRawResponse",
|
|
123
|
+
"ProgramResourcesResourceWithStreamingResponse",
|
|
124
|
+
"AsyncProgramResourcesResourceWithStreamingResponse",
|
|
125
|
+
"IntegrationsResource",
|
|
126
|
+
"AsyncIntegrationsResource",
|
|
127
|
+
"IntegrationsResourceWithRawResponse",
|
|
128
|
+
"AsyncIntegrationsResourceWithRawResponse",
|
|
129
|
+
"IntegrationsResourceWithStreamingResponse",
|
|
130
|
+
"AsyncIntegrationsResourceWithStreamingResponse",
|
|
103
131
|
"WebhooksResource",
|
|
104
132
|
"AsyncWebhooksResource",
|
|
105
133
|
"WebhooksResourceWithRawResponse",
|