mcm-cli 1.4.0__py3-none-any.whl → 1.4.1__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- {mcm_cli-1.4.0.dist-info → mcm_cli-1.4.1.dist-info}/METADATA +3 -2
- mcm_cli-1.4.1.dist-info/RECORD +32 -0
- mcmcli/__main__.py +5 -1
- mcmcli/command/account.py +10 -12
- mcmcli/command/admin.py +353 -19
- mcmcli/command/auth.py +14 -0
- mcmcli/command/campaign.py +317 -0
- mcmcli/command/config.py +2 -0
- mcmcli/command/decision.py +4 -0
- mcmcli/command/report.py +150 -0
- mcmcli/command/wallet.py +37 -36
- mcmcli/data/campaign.py +69 -0
- mcmcli/data/platform_user.py +64 -0
- mcmcli/data/report.py +110 -0
- mcmcli/data/user_join_request.py +44 -0
- mcm_cli-1.4.0.dist-info/RECORD +0 -26
- {mcm_cli-1.4.0.dist-info → mcm_cli-1.4.1.dist-info}/LICENSE +0 -0
- {mcm_cli-1.4.0.dist-info → mcm_cli-1.4.1.dist-info}/NOTICE +0 -0
- {mcm_cli-1.4.0.dist-info → mcm_cli-1.4.1.dist-info}/WHEEL +0 -0
- {mcm_cli-1.4.0.dist-info → mcm_cli-1.4.1.dist-info}/entry_points.txt +0 -0
- {mcm_cli-1.4.0.dist-info → mcm_cli-1.4.1.dist-info}/top_level.txt +0 -0
mcmcli/data/campaign.py
ADDED
@@ -0,0 +1,69 @@
|
|
1
|
+
# Copyright 2023 Moloco, Inc
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
15
|
+
from pydantic import BaseModel
|
16
|
+
from typing import Optional
|
17
|
+
|
18
|
+
#
|
19
|
+
# API response dataclasses
|
20
|
+
#
|
21
|
+
class MicroPrice(BaseModel):
|
22
|
+
currency: str
|
23
|
+
amount_micro: str
|
24
|
+
|
25
|
+
class Schedule(BaseModel):
|
26
|
+
start: str
|
27
|
+
end: Optional[str]
|
28
|
+
|
29
|
+
class Budget(BaseModel):
|
30
|
+
period: str
|
31
|
+
amount: MicroPrice
|
32
|
+
|
33
|
+
class TargetCpc(BaseModel):
|
34
|
+
target_cpc: MicroPrice
|
35
|
+
|
36
|
+
class TargetRoas(BaseModel):
|
37
|
+
target_roas: int
|
38
|
+
|
39
|
+
class Goal(BaseModel):
|
40
|
+
type: str
|
41
|
+
optimize_fixed_cpc: Optional[TargetCpc] = None
|
42
|
+
optimize_roas: Optional[TargetRoas] = None
|
43
|
+
|
44
|
+
class Campaign(BaseModel):
|
45
|
+
id: str
|
46
|
+
title: str
|
47
|
+
ad_account_id: str
|
48
|
+
creative_ids: Optional[list[str]]
|
49
|
+
hidden: bool
|
50
|
+
operation_type: str
|
51
|
+
ad_type: str
|
52
|
+
schedule: Schedule
|
53
|
+
daily_budget: MicroPrice
|
54
|
+
budget: Budget
|
55
|
+
targeting: Optional[str]
|
56
|
+
managed_setting: Optional[str]
|
57
|
+
text_entry: str
|
58
|
+
goal: Goal
|
59
|
+
catalog_item_ids: list[str]
|
60
|
+
enabling_state: str
|
61
|
+
state: str
|
62
|
+
created_at: str
|
63
|
+
updated_at: str
|
64
|
+
audience_types: list[str]
|
65
|
+
offsite_setting: Optional[str]
|
66
|
+
|
67
|
+
class CampaignList(BaseModel):
|
68
|
+
campaigns: list[Campaign]
|
69
|
+
without_catalog_item_ids: bool
|
@@ -0,0 +1,64 @@
|
|
1
|
+
# Copyright 2023 Moloco, Inc
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
15
|
+
from pydantic import BaseModel
|
16
|
+
|
17
|
+
#
|
18
|
+
# Platform user response dataclasses
|
19
|
+
#
|
20
|
+
#
|
21
|
+
# {
|
22
|
+
# "users": [
|
23
|
+
# {
|
24
|
+
# "id": "00YtNXn8PQGFPXiBS9oi",
|
25
|
+
# "email": "user@email.com",
|
26
|
+
# "name": "John Doe",
|
27
|
+
# "roles": [
|
28
|
+
# {
|
29
|
+
# "name": "PLATFORM_USER",
|
30
|
+
# "resource_type": "PLATFORM",
|
31
|
+
# "resource_id": "DEMO_TEST"
|
32
|
+
# },
|
33
|
+
# {
|
34
|
+
# "name": "AD_ACCOUNT_OWNER",
|
35
|
+
# "resource_type": "AD_ACCOUNT",
|
36
|
+
# "resource_id": "678acd3a-82b5-11e7-afa5-128878ebb8b6"
|
37
|
+
# }
|
38
|
+
# ],
|
39
|
+
# "status": "NOT_REGISTERED",
|
40
|
+
# "created_at": "2024-05-16T16:13:52Z",
|
41
|
+
# "updated_at": "2024-05-16T16:13:52Z"
|
42
|
+
# }
|
43
|
+
# ]
|
44
|
+
# }
|
45
|
+
|
46
|
+
class Role(BaseModel):
|
47
|
+
name: str
|
48
|
+
resource_type: str
|
49
|
+
resource_id: str
|
50
|
+
|
51
|
+
class PlatformUser(BaseModel):
|
52
|
+
id: str
|
53
|
+
email: str
|
54
|
+
name: str
|
55
|
+
roles: list[Role]
|
56
|
+
status: str
|
57
|
+
created_at: str
|
58
|
+
updated_at: str
|
59
|
+
|
60
|
+
class PlatformUserListWrapper(BaseModel):
|
61
|
+
users: list[PlatformUser]
|
62
|
+
|
63
|
+
class PlatformUserWrapper(BaseModel):
|
64
|
+
user: PlatformUser
|
mcmcli/data/report.py
ADDED
@@ -0,0 +1,110 @@
|
|
1
|
+
# Copyright 2023 Moloco, Inc
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
15
|
+
from pydantic import BaseModel
|
16
|
+
from typing import Optional
|
17
|
+
|
18
|
+
#
|
19
|
+
# API response dataclasses
|
20
|
+
#
|
21
|
+
# The report command's example response is as below:
|
22
|
+
#
|
23
|
+
# {
|
24
|
+
# "rows": [
|
25
|
+
# {
|
26
|
+
# "date": "",
|
27
|
+
# "timezone": "America/New_York",
|
28
|
+
# "currency": "",
|
29
|
+
# "ad_account_id": "",
|
30
|
+
# "ad_account_title": "",
|
31
|
+
# "campaign_id": "",
|
32
|
+
# "campaign_title": "",
|
33
|
+
# "catalog_item_id": "",
|
34
|
+
# "catalog_item_title": "",
|
35
|
+
# "creative_id": "",
|
36
|
+
# "creative_title": "",
|
37
|
+
# "inventory_id": "",
|
38
|
+
# "audience_type": "",
|
39
|
+
# "imp_count": "14452078",
|
40
|
+
# "click_count": "271062",
|
41
|
+
# "money_spent": "11180060000",
|
42
|
+
# "purchase_count": "552",
|
43
|
+
# "purchase_breakdown": {
|
44
|
+
# "direct": "355",
|
45
|
+
# "indirect": "197",
|
46
|
+
# "total": "552"
|
47
|
+
# },
|
48
|
+
# "revenue": "54189164206",
|
49
|
+
# "revenue_breakdown": {
|
50
|
+
# "direct": "33440120100",
|
51
|
+
# "indirect": "20749044106",
|
52
|
+
# "total": "54189164206"
|
53
|
+
# },
|
54
|
+
# "roas": 484.6947530335258,
|
55
|
+
# "roas_breakdown": {
|
56
|
+
# "direct": 299.1050146421397,
|
57
|
+
# "indirect": 185.58973839138608,
|
58
|
+
# "total": 484.6947530335258
|
59
|
+
# },
|
60
|
+
# "cr": 0.20364344688669012,
|
61
|
+
# "ctr": 1.8755918699027225,
|
62
|
+
# "imp_to_purchase": 0.0038195199333964295,
|
63
|
+
# "num_ad_accounts": "34",
|
64
|
+
# "items_per_ad_account": 462.44117647058823,
|
65
|
+
# "cpc": 41245.397731884215,
|
66
|
+
# "acos": null,
|
67
|
+
# "cpm": 773595.3265682624
|
68
|
+
# }
|
69
|
+
# ]
|
70
|
+
# }
|
71
|
+
|
72
|
+
class NumberBreakdown(BaseModel):
|
73
|
+
direct: float
|
74
|
+
indirect: float
|
75
|
+
total: float
|
76
|
+
|
77
|
+
class Report(BaseModel):
|
78
|
+
date: str
|
79
|
+
timezone: str
|
80
|
+
currency: str
|
81
|
+
ad_account_id: str
|
82
|
+
ad_account_title: str
|
83
|
+
campaign_id: str
|
84
|
+
campaign_title: str
|
85
|
+
catalog_item_id: str
|
86
|
+
catalog_item_title: str
|
87
|
+
creative_id: str
|
88
|
+
creative_title: str
|
89
|
+
inventory_id: str
|
90
|
+
audience_type: str
|
91
|
+
imp_count: str
|
92
|
+
click_count: str
|
93
|
+
money_spent: str
|
94
|
+
purchase_count: str
|
95
|
+
purchase_breakdown: NumberBreakdown
|
96
|
+
revenue: str
|
97
|
+
revenue_breakdown: NumberBreakdown
|
98
|
+
roas: float
|
99
|
+
roas_breakdown: NumberBreakdown
|
100
|
+
cr: float
|
101
|
+
ctr: float
|
102
|
+
imp_to_purchase: float
|
103
|
+
num_ad_accounts: str
|
104
|
+
items_per_ad_account: float
|
105
|
+
cpc: float
|
106
|
+
acos: Optional[float]
|
107
|
+
cpm: float
|
108
|
+
|
109
|
+
class ReportList(BaseModel):
|
110
|
+
rows: list[Report]
|
@@ -0,0 +1,44 @@
|
|
1
|
+
# Copyright 2023 Moloco, Inc
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
15
|
+
from pydantic import BaseModel
|
16
|
+
|
17
|
+
#
|
18
|
+
# API error response dataclasses
|
19
|
+
#
|
20
|
+
# invite-user command's example response is as below:
|
21
|
+
#
|
22
|
+
# {
|
23
|
+
# 'user_join_request': {
|
24
|
+
# 'id': 'I6QpJhsvb2iswMN3',
|
25
|
+
# 'ad_account_id': 'test',
|
26
|
+
# 'user_email': 'a@b.com',
|
27
|
+
# 'user_name': 'asfds',
|
28
|
+
# 'role': 'AD_ACCOUNT_OWNER',
|
29
|
+
# 'created_at': '2024-05-13T00:54:49.874934Z',
|
30
|
+
# 'updated_at': '2024-05-13T00:54:49.874934Z'
|
31
|
+
# }
|
32
|
+
# }
|
33
|
+
|
34
|
+
class UserJoinRequest(BaseModel):
|
35
|
+
id: str # join request ID
|
36
|
+
ad_account_id: str
|
37
|
+
user_email: str
|
38
|
+
user_name: str
|
39
|
+
role: str
|
40
|
+
created_at: str
|
41
|
+
updated_at: str
|
42
|
+
|
43
|
+
class UserJoinRequestWrapper(BaseModel):
|
44
|
+
user_join_request: UserJoinRequest
|
mcm_cli-1.4.0.dist-info/RECORD
DELETED
@@ -1,26 +0,0 @@
|
|
1
|
-
mcmcli/__init__.py,sha256=-U6lMZ9_99IXAKwnqnYXYr6NcO6TSmG-kxewgvJjU4k,575
|
2
|
-
mcmcli/__main__.py,sha256=eoXcJ-YvL7VS-qI3tzWEm2Zz9Mc3aKMC2WRgr8nxDAY,1616
|
3
|
-
mcmcli/logging.py,sha256=xjRS5ey1ONx_d34qB1Fetb_SwPysoh2hzNDuNAaYYWQ,1739
|
4
|
-
mcmcli/requests.py,sha256=IuySBQ8P_GoGF3f_TRysfgQNOhi2n9M84WK_eRXnoEU,2945
|
5
|
-
mcmcli/command/account.py,sha256=kxJbBKYrw6OyCdaNZ0K0BEvKgZEAjj5azO-lNSeYLTM,25107
|
6
|
-
mcmcli/command/admin.py,sha256=mDngighzQZPWlq0hOex2qzW8GNcZmvzVOTWre5RTJRE,5520
|
7
|
-
mcmcli/command/auth.py,sha256=QLdr_XFW5BVw9r4a7Kjj5BTBXpSux3AWI9eI03S8aiA,2480
|
8
|
-
mcmcli/command/config.py,sha256=sdzge-l_Yi2P_TlTgSLqShcGyPCzpW3QJzctpIvc-g4,4195
|
9
|
-
mcmcli/command/decision.py,sha256=Zjbmt71OVU-oL8Itt9O-SvwT9Lbxw-PAgRZaIgiXi-E,8411
|
10
|
-
mcmcli/command/wallet.py,sha256=giPDktndwh-NSIZbCvBzCQ6_MttZsqOkCW1wJ-fFJ8Y,11708
|
11
|
-
mcmcli/data/account.py,sha256=pe7tPapP6vlUD5D5L5Nh5k2bkWdYOK01Mpt5fBYFnJs,1782
|
12
|
-
mcmcli/data/account_user.py,sha256=27nQp52nMma5a3QszSJGqgq5Z0ivIb-nMZcZuhEgbEg,1328
|
13
|
-
mcmcli/data/decision.py,sha256=bQ5j_PbPRSFa0sY5g9UVqdNzl_2epchcz1lHoDVuV90,2880
|
14
|
-
mcmcli/data/error.py,sha256=d6xa_jTXumlA0EzXy2PJQ86ajBb0Pm90fss9R3LuHUc,1094
|
15
|
-
mcmcli/data/item.py,sha256=Z2xTRhU8T4vyJADO0l6-XPyQXvb9DX_OAjExhSXpW2A,1091
|
16
|
-
mcmcli/data/item_blocking_result.py,sha256=daK4c8--aCe2vRsnTzLBjgKQo0C-zcDH09dC0GgrN7E,1429
|
17
|
-
mcmcli/data/seller.py,sha256=40SA7QekM3a3svDrDYLo_QYJ68VUxDO0KeGejJMp4k4,1004
|
18
|
-
mcmcli/data/token.py,sha256=11wtyLHCAZHu0LVbNDPa-yipcL6lenxoYIKEI58VzFs,1744
|
19
|
-
mcmcli/data/wallet.py,sha256=eMUi8N0vJdg_E10TPhSPoZkZtmIG7gHyqgabQ8C5Lg8,3217
|
20
|
-
mcm_cli-1.4.0.dist-info/LICENSE,sha256=RFhQPdSOiMTguUX7JSoIuTxA7HVzCbj_p8WU36HjUQQ,10947
|
21
|
-
mcm_cli-1.4.0.dist-info/METADATA,sha256=qRht0jD47cuF5FQN1JwCZPlVWsIWNrsMl_sdY4VF7Rs,3018
|
22
|
-
mcm_cli-1.4.0.dist-info/NOTICE,sha256=Ldnl2MjRaXPxcldUdbI2NTybq60XAa2LowRhFrRTuiI,76
|
23
|
-
mcm_cli-1.4.0.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
|
24
|
-
mcm_cli-1.4.0.dist-info/entry_points.txt,sha256=qTHAWZ-ejSiU4t11RYwtAU8ScqhQPDeMVTG9y4wMVLg,60
|
25
|
-
mcm_cli-1.4.0.dist-info/top_level.txt,sha256=sh7oqIaqLQlMtKHlxHHgpV2xGMrBMPFWpSp0C6nvJ_Y,7
|
26
|
-
mcm_cli-1.4.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|