growsurf-python 0.0.2__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/__init__.py +102 -0
- growsurf/_base_client.py +2153 -0
- growsurf/_client.py +484 -0
- growsurf/_compat.py +226 -0
- growsurf/_constants.py +14 -0
- growsurf/_exceptions.py +108 -0
- growsurf/_files.py +173 -0
- growsurf/_models.py +878 -0
- growsurf/_qs.py +149 -0
- growsurf/_resource.py +43 -0
- growsurf/_response.py +833 -0
- growsurf/_streaming.py +338 -0
- growsurf/_types.py +274 -0
- growsurf/_utils/__init__.py +64 -0
- growsurf/_utils/_compat.py +45 -0
- growsurf/_utils/_datetime_parse.py +136 -0
- growsurf/_utils/_json.py +35 -0
- growsurf/_utils/_logs.py +25 -0
- growsurf/_utils/_path.py +127 -0
- growsurf/_utils/_proxy.py +65 -0
- growsurf/_utils/_reflection.py +42 -0
- growsurf/_utils/_resources_proxy.py +24 -0
- growsurf/_utils/_streams.py +12 -0
- growsurf/_utils/_sync.py +58 -0
- growsurf/_utils/_transform.py +457 -0
- growsurf/_utils/_typing.py +156 -0
- growsurf/_utils/_utils.py +433 -0
- growsurf/_version.py +4 -0
- growsurf/lib/.keep +4 -0
- growsurf/py.typed +0 -0
- growsurf/resources/__init__.py +19 -0
- growsurf/resources/campaign/__init__.py +61 -0
- growsurf/resources/campaign/campaign.py +1126 -0
- growsurf/resources/campaign/commission.py +259 -0
- growsurf/resources/campaign/participant.py +1587 -0
- growsurf/resources/campaign/reward.py +355 -0
- growsurf/types/__init__.py +18 -0
- growsurf/types/campaign/__init__.py +35 -0
- growsurf/types/campaign/campaign.py +73 -0
- growsurf/types/campaign/commission_approve_response.py +9 -0
- growsurf/types/campaign/commission_delete_response.py +9 -0
- growsurf/types/campaign/fraud_risk_level.py +7 -0
- growsurf/types/campaign/participant.py +147 -0
- growsurf/types/campaign/participant_add_params.py +30 -0
- growsurf/types/campaign/participant_delete_response.py +9 -0
- growsurf/types/campaign/participant_list_commissions_params.py +22 -0
- growsurf/types/campaign/participant_list_payouts_params.py +22 -0
- growsurf/types/campaign/participant_list_referrals_params.py +43 -0
- growsurf/types/campaign/participant_list_rewards_params.py +19 -0
- growsurf/types/campaign/participant_list_rewards_response.py +18 -0
- growsurf/types/campaign/participant_record_transaction_params.py +60 -0
- growsurf/types/campaign/participant_record_transaction_response.py +37 -0
- growsurf/types/campaign/participant_reward.py +39 -0
- growsurf/types/campaign/participant_send_invites_params.py +20 -0
- growsurf/types/campaign/participant_send_invites_response.py +15 -0
- growsurf/types/campaign/participant_trigger_referral_response.py +13 -0
- growsurf/types/campaign/participant_update_params.py +34 -0
- growsurf/types/campaign/referral_source.py +7 -0
- growsurf/types/campaign/referral_status.py +7 -0
- growsurf/types/campaign/reward_approve_params.py +14 -0
- growsurf/types/campaign/reward_approve_response.py +9 -0
- growsurf/types/campaign/reward_delete_response.py +9 -0
- growsurf/types/campaign/reward_fulfill_response.py +9 -0
- growsurf/types/campaign_list_commissions_params.py +20 -0
- growsurf/types/campaign_list_leaderboard_params.py +36 -0
- growsurf/types/campaign_list_participants_params.py +17 -0
- growsurf/types/campaign_list_payouts_params.py +20 -0
- growsurf/types/campaign_list_referrals_params.py +41 -0
- growsurf/types/campaign_list_response.py +12 -0
- growsurf/types/campaign_retrieve_analytics_params.py +26 -0
- growsurf/types/campaign_retrieve_analytics_response.py +75 -0
- growsurf/types/commission_structure.py +62 -0
- growsurf/types/participant_commission_list.py +62 -0
- growsurf/types/participant_list.py +18 -0
- growsurf/types/participant_payout_list.py +50 -0
- growsurf/types/referral_list.py +40 -0
- growsurf_python-0.0.2.dist-info/METADATA +399 -0
- growsurf_python-0.0.2.dist-info/RECORD +80 -0
- growsurf_python-0.0.2.dist-info/WHEEL +4 -0
- growsurf_python-0.0.2.dist-info/licenses/LICENSE +201 -0
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import Optional
|
|
4
|
+
|
|
5
|
+
from pydantic import Field as FieldInfo
|
|
6
|
+
|
|
7
|
+
from .._models import BaseModel
|
|
8
|
+
|
|
9
|
+
__all__ = ["CampaignRetrieveAnalyticsResponse", "Analytics"]
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class Analytics(BaseModel):
|
|
13
|
+
bluesky_shares: Optional[int] = FieldInfo(alias="blueskyShares", default=None)
|
|
14
|
+
|
|
15
|
+
email_shares: Optional[int] = FieldInfo(alias="emailShares", default=None)
|
|
16
|
+
|
|
17
|
+
facebook_shares: Optional[int] = FieldInfo(alias="facebookShares", default=None)
|
|
18
|
+
|
|
19
|
+
impressions: Optional[int] = None
|
|
20
|
+
|
|
21
|
+
invites: Optional[int] = None
|
|
22
|
+
|
|
23
|
+
linked_in_shares: Optional[int] = FieldInfo(alias="linkedInShares", default=None)
|
|
24
|
+
|
|
25
|
+
messenger_shares: Optional[int] = FieldInfo(alias="messengerShares", default=None)
|
|
26
|
+
|
|
27
|
+
participants: Optional[int] = None
|
|
28
|
+
|
|
29
|
+
pinterest_shares: Optional[int] = FieldInfo(alias="pinterestShares", default=None)
|
|
30
|
+
|
|
31
|
+
qrcode_shares: Optional[int] = FieldInfo(alias="qrcodeShares", default=None)
|
|
32
|
+
|
|
33
|
+
reddit_shares: Optional[int] = FieldInfo(alias="redditShares", default=None)
|
|
34
|
+
|
|
35
|
+
referral_credit_expireds: Optional[int] = FieldInfo(alias="referralCreditExpireds", default=None)
|
|
36
|
+
|
|
37
|
+
referral_credit_pendings: Optional[int] = FieldInfo(alias="referralCreditPendings", default=None)
|
|
38
|
+
|
|
39
|
+
referrals: Optional[int] = None
|
|
40
|
+
|
|
41
|
+
sms_shares: Optional[int] = FieldInfo(alias="smsShares", default=None)
|
|
42
|
+
|
|
43
|
+
telegram_shares: Optional[int] = FieldInfo(alias="telegramShares", default=None)
|
|
44
|
+
|
|
45
|
+
threads_shares: Optional[int] = FieldInfo(alias="threadsShares", default=None)
|
|
46
|
+
|
|
47
|
+
total_commission_count: Optional[int] = FieldInfo(alias="totalCommissionCount", default=None)
|
|
48
|
+
"""Affiliate programs only. Number of commission records."""
|
|
49
|
+
|
|
50
|
+
total_commissions: Optional[int] = FieldInfo(alias="totalCommissions", default=None)
|
|
51
|
+
"""Affiliate programs only.
|
|
52
|
+
|
|
53
|
+
Commissions in the smallest unit of the program currency.
|
|
54
|
+
"""
|
|
55
|
+
|
|
56
|
+
total_revenue: Optional[int] = FieldInfo(alias="totalRevenue", default=None)
|
|
57
|
+
"""Affiliate programs only. Revenue in the smallest unit of the program currency."""
|
|
58
|
+
|
|
59
|
+
tumblr_shares: Optional[int] = FieldInfo(alias="tumblrShares", default=None)
|
|
60
|
+
|
|
61
|
+
twitter_shares: Optional[int] = FieldInfo(alias="twitterShares", default=None)
|
|
62
|
+
|
|
63
|
+
unique_impressions: Optional[int] = FieldInfo(alias="uniqueImpressions", default=None)
|
|
64
|
+
|
|
65
|
+
wechat_shares: Optional[int] = FieldInfo(alias="wechatShares", default=None)
|
|
66
|
+
|
|
67
|
+
whats_app_shares: Optional[int] = FieldInfo(alias="whatsAppShares", default=None)
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
class CampaignRetrieveAnalyticsResponse(BaseModel):
|
|
71
|
+
analytics: Analytics
|
|
72
|
+
|
|
73
|
+
end_date: int = FieldInfo(alias="endDate")
|
|
74
|
+
|
|
75
|
+
start_date: int = FieldInfo(alias="startDate")
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import TYPE_CHECKING, Dict, Optional
|
|
4
|
+
from typing_extensions import Literal
|
|
5
|
+
|
|
6
|
+
from pydantic import Field as FieldInfo
|
|
7
|
+
|
|
8
|
+
from .._models import BaseModel
|
|
9
|
+
|
|
10
|
+
__all__ = ["CommissionStructure"]
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class CommissionStructure(BaseModel):
|
|
14
|
+
amount: Optional[int] = None
|
|
15
|
+
|
|
16
|
+
approval_required: Optional[bool] = FieldInfo(alias="approvalRequired", default=None)
|
|
17
|
+
|
|
18
|
+
duration: Optional[str] = None
|
|
19
|
+
|
|
20
|
+
duration_in_months: Optional[int] = FieldInfo(alias="durationInMonths", default=None)
|
|
21
|
+
|
|
22
|
+
event: Optional[str] = None
|
|
23
|
+
|
|
24
|
+
has_intro: Optional[bool] = FieldInfo(alias="hasIntro", default=None)
|
|
25
|
+
|
|
26
|
+
has_max_amount: Optional[bool] = FieldInfo(alias="hasMaxAmount", default=None)
|
|
27
|
+
|
|
28
|
+
hold_duration: Optional[int] = FieldInfo(alias="holdDuration", default=None)
|
|
29
|
+
|
|
30
|
+
intro_amount: Optional[int] = FieldInfo(alias="introAmount", default=None)
|
|
31
|
+
|
|
32
|
+
intro_amount_iso: Optional[str] = FieldInfo(alias="introAmountISO", default=None)
|
|
33
|
+
|
|
34
|
+
intro_duration: Optional[str] = FieldInfo(alias="introDuration", default=None)
|
|
35
|
+
|
|
36
|
+
intro_duration_in_months: Optional[int] = FieldInfo(alias="introDurationInMonths", default=None)
|
|
37
|
+
|
|
38
|
+
intro_percent: Optional[float] = FieldInfo(alias="introPercent", default=None)
|
|
39
|
+
|
|
40
|
+
intro_type: Optional[str] = FieldInfo(alias="introType", default=None)
|
|
41
|
+
|
|
42
|
+
max_amount: Optional[int] = FieldInfo(alias="maxAmount", default=None)
|
|
43
|
+
|
|
44
|
+
max_amount_iso: Optional[str] = FieldInfo(alias="maxAmountISO", default=None)
|
|
45
|
+
|
|
46
|
+
min_paid_referrals: Optional[int] = FieldInfo(alias="minPaidReferrals", default=None)
|
|
47
|
+
|
|
48
|
+
percent: Optional[float] = None
|
|
49
|
+
|
|
50
|
+
type: Optional[Literal["PERCENT", "AMOUNT"]] = None
|
|
51
|
+
|
|
52
|
+
if TYPE_CHECKING:
|
|
53
|
+
# Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a
|
|
54
|
+
# value to this field, so for compatibility we avoid doing it at runtime.
|
|
55
|
+
__pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
|
|
56
|
+
|
|
57
|
+
# Stub to indicate that arbitrary properties are accepted.
|
|
58
|
+
# To access properties that are not valid identifiers you can use `getattr`, e.g.
|
|
59
|
+
# `getattr(obj, '$type')`
|
|
60
|
+
def __getattr__(self, attr: str) -> object: ...
|
|
61
|
+
else:
|
|
62
|
+
__pydantic_extra__: Dict[str, object]
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import List, Optional
|
|
4
|
+
from typing_extensions import Literal
|
|
5
|
+
|
|
6
|
+
from pydantic import Field as FieldInfo
|
|
7
|
+
|
|
8
|
+
from .._models import BaseModel
|
|
9
|
+
|
|
10
|
+
__all__ = ["ParticipantCommissionList", "Commission"]
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class Commission(BaseModel):
|
|
14
|
+
id: str
|
|
15
|
+
|
|
16
|
+
amount: int
|
|
17
|
+
|
|
18
|
+
created_at: int = FieldInfo(alias="createdAt")
|
|
19
|
+
|
|
20
|
+
currency_iso: str = FieldInfo(alias="currencyISO")
|
|
21
|
+
|
|
22
|
+
referred_id: str = FieldInfo(alias="referredId")
|
|
23
|
+
|
|
24
|
+
referrer_id: str = FieldInfo(alias="referrerId")
|
|
25
|
+
|
|
26
|
+
sale_amount: int = FieldInfo(alias="saleAmount")
|
|
27
|
+
|
|
28
|
+
status: Literal["PENDING", "APPROVED", "PAID", "REVERSED", "DELETED"]
|
|
29
|
+
|
|
30
|
+
amount_in_campaign_currency: Optional[int] = FieldInfo(alias="amountInCampaignCurrency", default=None)
|
|
31
|
+
|
|
32
|
+
approved_at: Optional[int] = FieldInfo(alias="approvedAt", default=None)
|
|
33
|
+
|
|
34
|
+
campaign_currency_iso: Optional[str] = FieldInfo(alias="campaignCurrencyISO", default=None)
|
|
35
|
+
|
|
36
|
+
exchange_rate: Optional[float] = FieldInfo(alias="exchangeRate", default=None)
|
|
37
|
+
|
|
38
|
+
exchange_rate_at: Optional[int] = FieldInfo(alias="exchangeRateAt", default=None)
|
|
39
|
+
|
|
40
|
+
fx_error: Optional[str] = FieldInfo(alias="fxError", default=None)
|
|
41
|
+
|
|
42
|
+
hold_duration: Optional[int] = FieldInfo(alias="holdDuration", default=None)
|
|
43
|
+
|
|
44
|
+
paid_at: Optional[int] = FieldInfo(alias="paidAt", default=None)
|
|
45
|
+
|
|
46
|
+
payout_queued_at: Optional[int] = FieldInfo(alias="payoutQueuedAt", default=None)
|
|
47
|
+
|
|
48
|
+
provider: Optional[str] = None
|
|
49
|
+
|
|
50
|
+
reversed_at: Optional[int] = FieldInfo(alias="reversedAt", default=None)
|
|
51
|
+
|
|
52
|
+
sale_amount_amount_in_campaign_currency: Optional[int] = FieldInfo(
|
|
53
|
+
alias="saleAmountAmountInCampaignCurrency", default=None
|
|
54
|
+
)
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
class ParticipantCommissionList(BaseModel):
|
|
58
|
+
commissions: List[Commission]
|
|
59
|
+
|
|
60
|
+
limit: int
|
|
61
|
+
|
|
62
|
+
next_id: Optional[str] = FieldInfo(alias="nextId", default=None)
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import List, Optional
|
|
4
|
+
|
|
5
|
+
from pydantic import Field as FieldInfo
|
|
6
|
+
|
|
7
|
+
from .._models import BaseModel
|
|
8
|
+
from .campaign.participant import Participant
|
|
9
|
+
|
|
10
|
+
__all__ = ["ParticipantList"]
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class ParticipantList(BaseModel):
|
|
14
|
+
limit: int
|
|
15
|
+
|
|
16
|
+
next_id: Optional[str] = FieldInfo(alias="nextId", default=None)
|
|
17
|
+
|
|
18
|
+
participants: List[Participant]
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import List, Optional
|
|
4
|
+
from typing_extensions import Literal
|
|
5
|
+
|
|
6
|
+
from pydantic import Field as FieldInfo
|
|
7
|
+
|
|
8
|
+
from .._models import BaseModel
|
|
9
|
+
|
|
10
|
+
__all__ = ["ParticipantPayoutList", "Payout"]
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class Payout(BaseModel):
|
|
14
|
+
id: str
|
|
15
|
+
|
|
16
|
+
amount: int
|
|
17
|
+
|
|
18
|
+
commission_ids: List[str] = FieldInfo(alias="commissionIds")
|
|
19
|
+
|
|
20
|
+
created_at: int = FieldInfo(alias="createdAt")
|
|
21
|
+
|
|
22
|
+
currency_iso: str = FieldInfo(alias="currencyISO")
|
|
23
|
+
|
|
24
|
+
participant_id: str = FieldInfo(alias="participantId")
|
|
25
|
+
|
|
26
|
+
status: Literal["UPCOMING", "QUEUED", "ISSUED", "FAILED"]
|
|
27
|
+
|
|
28
|
+
amount_in_campaign_currency: Optional[int] = FieldInfo(alias="amountInCampaignCurrency", default=None)
|
|
29
|
+
|
|
30
|
+
campaign_currency_iso: Optional[str] = FieldInfo(alias="campaignCurrencyISO", default=None)
|
|
31
|
+
|
|
32
|
+
exchange_rate: Optional[float] = FieldInfo(alias="exchangeRate", default=None)
|
|
33
|
+
|
|
34
|
+
exchange_rate_at: Optional[int] = FieldInfo(alias="exchangeRateAt", default=None)
|
|
35
|
+
|
|
36
|
+
failed_at: Optional[int] = FieldInfo(alias="failedAt", default=None)
|
|
37
|
+
|
|
38
|
+
fx_error: Optional[str] = FieldInfo(alias="fxError", default=None)
|
|
39
|
+
|
|
40
|
+
issued_at: Optional[int] = FieldInfo(alias="issuedAt", default=None)
|
|
41
|
+
|
|
42
|
+
provider: Optional[str] = None
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
class ParticipantPayoutList(BaseModel):
|
|
46
|
+
limit: int
|
|
47
|
+
|
|
48
|
+
next_id: Optional[str] = FieldInfo(alias="nextId", default=None)
|
|
49
|
+
|
|
50
|
+
payouts: List[Payout]
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import List, Optional
|
|
4
|
+
|
|
5
|
+
from pydantic import Field as FieldInfo
|
|
6
|
+
|
|
7
|
+
from .._models import BaseModel
|
|
8
|
+
from .campaign.referral_status import ReferralStatus
|
|
9
|
+
|
|
10
|
+
__all__ = ["ReferralList", "Referral"]
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class Referral(BaseModel):
|
|
14
|
+
id: str
|
|
15
|
+
|
|
16
|
+
created_at: int = FieldInfo(alias="createdAt")
|
|
17
|
+
|
|
18
|
+
email: str
|
|
19
|
+
|
|
20
|
+
referral_status: ReferralStatus = FieldInfo(alias="referralStatus")
|
|
21
|
+
|
|
22
|
+
referred_by: str = FieldInfo(alias="referredBy")
|
|
23
|
+
|
|
24
|
+
updated_at: int = FieldInfo(alias="updatedAt")
|
|
25
|
+
|
|
26
|
+
first_name: Optional[str] = FieldInfo(alias="firstName", default=None)
|
|
27
|
+
|
|
28
|
+
last_name: Optional[str] = FieldInfo(alias="lastName", default=None)
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
class ReferralList(BaseModel):
|
|
32
|
+
limit: int
|
|
33
|
+
|
|
34
|
+
more: bool
|
|
35
|
+
|
|
36
|
+
referrals: List[Referral]
|
|
37
|
+
|
|
38
|
+
next_id: Optional[str] = FieldInfo(alias="nextId", default=None)
|
|
39
|
+
|
|
40
|
+
next_offset: Optional[int] = FieldInfo(alias="nextOffset", default=None)
|