@naturali/sdk 0.311.0 → 0.313.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/dist/index.cjs +38 -1
- package/dist/index.d.cts +153 -3
- package/dist/index.d.mts +153 -3
- package/dist/index.mjs +38 -2
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -637,6 +637,40 @@ var Activity = class {
|
|
|
637
637
|
});
|
|
638
638
|
}
|
|
639
639
|
};
|
|
640
|
+
var ActorAuth = class {
|
|
641
|
+
/**
|
|
642
|
+
* Email an actor sign-in code
|
|
643
|
+
*
|
|
644
|
+
* Emails a short numeric code, single-use and expiring, to the address, in a message that names the project. Answers `204` whether or not the address is an actor yet, so it never says which addresses are. A new code replaces the address's previous one. Sends are not billed; they are limited per address and per project.
|
|
645
|
+
*
|
|
646
|
+
*/
|
|
647
|
+
static sendActorSignInCode(options) {
|
|
648
|
+
return (options.client ?? client).post({
|
|
649
|
+
url: "/v1/projects/{project_id}/actor-auth/code",
|
|
650
|
+
...options,
|
|
651
|
+
headers: {
|
|
652
|
+
"Content-Type": "application/json",
|
|
653
|
+
...options.headers
|
|
654
|
+
}
|
|
655
|
+
});
|
|
656
|
+
}
|
|
657
|
+
/**
|
|
658
|
+
* Redeem an actor sign-in code
|
|
659
|
+
*
|
|
660
|
+
* Exchanges a code for an actor token for the address's actor, creating the actor (`created: true`) on its first sign-in. The access token's `aud` is `audience`; refresh it with `POST /v1/projects/{project_id}/actor-tokens/refresh`. A code is destroyed after too many wrong guesses; then request a new one.
|
|
661
|
+
*
|
|
662
|
+
*/
|
|
663
|
+
static verifyActorSignInCode(options) {
|
|
664
|
+
return (options.client ?? client).post({
|
|
665
|
+
url: "/v1/projects/{project_id}/actor-auth/code/verify",
|
|
666
|
+
...options,
|
|
667
|
+
headers: {
|
|
668
|
+
"Content-Type": "application/json",
|
|
669
|
+
...options.headers
|
|
670
|
+
}
|
|
671
|
+
});
|
|
672
|
+
}
|
|
673
|
+
};
|
|
640
674
|
var ActorIssuer = class {
|
|
641
675
|
/**
|
|
642
676
|
* Get the project's actor issuer
|
|
@@ -5172,7 +5206,7 @@ var Playbooks = class {
|
|
|
5172
5206
|
/**
|
|
5173
5207
|
* Create a case
|
|
5174
5208
|
*
|
|
5175
|
-
* Creates a case for one subject on the playbook's current version. The case stays on that version however the playbook changes later. A playbook that declares `upstreams` needs each bound to a case of the declared playbook, in the same project, of the same `actor_id`, that the caller may read (`playbooks:GetPlaybookCase`); anything else is `400 PLAYBOOK_CASE_UPSTREAM_INVALID`. The binding is fixed for the life of the case.
|
|
5209
|
+
* Creates a case for one subject on the playbook's current version. The case stays on that version however the playbook changes later. A playbook that declares `upstreams` needs each bound to a case of the declared playbook, in the same project, of the same `actor_id`, that the caller may read (`playbooks:GetPlaybookCase`); anything else is `400 PLAYBOOK_CASE_UPSTREAM_INVALID`. The binding is fixed for the life of the case. A request serving an actor (a session turn of the actor, an `On-Behalf-Of` assertion naming it) creates only that actor's cases: an `actor_id` absent or naming another actor is `400 PLAYBOOK_CASE_ACTOR_MISMATCH`.
|
|
5176
5210
|
*/
|
|
5177
5211
|
static createPlaybookCase(options) {
|
|
5178
5212
|
return (options.client ?? client).post({
|
|
@@ -7321,6 +7355,7 @@ var NaturaliClient = class {
|
|
|
7321
7355
|
activity;
|
|
7322
7356
|
admin;
|
|
7323
7357
|
actors;
|
|
7358
|
+
actorAuth;
|
|
7324
7359
|
actorIssuer;
|
|
7325
7360
|
actorTokens;
|
|
7326
7361
|
agents;
|
|
@@ -7382,6 +7417,7 @@ var NaturaliClient = class {
|
|
|
7382
7417
|
this.activity = bindResource(Activity, this.http);
|
|
7383
7418
|
this.admin = bindResource(Admin, this.http);
|
|
7384
7419
|
this.actors = bindResource(Actors, this.http);
|
|
7420
|
+
this.actorAuth = bindResource(ActorAuth, this.http);
|
|
7385
7421
|
this.actorIssuer = bindResource(ActorIssuer, this.http);
|
|
7386
7422
|
this.actorTokens = bindResource(ActorTokens, this.http);
|
|
7387
7423
|
this.agents = bindResource(Agents, this.http);
|
|
@@ -7434,6 +7470,7 @@ var NaturaliClient = class {
|
|
|
7434
7470
|
};
|
|
7435
7471
|
//#endregion
|
|
7436
7472
|
exports.Activity = Activity;
|
|
7473
|
+
exports.ActorAuth = ActorAuth;
|
|
7437
7474
|
exports.ActorIssuer2 = ActorIssuer;
|
|
7438
7475
|
exports.ActorTokens = ActorTokens;
|
|
7439
7476
|
exports.Actors = Actors;
|