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,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__ = ["ParticipantAddParams"]
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class ParticipantAddParams(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,22 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing_extensions import Literal, Required, Annotated, TypedDict
|
|
6
|
+
|
|
7
|
+
from ..._utils import PropertyInfo
|
|
8
|
+
|
|
9
|
+
__all__ = ["ParticipantListCommissionsParams"]
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class ParticipantListCommissionsParams(TypedDict, total=False):
|
|
13
|
+
id: Required[str]
|
|
14
|
+
|
|
15
|
+
limit: int
|
|
16
|
+
"""Number of results to return. Maximum 100."""
|
|
17
|
+
|
|
18
|
+
next_id: Annotated[str, PropertyInfo(alias="nextId")]
|
|
19
|
+
"""ID to start the next paged result set with."""
|
|
20
|
+
|
|
21
|
+
status: Literal["PENDING", "APPROVED", "PAID", "REVERSED", "DELETED"]
|
|
22
|
+
"""Participant commission status."""
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing_extensions import Literal, Required, Annotated, TypedDict
|
|
6
|
+
|
|
7
|
+
from ..._utils import PropertyInfo
|
|
8
|
+
|
|
9
|
+
__all__ = ["ParticipantListPayoutsParams"]
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class ParticipantListPayoutsParams(TypedDict, total=False):
|
|
13
|
+
id: Required[str]
|
|
14
|
+
|
|
15
|
+
limit: int
|
|
16
|
+
"""Number of results to return. Maximum 100."""
|
|
17
|
+
|
|
18
|
+
next_id: Annotated[str, PropertyInfo(alias="nextId")]
|
|
19
|
+
"""ID to start the next paged result set with."""
|
|
20
|
+
|
|
21
|
+
status: Literal["UPCOMING", "QUEUED", "ISSUED", "FAILED"]
|
|
22
|
+
"""Participant payout status."""
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing_extensions import Literal, Required, Annotated, TypedDict
|
|
6
|
+
|
|
7
|
+
from ..._utils import PropertyInfo
|
|
8
|
+
from .referral_status import ReferralStatus
|
|
9
|
+
|
|
10
|
+
__all__ = ["ParticipantListReferralsParams"]
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class ParticipantListReferralsParams(TypedDict, total=False):
|
|
14
|
+
id: Required[str]
|
|
15
|
+
|
|
16
|
+
desc: bool
|
|
17
|
+
"""Return results in descending order when true."""
|
|
18
|
+
|
|
19
|
+
email: str
|
|
20
|
+
"""URL-encoded email value to filter referral results."""
|
|
21
|
+
|
|
22
|
+
first_name: Annotated[str, PropertyInfo(alias="firstName")]
|
|
23
|
+
"""First name value to filter results."""
|
|
24
|
+
|
|
25
|
+
last_name: Annotated[str, PropertyInfo(alias="lastName")]
|
|
26
|
+
"""Last name value to filter results."""
|
|
27
|
+
|
|
28
|
+
limit: int
|
|
29
|
+
"""Number of results to return. Maximum 100."""
|
|
30
|
+
|
|
31
|
+
next_id: Annotated[str, PropertyInfo(alias="nextId")]
|
|
32
|
+
"""ID to start the next paged result set with."""
|
|
33
|
+
|
|
34
|
+
offset: int
|
|
35
|
+
"""Offset number used to skip through a result set."""
|
|
36
|
+
|
|
37
|
+
referral_status: Annotated[ReferralStatus, PropertyInfo(alias="referralStatus")]
|
|
38
|
+
|
|
39
|
+
sort_by: Annotated[
|
|
40
|
+
Literal["updatedAt", "createdAt", "email", "firstName", "lastName", "referralStatus", "referralTriggeredAt"],
|
|
41
|
+
PropertyInfo(alias="sortBy"),
|
|
42
|
+
]
|
|
43
|
+
"""Field used to sort referral results."""
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing_extensions import Required, Annotated, TypedDict
|
|
6
|
+
|
|
7
|
+
from ..._utils import PropertyInfo
|
|
8
|
+
|
|
9
|
+
__all__ = ["ParticipantListRewardsParams"]
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class ParticipantListRewardsParams(TypedDict, total=False):
|
|
13
|
+
id: Required[str]
|
|
14
|
+
|
|
15
|
+
limit: int
|
|
16
|
+
"""Number of results to return. Maximum 100."""
|
|
17
|
+
|
|
18
|
+
next_id: Annotated[str, PropertyInfo(alias="nextId")]
|
|
19
|
+
"""ID to start the next paged result set with."""
|
|
@@ -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 .participant_reward import ParticipantReward
|
|
9
|
+
|
|
10
|
+
__all__ = ["ParticipantListRewardsResponse"]
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class ParticipantListRewardsResponse(BaseModel):
|
|
14
|
+
limit: int
|
|
15
|
+
|
|
16
|
+
next_id: Optional[str] = FieldInfo(alias="nextId", default=None)
|
|
17
|
+
|
|
18
|
+
rewards: List[ParticipantReward]
|
|
@@ -0,0 +1,60 @@
|
|
|
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, Iterable
|
|
6
|
+
from typing_extensions import Required, Annotated, TypedDict
|
|
7
|
+
|
|
8
|
+
from ..._utils import PropertyInfo
|
|
9
|
+
|
|
10
|
+
__all__ = ["ParticipantRecordTransactionParams"]
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class ParticipantRecordTransactionParams(TypedDict, total=False):
|
|
14
|
+
id: Required[str]
|
|
15
|
+
|
|
16
|
+
currency: Required[str]
|
|
17
|
+
|
|
18
|
+
gross_amount: Required[Annotated[int, PropertyInfo(alias="grossAmount")]]
|
|
19
|
+
|
|
20
|
+
amount_cash_net: Annotated[int, PropertyInfo(alias="amountCashNet")]
|
|
21
|
+
|
|
22
|
+
amount_paid: Annotated[int, PropertyInfo(alias="amountPaid")]
|
|
23
|
+
|
|
24
|
+
charge_id: Annotated[str, PropertyInfo(alias="chargeId")]
|
|
25
|
+
|
|
26
|
+
customer_id: Annotated[str, PropertyInfo(alias="customerId")]
|
|
27
|
+
|
|
28
|
+
description: str
|
|
29
|
+
|
|
30
|
+
external_id: Annotated[str, PropertyInfo(alias="externalId")]
|
|
31
|
+
|
|
32
|
+
invoice_id: Annotated[str, PropertyInfo(alias="invoiceId")]
|
|
33
|
+
|
|
34
|
+
invoice_subtotal_excluding_tax: Annotated[int, PropertyInfo(alias="invoiceSubtotalExcludingTax")]
|
|
35
|
+
|
|
36
|
+
invoice_total: Annotated[int, PropertyInfo(alias="invoiceTotal")]
|
|
37
|
+
|
|
38
|
+
invoice_total_excluding_tax: Annotated[int, PropertyInfo(alias="invoiceTotalExcludingTax")]
|
|
39
|
+
|
|
40
|
+
net_amount: Annotated[int, PropertyInfo(alias="netAmount")]
|
|
41
|
+
|
|
42
|
+
order_id: Annotated[str, PropertyInfo(alias="orderId")]
|
|
43
|
+
|
|
44
|
+
paid_at: Annotated[int, PropertyInfo(alias="paidAt")]
|
|
45
|
+
|
|
46
|
+
payment_id: Annotated[str, PropertyInfo(alias="paymentId")]
|
|
47
|
+
|
|
48
|
+
payment_intent_id: Annotated[str, PropertyInfo(alias="paymentIntentId")]
|
|
49
|
+
|
|
50
|
+
subscription_id: Annotated[str, PropertyInfo(alias="subscriptionId")]
|
|
51
|
+
|
|
52
|
+
tax_amount: Annotated[int, PropertyInfo(alias="taxAmount")]
|
|
53
|
+
|
|
54
|
+
total_tax_amount: Annotated[int, PropertyInfo(alias="totalTaxAmount")]
|
|
55
|
+
|
|
56
|
+
total_tax_amounts: Annotated[Iterable[Dict[str, object]], PropertyInfo(alias="totalTaxAmounts")]
|
|
57
|
+
|
|
58
|
+
total_taxes: Annotated[Iterable[Dict[str, object]], PropertyInfo(alias="totalTaxes")]
|
|
59
|
+
|
|
60
|
+
transaction_id: Annotated[str, PropertyInfo(alias="transactionId")]
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import List, Union
|
|
4
|
+
from typing_extensions import Literal, TypeAlias
|
|
5
|
+
|
|
6
|
+
from pydantic import Field as FieldInfo
|
|
7
|
+
|
|
8
|
+
from ..._models import BaseModel
|
|
9
|
+
|
|
10
|
+
__all__ = ["ParticipantRecordTransactionResponse", "UnionMember0", "UnionMember1"]
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class UnionMember0(BaseModel):
|
|
14
|
+
duplicate: Literal[False]
|
|
15
|
+
|
|
16
|
+
first_sale: bool = FieldInfo(alias="firstSale")
|
|
17
|
+
|
|
18
|
+
message: str
|
|
19
|
+
|
|
20
|
+
success: Literal[True]
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
class UnionMember1(BaseModel):
|
|
24
|
+
commissions_created: int = FieldInfo(alias="commissionsCreated")
|
|
25
|
+
|
|
26
|
+
duplicate: Literal[True]
|
|
27
|
+
|
|
28
|
+
duplicate_fields: List[str] = FieldInfo(alias="duplicateFields")
|
|
29
|
+
|
|
30
|
+
matching_commission_ids: List[str] = FieldInfo(alias="matchingCommissionIds")
|
|
31
|
+
|
|
32
|
+
message: str
|
|
33
|
+
|
|
34
|
+
success: Literal[False]
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
ParticipantRecordTransactionResponse: TypeAlias = Union[UnionMember0, UnionMember1]
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import Optional
|
|
4
|
+
from typing_extensions import Literal
|
|
5
|
+
|
|
6
|
+
from pydantic import Field as FieldInfo
|
|
7
|
+
|
|
8
|
+
from ..._models import BaseModel
|
|
9
|
+
from ..commission_structure import CommissionStructure
|
|
10
|
+
|
|
11
|
+
__all__ = ["ParticipantReward"]
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class ParticipantReward(BaseModel):
|
|
15
|
+
id: str
|
|
16
|
+
|
|
17
|
+
reward_id: str = FieldInfo(alias="rewardId")
|
|
18
|
+
|
|
19
|
+
status: Literal["PENDING", "FULFILLED"]
|
|
20
|
+
|
|
21
|
+
approved: Optional[bool] = None
|
|
22
|
+
|
|
23
|
+
approved_at: Optional[int] = FieldInfo(alias="approvedAt", default=None)
|
|
24
|
+
|
|
25
|
+
commission_structure: Optional[CommissionStructure] = FieldInfo(alias="commissionStructure", default=None)
|
|
26
|
+
|
|
27
|
+
fulfilled_at: Optional[int] = FieldInfo(alias="fulfilledAt", default=None)
|
|
28
|
+
|
|
29
|
+
is_available: Optional[bool] = FieldInfo(alias="isAvailable", default=None)
|
|
30
|
+
|
|
31
|
+
is_fulfilled: Optional[bool] = FieldInfo(alias="isFulfilled", default=None)
|
|
32
|
+
|
|
33
|
+
is_referrer: Optional[bool] = FieldInfo(alias="isReferrer", default=None)
|
|
34
|
+
|
|
35
|
+
referred_id: Optional[str] = FieldInfo(alias="referredId", default=None)
|
|
36
|
+
|
|
37
|
+
referrer_id: Optional[str] = FieldInfo(alias="referrerId", default=None)
|
|
38
|
+
|
|
39
|
+
unread: Optional[bool] = None
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing_extensions import Required, Annotated, TypedDict
|
|
6
|
+
|
|
7
|
+
from ..._types import SequenceNotStr
|
|
8
|
+
from ..._utils import PropertyInfo
|
|
9
|
+
|
|
10
|
+
__all__ = ["ParticipantSendInvitesParams"]
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class ParticipantSendInvitesParams(TypedDict, total=False):
|
|
14
|
+
id: Required[str]
|
|
15
|
+
|
|
16
|
+
email_addresses: Required[Annotated[SequenceNotStr[str], PropertyInfo(alias="emailAddresses")]]
|
|
17
|
+
|
|
18
|
+
message_text: Required[Annotated[str, PropertyInfo(alias="messageText")]]
|
|
19
|
+
|
|
20
|
+
subject_text: Required[Annotated[str, PropertyInfo(alias="subjectText")]]
|
|
@@ -0,0 +1,15 @@
|
|
|
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__ = ["ParticipantSendInvitesResponse"]
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class ParticipantSendInvitesResponse(BaseModel):
|
|
11
|
+
invites_sent: int = FieldInfo(alias="invitesSent")
|
|
12
|
+
|
|
13
|
+
message_type: str = FieldInfo(alias="messageType")
|
|
14
|
+
|
|
15
|
+
success: bool
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import Optional
|
|
4
|
+
|
|
5
|
+
from ..._models import BaseModel
|
|
6
|
+
|
|
7
|
+
__all__ = ["ParticipantTriggerReferralResponse"]
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class ParticipantTriggerReferralResponse(BaseModel):
|
|
11
|
+
success: bool
|
|
12
|
+
|
|
13
|
+
message: Optional[str] = None
|
|
@@ -0,0 +1,34 @@
|
|
|
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 ..._types import SequenceNotStr
|
|
9
|
+
from ..._utils import PropertyInfo
|
|
10
|
+
|
|
11
|
+
__all__ = ["ParticipantUpdateParams"]
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class ParticipantUpdateParams(TypedDict, total=False):
|
|
15
|
+
id: Required[str]
|
|
16
|
+
|
|
17
|
+
email: str
|
|
18
|
+
|
|
19
|
+
first_name: Annotated[str, PropertyInfo(alias="firstName")]
|
|
20
|
+
|
|
21
|
+
last_name: Annotated[str, PropertyInfo(alias="lastName")]
|
|
22
|
+
|
|
23
|
+
metadata: Dict[str, object]
|
|
24
|
+
"""Shallow custom metadata object."""
|
|
25
|
+
|
|
26
|
+
referral_status: Annotated[
|
|
27
|
+
Literal["CREDIT_PENDING", "CREDIT_AWARDED", "CREDIT_EXPIRED"], PropertyInfo(alias="referralStatus")
|
|
28
|
+
]
|
|
29
|
+
|
|
30
|
+
referred_by: Annotated[str, PropertyInfo(alias="referredBy")]
|
|
31
|
+
|
|
32
|
+
unsubscribed: bool
|
|
33
|
+
|
|
34
|
+
vanity_keys: Annotated[SequenceNotStr[str], PropertyInfo(alias="vanityKeys")]
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing_extensions import Literal, TypeAlias
|
|
4
|
+
|
|
5
|
+
__all__ = ["ReferralStatus"]
|
|
6
|
+
|
|
7
|
+
ReferralStatus: TypeAlias = Literal["CREDIT_PENDING", "CREDIT_AWARDED", "CREDIT_EXPIRED", "INVITE_SENT"]
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing_extensions import Required, TypedDict
|
|
6
|
+
|
|
7
|
+
__all__ = ["RewardApproveParams"]
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class RewardApproveParams(TypedDict, total=False):
|
|
11
|
+
id: Required[str]
|
|
12
|
+
|
|
13
|
+
fulfill: bool
|
|
14
|
+
"""Set true to mark the reward as fulfilled after approval."""
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing_extensions import Literal, Annotated, TypedDict
|
|
6
|
+
|
|
7
|
+
from .._utils import PropertyInfo
|
|
8
|
+
|
|
9
|
+
__all__ = ["CampaignListCommissionsParams"]
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class CampaignListCommissionsParams(TypedDict, total=False):
|
|
13
|
+
limit: int
|
|
14
|
+
"""Number of results to return. Maximum 100."""
|
|
15
|
+
|
|
16
|
+
next_id: Annotated[str, PropertyInfo(alias="nextId")]
|
|
17
|
+
"""ID to start the next paged result set with."""
|
|
18
|
+
|
|
19
|
+
status: Literal["PENDING", "APPROVED", "PAID", "REVERSED", "DELETED"]
|
|
20
|
+
"""Participant commission status."""
|
|
@@ -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_extensions import Literal, Annotated, TypedDict
|
|
6
|
+
|
|
7
|
+
from .._utils import PropertyInfo
|
|
8
|
+
|
|
9
|
+
__all__ = ["CampaignListLeaderboardParams"]
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class CampaignListLeaderboardParams(TypedDict, total=False):
|
|
13
|
+
is_monthly: Annotated[bool, PropertyInfo(alias="isMonthly")]
|
|
14
|
+
"""Deprecated. Use `leaderboardType=CURRENT_MONTH` instead."""
|
|
15
|
+
|
|
16
|
+
leaderboard_type: Annotated[
|
|
17
|
+
Literal[
|
|
18
|
+
"ALL_TIME",
|
|
19
|
+
"CURRENT_MONTH",
|
|
20
|
+
"PREV_MONTH",
|
|
21
|
+
"TOTAL_IMPRESSION_COUNT",
|
|
22
|
+
"UNIQUE_IMPRESSION_COUNT",
|
|
23
|
+
"BY_COMMISSIONS",
|
|
24
|
+
"BY_REVENUE",
|
|
25
|
+
"BY_REFERRALS",
|
|
26
|
+
"BY_LEADS",
|
|
27
|
+
],
|
|
28
|
+
PropertyInfo(alias="leaderboardType"),
|
|
29
|
+
]
|
|
30
|
+
"""Leaderboard ordering mode."""
|
|
31
|
+
|
|
32
|
+
limit: int
|
|
33
|
+
"""Number of results to return. Maximum 100."""
|
|
34
|
+
|
|
35
|
+
next_id: Annotated[str, PropertyInfo(alias="nextId")]
|
|
36
|
+
"""ID to start the next paged result set with."""
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing_extensions import Annotated, TypedDict
|
|
6
|
+
|
|
7
|
+
from .._utils import PropertyInfo
|
|
8
|
+
|
|
9
|
+
__all__ = ["CampaignListParticipantsParams"]
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class CampaignListParticipantsParams(TypedDict, total=False):
|
|
13
|
+
limit: int
|
|
14
|
+
"""Number of results to return. Maximum 100."""
|
|
15
|
+
|
|
16
|
+
next_id: Annotated[str, PropertyInfo(alias="nextId")]
|
|
17
|
+
"""ID to start the next paged result set with."""
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing_extensions import Literal, Annotated, TypedDict
|
|
6
|
+
|
|
7
|
+
from .._utils import PropertyInfo
|
|
8
|
+
|
|
9
|
+
__all__ = ["CampaignListPayoutsParams"]
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class CampaignListPayoutsParams(TypedDict, total=False):
|
|
13
|
+
limit: int
|
|
14
|
+
"""Number of results to return. Maximum 100."""
|
|
15
|
+
|
|
16
|
+
next_id: Annotated[str, PropertyInfo(alias="nextId")]
|
|
17
|
+
"""ID to start the next paged result set with."""
|
|
18
|
+
|
|
19
|
+
status: Literal["UPCOMING", "QUEUED", "ISSUED", "FAILED"]
|
|
20
|
+
"""Participant payout status."""
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing_extensions import Literal, Annotated, TypedDict
|
|
6
|
+
|
|
7
|
+
from .._utils import PropertyInfo
|
|
8
|
+
from .campaign.referral_status import ReferralStatus
|
|
9
|
+
|
|
10
|
+
__all__ = ["CampaignListReferralsParams"]
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class CampaignListReferralsParams(TypedDict, total=False):
|
|
14
|
+
desc: bool
|
|
15
|
+
"""Return results in descending order when true."""
|
|
16
|
+
|
|
17
|
+
email: str
|
|
18
|
+
"""URL-encoded email value to filter referral results."""
|
|
19
|
+
|
|
20
|
+
first_name: Annotated[str, PropertyInfo(alias="firstName")]
|
|
21
|
+
"""First name value to filter results."""
|
|
22
|
+
|
|
23
|
+
last_name: Annotated[str, PropertyInfo(alias="lastName")]
|
|
24
|
+
"""Last name value to filter results."""
|
|
25
|
+
|
|
26
|
+
limit: int
|
|
27
|
+
"""Number of results to return. Maximum 100."""
|
|
28
|
+
|
|
29
|
+
next_id: Annotated[str, PropertyInfo(alias="nextId")]
|
|
30
|
+
"""ID to start the next paged result set with."""
|
|
31
|
+
|
|
32
|
+
offset: int
|
|
33
|
+
"""Offset number used to skip through a result set."""
|
|
34
|
+
|
|
35
|
+
referral_status: Annotated[ReferralStatus, PropertyInfo(alias="referralStatus")]
|
|
36
|
+
|
|
37
|
+
sort_by: Annotated[
|
|
38
|
+
Literal["updatedAt", "createdAt", "email", "firstName", "lastName", "referralStatus", "referralTriggeredAt"],
|
|
39
|
+
PropertyInfo(alias="sortBy"),
|
|
40
|
+
]
|
|
41
|
+
"""Field used to sort referral results."""
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import List
|
|
4
|
+
|
|
5
|
+
from .._models import BaseModel
|
|
6
|
+
from .campaign.campaign import Campaign
|
|
7
|
+
|
|
8
|
+
__all__ = ["CampaignListResponse"]
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class CampaignListResponse(BaseModel):
|
|
12
|
+
campaigns: List[Campaign]
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing_extensions import Annotated, TypedDict
|
|
6
|
+
|
|
7
|
+
from .._utils import PropertyInfo
|
|
8
|
+
|
|
9
|
+
__all__ = ["CampaignRetrieveAnalyticsParams"]
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class CampaignRetrieveAnalyticsParams(TypedDict, total=False):
|
|
13
|
+
days: int
|
|
14
|
+
"""Last number of days to retrieve analytics for. Defaults to 365. Maximum 1825."""
|
|
15
|
+
|
|
16
|
+
end_date: Annotated[int, PropertyInfo(alias="endDate")]
|
|
17
|
+
"""End date of the analytics timeframe as a Unix timestamp in milliseconds.
|
|
18
|
+
|
|
19
|
+
Required if `days` is not set.
|
|
20
|
+
"""
|
|
21
|
+
|
|
22
|
+
start_date: Annotated[int, PropertyInfo(alias="startDate")]
|
|
23
|
+
"""Start date of the analytics timeframe as a Unix timestamp in milliseconds.
|
|
24
|
+
|
|
25
|
+
Required if `days` is not set.
|
|
26
|
+
"""
|