growsurf-python 1.8.0__py3-none-any.whl → 1.9.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/_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.8.0" # x-release-please-version
4
+ __version__ = "1.9.0" # x-release-please-version
@@ -133,6 +133,7 @@ from ...types.participant_payout_list import ParticipantPayoutList
133
133
  from ...types.campaign.referral_status import ReferralStatus
134
134
  from ...types.participant_commission_list import ParticipantCommissionList
135
135
  from ...types.affiliate_invite_list_response import AffiliateInviteListResponse
136
+ from ...types.referral_flow_screenshots_response import ReferralFlowScreenshotsResponse
136
137
  from ...types.affiliate_application_list_response import AffiliateApplicationListResponse
137
138
  from ...types.campaign_retrieve_analytics_response import CampaignRetrieveAnalyticsResponse
138
139
  from ...types.campaign_activation_analytics_response import CampaignActivationAnalyticsResponse
@@ -500,6 +501,45 @@ class CampaignResource(SyncAPIResource):
500
501
  cast_to=CampaignCreateMobileParticipantTokenResponse,
501
502
  )
502
503
 
504
+ def capture_referral_flow_screenshots(
505
+ self,
506
+ id: str,
507
+ *,
508
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
509
+ # The extra values given here take precedence over values defined on the client or passed to this method.
510
+ extra_headers: Headers | None = None,
511
+ extra_query: Query | None = None,
512
+ extra_body: Body | None = None,
513
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
514
+ ) -> ReferralFlowScreenshotsResponse:
515
+ """
516
+ Renders the program's current saved configuration into two preview images: the
517
+ referrer window a participant sees, and the referred-friend experience. Use them
518
+ to show a person what the draft looks like before anything launches. The images
519
+ render GrowSurf's own preview, not the program's installed website, so they do
520
+ not prove an installation. Each `url` is private and expires; capture again when
521
+ you need a fresh view. Only the account owner's credential can capture
522
+ screenshots, and the endpoint takes no request body.
523
+
524
+ Args:
525
+ extra_headers: Send extra headers
526
+
527
+ extra_query: Add additional query parameters to the request
528
+
529
+ extra_body: Add additional JSON properties to the request
530
+
531
+ timeout: Override the client-level default timeout for this request, in seconds
532
+ """
533
+ if not id:
534
+ raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
535
+ return self._post(
536
+ path_template("/campaign/{id}/referral-flow-screenshots", id=id),
537
+ options=make_request_options(
538
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
539
+ ),
540
+ cast_to=ReferralFlowScreenshotsResponse,
541
+ )
542
+
503
543
  def list_commissions(
504
544
  self,
505
545
  id: str,
@@ -1687,6 +1727,45 @@ class AsyncCampaignResource(AsyncAPIResource):
1687
1727
  cast_to=CampaignCreateMobileParticipantTokenResponse,
1688
1728
  )
1689
1729
 
