samva 0.34.0 → 0.36.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/AGENTS.md +17 -0
- package/README.md +2 -1
- package/dist/client/sdk.gen.d.ts +325 -331
- package/dist/client/sdk.gen.js +406 -454
- package/dist/client/types.gen.d.ts +3465 -750
- package/dist/effect/agents.d.ts +222 -17
- package/dist/effect/agents.js +7 -1
- package/dist/effect/analytics.d.ts +21 -15
- package/dist/effect/api-keys.d.ts +30 -24
- package/dist/effect/campaigns.d.ts +695 -39
- package/dist/effect/categories.d.ts +3 -3
- package/dist/effect/contact-groups.d.ts +15 -15
- package/dist/effect/contacts.d.ts +56 -52
- package/dist/effect/conversations.d.ts +51 -45
- package/dist/effect/email.d.ts +82 -82
- package/dist/effect/errors.d.ts +1 -1
- package/dist/effect/errors.js +2 -2
- package/dist/effect/extension-installations.d.ts +64 -12
- package/dist/effect/extensions.d.ts +16 -16
- package/dist/effect/generated/agents.d.ts +2902 -150
- package/dist/effect/generated/agents.js +219 -31
- package/dist/effect/generated/analytics.d.ts +127 -136
- package/dist/effect/generated/analytics.js +72 -37
- package/dist/effect/generated/api-keys.d.ts +243 -47
- package/dist/effect/generated/api-keys.js +27 -12
- package/dist/effect/generated/attachments.d.ts +89 -1
- package/dist/effect/generated/attachments.js +10 -2
- package/dist/effect/generated/brands.d.ts +133 -1
- package/dist/effect/generated/brands.js +22 -10
- package/dist/effect/generated/campaigns.d.ts +1467 -143
- package/dist/effect/generated/campaigns.js +84 -20
- package/dist/effect/generated/contact-events.d.ts +26 -4
- package/dist/effect/generated/contact-events.js +5 -3
- package/dist/effect/generated/contact-groups.d.ts +233 -13
- package/dist/effect/generated/contact-groups.js +33 -17
- package/dist/effect/generated/contacts.d.ts +634 -96
- package/dist/effect/generated/contacts.js +82 -20
- package/dist/effect/generated/conversations.d.ts +501 -108
- package/dist/effect/generated/conversations.js +106 -22
- package/dist/effect/generated/custom-fields.d.ts +89 -1
- package/dist/effect/generated/custom-fields.js +11 -3
- package/dist/effect/generated/email.d.ts +1447 -83
- package/dist/effect/generated/email.js +167 -43
- package/dist/effect/generated/events.d.ts +51 -7
- package/dist/effect/generated/events.js +9 -5
- package/dist/effect/generated/extension-installations.d.ts +1052 -77
- package/dist/effect/generated/extension-installations.js +45 -31
- package/dist/effect/generated/extensions.d.ts +123 -13
- package/dist/effect/generated/extensions.js +20 -10
- package/dist/effect/generated/feedback.d.ts +23 -1
- package/dist/effect/generated/feedback.js +6 -4
- package/dist/effect/generated/index.d.ts +3 -1
- package/dist/effect/generated/journeys.d.ts +684 -16
- package/dist/effect/generated/journeys.js +37 -9
- package/dist/effect/generated/mailboxes.d.ts +6169 -1734
- package/dist/effect/generated/mailboxes.js +549 -344
- package/dist/effect/generated/media.d.ts +125 -15
- package/dist/effect/generated/media.js +15 -2
- package/dist/effect/generated/messages.d.ts +2036 -117
- package/dist/effect/generated/messages.js +286 -54
- package/dist/effect/generated/namespaces.d.ts +215 -55
- package/dist/effect/generated/namespaces.js +30 -12
- package/dist/effect/generated/newsletter-domains.d.ts +98 -12
- package/dist/effect/generated/newsletter-domains.js +20 -13
- package/dist/effect/generated/newsletter-issues.d.ts +354 -19
- package/dist/effect/generated/newsletter-issues.js +162 -98
- package/dist/effect/generated/newsletters.d.ts +123 -13
- package/dist/effect/generated/newsletters.js +19 -9
- package/dist/effect/generated/operations.d.ts +76 -10
- package/dist/effect/generated/operations.js +12 -6
- package/dist/effect/generated/organizations.d.ts +287 -7
- package/dist/effect/generated/organizations.js +33 -5
- package/dist/effect/generated/policies.d.ts +953 -0
- package/dist/effect/generated/policies.js +116 -0
- package/dist/effect/generated/scheduled-messages.d.ts +4418 -49
- package/dist/effect/generated/scheduled-messages.js +77 -13
- package/dist/effect/generated/shared.d.ts +3213 -521
- package/dist/effect/generated/shared.js +713 -128
- package/dist/effect/generated/subscriptions.d.ts +23 -1
- package/dist/effect/generated/subscriptions.js +6 -4
- package/dist/effect/generated/templates.d.ts +2081 -693
- package/dist/effect/generated/templates.js +482 -267
- package/dist/effect/generated/topic-forms.d.ts +111 -1
- package/dist/effect/generated/topic-forms.js +23 -13
- package/dist/effect/generated/topics.d.ts +353 -43
- package/dist/effect/generated/topics.js +67 -19
- package/dist/effect/generated/webhooks.d.ts +318 -57
- package/dist/effect/generated/webhooks.js +68 -17
- package/dist/effect/generated/whoami.d.ts +35 -5
- package/dist/effect/generated/whoami.js +4 -2
- package/dist/effect/generated-metadata.d.ts +56 -32
- package/dist/effect/generated-metadata.js +137 -105
- package/dist/effect/index.d.ts +1 -0
- package/dist/effect/index.js +3 -2
- package/dist/effect/internal/client.js +1 -1
- package/dist/effect/internal/email-sender.d.ts +1 -1
- package/dist/effect/internal/operation.js +5 -32
- package/dist/effect/internal/send.d.ts +1 -1
- package/dist/effect/journeys.d.ts +169 -83
- package/dist/effect/mailboxes.d.ts +978 -301
- package/dist/effect/mailboxes.js +1 -11
- package/dist/effect/media.d.ts +1 -1
- package/dist/effect/messages.d.ts +40 -40
- package/dist/effect/namespaces.d.ts +15 -15
- package/dist/effect/newsletter-domains.d.ts +5 -5
- package/dist/effect/newsletters.d.ts +1 -1
- package/dist/effect/operations.d.ts +11 -11
- package/dist/effect/organizations.d.ts +2 -2
- package/dist/effect/policies.d.ts +65 -0
- package/dist/effect/policies.js +16 -0
- package/dist/effect/scheduled-messages.d.ts +869 -8
- package/dist/effect/templates.d.ts +43 -45
- package/dist/effect/templates.js +5 -3
- package/dist/effect/topics.d.ts +23 -23
- package/dist/effect/webhooks.d.ts +29 -26
- package/dist/index.js +2 -2
- package/dist/mailbox/test.js +11 -4
- package/dist/mailbox/types.d.ts +39 -3
- package/dist/normalize.js +13 -1
- package/dist/package.js +1 -1
- package/dist/promises/client.d.ts +4 -2
- package/dist/promises/client.js +5 -3
- package/dist/promises/errors.gen.d.ts +38 -2
- package/dist/promises/errors.gen.js +394 -34
- package/dist/promises/index.js +2 -2
- package/dist/promises/types.gen.d.ts +1 -1
- package/dist/service-map.d.ts +39 -28
- package/dist/service-map.js +220 -782
- package/package.json +13 -8
package/dist/client/sdk.gen.js
CHANGED
|
@@ -72,40 +72,7 @@ var Messages = class {
|
|
|
72
72
|
* Sends a message on the requested channel and returns its receipt (id, status, and why it waits when it does) with a 201 Created status. Requires `messages:create` or the send permission of the channel it sends on, such as `email:send`. `channel` selects the payload variant. Repeating an identical request with the same optional `Idempotency-Key` header returns the original receipt; reusing the key for different content returns a conflict.
|
|
73
73
|
*/
|
|
74
74
|
static send(parameters, options) {
|
|
75
|
-
const params =
|
|
76
|
-
{
|
|
77
|
-
in: "body",
|
|
78
|
-
key: "conversationId"
|
|
79
|
-
},
|
|
80
|
-
{
|
|
81
|
-
in: "body",
|
|
82
|
-
key: "metadata"
|
|
83
|
-
},
|
|
84
|
-
{
|
|
85
|
-
in: "body",
|
|
86
|
-
key: "channel"
|
|
87
|
-
},
|
|
88
|
-
{
|
|
89
|
-
in: "body",
|
|
90
|
-
key: "to"
|
|
91
|
-
},
|
|
92
|
-
{
|
|
93
|
-
in: "body",
|
|
94
|
-
key: "cc"
|
|
95
|
-
},
|
|
96
|
-
{
|
|
97
|
-
in: "body",
|
|
98
|
-
key: "bcc"
|
|
99
|
-
},
|
|
100
|
-
{
|
|
101
|
-
in: "body",
|
|
102
|
-
key: "from"
|
|
103
|
-
},
|
|
104
|
-
{
|
|
105
|
-
in: "body",
|
|
106
|
-
key: "email"
|
|
107
|
-
}
|
|
108
|
-
] }]);
|
|
75
|
+
const params = { body: parameters };
|
|
109
76
|
return requestWithPolicy(options?.client ?? client, "messagesSend", options, (headers) => (options?.client ?? client).post({
|
|
110
77
|
security: [{
|
|
111
78
|
name: "x-api-key",
|
|
@@ -114,7 +81,6 @@ var Messages = class {
|
|
|
114
81
|
url: "/v1/messages",
|
|
115
82
|
...options,
|
|
116
83
|
...params,
|
|
117
|
-
body: params.body ?? {},
|
|
118
84
|
headers: {
|
|
119
85
|
"Content-Type": "application/json",
|
|
120
86
|
...options?.headers,
|
|
@@ -449,6 +415,10 @@ var ScheduledMessages = class {
|
|
|
449
415
|
in: "query",
|
|
450
416
|
key: "cursor"
|
|
451
417
|
},
|
|
418
|
+
{
|
|
419
|
+
in: "query",
|
|
420
|
+
key: "namespaceId"
|
|
421
|
+
},
|
|
452
422
|
{
|
|
453
423
|
in: "query",
|
|
454
424
|
key: "status"
|
|
@@ -472,6 +442,10 @@ var ScheduledMessages = class {
|
|
|
472
442
|
*/
|
|
473
443
|
static create(parameters, options) {
|
|
474
444
|
const params = buildClientParams([parameters], [{ args: [
|
|
445
|
+
{
|
|
446
|
+
in: "body",
|
|
447
|
+
key: "namespaceId"
|
|
448
|
+
},
|
|
475
449
|
{
|
|
476
450
|
in: "body",
|
|
477
451
|
key: "send"
|
|
@@ -2178,7 +2152,7 @@ var Email = class {
|
|
|
2178
2152
|
/**
|
|
2179
2153
|
* Update catch-all configuration
|
|
2180
2154
|
*
|
|
2181
|
-
* Updates a domain's catch-all webhook endpoint or unknown-address mailbox. The mailbox must be active, in the same organization, and have an email address on the domain. Omitted fields stay unchanged
|
|
2155
|
+
* Updates a domain's catch-all webhook endpoint or unknown-address mailbox without disabling catch-all. The mailbox must be active, in the same organization, and have an email address on the domain. Omitted fields stay unchanged. `endpointId: null` removes the webhook endpoint, so unknown addresses reach the configured unknown-address mailbox or are dropped without a bounce when none is set. A webhook endpoint takes precedence over the unknown-address setting.
|
|
2182
2156
|
*/
|
|
2183
2157
|
static updateCatchAllConfig(parameters, options) {
|
|
2184
2158
|
const params = buildClientParams([parameters], [{ args: [
|
|
@@ -3259,6 +3233,10 @@ var Conversations = class {
|
|
|
3259
3233
|
in: "query",
|
|
3260
3234
|
key: "cursor"
|
|
3261
3235
|
},
|
|
3236
|
+
{
|
|
3237
|
+
in: "query",
|
|
3238
|
+
key: "namespaceId"
|
|
3239
|
+
},
|
|
3262
3240
|
{
|
|
3263
3241
|
in: "query",
|
|
3264
3242
|
key: "status"
|
|
@@ -3302,6 +3280,10 @@ var Conversations = class {
|
|
|
3302
3280
|
*/
|
|
3303
3281
|
static create(parameters, options) {
|
|
3304
3282
|
const params = buildClientParams([parameters], [{ args: [
|
|
3283
|
+
{
|
|
3284
|
+
in: "body",
|
|
3285
|
+
key: "namespaceId"
|
|
3286
|
+
},
|
|
3305
3287
|
{
|
|
3306
3288
|
in: "body",
|
|
3307
3289
|
key: "title"
|
|
@@ -5156,19 +5138,66 @@ var Journeys = class {
|
|
|
5156
5138
|
}
|
|
5157
5139
|
};
|
|
5158
5140
|
var Agents = class {
|
|
5141
|
+
/**
|
|
5142
|
+
* Compare saved-test decisions
|
|
5143
|
+
*
|
|
5144
|
+
* Runs saved tests against a supplied draft and the current immutable published definition, returning changed action decisions. No test or agent is modified and nothing is sent. Large comparisons can time out; run saved tests individually or shorten their conversations before retrying.
|
|
5145
|
+
*/
|
|
5146
|
+
static rerunTests(parameters, options) {
|
|
5147
|
+
const params = buildClientParams([parameters], [{ args: [
|
|
5148
|
+
{
|
|
5149
|
+
in: "path",
|
|
5150
|
+
key: "id"
|
|
5151
|
+
},
|
|
5152
|
+
{
|
|
5153
|
+
in: "body",
|
|
5154
|
+
key: "name"
|
|
5155
|
+
},
|
|
5156
|
+
{
|
|
5157
|
+
in: "body",
|
|
5158
|
+
key: "definition"
|
|
5159
|
+
}
|
|
5160
|
+
] }]);
|
|
5161
|
+
return requestWithPolicy(options?.client ?? client, "agentsRerunTests", options, (headers) => (options?.client ?? client).post({
|
|
5162
|
+
security: [{
|
|
5163
|
+
name: "x-api-key",
|
|
5164
|
+
type: "apiKey"
|
|
5165
|
+
}],
|
|
5166
|
+
url: "/v1/agents/{id}/tests/rerun",
|
|
5167
|
+
...options,
|
|
5168
|
+
...params,
|
|
5169
|
+
body: params.body ?? {},
|
|
5170
|
+
headers: {
|
|
5171
|
+
"Content-Type": "application/json",
|
|
5172
|
+
...options?.headers,
|
|
5173
|
+
...params.headers
|
|
5174
|
+
},
|
|
5175
|
+
headers: {
|
|
5176
|
+
"Content-Type": "application/json",
|
|
5177
|
+
...headers
|
|
5178
|
+
}
|
|
5179
|
+
}));
|
|
5180
|
+
}
|
|
5159
5181
|
/**
|
|
5160
5182
|
* List agents
|
|
5161
5183
|
*
|
|
5162
|
-
* Returns the agents the caller can reach, newest first, without their drafts
|
|
5184
|
+
* Returns the agents the caller can reach, newest first, without their drafts, optionally filtered by `namespaceId`. Pass nextCursor back as cursor for the next page.
|
|
5163
5185
|
*/
|
|
5164
5186
|
static list(parameters, options) {
|
|
5165
|
-
const params = buildClientParams([parameters], [{ args: [
|
|
5166
|
-
|
|
5167
|
-
|
|
5168
|
-
|
|
5169
|
-
|
|
5170
|
-
|
|
5171
|
-
|
|
5187
|
+
const params = buildClientParams([parameters], [{ args: [
|
|
5188
|
+
{
|
|
5189
|
+
in: "query",
|
|
5190
|
+
key: "limit"
|
|
5191
|
+
},
|
|
5192
|
+
{
|
|
5193
|
+
in: "query",
|
|
5194
|
+
key: "cursor"
|
|
5195
|
+
},
|
|
5196
|
+
{
|
|
5197
|
+
in: "query",
|
|
5198
|
+
key: "namespaceId"
|
|
5199
|
+
}
|
|
5200
|
+
] }]);
|
|
5172
5201
|
return requestWithPolicy(options?.client ?? client, "agentsList", options, (headers) => (options?.client ?? client).get({
|
|
5173
5202
|
security: [{
|
|
5174
5203
|
name: "x-api-key",
|
|
@@ -5183,7 +5212,7 @@ var Agents = class {
|
|
|
5183
5212
|
/**
|
|
5184
5213
|
* Create an agent
|
|
5185
5214
|
*
|
|
5186
|
-
* Creates an agent with a draft and returns it with status 201. The agent answers nothing until its draft is published.
|
|
5215
|
+
* Creates an agent with a draft and returns it with status 201. The agent answers nothing until its draft is published. The default policy requires a person to approve replies and final actions. The namespace is set at creation and cannot change.
|
|
5187
5216
|
*/
|
|
5188
5217
|
static create(parameters, options) {
|
|
5189
5218
|
const params = buildClientParams([parameters], [{ args: [
|
|
@@ -5221,6 +5250,22 @@ var Agents = class {
|
|
|
5221
5250
|
}));
|
|
5222
5251
|
}
|
|
5223
5252
|
/**
|
|
5253
|
+
* List agent models
|
|
5254
|
+
*
|
|
5255
|
+
* Returns the models an agent can run on: the standard and max aliases, each with the model it points at today, then every catalog model an agent can pin. Each entry has its price per million tokens, the reasoning levels it accepts with an estimate of a typical reply at each, and whether your plan includes it. Pinning a catalog model needs the Growth or Scale plan.
|
|
5256
|
+
*/
|
|
5257
|
+
static listModels(options) {
|
|
5258
|
+
return requestWithPolicy(options?.client ?? client, "agentsListModels", options, (headers) => (options?.client ?? client).get({
|
|
5259
|
+
security: [{
|
|
5260
|
+
name: "x-api-key",
|
|
5261
|
+
type: "apiKey"
|
|
5262
|
+
}],
|
|
5263
|
+
url: "/v1/agents/models",
|
|
5264
|
+
...options,
|
|
5265
|
+
headers
|
|
5266
|
+
}));
|
|
5267
|
+
}
|
|
5268
|
+
/**
|
|
5224
5269
|
* Delete an agent
|
|
5225
5270
|
*
|
|
5226
5271
|
* Deletes an agent with its draft and published versions. The endpoints it answered on stop being answered by an agent. A reply already running finishes on the version it started on.
|
|
@@ -5263,18 +5308,25 @@ var Agents = class {
|
|
|
5263
5308
|
}));
|
|
5264
5309
|
}
|
|
5265
5310
|
/**
|
|
5266
|
-
*
|
|
5311
|
+
* Update an agent
|
|
5267
5312
|
*
|
|
5268
|
-
* Renames an agent.
|
|
5313
|
+
* Renames an agent or sets its monthly spend cap. Both take effect at once, without publishing. At the cap the agent pauses and its conversations wait for your team until the month turns (UTC) or the cap is raised or removed.
|
|
5269
5314
|
*/
|
|
5270
5315
|
static update(parameters, options) {
|
|
5271
|
-
const params = buildClientParams([parameters], [{ args: [
|
|
5272
|
-
|
|
5273
|
-
|
|
5274
|
-
|
|
5275
|
-
|
|
5276
|
-
|
|
5277
|
-
|
|
5316
|
+
const params = buildClientParams([parameters], [{ args: [
|
|
5317
|
+
{
|
|
5318
|
+
in: "path",
|
|
5319
|
+
key: "id"
|
|
5320
|
+
},
|
|
5321
|
+
{
|
|
5322
|
+
in: "body",
|
|
5323
|
+
key: "name"
|
|
5324
|
+
},
|
|
5325
|
+
{
|
|
5326
|
+
in: "body",
|
|
5327
|
+
key: "monthlySpendCapDollars"
|
|
5328
|
+
}
|
|
5329
|
+
] }]);
|
|
5278
5330
|
return requestWithPolicy(options?.client ?? client, "agentsUpdate", options, (headers) => (options?.client ?? client).patch({
|
|
5279
5331
|
security: [{
|
|
5280
5332
|
name: "x-api-key",
|
|
@@ -5298,7 +5350,7 @@ var Agents = class {
|
|
|
5298
5350
|
/**
|
|
5299
5351
|
* Replace an agent draft
|
|
5300
5352
|
*
|
|
5301
|
-
* Replaces the whole draft and returns the agent with a new revision. The request names the revision it read; a stale revision returns 409. Published versions, and the conversations answered on them, do not change. An endpoint answers for one agent at a time: a draft that names an endpoint another agent answers on returns 409.
|
|
5353
|
+
* Replaces the whole draft and returns the agent with a new revision. The request names the revision it read; a stale revision returns 409. Published versions, and the conversations answered on them, do not change. An endpoint answers for one agent at a time: a draft that names an endpoint another agent answers on returns 409. A draft that pins a catalog model returns 402 unless your plan is Growth or Scale, and 422 when the model is not available or does not support the reasoning level.
|
|
5302
5354
|
*/
|
|
5303
5355
|
static replaceDraft(parameters, options) {
|
|
5304
5356
|
const params = buildClientParams([parameters], [{ args: [
|
|
@@ -5338,7 +5390,7 @@ var Agents = class {
|
|
|
5338
5390
|
/**
|
|
5339
5391
|
* Publish an agent
|
|
5340
5392
|
*
|
|
5341
|
-
* Publishes the draft as the next immutable version. Each conversation moves to it from its next agent reply; a reply already running finishes on the version it started on. The request names the revision it read; a stale revision returns 409. Publishing a draft identical to the newest version changes nothing and answers published false. An endpoint answers for one agent at a time: publishing a draft whose endpoint another agent answers on returns 409.
|
|
5393
|
+
* Publishes the draft as the next immutable version. Each conversation moves to it from its next agent reply; a reply already running finishes on the version it started on. The request names the revision it read; a stale revision returns 409. Publishing a draft identical to the newest version changes nothing and answers published false. An endpoint answers for one agent at a time: publishing a draft whose endpoint another agent answers on returns 409. The published policy governs review of each proposed action.
|
|
5342
5394
|
*/
|
|
5343
5395
|
static publish(parameters, options) {
|
|
5344
5396
|
const params = buildClientParams([parameters], [{ args: [{
|
|
@@ -5369,6 +5421,27 @@ var Agents = class {
|
|
|
5369
5421
|
}));
|
|
5370
5422
|
}
|
|
5371
5423
|
/**
|
|
5424
|
+
* Continue an agent on Standard
|
|
5425
|
+
*
|
|
5426
|
+
* Publishes the live version again with its model set to standard, as the next immutable version, then removes the monthly spend cap. Use it when the agent pauses at its cap on a pinned model and should keep answering on Standard. The draft is left as it is, so its unpublished changes stay unpublished. The live version's reasoning level is kept when Standard supports it, and is auto otherwise. A live version already on standard publishes nothing and answers published false; the cap is still removed. An agent with no published version returns 422; a version published while the request runs returns 409.
|
|
5427
|
+
*/
|
|
5428
|
+
static continueOnStandard(parameters, options) {
|
|
5429
|
+
const params = buildClientParams([parameters], [{ args: [{
|
|
5430
|
+
in: "path",
|
|
5431
|
+
key: "id"
|
|
5432
|
+
}] }]);
|
|
5433
|
+
return requestWithPolicy(options?.client ?? client, "agentsContinueOnStandard", options, (headers) => (options?.client ?? client).post({
|
|
5434
|
+
security: [{
|
|
5435
|
+
name: "x-api-key",
|
|
5436
|
+
type: "apiKey"
|
|
5437
|
+
}],
|
|
5438
|
+
url: "/v1/agents/{id}/continue-on-standard",
|
|
5439
|
+
...options,
|
|
5440
|
+
...params,
|
|
5441
|
+
headers
|
|
5442
|
+
}));
|
|
5443
|
+
}
|
|
5444
|
+
/**
|
|
5372
5445
|
* List published agent versions
|
|
5373
5446
|
*
|
|
5374
5447
|
* Returns an agent's published versions, newest first, without their definitions. Pass nextCursor back as cursor for the next page.
|
|
@@ -7159,6 +7232,10 @@ var Analytics = class {
|
|
|
7159
7232
|
*/
|
|
7160
7233
|
static getStats(parameters, options) {
|
|
7161
7234
|
const params = buildClientParams([parameters], [{ args: [
|
|
7235
|
+
{
|
|
7236
|
+
in: "query",
|
|
7237
|
+
key: "namespaceId"
|
|
7238
|
+
},
|
|
7162
7239
|
{
|
|
7163
7240
|
in: "query",
|
|
7164
7241
|
key: "after"
|
|
@@ -7193,13 +7270,20 @@ var Analytics = class {
|
|
|
7193
7270
|
* Returns aggregate delivery metrics plus unique-message email Open and Click rates over the selected date range. `sent` counts every outbound message accepted in the range; each rate is taken over the messages the channel actually attempted, so one still waiting to be sent neither helps nor hurts it. Each engagement rate uses the corresponding tracking-eligible delivered-message cohort; repeated provider observations do not inflate the numerator.
|
|
7194
7271
|
*/
|
|
7195
7272
|
static getChannelStats(parameters, options) {
|
|
7196
|
-
const params = buildClientParams([parameters], [{ args: [
|
|
7197
|
-
|
|
7198
|
-
|
|
7199
|
-
|
|
7200
|
-
|
|
7201
|
-
|
|
7202
|
-
|
|
7273
|
+
const params = buildClientParams([parameters], [{ args: [
|
|
7274
|
+
{
|
|
7275
|
+
in: "query",
|
|
7276
|
+
key: "namespaceId"
|
|
7277
|
+
},
|
|
7278
|
+
{
|
|
7279
|
+
in: "query",
|
|
7280
|
+
key: "after"
|
|
7281
|
+
},
|
|
7282
|
+
{
|
|
7283
|
+
in: "query",
|
|
7284
|
+
key: "before"
|
|
7285
|
+
}
|
|
7286
|
+
] }]);
|
|
7203
7287
|
return requestWithPolicy(options?.client ?? client, "analyticsGetChannelStats", options, (headers) => (options?.client ?? client).get({
|
|
7204
7288
|
security: [{
|
|
7205
7289
|
name: "x-api-key",
|
|
@@ -7218,6 +7302,10 @@ var Analytics = class {
|
|
|
7218
7302
|
*/
|
|
7219
7303
|
static getTopContacts(parameters, options) {
|
|
7220
7304
|
const params = buildClientParams([parameters], [{ args: [
|
|
7305
|
+
{
|
|
7306
|
+
in: "query",
|
|
7307
|
+
key: "namespaceId"
|
|
7308
|
+
},
|
|
7221
7309
|
{
|
|
7222
7310
|
in: "query",
|
|
7223
7311
|
key: "after"
|
|
@@ -7252,13 +7340,20 @@ var Analytics = class {
|
|
|
7252
7340
|
* Returns outbound message counts over the half-open selected instant range, bucketed by organization-local hour. Empty ranges return no rows; non-empty ranges include all 24 hours.
|
|
7253
7341
|
*/
|
|
7254
7342
|
static getHourlyDistribution(parameters, options) {
|
|
7255
|
-
const params = buildClientParams([parameters], [{ args: [
|
|
7256
|
-
|
|
7257
|
-
|
|
7258
|
-
|
|
7259
|
-
|
|
7260
|
-
|
|
7261
|
-
|
|
7343
|
+
const params = buildClientParams([parameters], [{ args: [
|
|
7344
|
+
{
|
|
7345
|
+
in: "query",
|
|
7346
|
+
key: "namespaceId"
|
|
7347
|
+
},
|
|
7348
|
+
{
|
|
7349
|
+
in: "query",
|
|
7350
|
+
key: "after"
|
|
7351
|
+
},
|
|
7352
|
+
{
|
|
7353
|
+
in: "query",
|
|
7354
|
+
key: "before"
|
|
7355
|
+
}
|
|
7356
|
+
] }]);
|
|
7262
7357
|
return requestWithPolicy(options?.client ?? client, "analyticsGetHourlyDistribution", options, (headers) => (options?.client ?? client).get({
|
|
7263
7358
|
security: [{
|
|
7264
7359
|
name: "x-api-key",
|
|
@@ -7277,6 +7372,10 @@ var Analytics = class {
|
|
|
7277
7372
|
*/
|
|
7278
7373
|
static getDeliveryMetrics(parameters, options) {
|
|
7279
7374
|
const params = buildClientParams([parameters], [{ args: [
|
|
7375
|
+
{
|
|
7376
|
+
in: "query",
|
|
7377
|
+
key: "namespaceId"
|
|
7378
|
+
},
|
|
7280
7379
|
{
|
|
7281
7380
|
in: "query",
|
|
7282
7381
|
key: "after"
|
|
@@ -7308,6 +7407,10 @@ var Analytics = class {
|
|
|
7308
7407
|
*/
|
|
7309
7408
|
static exportData(parameters, options) {
|
|
7310
7409
|
const params = buildClientParams([parameters], [{ args: [
|
|
7410
|
+
{
|
|
7411
|
+
in: "body",
|
|
7412
|
+
key: "namespaceId"
|
|
7413
|
+
},
|
|
7311
7414
|
{
|
|
7312
7415
|
in: "body",
|
|
7313
7416
|
key: "after"
|
|
@@ -7437,10 +7540,6 @@ var Templates = class {
|
|
|
7437
7540
|
in: "body",
|
|
7438
7541
|
key: "category"
|
|
7439
7542
|
},
|
|
7440
|
-
{
|
|
7441
|
-
in: "body",
|
|
7442
|
-
key: "isActive"
|
|
7443
|
-
},
|
|
7444
7543
|
{
|
|
7445
7544
|
in: "body",
|
|
7446
7545
|
key: "namespaceId"
|
|
@@ -7683,14 +7782,14 @@ var Templates = class {
|
|
|
7683
7782
|
/**
|
|
7684
7783
|
* Delete a template
|
|
7685
7784
|
*
|
|
7686
|
-
*
|
|
7785
|
+
* Permanently deletes a template and its publications, input contracts, variants and preview rasters, freeing its slug. Refuses with 409 and reference kind/id pairs while in use. Sent-message history keeps its snapshots. The project and its Git files remain. External object cleanup retries durably.
|
|
7687
7786
|
*/
|
|
7688
|
-
static
|
|
7787
|
+
static delete(parameters, options) {
|
|
7689
7788
|
const params = buildClientParams([parameters], [{ args: [{
|
|
7690
7789
|
in: "path",
|
|
7691
7790
|
key: "id"
|
|
7692
7791
|
}] }]);
|
|
7693
|
-
return requestWithPolicy(options?.client ?? client, "
|
|
7792
|
+
return requestWithPolicy(options?.client ?? client, "templatesDelete", options, (headers) => (options?.client ?? client).delete({
|
|
7694
7793
|
security: [{
|
|
7695
7794
|
name: "x-api-key",
|
|
7696
7795
|
type: "apiKey"
|
|
@@ -7848,6 +7947,27 @@ var Templates = class {
|
|
|
7848
7947
|
}));
|
|
7849
7948
|
}
|
|
7850
7949
|
/**
|
|
7950
|
+
* Permanently delete a template project
|
|
7951
|
+
*
|
|
7952
|
+
* Permanently deletes the project and every template in it. Refuses with 409 and reference kind/id pairs while any entry or the project is in use. Repository, workspace, conversations, draft assets, publications and previews are removed through durable cleanup. Sent-message history keeps its snapshots. Newsletter issue projects can only be removed through their topic.
|
|
7953
|
+
*/
|
|
7954
|
+
static deleteProject(parameters, options) {
|
|
7955
|
+
const params = buildClientParams([parameters], [{ args: [{
|
|
7956
|
+
in: "path",
|
|
7957
|
+
key: "id"
|
|
7958
|
+
}] }]);
|
|
7959
|
+
return requestWithPolicy(options?.client ?? client, "templatesDeleteProject", options, (headers) => (options?.client ?? client).delete({
|
|
7960
|
+
security: [{
|
|
7961
|
+
name: "x-api-key",
|
|
7962
|
+
type: "apiKey"
|
|
7963
|
+
}],
|
|
7964
|
+
url: "/v1/templates/projects/{id}",
|
|
7965
|
+
...options,
|
|
7966
|
+
...params,
|
|
7967
|
+
headers
|
|
7968
|
+
}));
|
|
7969
|
+
}
|
|
7970
|
+
/**
|
|
7851
7971
|
* Patch template project files
|
|
7852
7972
|
*
|
|
7853
7973
|
* Applies revision-checked file patches to the shared project workspace overlay.
|
|
@@ -8717,7 +8837,7 @@ var Webhooks = class {
|
|
|
8717
8837
|
/**
|
|
8718
8838
|
* List webhooks
|
|
8719
8839
|
*
|
|
8720
|
-
* Returns the organization's webhook endpoints, oldest first, with each endpoint's delivery counts, optionally filtered by a search term matched against name and URL, and by status. Pass `nextCursor` back as `cursor` for the next page; it is null on the last page.
|
|
8840
|
+
* Returns the organization's webhook endpoints, oldest first, with each endpoint's delivery counts, optionally filtered by namespace (`namespaceId`), a search term matched against name and URL, and by status. Pass `nextCursor` back as `cursor` for the next page; it is null on the last page.
|
|
8721
8841
|
*/
|
|
8722
8842
|
static list(parameters, options) {
|
|
8723
8843
|
const params = buildClientParams([parameters], [{ args: [
|
|
@@ -8729,6 +8849,10 @@ var Webhooks = class {
|
|
|
8729
8849
|
in: "query",
|
|
8730
8850
|
key: "cursor"
|
|
8731
8851
|
},
|
|
8852
|
+
{
|
|
8853
|
+
in: "query",
|
|
8854
|
+
key: "namespaceId"
|
|
8855
|
+
},
|
|
8732
8856
|
{
|
|
8733
8857
|
in: "query",
|
|
8734
8858
|
key: "search"
|
|
@@ -9360,7 +9484,7 @@ var ApiKeys = class {
|
|
|
9360
9484
|
/**
|
|
9361
9485
|
* List API keys
|
|
9362
9486
|
*
|
|
9363
|
-
* Returns the organization's API keys, newest first, filterable by status and a search term matched against name and description. Pass `nextCursor` back as `cursor` for the next page; it is null on the last page.
|
|
9487
|
+
* Returns the organization's API keys, newest first, filterable by namespace (`namespaceId`), status and a search term matched against name and description. Pass `nextCursor` back as `cursor` for the next page; it is null on the last page.
|
|
9364
9488
|
*/
|
|
9365
9489
|
static list(parameters, options) {
|
|
9366
9490
|
const params = buildClientParams([parameters], [{ args: [
|
|
@@ -9372,6 +9496,10 @@ var ApiKeys = class {
|
|
|
9372
9496
|
in: "query",
|
|
9373
9497
|
key: "cursor"
|
|
9374
9498
|
},
|
|
9499
|
+
{
|
|
9500
|
+
in: "query",
|
|
9501
|
+
key: "namespaceId"
|
|
9502
|
+
},
|
|
9375
9503
|
{
|
|
9376
9504
|
in: "query",
|
|
9377
9505
|
key: "status"
|
|
@@ -9475,10 +9603,6 @@ var ApiKeys = class {
|
|
|
9475
9603
|
{
|
|
9476
9604
|
in: "body",
|
|
9477
9605
|
key: "description"
|
|
9478
|
-
},
|
|
9479
|
-
{
|
|
9480
|
-
in: "body",
|
|
9481
|
-
key: "mailboxes"
|
|
9482
9606
|
}
|
|
9483
9607
|
] }]);
|
|
9484
9608
|
return requestWithPolicy(options?.client ?? client, "apiKeysUpdate", options, (headers) => (options?.client ?? client).patch({
|
|
@@ -9670,7 +9794,7 @@ var Mailboxes = class {
|
|
|
9670
9794
|
/**
|
|
9671
9795
|
* List mailboxes
|
|
9672
9796
|
*
|
|
9673
|
-
* Returns summaries of the mailboxes the caller can read, newest first, filterable by creation time (`after`, `before`). Pass `nextCursor` back as `cursor` for the next page; it is null on the last page. Read a mailbox's endpoints and metadata with `GET /v1/mailboxes/{id}`.
|
|
9797
|
+
* Returns summaries of the mailboxes the caller can read, newest first, filterable by namespace (`namespaceId`) and creation time (`after`, `before`). Pass `nextCursor` back as `cursor` for the next page; it is null on the last page. Read a mailbox's endpoints and metadata with `GET /v1/mailboxes/{id}`.
|
|
9674
9798
|
*/
|
|
9675
9799
|
static list(parameters, options) {
|
|
9676
9800
|
const params = buildClientParams([parameters], [{ args: [
|
|
@@ -9689,6 +9813,10 @@ var Mailboxes = class {
|
|
|
9689
9813
|
{
|
|
9690
9814
|
in: "query",
|
|
9691
9815
|
key: "before"
|
|
9816
|
+
},
|
|
9817
|
+
{
|
|
9818
|
+
in: "query",
|
|
9819
|
+
key: "namespaceId"
|
|
9692
9820
|
}
|
|
9693
9821
|
] }]);
|
|
9694
9822
|
return requestWithPolicy(options?.client ?? client, "mailboxesList", options, (headers) => (options?.client ?? client).get({
|
|
@@ -9705,7 +9833,7 @@ var Mailboxes = class {
|
|
|
9705
9833
|
/**
|
|
9706
9834
|
* Create a mailbox
|
|
9707
9835
|
*
|
|
9708
|
-
* 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.
|
|
9836
|
+
* 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 once its sendingStatus is ready. Hosted addresses return pending while sending setup completes. 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. Pass Idempotency-Key to retry safely: the same key and body return the original mailbox in its current state; a changed body returns 409. 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.
|
|
9709
9837
|
*/
|
|
9710
9838
|
static create(parameters, options) {
|
|
9711
9839
|
const params = buildClientParams([parameters], [{ args: [
|
|
@@ -9989,7 +10117,7 @@ var Mailboxes = class {
|
|
|
9989
10117
|
/**
|
|
9990
10118
|
* Get mailbox activity
|
|
9991
10119
|
*
|
|
9992
|
-
* Counts the actions proposed and events recorded on a mailbox between `after` and `before` (omit both for all time), and the
|
|
10120
|
+
* Counts the actions proposed and events recorded on a mailbox between `after` and `before` (omit both for all time), and the actions waiting for approval now. List the actions and events themselves with `GET /v1/mailboxes/{id}/actions` and `GET /v1/mailboxes/{id}/events`.
|
|
9993
10121
|
*/
|
|
9994
10122
|
static getAgentActivity(parameters, options) {
|
|
9995
10123
|
const params = buildClientParams([parameters], [{ args: [
|
|
@@ -10020,7 +10148,7 @@ var Mailboxes = class {
|
|
|
10020
10148
|
/**
|
|
10021
10149
|
* List mailbox grants
|
|
10022
10150
|
*
|
|
10023
|
-
* Returns who can use the mailbox, what each grant allows,
|
|
10151
|
+
* Returns who can use the mailbox, what each grant allows, newest first. Pass `nextCursor` back as `cursor` for the next page; it is null on the last page.
|
|
10024
10152
|
*/
|
|
10025
10153
|
static listGrants(parameters, options) {
|
|
10026
10154
|
const params = buildClientParams([parameters], [{ args: [
|
|
@@ -10066,10 +10194,6 @@ var Mailboxes = class {
|
|
|
10066
10194
|
{
|
|
10067
10195
|
in: "body",
|
|
10068
10196
|
key: "role"
|
|
10069
|
-
},
|
|
10070
|
-
{
|
|
10071
|
-
in: "body",
|
|
10072
|
-
key: "sendMode"
|
|
10073
10197
|
}
|
|
10074
10198
|
] }]);
|
|
10075
10199
|
return requestWithPolicy(options?.client ?? client, "mailboxesCreateGrant", options, (headers) => (options?.client ?? client).post({
|
|
@@ -10119,7 +10243,7 @@ var Mailboxes = class {
|
|
|
10119
10243
|
/**
|
|
10120
10244
|
* Update a mailbox grant
|
|
10121
10245
|
*
|
|
10122
|
-
* Changes a member's role
|
|
10246
|
+
* Changes a member's role on a mailbox and returns the updated grant. A field left out keeps its value; naming neither is a validation error. Taking admin from the last grant that can configure the mailbox conflicts, as revoking it does. The change applies to the member's next request on every surface.
|
|
10123
10247
|
*/
|
|
10124
10248
|
static updateGrant(parameters, options) {
|
|
10125
10249
|
const params = buildClientParams([parameters], [{ args: [
|
|
@@ -10134,10 +10258,6 @@ var Mailboxes = class {
|
|
|
10134
10258
|
{
|
|
10135
10259
|
in: "body",
|
|
10136
10260
|
key: "role"
|
|
10137
|
-
},
|
|
10138
|
-
{
|
|
10139
|
-
in: "body",
|
|
10140
|
-
key: "sendMode"
|
|
10141
10261
|
}
|
|
10142
10262
|
] }]);
|
|
10143
10263
|
return requestWithPolicy(options?.client ?? client, "mailboxesUpdateGrant", options, (headers) => (options?.client ?? client).patch({
|
|
@@ -10161,175 +10281,6 @@ var Mailboxes = class {
|
|
|
10161
10281
|
}));
|
|
10162
10282
|
}
|
|
10163
10283
|
/**
|
|
10164
|
-
* List mailbox policies
|
|
10165
|
-
*
|
|
10166
|
-
* Returns every send policy on a mailbox, oldest first. A mailbox holds at most 20 policies, so the list is never paged. Each enabled policy holds (`requireApproval`) or refuses (`deny`) every send from the mailbox; `deny` wins when both apply.
|
|
10167
|
-
*/
|
|
10168
|
-
static listPolicies(parameters, options) {
|
|
10169
|
-
const params = buildClientParams([parameters], [{ args: [{
|
|
10170
|
-
in: "path",
|
|
10171
|
-
key: "id"
|
|
10172
|
-
}] }]);
|
|
10173
|
-
return requestWithPolicy(options?.client ?? client, "mailboxesListPolicies", options, (headers) => (options?.client ?? client).get({
|
|
10174
|
-
security: [{
|
|
10175
|
-
name: "x-api-key",
|
|
10176
|
-
type: "apiKey"
|
|
10177
|
-
}],
|
|
10178
|
-
url: "/v1/mailboxes/{id}/policies",
|
|
10179
|
-
...options,
|
|
10180
|
-
...params,
|
|
10181
|
-
headers
|
|
10182
|
-
}));
|
|
10183
|
-
}
|
|
10184
|
-
/**
|
|
10185
|
-
* Create a mailbox policy
|
|
10186
|
-
*
|
|
10187
|
-
* Adds a send policy to a mailbox and returns it with status 201. It applies to every send proposed after it is created, whoever proposes it. A mailbox that already holds 20 policies conflicts.
|
|
10188
|
-
*/
|
|
10189
|
-
static createPolicy(parameters, options) {
|
|
10190
|
-
const params = buildClientParams([parameters], [{ args: [
|
|
10191
|
-
{
|
|
10192
|
-
in: "path",
|
|
10193
|
-
key: "id"
|
|
10194
|
-
},
|
|
10195
|
-
{
|
|
10196
|
-
in: "body",
|
|
10197
|
-
key: "name"
|
|
10198
|
-
},
|
|
10199
|
-
{
|
|
10200
|
-
in: "body",
|
|
10201
|
-
key: "outcome"
|
|
10202
|
-
},
|
|
10203
|
-
{
|
|
10204
|
-
in: "body",
|
|
10205
|
-
key: "reason"
|
|
10206
|
-
},
|
|
10207
|
-
{
|
|
10208
|
-
in: "body",
|
|
10209
|
-
key: "enabled"
|
|
10210
|
-
}
|
|
10211
|
-
] }]);
|
|
10212
|
-
return requestWithPolicy(options?.client ?? client, "mailboxesCreatePolicy", options, (headers) => (options?.client ?? client).post({
|
|
10213
|
-
security: [{
|
|
10214
|
-
name: "x-api-key",
|
|
10215
|
-
type: "apiKey"
|
|
10216
|
-
}],
|
|
10217
|
-
url: "/v1/mailboxes/{id}/policies",
|
|
10218
|
-
...options,
|
|
10219
|
-
...params,
|
|
10220
|
-
body: params.body ?? {},
|
|
10221
|
-
headers: {
|
|
10222
|
-
"Content-Type": "application/json",
|
|
10223
|
-
...options?.headers,
|
|
10224
|
-
...params.headers
|
|
10225
|
-
},
|
|
10226
|
-
headers: {
|
|
10227
|
-
"Content-Type": "application/json",
|
|
10228
|
-
...headers
|
|
10229
|
-
}
|
|
10230
|
-
}));
|
|
10231
|
-
}
|
|
10232
|
-
/**
|
|
10233
|
-
* Delete a mailbox policy
|
|
10234
|
-
*
|
|
10235
|
-
* Deletes a send policy. Sends it already holds stay held until a person approves or denies them.
|
|
10236
|
-
*/
|
|
10237
|
-
static deletePolicy(parameters, options) {
|
|
10238
|
-
const params = buildClientParams([parameters], [{ args: [{
|
|
10239
|
-
in: "path",
|
|
10240
|
-
key: "id"
|
|
10241
|
-
}, {
|
|
10242
|
-
in: "path",
|
|
10243
|
-
key: "policyId"
|
|
10244
|
-
}] }]);
|
|
10245
|
-
return requestWithPolicy(options?.client ?? client, "mailboxesDeletePolicy", options, (headers) => (options?.client ?? client).delete({
|
|
10246
|
-
security: [{
|
|
10247
|
-
name: "x-api-key",
|
|
10248
|
-
type: "apiKey"
|
|
10249
|
-
}],
|
|
10250
|
-
url: "/v1/mailboxes/{id}/policies/{policyId}",
|
|
10251
|
-
...options,
|
|
10252
|
-
...params,
|
|
10253
|
-
headers
|
|
10254
|
-
}));
|
|
10255
|
-
}
|
|
10256
|
-
/**
|
|
10257
|
-
* Get a mailbox policy
|
|
10258
|
-
*
|
|
10259
|
-
* Returns one send policy.
|
|
10260
|
-
*/
|
|
10261
|
-
static getPolicy(parameters, options) {
|
|
10262
|
-
const params = buildClientParams([parameters], [{ args: [{
|
|
10263
|
-
in: "path",
|
|
10264
|
-
key: "id"
|
|
10265
|
-
}, {
|
|
10266
|
-
in: "path",
|
|
10267
|
-
key: "policyId"
|
|
10268
|
-
}] }]);
|
|
10269
|
-
return requestWithPolicy(options?.client ?? client, "mailboxesGetPolicy", options, (headers) => (options?.client ?? client).get({
|
|
10270
|
-
security: [{
|
|
10271
|
-
name: "x-api-key",
|
|
10272
|
-
type: "apiKey"
|
|
10273
|
-
}],
|
|
10274
|
-
url: "/v1/mailboxes/{id}/policies/{policyId}",
|
|
10275
|
-
...options,
|
|
10276
|
-
...params,
|
|
10277
|
-
headers
|
|
10278
|
-
}));
|
|
10279
|
-
}
|
|
10280
|
-
/**
|
|
10281
|
-
* Update a mailbox policy
|
|
10282
|
-
*
|
|
10283
|
-
* Updates the fields you name and keeps the rest. Set `enabled` to `false` to stop a policy applying without deleting it.
|
|
10284
|
-
*/
|
|
10285
|
-
static updatePolicy(parameters, options) {
|
|
10286
|
-
const params = buildClientParams([parameters], [{ args: [
|
|
10287
|
-
{
|
|
10288
|
-
in: "path",
|
|
10289
|
-
key: "id"
|
|
10290
|
-
},
|
|
10291
|
-
{
|
|
10292
|
-
in: "path",
|
|
10293
|
-
key: "policyId"
|
|
10294
|
-
},
|
|
10295
|
-
{
|
|
10296
|
-
in: "body",
|
|
10297
|
-
key: "name"
|
|
10298
|
-
},
|
|
10299
|
-
{
|
|
10300
|
-
in: "body",
|
|
10301
|
-
key: "outcome"
|
|
10302
|
-
},
|
|
10303
|
-
{
|
|
10304
|
-
in: "body",
|
|
10305
|
-
key: "reason"
|
|
10306
|
-
},
|
|
10307
|
-
{
|
|
10308
|
-
in: "body",
|
|
10309
|
-
key: "enabled"
|
|
10310
|
-
}
|
|
10311
|
-
] }]);
|
|
10312
|
-
return requestWithPolicy(options?.client ?? client, "mailboxesUpdatePolicy", options, (headers) => (options?.client ?? client).patch({
|
|
10313
|
-
security: [{
|
|
10314
|
-
name: "x-api-key",
|
|
10315
|
-
type: "apiKey"
|
|
10316
|
-
}],
|
|
10317
|
-
url: "/v1/mailboxes/{id}/policies/{policyId}",
|
|
10318
|
-
...options,
|
|
10319
|
-
...params,
|
|
10320
|
-
body: params.body ?? {},
|
|
10321
|
-
headers: {
|
|
10322
|
-
"Content-Type": "application/json",
|
|
10323
|
-
...options?.headers,
|
|
10324
|
-
...params.headers
|
|
10325
|
-
},
|
|
10326
|
-
headers: {
|
|
10327
|
-
"Content-Type": "application/json",
|
|
10328
|
-
...headers
|
|
10329
|
-
}
|
|
10330
|
-
}));
|
|
10331
|
-
}
|
|
10332
|
-
/**
|
|
10333
10284
|
* List mailbox folders
|
|
10334
10285
|
*
|
|
10335
10286
|
* Returns each folder that holds a thread with its thread count and the caller's unread count. The folder set is fixed, so the list is never paged.
|
|
@@ -10486,7 +10437,7 @@ var Mailboxes = class {
|
|
|
10486
10437
|
/**
|
|
10487
10438
|
* List mailbox decisions awaiting you
|
|
10488
10439
|
*
|
|
10489
|
-
* Returns held
|
|
10440
|
+
* Returns held actions this caller can approve and quarantined messages this caller may release across their visible mailboxes. Counts cover all actionable items, independent of the current cursor page. Metadata only; isolated messages, self approvals, and decisions the credential cannot perform are excluded.
|
|
10490
10441
|
*/
|
|
10491
10442
|
static getNeedsYou(parameters, options) {
|
|
10492
10443
|
const params = buildClientParams([parameters], [{ args: [{
|
|
@@ -10549,7 +10500,7 @@ var Mailboxes = class {
|
|
|
10549
10500
|
/**
|
|
10550
10501
|
* List threads across your mailboxes
|
|
10551
10502
|
*
|
|
10552
|
-
* Lists only threads in mailboxes the caller can read, newest activity first. Repeat mailboxId to narrow the scope; kind selects personal or shared mailboxes. conversation selects the threads of one conversation (the conversationId a thread reports), one per readable mailbox it reached. state=active excludes the caller's Done and shared closed threads; state=done selects the caller's Done plus closed shared threads, without duplicates. Other filters and cursor pagination match the per-mailbox list.
|
|
10503
|
+
* Lists only threads in mailboxes the caller can read. With `q`, semantic and keyword search returns the best-matching threads in relevance order, capped across cursor pages. Without `q`, threads use newest activity first. Repeat mailboxId to narrow the scope; kind selects personal or shared mailboxes. conversation selects the threads of one conversation (the conversationId a thread reports), one per readable mailbox it reached. state=active excludes the caller's Done and shared closed threads; state=done selects the caller's Done plus closed shared threads, without duplicates. Other filters and cursor pagination match the per-mailbox list.
|
|
10553
10504
|
*/
|
|
10554
10505
|
static listOrganizationThreads(parameters, options) {
|
|
10555
10506
|
const params = buildClientParams([parameters], [{ args: [
|
|
@@ -10624,7 +10575,7 @@ var Mailboxes = class {
|
|
|
10624
10575
|
/**
|
|
10625
10576
|
* List threads in a mailbox
|
|
10626
10577
|
*
|
|
10627
|
-
* Returns thread summaries
|
|
10578
|
+
* Returns thread summaries. With `q`, semantic and keyword search returns up to 100 best-matching threads in relevance order across cursor pages. It searches subjects, participants, message text including quoted history, and attachment filenames, not attachment contents. New mail can take a few seconds to become searchable. Other filters narrow the searchable set. Without `q`, threads use most recent activity first; `after` and `before` filter by last activity for polling. Pass `nextCursor` back as `cursor` for the next page; it is null on the last page. In a list without `q`, a thread that gains activity while you page moves ahead of the cursor, so a walk lists each thread at most once.
|
|
10628
10579
|
*/
|
|
10629
10580
|
static listThreads(parameters, options) {
|
|
10630
10581
|
const params = buildClientParams([parameters], [{ args: [
|
|
@@ -11098,48 +11049,11 @@ var Mailboxes = class {
|
|
|
11098
11049
|
* 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.
|
|
11099
11050
|
*/
|
|
11100
11051
|
static sendMessage(parameters, options) {
|
|
11101
|
-
const params = buildClientParams([parameters], [{ args: [
|
|
11102
|
-
|
|
11103
|
-
|
|
11104
|
-
|
|
11105
|
-
|
|
11106
|
-
{
|
|
11107
|
-
in: "body",
|
|
11108
|
-
key: "channel"
|
|
11109
|
-
},
|
|
11110
|
-
{
|
|
11111
|
-
in: "body",
|
|
11112
|
-
key: "to"
|
|
11113
|
-
},
|
|
11114
|
-
{
|
|
11115
|
-
in: "body",
|
|
11116
|
-
key: "cc"
|
|
11117
|
-
},
|
|
11118
|
-
{
|
|
11119
|
-
in: "body",
|
|
11120
|
-
key: "bcc"
|
|
11121
|
-
},
|
|
11122
|
-
{
|
|
11123
|
-
in: "body",
|
|
11124
|
-
key: "replyTo"
|
|
11125
|
-
},
|
|
11126
|
-
{
|
|
11127
|
-
in: "body",
|
|
11128
|
-
key: "subject"
|
|
11129
|
-
},
|
|
11130
|
-
{
|
|
11131
|
-
in: "body",
|
|
11132
|
-
key: "text"
|
|
11133
|
-
},
|
|
11134
|
-
{
|
|
11135
|
-
in: "body",
|
|
11136
|
-
key: "html"
|
|
11137
|
-
},
|
|
11138
|
-
{
|
|
11139
|
-
in: "body",
|
|
11140
|
-
key: "attachments"
|
|
11141
|
-
}
|
|
11142
|
-
] }]);
|
|
11052
|
+
const params = buildClientParams([parameters], [{ args: [{
|
|
11053
|
+
in: "path",
|
|
11054
|
+
key: "id"
|
|
11055
|
+
}] }]);
|
|
11056
|
+
params.body = Object.fromEntries(Object.entries(parameters).filter(([key]) => !["id"].includes(key)));
|
|
11143
11057
|
return requestWithPolicy(options?.client ?? client, "mailboxesSendMessage", options, (headers) => (options?.client ?? client).post({
|
|
11144
11058
|
security: [{
|
|
11145
11059
|
name: "x-api-key",
|
|
@@ -11148,7 +11062,6 @@ var Mailboxes = class {
|
|
|
11148
11062
|
url: "/v1/mailboxes/{id}/messages",
|
|
11149
11063
|
...options,
|
|
11150
11064
|
...params,
|
|
11151
|
-
body: params.body ?? {},
|
|
11152
11065
|
headers: {
|
|
11153
11066
|
"Content-Type": "application/json",
|
|
11154
11067
|
...options?.headers,
|
|
@@ -11276,40 +11189,14 @@ var Mailboxes = class {
|
|
|
11276
11189
|
* 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.
|
|
11277
11190
|
*/
|
|
11278
11191
|
static reply(parameters, options) {
|
|
11279
|
-
const params = buildClientParams([parameters], [{ args: [
|
|
11280
|
-
|
|
11281
|
-
|
|
11282
|
-
|
|
11283
|
-
|
|
11284
|
-
|
|
11285
|
-
|
|
11286
|
-
|
|
11287
|
-
},
|
|
11288
|
-
{
|
|
11289
|
-
in: "body",
|
|
11290
|
-
key: "channel"
|
|
11291
|
-
},
|
|
11292
|
-
{
|
|
11293
|
-
in: "body",
|
|
11294
|
-
key: "cc"
|
|
11295
|
-
},
|
|
11296
|
-
{
|
|
11297
|
-
in: "body",
|
|
11298
|
-
key: "bcc"
|
|
11299
|
-
},
|
|
11300
|
-
{
|
|
11301
|
-
in: "body",
|
|
11302
|
-
key: "text"
|
|
11303
|
-
},
|
|
11304
|
-
{
|
|
11305
|
-
in: "body",
|
|
11306
|
-
key: "html"
|
|
11307
|
-
},
|
|
11308
|
-
{
|
|
11309
|
-
in: "body",
|
|
11310
|
-
key: "attachments"
|
|
11311
|
-
}
|
|
11312
|
-
] }]);
|
|
11192
|
+
const params = buildClientParams([parameters], [{ args: [{
|
|
11193
|
+
in: "path",
|
|
11194
|
+
key: "id"
|
|
11195
|
+
}, {
|
|
11196
|
+
in: "path",
|
|
11197
|
+
key: "messageId"
|
|
11198
|
+
}] }]);
|
|
11199
|
+
params.body = Object.fromEntries(Object.entries(parameters).filter(([key]) => !["id", "messageId"].includes(key)));
|
|
11313
11200
|
return requestWithPolicy(options?.client ?? client, "mailboxesReply", options, (headers) => (options?.client ?? client).post({
|
|
11314
11201
|
security: [{
|
|
11315
11202
|
name: "x-api-key",
|
|
@@ -11318,7 +11205,6 @@ var Mailboxes = class {
|
|
|
11318
11205
|
url: "/v1/mailboxes/{id}/messages/{messageId}/reply",
|
|
11319
11206
|
...options,
|
|
11320
11207
|
...params,
|
|
11321
|
-
body: params.body ?? {},
|
|
11322
11208
|
headers: {
|
|
11323
11209
|
"Content-Type": "application/json",
|
|
11324
11210
|
...options?.headers,
|
|
@@ -11336,40 +11222,14 @@ var Mailboxes = class {
|
|
|
11336
11222
|
* 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.
|
|
11337
11223
|
*/
|
|
11338
11224
|
static replyAll(parameters, options) {
|
|
11339
|
-
const params = buildClientParams([parameters], [{ args: [
|
|
11340
|
-
|
|
11341
|
-
|
|
11342
|
-
|
|
11343
|
-
|
|
11344
|
-
|
|
11345
|
-
|
|
11346
|
-
|
|
11347
|
-
},
|
|
11348
|
-
{
|
|
11349
|
-
in: "body",
|
|
11350
|
-
key: "channel"
|
|
11351
|
-
},
|
|
11352
|
-
{
|
|
11353
|
-
in: "body",
|
|
11354
|
-
key: "cc"
|
|
11355
|
-
},
|
|
11356
|
-
{
|
|
11357
|
-
in: "body",
|
|
11358
|
-
key: "bcc"
|
|
11359
|
-
},
|
|
11360
|
-
{
|
|
11361
|
-
in: "body",
|
|
11362
|
-
key: "text"
|
|
11363
|
-
},
|
|
11364
|
-
{
|
|
11365
|
-
in: "body",
|
|
11366
|
-
key: "html"
|
|
11367
|
-
},
|
|
11368
|
-
{
|
|
11369
|
-
in: "body",
|
|
11370
|
-
key: "attachments"
|
|
11371
|
-
}
|
|
11372
|
-
] }]);
|
|
11225
|
+
const params = buildClientParams([parameters], [{ args: [{
|
|
11226
|
+
in: "path",
|
|
11227
|
+
key: "id"
|
|
11228
|
+
}, {
|
|
11229
|
+
in: "path",
|
|
11230
|
+
key: "messageId"
|
|
11231
|
+
}] }]);
|
|
11232
|
+
params.body = Object.fromEntries(Object.entries(parameters).filter(([key]) => !["id", "messageId"].includes(key)));
|
|
11373
11233
|
return requestWithPolicy(options?.client ?? client, "mailboxesReplyAll", options, (headers) => (options?.client ?? client).post({
|
|
11374
11234
|
security: [{
|
|
11375
11235
|
name: "x-api-key",
|
|
@@ -11378,7 +11238,6 @@ var Mailboxes = class {
|
|
|
11378
11238
|
url: "/v1/mailboxes/{id}/messages/{messageId}/reply-all",
|
|
11379
11239
|
...options,
|
|
11380
11240
|
...params,
|
|
11381
|
-
body: params.body ?? {},
|
|
11382
11241
|
headers: {
|
|
11383
11242
|
"Content-Type": "application/json",
|
|
11384
11243
|
...options?.headers,
|
|
@@ -11578,56 +11437,11 @@ var Mailboxes = class {
|
|
|
11578
11437
|
* 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`.
|
|
11579
11438
|
*/
|
|
11580
11439
|
static createDraft(parameters, options) {
|
|
11581
|
-
const params = buildClientParams([parameters], [{ args: [
|
|
11582
|
-
|
|
11583
|
-
|
|
11584
|
-
|
|
11585
|
-
|
|
11586
|
-
{
|
|
11587
|
-
in: "body",
|
|
11588
|
-
key: "channel"
|
|
11589
|
-
},
|
|
11590
|
-
{
|
|
11591
|
-
in: "body",
|
|
11592
|
-
key: "endpointId"
|
|
11593
|
-
},
|
|
11594
|
-
{
|
|
11595
|
-
in: "body",
|
|
11596
|
-
key: "to"
|
|
11597
|
-
},
|
|
11598
|
-
{
|
|
11599
|
-
in: "body",
|
|
11600
|
-
key: "cc"
|
|
11601
|
-
},
|
|
11602
|
-
{
|
|
11603
|
-
in: "body",
|
|
11604
|
-
key: "bcc"
|
|
11605
|
-
},
|
|
11606
|
-
{
|
|
11607
|
-
in: "body",
|
|
11608
|
-
key: "replyTo"
|
|
11609
|
-
},
|
|
11610
|
-
{
|
|
11611
|
-
in: "body",
|
|
11612
|
-
key: "subject"
|
|
11613
|
-
},
|
|
11614
|
-
{
|
|
11615
|
-
in: "body",
|
|
11616
|
-
key: "text"
|
|
11617
|
-
},
|
|
11618
|
-
{
|
|
11619
|
-
in: "body",
|
|
11620
|
-
key: "html"
|
|
11621
|
-
},
|
|
11622
|
-
{
|
|
11623
|
-
in: "body",
|
|
11624
|
-
key: "attachments"
|
|
11625
|
-
},
|
|
11626
|
-
{
|
|
11627
|
-
in: "body",
|
|
11628
|
-
key: "inReplyToMessageId"
|
|
11629
|
-
}
|
|
11630
|
-
] }]);
|
|
11440
|
+
const params = buildClientParams([parameters], [{ args: [{
|
|
11441
|
+
in: "path",
|
|
11442
|
+
key: "id"
|
|
11443
|
+
}] }]);
|
|
11444
|
+
params.body = Object.fromEntries(Object.entries(parameters).filter(([key]) => !["id"].includes(key)));
|
|
11631
11445
|
return requestWithPolicy(options?.client ?? client, "mailboxesCreateDraft", options, (headers) => (options?.client ?? client).post({
|
|
11632
11446
|
security: [{
|
|
11633
11447
|
name: "x-api-key",
|
|
@@ -11636,7 +11450,6 @@ var Mailboxes = class {
|
|
|
11636
11450
|
url: "/v1/mailboxes/{id}/drafts",
|
|
11637
11451
|
...options,
|
|
11638
11452
|
...params,
|
|
11639
|
-
body: params.body ?? {},
|
|
11640
11453
|
headers: {
|
|
11641
11454
|
"Content-Type": "application/json",
|
|
11642
11455
|
...options?.headers,
|
|
@@ -11791,7 +11604,7 @@ var Mailboxes = class {
|
|
|
11791
11604
|
/**
|
|
11792
11605
|
* List mailbox actions
|
|
11793
11606
|
*
|
|
11794
|
-
* Returns the actions proposed on a mailbox, newest first, filterable by `threadId`, `state` (`approvalRequired` lists the
|
|
11607
|
+
* Returns the actions proposed on a mailbox, newest first, filterable by `threadId`, `state` (`approvalRequired` lists the actions waiting for a person), and creation time (`after`, `before`). Filters apply together within the mailbox. Pass `nextCursor` back as `cursor` for the next page; it is null on the last page.
|
|
11795
11608
|
*/
|
|
11796
11609
|
static listActions(parameters, options) {
|
|
11797
11610
|
const params = buildClientParams([parameters], [{ args: [
|
|
@@ -11910,16 +11723,31 @@ var Mailboxes = class {
|
|
|
11910
11723
|
/**
|
|
11911
11724
|
* Approve a mailbox action
|
|
11912
11725
|
*
|
|
11913
|
-
* Records approval of a send and returns 202 while it is pending. A send is queued for automatic retry within 15 minutes of approval; repeating approval does not extend this deadline. Accepted, completed, and notSent replays return 200. No expiry applies before approval. Only a person signed in or through OAuth may approve, and never the proposer. Non-send approvals execute synchronously and return 200 with their own execution states. The action's `resolution` names the approver; approving a held send publishes one `mailbox.action.resolved` event.
|
|
11726
|
+
* Records approval of a send and returns 202 while it is pending. A send is queued for automatic retry within 15 minutes of approval; repeating approval does not extend this deadline. Accepted, completed, and notSent replays return 200. No expiry applies before approval. Only a person signed in or through OAuth may approve, and never the proposer. Non-send approvals execute synchronously and return 200 with their own execution states. Set `always: true` to add an actor-specific rule allowing matching future actions, subject to policy floors and guards. Remembering an allowance for a hosted agent or API key requires an organization owner or admin. A hand-off cannot be always allowed. The action's `resolution` names the approver; approving a held send publishes one `mailbox.action.resolved` event.
|
|
11914
11727
|
*/
|
|
11915
11728
|
static approveAction(parameters, options) {
|
|
11916
|
-
const params = buildClientParams([parameters], [{ args: [
|
|
11917
|
-
|
|
11918
|
-
|
|
11919
|
-
|
|
11920
|
-
|
|
11921
|
-
|
|
11922
|
-
|
|
11729
|
+
const params = buildClientParams([parameters], [{ args: [
|
|
11730
|
+
{
|
|
11731
|
+
in: "path",
|
|
11732
|
+
key: "id"
|
|
11733
|
+
},
|
|
11734
|
+
{
|
|
11735
|
+
in: "path",
|
|
11736
|
+
key: "actionId"
|
|
11737
|
+
},
|
|
11738
|
+
{
|
|
11739
|
+
in: "body",
|
|
11740
|
+
key: "reviewRound"
|
|
11741
|
+
},
|
|
11742
|
+
{
|
|
11743
|
+
in: "body",
|
|
11744
|
+
key: "always"
|
|
11745
|
+
},
|
|
11746
|
+
{
|
|
11747
|
+
in: "body",
|
|
11748
|
+
key: "edits"
|
|
11749
|
+
}
|
|
11750
|
+
] }]);
|
|
11923
11751
|
return requestWithPolicy(options?.client ?? client, "mailboxesApproveAction", options, (headers) => (options?.client ?? client).post({
|
|
11924
11752
|
security: [{
|
|
11925
11753
|
name: "x-api-key",
|
|
@@ -11928,7 +11756,16 @@ var Mailboxes = class {
|
|
|
11928
11756
|
url: "/v1/mailboxes/{id}/actions/{actionId}/approve",
|
|
11929
11757
|
...options,
|
|
11930
11758
|
...params,
|
|
11931
|
-
|
|
11759
|
+
body: params.body ?? {},
|
|
11760
|
+
headers: {
|
|
11761
|
+
"Content-Type": "application/json",
|
|
11762
|
+
...options?.headers,
|
|
11763
|
+
...params.headers
|
|
11764
|
+
},
|
|
11765
|
+
headers: {
|
|
11766
|
+
"Content-Type": "application/json",
|
|
11767
|
+
...headers
|
|
11768
|
+
}
|
|
11932
11769
|
}));
|
|
11933
11770
|
}
|
|
11934
11771
|
/**
|
|
@@ -11946,6 +11783,10 @@ var Mailboxes = class {
|
|
|
11946
11783
|
in: "path",
|
|
11947
11784
|
key: "actionId"
|
|
11948
11785
|
},
|
|
11786
|
+
{
|
|
11787
|
+
in: "body",
|
|
11788
|
+
key: "reviewRound"
|
|
11789
|
+
},
|
|
11949
11790
|
{
|
|
11950
11791
|
in: "body",
|
|
11951
11792
|
key: "reason"
|
|
@@ -12011,6 +11852,115 @@ var Mailboxes = class {
|
|
|
12011
11852
|
}));
|
|
12012
11853
|
}
|
|
12013
11854
|
};
|
|
11855
|
+
var Policies = class {
|
|
11856
|
+
/**
|
|
11857
|
+
* Clear decision rules
|
|
11858
|
+
*
|
|
11859
|
+
* Clears this scope's rules and instructions only when ifVersion matches, and returns the next version. The stored version is retained. Other scopes and subject defaults continue to apply.
|
|
11860
|
+
*/
|
|
11861
|
+
static deletePolicy(parameters, options) {
|
|
11862
|
+
const params = buildClientParams([parameters], [{ args: [
|
|
11863
|
+
{
|
|
11864
|
+
in: "path",
|
|
11865
|
+
key: "kind"
|
|
11866
|
+
},
|
|
11867
|
+
{
|
|
11868
|
+
in: "path",
|
|
11869
|
+
key: "id"
|
|
11870
|
+
},
|
|
11871
|
+
{
|
|
11872
|
+
in: "query",
|
|
11873
|
+
key: "ifVersion"
|
|
11874
|
+
}
|
|
11875
|
+
] }]);
|
|
11876
|
+
return requestWithPolicy(options?.client ?? client, "policiesDeletePolicy", options, (headers) => (options?.client ?? client).delete({
|
|
11877
|
+
security: [{
|
|
11878
|
+
name: "x-api-key",
|
|
11879
|
+
type: "apiKey"
|
|
11880
|
+
}],
|
|
11881
|
+
url: "/v1/policies/{kind}/{id}",
|
|
11882
|
+
...options,
|
|
11883
|
+
...params,
|
|
11884
|
+
headers
|
|
11885
|
+
}));
|
|
11886
|
+
}
|
|
11887
|
+
/**
|
|
11888
|
+
* Get decision rules
|
|
11889
|
+
*
|
|
11890
|
+
* Returns the rules and instructions for an organization, mailbox, API key, or agent in the current organization. An agent scope holds the rules added by approving its actions with `always`; they apply on top of the agent's published rules. An unset policy has version 0 and no rules or presets.
|
|
11891
|
+
*/
|
|
11892
|
+
static getPolicy(parameters, options) {
|
|
11893
|
+
const params = buildClientParams([parameters], [{ args: [{
|
|
11894
|
+
in: "path",
|
|
11895
|
+
key: "kind"
|
|
11896
|
+
}, {
|
|
11897
|
+
in: "path",
|
|
11898
|
+
key: "id"
|
|
11899
|
+
}] }]);
|
|
11900
|
+
return requestWithPolicy(options?.client ?? client, "policiesGetPolicy", options, (headers) => (options?.client ?? client).get({
|
|
11901
|
+
security: [{
|
|
11902
|
+
name: "x-api-key",
|
|
11903
|
+
type: "apiKey"
|
|
11904
|
+
}],
|
|
11905
|
+
url: "/v1/policies/{kind}/{id}",
|
|
11906
|
+
...options,
|
|
11907
|
+
...params,
|
|
11908
|
+
headers
|
|
11909
|
+
}));
|
|
11910
|
+
}
|
|
11911
|
+
/**
|
|
11912
|
+
* Set decision rules
|
|
11913
|
+
*
|
|
11914
|
+
* Replaces this scope's rules and instructions only when ifVersion matches its current version. A stale version returns a conflict. More specific scopes replace defaults; atLeast floors remain binding. Identical rule matches in one scope are rejected.
|
|
11915
|
+
*/
|
|
11916
|
+
static setPolicy(parameters, options) {
|
|
11917
|
+
const params = buildClientParams([parameters], [{ args: [
|
|
11918
|
+
{
|
|
11919
|
+
in: "path",
|
|
11920
|
+
key: "kind"
|
|
11921
|
+
},
|
|
11922
|
+
{
|
|
11923
|
+
in: "path",
|
|
11924
|
+
key: "id"
|
|
11925
|
+
},
|
|
11926
|
+
{
|
|
11927
|
+
in: "body",
|
|
11928
|
+
key: "presets"
|
|
11929
|
+
},
|
|
11930
|
+
{
|
|
11931
|
+
in: "body",
|
|
11932
|
+
key: "rules"
|
|
11933
|
+
},
|
|
11934
|
+
{
|
|
11935
|
+
in: "body",
|
|
11936
|
+
key: "instructions"
|
|
11937
|
+
},
|
|
11938
|
+
{
|
|
11939
|
+
in: "body",
|
|
11940
|
+
key: "ifVersion"
|
|
11941
|
+
}
|
|
11942
|
+
] }]);
|
|
11943
|
+
return requestWithPolicy(options?.client ?? client, "policiesSetPolicy", options, (headers) => (options?.client ?? client).put({
|
|
11944
|
+
security: [{
|
|
11945
|
+
name: "x-api-key",
|
|
11946
|
+
type: "apiKey"
|
|
11947
|
+
}],
|
|
11948
|
+
url: "/v1/policies/{kind}/{id}",
|
|
11949
|
+
...options,
|
|
11950
|
+
...params,
|
|
11951
|
+
body: params.body ?? {},
|
|
11952
|
+
headers: {
|
|
11953
|
+
"Content-Type": "application/json",
|
|
11954
|
+
...options?.headers,
|
|
11955
|
+
...params.headers
|
|
11956
|
+
},
|
|
11957
|
+
headers: {
|
|
11958
|
+
"Content-Type": "application/json",
|
|
11959
|
+
...headers
|
|
11960
|
+
}
|
|
11961
|
+
}));
|
|
11962
|
+
}
|
|
11963
|
+
};
|
|
12014
11964
|
var Namespaces = class {
|
|
12015
11965
|
/**
|
|
12016
11966
|
* List namespaces
|
|
@@ -12083,7 +12033,7 @@ var Namespaces = class {
|
|
|
12083
12033
|
/**
|
|
12084
12034
|
* Delete a namespace
|
|
12085
12035
|
*
|
|
12086
|
-
* Deletes an empty namespace. A namespace that still holds anything conflicts, and the error
|
|
12036
|
+
* Deletes an empty namespace. A namespace that still holds anything conflicts, and the error names and counts each resource kind that remains. 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.
|
|
12087
12037
|
*/
|
|
12088
12038
|
static remove(parameters, options) {
|
|
12089
12039
|
const params = buildClientParams([parameters], [{ args: [{
|
|
@@ -12450,7 +12400,7 @@ var ExtensionInstallations = class {
|
|
|
12450
12400
|
/**
|
|
12451
12401
|
* Install an extension
|
|
12452
12402
|
*
|
|
12453
|
-
* Installs a published version with a scope, permissions, and
|
|
12403
|
+
* Installs a published version with a scope, permissions, and an action policy, and returns it with status 201. The installation acts on your grants narrowed to these; a webhook installation's API key and webhook secret are returned once. Only a person can install, not an API key.
|
|
12454
12404
|
*/
|
|
12455
12405
|
static install(parameters, options) {
|
|
12456
12406
|
const params = buildClientParams([parameters], [{ args: [
|
|
@@ -12476,7 +12426,7 @@ var ExtensionInstallations = class {
|
|
|
12476
12426
|
},
|
|
12477
12427
|
{
|
|
12478
12428
|
in: "body",
|
|
12479
|
-
key: "
|
|
12429
|
+
key: "policy"
|
|
12480
12430
|
},
|
|
12481
12431
|
{
|
|
12482
12432
|
in: "body",
|
|
@@ -12527,7 +12477,7 @@ var ExtensionInstallations = class {
|
|
|
12527
12477
|
/**
|
|
12528
12478
|
* Get an installation
|
|
12529
12479
|
*
|
|
12530
|
-
* Returns one installation with its permissions, scope,
|
|
12480
|
+
* Returns one installation with its permissions, scope, action policy, and webhook endpoint.
|
|
12531
12481
|
*/
|
|
12532
12482
|
static get(parameters, options) {
|
|
12533
12483
|
const params = buildClientParams([parameters], [{ args: [{
|
|
@@ -12548,7 +12498,7 @@ var ExtensionInstallations = class {
|
|
|
12548
12498
|
/**
|
|
12549
12499
|
* Upgrade or roll back an installation
|
|
12550
12500
|
*
|
|
12551
|
-
* Changes the pinned version in place. Omit version for the latest publication, or name a version string or id, including an older version to roll back. Preview with dryRun; changing requires acceptPermissions to list exactly the added permission: and event: grants. Only a person can upgrade. Credentials, owner, scope,
|
|
12501
|
+
* Changes the pinned version in place. Omit version for the latest publication, or name a version string or id, including an older version to roll back. Preview with dryRun; changing requires acceptPermissions to list exactly the added permission: and event: grants. Only a person can upgrade. Credentials, owner, scope, policy, and status stay attached to the installation.
|
|
12552
12502
|
*/
|
|
12553
12503
|
static upgrade(parameters, options) {
|
|
12554
12504
|
const params = buildClientParams([parameters], [{ args: [
|
|
@@ -12833,13 +12783,16 @@ Object.assign(Journeys.getVersion, { operation: "journeysGetVersion" });
|
|
|
12833
12783
|
Object.assign(Journeys.stats, { operation: "journeysStats" });
|
|
12834
12784
|
Object.assign(Journeys.listRuns, { operation: "journeysListRuns" });
|
|
12835
12785
|
Object.assign(Journeys.getRun, { operation: "journeysGetRun" });
|
|
12786
|
+
Object.assign(Agents.rerunTests, { operation: "agentsRerunTests" });
|
|
12836
12787
|
Object.assign(Agents.list, { operation: "agentsList" });
|
|
12837
12788
|
Object.assign(Agents.create, { operation: "agentsCreate" });
|
|
12789
|
+
Object.assign(Agents.listModels, { operation: "agentsListModels" });
|
|
12838
12790
|
Object.assign(Agents.remove, { operation: "agentsRemove" });
|
|
12839
12791
|
Object.assign(Agents.get, { operation: "agentsGet" });
|
|
12840
12792
|
Object.assign(Agents.update, { operation: "agentsUpdate" });
|
|
12841
12793
|
Object.assign(Agents.replaceDraft, { operation: "agentsReplaceDraft" });
|
|
12842
12794
|
Object.assign(Agents.publish, { operation: "agentsPublish" });
|
|
12795
|
+
Object.assign(Agents.continueOnStandard, { operation: "agentsContinueOnStandard" });
|
|
12843
12796
|
Object.assign(Agents.listVersions, { operation: "agentsListVersions" });
|
|
12844
12797
|
Object.assign(Agents.getVersion, { operation: "agentsGetVersion" });
|
|
12845
12798
|
Object.assign(Subscriptions.subscribe, { operation: "subscriptionsSubscribe" });
|
|
@@ -12907,11 +12860,12 @@ Object.assign(Templates.renameFamily, { operation: "templatesRenameFamily" });
|
|
|
12907
12860
|
Object.assign(Templates.createFamilyFromTemplate, { operation: "templatesCreateFamilyFromTemplate" });
|
|
12908
12861
|
Object.assign(Templates.detachFamilyMember, { operation: "templatesDetachFamilyMember" });
|
|
12909
12862
|
Object.assign(Templates.attachFamilyMember, { operation: "templatesAttachFamilyMember" });
|
|
12910
|
-
Object.assign(Templates.
|
|
12863
|
+
Object.assign(Templates.delete, { operation: "templatesDelete" });
|
|
12911
12864
|
Object.assign(Templates.getById, { operation: "templatesGetById" });
|
|
12912
12865
|
Object.assign(Templates.update, { operation: "templatesUpdate" });
|
|
12913
12866
|
Object.assign(Templates.createFromWebsite, { operation: "templatesCreateFromWebsite" });
|
|
12914
12867
|
Object.assign(Templates.addEntry, { operation: "templatesAddEntry" });
|
|
12868
|
+
Object.assign(Templates.deleteProject, { operation: "templatesDeleteProject" });
|
|
12915
12869
|
Object.assign(Templates.patchWorkspace, { operation: "templatesPatchWorkspace" });
|
|
12916
12870
|
Object.assign(Templates.openWorkspace, { operation: "templatesOpenWorkspace" });
|
|
12917
12871
|
Object.assign(Templates.diffWorkspace, { operation: "templatesDiffWorkspace" });
|
|
@@ -12984,11 +12938,6 @@ Object.assign(Mailboxes.listGrants, { operation: "mailboxesListGrants" });
|
|
|
12984
12938
|
Object.assign(Mailboxes.createGrant, { operation: "mailboxesCreateGrant" });
|
|
12985
12939
|
Object.assign(Mailboxes.revokeGrant, { operation: "mailboxesRevokeGrant" });
|
|
12986
12940
|
Object.assign(Mailboxes.updateGrant, { operation: "mailboxesUpdateGrant" });
|
|
12987
|
-
Object.assign(Mailboxes.listPolicies, { operation: "mailboxesListPolicies" });
|
|
12988
|
-
Object.assign(Mailboxes.createPolicy, { operation: "mailboxesCreatePolicy" });
|
|
12989
|
-
Object.assign(Mailboxes.deletePolicy, { operation: "mailboxesDeletePolicy" });
|
|
12990
|
-
Object.assign(Mailboxes.getPolicy, { operation: "mailboxesGetPolicy" });
|
|
12991
|
-
Object.assign(Mailboxes.updatePolicy, { operation: "mailboxesUpdatePolicy" });
|
|
12992
12941
|
Object.assign(Mailboxes.listFolders, { operation: "mailboxesListFolders" });
|
|
12993
12942
|
Object.assign(Mailboxes.listLabels, { operation: "mailboxesListLabels" });
|
|
12994
12943
|
Object.assign(Mailboxes.createLabel, { operation: "mailboxesCreateLabel" });
|
|
@@ -13032,6 +12981,9 @@ Object.assign(Mailboxes.retryAction, { operation: "mailboxesRetryAction" });
|
|
|
13032
12981
|
Object.assign(Mailboxes.approveAction, { operation: "mailboxesApproveAction" });
|
|
13033
12982
|
Object.assign(Mailboxes.denyAction, { operation: "mailboxesDenyAction" });
|
|
13034
12983
|
Object.assign(Mailboxes.listEvents, { operation: "mailboxesListEvents" });
|
|
12984
|
+
Object.assign(Policies.deletePolicy, { operation: "policiesDeletePolicy" });
|
|
12985
|
+
Object.assign(Policies.getPolicy, { operation: "policiesGetPolicy" });
|
|
12986
|
+
Object.assign(Policies.setPolicy, { operation: "policiesSetPolicy" });
|
|
13035
12987
|
Object.assign(Namespaces.list, { operation: "namespacesList" });
|
|
13036
12988
|
Object.assign(Namespaces.create, { operation: "namespacesCreate" });
|
|
13037
12989
|
Object.assign(Namespaces.remove, { operation: "namespacesRemove" });
|
|
@@ -13054,6 +13006,6 @@ Object.assign(ExtensionInstallations.disable, { operation: "extensionInstallatio
|
|
|
13054
13006
|
Object.assign(ExtensionInstallations.enable, { operation: "extensionInstallationsEnable" });
|
|
13055
13007
|
Object.assign(ExtensionInstallations.listRuns, { operation: "extensionInstallationsListRuns" });
|
|
13056
13008
|
Object.assign(ExtensionInstallations.getRun, { operation: "extensionInstallationsGetRun" });
|
|
13057
|
-
export { Agents, Analytics, ApiKeys, Attachments, Brands, Campaigns, ContactEvents, ContactGroups, Contacts, Conversations, CustomFields, Domains, Email, Events, ExtensionInstallations, Extensions, Feedback, Issues, Journeys, Mailboxes, Media, Messages, Namespaces, Newsletters, Operations, Organizations, ScheduledMessages, Subscriptions, Templates, TopicForms, Topics, Webhooks, Whoami };
|
|
13009
|
+
export { Agents, Analytics, ApiKeys, Attachments, Brands, Campaigns, ContactEvents, ContactGroups, Contacts, Conversations, CustomFields, Domains, Email, Events, ExtensionInstallations, Extensions, Feedback, Issues, Journeys, Mailboxes, Media, Messages, Namespaces, Newsletters, Operations, Organizations, Policies, ScheduledMessages, Subscriptions, Templates, TopicForms, Topics, Webhooks, Whoami };
|
|
13058
13010
|
|
|
13059
13011
|
//# sourceMappingURL=sdk.gen.js.map
|