@atlasauth/backend 0.13.0 → 0.14.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/CHANGELOG.md +6 -0
- package/README.md +2 -0
- package/dist/client/referrals.d.ts +13 -0
- package/dist/client/referrals.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @atlasauth/backend changelog
|
|
2
2
|
|
|
3
|
+
## 0.14.0
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
|
|
7
|
+
- Referral settings carry browser capture: `browser_sources` (the referral programs whose script or cookie the browser reads; null on update resets to the provider's default), `browser_sources_default`, and `consent_provider` (`auto`, one consent manager, or `app`).
|
|
8
|
+
|
|
3
9
|
## 0.13.0
|
|
4
10
|
|
|
5
11
|
### Added
|
package/README.md
CHANGED
|
@@ -426,6 +426,8 @@ await atlas.users.update('user_123', { referral_code: 'ada-1' }); // 409 REFERRA
|
|
|
426
426
|
await atlas.users.flagReferral('user_123', { reason: 'self-referral' });
|
|
427
427
|
```
|
|
428
428
|
|
|
429
|
+
Browser capture: `browser_sources` lists the referral programs whose script or cookie the browser reads (null on update goes back to the provider's default, reported by `browser_sources_default`), and `consent_provider` picks the consent manager that decides (`auto`, one manager, or `app`).
|
|
430
|
+
|
|
429
431
|
Enabling without what the provider needs is `422 REFERRALS_NOT_CONFIGURED`. When the platform answers late, Atlas sends the `user.referral_attributed` webhook (`UserReferralAttributedEvent`). Preflight may report `referrals_enabled_unverified` and `referrals_without_bot_protection`.
|
|
430
432
|
|
|
431
433
|
### Receive the referral protocol (referral platforms)
|
|
@@ -116,6 +116,10 @@ export interface ReferralInboundStatus {
|
|
|
116
116
|
outcome: ReferralInboundOutcome;
|
|
117
117
|
} | null;
|
|
118
118
|
}
|
|
119
|
+
/** A referral program whose script or cookie the browser reads. */
|
|
120
|
+
export type ReferralBrowserSource = 'referally' | 'rewardful' | 'tolt' | 'promotekit' | 'firstpromoter' | 'partnerstack' | 'dub';
|
|
121
|
+
/** Which consent manager decides on the tracking cookie's ids: `auto` (any common one), one manager, or `app` (only the app's own decision). */
|
|
122
|
+
export type ReferralConsentProvider = 'auto' | 'cookiemunch' | 'onetrust' | 'cookiebot' | 'didomi' | 'usercentrics' | 'osano' | 'cookieyes' | 'complianz' | 'klaro' | 'tcf' | 'consent_mode' | 'app';
|
|
119
123
|
/** What a platform answers to a ping. */
|
|
120
124
|
export interface ReferralPing {
|
|
121
125
|
ok: boolean;
|
|
@@ -172,6 +176,12 @@ export interface ReferralSettings {
|
|
|
172
176
|
code_lookup_url?: string | null;
|
|
173
177
|
/** Show an optional "Referral code" field on hosted sign-up. */
|
|
174
178
|
signup_code_field?: boolean;
|
|
179
|
+
/** The referral programs whose script or cookie the browser reads, in order (the provider's default unless set). */
|
|
180
|
+
browser_sources?: ReferralBrowserSource[];
|
|
181
|
+
/** Whether `browser_sources` is the provider's default. */
|
|
182
|
+
browser_sources_default?: boolean;
|
|
183
|
+
/** Which consent manager decides on the tracking cookie's ids (default `auto`). */
|
|
184
|
+
consent_provider?: ReferralConsentProvider;
|
|
175
185
|
/** Forward email, name and ban/unban changes to the platform (default true). */
|
|
176
186
|
forward_lifecycle?: boolean;
|
|
177
187
|
/** Mirror the result into `public_metadata.referral` (default false). */
|
|
@@ -225,6 +235,9 @@ export interface UpdateReferralSettingsBody {
|
|
|
225
235
|
/** An https URL containing `{code}`. */
|
|
226
236
|
code_lookup_url?: string | null;
|
|
227
237
|
signup_code_field?: boolean;
|
|
238
|
+
/** The programs to read, in order; null goes back to the provider's default. */
|
|
239
|
+
browser_sources?: ReferralBrowserSource[] | null;
|
|
240
|
+
consent_provider?: ReferralConsentProvider;
|
|
228
241
|
forward_lifecycle?: boolean;
|
|
229
242
|
mirror_to_public_metadata?: boolean;
|
|
230
243
|
include_referral_claims?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"referrals.js","sourceRoot":"","sources":["../../src/client/referrals.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"referrals.js","sourceRoot":"","sources":["../../src/client/referrals.ts"],"names":[],"mappings":";;AAkaA,8CAmEC;AAreD,uCAAgD;AAkahD,SAAgB,iBAAiB,CAAC,OAAkB;IAClD,OAAO;QACL,8FAA8F;QAC9F,GAAG;YACD,OAAO,OAAO,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,wBAAwB,EAAE,CAAC,CAAC;QACpE,CAAC;QACD,+EAA+E;QAC/E,MAAM,CAAC,IAAgC,EAAE,cAAuB;YAC9D,OAAO,OAAO,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,wBAAwB,EAAE,IAAI,EAAE,cAAc,EAAE,CAAC,CAAC;QAC5F,CAAC;QACD;;;WAGG;QACH,IAAI;YACF,OAAO,OAAO,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,6BAA6B,EAAE,CAAC,CAAC;QAC1E,CAAC;QACD,uEAAuE;QACvE,SAAS,CAAC,SAAkC,EAAE;YAC5C,OAAO,OAAO,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,8BAA8B,EAAE,KAAK,EAAE,EAAE,GAAG,MAAM,EAAE,EAAE,CAAC,CAAC;QAChG,CAAC;QACD;;;WAGG;QACH,SAAS,CAAC,EAAU,EAAE,cAAuB;YAC3C,OAAO,OAAO,CAAC;gBACb,MAAM,EAAE,MAAM;gBACd,IAAI,EAAE,gCAAgC,IAAA,aAAG,EAAC,EAAE,CAAC,QAAQ;gBACrD,cAAc;aACf,CAAC,CAAC;QACL,CAAC;QACD,6GAA6G;QAC7G,WAAW,CACT,SAA2D,EAAE,EAC7D,cAAuB;YAEvB,OAAO,OAAO,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,2CAA2C,EAAE,IAAI,EAAE,MAAM,EAAE,cAAc,EAAE,CAAC,CAAC;QACt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