growsurf-python 0.2.0__py3-none-any.whl → 0.4.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 +1 -1
- growsurf/resources/campaign/campaign.py +147 -0
- growsurf/resources/campaign/participant.py +10 -101
- growsurf/types/__init__.py +6 -0
- growsurf/types/campaign/__init__.py +0 -3
- growsurf/types/campaign/participant.py +6 -0
- growsurf/types/campaign/participant_add_params.py +6 -0
- growsurf/types/campaign_create_mobile_participant_token_params.py +36 -0
- growsurf/types/campaign_create_mobile_participant_token_response.py +24 -0
- {growsurf_python-0.2.0.dist-info → growsurf_python-0.4.0.dist-info}/METADATA +1 -1
- {growsurf_python-0.2.0.dist-info → growsurf_python-0.4.0.dist-info}/RECORD +13 -12
- growsurf/types/campaign/participant_create_mobile_token_response.py +0 -15
- {growsurf_python-0.2.0.dist-info → growsurf_python-0.4.0.dist-info}/WHEEL +0 -0
- {growsurf_python-0.2.0.dist-info → growsurf_python-0.4.0.dist-info}/licenses/LICENSE +0 -0
growsurf/_version.py
CHANGED
|
@@ -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,72 @@ 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
|
+
mobile_instance_id: str | Omit = omit,
|
|
165
|
+
referral_status: Literal["CREDIT_PENDING", "CREDIT_AWARDED"] | Omit = omit,
|
|
166
|
+
referred_by: str | Omit = omit,
|
|
167
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
168
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
169
|
+
extra_headers: Headers | None = None,
|
|
170
|
+
extra_query: Query | None = None,
|
|
171
|
+
extra_body: Body | None = None,
|
|
172
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
173
|
+
) -> CampaignCreateMobileParticipantTokenResponse:
|
|
174
|
+
"""
|
|
175
|
+
Creates or returns a participant using the same input behavior as Add
|
|
176
|
+
Participant, then returns a participant-scoped token for GrowSurf mobile SDK
|
|
177
|
+
participant endpoints. Use this endpoint from your backend after your mobile app
|
|
178
|
+
authenticates a signed-in user. The program must have mobile SDK access enabled.
|
|
179
|
+
|
|
180
|
+
Args:
|
|
181
|
+
metadata: Shallow custom metadata object.
|
|
182
|
+
|
|
183
|
+
mobile_instance_id: Optional app-install scoped identifier for native mobile anti-fraud. Recommended
|
|
184
|
+
for mobile participant creation and mobile participant token flows.
|
|
185
|
+
|
|
186
|
+
referred_by: Referrer participant ID or email address.
|
|
187
|
+
|
|
188
|
+
extra_headers: Send extra headers
|
|
189
|
+
|
|
190
|
+
extra_query: Add additional query parameters to the request
|
|
191
|
+
|
|
192
|
+
extra_body: Add additional JSON properties to the request
|
|
193
|
+
|
|
194
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
195
|
+
"""
|
|
196
|
+
if not id:
|
|
197
|
+
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
|
|
198
|
+
return self._post(
|
|
199
|
+
path_template("/campaign/{id}/mobile-participant-token", id=id),
|
|
200
|
+
body=maybe_transform(
|
|
201
|
+
{
|
|
202
|
+
"email": email,
|
|
203
|
+
"fingerprint": fingerprint,
|
|
204
|
+
"first_name": first_name,
|
|
205
|
+
"ip_address": ip_address,
|
|
206
|
+
"last_name": last_name,
|
|
207
|
+
"metadata": metadata,
|
|
208
|
+
"mobile_instance_id": mobile_instance_id,
|
|
209
|
+
"referral_status": referral_status,
|
|
210
|
+
"referred_by": referred_by,
|
|
211
|
+
},
|
|
212
|
+
campaign_create_mobile_participant_token_params.CampaignCreateMobileParticipantTokenParams,
|
|
213
|
+
),
|
|
214
|
+
options=make_request_options(
|
|
215
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
216
|
+
),
|
|
217
|
+
cast_to=CampaignCreateMobileParticipantTokenResponse,
|
|
218
|
+
)
|
|
219
|
+
|
|
151
220
|
def list_commissions(
|
|
152
221
|
self,
|
|
153
222
|
id: str,
|
|
@@ -592,6 +661,72 @@ class AsyncCampaignResource(AsyncAPIResource):
|
|
|
592
661
|
cast_to=CampaignListResponse,
|
|
593
662
|
)
|
|
594
663
|
|
|
664
|
+
async def create_mobile_participant_token(
|
|
665
|
+
self,
|
|
666
|
+
id: str,
|
|
667
|
+
*,
|
|
668
|
+
email: str,
|
|
669
|
+
fingerprint: str | Omit = omit,
|
|
670
|
+
first_name: str | Omit = omit,
|
|
671
|
+
ip_address: str | Omit = omit,
|
|
672
|
+
last_name: str | Omit = omit,
|
|
673
|
+
metadata: Dict[str, object] | Omit = omit,
|
|
674
|
+
mobile_instance_id: str | Omit = omit,
|
|
675
|
+
referral_status: Literal["CREDIT_PENDING", "CREDIT_AWARDED"] | Omit = omit,
|
|
676
|
+
referred_by: str | Omit = omit,
|
|
677
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
678
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
679
|
+
extra_headers: Headers | None = None,
|
|
680
|
+
extra_query: Query | None = None,
|
|
681
|
+
extra_body: Body | None = None,
|
|
682
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
683
|
+
) -> CampaignCreateMobileParticipantTokenResponse:
|
|
684
|
+
"""
|
|
685
|
+
Creates or returns a participant using the same input behavior as Add
|
|
686
|
+
Participant, then returns a participant-scoped token for GrowSurf mobile SDK
|
|
687
|
+
participant endpoints. Use this endpoint from your backend after your mobile app
|
|
688
|
+
authenticates a signed-in user. The program must have mobile SDK access enabled.
|
|
689
|
+
|
|
690
|
+
Args:
|
|
691
|
+
metadata: Shallow custom metadata object.
|
|
692
|
+
|
|
693
|
+
mobile_instance_id: Optional app-install scoped identifier for native mobile anti-fraud. Recommended
|
|
694
|
+
for mobile participant creation and mobile participant token flows.
|
|
695
|
+
|
|
696
|
+
referred_by: Referrer participant ID or email address.
|
|
697
|
+
|
|
698
|
+
extra_headers: Send extra headers
|
|
699
|
+
|
|
700
|
+
extra_query: Add additional query parameters to the request
|
|
701
|
+
|
|
702
|
+
extra_body: Add additional JSON properties to the request
|
|
703
|
+
|
|
704
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
705
|
+
"""
|
|
706
|
+
if not id:
|
|
707
|
+
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
|
|
708
|
+
return await self._post(
|
|
709
|
+
path_template("/campaign/{id}/mobile-participant-token", id=id),
|
|
710
|
+
body=await async_maybe_transform(
|
|
711
|
+
{
|
|
712
|
+
"email": email,
|
|
713
|
+
"fingerprint": fingerprint,
|
|
714
|
+
"first_name": first_name,
|
|
715
|
+
"ip_address": ip_address,
|
|
716
|
+
"last_name": last_name,
|
|
717
|
+
"metadata": metadata,
|
|
718
|
+
"mobile_instance_id": mobile_instance_id,
|
|
719
|
+
"referral_status": referral_status,
|
|
720
|
+
"referred_by": referred_by,
|
|
721
|
+
},
|
|
722
|
+
campaign_create_mobile_participant_token_params.CampaignCreateMobileParticipantTokenParams,
|
|
723
|
+
),
|
|
724
|
+
options=make_request_options(
|
|
725
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
726
|
+
),
|
|
727
|
+
cast_to=CampaignCreateMobileParticipantTokenResponse,
|
|
728
|
+
)
|
|
729
|
+
|
|
595
730
|
async def list_commissions(
|
|
596
731
|
self,
|
|
597
732
|
id: str,
|
|
@@ -960,6 +1095,9 @@ class CampaignResourceWithRawResponse:
|
|
|
960
1095
|
self.list = to_raw_response_wrapper(
|
|
961
1096
|
campaign.list,
|
|
962
1097
|
)
|
|
1098
|
+
self.create_mobile_participant_token = to_raw_response_wrapper(
|
|
1099
|
+
campaign.create_mobile_participant_token,
|
|
1100
|
+
)
|
|
963
1101
|
self.list_commissions = to_raw_response_wrapper(
|
|
964
1102
|
campaign.list_commissions,
|
|
965
1103
|
)
|
|
@@ -1004,6 +1142,9 @@ class AsyncCampaignResourceWithRawResponse:
|
|
|
1004
1142
|
self.list = async_to_raw_response_wrapper(
|
|
1005
1143
|
campaign.list,
|
|
1006
1144
|
)
|
|
1145
|
+
self.create_mobile_participant_token = async_to_raw_response_wrapper(
|
|
1146
|
+
campaign.create_mobile_participant_token,
|
|
1147
|
+
)
|
|
1007
1148
|
self.list_commissions = async_to_raw_response_wrapper(
|
|
1008
1149
|
campaign.list_commissions,
|
|
1009
1150
|
)
|
|
@@ -1048,6 +1189,9 @@ class CampaignResourceWithStreamingResponse:
|
|
|
1048
1189
|
self.list = to_streamed_response_wrapper(
|
|
1049
1190
|
campaign.list,
|
|
1050
1191
|
)
|
|
1192
|
+
self.create_mobile_participant_token = to_streamed_response_wrapper(
|
|
1193
|
+
campaign.create_mobile_participant_token,
|
|
1194
|
+
)
|
|
1051
1195
|
self.list_commissions = to_streamed_response_wrapper(
|
|
1052
1196
|
campaign.list_commissions,
|
|
1053
1197
|
)
|
|
@@ -1092,6 +1236,9 @@ class AsyncCampaignResourceWithStreamingResponse:
|
|
|
1092
1236
|
self.list = async_to_streamed_response_wrapper(
|
|
1093
1237
|
campaign.list,
|
|
1094
1238
|
)
|
|
1239
|
+
self.create_mobile_participant_token = async_to_streamed_response_wrapper(
|
|
1240
|
+
campaign.create_mobile_participant_token,
|
|
1241
|
+
)
|
|
1095
1242
|
self.list_commissions = async_to_streamed_response_wrapper(
|
|
1096
1243
|
campaign.list_commissions,
|
|
1097
1244
|
)
|
|
@@ -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
|
|
|
@@ -223,6 +222,7 @@ class ParticipantResource(SyncAPIResource):
|
|
|
223
222
|
ip_address: str | Omit = omit,
|
|
224
223
|
last_name: str | Omit = omit,
|
|
225
224
|
metadata: Dict[str, object] | Omit = omit,
|
|
225
|
+
mobile_instance_id: str | Omit = omit,
|
|
226
226
|
referral_status: Literal["CREDIT_PENDING", "CREDIT_AWARDED"] | Omit = omit,
|
|
227
227
|
referred_by: str | Omit = omit,
|
|
228
228
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
@@ -240,6 +240,9 @@ class ParticipantResource(SyncAPIResource):
|
|
|
240
240
|
Args:
|
|
241
241
|
metadata: Shallow custom metadata object.
|
|
242
242
|
|
|
243
|
+
mobile_instance_id: Optional app-install scoped identifier for native mobile anti-fraud. Recommended
|
|
244
|
+
for mobile participant creation and mobile participant token flows.
|
|
245
|
+
|
|
243
246
|
referred_by: Referrer participant ID or email address.
|
|
244
247
|
|
|
245
248
|
extra_headers: Send extra headers
|
|
@@ -262,6 +265,7 @@ class ParticipantResource(SyncAPIResource):
|
|
|
262
265
|
"ip_address": ip_address,
|
|
263
266
|
"last_name": last_name,
|
|
264
267
|
"metadata": metadata,
|
|
268
|
+
"mobile_instance_id": mobile_instance_id,
|
|
265
269
|
"referral_status": referral_status,
|
|
266
270
|
"referred_by": referred_by,
|
|
267
271
|
},
|
|
@@ -273,50 +277,6 @@ class ParticipantResource(SyncAPIResource):
|
|
|
273
277
|
cast_to=Participant,
|
|
274
278
|
)
|
|
275
279
|
|
|
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
280
|
def list_commissions(
|
|
321
281
|
self,
|
|
322
282
|
participant_id_or_email: str,
|
|
@@ -961,6 +921,7 @@ class AsyncParticipantResource(AsyncAPIResource):
|
|
|
961
921
|
ip_address: str | Omit = omit,
|
|
962
922
|
last_name: str | Omit = omit,
|
|
963
923
|
metadata: Dict[str, object] | Omit = omit,
|
|
924
|
+
mobile_instance_id: str | Omit = omit,
|
|
964
925
|
referral_status: Literal["CREDIT_PENDING", "CREDIT_AWARDED"] | Omit = omit,
|
|
965
926
|
referred_by: str | Omit = omit,
|
|
966
927
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
@@ -978,6 +939,9 @@ class AsyncParticipantResource(AsyncAPIResource):
|
|
|
978
939
|
Args:
|
|
979
940
|
metadata: Shallow custom metadata object.
|
|
980
941
|
|
|
942
|
+
mobile_instance_id: Optional app-install scoped identifier for native mobile anti-fraud. Recommended
|
|
943
|
+
for mobile participant creation and mobile participant token flows.
|
|
944
|
+
|
|
981
945
|
referred_by: Referrer participant ID or email address.
|
|
982
946
|
|
|
983
947
|
extra_headers: Send extra headers
|
|
@@ -1000,6 +964,7 @@ class AsyncParticipantResource(AsyncAPIResource):
|
|
|
1000
964
|
"ip_address": ip_address,
|
|
1001
965
|
"last_name": last_name,
|
|
1002
966
|
"metadata": metadata,
|
|
967
|
+
"mobile_instance_id": mobile_instance_id,
|
|
1003
968
|
"referral_status": referral_status,
|
|
1004
969
|
"referred_by": referred_by,
|
|
1005
970
|
},
|
|
@@ -1011,50 +976,6 @@ class AsyncParticipantResource(AsyncAPIResource):
|
|
|
1011
976
|
cast_to=Participant,
|
|
1012
977
|
)
|
|
1013
978
|
|
|
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
979
|
async def list_commissions(
|
|
1059
980
|
self,
|
|
1060
981
|
participant_id_or_email: str,
|
|
@@ -1536,9 +1457,6 @@ class ParticipantResourceWithRawResponse:
|
|
|
1536
1457
|
self.add = to_raw_response_wrapper(
|
|
1537
1458
|
participant.add,
|
|
1538
1459
|
)
|
|
1539
|
-
self.create_mobile_token = to_raw_response_wrapper(
|
|
1540
|
-
participant.create_mobile_token,
|
|
1541
|
-
)
|
|
1542
1460
|
self.list_commissions = to_raw_response_wrapper(
|
|
1543
1461
|
participant.list_commissions,
|
|
1544
1462
|
)
|
|
@@ -1578,9 +1496,6 @@ class AsyncParticipantResourceWithRawResponse:
|
|
|
1578
1496
|
self.add = async_to_raw_response_wrapper(
|
|
1579
1497
|
participant.add,
|
|
1580
1498
|
)
|
|
1581
|
-
self.create_mobile_token = async_to_raw_response_wrapper(
|
|
1582
|
-
participant.create_mobile_token,
|
|
1583
|
-
)
|
|
1584
1499
|
self.list_commissions = async_to_raw_response_wrapper(
|
|
1585
1500
|
participant.list_commissions,
|
|
1586
1501
|
)
|
|
@@ -1620,9 +1535,6 @@ class ParticipantResourceWithStreamingResponse:
|
|
|
1620
1535
|
self.add = to_streamed_response_wrapper(
|
|
1621
1536
|
participant.add,
|
|
1622
1537
|
)
|
|
1623
|
-
self.create_mobile_token = to_streamed_response_wrapper(
|
|
1624
|
-
participant.create_mobile_token,
|
|
1625
|
-
)
|
|
1626
1538
|
self.list_commissions = to_streamed_response_wrapper(
|
|
1627
1539
|
participant.list_commissions,
|
|
1628
1540
|
)
|
|
@@ -1662,9 +1574,6 @@ class AsyncParticipantResourceWithStreamingResponse:
|
|
|
1662
1574
|
self.add = async_to_streamed_response_wrapper(
|
|
1663
1575
|
participant.add,
|
|
1664
1576
|
)
|
|
1665
|
-
self.create_mobile_token = async_to_streamed_response_wrapper(
|
|
1666
|
-
participant.create_mobile_token,
|
|
1667
|
-
)
|
|
1668
1577
|
self.list_commissions = async_to_streamed_response_wrapper(
|
|
1669
1578
|
participant.list_commissions,
|
|
1670
1579
|
)
|
growsurf/types/__init__.py
CHANGED
|
@@ -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
|
-
)
|
|
@@ -114,6 +114,12 @@ class Participant(BaseModel):
|
|
|
114
114
|
metadata: Optional[Dict[str, object]] = None
|
|
115
115
|
"""Shallow custom metadata object."""
|
|
116
116
|
|
|
117
|
+
mobile_instance_id: Optional[str] = FieldInfo(alias="mobileInstanceId", default=None)
|
|
118
|
+
"""
|
|
119
|
+
App-install scoped mobile identifier used for anti-fraud matching when provided
|
|
120
|
+
by native mobile apps. Not stored when strict GDPR/CCPA mode is enabled.
|
|
121
|
+
"""
|
|
122
|
+
|
|
117
123
|
monthly_referrals: Optional[List[str]] = FieldInfo(alias="monthlyReferrals", default=None)
|
|
118
124
|
|
|
119
125
|
notes: Optional[str] = None
|
|
@@ -24,6 +24,12 @@ class ParticipantAddParams(TypedDict, total=False):
|
|
|
24
24
|
metadata: Dict[str, object]
|
|
25
25
|
"""Shallow custom metadata object."""
|
|
26
26
|
|
|
27
|
+
mobile_instance_id: Annotated[str, PropertyInfo(alias="mobileInstanceId")]
|
|
28
|
+
"""Optional app-install scoped identifier for native mobile anti-fraud.
|
|
29
|
+
|
|
30
|
+
Recommended for mobile participant creation and mobile participant token flows.
|
|
31
|
+
"""
|
|
32
|
+
|
|
27
33
|
referral_status: Annotated[Literal["CREDIT_PENDING", "CREDIT_AWARDED"], PropertyInfo(alias="referralStatus")]
|
|
28
34
|
|
|
29
35
|
referred_by: Annotated[str, PropertyInfo(alias="referredBy")]
|
|
@@ -0,0 +1,36 @@
|
|
|
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
|
+
mobile_instance_id: Annotated[str, PropertyInfo(alias="mobileInstanceId")]
|
|
28
|
+
"""Optional app-install scoped identifier for native mobile anti-fraud.
|
|
29
|
+
|
|
30
|
+
Recommended for mobile participant creation and mobile participant token flows.
|
|
31
|
+
"""
|
|
32
|
+
|
|
33
|
+
referral_status: Annotated[Literal["CREDIT_PENDING", "CREDIT_AWARDED"], PropertyInfo(alias="referralStatus")]
|
|
34
|
+
|
|
35
|
+
referred_by: Annotated[str, PropertyInfo(alias="referredBy")]
|
|
36
|
+
"""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."""
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: growsurf-python
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.4.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,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=xa4NoryvmUDyrwxFDATSa1He-fOaDdTZmq7GLfJIKFo,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
|
|
@@ -30,11 +30,13 @@ growsurf/_utils/_utils.py,sha256=2nPOzDrPe2GADpLCRM4bNQS8Mu7LjEiCG_LJ2AAL6jg,131
|
|
|
30
30
|
growsurf/lib/.keep,sha256=wuNrz-5SXo3jJaJOJgz4vFHM41YH_g20F5cRQo0vLes,224
|
|
31
31
|
growsurf/resources/__init__.py,sha256=xfEkuLlMZ7ZMm_bcpbd5XKNGLBo9xEvNVGX6EHH0g-M,578
|
|
32
32
|
growsurf/resources/campaign/__init__.py,sha256=3k4V-N7TZLU1xJunA-760I62BQ1elIddwlLf_OtWQUQ,2045
|
|
33
|
-
growsurf/resources/campaign/campaign.py,sha256=
|
|
33
|
+
growsurf/resources/campaign/campaign.py,sha256=pEnLHeeZjScZoH9h1Buz4-LNMr6aCZg_2Sie_UiF8hU,49945
|
|
34
34
|
growsurf/resources/campaign/commission.py,sha256=K5HmznRM7nO-VNiP2Jy1rIeW63rAx1Aa2M9DEJ9dB2I,10294
|
|
35
|
-
growsurf/resources/campaign/participant.py,sha256=
|
|
35
|
+
growsurf/resources/campaign/participant.py,sha256=nloKXLYGkOTpMUiblt-GgnXhSCFfJ-SQI4tkafYtoSk,64488
|
|
36
36
|
growsurf/resources/campaign/reward.py,sha256=AVPDhttbglDXnZE4onrCvf6Br6PdAohVV9WJgF7DsjY,14034
|
|
37
|
-
growsurf/types/__init__.py,sha256=
|
|
37
|
+
growsurf/types/__init__.py,sha256=qJwksX7ie_ILiC_A1QCtu5p_evuLWBH5oEIv91bJFoA,1715
|
|
38
|
+
growsurf/types/campaign_create_mobile_participant_token_params.py,sha256=u7R0okoPG7BWkG5nFxX7LG9e8i_qFRpjmAbdoxE7RK8,1184
|
|
39
|
+
growsurf/types/campaign_create_mobile_participant_token_response.py,sha256=IvIgtizBufLI-p9pk7MnyJj3XydHjLvdoAw-PWpPqdI,769
|
|
38
40
|
growsurf/types/campaign_list_commissions_params.py,sha256=5T8SWE63fWyMglJP_EnK5AG8OVQIbE0rf5jNcvc8tn8,622
|
|
39
41
|
growsurf/types/campaign_list_leaderboard_params.py,sha256=V1woEXMUb2UQqsGw6Dzn33GtkmpdaFARsUjtT03MQwE,1055
|
|
40
42
|
growsurf/types/campaign_list_participants_params.py,sha256=C3RF1NxvmcmBm0ZY82t8seoLmRZMRMGZ_JPIKt0WfuU,499
|
|
@@ -48,14 +50,13 @@ growsurf/types/participant_commission_list.py,sha256=79Eb8Wyic557dBERHiDpgjvYqC4
|
|
|
48
50
|
growsurf/types/participant_list.py,sha256=5oety8iTXx5anr0W5wAjzCAIMPkQLPeVIc2TNuRbrMY,430
|
|
49
51
|
growsurf/types/participant_payout_list.py,sha256=xO4_EwJAVA5B5opldd7S3X5O6WeAsejgpbVtQ_oacwQ,1419
|
|
50
52
|
growsurf/types/referral_list.py,sha256=SOU3s0cjeQLhbZVbeGoeCprVyrPTk-tvmMBMV25uG1o,969
|
|
51
|
-
growsurf/types/campaign/__init__.py,sha256=
|
|
53
|
+
growsurf/types/campaign/__init__.py,sha256=5QXEoVqNvARl_R8iRAILUVariVEN9Lno41tNHEKIC8E,2436
|
|
52
54
|
growsurf/types/campaign/campaign.py,sha256=JuiQhipggLIZatBvdmVZVYW5YkLabGHqhZ03rdJ9g-Q,2293
|
|
53
55
|
growsurf/types/campaign/commission_approve_response.py,sha256=fcM2IM6qyqkne4aFPbYcJlfbO3P2fZsJQcBxdsB3BaE,225
|
|
54
56
|
growsurf/types/campaign/commission_delete_response.py,sha256=psVQ1Yqh9j20kvg76LrRtXIa5cy0CVSWzKaZk9IvGKU,223
|
|
55
57
|
growsurf/types/campaign/fraud_risk_level.py,sha256=e14xAEYtKH6gGnkJ9-sr81GZ2UY-zDQ6TZKCkBJLagw,228
|
|
56
|
-
growsurf/types/campaign/participant.py,sha256=
|
|
57
|
-
growsurf/types/campaign/participant_add_params.py,sha256=
|
|
58
|
-
growsurf/types/campaign/participant_create_mobile_token_response.py,sha256=asUJXjAeA699qrr14BA2hv5TrSMsZqmz0MGoU18E1NU,513
|
|
58
|
+
growsurf/types/campaign/participant.py,sha256=YEkK_YPvCOQpM_BotHJJcl3bM6-LjWogsnlT_GvPAME,5473
|
|
59
|
+
growsurf/types/campaign/participant_add_params.py,sha256=WxUPF7ZTVQ6K3NUagwzauM7RViTUMvKcORom0CIh_cw,1141
|
|
59
60
|
growsurf/types/campaign/participant_delete_response.py,sha256=qXghOQ04cS3jZh3oHZYr_iXzlanjELyeN5I4kUfFfRM,225
|
|
60
61
|
growsurf/types/campaign/participant_list_commissions_params.py,sha256=4Cxa7rETQYmp71mR4wIzymfPYv2UV3vCzmQvv5iik1c,662
|
|
61
62
|
growsurf/types/campaign/participant_list_payouts_params.py,sha256=AbadljbUZvMgc7cEDvDXpIg3n0nM1x4t2vZgTD-w69A,638
|
|
@@ -75,7 +76,7 @@ growsurf/types/campaign/reward_approve_params.py,sha256=IbGDBmEWgmtQQpmYaMg_navf
|
|
|
75
76
|
growsurf/types/campaign/reward_approve_response.py,sha256=AID7RxcX5_BGxssHn6vR-pGOB_PK-xQhUBNk-ZkNkgI,217
|
|
76
77
|
growsurf/types/campaign/reward_delete_response.py,sha256=YGOQ8GQEEN1HDzOT2pU30Q98UNM-s-U4VkTqMewNe5M,215
|
|
77
78
|
growsurf/types/campaign/reward_fulfill_response.py,sha256=KlimtB3q-3djYMlRzshAxEyU_IVACOesNECbTeU574E,217
|
|
78
|
-
growsurf_python-0.
|
|
79
|
-
growsurf_python-0.
|
|
80
|
-
growsurf_python-0.
|
|
81
|
-
growsurf_python-0.
|
|
79
|
+
growsurf_python-0.4.0.dist-info/METADATA,sha256=O7t5t6VK71uEJ8642DmePrDi70zYA2pz_e8w2-SoUXg,13597
|
|
80
|
+
growsurf_python-0.4.0.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
|
|
81
|
+
growsurf_python-0.4.0.dist-info/licenses/LICENSE,sha256=kTHLVE-ra1gtTxcn395uFqcOzcErebE-mDdPNW7b8OU,11338
|
|
82
|
+
growsurf_python-0.4.0.dist-info/RECORD,,
|
|
@@ -1,15 +0,0 @@
|
|
|
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
|
-
|
|
7
|
-
__all__ = ["ParticipantCreateMobileTokenResponse"]
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
class ParticipantCreateMobileTokenResponse(BaseModel):
|
|
11
|
-
expires_in: int = FieldInfo(alias="expiresIn")
|
|
12
|
-
"""Token lifetime in seconds."""
|
|
13
|
-
|
|
14
|
-
participant_token: str = FieldInfo(alias="participantToken")
|
|
15
|
-
"""Participant-scoped bearer token for GrowSurf mobile SDK participant endpoints."""
|
|
File without changes
|
|
File without changes
|