1730
+ async def capture_referral_flow_screenshots(
1731
+ self,
1732
+ id: str,
1733
+ *,
1734
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
1735
+ # The extra values given here take precedence over values defined on the client or passed to this method.
1736
+ extra_headers: Headers | None = None,
1737
+ extra_query: Query | None = None,
1738
+ extra_body: Body | None = None,
1739
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
1740
+ ) -> ReferralFlowScreenshotsResponse:
1741
+ """
1742
+ Renders the program's current saved configuration into two preview images: the
1743
+ referrer window a participant sees, and the referred-friend experience. Use them
1744
+ to show a person what the draft looks like before anything launches. The images
1745
+ render GrowSurf's own preview, not the program's installed website, so they do
1746
+ not prove an installation. Each `url` is private and expires; capture again when
1747
+ you need a fresh view. Only the account owner's credential can capture
1748
+ screenshots, and the endpoint takes no request body.
1749
+
1750
+ Args:
1751
+ extra_headers: Send extra headers
1752
+
1753
+ extra_query: Add additional query parameters to the request
1754
+
1755
+ extra_body: Add additional JSON properties to the request
1756
+
1757
+ timeout: Override the client-level default timeout for this request, in seconds
1758
+ """
1759
+ if not id:
1760
+ raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
1761
+ return await self._post(
1762
+ path_template("/campaign/{id}/referral-flow-screenshots", id=id),
1763
+ options=make_request_options(
1764
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
1765
+ ),
1766
+ cast_to=ReferralFlowScreenshotsResponse,
1767
+ )
1768
+
1690
1769
  async def list_commissions(
1691
1770
  self,
1692
1771
  id: str,
@@ -2537,6 +2616,9 @@ class CampaignResourceWithRawResponse:
2537
2616
  self.create_mobile_participant_token = to_raw_response_wrapper(
2538
2617
  campaign.create_mobile_participant_token,
2539
2618
  )
2619
+ self.capture_referral_flow_screenshots = to_raw_response_wrapper(
2620
+ campaign.capture_referral_flow_screenshots,
2621
+ )
2540
2622
  self.list_commissions = to_raw_response_wrapper(
2541
2623
  campaign.list_commissions,
2542
2624
  )
@@ -2656,6 +2738,9 @@ class AsyncCampaignResourceWithRawResponse:
2656
2738
  self.create_mobile_participant_token = async_to_raw_response_wrapper(
2657
2739
  campaign.create_mobile_participant_token,
2658
2740
  )
2741
+ self.capture_referral_flow_screenshots = async_to_raw_response_wrapper(
2742
+ campaign.capture_referral_flow_screenshots,
2743
+ )
2659
2744
  self.list_commissions = async_to_raw_response_wrapper(
2660
2745
  campaign.list_commissions,
2661
2746
  )
@@ -2775,6 +2860,9 @@ class CampaignResourceWithStreamingResponse:
2775
2860
  self.create_mobile_participant_token = to_streamed_response_wrapper(
2776
2861
  campaign.create_mobile_participant_token,
2777
2862
  )
2863
+ self.capture_referral_flow_screenshots = to_streamed_response_wrapper(
2864
+ campaign.capture_referral_flow_screenshots,
2865
+ )
2778
2866
  self.list_commissions = to_streamed_response_wrapper(
2779
2867
  campaign.list_commissions,
2780
2868
  )
@@ -2894,6 +2982,9 @@ class AsyncCampaignResourceWithStreamingResponse:
2894
2982
  self.create_mobile_participant_token = async_to_streamed_response_wrapper(
2895
2983
  campaign.create_mobile_participant_token,
2896
2984
  )
2985
+ self.capture_referral_flow_screenshots = async_to_streamed_response_wrapper(
2986
+ campaign.capture_referral_flow_screenshots,
2987
+ )
2897
2988
  self.list_commissions = async_to_streamed_response_wrapper(
2898
2989
  campaign.list_commissions,
2899
2990
  )
@@ -23,6 +23,7 @@ from .campaign_update_params import CampaignUpdateParams as CampaignUpdateParams
23
23
  from .create_account_response import CreateAccountResponse as CreateAccountResponse
24
24
  from .participant_payout_list import ParticipantPayoutList as ParticipantPayoutList
25
25
  from .rotate_api_key_response import RotateApiKeyResponse as RotateApiKeyResponse
26
+ from .referral_flow_screenshot import ReferralFlowScreenshot as ReferralFlowScreenshot
26
27
  from .participant_commission_list import ParticipantCommissionList as ParticipantCommissionList
27
28
  from .verification_email_response import VerificationEmailResponse as VerificationEmailResponse
28
29
  from .affiliate_application_answer import AffiliateApplicationAnswer as AffiliateApplicationAnswer
@@ -35,6 +36,7 @@ from .campaign_list_commissions_params import CampaignListCommissionsParams as C
35
36
  from .campaign_list_leaderboard_params import CampaignListLeaderboardParams as CampaignListLeaderboardParams
36
37
  from .campaign_list_participants_params import CampaignListParticipantsParams as CampaignListParticipantsParams
37
38
  from .campaign_retrieve_analytics_params import CampaignRetrieveAnalyticsParams as CampaignRetrieveAnalyticsParams
39
+ from .referral_flow_screenshots_response import ReferralFlowScreenshotsResponse as ReferralFlowScreenshotsResponse
38
40
  from .affiliate_application_list_response import AffiliateApplicationListResponse as AffiliateApplicationListResponse
39
41
  from .campaign_retrieve_analytics_response import CampaignRetrieveAnalyticsResponse as CampaignRetrieveAnalyticsResponse
40
42
  from .campaign_activation_analytics_response import (
@@ -49,6 +49,12 @@ class Referrer(BaseModel):
49
49
 
50
50
  last_name: Optional[str] = FieldInfo(alias="lastName", default=None)
51
51
 
52
+ lead_count: Optional[int] = FieldInfo(alias="leadCount", default=None)
53
+ """
54
+ The number of pending referrals the participant made that have not converted
55
+ into successful referrals yet.
56
+ """
57
+
52
58
  metadata: Optional[Dict[str, object]] = None
53
59
  """Shallow custom metadata object."""
54
60
 
@@ -145,6 +151,12 @@ class Participant(BaseModel):
145
151
 
146
152
  last_name: Optional[str] = FieldInfo(alias="lastName", default=None)
147
153
 
154
+ lead_count: Optional[int] = FieldInfo(alias="leadCount", default=None)
155
+ """
156
+ The number of pending referrals the participant made that have not converted
157
+ into successful referrals yet.
158
+ """
159
+
148
160
  metadata: Optional[Dict[str, object]] = None
149
161
  """Shallow custom metadata object."""
150
162
 
@@ -0,0 +1,33 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from datetime import datetime
4
+ from typing_extensions import Literal
5
+
6
+ from pydantic import Field as FieldInfo
7
+
8
+ from .._models import BaseModel
9
+
10
+ __all__ = ["ReferralFlowScreenshot"]
11
+
12
+
13
+ class ReferralFlowScreenshot(BaseModel):
14
+ view: Literal["referrer", "referredFriend"]
15
+ """Which side of the referral flow the image shows."""
16
+
17
+ label: str
18
+ """Short human-readable name for the view, such as `Referrer window`."""
19
+
20
+ url: str
21
+ """Private URL of the image. It stops working at `expiresAt`."""
22
+
23
+ expires_at: datetime = FieldInfo(alias="expiresAt")
24
+ """ISO 8601 time after which `url` no longer resolves."""
25
+
26
+ width: int
27
+ """Image width in pixels."""
28
+
29
+ height: int
30
+ """Image height in pixels."""
31
+
32
+ content_type: str = FieldInfo(alias="contentType")
33
+ """MIME type of the image."""
@@ -0,0 +1,22 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import List
4
+ from datetime import datetime
5
+
6
+ from pydantic import Field as FieldInfo
7
+
8
+ from .._models import BaseModel
9
+ from .referral_flow_screenshot import ReferralFlowScreenshot
10
+
11
+ __all__ = ["ReferralFlowScreenshotsResponse"]
12
+
13
+
14
+ class ReferralFlowScreenshotsResponse(BaseModel):
15
+ generated_at: datetime = FieldInfo(alias="generatedAt")
16
+ """ISO 8601 time the images were rendered."""
17
+
18
+ expires_at: datetime = FieldInfo(alias="expiresAt")
19
+ """ISO 8601 time after which every `url` in `screenshots` stops working."""
20
+
21
+ screenshots: List[ReferralFlowScreenshot]
22
+ """One entry per view, in referrer then referred-friend order."""
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: growsurf-python
3
- Version: 1.8.0
3
+ Version: 1.9.0
4
4
  Summary: The official Python library for the growsurf API
5
5
  Project-URL: Homepage, https://growsurf.com/
6
6
  Project-URL: Repository, https://github.com/growsurf/growsurf-python
@@ -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=O36DV_DBZKjiTb0-a5hQWu4ZXF0b5IR9k9KMxihKrZY,160
14
+ growsurf/_version.py,sha256=4WKOTnZ8FcparwmWKremivwBlS3DllnUQ3l_1PnqSoU,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
@@ -32,7 +32,7 @@ growsurf/resources/__init__.py,sha256=RYj6vjnPpErdBftiCuJtbwqGAnll4jXw6sg4qh6o98
32
32
  growsurf/resources/account.py,sha256=C07rN77026gPHHb0U8y8qlvvluK2ZljUfygztbxxO0A,10173
33
33
  growsurf/resources/team.py,sha256=q3KpMg6Kflk3LDCRt0bUQeo2LiEb3Ih-8iHjZ7tRvjM,14781
34
34
  growsurf/resources/campaign/__init__.py,sha256=Pz3ef3fSs5bMyAJMwa_IIdVGkfYI-QV0Z1AeSraaDew,5984
35
- growsurf/resources/campaign/campaign.py,sha256=RsP44J-phS2mWnEGT2vzWmy5Ct3PfsWG664NZ6DroJE,125287
35
+ growsurf/resources/campaign/campaign.py,sha256=s7jg6ceNJuheXCsStL0ahPKYNq_iERbqkAQbdgnVXjI,129771
36
36
  growsurf/resources/campaign/commission.py,sha256=Li8L2l8xRh4EXa_oD7R9RJ6m4xaA4pmt9gXTxib2Fkk,10426
37
37
  growsurf/resources/campaign/design.py,sha256=qw5Uif4dXZX5WxeyS-Sr8b91aVpo1dMhMHwUu-whbEQ,11838
38
38
  growsurf/resources/campaign/emails.py,sha256=kECJC5jUUAw5RmarBfOAktGkXmg-5DFKTwcHN4ygVMc,10816
@@ -44,7 +44,7 @@ growsurf/resources/campaign/program_resources.py,sha256=e6ANK-_kuU5YTMQwKCCt35iO
44
44
  growsurf/resources/campaign/reward.py,sha256=-TiRwBcG5UwdNO_ath3pL36Bimji2QXCxSFNW8Scanw,14308
45
45
  growsurf/resources/campaign/rewards.py,sha256=tvSkGncj-2OA3G-ivuKsjv1HF9PKsZmcZRWBOR89JGA,37329
46
46
  growsurf/resources/campaign/webhooks.py,sha256=DRJ8-8QDibGEq1hT7MTkrlE5kdbEapZXiZb2z_kKM68,22666
47
- growsurf/types/__init__.py,sha256=MN3gMKVWqnmx1MhEP_XYKbrZMKMXYKxkS0pi-iAFi7g,4100
47
+ growsurf/types/__init__.py,sha256=8MnE5xKMTKwLgZ3kMTHzsJoKhUFsBp3DTJoJ-cY_UK4,4302
48
48
  growsurf/types/account_create_params.py,sha256=BXaWsGsiiSbYvVy6ftPNwu7nA2m1xI4PvE1xGEoGeCo,602
49
49
  growsurf/types/affiliate_application.py,sha256=ilpjKfA53jQf-gRiO9u6TkHDI-gBWijQiEKAe6rr0Oc,2488
50
50
  growsurf/types/affiliate_application_answer.py,sha256=9AgNAiFl_UiPTn3241LQXXdLXt16nXMeUg0enDJbWVU,914
@@ -78,6 +78,8 @@ growsurf/types/email_analytics.py,sha256=7nypZsSLmyd-_inLzBfB8Vpbu4z0j-2TAU6Np9P
78
78
  growsurf/types/participant_commission_list.py,sha256=2xPLCwjcswv0K_1upzSrRNvY3kiuMX422gXpBuL3eqc,2033
79
79
  growsurf/types/participant_list.py,sha256=hdV0rzEwdx7trXyKmQ3aDq7Fy1KI8grL-t7SphGFP7M,429
80
80
  growsurf/types/participant_payout_list.py,sha256=WjJdzNcJCRwati9E7e7KBZNbLnv-WhxhhOL825b3oKo,1582
81
+ growsurf/types/referral_flow_screenshot.py,sha256=mjQU2zEoOMMuNhYe6Pm9hpihVLCauMhT6_X9BNwTN-g,902
82
+ growsurf/types/referral_flow_screenshots_response.py,sha256=1hxbw6YAuWyHhg1THHICpDkk8_JadyyZfU_H3MY_QWE,739
81
83
  growsurf/types/referral_list.py,sha256=SOU3s0cjeQLhbZVbeGoeCprVyrPTk-tvmMBMV25uG1o,969
82
84
  growsurf/types/rotate_api_key_response.py,sha256=dzF80t7wkpHAso5u9QciHNzYww3qTsEmE9LJ4XAQPGM,376
83
85
  growsurf/types/team.py,sha256=m7_7iAbceXcnryJClCOkcUbvG1MeMoIDb9fEy_8JXcA,741
@@ -99,7 +101,7 @@ growsurf/types/campaign/email_participant_response.py,sha256=A6i_s-YZnS8zYcKbMlZ
99
101
  growsurf/types/campaign/fraud_risk_level.py,sha256=e14xAEYtKH6gGnkJ9-sr81GZ2UY-zDQ6TZKCkBJLagw,228
100
102
  growsurf/types/campaign/integration.py,sha256=MIBG_M_zQJ_KHd-w_nCgCvP62o8eY0Q-IKwP-rzJ_oM,1223
101
103
  growsurf/types/campaign/integration_list_response.py,sha256=w09nrHrwarPJsDmNDxcDgMFsesAAF5H6leueoET6wNU,417
102
- growsurf/types/campaign/participant.py,sha256=9WGZVqE5o32FotmK0r6Oiz1vwxLUpVRQlGBkoS-ZjNE,7377
104
+ growsurf/types/campaign/participant.py,sha256=rGSPmIDGeXuyirBWn3sqJVjwBii7pD9dfkI9-eYKVmM,7793
103
105
  growsurf/types/campaign/participant_activation_analytics.py,sha256=AB5Bdy60t-nc3_INVw03TKpp63lllutw8mSNPLZro7w,2686
104
106
  growsurf/types/campaign/participant_activity_logs_response.py,sha256=W-inUKJZimgwGlL6FqGlyQxG-XC9H7fnYMHtVi__uAQ,783
105
107
  growsurf/types/campaign/participant_add_params.py,sha256=ZbumRAnFwQchXRozOpOqkS7FFvqsuco8R7Az9S6kjSc,1821
@@ -150,7 +152,7 @@ growsurf/types/campaign/webhook_list_response.py,sha256=tSk9nTbcsj5Y-j4RjQwu9SZc
150
152
  growsurf/types/campaign/webhook_test_params.py,sha256=X1Osg9-4KGJbZauG_7rDqTE7cKCypeSzgumIhnxj9dk,468
151
153
  growsurf/types/campaign/webhook_test_response.py,sha256=AahcckKSLUeIgpwlosOOmbkioF62xREXgLbieHAPAdI,576
152
154
  growsurf/types/campaign/webhook_update_params.py,sha256=SavKhws8pfybC7O40ovtCreEmOwihEGPOCEX9Iua9cE,598
153
- growsurf_python-1.8.0.dist-info/METADATA,sha256=6VfPb2t_SXzOL3LDbCK2N6DoTTjJkRmDlfzRu00LcM0,13949
154
- growsurf_python-1.8.0.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
155
- growsurf_python-1.8.0.dist-info/licenses/LICENSE,sha256=kTHLVE-ra1gtTxcn395uFqcOzcErebE-mDdPNW7b8OU,11338
156
- growsurf_python-1.8.0.dist-info/RECORD,,
155
+ growsurf_python-1.9.0.dist-info/METADATA,sha256=yheSjK7zOq3Tmoj0YXsrt5_qT8Zou9nQwqYxK-w5pNU,13949
156
+ growsurf_python-1.9.0.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
157
+ growsurf_python-1.9.0.dist-info/licenses/LICENSE,sha256=kTHLVE-ra1gtTxcn395uFqcOzcErebE-mDdPNW7b8OU,11338
158
+ growsurf_python-1.9.0.dist-info/RECORD,,