samva 0.19.0 → 0.20.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/client/sdk.gen.d.ts +56 -14
- package/dist/client/sdk.gen.js +186 -34
- package/dist/client/types.gen.d.ts +325 -65
- package/dist/effect/campaigns.d.ts +35 -3
- package/dist/effect/contacts.d.ts +24 -4
- package/dist/effect/email.d.ts +22 -6
- package/dist/effect/errors.d.ts +1 -1
- package/dist/effect/errors.js +2 -2
- package/dist/effect/generated/campaigns.d.ts +73 -4
- package/dist/effect/generated/campaigns.js +18 -1
- package/dist/effect/generated/contacts.d.ts +131 -1
- package/dist/effect/generated/contacts.js +17 -2
- package/dist/effect/generated/email.d.ts +162 -1
- package/dist/effect/generated/email.js +31 -11
- package/dist/effect/generated/journeys.d.ts +13 -61
- package/dist/effect/generated/journeys.js +5 -5
- package/dist/effect/generated/mailboxes.d.ts +274 -78
- package/dist/effect/generated/mailboxes.js +28 -20
- package/dist/effect/generated/messages.d.ts +4 -1
- package/dist/effect/generated/messages.js +2 -1
- package/dist/effect/generated/namespaces.d.ts +432 -2
- package/dist/effect/generated/namespaces.js +91 -4
- package/dist/effect/generated/shared.d.ts +34 -29
- package/dist/effect/generated/shared.js +25 -22
- package/dist/effect/generated/templates.d.ts +44 -1
- package/dist/effect/generated/templates.js +9 -3
- package/dist/effect/generated-metadata.d.ts +15 -4
- package/dist/effect/generated-metadata.js +3 -4
- package/dist/effect/index.js +2 -2
- package/dist/effect/journeys.d.ts +4 -4
- package/dist/effect/mailboxes.d.ts +11 -11
- package/dist/effect/messages.d.ts +3 -0
- package/dist/effect/namespaces.d.ts +29 -0
- package/dist/effect/namespaces.js +7 -1
- package/dist/effect/templates.d.ts +12 -1
- package/dist/index.js +2 -2
- package/dist/package.js +1 -1
- package/dist/promises/errors.gen.d.ts +2 -12
- package/dist/promises/errors.gen.js +1 -26
- package/dist/promises/index.js +2 -2
- package/dist/promises/types.gen.d.ts +1 -1
- package/dist/service-map.d.ts +15 -0
- package/dist/service-map.js +16 -0
- package/package.json +2 -2
package/dist/client/sdk.gen.js
CHANGED
|
@@ -41,6 +41,10 @@ var Messages = class {
|
|
|
41
41
|
in: "query",
|
|
42
42
|
key: "from"
|
|
43
43
|
},
|
|
44
|
+
{
|
|
45
|
+
in: "query",
|
|
46
|
+
key: "namespaceId"
|
|
47
|
+
},
|
|
44
48
|
{
|
|
45
49
|
in: "query",
|
|
46
50
|
key: "after"
|
|
@@ -1081,7 +1085,7 @@ var Email = class {
|
|
|
1081
1085
|
/**
|
|
1082
1086
|
* List sending domains
|
|
1083
1087
|
*
|
|
1084
|
-
* Returns the organization's sending domains, newest first. Pass `nextCursor` back as `cursor` for the next page; it is null on the last page. `sendable=true` lists only domains a send can use now: active, and verified, or verified before and degraded since. Each row carries `deliverability` (bounce and complaint rates over the last 24 hours, the window the 5% bounce limit is enforced over) and `series`, the last 14 days of daily email sends attributed to the domain, oldest first.
|
|
1088
|
+
* Returns the organization's sending domains, newest first. A namespace-scoped key lists only its namespace's domains; an organization-wide caller lists every domain, or one namespace's with `namespaceId`. Pass `nextCursor` back as `cursor` for the next page; it is null on the last page. `sendable=true` lists only domains a send can use now: active, and verified, or verified before and degraded since. Each row carries `deliverability` (bounce and complaint rates over the last 24 hours, the window the 5% bounce limit is enforced over) and `series`, the last 14 days of daily email sends attributed to the domain, oldest first.
|
|
1085
1089
|
*/
|
|
1086
1090
|
static listDomains(parameters, options) {
|
|
1087
1091
|
const params = buildClientParams([parameters], [{ args: [
|
|
@@ -1096,6 +1100,10 @@ var Email = class {
|
|
|
1096
1100
|
{
|
|
1097
1101
|
in: "query",
|
|
1098
1102
|
key: "sendable"
|
|
1103
|
+
},
|
|
1104
|
+
{
|
|
1105
|
+
in: "query",
|
|
1106
|
+
key: "namespaceId"
|
|
1099
1107
|
}
|
|
1100
1108
|
] }]);
|
|
1101
1109
|
return (options?.client ?? client).get({
|
|
@@ -1111,16 +1119,23 @@ var Email = class {
|
|
|
1111
1119
|
/**
|
|
1112
1120
|
* Add a sending domain
|
|
1113
1121
|
*
|
|
1114
|
-
* Registers a domain for sending and returns it with the DNS records required to verify ownership and configure DKIM. Responds with 201. Supplying a connection attaches the domain to that DNS account; the domain must sit inside the zone given with it. When Samva cannot register another sending domain right now, this responds with 429 and no domain is created. A banned organization is refused with 403.
|
|
1122
|
+
* Registers a domain for sending and returns it with the DNS records required to verify ownership and configure DKIM. Responds with 201. Supplying a connection attaches the domain to that DNS account; the domain must sit inside the zone given with it. When Samva cannot register another sending domain right now, this responds with 429 and no domain is created. A banned organization is refused with 403. `namespaceId` places the domain in a namespace, and only that namespace's keys and organization-wide callers reach it; a namespace-scoped key always adds to its own namespace.
|
|
1115
1123
|
*/
|
|
1116
1124
|
static addDomain(parameters, options) {
|
|
1117
|
-
const params = buildClientParams([parameters], [{ args: [
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1125
|
+
const params = buildClientParams([parameters], [{ args: [
|
|
1126
|
+
{
|
|
1127
|
+
in: "body",
|
|
1128
|
+
key: "domain"
|
|
1129
|
+
},
|
|
1130
|
+
{
|
|
1131
|
+
in: "body",
|
|
1132
|
+
key: "connection"
|
|
1133
|
+
},
|
|
1134
|
+
{
|
|
1135
|
+
in: "body",
|
|
1136
|
+
key: "namespaceId"
|
|
1137
|
+
}
|
|
1138
|
+
] }]);
|
|
1124
1139
|
return (options?.client ?? client).post({
|
|
1125
1140
|
security: [{
|
|
1126
1141
|
name: "x-api-key",
|
|
@@ -1661,7 +1676,7 @@ var Email = class {
|
|
|
1661
1676
|
/**
|
|
1662
1677
|
* List senders
|
|
1663
1678
|
*
|
|
1664
|
-
* Returns senders, newest first,
|
|
1679
|
+
* Returns senders, newest first. A namespace-scoped key lists only its namespace's senders; an organization-wide caller lists every sender, or one namespace's with `namespaceId`. Optionally filtered by verification status, active state, or default flag. Pass `nextCursor` back as `cursor` for the next page; it is null on the last page. Each row carries `deliverability` (bounce and complaint rates over the last 24 hours) and `series`, the last 14 days of daily email sends from the address, oldest first.
|
|
1665
1680
|
*/
|
|
1666
1681
|
static listSenders(parameters, options) {
|
|
1667
1682
|
const params = buildClientParams([parameters], [{ args: [
|
|
@@ -1684,6 +1699,10 @@ var Email = class {
|
|
|
1684
1699
|
{
|
|
1685
1700
|
in: "query",
|
|
1686
1701
|
key: "isDefault"
|
|
1702
|
+
},
|
|
1703
|
+
{
|
|
1704
|
+
in: "query",
|
|
1705
|
+
key: "namespaceId"
|
|
1687
1706
|
}
|
|
1688
1707
|
] }]);
|
|
1689
1708
|
return (options?.client ?? client).get({
|
|
@@ -1699,7 +1718,7 @@ var Email = class {
|
|
|
1699
1718
|
/**
|
|
1700
1719
|
* Add a sender
|
|
1701
1720
|
*
|
|
1702
|
-
* Creates a sender. The required Idempotency-Key replays the original sender for an identical request and conflicts when reused with different input.
|
|
1721
|
+
* Creates a sender. A sender on a domain takes the domain's namespace, and a `namespaceId` that names another namespace is refused; a sender with no domain joins `namespaceId`, or its key's namespace. A namespace-scoped key cannot add a sender on a domain outside its namespace. The required Idempotency-Key replays the original sender for an identical request and conflicts when reused with different input.
|
|
1703
1722
|
*/
|
|
1704
1723
|
static addSender(parameters, options) {
|
|
1705
1724
|
const params = buildClientParams([parameters], [{ args: [
|
|
@@ -1722,6 +1741,10 @@ var Email = class {
|
|
|
1722
1741
|
{
|
|
1723
1742
|
in: "body",
|
|
1724
1743
|
key: "replyToEmails"
|
|
1744
|
+
},
|
|
1745
|
+
{
|
|
1746
|
+
in: "body",
|
|
1747
|
+
key: "namespaceId"
|
|
1725
1748
|
}
|
|
1726
1749
|
] }]);
|
|
1727
1750
|
return (options?.client ?? client).post({
|
|
@@ -1800,9 +1823,9 @@ var Email = class {
|
|
|
1800
1823
|
});
|
|
1801
1824
|
}
|
|
1802
1825
|
/**
|
|
1803
|
-
* Set the
|
|
1826
|
+
* Set the default sender
|
|
1804
1827
|
*
|
|
1805
|
-
* Marks a verified, active sender as the
|
|
1828
|
+
* Marks a verified, active sender as the default of its scope, atomically clearing the previous default of the same scope: the organization level, or the sender's namespace. Omitted-`from` sends use it when neither the request nor the template names a `from`; with no default, the organization's sole verified sender is used.
|
|
1806
1829
|
*/
|
|
1807
1830
|
static setDefaultSender(parameters, options) {
|
|
1808
1831
|
const params = buildClientParams([parameters], [{ args: [{
|
|
@@ -3419,6 +3442,10 @@ var Contacts = class {
|
|
|
3419
3442
|
in: "query",
|
|
3420
3443
|
key: "cursor"
|
|
3421
3444
|
},
|
|
3445
|
+
{
|
|
3446
|
+
in: "query",
|
|
3447
|
+
key: "namespaceId"
|
|
3448
|
+
},
|
|
3422
3449
|
{
|
|
3423
3450
|
in: "query",
|
|
3424
3451
|
key: "search"
|
|
@@ -3465,6 +3492,10 @@ var Contacts = class {
|
|
|
3465
3492
|
*/
|
|
3466
3493
|
static create(parameters, options) {
|
|
3467
3494
|
const params = buildClientParams([parameters], [{ args: [
|
|
3495
|
+
{
|
|
3496
|
+
in: "body",
|
|
3497
|
+
key: "namespaceId"
|
|
3498
|
+
},
|
|
3468
3499
|
{
|
|
3469
3500
|
in: "body",
|
|
3470
3501
|
key: "name"
|
|
@@ -3532,6 +3563,10 @@ var Contacts = class {
|
|
|
3532
3563
|
*/
|
|
3533
3564
|
static find(parameters, options) {
|
|
3534
3565
|
const params = buildClientParams([parameters], [{ args: [
|
|
3566
|
+
{
|
|
3567
|
+
in: "body",
|
|
3568
|
+
key: "namespaceId"
|
|
3569
|
+
},
|
|
3535
3570
|
{
|
|
3536
3571
|
in: "body",
|
|
3537
3572
|
key: "email"
|
|
@@ -3566,13 +3601,20 @@ var Contacts = class {
|
|
|
3566
3601
|
* Looks up exactly one identifier through `lookup: { type, value }`. Returns `{ contact, created: false }` unchanged when it exists. Otherwise creates the lookup identity (or external ID), applies `create` attributes, and returns `{ contact, created: true }`. Additional addresses belong in `create.identities`, custom fields in `create.profile.customFields`; custom field keys must be defined and values must match their types. An external ID lookup cannot be contradicted by `create.externalId`. Creation returns HTTP 409 ConflictError if an externalId or address belongs to another contact; the conflicting field is named and no contact is created. Use the update endpoint to change an existing contact.
|
|
3567
3602
|
*/
|
|
3568
3603
|
static findOrCreate(parameters, options) {
|
|
3569
|
-
const params = buildClientParams([parameters], [{ args: [
|
|
3570
|
-
|
|
3571
|
-
|
|
3572
|
-
|
|
3573
|
-
|
|
3574
|
-
|
|
3575
|
-
|
|
3604
|
+
const params = buildClientParams([parameters], [{ args: [
|
|
3605
|
+
{
|
|
3606
|
+
in: "body",
|
|
3607
|
+
key: "namespaceId"
|
|
3608
|
+
},
|
|
3609
|
+
{
|
|
3610
|
+
in: "body",
|
|
3611
|
+
key: "lookup"
|
|
3612
|
+
},
|
|
3613
|
+
{
|
|
3614
|
+
in: "body",
|
|
3615
|
+
key: "create"
|
|
3616
|
+
}
|
|
3617
|
+
] }]);
|
|
3576
3618
|
return (options?.client ?? client).post({
|
|
3577
3619
|
security: [{
|
|
3578
3620
|
name: "x-api-key",
|
|
@@ -3886,13 +3928,20 @@ var Contacts = class {
|
|
|
3886
3928
|
* Creates contacts in bulk from a list of entries shaped like a create request, returning per-entry results with created, updated, skipped, and error counts. An entry whose identities match an existing contact is skipped, or updates it with `onConflict: "update"`.
|
|
3887
3929
|
*/
|
|
3888
3930
|
static bulkImport(parameters, options) {
|
|
3889
|
-
const params = buildClientParams([parameters], [{ args: [
|
|
3890
|
-
|
|
3891
|
-
|
|
3892
|
-
|
|
3893
|
-
|
|
3894
|
-
|
|
3895
|
-
|
|
3931
|
+
const params = buildClientParams([parameters], [{ args: [
|
|
3932
|
+
{
|
|
3933
|
+
in: "body",
|
|
3934
|
+
key: "namespaceId"
|
|
3935
|
+
},
|
|
3936
|
+
{
|
|
3937
|
+
in: "body",
|
|
3938
|
+
key: "contacts"
|
|
3939
|
+
},
|
|
3940
|
+
{
|
|
3941
|
+
in: "body",
|
|
3942
|
+
key: "onConflict"
|
|
3943
|
+
}
|
|
3944
|
+
] }]);
|
|
3896
3945
|
return (options?.client ?? client).post({
|
|
3897
3946
|
security: [{
|
|
3898
3947
|
name: "x-api-key",
|
|
@@ -5543,6 +5592,10 @@ var Templates = class {
|
|
|
5543
5592
|
{
|
|
5544
5593
|
in: "query",
|
|
5545
5594
|
key: "projectId"
|
|
5595
|
+
},
|
|
5596
|
+
{
|
|
5597
|
+
in: "query",
|
|
5598
|
+
key: "namespaceId"
|
|
5546
5599
|
}
|
|
5547
5600
|
] }]);
|
|
5548
5601
|
return (options?.client ?? client).get({
|
|
@@ -5594,6 +5647,10 @@ var Templates = class {
|
|
|
5594
5647
|
in: "body",
|
|
5595
5648
|
key: "isActive"
|
|
5596
5649
|
},
|
|
5650
|
+
{
|
|
5651
|
+
in: "body",
|
|
5652
|
+
key: "namespaceId"
|
|
5653
|
+
},
|
|
5597
5654
|
{
|
|
5598
5655
|
in: "body",
|
|
5599
5656
|
key: "idempotencyKey"
|
|
@@ -7553,7 +7610,7 @@ var Mailboxes = class {
|
|
|
7553
7610
|
/**
|
|
7554
7611
|
* Create a mailbox
|
|
7555
7612
|
*
|
|
7556
|
-
* Creates a mailbox with one endpoint and returns it with status 201; the caller gets an admin grant on it.
|
|
7613
|
+
* Creates a mailbox with one endpoint and returns it with status 201; the caller gets an admin grant on it. An email endpoint's address must be under the organization's Samva-hosted mail domain or a verified domain with receiving enabled, and the mailbox sends from it. A phone endpoint's address is a number the organization connected on that channel, in E.164 form. The slug defaults to the address's local part, or a phone number's digits. Pass `slug` when that is taken or not a valid slug. The mailbox receives mail from now on; mail that arrived earlier is not added to it. Conflicts if the address or slug is already in use. Returns 402 when the organization is at its plan's mailbox allowance or at its mailbox storage allowance; incoming mail is still received past the storage allowance.
|
|
7557
7614
|
*/
|
|
7558
7615
|
static create(parameters, options) {
|
|
7559
7616
|
const params = buildClientParams([parameters], [{ args: [
|
|
@@ -7671,7 +7728,7 @@ var Mailboxes = class {
|
|
|
7671
7728
|
/**
|
|
7672
7729
|
* Add an endpoint to a mailbox
|
|
7673
7730
|
*
|
|
7674
|
-
* Adds an endpoint to a mailbox and returns the mailbox with status 201. It follows the same rules as the endpoint of a new mailbox: email
|
|
7731
|
+
* Adds an endpoint to a mailbox and returns the mailbox with status 201. It follows the same rules as the endpoint of a new mailbox: an email address must be under the organization's Samva-hosted mail domain or a verified domain with receiving enabled, a phone number must be one the organization connected on that channel, and no mailbox may already hold it (409). Messages sent to it reach the mailbox from now on. It becomes the default on its channel only when the mailbox has no endpoint there yet.
|
|
7675
7732
|
*/
|
|
7676
7733
|
static createEndpoint(parameters, options) {
|
|
7677
7734
|
const params = buildClientParams([parameters], [{ args: [
|
|
@@ -8698,7 +8755,7 @@ var Mailboxes = class {
|
|
|
8698
8755
|
/**
|
|
8699
8756
|
* Send a new message
|
|
8700
8757
|
*
|
|
8701
|
-
* Starts a new conversation from the mailbox's default endpoint on the channel the body names (email when omitted); a
|
|
8758
|
+
* Starts a new conversation from the mailbox's default endpoint on the channel the body names (email when omitted); a mailbox with no endpoint on that channel is refused (422). A message to a number joins the mailbox's thread with that number when it has one. Records a send action and returns 202 with its current receipt and a Location for action status. An installation, grant, or policy may require approval; otherwise the send is queued. Observe the same action through acceptance and mailbox completion. A policy refusal returns 403 with the recorded receipt.
|
|
8702
8759
|
*/
|
|
8703
8760
|
static sendMessage(parameters, options) {
|
|
8704
8761
|
const params = buildClientParams([parameters], [{ args: [
|
|
@@ -8871,7 +8928,7 @@ var Mailboxes = class {
|
|
|
8871
8928
|
/**
|
|
8872
8929
|
* Reply to a message
|
|
8873
8930
|
*
|
|
8874
|
-
* Replies to the message's Reply-To address, or its sender, in the same thread and from the thread's endpoint. The server sets the recipients, subject, and threading headers. The body's `channel` must match the thread's.
|
|
8931
|
+
* Replies to the message's Reply-To address, or its sender, in the same thread and from the thread's endpoint. The server sets the recipients, subject, and threading headers. The body's `channel` must match the thread's. On a phone channel the reply goes to the number on the other side of the thread.
|
|
8875
8932
|
*/
|
|
8876
8933
|
static reply(parameters, options) {
|
|
8877
8934
|
const params = buildClientParams([parameters], [{ args: [
|
|
@@ -8930,7 +8987,7 @@ var Mailboxes = class {
|
|
|
8930
8987
|
/**
|
|
8931
8988
|
* Reply to all recipients of a message
|
|
8932
8989
|
*
|
|
8933
|
-
* Replies to the sender and every other recipient of the message except the mailbox itself, in the same thread and from the thread's endpoint.
|
|
8990
|
+
* Replies to the sender and every other recipient of the message except the mailbox itself, in the same thread and from the thread's endpoint. A phone thread has one other side, so it answers like a reply.
|
|
8934
8991
|
*/
|
|
8935
8992
|
static replyAll(parameters, options) {
|
|
8936
8993
|
const params = buildClientParams([parameters], [{ args: [
|
|
@@ -9166,7 +9223,7 @@ var Mailboxes = class {
|
|
|
9166
9223
|
/**
|
|
9167
9224
|
* Create a draft
|
|
9168
9225
|
*
|
|
9169
|
-
* Saves a draft of a new message, or of a reply when `inReplyToMessageId` names a message in the mailbox, and returns it with status 201.
|
|
9226
|
+
* Saves a draft of a new message, or of a reply when `inReplyToMessageId` names a message in the mailbox, and returns it with status 201. A phone channel's draft holds a recipient number and text. Send it with `POST /v1/mailboxes/{id}/drafts/{draftId}/send`.
|
|
9170
9227
|
*/
|
|
9171
9228
|
static createDraft(parameters, options) {
|
|
9172
9229
|
const params = buildClientParams([parameters], [{ args: [
|
|
@@ -9651,7 +9708,7 @@ var Namespaces = class {
|
|
|
9651
9708
|
/**
|
|
9652
9709
|
* Delete a namespace
|
|
9653
9710
|
*
|
|
9654
|
-
* Deletes an empty namespace. A namespace that still holds mailboxes, API keys, or webhook endpoints
|
|
9711
|
+
* Deletes an empty namespace. A namespace that still holds anything conflicts, and the error counts what remains: mailboxes, API keys, webhook endpoints filtered to it, domains, senders, contacts, or template projects. Delete each, or return it to organization level with `DELETE /v1/namespaces/{id}/resources/{type}/{resourceId}`; mailboxes, keys, and webhook endpoints cannot move and are deleted. Messages keep the namespace they ran in.
|
|
9655
9712
|
*/
|
|
9656
9713
|
static remove(parameters, options) {
|
|
9657
9714
|
const params = buildClientParams([parameters], [{ args: [{
|
|
@@ -9723,6 +9780,101 @@ var Namespaces = class {
|
|
|
9723
9780
|
}
|
|
9724
9781
|
});
|
|
9725
9782
|
}
|
|
9783
|
+
/**
|
|
9784
|
+
* Move a resource into a namespace
|
|
9785
|
+
*
|
|
9786
|
+
* Moves a resource from organization level or another namespace into this one. A domain brings its senders; a sender on a domain cannot move alone (assign the domain); a contact brings its identities; a template brings every template in its project. A moved resource stops being a default. An address or external id the namespace already holds conflicts. Keys scoped to the old namespace stop reaching the resource at once. Mailboxes, API keys, and webhook endpoints keep the namespace they were created in.
|
|
9787
|
+
*/
|
|
9788
|
+
static assignResource(parameters, options) {
|
|
9789
|
+
const params = buildClientParams([parameters], [{ args: [
|
|
9790
|
+
{
|
|
9791
|
+
in: "path",
|
|
9792
|
+
key: "id"
|
|
9793
|
+
},
|
|
9794
|
+
{
|
|
9795
|
+
in: "body",
|
|
9796
|
+
key: "type"
|
|
9797
|
+
},
|
|
9798
|
+
{
|
|
9799
|
+
in: "body",
|
|
9800
|
+
key: "resourceId"
|
|
9801
|
+
}
|
|
9802
|
+
] }]);
|
|
9803
|
+
return (options?.client ?? client).post({
|
|
9804
|
+
security: [{
|
|
9805
|
+
name: "x-api-key",
|
|
9806
|
+
type: "apiKey"
|
|
9807
|
+
}],
|
|
9808
|
+
url: "/v1/namespaces/{id}/resources",
|
|
9809
|
+
...options,
|
|
9810
|
+
...params,
|
|
9811
|
+
headers: {
|
|
9812
|
+
"Content-Type": "application/json",
|
|
9813
|
+
...options?.headers,
|
|
9814
|
+
...params.headers
|
|
9815
|
+
}
|
|
9816
|
+
});
|
|
9817
|
+
}
|
|
9818
|
+
/**
|
|
9819
|
+
* Return a resource to organization level
|
|
9820
|
+
*
|
|
9821
|
+
* Moves a resource out of this namespace to organization level, with what follows it as in `POST /v1/namespaces/{id}/resources`. A resource in a different namespace is not found.
|
|
9822
|
+
*/
|
|
9823
|
+
static removeResource(parameters, options) {
|
|
9824
|
+
const params = buildClientParams([parameters], [{ args: [
|
|
9825
|
+
{
|
|
9826
|
+
in: "path",
|
|
9827
|
+
key: "id"
|
|
9828
|
+
},
|
|
9829
|
+
{
|
|
9830
|
+
in: "path",
|
|
9831
|
+
key: "type"
|
|
9832
|
+
},
|
|
9833
|
+
{
|
|
9834
|
+
in: "path",
|
|
9835
|
+
key: "resourceId"
|
|
9836
|
+
}
|
|
9837
|
+
] }]);
|
|
9838
|
+
return (options?.client ?? client).delete({
|
|
9839
|
+
security: [{
|
|
9840
|
+
name: "x-api-key",
|
|
9841
|
+
type: "apiKey"
|
|
9842
|
+
}],
|
|
9843
|
+
url: "/v1/namespaces/{id}/resources/{type}/{resourceId}",
|
|
9844
|
+
...options,
|
|
9845
|
+
...params
|
|
9846
|
+
});
|
|
9847
|
+
}
|
|
9848
|
+
/**
|
|
9849
|
+
* Get namespace usage
|
|
9850
|
+
*
|
|
9851
|
+
* Counts the messages the namespace sent and received in the window that count toward usage, by channel, with the same statuses as `GET /v1/organizations/usage`. A message counts toward the namespace it was sent or received in: that of the sender, mailbox, or key it used. The organization is billed for every namespace; read this to charge your own customer.
|
|
9852
|
+
*/
|
|
9853
|
+
static getUsage(parameters, options) {
|
|
9854
|
+
const params = buildClientParams([parameters], [{ args: [
|
|
9855
|
+
{
|
|
9856
|
+
in: "path",
|
|
9857
|
+
key: "id"
|
|
9858
|
+
},
|
|
9859
|
+
{
|
|
9860
|
+
in: "query",
|
|
9861
|
+
key: "after"
|
|
9862
|
+
},
|
|
9863
|
+
{
|
|
9864
|
+
in: "query",
|
|
9865
|
+
key: "before"
|
|
9866
|
+
}
|
|
9867
|
+
] }]);
|
|
9868
|
+
return (options?.client ?? client).get({
|
|
9869
|
+
security: [{
|
|
9870
|
+
name: "x-api-key",
|
|
9871
|
+
type: "apiKey"
|
|
9872
|
+
}],
|
|
9873
|
+
url: "/v1/namespaces/{id}/usage",
|
|
9874
|
+
...options,
|
|
9875
|
+
...params
|
|
9876
|
+
});
|
|
9877
|
+
}
|
|
9726
9878
|
};
|
|
9727
9879
|
var Extensions = class {
|
|
9728
9880
|
/**
|