growsurf-python 0.1.1__tar.gz → 0.3.0__tar.gz

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 (120) hide show
  1. growsurf_python-0.3.0/.release-please-manifest.json +3 -0
  2. {growsurf_python-0.1.1 → growsurf_python-0.3.0}/CHANGELOG.md +16 -0
  3. {growsurf_python-0.1.1 → growsurf_python-0.3.0}/PKG-INFO +1 -1
  4. {growsurf_python-0.1.1 → growsurf_python-0.3.0}/api.md +3 -2
  5. {growsurf_python-0.1.1 → growsurf_python-0.3.0}/pyproject.toml +1 -1
  6. {growsurf_python-0.1.1 → growsurf_python-0.3.0}/src/growsurf/_version.py +1 -1
  7. {growsurf_python-0.1.1 → growsurf_python-0.3.0}/src/growsurf/resources/campaign/campaign.py +137 -0
  8. {growsurf_python-0.1.1 → growsurf_python-0.3.0}/src/growsurf/resources/campaign/participant.py +0 -101
  9. {growsurf_python-0.1.1 → growsurf_python-0.3.0}/src/growsurf/types/__init__.py +6 -0
  10. {growsurf_python-0.1.1 → growsurf_python-0.3.0}/src/growsurf/types/campaign/__init__.py +0 -3
  11. growsurf_python-0.3.0/src/growsurf/types/campaign_create_mobile_participant_token_params.py +30 -0
  12. growsurf_python-0.3.0/src/growsurf/types/campaign_create_mobile_participant_token_response.py +24 -0
  13. {growsurf_python-0.1.1 → growsurf_python-0.3.0}/src/growsurf/types/campaign_retrieve_analytics_response.py +6 -0
  14. {growsurf_python-0.1.1 → growsurf_python-0.3.0}/tests/api_resources/campaign/test_participant.py +20 -135
  15. {growsurf_python-0.1.1 → growsurf_python-0.3.0}/tests/api_resources/test_campaign.py +125 -0
  16. growsurf_python-0.1.1/.release-please-manifest.json +0 -3
  17. growsurf_python-0.1.1/src/growsurf/types/campaign/participant_create_mobile_token_response.py +0 -15
  18. {growsurf_python-0.1.1 → growsurf_python-0.3.0}/.gitignore +0 -0
  19. {growsurf_python-0.1.1 → growsurf_python-0.3.0}/CONTRIBUTING.md +0 -0
  20. {growsurf_python-0.1.1 → growsurf_python-0.3.0}/LICENSE +0 -0
  21. {growsurf_python-0.1.1 → growsurf_python-0.3.0}/README.md +0 -0
  22. {growsurf_python-0.1.1 → growsurf_python-0.3.0}/SECURITY.md +0 -0
  23. {growsurf_python-0.1.1 → growsurf_python-0.3.0}/bin/check-release-environment +0 -0
  24. {growsurf_python-0.1.1 → growsurf_python-0.3.0}/bin/publish-pypi +0 -0
  25. {growsurf_python-0.1.1 → growsurf_python-0.3.0}/examples/.keep +0 -0
  26. {growsurf_python-0.1.1 → growsurf_python-0.3.0}/release-please-config.json +0 -0
  27. {growsurf_python-0.1.1 → growsurf_python-0.3.0}/requirements-dev.lock +0 -0
  28. {growsurf_python-0.1.1 → growsurf_python-0.3.0}/src/growsurf/__init__.py +0 -0
  29. {growsurf_python-0.1.1 → growsurf_python-0.3.0}/src/growsurf/_base_client.py +0 -0
  30. {growsurf_python-0.1.1 → growsurf_python-0.3.0}/src/growsurf/_client.py +0 -0
  31. {growsurf_python-0.1.1 → growsurf_python-0.3.0}/src/growsurf/_compat.py +0 -0
  32. {growsurf_python-0.1.1 → growsurf_python-0.3.0}/src/growsurf/_constants.py +0 -0
  33. {growsurf_python-0.1.1 → growsurf_python-0.3.0}/src/growsurf/_exceptions.py +0 -0
  34. {growsurf_python-0.1.1 → growsurf_python-0.3.0}/src/growsurf/_files.py +0 -0
  35. {growsurf_python-0.1.1 → growsurf_python-0.3.0}/src/growsurf/_models.py +0 -0
  36. {growsurf_python-0.1.1 → growsurf_python-0.3.0}/src/growsurf/_qs.py +0 -0
  37. {growsurf_python-0.1.1 → growsurf_python-0.3.0}/src/growsurf/_resource.py +0 -0
  38. {growsurf_python-0.1.1 → growsurf_python-0.3.0}/src/growsurf/_response.py +0 -0
  39. {growsurf_python-0.1.1 → growsurf_python-0.3.0}/src/growsurf/_streaming.py +0 -0
  40. {growsurf_python-0.1.1 → growsurf_python-0.3.0}/src/growsurf/_types.py +0 -0
  41. {growsurf_python-0.1.1 → growsurf_python-0.3.0}/src/growsurf/_utils/__init__.py +0 -0
  42. {growsurf_python-0.1.1 → growsurf_python-0.3.0}/src/growsurf/_utils/_compat.py +0 -0
  43. {growsurf_python-0.1.1 → growsurf_python-0.3.0}/src/growsurf/_utils/_datetime_parse.py +0 -0
  44. {growsurf_python-0.1.1 → growsurf_python-0.3.0}/src/growsurf/_utils/_json.py +0 -0
  45. {growsurf_python-0.1.1 → growsurf_python-0.3.0}/src/growsurf/_utils/_logs.py +0 -0
  46. {growsurf_python-0.1.1 → growsurf_python-0.3.0}/src/growsurf/_utils/_path.py +0 -0
  47. {growsurf_python-0.1.1 → growsurf_python-0.3.0}/src/growsurf/_utils/_proxy.py +0 -0
  48. {growsurf_python-0.1.1 → growsurf_python-0.3.0}/src/growsurf/_utils/_reflection.py +0 -0
  49. {growsurf_python-0.1.1 → growsurf_python-0.3.0}/src/growsurf/_utils/_resources_proxy.py +0 -0
  50. {growsurf_python-0.1.1 → growsurf_python-0.3.0}/src/growsurf/_utils/_streams.py +0 -0
  51. {growsurf_python-0.1.1 → growsurf_python-0.3.0}/src/growsurf/_utils/_sync.py +0 -0
  52. {growsurf_python-0.1.1 → growsurf_python-0.3.0}/src/growsurf/_utils/_transform.py +0 -0
  53. {growsurf_python-0.1.1 → growsurf_python-0.3.0}/src/growsurf/_utils/_typing.py +0 -0
  54. {growsurf_python-0.1.1 → growsurf_python-0.3.0}/src/growsurf/_utils/_utils.py +0 -0
  55. {growsurf_python-0.1.1 → growsurf_python-0.3.0}/src/growsurf/lib/.keep +0 -0
  56. {growsurf_python-0.1.1 → growsurf_python-0.3.0}/src/growsurf/py.typed +0 -0
  57. {growsurf_python-0.1.1 → growsurf_python-0.3.0}/src/growsurf/resources/__init__.py +0 -0
  58. {growsurf_python-0.1.1 → growsurf_python-0.3.0}/src/growsurf/resources/campaign/__init__.py +0 -0
  59. {growsurf_python-0.1.1 → growsurf_python-0.3.0}/src/growsurf/resources/campaign/commission.py +0 -0
  60. {growsurf_python-0.1.1 → growsurf_python-0.3.0}/src/growsurf/resources/campaign/reward.py +0 -0
  61. {growsurf_python-0.1.1 → growsurf_python-0.3.0}/src/growsurf/types/campaign/campaign.py +0 -0
  62. {growsurf_python-0.1.1 → growsurf_python-0.3.0}/src/growsurf/types/campaign/commission_approve_response.py +0 -0
  63. {growsurf_python-0.1.1 → growsurf_python-0.3.0}/src/growsurf/types/campaign/commission_delete_response.py +0 -0
  64. {growsurf_python-0.1.1 → growsurf_python-0.3.0}/src/growsurf/types/campaign/fraud_risk_level.py +0 -0
  65. {growsurf_python-0.1.1 → growsurf_python-0.3.0}/src/growsurf/types/campaign/participant.py +0 -0
  66. {growsurf_python-0.1.1 → growsurf_python-0.3.0}/src/growsurf/types/campaign/participant_add_params.py +0 -0
  67. {growsurf_python-0.1.1 → growsurf_python-0.3.0}/src/growsurf/types/campaign/participant_delete_response.py +0 -0
  68. {growsurf_python-0.1.1 → growsurf_python-0.3.0}/src/growsurf/types/campaign/participant_list_commissions_params.py +0 -0
  69. {growsurf_python-0.1.1 → growsurf_python-0.3.0}/src/growsurf/types/campaign/participant_list_payouts_params.py +0 -0
  70. {growsurf_python-0.1.1 → growsurf_python-0.3.0}/src/growsurf/types/campaign/participant_list_referrals_params.py +0 -0
  71. {growsurf_python-0.1.1 → growsurf_python-0.3.0}/src/growsurf/types/campaign/participant_list_rewards_params.py +0 -0
  72. {growsurf_python-0.1.1 → growsurf_python-0.3.0}/src/growsurf/types/campaign/participant_list_rewards_response.py +0 -0
  73. {growsurf_python-0.1.1 → growsurf_python-0.3.0}/src/growsurf/types/campaign/participant_record_transaction_params.py +0 -0
  74. {growsurf_python-0.1.1 → growsurf_python-0.3.0}/src/growsurf/types/campaign/participant_record_transaction_response.py +0 -0
  75. {growsurf_python-0.1.1 → growsurf_python-0.3.0}/src/growsurf/types/campaign/participant_reward.py +0 -0
  76. {growsurf_python-0.1.1 → growsurf_python-0.3.0}/src/growsurf/types/campaign/participant_send_invites_params.py +0 -0
  77. {growsurf_python-0.1.1 → growsurf_python-0.3.0}/src/growsurf/types/campaign/participant_send_invites_response.py +0 -0
  78. {growsurf_python-0.1.1 → growsurf_python-0.3.0}/src/growsurf/types/campaign/participant_trigger_referral_response.py +0 -0
  79. {growsurf_python-0.1.1 → growsurf_python-0.3.0}/src/growsurf/types/campaign/participant_update_params.py +0 -0
  80. {growsurf_python-0.1.1 → growsurf_python-0.3.0}/src/growsurf/types/campaign/referral_source.py +0 -0
  81. {growsurf_python-0.1.1 → growsurf_python-0.3.0}/src/growsurf/types/campaign/referral_status.py +0 -0
  82. {growsurf_python-0.1.1 → growsurf_python-0.3.0}/src/growsurf/types/campaign/reward_approve_params.py +0 -0
  83. {growsurf_python-0.1.1 → growsurf_python-0.3.0}/src/growsurf/types/campaign/reward_approve_response.py +0 -0
  84. {growsurf_python-0.1.1 → growsurf_python-0.3.0}/src/growsurf/types/campaign/reward_delete_response.py +0 -0
  85. {growsurf_python-0.1.1 → growsurf_python-0.3.0}/src/growsurf/types/campaign/reward_fulfill_response.py +0 -0
  86. {growsurf_python-0.1.1 → growsurf_python-0.3.0}/src/growsurf/types/campaign_list_commissions_params.py +0 -0
  87. {growsurf_python-0.1.1 → growsurf_python-0.3.0}/src/growsurf/types/campaign_list_leaderboard_params.py +0 -0
  88. {growsurf_python-0.1.1 → growsurf_python-0.3.0}/src/growsurf/types/campaign_list_participants_params.py +0 -0
  89. {growsurf_python-0.1.1 → growsurf_python-0.3.0}/src/growsurf/types/campaign_list_payouts_params.py +0 -0
  90. {growsurf_python-0.1.1 → growsurf_python-0.3.0}/src/growsurf/types/campaign_list_referrals_params.py +0 -0
  91. {growsurf_python-0.1.1 → growsurf_python-0.3.0}/src/growsurf/types/campaign_list_response.py +0 -0
  92. {growsurf_python-0.1.1 → growsurf_python-0.3.0}/src/growsurf/types/campaign_retrieve_analytics_params.py +0 -0
  93. {growsurf_python-0.1.1 → growsurf_python-0.3.0}/src/growsurf/types/commission_structure.py +0 -0
  94. {growsurf_python-0.1.1 → growsurf_python-0.3.0}/src/growsurf/types/participant_commission_list.py +0 -0
  95. {growsurf_python-0.1.1 → growsurf_python-0.3.0}/src/growsurf/types/participant_list.py +0 -0
  96. {growsurf_python-0.1.1 → growsurf_python-0.3.0}/src/growsurf/types/participant_payout_list.py +0 -0
  97. {growsurf_python-0.1.1 → growsurf_python-0.3.0}/src/growsurf/types/referral_list.py +0 -0
  98. {growsurf_python-0.1.1 → growsurf_python-0.3.0}/tests/__init__.py +0 -0
  99. {growsurf_python-0.1.1 → growsurf_python-0.3.0}/tests/api_resources/__init__.py +0 -0
  100. {growsurf_python-0.1.1 → growsurf_python-0.3.0}/tests/api_resources/campaign/__init__.py +0 -0
  101. {growsurf_python-0.1.1 → growsurf_python-0.3.0}/tests/api_resources/campaign/test_commission.py +0 -0
  102. {growsurf_python-0.1.1 → growsurf_python-0.3.0}/tests/api_resources/campaign/test_reward.py +0 -0
  103. {growsurf_python-0.1.1 → growsurf_python-0.3.0}/tests/conftest.py +0 -0
  104. {growsurf_python-0.1.1 → growsurf_python-0.3.0}/tests/sample_file.txt +0 -0
  105. {growsurf_python-0.1.1 → growsurf_python-0.3.0}/tests/test_client.py +0 -0
  106. {growsurf_python-0.1.1 → growsurf_python-0.3.0}/tests/test_extract_files.py +0 -0
  107. {growsurf_python-0.1.1 → growsurf_python-0.3.0}/tests/test_files.py +0 -0
  108. {growsurf_python-0.1.1 → growsurf_python-0.3.0}/tests/test_models.py +0 -0
  109. {growsurf_python-0.1.1 → growsurf_python-0.3.0}/tests/test_qs.py +0 -0
  110. {growsurf_python-0.1.1 → growsurf_python-0.3.0}/tests/test_required_args.py +0 -0
  111. {growsurf_python-0.1.1 → growsurf_python-0.3.0}/tests/test_response.py +0 -0
  112. {growsurf_python-0.1.1 → growsurf_python-0.3.0}/tests/test_streaming.py +0 -0
  113. {growsurf_python-0.1.1 → growsurf_python-0.3.0}/tests/test_transform.py +0 -0
  114. {growsurf_python-0.1.1 → growsurf_python-0.3.0}/tests/test_utils/test_datetime_parse.py +0 -0
  115. {growsurf_python-0.1.1 → growsurf_python-0.3.0}/tests/test_utils/test_json.py +0 -0
  116. {growsurf_python-0.1.1 → growsurf_python-0.3.0}/tests/test_utils/test_path.py +0 -0
  117. {growsurf_python-0.1.1 → growsurf_python-0.3.0}/tests/test_utils/test_proxy.py +0 -0
  118. {growsurf_python-0.1.1 → growsurf_python-0.3.0}/tests/test_utils/test_typing.py +0 -0
  119. {growsurf_python-0.1.1 → growsurf_python-0.3.0}/tests/utils.py +0 -0
  120. {growsurf_python-0.1.1 → growsurf_python-0.3.0}/uv.lock +0 -0
