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.
Files changed (55) hide show
  1. growsurf/_base_client.py +1 -3
  2. growsurf/_version.py +1 -1
  3. growsurf/resources/account.py +34 -22
  4. growsurf/resources/campaign/__init__.py +28 -0
  5. growsurf/resources/campaign/campaign.py +296 -14
  6. growsurf/resources/campaign/design.py +8 -4
  7. growsurf/resources/campaign/integrations.py +181 -0
  8. growsurf/resources/campaign/options.py +4 -2
  9. growsurf/resources/campaign/participant.py +60 -22
  10. growsurf/resources/campaign/program_resources.py +427 -0
  11. growsurf/resources/campaign/rewards.py +36 -8
  12. growsurf/resources/team.py +14 -10
  13. growsurf/types/__init__.py +9 -0
  14. growsurf/types/analytics_availability.py +7 -0
  15. growsurf/types/analytics_unavailable_reason.py +15 -0
  16. growsurf/types/campaign/__init__.py +17 -1
  17. growsurf/types/campaign/campaign.py +8 -1
  18. growsurf/types/campaign/campaign_design.py +52 -6
  19. growsurf/types/campaign/campaign_emails.py +4 -2
  20. growsurf/types/campaign/campaign_options.py +6 -5
  21. growsurf/types/campaign/delete_program_resource_response.py +12 -0
  22. growsurf/types/campaign/integration.py +38 -0
  23. growsurf/types/campaign/integration_list_response.py +16 -0
  24. growsurf/types/campaign/participant_activation_analytics.py +84 -0
  25. growsurf/types/campaign/participant_analytics_params.py +14 -8
  26. growsurf/types/campaign/participant_analytics_response.py +16 -0
  27. growsurf/types/campaign/participant_get_payout_destination_response.py +10 -10
  28. growsurf/types/campaign/participant_list_rewards_response.py +1 -1
  29. growsurf/types/campaign/participant_record_transaction_params.py +7 -1
  30. growsurf/types/campaign/participant_refund_transaction_params.py +15 -0
  31. growsurf/types/campaign/participant_request_payout_destination_confirmation_response.py +4 -4
  32. growsurf/types/campaign/participant_reward.py +5 -1
  33. growsurf/types/campaign/participant_update_params.py +1 -3
  34. growsurf/types/campaign/program_resource.py +36 -0
  35. growsurf/types/campaign/program_resource_list_response.py +12 -0
  36. growsurf/types/campaign/program_resource_upload_result.py +24 -0
  37. growsurf/types/campaign/program_resource_upload_ticket.py +19 -0
  38. growsurf/types/campaign/reward.py +7 -0
  39. growsurf/types/campaign/reward_create_params.py +10 -2
  40. growsurf/types/campaign/reward_update_params.py +10 -2
  41. growsurf/types/campaign_activation_analytics_response.py +174 -0
  42. growsurf/types/campaign_create_params.py +23 -0
  43. growsurf/types/campaign_engagement_analytics.py +201 -0
  44. growsurf/types/campaign_retrieve_activation_analytics_params.py +26 -0
  45. growsurf/types/campaign_retrieve_analytics_params.py +11 -2
  46. growsurf/types/campaign_retrieve_analytics_response.py +7 -3
  47. growsurf/types/commission_structure.py +7 -1
  48. growsurf/types/create_account_response.py +4 -3
  49. growsurf/types/participant_commission_list.py +6 -3
  50. growsurf/types/participant_list.py +1 -1
  51. growsurf/types/participant_payout_list.py +1 -1
  52. {growsurf_python-1.3.0.dist-info → growsurf_python-1.5.0.dist-info}/METADATA +10 -5
  53. {growsurf_python-1.3.0.dist-info → growsurf_python-1.5.0.dist-info}/RECORD +55 -40
  54. {growsurf_python-1.3.0.dist-info → growsurf_python-1.5.0.dist-info}/WHEEL +0 -0
  55. {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
@@ -1,4 +1,4 @@
1
1
  # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  __title__ = "growsurf"
4
- __version__ = "1.3.0" # x-release-please-version
4
+ __version__ = "1.5.0" # x-release-please-version
@@ -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. The response includes an API key for the new account, shown once in
52
- the response. The key is locked until the team owner's email address is
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). A welcome email is sent to the
56
- address with the verification link and a set-password link for dashboard access.
57
- Accounts whose email is never verified are deleted automatically after 7 days.
58
- For security, the API key is rotated the first time the account owner signs in
59
- to the GrowSurf dashboard. Some actions (such as emailing participants)
60
- additionally require GrowSurf to verify the team first. By creating an account
61
- you agree, on behalf of the account holder, to GrowSurf's [Terms of
62
- Service](https://growsurf.com/terms) and [Privacy
63
- Policy](https://growsurf.com/privacy).
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. The response includes an API key for the new account, shown once in
132
- the response. The key is locked until the team owner's email address is
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). A welcome email is sent to the
136
- address with the verification link and a set-password link for dashboard access.
137
- Accounts whose email is never verified are deleted automatically after 7 days.
138
- For security, the API key is rotated the first time the account owner signs in
139
- to the GrowSurf dashboard. Some actions (such as emailing participants)
140
- additionally require GrowSurf to verify the team first. By creating an account
141
- you agree, on behalf of the account holder, to GrowSurf's [Terms of
142
- Service](https://growsurf.com/terms) and [Privacy
143
- Policy](https://growsurf.com/privacy).
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",