@affonso/cli 0.1.4 → 0.2.0
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.
- package/README.md +43 -10
- package/dist/index.js +809 -306
- package/package.json +5 -3
package/README.md
CHANGED
|
@@ -79,18 +79,21 @@ affonso <command> <subcommand> [options]
|
|
|
79
79
|
```bash
|
|
80
80
|
affonso affiliates list [--status pending|approved|rejected] [--search <query>] [--limit <n>] [--page <n>]
|
|
81
81
|
affonso affiliates get <id>
|
|
82
|
-
affonso affiliates create --name <name> --email <email> --
|
|
83
|
-
affonso affiliates update <id> [--name <name>] [--status <status>] [--
|
|
82
|
+
affonso affiliates create --name <name> --email <email> [--status pending|approved|rejected] [--metadata-json <json|@file>]
|
|
83
|
+
affonso affiliates update <id> [--name <name>] [--status <status>] [--invoice-details-json <json|@file>]
|
|
84
|
+
affonso affiliates onboarding-responses get <id>
|
|
85
|
+
affonso affiliates onboarding-responses submit <id> --responses-json <json|@file> [--mark-complete]
|
|
86
|
+
affonso affiliates portal-token <id>
|
|
84
87
|
affonso affiliates delete <id>
|
|
85
88
|
```
|
|
86
89
|
|
|
87
90
|
#### Referrals
|
|
88
91
|
|
|
89
92
|
```bash
|
|
90
|
-
affonso referrals list [--affiliate-id <id>] [--status <status>] [--limit <n>]
|
|
93
|
+
affonso referrals list [--affiliate-id <id>] [--external-user-id <id>] [--status <status>] [--limit <n>]
|
|
91
94
|
affonso referrals get <id>
|
|
92
|
-
affonso referrals create --email <email> --affiliate-id <id>
|
|
93
|
-
affonso referrals update <id> [--status <status>] [--email <email>]
|
|
95
|
+
affonso referrals create --email <email> --affiliate-id <id> [--metadata-json <json|@file>]
|
|
96
|
+
affonso referrals update <id> [--status <status>] [--email <email>] [--metadata-json <json|@file>]
|
|
94
97
|
affonso referrals delete <id>
|
|
95
98
|
```
|
|
96
99
|
|
|
@@ -99,7 +102,7 @@ affonso referrals delete <id>
|
|
|
99
102
|
```bash
|
|
100
103
|
affonso commissions list [--status <status>] [--affiliate-id <id>] [--limit <n>] [--page <n>]
|
|
101
104
|
affonso commissions get <id>
|
|
102
|
-
affonso commissions create --referral-id <id> --sale-amount <n> --
|
|
105
|
+
affonso commissions create --referral-id <id> --sale-amount <n> --commission-amount <n> [--sale-amount-currency <code>] [--commission-currency <code>]
|
|
103
106
|
affonso commissions update <id> [--status <status>] [--sale-amount <n>]
|
|
104
107
|
affonso commissions delete <id>
|
|
105
108
|
```
|
|
@@ -124,20 +127,48 @@ affonso payouts update <id> --status <status>
|
|
|
124
127
|
#### Clicks
|
|
125
128
|
|
|
126
129
|
```bash
|
|
127
|
-
affonso clicks create --
|
|
130
|
+
affonso clicks create --tracking-id <id> [--created-at <date>] [--gclid <id>] [--fbclid <id>]
|
|
128
131
|
```
|
|
129
132
|
|
|
130
133
|
#### Embed tokens
|
|
131
134
|
|
|
132
135
|
```bash
|
|
133
|
-
affonso embed-tokens create [--
|
|
136
|
+
affonso embed-tokens create --email <email> [--name <name>] [--group-id <id>] [--external-user-id <id>]
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
#### Onboarding forms
|
|
140
|
+
|
|
141
|
+
```bash
|
|
142
|
+
affonso onboarding-form get
|
|
143
|
+
affonso onboarding-form create --name <name> --questions-json <json|@file>
|
|
144
|
+
affonso onboarding-form update [--name <name>] [--questions-json <json|@file>]
|
|
145
|
+
affonso onboarding-form delete
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
#### Server-side events
|
|
149
|
+
|
|
150
|
+
Conversions and generic events are signed with `AFFONSO_SIGNING_SECRET`. Source adapters use
|
|
151
|
+
`AFFONSO_CUSTOM_SOURCE_SIGNING_SECRET` or `AFFONSO_SEGMENT_SIGNING_SECRET`.
|
|
152
|
+
|
|
153
|
+
```bash
|
|
154
|
+
affonso signups create --click-id <id> [--email <email>] [--external-user-id <id>]
|
|
155
|
+
affonso conversions create --sale-amount <n> --external-event-id <id> [--referral-id <id>]
|
|
156
|
+
affonso conversions refund <id> [--amount <n>] [--reason <text>]
|
|
157
|
+
affonso events create --event-name <name> [--event-type conversion|lead|trial|milestone]
|
|
158
|
+
affonso sources ingest custom --payload-json <json|@file>
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
#### Public tracking
|
|
162
|
+
|
|
163
|
+
```bash
|
|
164
|
+
affonso tracking track --program-id <id> [--tracking-id <id>] [--utm-source <value>]
|
|
134
165
|
```
|
|
135
166
|
|
|
136
167
|
#### Program settings
|
|
137
168
|
|
|
138
169
|
```bash
|
|
139
170
|
affonso program get
|
|
140
|
-
affonso program update [--name <name>] [--
|
|
171
|
+
affonso program update [--name <name>] [--access-mode PUBLIC|PRIVATE|INVITE]
|
|
141
172
|
|
|
142
173
|
# Sub-resources
|
|
143
174
|
affonso program payment-terms get|update
|
|
@@ -153,7 +184,7 @@ affonso program creatives list|get <id>|create|update <id>|delete <id>
|
|
|
153
184
|
#### Marketplace (public, no auth required)
|
|
154
185
|
|
|
155
186
|
```bash
|
|
156
|
-
affonso marketplace list [--category <cat>]
|
|
187
|
+
affonso marketplace list [--category <cat>]
|
|
157
188
|
affonso marketplace get <id>
|
|
158
189
|
```
|
|
159
190
|
|
|
@@ -174,6 +205,8 @@ affonso affiliates get aff_123 --json
|
|
|
174
205
|
```
|
|
175
206
|
|
|
176
207
|
This is especially useful for AI agents that need to parse and act on the data programmatically.
|
|
208
|
+
Options ending in `--*-json` accept either inline JSON or `@path/to/file.json`. Invalid JSON is
|
|
209
|
+
rejected before an API request is made.
|
|
177
210
|
|
|
178
211
|
## Use with AI agents
|
|
179
212
|
|