@@ -0,0 +1,3 @@
1
+ {
2
+ ".": "0.3.0"
3
+ }
@@ -1,5 +1,21 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.3.0 (2026-05-19)
4
+
5
+ Full Changelog: [v0.2.0...v0.3.0](https://github.com/growsurf/growsurf-python/compare/v0.2.0...v0.3.0)
6
+
7
+ ### Features
8
+
9
+ * **api:** manual updates ([fa106aa](https://github.com/growsurf/growsurf-python/commit/fa106aacec6012c1edd197e17f39bd05fb0396ec))
10
+
11
+ ## 0.2.0 (2026-05-15)
12
+
13
+ Full Changelog: [v0.1.1...v0.2.0](https://github.com/growsurf/growsurf-python/compare/v0.1.1...v0.2.0)
14
+
15
+ ### Features
16
+
17
+ * **api:** manual updates ([fd54cd8](https://github.com/growsurf/growsurf-python/commit/fd54cd81f974f1db00aac592f457fe6e7b4af86a))
18
+
3
19
  ## 0.1.1 (2026-05-13)
4
20
 
5
21
  Full Changelog: [v0.1.0...v0.1.1](https://github.com/growsurf/growsurf-python/compare/v0.1.0...v0.1.1)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: growsurf-python
3
- Version: 0.1.1
3
+ Version: 0.3.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
@@ -11,6 +11,7 @@ from growsurf.types import (
11
11
  ParticipantPayoutList,
12
12
  ReferralList,
13
13
  CampaignListResponse,
14
+ CampaignCreateMobileParticipantTokenResponse,
14
15
  CampaignRetrieveAnalyticsResponse,
15
16
  )
16
17
  ```
@@ -19,6 +20,7 @@ Methods:
19
20
 
20
21
  - <code title="get /campaign/{id}">client.campaign.<a href="./src/growsurf/resources/campaign/campaign.py">retrieve</a>(id) -> <a href="./src/growsurf/types/campaign/campaign.py">Campaign</a></code>
21
22
  - <code title="get /campaigns">client.campaign.<a href="./src/growsurf/resources/campaign/campaign.py">list</a>() -> <a href="./src/growsurf/types/campaign_list_response.py">CampaignListResponse</a></code>
23
+ - <code title="post /campaign/{id}/mobile-participant-token">client.campaign.<a href="./src/growsurf/resources/campaign/campaign.py">create_mobile_participant_token</a>(id, \*\*<a href="src/growsurf/types/campaign_create_mobile_participant_token_params.py">params</a>) -> <a href="./src/growsurf/types/campaign_create_mobile_participant_token_response.py">CampaignCreateMobileParticipantTokenResponse</a></code>
22
24
  - <code title="get /campaign/{id}/commissions">client.campaign.<a href="./src/growsurf/resources/campaign/campaign.py">list_commissions</a>(id, \*\*<a href="src/growsurf/types/campaign_list_commissions_params.py">params</a>) -> <a href="./src/growsurf/types/participant_commission_list.py">ParticipantCommissionList</a></code>
23
25
  - <code title="get /campaign/{id}/leaderboard">client.campaign.<a href="./src/growsurf/resources/campaign/campaign.py">list_leaderboard</a>(id, \*\*<a href="src/growsurf/types/campaign_list_leaderboard_params.py">params</a>) -> <a href="./src/growsurf/types/participant_list.py">ParticipantList</a></code>
24
26
  - <code title="get /campaign/{id}/participants">client.campaign.<a href="./src/growsurf/resources/campaign/campaign.py">list_participants</a>(id, \*\*<a href="src/growsurf/types/campaign_list_participants_params.py">params</a>) -> <a href="./src/growsurf/types/participant_list.py">ParticipantList</a></code>
@@ -32,13 +34,13 @@ Types:
32
34
 
33
35
  ```python
34
36
  from growsurf.types.campaign import (
37
+ Create,
35
38
  FraudRiskLevel,
36
39
  Participant,
37
40
  ParticipantReward,
38
41
  ReferralSource,
39
42
  ReferralStatus,
40
43
  ParticipantDeleteResponse,
41
- ParticipantCreateMobileTokenResponse,
42
44
  ParticipantListRewardsResponse,
43
45
  ParticipantRecordTransactionResponse,
44
46
  ParticipantSendInvitesResponse,
@@ -52,7 +54,6 @@ Methods:
52
54
  - <code title="post /campaign/{id}/participant/{participantIdOrEmail}">client.campaign.participant.<a href="./src/growsurf/resources/campaign/participant.py">update</a>(participant_id_or_email, \*, id, \*\*<a href="src/growsurf/types/campaign/participant_update_params.py">params</a>) -> <a href="./src/growsurf/types/campaign/participant.py">Participant</a></code>
53
55
  - <code title="delete /campaign/{id}/participant/{participantIdOrEmail}">client.campaign.participant.<a href="./src/growsurf/resources/campaign/participant.py">delete</a>(participant_id_or_email, \*, id) -> <a href="./src/growsurf/types/campaign/participant_delete_response.py">ParticipantDeleteResponse</a></code>
54
56
  - <code title="post /campaign/{id}/participant">client.campaign.participant.<a href="./src/growsurf/resources/campaign/participant.py">add</a>(id, \*\*<a href="src/growsurf/types/campaign/participant_add_params.py">params</a>) -> <a href="./src/growsurf/types/campaign/participant.py">Participant</a></code>
55
- - <code title="post /campaign/{id}/participant/{participantIdOrEmail}/mobile-token">client.campaign.participant.<a href="./src/growsurf/resources/campaign/participant.py">create_mobile_token</a>(participant_id_or_email, \*, id) -> <a href="./src/growsurf/types/campaign/participant_create_mobile_token_response.py">ParticipantCreateMobileTokenResponse</a></code>
56
57
  - <code title="get /campaign/{id}/participant/{participantIdOrEmail}/commissions">client.campaign.participant.<a href="./src/growsurf/resources/campaign/participant.py">list_commissions</a>(participant_id_or_email, \*, id, \*\*<a href="src/growsurf/types/campaign/participant_list_commissions_params.py">params</a>) -> <a href="./src/growsurf/types/participant_commission_list.py">ParticipantCommissionList</a></code>
57
58
  - <code title="get /campaign/{id}/participant/{participantIdOrEmail}/payouts">client.campaign.participant.<a href="./src/growsurf/resources/campaign/participant.py">list_payouts</a>(participant_id_or_email, \*, id, \*\*<a href="src/growsurf/types/campaign/participant_list_payouts_params.py">params</a>) -> <a href="./src/growsurf/types/participant_payout_list.py">ParticipantPayoutList</a></code>
58
59
  - <code title="get /campaign/{id}/participant/{participantIdOrEmail}/referrals">client.campaign.participant.<a href="./src/growsurf/resources/campaign/participant.py">list_referrals</a>(participant_id_or_email, \*, id, \*\*<a href="src/growsurf/types/campaign/participant_list_referrals_params.py">params</a>) -> <a href="./src/growsurf/types/referral_list.py">ReferralList</a></code>
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "growsurf-python"
3
- version = "0.1.1"
3
+ version = "0.3.0"
4
4
  description = "The official Python library for the growsurf API"
5
5
  dynamic = ["readme"]
6
6
  license = "Apache-2.0"
@@ -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__ = "0.1.1" # x-release-please-version
4
+ __version__ = "0.3.0" # x-release-please-version
@@ -2,6 +2,7 @@
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
+ from typing import Dict
5
6
  from typing_extensions import Literal
6
7
 
7
8
  import httpx
@@ -21,6 +22,7 @@ from ...types import (
21
22
  campaign_list_leaderboard_params,
22
23
  campaign_list_participants_params,
23
24
  campaign_retrieve_analytics_params,
25
+ campaign_create_mobile_participant_token_params,
24
26
  )
25
27
  from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
26
28
  from ..._utils import path_template, maybe_transform, async_maybe_transform
@@ -58,6 +60,7 @@ from ...types.participant_payout_list import ParticipantPayoutList
58
60
  from ...types.campaign.referral_status import ReferralStatus
59
61
  from ...types.participant_commission_list import ParticipantCommissionList
60
62
  from ...types.campaign_retrieve_analytics_response import CampaignRetrieveAnalyticsResponse
63
+ from ...types.campaign_create_mobile_participant_token_response import CampaignCreateMobileParticipantTokenResponse
61
64
 
62
65
  __all__ = ["CampaignResource", "AsyncCampaignResource"]
63
66
 
@@ -148,6 +151,67 @@ class CampaignResource(SyncAPIResource):
148
151
  cast_to=CampaignListResponse,
149
152
  )
150
153
 
154
+ def create_mobile_participant_token(
155
+ self,
156
+ id: str,
157
+ *,
158
+ email: str,
159
+ fingerprint: str | Omit = omit,
160
+ first_name: str | Omit = omit,
161
+ ip_address: str | Omit = omit,
162
+ last_name: str | Omit = omit,
163
+ metadata: Dict[str, object] | Omit = omit,
164
+ referral_status: Literal["CREDIT_PENDING", "CREDIT_AWARDED"] | Omit = omit,
165
+ referred_by: str | Omit = omit,
166
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
167
+ # The extra values given here take precedence over values defined on the client or passed to this method.
168
+ extra_headers: Headers | None = None,
169
+ extra_query: Query | None = None,
170
+ extra_body: Body | None = None,
171
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
172
+ ) -> CampaignCreateMobileParticipantTokenResponse:
173
+ """
174
+ Creates or returns a participant using the same input behavior as Add
175
+ Participant, then returns a participant-scoped token for GrowSurf mobile SDK
176
+ participant endpoints. Use this endpoint from your backend after your mobile app
177
+ authenticates a signed-in user. The program must have mobile SDK access enabled.
178
+
179
+ Args:
180
+ metadata: Shallow custom metadata object.
181
+
182
+ referred_by: Referrer participant ID or email address.
183
+
184
+ extra_headers: Send extra headers
185
+
186
+ extra_query: Add additional query parameters to the request
187
+
188
+ extra_body: Add additional JSON properties to the request
189
+
190
+ timeout: Override the client-level default timeout for this request, in seconds
191
+ """
192
+ if not id:
193
+ raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
194
+ return self._post(
195
+ path_template("/campaign/{id}/mobile-participant-token", id=id),
196
+ body=maybe_transform(
197
+ {
198
+ "email": email,
199
+ "fingerprint": fingerprint,
200
+ "first_name": first_name,
201
+ "ip_address": ip_address,
202
+ "last_name": last_name,
203
+ "metadata": metadata,
204
+ "referral_status": referral_status,
205
+ "referred_by": referred_by,
206
+ },
207
+ campaign_create_mobile_participant_token_params.CampaignCreateMobileParticipantTokenParams,
208
+ ),
209
+ options=make_request_options(
210
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
211
+ ),
212
+ cast_to=CampaignCreateMobileParticipantTokenResponse,
213
+ )
214
+
151
215
  def list_commissions(
152
216
  self,
153
217
  id: str,
@@ -592,6 +656,67 @@ class AsyncCampaignResource(AsyncAPIResource):
592
656
  cast_to=CampaignListResponse,
593
657
  )
594
658
 
659
+ async def create_mobile_participant_token(
660
+ self,
661
+ id: str,
662
+ *,
663
+ email: str,
664
+ fingerprint: str | Omit = omit,
665
+ first_name: str | Omit = omit,
666
+ ip_address: str | Omit = omit,
667
+ last_name: str | Omit = omit,
668
+ metadata: Dict[str, object] | Omit = omit,
669
+ referral_status: Literal["CREDIT_PENDING", "CREDIT_AWARDED"] | Omit = omit,
670
+ referred_by: str | Omit = omit,
671
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
672
+ # The extra values given here take precedence over values defined on the client or passed to this method.
673
+ extra_headers: Headers | None = None,
674
+ extra_query: Query | None = None,
675
+ extra_body: Body | None = None,
676
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
677
+ ) -> CampaignCreateMobileParticipantTokenResponse:
678
+ """
679
+ Creates or returns a participant using the same input behavior as Add
680
+ Participant, then returns a participant-scoped token for GrowSurf mobile SDK
681
+ participant endpoints. Use this endpoint from your backend after your mobile app
682
+ authenticates a signed-in user. The program must have mobile SDK access enabled.
683
+
684
+ Args:
685
+ metadata: Shallow custom metadata object.
686
+
687
+ referred_by: Referrer participant ID or email address.
688
+
689
+ extra_headers: Send extra headers
690
+
691
+ extra_query: Add additional query parameters to the request
692
+
693
+ extra_body: Add additional JSON properties to the request
694
+
695
+ timeout: Override the client-level default timeout for this request, in seconds
696
+ """
697
+ if not id:
698
+ raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
699
+ return await self._post(
700
+ path_template("/campaign/{id}/mobile-participant-token", id=id),
701
+ body=await async_maybe_transform(
702
+ {
703
+ "email": email,
704
+ "fingerprint": fingerprint,
705
+ "first_name": first_name,
706
+ "ip_address": ip_address,
707
+ "last_name": last_name,
708
+ "metadata": metadata,
709
+ "referral_status": referral_status,
710
+ "referred_by": referred_by,
711
+ },
712
+ campaign_create_mobile_participant_token_params.CampaignCreateMobileParticipantTokenParams,
713
+ ),
714
+ options=make_request_options(
715
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
716
+ ),
717
+ cast_to=CampaignCreateMobileParticipantTokenResponse,
718
+ )
719
+
595
720
  async def list_commissions(
596
721
  self,
597
722
  id: str,
@@ -960,6 +1085,9 @@ class CampaignResourceWithRawResponse:
960
1085
  self.list = to_raw_response_wrapper(
961
1086
  campaign.list,
962
1087
  )
1088
+ self.create_mobile_participant_token = to_raw_response_wrapper(
1089
+ campaign.create_mobile_participant_token,
1090
+ )
963
1091
  self.list_commissions = to_raw_response_wrapper(
964
1092
  campaign.list_commissions,
965
1093
  )
@@ -1004,6 +1132,9 @@ class AsyncCampaignResourceWithRawResponse:
1004
1132
  self.list = async_to_raw_response_wrapper(
1005
1133
  campaign.list,
1006
1134
  )
1135
+ self.create_mobile_participant_token = async_to_raw_response_wrapper(
1136
+ campaign.create_mobile_participant_token,
1137
+ )
1007
1138
  self.list_commissions = async_to_raw_response_wrapper(
1008
1139
  campaign.list_commissions,
1009
1140
  )
@@ -1048,6 +1179,9 @@ class CampaignResourceWithStreamingResponse:
1048
1179
  self.list = to_streamed_response_wrapper(
1049
1180
  campaign.list,
1050
1181
  )
1182
+ self.create_mobile_participant_token = to_streamed_response_wrapper(
1183
+ campaign.create_mobile_participant_token,
1184
+ )
1051
1185
  self.list_commissions = to_streamed_response_wrapper(
1052
1186
  campaign.list_commissions,
1053
1187
  )
@@ -1092,6 +1226,9 @@ class AsyncCampaignResourceWithStreamingResponse:
1092
1226
  self.list = async_to_streamed_response_wrapper(
1093
1227
  campaign.list,
1094
1228
  )
1229
+ self.create_mobile_participant_token = async_to_streamed_response_wrapper(
1230
+ campaign.create_mobile_participant_token,
1231
+ )
1095
1232
  self.list_commissions = async_to_streamed_response_wrapper(
1096
1233
  campaign.list_commissions,
1097
1234
  )
@@ -39,7 +39,6 @@ from ...types.campaign.participant_list_rewards_response import ParticipantListR
39
39
  from ...types.campaign.participant_send_invites_response import ParticipantSendInvitesResponse
40
40
  from ...types.campaign.participant_trigger_referral_response import ParticipantTriggerReferralResponse
41
41
  from ...types.campaign.participant_record_transaction_response import ParticipantRecordTransactionResponse
42
- from ...types.campaign.participant_create_mobile_token_response import ParticipantCreateMobileTokenResponse
43
42
 
44
43
  __all__ = ["ParticipantResource", "AsyncParticipantResource"]
45
44
 
@@ -273,50 +272,6 @@ class ParticipantResource(SyncAPIResource):
273
272
  cast_to=Participant,
274
273
  )
275
274
 
276
- def create_mobile_token(
277
- self,
278
- participant_id_or_email: str,
279
- *,
280
- id: str,
281
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
282
- # The extra values given here take precedence over values defined on the client or passed to this method.
283
- extra_headers: Headers | None = None,
284
- extra_query: Query | None = None,
285
- extra_body: Body | None = None,
286
- timeout: float | httpx.Timeout | None | NotGiven = not_given,
287
- ) -> ParticipantCreateMobileTokenResponse:
288
- """Creates a participant-scoped token for GrowSurf mobile SDK participant
289
- endpoints.
290
-
291
- The program must have mobile SDK access enabled.
292
-
293
- Args:
294
- extra_headers: Send extra headers
295
-
296
- extra_query: Add additional query parameters to the request
297
-
298
- extra_body: Add additional JSON properties to the request
299
-
300
- timeout: Override the client-level default timeout for this request, in seconds
301
- """
302
- if not id:
303
- raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
304
- if not participant_id_or_email:
305
- raise ValueError(
306
- f"Expected a non-empty value for `participant_id_or_email` but received {participant_id_or_email!r}"
307
- )
308
- return self._post(
309
- path_template(
310
- "/campaign/{id}/participant/{participant_id_or_email}/mobile-token",
311
- id=id,
312
- participant_id_or_email=participant_id_or_email,
313
- ),
314
- options=make_request_options(
315
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
316
- ),
317
- cast_to=ParticipantCreateMobileTokenResponse,
318
- )
319
-
320
275
  def list_commissions(
321
276
  self,
322
277
  participant_id_or_email: str,
@@ -1011,50 +966,6 @@ class AsyncParticipantResource(AsyncAPIResource):
1011
966
  cast_to=Participant,
1012
967
  )
1013
968
 
1014
- async def create_mobile_token(
1015
- self,
1016
- participant_id_or_email: str,
1017
- *,
1018
- id: str,
1019
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
1020
- # The extra values given here take precedence over values defined on the client or passed to this method.
1021
- extra_headers: Headers | None = None,
1022
- extra_query: Query | None = None,
1023
- extra_body: Body | None = None,
1024
- timeout: float | httpx.Timeout | None | NotGiven = not_given,
1025
- ) -> ParticipantCreateMobileTokenResponse:
1026
- """Creates a participant-scoped token for GrowSurf mobile SDK participant
1027
- endpoints.
1028
-
1029
- The program must have mobile SDK access enabled.
1030
-
1031
- Args:
1032
- extra_headers: Send extra headers
1033
-
1034
- extra_query: Add additional query parameters to the request
1035
-
1036
- extra_body: Add additional JSON properties to the request
1037
-
1038
- timeout: Override the client-level default timeout for this request, in seconds
1039
- """
1040
- if not id:
1041
- raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
1042
- if not participant_id_or_email:
1043
- raise ValueError(
1044
- f"Expected a non-empty value for `participant_id_or_email` but received {participant_id_or_email!r}"
1045
- )
1046
- return await self._post(
1047
- path_template(
1048
- "/campaign/{id}/participant/{participant_id_or_email}/mobile-token",
1049
- id=id,
1050
- participant_id_or_email=participant_id_or_email,
1051
- ),
1052
- options=make_request_options(
1053
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
1054
- ),
1055
- cast_to=ParticipantCreateMobileTokenResponse,
1056
- )
1057
-
1058
969
  async def list_commissions(
1059
970
  self,
1060
971
  participant_id_or_email: str,
@@ -1536,9 +1447,6 @@ class ParticipantResourceWithRawResponse:
1536
1447
  self.add = to_raw_response_wrapper(
1537
1448
  participant.add,
1538
1449
  )
1539
- self.create_mobile_token = to_raw_response_wrapper(
1540
- participant.create_mobile_token,
1541
- )
1542
1450
  self.list_commissions = to_raw_response_wrapper(
1543
1451
  participant.list_commissions,
1544
1452
  )
@@ -1578,9 +1486,6 @@ class AsyncParticipantResourceWithRawResponse:
1578
1486
  self.add = async_to_raw_response_wrapper(
1579
1487
  participant.add,
1580
1488
  )
1581
- self.create_mobile_token = async_to_raw_response_wrapper(
1582
- participant.create_mobile_token,
1583
- )
1584
1489
  self.list_commissions = async_to_raw_response_wrapper(
1585
1490
  participant.list_commissions,
1586
1491
  )
@@ -1620,9 +1525,6 @@ class ParticipantResourceWithStreamingResponse:
1620
1525
  self.add = to_streamed_response_wrapper(
1621
1526
  participant.add,
1622
1527
  )
1623
- self.create_mobile_token = to_streamed_response_wrapper(
1624
- participant.create_mobile_token,
1625
- )
1626
1528
  self.list_commissions = to_streamed_response_wrapper(
1627
1529
  participant.list_commissions,
1628
1530
  )
@@ -1662,9 +1564,6 @@ class AsyncParticipantResourceWithStreamingResponse:
1662
1564
  self.add = async_to_streamed_response_wrapper(
1663
1565
  participant.add,
1664
1566
  )
1665
- self.create_mobile_token = async_to_streamed_response_wrapper(
1666
- participant.create_mobile_token,
1667
- )
1668
1567
  self.list_commissions = async_to_streamed_response_wrapper(
1669
1568
  participant.list_commissions,
1670
1569
  )
@@ -16,3 +16,9 @@ from .campaign_list_leaderboard_params import CampaignListLeaderboardParams as C
16
16
  from .campaign_list_participants_params import CampaignListParticipantsParams as CampaignListParticipantsParams
17
17
  from .campaign_retrieve_analytics_params import CampaignRetrieveAnalyticsParams as CampaignRetrieveAnalyticsParams
18
18
  from .campaign_retrieve_analytics_response import CampaignRetrieveAnalyticsResponse as CampaignRetrieveAnalyticsResponse
19
+ from .campaign_create_mobile_participant_token_params import (
20
+ CampaignCreateMobileParticipantTokenParams as CampaignCreateMobileParticipantTokenParams,
21
+ )
22
+ from .campaign_create_mobile_participant_token_response import (
23
+ CampaignCreateMobileParticipantTokenResponse as CampaignCreateMobileParticipantTokenResponse,
24
+ )
@@ -33,6 +33,3 @@ from .participant_trigger_referral_response import (
33
33
  from .participant_record_transaction_response import (
34
34
  ParticipantRecordTransactionResponse as ParticipantRecordTransactionResponse,
35
35
  )
36
- from .participant_create_mobile_token_response import (
37
- ParticipantCreateMobileTokenResponse as ParticipantCreateMobileTokenResponse,
38
- )
@@ -0,0 +1,30 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing import Dict
6
+ from typing_extensions import Literal, Required, Annotated, TypedDict
7
+
8
+ from .._utils import PropertyInfo
9
+
10
+ __all__ = ["CampaignCreateMobileParticipantTokenParams"]
11
+
12
+
13
+ class CampaignCreateMobileParticipantTokenParams(TypedDict, total=False):
14
+ email: Required[str]
15
+
16
+ fingerprint: str
17
+
18
+ first_name: Annotated[str, PropertyInfo(alias="firstName")]
19
+
20
+ ip_address: Annotated[str, PropertyInfo(alias="ipAddress")]
21
+
22
+ last_name: Annotated[str, PropertyInfo(alias="lastName")]
23
+
24
+ metadata: Dict[str, object]
25
+ """Shallow custom metadata object."""
26
+
27
+ referral_status: Annotated[Literal["CREDIT_PENDING", "CREDIT_AWARDED"], PropertyInfo(alias="referralStatus")]
28
+
29
+ referred_by: Annotated[str, PropertyInfo(alias="referredBy")]
30
+ """Referrer participant ID or email address."""
@@ -0,0 +1,24 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from pydantic import Field as FieldInfo
4
+
5
+ from .._models import BaseModel
6
+ from .campaign.participant import Participant
7
+
8
+ __all__ = ["CampaignCreateMobileParticipantTokenResponse"]
9
+
10
+
11
+ class CampaignCreateMobileParticipantTokenResponse(BaseModel):
12
+ expires_in: int = FieldInfo(alias="expiresIn")
13
+ """Token lifetime in seconds."""
14
+
15
+ is_new: bool = FieldInfo(alias="isNew")
16
+ """Whether this request created a new participant.
17
+
18
+ Returns false when the participant already existed.
19
+ """
20
+
21
+ participant: Participant
22
+
23
+ participant_token: str = FieldInfo(alias="participantToken")
24
+ """Participant-scoped bearer token for GrowSurf mobile SDK participant endpoints."""
@@ -10,8 +10,12 @@ __all__ = ["CampaignRetrieveAnalyticsResponse", "Analytics"]
10
10
 
11
11
 
12
12
  class Analytics(BaseModel):
13
+ android_native_shares: Optional[int] = FieldInfo(alias="androidNativeShares", default=None)
14
+
13
15
  bluesky_shares: Optional[int] = FieldInfo(alias="blueskyShares", default=None)
14
16
 
17
+ copy_ref_link_shares: Optional[int] = FieldInfo(alias="copyRefLinkShares", default=None)
18
+
15
19
  email_shares: Optional[int] = FieldInfo(alias="emailShares", default=None)
16
20
 
17
21
  facebook_shares: Optional[int] = FieldInfo(alias="facebookShares", default=None)
@@ -20,6 +24,8 @@ class Analytics(BaseModel):
20
24
 
21
25
  invites: Optional[int] = None
22
26
 
27
+ ios_native_shares: Optional[int] = FieldInfo(alias="iosNativeShares", default=None)
28
+
23
29
  linked_in_shares: Optional[int] = FieldInfo(alias="linkedInShares", default=None)
24
30
 
25
31
  messenger_shares: Optional[int] = FieldInfo(alias="messengerShares", default=None)