@atlasauth/backend 0.28.0 → 0.30.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 +19 -0
- package/README.md +30 -0
- package/dist/backchannel-handlers.js +2 -2
- package/dist/backchannel-handlers.js.map +1 -1
- package/dist/client/domains.d.ts +33 -3
- package/dist/client/domains.js.map +1 -1
- package/dist/client/index.d.ts +53 -11
- package/dist/client/index.js +3 -0
- package/dist/client/index.js.map +1 -1
- package/dist/client/jwt-connections.d.ts +46 -0
- package/dist/client/jwt-connections.js +24 -0
- package/dist/client/jwt-connections.js.map +1 -0
- package/dist/client/org-ldap-connections.d.ts +10 -0
- package/dist/client/org-ldap-connections.js.map +1 -1
- package/dist/client/organizations.d.ts +106 -8
- package/dist/client/organizations.js +35 -3
- package/dist/client/organizations.js.map +1 -1
- package/dist/client/referrals.d.ts +35 -6
- package/dist/client/referrals.js +2 -2
- package/dist/client/referrals.js.map +1 -1
- package/dist/client/scim-tokens.d.ts +7 -0
- package/dist/client/scim-tokens.js.map +1 -1
- package/dist/client/sso-connections.d.ts +14 -0
- package/dist/client/sso-connections.js.map +1 -1
- package/dist/client/sso-onboarding.d.ts +14 -1
- package/dist/client/sso-onboarding.js +3 -2
- package/dist/client/sso-onboarding.js.map +1 -1
- package/dist/client/users.d.ts +42 -2
- package/dist/client/users.js +18 -0
- package/dist/client/users.js.map +1 -1
- package/dist/jwks-cache.d.ts +27 -0
- package/dist/jwks-cache.js +45 -4
- package/dist/jwks-cache.js.map +1 -1
- package/dist/oidc.d.ts +35 -1
- package/dist/oidc.js +39 -0
- package/dist/oidc.js.map +1 -1
- package/dist/rp.d.ts +189 -0
- package/dist/rp.js +224 -0
- package/dist/rp.js.map +1 -0
- package/dist/verify.d.ts +8 -0
- package/dist/verify.js +3 -1
- package/dist/verify.js.map +1 -1
- package/dist/webhook-common.d.ts +53 -0
- package/dist/webhook-common.js +48 -0
- package/dist/webhook-common.js.map +1 -0
- package/dist/webhooks-web.d.ts +24 -0
- package/dist/webhooks-web.js +82 -0
- package/dist/webhooks-web.js.map +1 -0
- package/dist/webhooks.d.ts +23 -41
- package/dist/webhooks.js +19 -70
- package/dist/webhooks.js.map +1 -1
- package/package.json +26 -1
|
@@ -9,16 +9,66 @@ export interface Organization {
|
|
|
9
9
|
image_url: string | null;
|
|
10
10
|
public_metadata: Metadata;
|
|
11
11
|
max_allowed_memberships: number;
|
|
12
|
-
|
|
12
|
+
/** null when your backend created the organization without a creator. */
|
|
13
|
+
created_by: string | null;
|
|
14
|
+
/** Your own id for this customer; unique per instance. */
|
|
15
|
+
external_id: string | null;
|
|
16
|
+
/** Role key → your product's name for it (echoed as the `org_role_mapped` token claim). */
|
|
17
|
+
role_mappings: Record<string, string> | null;
|
|
18
|
+
/** On create with `owner_email` only: the invitation sent to that address. */
|
|
19
|
+
owner_invitation?: {
|
|
20
|
+
object: 'organization_invitation';
|
|
21
|
+
id: string;
|
|
22
|
+
email: string;
|
|
23
|
+
role: string;
|
|
24
|
+
status: string;
|
|
25
|
+
expires_at: number | null;
|
|
26
|
+
};
|
|
13
27
|
created_at: number;
|
|
14
28
|
updated_at: number;
|
|
15
29
|
}
|
|
30
|
+
/** GET /v1/organizations/{id}: the organization plus its SSO setup. */
|
|
31
|
+
export interface OrganizationDetail extends Organization {
|
|
32
|
+
sso?: {
|
|
33
|
+
connections: {
|
|
34
|
+
id: string;
|
|
35
|
+
type: string;
|
|
36
|
+
status: 'draft' | 'active' | 'disabled';
|
|
37
|
+
}[];
|
|
38
|
+
/** The SCIM 2.0 base URL to give this organization's identity provider. */
|
|
39
|
+
scim_base_url: string;
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
/** GET /v1/organizations/by_domain/{domain}: the owning organization and the matched domain. */
|
|
43
|
+
export interface OrganizationByDomain extends Organization {
|
|
44
|
+
domain: {
|
|
45
|
+
object: 'org_domain';
|
|
46
|
+
id: string;
|
|
47
|
+
domain: string;
|
|
48
|
+
status: OrgDomainStatus;
|
|
49
|
+
verified_at: number | null;
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
export type OrgDomainStatus = 'pending' | 'verified' | 'failed';
|
|
53
|
+
export type OrgDomainVerificationMethod = 'dns_txt' | 'well_known' | 'email';
|
|
54
|
+
export interface ListOrganizationsParams extends CursorParams {
|
|
55
|
+
/** Only the organization with this external_id. */
|
|
56
|
+
external_id?: string;
|
|
57
|
+
/** public_metadata equality filters, sent as ?metadata[key]=value (AND). */
|
|
58
|
+
metadata?: Record<string, string>;
|
|
59
|
+
}
|
|
16
60
|
export interface OrganizationMembership {
|
|
17
61
|
object: 'organization_membership';
|
|
18
62
|
id: string;
|
|
19
63
|
organization_id: string;
|
|
20
64
|
user_id: string;
|
|
21
65
|
role: string;
|
|
66
|
+
/**
|
|
67
|
+
* Who manages the role: `scim`, `sso:<connection id>` or `ldap:<connection id>`
|
|
68
|
+
* (the identity provider keeps it in step), `directory_sync`, `manual` (set
|
|
69
|
+
* through the API or dashboard), or null (joined by invitation, or older rows).
|
|
70
|
+
*/
|
|
71
|
+
role_source?: string | null;
|
|
22
72
|
created_at: number;
|
|
23
73
|
}
|
|
24
74
|
export interface OrganizationInvitation {
|
|
@@ -37,7 +87,7 @@ export interface OrgDomain {
|
|
|
37
87
|
id: string;
|
|
38
88
|
organization_id: string;
|
|
39
89
|
domain: string;
|
|
40
|
-
status:
|
|
90
|
+
status: OrgDomainStatus;
|
|
41
91
|
auto_join: boolean;
|
|
42
92
|
default_role_id: string | null;
|
|
43
93
|
verification: {
|
|
@@ -45,6 +95,25 @@ export interface OrgDomain {
|
|
|
45
95
|
record_type: 'TXT';
|
|
46
96
|
record_value: string;
|
|
47
97
|
};
|
|
98
|
+
/** Every way to prove the domain. */
|
|
99
|
+
verification_methods: {
|
|
100
|
+
dns_txt: {
|
|
101
|
+
record_name: string;
|
|
102
|
+
record_type: 'TXT';
|
|
103
|
+
record_value: string;
|
|
104
|
+
};
|
|
105
|
+
well_known: {
|
|
106
|
+
url: string;
|
|
107
|
+
body: string;
|
|
108
|
+
content_type: string;
|
|
109
|
+
};
|
|
110
|
+
email: {
|
|
111
|
+
addresses: string[];
|
|
112
|
+
sent_to: string | null;
|
|
113
|
+
expires_at: number | null;
|
|
114
|
+
};
|
|
115
|
+
};
|
|
116
|
+
verification_method: OrgDomainVerificationMethod | null;
|
|
48
117
|
verified_at: number | null;
|
|
49
118
|
last_checked_at: number | null;
|
|
50
119
|
created_at: number;
|
|
@@ -232,10 +301,21 @@ export interface OrganizationEntitlements {
|
|
|
232
301
|
export interface CreateOrganizationBody {
|
|
233
302
|
name: string;
|
|
234
303
|
slug: string;
|
|
235
|
-
|
|
304
|
+
/** Seated with the creator role; omit (or null) for a backend-created organization with no members yet. */
|
|
305
|
+
created_by?: string | null;
|
|
306
|
+
external_id?: string;
|
|
307
|
+
public_metadata?: Metadata;
|
|
308
|
+
private_metadata?: Metadata;
|
|
309
|
+
/** Invites this address with the creator role (org:admin by default). */
|
|
310
|
+
owner_email?: string;
|
|
311
|
+
role_mappings?: Record<string, string>;
|
|
236
312
|
max_allowed_memberships?: number;
|
|
237
313
|
}
|
|
238
314
|
export interface UpdateOrganizationBody {
|
|
315
|
+
/** null clears it. */
|
|
316
|
+
external_id?: string | null;
|
|
317
|
+
/** null clears them. */
|
|
318
|
+
role_mappings?: Record<string, string> | null;
|
|
239
319
|
name?: string;
|
|
240
320
|
slug?: string;
|
|
241
321
|
image_url?: string;
|
|
@@ -285,8 +365,14 @@ export interface OrganizationWebhookEndpointBody {
|
|
|
285
365
|
active?: boolean;
|
|
286
366
|
}
|
|
287
367
|
export declare function organizationsResource(request: RequestFn): {
|
|
288
|
-
list(params?:
|
|
289
|
-
get(id: string): Promise<
|
|
368
|
+
list(params?: ListOrganizationsParams): Promise<CursorPage<Organization>>;
|
|
369
|
+
get(id: string): Promise<OrganizationDetail>;
|
|
370
|
+
/** The organization owning a domain (or an email address's domain). Verified domains only unless includeUnverified. */
|
|
371
|
+
findByDomain(domain: string, opts?: {
|
|
372
|
+
includeUnverified?: boolean;
|
|
373
|
+
}): Promise<OrganizationByDomain>;
|
|
374
|
+
/** `GET /v1/organizations/:id/policy`. */
|
|
375
|
+
getPolicy(id: string): Promise<OrganizationPolicy>;
|
|
290
376
|
create(body: CreateOrganizationBody, idempotencyKey?: string): Promise<Organization>;
|
|
291
377
|
update(id: string, body: UpdateOrganizationBody): Promise<Organization>;
|
|
292
378
|
delete(id: string): Promise<DeletedObject>;
|
|
@@ -324,10 +410,12 @@ export declare function organizationsResource(request: RequestFn): {
|
|
|
324
410
|
role: string;
|
|
325
411
|
}>;
|
|
326
412
|
update(orgId: string, userId: string, body: {
|
|
327
|
-
role
|
|
413
|
+
role?: string;
|
|
414
|
+
role_source?: string;
|
|
328
415
|
}): Promise<{
|
|
329
416
|
object: "organization_membership";
|
|
330
|
-
role
|
|
417
|
+
role?: string;
|
|
418
|
+
role_source?: string | null;
|
|
331
419
|
updated: true;
|
|
332
420
|
}>;
|
|
333
421
|
remove(orgId: string, userId: string): Promise<{
|
|
@@ -364,9 +452,19 @@ export declare function organizationsResource(request: RequestFn): {
|
|
|
364
452
|
auto_join?: boolean;
|
|
365
453
|
default_role_id?: string | null;
|
|
366
454
|
}, idempotencyKey?: string): Promise<OrgDomain>;
|
|
367
|
-
|
|
455
|
+
/** Check now. No body = the DNS TXT check; `well_known` fetches the file; `email` takes the emailed code. */
|
|
456
|
+
verify(orgId: string, domainId: string, body?: {
|
|
457
|
+
method?: OrgDomainVerificationMethod;
|
|
458
|
+
code?: string;
|
|
459
|
+
}): Promise<OrgDomain & {
|
|
368
460
|
verified: boolean;
|
|
369
461
|
}>;
|
|
462
|
+
/** Email a 6-digit code to admin@ (or another administrative mailbox) at the domain, via your own email provider. */
|
|
463
|
+
sendVerificationEmail(orgId: string, domainId: string, body?: {
|
|
464
|
+
address?: "admin" | "administrator" | "hostmaster" | "postmaster" | "webmaster";
|
|
465
|
+
}): Promise<OrgDomain & {
|
|
466
|
+
sent_to: string;
|
|
467
|
+
}>;
|
|
370
468
|
delete(orgId: string, domainId: string): Promise<{
|
|
371
469
|
object: "org_domain";
|
|
372
470
|
id: string;
|
|
@@ -5,11 +5,27 @@ const request_1 = require("./request");
|
|
|
5
5
|
function organizationsResource(request) {
|
|
6
6
|
return {
|
|
7
7
|
list(params = {}) {
|
|
8
|
-
|
|
8
|
+
const { metadata, ...rest } = params;
|
|
9
|
+
const query = { ...rest };
|
|
10
|
+
for (const [k, v] of Object.entries(metadata ?? {}))
|
|
11
|
+
query[`metadata[${k}]`] = v;
|
|
12
|
+
return request({ method: 'GET', path: '/v1/organizations', query });
|
|
9
13
|
},
|
|
10
14
|
get(id) {
|
|
11
15
|
return request({ method: 'GET', path: `/v1/organizations/${(0, request_1.enc)(id)}` });
|
|
12
16
|
},
|
|
17
|
+
/** The organization owning a domain (or an email address's domain). Verified domains only unless includeUnverified. */
|
|
18
|
+
findByDomain(domain, opts = {}) {
|
|
19
|
+
return request({
|
|
20
|
+
method: 'GET',
|
|
21
|
+
path: `/v1/organizations/by_domain/${(0, request_1.enc)(domain)}`,
|
|
22
|
+
query: opts.includeUnverified ? { include_unverified: 'true' } : {},
|
|
23
|
+
});
|
|
24
|
+
},
|
|
25
|
+
/** `GET /v1/organizations/:id/policy`. */
|
|
26
|
+
getPolicy(id) {
|
|
27
|
+
return request({ method: 'GET', path: `/v1/organizations/${(0, request_1.enc)(id)}/policy` });
|
|
28
|
+
},
|
|
13
29
|
create(body, idempotencyKey) {
|
|
14
30
|
return request({ method: 'POST', path: '/v1/organizations', body, idempotencyKey });
|
|
15
31
|
},
|
|
@@ -58,7 +74,13 @@ function organizationsResource(request) {
|
|
|
58
74
|
idempotencyKey,
|
|
59
75
|
});
|
|
60
76
|
},
|
|
61
|
-
update(orgId, userId,
|
|
77
|
+
update(orgId, userId,
|
|
78
|
+
/**
|
|
79
|
+
* `role_source`: `manual` takes the role out of directory control; `scim`,
|
|
80
|
+
* `sso:<connection id>` or `ldap:<connection id>` hands it back to that source.
|
|
81
|
+
* A role sent alone counts as `manual`.
|
|
82
|
+
*/
|
|
83
|
+
body) {
|
|
62
84
|
return request({
|
|
63
85
|
method: 'PATCH',
|
|
64
86
|
path: `/v1/organizations/${(0, request_1.enc)(orgId)}/memberships/${(0, request_1.enc)(userId)}`,
|
|
@@ -103,10 +125,20 @@ function organizationsResource(request) {
|
|
|
103
125
|
idempotencyKey,
|
|
104
126
|
});
|
|
105
127
|
},
|
|
106
|
-
|
|
128
|
+
/** Check now. No body = the DNS TXT check; `well_known` fetches the file; `email` takes the emailed code. */
|
|
129
|
+
verify(orgId, domainId, body) {
|
|
107
130
|
return request({
|
|
108
131
|
method: 'POST',
|
|
109
132
|
path: `/v1/organizations/${(0, request_1.enc)(orgId)}/domains/${(0, request_1.enc)(domainId)}/verify`,
|
|
133
|
+
...(body ? { body } : {}),
|
|
134
|
+
});
|
|
135
|
+
},
|
|
136
|
+
/** Email a 6-digit code to admin@ (or another administrative mailbox) at the domain, via your own email provider. */
|
|
137
|
+
sendVerificationEmail(orgId, domainId, body = {}) {
|
|
138
|
+
return request({
|
|
139
|
+
method: 'POST',
|
|
140
|
+
path: `/v1/organizations/${(0, request_1.enc)(orgId)}/domains/${(0, request_1.enc)(domainId)}/verification_email`,
|
|
141
|
+
body,
|
|
110
142
|
});
|
|
111
143
|
},
|
|
112
144
|
delete(orgId, domainId) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"organizations.js","sourceRoot":"","sources":["../../src/client/organizations.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"organizations.js","sourceRoot":"","sources":["../../src/client/organizations.ts"],"names":[],"mappings":";;AAoWA,sDA4aC;AAhxBD,uCAAgD;AAoWhD,SAAgB,qBAAqB,CAAC,OAAkB;IACtD,OAAO;QACL,IAAI,CAAC,SAAkC,EAAE;YACvC,MAAM,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;YACrC,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AAI,EAAE,qBAAqB,IAAA,aAAG,EAAC,KAAK,CAAC,gBAAgB;oBACrD,IAAI;oBACJ,cAAc;iBACf,CAAC,CAAC;YACL,CAAC;YACD,MAAM,CAAC,KAAa;gBAClB,OAAO,OAAO,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,qBAAqB,IAAA,aAAG,EAAC,KAAK,CAAC,gBAAgB,EAAE,CAAC,CAAC;YAC9F,CAAC;SACF;QAED,uEAAuE;QACvE,UAAU,EAAE;YACV,KAAK,CACH,KAAa,EACb,OAAe,EACf,MAAc;gBAQd,OAAO,OAAO,CAAC;oBACb,MAAM,EAAE,KAAK;oBACb,IAAI,EAAE,qBAAqB,IAAA,aAAG,EAAC,KAAK,CAAC,WAAW,IAAA,aAAG,EAAC,OAAO,CAAC,UAAU,IAAA,aAAG,EAAC,MAAM,CAAC,EAAE;iBACpF,CAAC,CAAC;YACL,CAAC;YACD,MAAM,CACJ,KAAa,EACb,OAAe,EACf,MAAc;gBAQd,OAAO,OAAO,CAAC;oBACb,MAAM,EAAE,QAAQ;oBAChB,IAAI,EAAE,qBAAqB,IAAA,aAAG,EAAC,KAAK,CAAC,WAAW,IAAA,aAAG,EAAC,OAAO,CAAC,UAAU,IAAA,aAAG,EAAC,MAAM,CAAC,EAAE;iBACpF,CAAC,CAAC;YACL,CAAC;SACF;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -202,6 +202,8 @@ export interface ReferralSettings {
|
|
|
202
202
|
auto_enroll_users: boolean;
|
|
203
203
|
/** e.g. `https://app.example.com/join?ref={code}`; builds `referral_link`. */
|
|
204
204
|
link_template: string | null;
|
|
205
|
+
/** The partner portal linked from the hosted account page's "Refer a friend" panel. */
|
|
206
|
+
partner_portal_url: string | null;
|
|
205
207
|
/** How long a sign-up waits for the platform (100-5000 ms, default 3000). */
|
|
206
208
|
timeout_ms: number;
|
|
207
209
|
security: ReferralSecuritySettings;
|
|
@@ -221,8 +223,10 @@ export interface ReferralSettings {
|
|
|
221
223
|
forward_lifecycle?: boolean;
|
|
222
224
|
/** Mirror the result into `public_metadata.referral` (default false). */
|
|
223
225
|
mirror_to_public_metadata?: boolean;
|
|
224
|
-
/** Add
|
|
226
|
+
/** Add `referral_code` (the user's own code) and `referral_link` (when stored) claims to ID tokens and sessions. */
|
|
225
227
|
include_referral_claims?: boolean;
|
|
228
|
+
/** Report the first sign-in of an Atlas ID account to a Sign in with Atlas app this instance manages as a sign-up (default false). */
|
|
229
|
+
report_linked_atlas_id_signups?: boolean;
|
|
226
230
|
/** What the chosen provider still needs before referrals can be enabled. */
|
|
227
231
|
missing?: string[];
|
|
228
232
|
connection?: ReferralConnectionStatus | null;
|
|
@@ -265,6 +269,8 @@ export interface UpdateReferralSettingsBody {
|
|
|
265
269
|
auto_enroll_users?: boolean;
|
|
266
270
|
/** An https URL containing `{code}`. */
|
|
267
271
|
link_template?: string | null;
|
|
272
|
+
/** https URL of the partner portal (shown on the hosted account page), or null to remove it. */
|
|
273
|
+
partner_portal_url?: string | null;
|
|
268
274
|
/** 100-5000. */
|
|
269
275
|
timeout_ms?: number;
|
|
270
276
|
/** Partial: only the security fields sent change. */
|
|
@@ -279,6 +285,7 @@ export interface UpdateReferralSettingsBody {
|
|
|
279
285
|
forward_lifecycle?: boolean;
|
|
280
286
|
mirror_to_public_metadata?: boolean;
|
|
281
287
|
include_referral_claims?: boolean;
|
|
288
|
+
report_linked_atlas_id_signups?: boolean;
|
|
282
289
|
}
|
|
283
290
|
/** `POST /v1/instance/referrals/test`. */
|
|
284
291
|
export interface ReferralConnectionTest {
|
|
@@ -337,12 +344,23 @@ export interface ReferralRetryFailedResult {
|
|
|
337
344
|
}
|
|
338
345
|
/** `POST /v1/instance/referrals/backfill`. */
|
|
339
346
|
export interface ReferralBackfillBody {
|
|
340
|
-
/** ISO 8601 date or date-time: users who signed up at or after it. */
|
|
341
|
-
since
|
|
342
|
-
/**
|
|
347
|
+
/** ISO 8601 date or date-time: users who signed up at or after it. Optional when `user_ids` is given. */
|
|
348
|
+
since?: string;
|
|
349
|
+
/** Only these users (Atlas ids), up to 10,000: re-report a chosen set. */
|
|
350
|
+
user_ids?: string[];
|
|
351
|
+
/** Report users already reported again; their stored arrival context and sign-up time are kept. */
|
|
352
|
+
force?: boolean;
|
|
353
|
+
/** customerRef → the code the user ARRIVED with (who referred them). Wins over `code_metadata_path`. */
|
|
343
354
|
codes?: Record<string, string>;
|
|
344
|
-
/** Where a stored code lives on the user, e.g. `public_metadata.referral_code`. */
|
|
355
|
+
/** Where a stored arrival code lives on the user, e.g. `public_metadata.referral_code`. */
|
|
345
356
|
code_metadata_path?: string;
|
|
357
|
+
/**
|
|
358
|
+
* customerRef → the user's OWN code (the one they share). Kept on the user and
|
|
359
|
+
* sent to the platform before the sign-up, so it is not replaced. Each code once.
|
|
360
|
+
*/
|
|
361
|
+
own_codes?: Record<string, string>;
|
|
362
|
+
/** Where a stored own code lives, e.g. `public_metadata.my_code`. `own_codes` wins. */
|
|
363
|
+
own_code_metadata_path?: string;
|
|
346
364
|
}
|
|
347
365
|
/** A backfill job. Users already reported are skipped. */
|
|
348
366
|
export interface ReferralBackfillJob {
|
|
@@ -352,9 +370,18 @@ export interface ReferralBackfillJob {
|
|
|
352
370
|
status: string;
|
|
353
371
|
/** Epoch ms. */
|
|
354
372
|
since: number;
|
|
373
|
+
/** How many `user_ids` the request named (0 = everyone since `since`). */
|
|
374
|
+
user_ids_given?: number;
|
|
375
|
+
force?: boolean;
|
|
355
376
|
code_metadata_path?: string | null;
|
|
356
377
|
/** How many codes were given in `codes`. */
|
|
357
378
|
codes_given?: number;
|
|
379
|
+
own_code_metadata_path?: string | null;
|
|
380
|
+
own_codes_given?: number;
|
|
381
|
+
/** Users whose own code was stored and queued to the platform. */
|
|
382
|
+
own_codes_set?: number;
|
|
383
|
+
/** customerRefs whose own code another user already holds (not set), up to 100. */
|
|
384
|
+
own_codes_taken?: string[];
|
|
358
385
|
users_scanned: number;
|
|
359
386
|
/** Already reported, or no code while auto-enroll is off. */
|
|
360
387
|
users_skipped: number;
|
|
@@ -512,7 +539,9 @@ export declare function referralsResource(request: RequestFn): {
|
|
|
512
539
|
* users with their real sign-up time. Referrals must be on (`422
|
|
513
540
|
* REFERRALS_NOT_CONFIGURED` otherwise). Returns the job; poll {@link getBackfill}.
|
|
514
541
|
*/
|
|
515
|
-
backfill(body: ReferralBackfillBody, idempotencyKey?: string
|
|
542
|
+
backfill(body: ReferralBackfillBody, idempotencyKey?: string, options?: {
|
|
543
|
+
dryRun?: boolean;
|
|
544
|
+
}): Promise<ReferralBackfillJob>;
|
|
516
545
|
/** `GET /v1/instance/referrals/backfill/:id`. */
|
|
517
546
|
getBackfill(id: string): Promise<ReferralBackfillJob>;
|
|
518
547
|
/**
|
package/dist/client/referrals.js
CHANGED
|
@@ -60,8 +60,8 @@ function referralsResource(request) {
|
|
|
60
60
|
* users with their real sign-up time. Referrals must be on (`422
|
|
61
61
|
* REFERRALS_NOT_CONFIGURED` otherwise). Returns the job; poll {@link getBackfill}.
|
|
62
62
|
*/
|
|
63
|
-
backfill(body, idempotencyKey) {
|
|
64
|
-
return request({ method: 'POST', path: '/v1/instance/referrals/backfill', body, idempotencyKey });
|
|
63
|
+
backfill(body, idempotencyKey, options = {}) {
|
|
64
|
+
return request({ method: 'POST', path: '/v1/instance/referrals/backfill', body, idempotencyKey, ...(options.dryRun ? { query: { dry_run: true } } : {}) });
|
|
65
65
|
},
|
|
66
66
|
/** `GET /v1/instance/referrals/backfill/:id`. */
|
|
67
67
|
getBackfill(id) {
|
|
@@ -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":";;AAkfA,8CA4EC;AA9jBD,uCAAgD;AAkfhD,SAAgB,iBAAiB,CAAC,OAAkB;IAClD,OAAO;QACL,8FAA8F;QAC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C;QACD;;;;WAIG;QACH,QAAQ,CAAC,OAA0B,EAAE;YACnC,OAAO,OAAO,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,iCAAiC,EAAE,IAAI,EAAE,CAAC,CAAC;QACpF,CAAC;QACD;;;;WAIG;QACH,QAAQ,CAAC,IAA0B,EAAE,cAAuB,EAAE,UAAgC,EAAE;YAC9F,OAAO,OAAO,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,iCAAiC,EAAE,IAAI,EAAE,cAAc,EAAE,GAAG,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;QAC7J,CAAC;QACD,iDAAiD;QACjD,WAAW,CAAC,EAAU;YACpB,OAAO,OAAO,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,mCAAmC,IAAA,aAAG,EAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;QACxF,CAAC;QACD;;;WAGG;QACH,UAAU,CAAC,MAAc;YACvB,OAAO,OAAO,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,aAAa,IAAA,aAAG,EAAC,MAAM,CAAC,WAAW,EAAE,CAAC,CAAC;QAC/E,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -19,6 +19,13 @@ export interface ScimToken {
|
|
|
19
19
|
/** Create reveals the usable secret exactly once. */
|
|
20
20
|
export interface ScimTokenWithSecret extends ScimToken {
|
|
21
21
|
secret: string;
|
|
22
|
+
/** The SCIM 2.0 base URL to give the identity provider with this token. */
|
|
23
|
+
scim_base_url: string;
|
|
24
|
+
/** `no_sso_connection` = the organization has no SSO connection yet. */
|
|
25
|
+
warnings: {
|
|
26
|
+
code: 'no_sso_connection';
|
|
27
|
+
message: string;
|
|
28
|
+
}[];
|
|
22
29
|
note: string;
|
|
23
30
|
}
|
|
24
31
|
export interface ScimRoleMapping {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scim-tokens.js","sourceRoot":"","sources":["../../src/client/scim-tokens.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"scim-tokens.js","sourceRoot":"","sources":["../../src/client/scim-tokens.ts"],"names":[],"mappings":";;AAkDA,gDAkBC;AAcD,8DAeC;AAjGD,uCAAgD;AAkDhD,SAAgB,kBAAkB,CAAC,OAAkB;IACnD,OAAO;QACL,IAAI;YACF,OAAO,OAAO,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,iBAAiB,EAAE,CAAC,CAAC;QAC7D,CAAC;QACD,MAAM,CAAC,IAAyB,EAAE,cAAuB;YACvD,OAAO,OAAO,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,iBAAiB,EAAE,IAAI,EAAE,cAAc,EAAE,CAAC,CAAC;QACpF,CAAC;QACD,sDAAsD;QACtD,MAAM,CAAC,EAAU,EAAE,IAAyB;YAC1C,OAAO,OAAO,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,mBAAmB,IAAA,aAAG,EAAC,EAAE,CAAC,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC;QAChF,CAAC;QACD,MAAM,CACJ,EAAU;YAEV,OAAO,OAAO,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,mBAAmB,IAAA,aAAG,EAAC,EAAE,CAAC,SAAS,EAAE,CAAC,CAAC;QAChF,CAAC;KACF,CAAC;AACJ,CAAC;AAcD,SAAgB,yBAAyB,CAAC,OAAkB;IAC1D,OAAO;QACL,IAAI;YACF,OAAO,OAAO,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,yBAAyB,EAAE,CAAC,CAAC;QACrE,CAAC;QACD,GAAG,CAAC,EAAU;YACZ,OAAO,OAAO,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,2BAA2B,IAAA,aAAG,EAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;QAChF,CAAC;QACD,MAAM,CAAC,IAA+H;YACpI,OAAO,OAAO,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,yBAAyB,EAAE,IAAI,EAAE,CAAC,CAAC;QAC5E,CAAC;QACD,MAAM,CAAC,EAAU;YACf,OAAO,OAAO,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,2BAA2B,IAAA,aAAG,EAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;QACnF,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -33,6 +33,13 @@ export interface SsoConnection {
|
|
|
33
33
|
saml_idp_slo_soap_url?: string | null;
|
|
34
34
|
/** Assertions that are not encrypted to the connection's key are refused. */
|
|
35
35
|
saml_require_encrypted_assertions?: boolean;
|
|
36
|
+
/** A custom ACS path on your own frontend API domain (SAML migration); null = the standard ACS. */
|
|
37
|
+
saml_acs_path?: string | null;
|
|
38
|
+
/** GitHub as the identity provider: only members of these GitHub orgs / teams ("org/team-slug") sign in. */
|
|
39
|
+
github_access?: {
|
|
40
|
+
allowed_organizations: string[];
|
|
41
|
+
allowed_teams: string[];
|
|
42
|
+
} | null;
|
|
36
43
|
/** An SP encryption key pair is set up (the private key is never returned). */
|
|
37
44
|
has_saml_encryption_key?: boolean;
|
|
38
45
|
/** A key rotation is in progress (the previous key is still accepted). */
|
|
@@ -110,6 +117,13 @@ export interface CreateSsoConnectionBody {
|
|
|
110
117
|
saml_idp_slo_soap_url?: string | null;
|
|
111
118
|
/** Requires an encryption key (see `createSamlEncryptionKey`). */
|
|
112
119
|
saml_require_encrypted_assertions?: boolean;
|
|
120
|
+
/** A custom ACS path on your own frontend API domain (SAML migration), e.g. /saml/acs/acme; null clears. */
|
|
121
|
+
saml_acs_path?: string | null;
|
|
122
|
+
/** GitHub as the identity provider (oidc type; oidc_issuer may be left out); null removes it. */
|
|
123
|
+
github_access?: {
|
|
124
|
+
allowed_organizations?: string[];
|
|
125
|
+
allowed_teams?: string[];
|
|
126
|
+
} | null;
|
|
113
127
|
discourse_secret?: string;
|
|
114
128
|
discourse_provider_url?: string;
|
|
115
129
|
allowed_domains?: string[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sso-connections.js","sourceRoot":"","sources":["../../src/client/sso-connections.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"sso-connections.js","sourceRoot":"","sources":["../../src/client/sso-connections.ts"],"names":[],"mappings":";;AAoKA,wDAkDC;AAtND,uCAAgD;AAEhD,qEASkC;AAyJlC,SAAgB,sBAAsB,CAAC,OAAkB;IACvD,OAAO;QACL,IAAI;YACF,OAAO,OAAO,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,qBAAqB,EAAE,CAAC,CAAC;QACjE,CAAC;QACD,GAAG,CAAC,EAAU;YACZ,OAAO,OAAO,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,uBAAuB,IAAA,aAAG,EAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;QAC5E,CAAC;QACD,MAAM,CAAC,IAA6B,EAAE,cAAuB;YAC3D,OAAO,OAAO,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,qBAAqB,EAAE,IAAI,EAAE,cAAc,EAAE,CAAC,CAAC;QACxF,CAAC;QACD,MAAM,CAAC,EAAU,EAAE,IAA6B;YAC9C,OAAO,OAAO,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,uBAAuB,IAAA,aAAG,EAAC,EAAE,CAAC,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC;QACpF,CAAC;QACD,MAAM,CAAC,EAAU;YACf,OAAO,OAAO,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,uBAAuB,IAAA,aAAG,EAAC,EAAE,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EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,uBAAuB,IAAA,aAAG,EAAC,EAAE,CAAC,sBAAsB,EAAE,CAAC,CAAC;QACnG,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -18,6 +18,8 @@ export interface SsoOnboardingProfile {
|
|
|
18
18
|
allow_scim: boolean;
|
|
19
19
|
/** The Admin Portal tasks this profile's tickets may perform. */
|
|
20
20
|
intents: SsoPortalIntent[];
|
|
21
|
+
/** Where "Finish" on the hosted setup page sends the admin. */
|
|
22
|
+
return_url: string | null;
|
|
21
23
|
created_at: number;
|
|
22
24
|
updated_at: number;
|
|
23
25
|
}
|
|
@@ -33,6 +35,8 @@ export interface SsoOnboardingTicket {
|
|
|
33
35
|
organization_id: string;
|
|
34
36
|
sso_connection_id: string | null;
|
|
35
37
|
status: string;
|
|
38
|
+
/** This ticket's return_url (null = the profile's applies). */
|
|
39
|
+
return_url: string | null;
|
|
36
40
|
expires_at: number;
|
|
37
41
|
created_at: number;
|
|
38
42
|
completed_at: number | null;
|
|
@@ -44,6 +48,8 @@ export interface IssuedSsoOnboardingTicket extends SsoOnboardingTicket {
|
|
|
44
48
|
/** The hosted URL the end-customer's IT admin opens (no dashboard account). */
|
|
45
49
|
url: string;
|
|
46
50
|
expires_in: number;
|
|
51
|
+
/** Where "Finish" will send the admin: the ticket's return_url, else the profile's. */
|
|
52
|
+
effective_return_url: string | null;
|
|
47
53
|
}
|
|
48
54
|
export interface CreateSsoOnboardingProfileBody {
|
|
49
55
|
name: string;
|
|
@@ -55,15 +61,22 @@ export interface CreateSsoOnboardingProfileBody {
|
|
|
55
61
|
allow_scim?: boolean;
|
|
56
62
|
/** Admin Portal tasks to grant; omit for the classic SSO (+ domain) profile. */
|
|
57
63
|
intents?: SsoPortalIntent[];
|
|
64
|
+
/** https, on one of your allowed origins. */
|
|
65
|
+
return_url?: string | null;
|
|
58
66
|
}
|
|
59
67
|
export interface CreateSsoOnboardingTicketBody {
|
|
60
68
|
/** Required for an unbound profile; must match (or be omitted) for a bound one. */
|
|
61
69
|
organization_id?: string | null;
|
|
62
70
|
/** Clamped to a 5-minute…30-day band; defaults to 3 days. */
|
|
63
71
|
expires_in_seconds?: number;
|
|
72
|
+
/** Overrides the profile's return_url for this ticket. */
|
|
73
|
+
return_url?: string | null;
|
|
64
74
|
}
|
|
65
75
|
export declare function ssoOnboardingResource(request: RequestFn): {
|
|
66
|
-
|
|
76
|
+
/** With `name`, only the profiles with exactly that name ("find or create"). */
|
|
77
|
+
list(params?: {
|
|
78
|
+
name?: string;
|
|
79
|
+
}): Promise<ListPage<SsoOnboardingProfile>>;
|
|
67
80
|
get(id: string): Promise<SsoOnboardingProfile>;
|
|
68
81
|
create(body: CreateSsoOnboardingProfileBody, idempotencyKey?: string): Promise<SsoOnboardingProfile>;
|
|
69
82
|
delete(id: string): Promise<{
|
|
@@ -4,8 +4,9 @@ exports.ssoOnboardingResource = ssoOnboardingResource;
|
|
|
4
4
|
const request_1 = require("./request");
|
|
5
5
|
function ssoOnboardingResource(request) {
|
|
6
6
|
return {
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
/** With `name`, only the profiles with exactly that name ("find or create"). */
|
|
8
|
+
list(params = {}) {
|
|
9
|
+
return request({ method: 'GET', path: '/v1/sso_onboarding_profiles', query: { ...params } });
|
|
9
10
|
},
|
|
10
11
|
get(id) {
|
|
11
12
|
return request({ method: 'GET', path: `/v1/sso_onboarding_profiles/${(0, request_1.enc)(id)}` });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sso-onboarding.js","sourceRoot":"","sources":["../../src/client/sso-onboarding.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"sso-onboarding.js","sourceRoot":"","sources":["../../src/client/sso-onboarding.ts"],"names":[],"mappings":";;AAyFA,sDA8CC;AAvID,uCAAgD;AAyFhD,SAAgB,qBAAqB,CAAC,OAAkB;IACtD,OAAO;QACL,gFAAgF;QAChF,IAAI,CAAC,SAA4B,EAAE;YACjC,OAAO,OAAO,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,6BAA6B,EAAE,KAAK,EAAE,EAAE,GAAG,MAAM,EAAE,EAAE,CAAC,CAAC;QAC/F,CAAC;QACD,GAAG,CAAC,EAAU;YACZ,OAAO,OAAO,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,+BAA+B,IAAA,aAAG,EAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;QACpF,CAAC;QACD,MAAM,CACJ,IAAoC,EACpC,cAAuB;YAEvB,OAAO,OAAO,CAAC;gBACb,MAAM,EAAE,MAAM;gBACd,IAAI,EAAE,6BAA6B;gBACnC,IAAI;gBACJ,cAAc;aACf,CAAC,CAAC;QACL,CAAC;QACD,MAAM,CAAC,EAAU;YACf,OAAO,OAAO,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,+BAA+B,IAAA,aAAG,EAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;QACvF,CAAC;QACD,+EAA+E;QAC/E,YAAY,CACV,SAAiB,EACjB,OAAsC,EAAE,EACxC,cAAuB;YAEvB,OAAO,OAAO,CAAC;gBACb,MAAM,EAAE,MAAM;gBACd,IAAI,EAAE,+BAA+B,IAAA,aAAG,EAAC,SAAS,CAAC,UAAU;gBAC7D,IAAI;gBACJ,cAAc;aACf,CAAC,CAAC;QACL,CAAC;QACD,kFAAkF;QAClF,YAAY,CACV,QAAgB;YAEhB,OAAO,OAAO,CAAC;gBACb,MAAM,EAAE,MAAM;gBACd,IAAI,EAAE,8BAA8B,IAAA,aAAG,EAAC,QAAQ,CAAC,SAAS;aAC3D,CAAC,CAAC;QACL,CAAC;KACF,CAAC;AACJ,CAAC"}
|
package/dist/client/users.d.ts
CHANGED
|
@@ -35,9 +35,18 @@ export interface User {
|
|
|
35
35
|
* older than this field.)
|
|
36
36
|
*/
|
|
37
37
|
referral?: UserReferral | null;
|
|
38
|
-
/**
|
|
38
|
+
/**
|
|
39
|
+
* The user's own referral code: set once the referral platform enrolled the
|
|
40
|
+
* user as a partner (its answer carried a code) or an admin set one; null
|
|
41
|
+
* otherwise (not enrolled, referrals off, or the code was cleared).
|
|
42
|
+
*/
|
|
39
43
|
referral_code?: string | null;
|
|
40
|
-
/**
|
|
44
|
+
/**
|
|
45
|
+
* The user's own share link: the link the referral platform returned for
|
|
46
|
+
* the partner, else the referral settings' `link_template` with `{code}`
|
|
47
|
+
* replaced by the URL-encoded code. Null while there is no code (or neither
|
|
48
|
+
* a platform link nor a template).
|
|
49
|
+
*/
|
|
41
50
|
referral_link?: string | null;
|
|
42
51
|
/**
|
|
43
52
|
* Every linked provider identity (sign-in, connect, imported on create or by
|
|
@@ -112,6 +121,18 @@ export interface UserReferralFlag {
|
|
|
112
121
|
flagged_at: number | null;
|
|
113
122
|
risk_level: 'low' | 'medium' | 'high' | null;
|
|
114
123
|
}
|
|
124
|
+
/** `POST /v1/users/:id/referral/resync`: the user's sign-up call sent again, and where the answer left their referral. */
|
|
125
|
+
export interface UserReferralResync {
|
|
126
|
+
object: 'referral_resync';
|
|
127
|
+
user_id: string;
|
|
128
|
+
/** The sign-up call in the referral delivery log. */
|
|
129
|
+
call_id: string | null;
|
|
130
|
+
call_status: 'pending' | 'succeeded' | 'retrying' | 'failed' | 'held' | 'skipped' | null;
|
|
131
|
+
/** Why the call did not succeed, when it did not. */
|
|
132
|
+
error: string | null;
|
|
133
|
+
/** The user's referral record after the answer (as `GET /v1/users/:id/referral`). */
|
|
134
|
+
referral: Record<string, unknown> | null;
|
|
135
|
+
}
|
|
115
136
|
/**
|
|
116
137
|
* The `data` of a `user.referral_attributed` webhook: the referral platform
|
|
117
138
|
* answered after `user.created` was sent.
|
|
@@ -335,6 +356,19 @@ export declare function usersResource(request: RequestFn): {
|
|
|
335
356
|
flagReferral(id: string, body?: {
|
|
336
357
|
reason?: string;
|
|
337
358
|
}, idempotencyKey?: string): Promise<UserReferralFlag>;
|
|
359
|
+
referral: {
|
|
360
|
+
/**
|
|
361
|
+
* `POST /v1/users/:id/referral/resync` — re-report one user to the referral
|
|
362
|
+
* platform: the sign-up call goes out again now (same customerRef, original
|
|
363
|
+
* sign-up time, stored arrival context) and the answer (code, link, partner)
|
|
364
|
+
* is applied. For a user whose earlier answer is final on the platform's
|
|
365
|
+
* side but has since been fixed (e.g. `enroll_email_taken`). `dryRun`
|
|
366
|
+
* previews it without sending anything.
|
|
367
|
+
*/
|
|
368
|
+
resync(id: string, options?: {
|
|
369
|
+
dryRun?: boolean;
|
|
370
|
+
}, idempotencyKey?: string): Promise<UserReferralResync>;
|
|
371
|
+
};
|
|
338
372
|
delete(id: string): Promise<DeletedObject>;
|
|
339
373
|
resetMfa(id: string): Promise<{
|
|
340
374
|
object: "user";
|
|
@@ -777,6 +811,12 @@ export interface UserOrganizationMembership {
|
|
|
777
811
|
organization_id: string;
|
|
778
812
|
organization_slug: string;
|
|
779
813
|
role: string;
|
|
814
|
+
/**
|
|
815
|
+
* Who manages the role: `scim`, `sso:<connection id>` or `ldap:<connection id>`
|
|
816
|
+
* (the identity provider keeps it in step), `directory_sync`, `manual` (set
|
|
817
|
+
* through the API or dashboard), or null (joined by invitation, or older rows).
|
|
818
|
+
*/
|
|
819
|
+
role_source?: string | null;
|
|
780
820
|
plan: string | null;
|
|
781
821
|
joined_at: number;
|
|
782
822
|
}
|
package/dist/client/users.js
CHANGED
|
@@ -71,6 +71,24 @@ function usersResource(request) {
|
|
|
71
71
|
idempotencyKey,
|
|
72
72
|
});
|
|
73
73
|
},
|
|
74
|
+
referral: {
|
|
75
|
+
/**
|
|
76
|
+
* `POST /v1/users/:id/referral/resync` — re-report one user to the referral
|
|
77
|
+
* platform: the sign-up call goes out again now (same customerRef, original
|
|
78
|
+
* sign-up time, stored arrival context) and the answer (code, link, partner)
|
|
79
|
+
* is applied. For a user whose earlier answer is final on the platform's
|
|
80
|
+
* side but has since been fixed (e.g. `enroll_email_taken`). `dryRun`
|
|
81
|
+
* previews it without sending anything.
|
|
82
|
+
*/
|
|
83
|
+
resync(id, options = {}, idempotencyKey) {
|
|
84
|
+
return request({
|
|
85
|
+
method: 'POST',
|
|
86
|
+
path: `/v1/users/${(0, request_1.enc)(id)}/referral/resync`,
|
|
87
|
+
idempotencyKey,
|
|
88
|
+
...(options.dryRun ? { query: { dry_run: true } } : {}),
|
|
89
|
+
});
|
|
90
|
+
},
|
|
91
|
+
},
|
|
74
92
|
delete(id) {
|
|
75
93
|
return request({ method: 'DELETE', path: `/v1/users/${(0, request_1.enc)(id)}` });
|
|
76
94
|
},
|