samva 0.35.0 → 0.37.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 +1 -0
- package/dist/client/sdk.gen.d.ts +102 -82
- package/dist/client/sdk.gen.js +322 -244
- package/dist/client/types.gen.d.ts +600 -378
- package/dist/effect/agents.d.ts +194 -4
- package/dist/effect/agents.js +3 -1
- package/dist/effect/analytics.d.ts +6 -0
- package/dist/effect/api-keys.d.ts +3 -6
- package/dist/effect/campaigns.d.ts +216 -216
- package/dist/effect/conversations.d.ts +6 -0
- package/dist/effect/errors.d.ts +1 -1
- package/dist/effect/errors.js +2 -2
- package/dist/effect/extension-installations.d.ts +53 -1
- package/dist/effect/generated/agents.d.ts +1803 -81
- package/dist/effect/generated/agents.js +92 -26
- package/dist/effect/generated/analytics.d.ts +19 -1
- package/dist/effect/generated/analytics.js +8 -2
- package/dist/effect/generated/api-keys.d.ts +4 -29
- package/dist/effect/generated/api-keys.js +5 -6
- package/dist/effect/generated/campaigns.d.ts +22 -0
- package/dist/effect/generated/campaigns.js +3 -1
- package/dist/effect/generated/conversations.d.ts +104 -3
- package/dist/effect/generated/conversations.js +12 -2
- package/dist/effect/generated/extension-installations.d.ts +845 -68
- package/dist/effect/generated/extension-installations.js +22 -26
- package/dist/effect/generated/index.d.ts +3 -1
- package/dist/effect/generated/mailboxes.d.ts +3423 -1446
- package/dist/effect/generated/mailboxes.js +226 -220
- package/dist/effect/generated/namespaces.d.ts +7 -31
- package/dist/effect/generated/namespaces.js +4 -4
- 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 +45 -4
- package/dist/effect/generated/scheduled-messages.js +8 -3
- package/dist/effect/generated/shared.d.ts +893 -224
- package/dist/effect/generated/shared.js +194 -60
- package/dist/effect/generated/templates.d.ts +474 -668
- package/dist/effect/generated/templates.js +65 -45
- package/dist/effect/generated/webhooks.d.ts +22 -19
- package/dist/effect/generated/webhooks.js +10 -1
- package/dist/effect/generated/whoami.d.ts +0 -4
- package/dist/effect/generated-metadata.d.ts +36 -32
- package/dist/effect/generated-metadata.js +127 -105
- package/dist/effect/index.d.ts +1 -0
- package/dist/effect/index.js +3 -2
- package/dist/effect/internal/operation.js +5 -32
- package/dist/effect/journeys.d.ts +146 -146
- package/dist/effect/mailboxes.d.ts +575 -129
- package/dist/effect/mailboxes.js +1 -11
- package/dist/effect/policies.d.ts +65 -0
- package/dist/effect/policies.js +16 -0
- package/dist/effect/scheduled-messages.d.ts +6 -0
- package/dist/effect/templates.d.ts +6 -8
- package/dist/effect/templates.js +5 -3
- package/dist/effect/topics.d.ts +2 -2
- package/dist/effect/webhooks.d.ts +7 -4
- package/dist/index.js +2 -2
- package/dist/mailbox/test.js +11 -4
- package/dist/mailbox/types.d.ts +39 -3
- package/dist/package.js +1 -1
- package/dist/promises/client.d.ts +3 -1
- package/dist/promises/client.js +5 -3
- package/dist/promises/errors.gen.d.ts +18 -2
- package/dist/promises/errors.gen.js +335 -33
- package/dist/promises/index.js +2 -2
- package/dist/promises/types.gen.d.ts +1 -1
- package/dist/service-map.d.ts +30 -28
- package/dist/service-map.js +219 -786
- package/package.json +6 -2
package/dist/client/sdk.gen.js
CHANGED
|
@@ -415,6 +415,10 @@ var ScheduledMessages = class {
|
|
|
415
415
|
in: "query",
|
|
416
416
|
key: "cursor"
|
|
417
417
|
},
|
|
418
|
+
{
|
|
419
|
+
in: "query",
|
|
420
|
+
key: "namespaceId"
|
|
421
|
+
},
|
|
418
422
|
{
|
|
419
423
|
in: "query",
|
|
420
424
|
key: "status"
|
|
@@ -438,6 +442,10 @@ var ScheduledMessages = class {
|
|
|
438
442
|
*/
|
|
439
443
|
static create(parameters, options) {
|
|
440
444
|
const params = buildClientParams([parameters], [{ args: [
|
|
445
|
+
{
|
|
446
|
+
in: "body",
|
|
447
|
+
key: "namespaceId"
|
|
448
|
+
},
|
|
441
449
|
{
|
|
442
450
|
in: "body",
|
|
443
451
|
key: "send"
|
|
@@ -3225,6 +3233,10 @@ var Conversations = class {
|
|
|
3225
3233
|
in: "query",
|
|
3226
3234
|
key: "cursor"
|
|
3227
3235
|
},
|
|
3236
|
+
{
|
|
3237
|
+
in: "query",
|
|
3238
|
+
key: "namespaceId"
|
|
3239
|
+
},
|
|
3228
3240
|
{
|
|
3229
3241
|
in: "query",
|
|
3230
3242
|
key: "status"
|
|
@@ -3268,6 +3280,10 @@ var Conversations = class {
|
|
|
3268
3280
|
*/
|
|
3269
3281
|
static create(parameters, options) {
|
|
3270
3282
|
const params = buildClientParams([parameters], [{ args: [
|
|
3283
|
+
{
|
|
3284
|
+
in: "body",
|
|
3285
|
+
key: "namespaceId"
|
|
3286
|
+
},
|
|
3271
3287
|
{
|
|
3272
3288
|
in: "body",
|
|
3273
3289
|
key: "title"
|
|
@@ -5122,19 +5138,66 @@ var Journeys = class {
|
|
|
5122
5138
|
}
|
|
5123
5139
|
};
|
|
5124
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
|
+
}
|
|
5125
5181
|
/**
|
|
5126
5182
|
* List agents
|
|
5127
5183
|
*
|
|
5128
|
-
* 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.
|
|
5129
5185
|
*/
|
|
5130
5186
|
static list(parameters, options) {
|
|
5131
|
-
const params = buildClientParams([parameters], [{ args: [
|
|
5132
|
-
|
|
5133
|
-
|
|
5134
|
-
|
|
5135
|
-
|
|
5136
|
-
|
|
5137
|
-
|
|
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
|
+
] }]);
|
|
5138
5201
|
return requestWithPolicy(options?.client ?? client, "agentsList", options, (headers) => (options?.client ?? client).get({
|
|
5139
5202
|
security: [{
|
|
5140
5203
|
name: "x-api-key",
|
|
@@ -5149,7 +5212,7 @@ var Agents = class {
|
|
|
5149
5212
|
/**
|
|
5150
5213
|
* Create an agent
|
|
5151
5214
|
*
|
|
5152
|
-
* 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.
|
|
5153
5216
|
*/
|
|
5154
5217
|
static create(parameters, options) {
|
|
5155
5218
|
const params = buildClientParams([parameters], [{ args: [
|
|
@@ -5327,7 +5390,7 @@ var Agents = class {
|
|
|
5327
5390
|
/**
|
|
5328
5391
|
* Publish an agent
|
|
5329
5392
|
*
|
|
5330
|
-
* 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.
|
|
5331
5394
|
*/
|
|
5332
5395
|
static publish(parameters, options) {
|
|
5333
5396
|
const params = buildClientParams([parameters], [{ args: [{
|
|
@@ -7169,6 +7232,10 @@ var Analytics = class {
|
|
|
7169
7232
|
*/
|
|
7170
7233
|
static getStats(parameters, options) {
|
|
7171
7234
|
const params = buildClientParams([parameters], [{ args: [
|
|
7235
|
+
{
|
|
7236
|
+
in: "query",
|
|
7237
|
+
key: "namespaceId"
|
|
7238
|
+
},
|
|
7172
7239
|
{
|
|
7173
7240
|
in: "query",
|
|
7174
7241
|
key: "after"
|
|
@@ -7203,13 +7270,20 @@ var Analytics = class {
|
|
|
7203
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.
|
|
7204
7271
|
*/
|
|
7205
7272
|
static getChannelStats(parameters, options) {
|
|
7206
|
-
const params = buildClientParams([parameters], [{ args: [
|
|
7207
|
-
|
|
7208
|
-
|
|
7209
|
-
|
|
7210
|
-
|
|
7211
|
-
|
|
7212
|
-
|
|
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
|
+
] }]);
|
|
7213
7287
|
return requestWithPolicy(options?.client ?? client, "analyticsGetChannelStats", options, (headers) => (options?.client ?? client).get({
|
|
7214
7288
|
security: [{
|
|
7215
7289
|
name: "x-api-key",
|
|
@@ -7228,6 +7302,10 @@ var Analytics = class {
|
|
|
7228
7302
|
*/
|
|
7229
7303
|
static getTopContacts(parameters, options) {
|
|
7230
7304
|
const params = buildClientParams([parameters], [{ args: [
|
|
7305
|
+
{
|
|
7306
|
+
in: "query",
|
|
7307
|
+
key: "namespaceId"
|
|
7308
|
+
},
|
|
7231
7309
|
{
|
|
7232
7310
|
in: "query",
|
|
7233
7311
|
key: "after"
|
|
@@ -7262,13 +7340,20 @@ var Analytics = class {
|
|
|
7262
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.
|
|
7263
7341
|
*/
|
|
7264
7342
|
static getHourlyDistribution(parameters, options) {
|
|
7265
|
-
const params = buildClientParams([parameters], [{ args: [
|
|
7266
|
-
|
|
7267
|
-
|
|
7268
|
-
|
|
7269
|
-
|
|
7270
|
-
|
|
7271
|
-
|
|
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
|
+
] }]);
|
|
7272
7357
|
return requestWithPolicy(options?.client ?? client, "analyticsGetHourlyDistribution", options, (headers) => (options?.client ?? client).get({
|
|
7273
7358
|
security: [{
|
|
7274
7359
|
name: "x-api-key",
|
|
@@ -7287,6 +7372,10 @@ var Analytics = class {
|
|
|
7287
7372
|
*/
|
|
7288
7373
|
static getDeliveryMetrics(parameters, options) {
|
|
7289
7374
|
const params = buildClientParams([parameters], [{ args: [
|
|
7375
|
+
{
|
|
7376
|
+
in: "query",
|
|
7377
|
+
key: "namespaceId"
|
|
7378
|
+
},
|
|
7290
7379
|
{
|
|
7291
7380
|
in: "query",
|
|
7292
7381
|
key: "after"
|
|
@@ -7318,6 +7407,10 @@ var Analytics = class {
|
|
|
7318
7407
|
*/
|
|
7319
7408
|
static exportData(parameters, options) {
|
|
7320
7409
|
const params = buildClientParams([parameters], [{ args: [
|
|
7410
|
+
{
|
|
7411
|
+
in: "body",
|
|
7412
|
+
key: "namespaceId"
|
|
7413
|
+
},
|
|
7321
7414
|
{
|
|
7322
7415
|
in: "body",
|
|
7323
7416
|
key: "after"
|
|
@@ -7447,10 +7540,6 @@ var Templates = class {
|
|
|
7447
7540
|
in: "body",
|
|
7448
7541
|
key: "category"
|
|
7449
7542
|
},
|
|
7450
|
-
{
|
|
7451
|
-
in: "body",
|
|
7452
|
-
key: "isActive"
|
|
7453
|
-
},
|
|
7454
7543
|
{
|
|
7455
7544
|
in: "body",
|
|
7456
7545
|
key: "namespaceId"
|
|
@@ -7693,14 +7782,14 @@ var Templates = class {
|
|
|
7693
7782
|
/**
|
|
7694
7783
|
* Delete a template
|
|
7695
7784
|
*
|
|
7696
|
-
*
|
|
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.
|
|
7697
7786
|
*/
|
|
7698
|
-
static
|
|
7787
|
+
static delete(parameters, options) {
|
|
7699
7788
|
const params = buildClientParams([parameters], [{ args: [{
|
|
7700
7789
|
in: "path",
|
|
7701
7790
|
key: "id"
|
|
7702
7791
|
}] }]);
|
|
7703
|
-
return requestWithPolicy(options?.client ?? client, "
|
|
7792
|
+
return requestWithPolicy(options?.client ?? client, "templatesDelete", options, (headers) => (options?.client ?? client).delete({
|
|
7704
7793
|
security: [{
|
|
7705
7794
|
name: "x-api-key",
|
|
7706
7795
|
type: "apiKey"
|
|
@@ -7858,6 +7947,27 @@ var Templates = class {
|
|
|
7858
7947
|
}));
|
|
7859
7948
|
}
|
|
7860
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
|
+
/**
|
|
7861
7971
|
* Patch template project files
|
|
7862
7972
|
*
|
|
7863
7973
|
* Applies revision-checked file patches to the shared project workspace overlay.
|
|
@@ -8727,7 +8837,7 @@ var Webhooks = class {
|
|
|
8727
8837
|
/**
|
|
8728
8838
|
* List webhooks
|
|
8729
8839
|
*
|
|
8730
|
-
* 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.
|
|
8731
8841
|
*/
|
|
8732
8842
|
static list(parameters, options) {
|
|
8733
8843
|
const params = buildClientParams([parameters], [{ args: [
|
|
@@ -8739,6 +8849,10 @@ var Webhooks = class {
|
|
|
8739
8849
|
in: "query",
|
|
8740
8850
|
key: "cursor"
|
|
8741
8851
|
},
|
|
8852
|
+
{
|
|
8853
|
+
in: "query",
|
|
8854
|
+
key: "namespaceId"
|
|
8855
|
+
},
|
|
8742
8856
|
{
|
|
8743
8857
|
in: "query",
|
|
8744
8858
|
key: "search"
|
|
@@ -9370,7 +9484,7 @@ var ApiKeys = class {
|
|
|
9370
9484
|
/**
|
|
9371
9485
|
* List API keys
|
|
9372
9486
|
*
|
|
9373
|
-
* 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.
|
|
9374
9488
|
*/
|
|
9375
9489
|
static list(parameters, options) {
|
|
9376
9490
|
const params = buildClientParams([parameters], [{ args: [
|
|
@@ -9382,6 +9496,10 @@ var ApiKeys = class {
|
|
|
9382
9496
|
in: "query",
|
|
9383
9497
|
key: "cursor"
|
|
9384
9498
|
},
|
|
9499
|
+
{
|
|
9500
|
+
in: "query",
|
|
9501
|
+
key: "namespaceId"
|
|
9502
|
+
},
|
|
9385
9503
|
{
|
|
9386
9504
|
in: "query",
|
|
9387
9505
|
key: "status"
|
|
@@ -9485,10 +9603,6 @@ var ApiKeys = class {
|
|
|
9485
9603
|
{
|
|
9486
9604
|
in: "body",
|
|
9487
9605
|
key: "description"
|
|
9488
|
-
},
|
|
9489
|
-
{
|
|
9490
|
-
in: "body",
|
|
9491
|
-
key: "mailboxes"
|
|
9492
9606
|
}
|
|
9493
9607
|
] }]);
|
|
9494
9608
|
return requestWithPolicy(options?.client ?? client, "apiKeysUpdate", options, (headers) => (options?.client ?? client).patch({
|
|
@@ -9680,7 +9794,7 @@ var Mailboxes = class {
|
|
|
9680
9794
|
/**
|
|
9681
9795
|
* List mailboxes
|
|
9682
9796
|
*
|
|
9683
|
-
* 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}`.
|
|
9684
9798
|
*/
|
|
9685
9799
|
static list(parameters, options) {
|
|
9686
9800
|
const params = buildClientParams([parameters], [{ args: [
|
|
@@ -9699,6 +9813,10 @@ var Mailboxes = class {
|
|
|
9699
9813
|
{
|
|
9700
9814
|
in: "query",
|
|
9701
9815
|
key: "before"
|
|
9816
|
+
},
|
|
9817
|
+
{
|
|
9818
|
+
in: "query",
|
|
9819
|
+
key: "namespaceId"
|
|
9702
9820
|
}
|
|
9703
9821
|
] }]);
|
|
9704
9822
|
return requestWithPolicy(options?.client ?? client, "mailboxesList", options, (headers) => (options?.client ?? client).get({
|
|
@@ -9715,7 +9833,7 @@ var Mailboxes = class {
|
|
|
9715
9833
|
/**
|
|
9716
9834
|
* Create a mailbox
|
|
9717
9835
|
*
|
|
9718
|
-
* 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.
|
|
9719
9837
|
*/
|
|
9720
9838
|
static create(parameters, options) {
|
|
9721
9839
|
const params = buildClientParams([parameters], [{ args: [
|
|
@@ -9999,7 +10117,7 @@ var Mailboxes = class {
|
|
|
9999
10117
|
/**
|
|
10000
10118
|
* Get mailbox activity
|
|
10001
10119
|
*
|
|
10002
|
-
* 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`.
|
|
10003
10121
|
*/
|
|
10004
10122
|
static getAgentActivity(parameters, options) {
|
|
10005
10123
|
const params = buildClientParams([parameters], [{ args: [
|
|
@@ -10030,7 +10148,7 @@ var Mailboxes = class {
|
|
|
10030
10148
|
/**
|
|
10031
10149
|
* List mailbox grants
|
|
10032
10150
|
*
|
|
10033
|
-
* 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.
|
|
10034
10152
|
*/
|
|
10035
10153
|
static listGrants(parameters, options) {
|
|
10036
10154
|
const params = buildClientParams([parameters], [{ args: [
|
|
@@ -10076,10 +10194,6 @@ var Mailboxes = class {
|
|
|
10076
10194
|
{
|
|
10077
10195
|
in: "body",
|
|
10078
10196
|
key: "role"
|
|
10079
|
-
},
|
|
10080
|
-
{
|
|
10081
|
-
in: "body",
|
|
10082
|
-
key: "sendMode"
|
|
10083
10197
|
}
|
|
10084
10198
|
] }]);
|
|
10085
10199
|
return requestWithPolicy(options?.client ?? client, "mailboxesCreateGrant", options, (headers) => (options?.client ?? client).post({
|
|
@@ -10129,7 +10243,7 @@ var Mailboxes = class {
|
|
|
10129
10243
|
/**
|
|
10130
10244
|
* Update a mailbox grant
|
|
10131
10245
|
*
|
|
10132
|
-
* 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.
|
|
10133
10247
|
*/
|
|
10134
10248
|
static updateGrant(parameters, options) {
|
|
10135
10249
|
const params = buildClientParams([parameters], [{ args: [
|
|
@@ -10144,10 +10258,6 @@ var Mailboxes = class {
|
|
|
10144
10258
|
{
|
|
10145
10259
|
in: "body",
|
|
10146
10260
|
key: "role"
|
|
10147
|
-
},
|
|
10148
|
-
{
|
|
10149
|
-
in: "body",
|
|
10150
|
-
key: "sendMode"
|
|
10151
10261
|
}
|
|
10152
10262
|
] }]);
|
|
10153
10263
|
return requestWithPolicy(options?.client ?? client, "mailboxesUpdateGrant", options, (headers) => (options?.client ?? client).patch({
|
|
@@ -10171,175 +10281,6 @@ var Mailboxes = class {
|
|
|
10171
10281
|
}));
|
|
10172
10282
|
}
|
|
10173
10283
|
/**
|
|
10174
|
-
* List mailbox policies
|
|
10175
|
-
*
|
|
10176
|
-
* 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.
|
|
10177
|
-
*/
|
|
10178
|
-
static listPolicies(parameters, options) {
|
|
10179
|
-
const params = buildClientParams([parameters], [{ args: [{
|
|
10180
|
-
in: "path",
|
|
10181
|
-
key: "id"
|
|
10182
|
-
}] }]);
|
|
10183
|
-
return requestWithPolicy(options?.client ?? client, "mailboxesListPolicies", options, (headers) => (options?.client ?? client).get({
|
|
10184
|
-
security: [{
|
|
10185
|
-
name: "x-api-key",
|
|
10186
|
-
type: "apiKey"
|
|
10187
|
-
}],
|
|
10188
|
-
url: "/v1/mailboxes/{id}/policies",
|
|
10189
|
-
...options,
|
|
10190
|
-
...params,
|
|
10191
|
-
headers
|
|
10192
|
-
}));
|
|
10193
|
-
}
|
|
10194
|
-
/**
|
|
10195
|
-
* Create a mailbox policy
|
|
10196
|
-
*
|
|
10197
|
-
* 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.
|
|
10198
|
-
*/
|
|
10199
|
-
static createPolicy(parameters, options) {
|
|
10200
|
-
const params = buildClientParams([parameters], [{ args: [
|
|
10201
|
-
{
|
|
10202
|
-
in: "path",
|
|
10203
|
-
key: "id"
|
|
10204
|
-
},
|
|
10205
|
-
{
|
|
10206
|
-
in: "body",
|
|
10207
|
-
key: "name"
|
|
10208
|
-
},
|
|
10209
|
-
{
|
|
10210
|
-
in: "body",
|
|
10211
|
-
key: "outcome"
|
|
10212
|
-
},
|
|
10213
|
-
{
|
|
10214
|
-
in: "body",
|
|
10215
|
-
key: "reason"
|
|
10216
|
-
},
|
|
10217
|
-
{
|
|
10218
|
-
in: "body",
|
|
10219
|
-
key: "enabled"
|
|
10220
|
-
}
|
|
10221
|
-
] }]);
|
|
10222
|
-
return requestWithPolicy(options?.client ?? client, "mailboxesCreatePolicy", options, (headers) => (options?.client ?? client).post({
|
|
10223
|
-
security: [{
|
|
10224
|
-
name: "x-api-key",
|
|
10225
|
-
type: "apiKey"
|
|
10226
|
-
}],
|
|
10227
|
-
url: "/v1/mailboxes/{id}/policies",
|
|
10228
|
-
...options,
|
|
10229
|
-
...params,
|
|
10230
|
-
body: params.body ?? {},
|
|
10231
|
-
headers: {
|
|
10232
|
-
"Content-Type": "application/json",
|
|
10233
|
-
...options?.headers,
|
|
10234
|
-
...params.headers
|
|
10235
|
-
},
|
|
10236
|
-
headers: {
|
|
10237
|
-
"Content-Type": "application/json",
|
|
10238
|
-
...headers
|
|
10239
|
-
}
|
|
10240
|
-
}));
|
|
10241
|
-
}
|
|
10242
|
-
/**
|
|
10243
|
-
* Delete a mailbox policy
|
|
10244
|
-
*
|
|
10245
|
-
* Deletes a send policy. Sends it already holds stay held until a person approves or denies them.
|
|
10246
|
-
*/
|
|
10247
|
-
static deletePolicy(parameters, options) {
|
|
10248
|
-
const params = buildClientParams([parameters], [{ args: [{
|
|
10249
|
-
in: "path",
|
|
10250
|
-
key: "id"
|
|
10251
|
-
}, {
|
|
10252
|
-
in: "path",
|
|
10253
|
-
key: "policyId"
|
|
10254
|
-
}] }]);
|
|
10255
|
-
return requestWithPolicy(options?.client ?? client, "mailboxesDeletePolicy", options, (headers) => (options?.client ?? client).delete({
|
|
10256
|
-
security: [{
|
|
10257
|
-
name: "x-api-key",
|
|
10258
|
-
type: "apiKey"
|
|
10259
|
-
}],
|
|
10260
|
-
url: "/v1/mailboxes/{id}/policies/{policyId}",
|
|
10261
|
-
...options,
|
|
10262
|
-
...params,
|
|
10263
|
-
headers
|
|
10264
|
-
}));
|
|
10265
|
-
}
|
|
10266
|
-
/**
|
|
10267
|
-
* Get a mailbox policy
|
|
10268
|
-
*
|
|
10269
|
-
* Returns one send policy.
|
|
10270
|
-
*/
|
|
10271
|
-
static getPolicy(parameters, options) {
|
|
10272
|
-
const params = buildClientParams([parameters], [{ args: [{
|
|
10273
|
-
in: "path",
|
|
10274
|
-
key: "id"
|
|
10275
|
-
}, {
|
|
10276
|
-
in: "path",
|
|
10277
|
-
key: "policyId"
|
|
10278
|
-
}] }]);
|
|
10279
|
-
return requestWithPolicy(options?.client ?? client, "mailboxesGetPolicy", options, (headers) => (options?.client ?? client).get({
|
|
10280
|
-
security: [{
|
|
10281
|
-
name: "x-api-key",
|
|
10282
|
-
type: "apiKey"
|
|
10283
|
-
}],
|
|
10284
|
-
url: "/v1/mailboxes/{id}/policies/{policyId}",
|
|
10285
|
-
...options,
|
|
10286
|
-
...params,
|
|
10287
|
-
headers
|
|
10288
|
-
}));
|
|
10289
|
-
}
|
|
10290
|
-
/**
|
|
10291
|
-
* Update a mailbox policy
|
|
10292
|
-
*
|
|
10293
|
-
* Updates the fields you name and keeps the rest. Set `enabled` to `false` to stop a policy applying without deleting it.
|
|
10294
|
-
*/
|
|
10295
|
-
static updatePolicy(parameters, options) {
|
|
10296
|
-
const params = buildClientParams([parameters], [{ args: [
|
|
10297
|
-
{
|
|
10298
|
-
in: "path",
|
|
10299
|
-
key: "id"
|
|
10300
|
-
},
|
|
10301
|
-
{
|
|
10302
|
-
in: "path",
|
|
10303
|
-
key: "policyId"
|
|
10304
|
-
},
|
|
10305
|
-
{
|
|
10306
|
-
in: "body",
|
|
10307
|
-
key: "name"
|
|
10308
|
-
},
|
|
10309
|
-
{
|
|
10310
|
-
in: "body",
|
|
10311
|
-
key: "outcome"
|
|
10312
|
-
},
|
|
10313
|
-
{
|
|
10314
|
-
in: "body",
|
|
10315
|
-
key: "reason"
|
|
10316
|
-
},
|
|
10317
|
-
{
|
|
10318
|
-
in: "body",
|
|
10319
|
-
key: "enabled"
|
|
10320
|
-
}
|
|
10321
|
-
] }]);
|
|
10322
|
-
return requestWithPolicy(options?.client ?? client, "mailboxesUpdatePolicy", options, (headers) => (options?.client ?? client).patch({
|
|
10323
|
-
security: [{
|
|
10324
|
-
name: "x-api-key",
|
|
10325
|
-
type: "apiKey"
|
|
10326
|
-
}],
|
|
10327
|
-
url: "/v1/mailboxes/{id}/policies/{policyId}",
|
|
10328
|
-
...options,
|
|
10329
|
-
...params,
|
|
10330
|
-
body: params.body ?? {},
|
|
10331
|
-
headers: {
|
|
10332
|
-
"Content-Type": "application/json",
|
|
10333
|
-
...options?.headers,
|
|
10334
|
-
...params.headers
|
|
10335
|
-
},
|
|
10336
|
-
headers: {
|
|
10337
|
-
"Content-Type": "application/json",
|
|
10338
|
-
...headers
|
|
10339
|
-
}
|
|
10340
|
-
}));
|
|
10341
|
-
}
|
|
10342
|
-
/**
|
|
10343
10284
|
* List mailbox folders
|
|
10344
10285
|
*
|
|
10345
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.
|
|
@@ -10496,7 +10437,7 @@ var Mailboxes = class {
|
|
|
10496
10437
|
/**
|
|
10497
10438
|
* List mailbox decisions awaiting you
|
|
10498
10439
|
*
|
|
10499
|
-
* 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.
|
|
10500
10441
|
*/
|
|
10501
10442
|
static getNeedsYou(parameters, options) {
|
|
10502
10443
|
const params = buildClientParams([parameters], [{ args: [{
|
|
@@ -10559,7 +10500,7 @@ var Mailboxes = class {
|
|
|
10559
10500
|
/**
|
|
10560
10501
|
* List threads across your mailboxes
|
|
10561
10502
|
*
|
|
10562
|
-
* 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.
|
|
10563
10504
|
*/
|
|
10564
10505
|
static listOrganizationThreads(parameters, options) {
|
|
10565
10506
|
const params = buildClientParams([parameters], [{ args: [
|
|
@@ -10634,7 +10575,7 @@ var Mailboxes = class {
|
|
|
10634
10575
|
/**
|
|
10635
10576
|
* List threads in a mailbox
|
|
10636
10577
|
*
|
|
10637
|
-
* 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.
|
|
10638
10579
|
*/
|
|
10639
10580
|
static listThreads(parameters, options) {
|
|
10640
10581
|
const params = buildClientParams([parameters], [{ args: [
|
|
@@ -11663,7 +11604,7 @@ var Mailboxes = class {
|
|
|
11663
11604
|
/**
|
|
11664
11605
|
* List mailbox actions
|
|
11665
11606
|
*
|
|
11666
|
-
* 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.
|
|
11667
11608
|
*/
|
|
11668
11609
|
static listActions(parameters, options) {
|
|
11669
11610
|
const params = buildClientParams([parameters], [{ args: [
|
|
@@ -11782,16 +11723,31 @@ var Mailboxes = class {
|
|
|
11782
11723
|
/**
|
|
11783
11724
|
* Approve a mailbox action
|
|
11784
11725
|
*
|
|
11785
|
-
* 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.
|
|
11786
11727
|
*/
|
|
11787
11728
|
static approveAction(parameters, options) {
|
|
11788
|
-
const params = buildClientParams([parameters], [{ args: [
|
|
11789
|
-
|
|
11790
|
-
|
|
11791
|
-
|
|
11792
|
-
|
|
11793
|
-
|
|
11794
|
-
|
|
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
|
+
] }]);
|
|
11795
11751
|
return requestWithPolicy(options?.client ?? client, "mailboxesApproveAction", options, (headers) => (options?.client ?? client).post({
|
|
11796
11752
|
security: [{
|
|
11797
11753
|
name: "x-api-key",
|
|
@@ -11800,7 +11756,16 @@ var Mailboxes = class {
|
|
|
11800
11756
|
url: "/v1/mailboxes/{id}/actions/{actionId}/approve",
|
|
11801
11757
|
...options,
|
|
11802
11758
|
...params,
|
|
11803
|
-
|
|
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
|
+
}
|
|
11804
11769
|
}));
|
|
11805
11770
|
}
|
|
11806
11771
|
/**
|
|
@@ -11818,6 +11783,10 @@ var Mailboxes = class {
|
|
|
11818
11783
|
in: "path",
|
|
11819
11784
|
key: "actionId"
|
|
11820
11785
|
},
|
|
11786
|
+
{
|
|
11787
|
+
in: "body",
|
|
11788
|
+
key: "reviewRound"
|
|
11789
|
+
},
|
|
11821
11790
|
{
|
|
11822
11791
|
in: "body",
|
|
11823
11792
|
key: "reason"
|
|
@@ -11883,6 +11852,115 @@ var Mailboxes = class {
|
|
|
11883
11852
|
}));
|
|
11884
11853
|
}
|
|
11885
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
|
+
};
|
|
11886
11964
|
var Namespaces = class {
|
|
11887
11965
|
/**
|
|
11888
11966
|
* List namespaces
|
|
@@ -11955,7 +12033,7 @@ var Namespaces = class {
|
|
|
11955
12033
|
/**
|
|
11956
12034
|
* Delete a namespace
|
|
11957
12035
|
*
|
|
11958
|
-
* 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.
|
|
11959
12037
|
*/
|
|
11960
12038
|
static remove(parameters, options) {
|
|
11961
12039
|
const params = buildClientParams([parameters], [{ args: [{
|
|
@@ -12322,7 +12400,7 @@ var ExtensionInstallations = class {
|
|
|
12322
12400
|
/**
|
|
12323
12401
|
* Install an extension
|
|
12324
12402
|
*
|
|
12325
|
-
* 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.
|
|
12326
12404
|
*/
|
|
12327
12405
|
static install(parameters, options) {
|
|
12328
12406
|
const params = buildClientParams([parameters], [{ args: [
|
|
@@ -12348,7 +12426,7 @@ var ExtensionInstallations = class {
|
|
|
12348
12426
|
},
|
|
12349
12427
|
{
|
|
12350
12428
|
in: "body",
|
|
12351
|
-
key: "
|
|
12429
|
+
key: "policy"
|
|
12352
12430
|
},
|
|
12353
12431
|
{
|
|
12354
12432
|
in: "body",
|
|
@@ -12399,7 +12477,7 @@ var ExtensionInstallations = class {
|
|
|
12399
12477
|
/**
|
|
12400
12478
|
* Get an installation
|
|
12401
12479
|
*
|
|
12402
|
-
* Returns one installation with its permissions, scope,
|
|
12480
|
+
* Returns one installation with its permissions, scope, action policy, and webhook endpoint.
|
|
12403
12481
|
*/
|
|
12404
12482
|
static get(parameters, options) {
|
|
12405
12483
|
const params = buildClientParams([parameters], [{ args: [{
|
|
@@ -12420,7 +12498,7 @@ var ExtensionInstallations = class {
|
|
|
12420
12498
|
/**
|
|
12421
12499
|
* Upgrade or roll back an installation
|
|
12422
12500
|
*
|
|
12423
|
-
* 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.
|
|
12424
12502
|
*/
|
|
12425
12503
|
static upgrade(parameters, options) {
|
|
12426
12504
|
const params = buildClientParams([parameters], [{ args: [
|
|
@@ -12705,6 +12783,7 @@ Object.assign(Journeys.getVersion, { operation: "journeysGetVersion" });
|
|
|
12705
12783
|
Object.assign(Journeys.stats, { operation: "journeysStats" });
|
|
12706
12784
|
Object.assign(Journeys.listRuns, { operation: "journeysListRuns" });
|
|
12707
12785
|
Object.assign(Journeys.getRun, { operation: "journeysGetRun" });
|
|
12786
|
+
Object.assign(Agents.rerunTests, { operation: "agentsRerunTests" });
|
|
12708
12787
|
Object.assign(Agents.list, { operation: "agentsList" });
|
|
12709
12788
|
Object.assign(Agents.create, { operation: "agentsCreate" });
|
|
12710
12789
|
Object.assign(Agents.listModels, { operation: "agentsListModels" });
|
|
@@ -12781,11 +12860,12 @@ Object.assign(Templates.renameFamily, { operation: "templatesRenameFamily" });
|
|
|
12781
12860
|
Object.assign(Templates.createFamilyFromTemplate, { operation: "templatesCreateFamilyFromTemplate" });
|
|
12782
12861
|
Object.assign(Templates.detachFamilyMember, { operation: "templatesDetachFamilyMember" });
|
|
12783
12862
|
Object.assign(Templates.attachFamilyMember, { operation: "templatesAttachFamilyMember" });
|
|
12784
|
-
Object.assign(Templates.
|
|
12863
|
+
Object.assign(Templates.delete, { operation: "templatesDelete" });
|
|
12785
12864
|
Object.assign(Templates.getById, { operation: "templatesGetById" });
|
|
12786
12865
|
Object.assign(Templates.update, { operation: "templatesUpdate" });
|
|
12787
12866
|
Object.assign(Templates.createFromWebsite, { operation: "templatesCreateFromWebsite" });
|
|
12788
12867
|
Object.assign(Templates.addEntry, { operation: "templatesAddEntry" });
|
|
12868
|
+
Object.assign(Templates.deleteProject, { operation: "templatesDeleteProject" });
|
|
12789
12869
|
Object.assign(Templates.patchWorkspace, { operation: "templatesPatchWorkspace" });
|
|
12790
12870
|
Object.assign(Templates.openWorkspace, { operation: "templatesOpenWorkspace" });
|
|
12791
12871
|
Object.assign(Templates.diffWorkspace, { operation: "templatesDiffWorkspace" });
|
|
@@ -12858,11 +12938,6 @@ Object.assign(Mailboxes.listGrants, { operation: "mailboxesListGrants" });
|
|
|
12858
12938
|
Object.assign(Mailboxes.createGrant, { operation: "mailboxesCreateGrant" });
|
|
12859
12939
|
Object.assign(Mailboxes.revokeGrant, { operation: "mailboxesRevokeGrant" });
|
|
12860
12940
|
Object.assign(Mailboxes.updateGrant, { operation: "mailboxesUpdateGrant" });
|
|
12861
|
-
Object.assign(Mailboxes.listPolicies, { operation: "mailboxesListPolicies" });
|
|
12862
|
-
Object.assign(Mailboxes.createPolicy, { operation: "mailboxesCreatePolicy" });
|
|
12863
|
-
Object.assign(Mailboxes.deletePolicy, { operation: "mailboxesDeletePolicy" });
|
|
12864
|
-
Object.assign(Mailboxes.getPolicy, { operation: "mailboxesGetPolicy" });
|
|
12865
|
-
Object.assign(Mailboxes.updatePolicy, { operation: "mailboxesUpdatePolicy" });
|
|
12866
12941
|
Object.assign(Mailboxes.listFolders, { operation: "mailboxesListFolders" });
|
|
12867
12942
|
Object.assign(Mailboxes.listLabels, { operation: "mailboxesListLabels" });
|
|
12868
12943
|
Object.assign(Mailboxes.createLabel, { operation: "mailboxesCreateLabel" });
|
|
@@ -12906,6 +12981,9 @@ Object.assign(Mailboxes.retryAction, { operation: "mailboxesRetryAction" });
|
|
|
12906
12981
|
Object.assign(Mailboxes.approveAction, { operation: "mailboxesApproveAction" });
|
|
12907
12982
|
Object.assign(Mailboxes.denyAction, { operation: "mailboxesDenyAction" });
|
|
12908
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" });
|
|
12909
12987
|
Object.assign(Namespaces.list, { operation: "namespacesList" });
|
|
12910
12988
|
Object.assign(Namespaces.create, { operation: "namespacesCreate" });
|
|
12911
12989
|
Object.assign(Namespaces.remove, { operation: "namespacesRemove" });
|
|
@@ -12928,6 +13006,6 @@ Object.assign(ExtensionInstallations.disable, { operation: "extensionInstallatio
|
|
|
12928
13006
|
Object.assign(ExtensionInstallations.enable, { operation: "extensionInstallationsEnable" });
|
|
12929
13007
|
Object.assign(ExtensionInstallations.listRuns, { operation: "extensionInstallationsListRuns" });
|
|
12930
13008
|
Object.assign(ExtensionInstallations.getRun, { operation: "extensionInstallationsGetRun" });
|
|
12931
|
-
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 };
|
|
12932
13010
|
|
|
12933
13011
|
//# sourceMappingURL=sdk.gen.js.map
|