samva 0.2.0 → 0.3.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.
Files changed (47) hide show
  1. package/AGENTS.md +1 -1
  2. package/README.md +10 -3
  3. package/dist/client/sdk.gen.d.ts +232 -23
  4. package/dist/client/types.gen.d.ts +693 -352
  5. package/dist/{client-BqkU-sFv.js → client-BOghX8fr.js} +1530 -1532
  6. package/dist/effect/api-keys.d.ts +14 -14
  7. package/dist/effect/api-keys.js +1 -1
  8. package/dist/effect/campaigns.d.ts +134 -853
  9. package/dist/effect/campaigns.js +1 -1
  10. package/dist/effect/categories.d.ts +1 -1
  11. package/dist/effect/client.js +1 -1
  12. package/dist/effect/contacts.d.ts +123 -145
  13. package/dist/effect/contacts.js +1 -1
  14. package/dist/effect/conversations.d.ts +128 -260
  15. package/dist/effect/conversations.js +1 -1
  16. package/dist/effect/design.d.ts +11 -11
  17. package/dist/effect/design.js +1 -1
  18. package/dist/effect/email.d.ts +64 -108
  19. package/dist/effect/email.js +2 -2
  20. package/dist/effect/generated.d.ts +7346 -8748
  21. package/dist/effect/index.d.ts +1 -0
  22. package/dist/effect/index.js +3 -2
  23. package/dist/effect/internal/operation.d.ts +15 -113
  24. package/dist/effect/media.d.ts +80 -0
  25. package/dist/effect/media.js +19 -0
  26. package/dist/effect/messages.d.ts +41 -261
  27. package/dist/effect/messages.js +1 -1
  28. package/dist/effect/operations.d.ts +7 -7
  29. package/dist/effect/operations.js +1 -1
  30. package/dist/effect/organizations.d.ts +23 -41
  31. package/dist/effect/organizations.js +1 -1
  32. package/dist/effect/scheduled-messages.d.ts +43 -454
  33. package/dist/effect/scheduled-messages.js +1 -1
  34. package/dist/effect/templates.d.ts +175 -649
  35. package/dist/effect/templates.js +2 -2
  36. package/dist/effect/webhooks.d.ts +20 -21
  37. package/dist/effect/webhooks.js +2 -2
  38. package/dist/index.js +1 -1
  39. package/dist/{normalize-LkWl4HUF.js → normalize-BKFjbR9t.js} +5 -13
  40. package/dist/normalize.d.ts +3 -33
  41. package/dist/{operation-Ccqh_yxb.js → operation-C2Q4cFJL.js} +21 -3
  42. package/dist/promises/index.d.ts +4 -14
  43. package/dist/promises/index.js +1 -1
  44. package/dist/promises/types.gen.d.ts +1 -1
  45. package/dist/{promises-Dgv8UmCC.js → promises-oiy7mOyu.js} +386 -29
  46. package/dist/service-map.d.ts +26 -0
  47. package/package.json +17 -12
@@ -1,4 +1,4 @@
1
- import { n as buildMessagesSendPayload, r as replyToEmailsPayload, t as buildEmailSendPayload } from "./normalize-LkWl4HUF.js";
1
+ import { n as buildMessagesSendPayload, r as replyToEmailsPayload, t as buildEmailSendPayload } from "./normalize-BKFjbR9t.js";
2
2
  //#region src/client/core/bodySerializer.gen.ts
3
3
  const jsonBodySerializer = { bodySerializer: (body) => JSON.stringify(body, (_key, value) => typeof value === "bigint" ? value.toString() : value) };
4
4
  //#endregion
@@ -45,18 +45,20 @@ function buildClientParams(args, fields) {
45
45
  for (const [index, arg] of args.entries()) {
46
46
  if (fields[index]) config = fields[index];
47
47
  if (!config) continue;
48
- if ("in" in config) if (config.key) {
49
- const field = map.get(config.key);
50
- const name = field.map || config.key;
51
- if (field.in) writeSlot(field.in, name, arg);
52
- } else params.body = arg;
53
- else for (const [key, value] of Object.entries(arg ?? {})) {
48
+ if ("in" in config) {
49
+ if (config.key) {
50
+ const field = map.get(config.key);
51
+ const name = field.map || config.key;
52
+ if (field.in) writeSlot(field.in, name, arg);
53
+ } else params.body = arg;
54
+ } else for (const [key, value] of Object.entries(arg ?? {})) {
54
55
  const field = map.get(key);
55
- if (field) if (field.in) {
56
- const name = field.map || key;
57
- writeSlot(field.in, name, value);
58
- } else params[field.map] = value;
59
- else {
56
+ if (field) {
57
+ if (field.in) {
58
+ const name = field.map || key;
59
+ writeSlot(field.in, name, value);
60
+ } else params[field.map] = value;
61
+ } else {
60
62
  const extra = extraPrefixes.find(([prefix]) => key.startsWith(prefix));
61
63
  if (extra) {
62
64
  const [prefix, slot] = extra;
@@ -725,14 +727,14 @@ var Messages = class {
725
727
  /**
726
728
  * Send a message
727
729
  *
728
- * Sends a message on the requested channel and returns the created message with a 201 Created status. `channel` selects the payload variant. Email sends today; the SMS and WhatsApp variants are coming soon and answer 403 until the channel launches for your organization, so integrating against them now costs no rewrite later. Repeating an identical request with the same optional `Idempotency-Key` header returns the original message; reusing the key for different content returns a conflict.
730
+ * Sends a message on the requested channel and returns the created message with a 201 Created status. `channel` selects the payload variant. Repeating an identical request with the same optional `Idempotency-Key` header returns the original message; reusing the key for different content returns a conflict.
729
731
  */
730
732
  static send(parameters, options) {
731
733
  const params = buildClientParams([parameters], [{ args: [{
732
734
  in: "headers",
733
735
  key: "idempotency-key"
734
736
  }, {
735
- key: "body",
737
+ key: "emailSendMessagePayload",
736
738
  map: "body"
737
739
  }] }]);
738
740
  return (options?.client ?? client).post({
@@ -793,7 +795,7 @@ var Messages = class {
793
795
  /**
794
796
  * Get email message details
795
797
  *
796
- * Returns the email projection of a message, optionally including signed S3 URLs for its raw MIME, HTML, and text content.
798
+ * Returns email delivery details for a message, optionally including signed URLs for its raw MIME, HTML, and text content.
797
799
  */
798
800
  static getEmail(parameters, options) {
799
801
  const params = buildClientParams([parameters], [{ args: [
@@ -971,7 +973,7 @@ var ScheduledMessages = class {
971
973
  /**
972
974
  * Schedule a message
973
975
  *
974
- * Schedules a message at the absolute ISO-8601 instant in scheduledFor. The send payload is the same channel union the immediate send accepts, with each channel's content checked at schedule time so a send that could never render fails now rather than hours later: email schedules today, and the SMS and WhatsApp variants are coming soon and answer 403 until the channel launches. Optional timezone is validated IANA display metadata only and never changes the execution instant.
976
+ * Schedules a message at the absolute ISO-8601 instant in scheduledFor. Optional timezone is validated IANA display metadata only and never changes the execution instant.
975
977
  */
976
978
  static create(parameters, options) {
977
979
  const params = buildClientParams([parameters], [{ args: [
@@ -2835,6 +2837,131 @@ var Email = class {
2835
2837
  });
2836
2838
  }
2837
2839
  };
2840
+ var Media = class {
2841
+ /**
2842
+ * Create a media object
2843
+ *
2844
+ * Creates the media object in the pending state and returns it with the upload instruction — URL, method, and headers — for putting its bytes into storage.
2845
+ */
2846
+ static create(parameters, options) {
2847
+ const params = buildClientParams([parameters], [{ args: [
2848
+ {
2849
+ in: "body",
2850
+ key: "filename"
2851
+ },
2852
+ {
2853
+ in: "body",
2854
+ key: "contentType"
2855
+ },
2856
+ {
2857
+ in: "body",
2858
+ key: "sizeBytes"
2859
+ },
2860
+ {
2861
+ in: "body",
2862
+ key: "purpose"
2863
+ },
2864
+ {
2865
+ in: "body",
2866
+ key: "checksumSha256"
2867
+ }
2868
+ ] }]);
2869
+ return (options?.client ?? client).post({
2870
+ security: [{
2871
+ name: "x-api-key",
2872
+ type: "apiKey"
2873
+ }],
2874
+ url: "/v1/media",
2875
+ ...options,
2876
+ ...params,
2877
+ headers: {
2878
+ "Content-Type": "application/json",
2879
+ ...options?.headers,
2880
+ ...params.headers
2881
+ }
2882
+ });
2883
+ }
2884
+ /**
2885
+ * Complete a media upload
2886
+ *
2887
+ * Verifies the uploaded object exists in storage, marks the media object ready, and returns it with a download URL.
2888
+ */
2889
+ static complete(parameters, options) {
2890
+ const params = buildClientParams([parameters], [{ args: [{
2891
+ in: "path",
2892
+ key: "mediaId"
2893
+ }] }]);
2894
+ return (options?.client ?? client).post({
2895
+ security: [{
2896
+ name: "x-api-key",
2897
+ type: "apiKey"
2898
+ }],
2899
+ url: "/v1/media/{mediaId}/complete",
2900
+ ...options,
2901
+ ...params
2902
+ });
2903
+ }
2904
+ /**
2905
+ * Delete a media object
2906
+ *
2907
+ * Deletes a pending media object and the bytes stored for it. Fails if the media object is already ready.
2908
+ */
2909
+ static remove(parameters, options) {
2910
+ const params = buildClientParams([parameters], [{ args: [{
2911
+ in: "path",
2912
+ key: "mediaId"
2913
+ }] }]);
2914
+ return (options?.client ?? client).delete({
2915
+ security: [{
2916
+ name: "x-api-key",
2917
+ type: "apiKey"
2918
+ }],
2919
+ url: "/v1/media/{mediaId}",
2920
+ ...options,
2921
+ ...params
2922
+ });
2923
+ }
2924
+ /**
2925
+ * Get a media object
2926
+ *
2927
+ * Returns the media object's metadata, including status, dimensions, and confirmation timestamps.
2928
+ */
2929
+ static getById(parameters, options) {
2930
+ const params = buildClientParams([parameters], [{ args: [{
2931
+ in: "path",
2932
+ key: "mediaId"
2933
+ }] }]);
2934
+ return (options?.client ?? client).get({
2935
+ security: [{
2936
+ name: "x-api-key",
2937
+ type: "apiKey"
2938
+ }],
2939
+ url: "/v1/media/{mediaId}",
2940
+ ...options,
2941
+ ...params
2942
+ });
2943
+ }
2944
+ /**
2945
+ * Get a media download URL
2946
+ *
2947
+ * Generates a presigned, time-limited download URL for a ready media object.
2948
+ */
2949
+ static downloadUrl(parameters, options) {
2950
+ const params = buildClientParams([parameters], [{ args: [{
2951
+ in: "path",
2952
+ key: "mediaId"
2953
+ }] }]);
2954
+ return (options?.client ?? client).get({
2955
+ security: [{
2956
+ name: "x-api-key",
2957
+ type: "apiKey"
2958
+ }],
2959
+ url: "/v1/media/{mediaId}/url",
2960
+ ...options,
2961
+ ...params
2962
+ });
2963
+ }
2964
+ };
2838
2965
  var Conversations = class {
2839
2966
  /**
2840
2967
  * List conversations
@@ -3340,7 +3467,7 @@ var Contacts = class {
3340
3467
  /**
3341
3468
  * Find a contact
3342
3469
  *
3343
- * Looks up a single contact by email, phone, WhatsApp, or external ID, returning null when no contact matches.
3470
+ * Samva API operation.
3344
3471
  */
3345
3472
  static find(parameters, options) {
3346
3473
  const params = buildClientParams([parameters], [{ args: [
@@ -3352,10 +3479,6 @@ var Contacts = class {
3352
3479
  in: "body",
3353
3480
  key: "phone"
3354
3481
  },
3355
- {
3356
- in: "body",
3357
- key: "whatsapp"
3358
- },
3359
3482
  {
3360
3483
  in: "body",
3361
3484
  key: "externalId"
@@ -3391,10 +3514,6 @@ var Contacts = class {
3391
3514
  in: "body",
3392
3515
  key: "phone"
3393
3516
  },
3394
- {
3395
- in: "body",
3396
- key: "whatsapp"
3397
- },
3398
3517
  {
3399
3518
  in: "body",
3400
3519
  key: "externalId"
@@ -3922,6 +4041,11 @@ var Templates = class {
3922
4041
  }
3923
4042
  });
3924
4043
  }
4044
+ /**
4045
+ * List templates for the dashboard
4046
+ *
4047
+ * Returns a paginated dashboard view that groups related channel templates into families and leaves standalone templates ungrouped.
4048
+ */
3925
4049
  static listDashboard(parameters, options) {
3926
4050
  const params = buildClientParams([parameters], [{ args: [
3927
4051
  {
@@ -3971,6 +4095,11 @@ var Templates = class {
3971
4095
  ...params
3972
4096
  });
3973
4097
  }
4098
+ /**
4099
+ * List template families
4100
+ *
4101
+ * Returns a paginated list of the organization's template families and members.
4102
+ */
3974
4103
  static listFamilies(parameters, options) {
3975
4104
  const params = buildClientParams([parameters], [{ args: [{
3976
4105
  in: "query",
@@ -3989,6 +4118,11 @@ var Templates = class {
3989
4118
  ...params
3990
4119
  });
3991
4120
  }
4121
+ /**
4122
+ * Create a template family
4123
+ *
4124
+ * Creates an empty template family with the supplied name and returns it with status 201.
4125
+ */
3992
4126
  static createFamily(parameters, options) {
3993
4127
  const params = buildClientParams([parameters], [{ args: [{
3994
4128
  in: "body",
@@ -4009,6 +4143,11 @@ var Templates = class {
4009
4143
  }
4010
4144
  });
4011
4145
  }
4146
+ /**
4147
+ * Delete a template family
4148
+ *
4149
+ * Deletes a template family without deleting its member templates.
4150
+ */
4012
4151
  static deleteFamily(parameters, options) {
4013
4152
  const params = buildClientParams([parameters], [{ args: [{
4014
4153
  in: "path",
@@ -4024,6 +4163,11 @@ var Templates = class {
4024
4163
  ...params
4025
4164
  });
4026
4165
  }
4166
+ /**
4167
+ * Get a template family
4168
+ *
4169
+ * Returns a template family and its channel-specific member templates.
4170
+ */
4027
4171
  static getFamily(parameters, options) {
4028
4172
  const params = buildClientParams([parameters], [{ args: [{
4029
4173
  in: "path",
@@ -4039,6 +4183,11 @@ var Templates = class {
4039
4183
  ...params
4040
4184
  });
4041
4185
  }
4186
+ /**
4187
+ * Rename a template family
4188
+ *
4189
+ * Changes a template family's name and returns the updated family.
4190
+ */
4042
4191
  static renameFamily(parameters, options) {
4043
4192
  const params = buildClientParams([parameters], [{ args: [{
4044
4193
  in: "path",
@@ -4062,6 +4211,11 @@ var Templates = class {
4062
4211
  }
4063
4212
  });
4064
4213
  }
4214
+ /**
4215
+ * Create a family from a template
4216
+ *
4217
+ * Creates a template family containing the specified template and returns the new family with status 201.
4218
+ */
4065
4219
  static createFamilyFromTemplate(parameters, options) {
4066
4220
  const params = buildClientParams([parameters], [{ args: [{
4067
4221
  in: "path",
@@ -4085,6 +4239,11 @@ var Templates = class {
4085
4239
  }
4086
4240
  });
4087
4241
  }
4242
+ /**
4243
+ * Detach a template from a family
4244
+ *
4245
+ * Removes a member template from the family without deleting the template.
4246
+ */
4088
4247
  static detachFamilyMember(parameters, options) {
4089
4248
  const params = buildClientParams([parameters], [{ args: [{
4090
4249
  in: "path",
@@ -4103,6 +4262,11 @@ var Templates = class {
4103
4262
  ...params
4104
4263
  });
4105
4264
  }
4265
+ /**
4266
+ * Attach a template to a family
4267
+ *
4268
+ * Adds an existing template as a channel member of the family and returns the updated family.
4269
+ */
4106
4270
  static attachFamilyMember(parameters, options) {
4107
4271
  const params = buildClientParams([parameters], [{ args: [{
4108
4272
  in: "path",
@@ -4121,6 +4285,11 @@ var Templates = class {
4121
4285
  ...params
4122
4286
  });
4123
4287
  }
4288
+ /**
4289
+ * Add a channel to a template family
4290
+ *
4291
+ * Creates a template for the requested channel in the family and returns the updated family with status 201.
4292
+ */
4124
4293
  static addFamilyChannel(parameters, options) {
4125
4294
  const params = buildClientParams([parameters], [{ args: [{
4126
4295
  in: "path",
@@ -4237,6 +4406,11 @@ var Templates = class {
4237
4406
  }
4238
4407
  };
4239
4408
  var TemplateDocuments = class {
4409
+ /**
4410
+ * Bootstrap a template document
4411
+ *
4412
+ * Creates or loads the authoritative editable document for a template and returns its current snapshot.
4413
+ */
4240
4414
  static bootstrap(parameters, options) {
4241
4415
  const params = buildClientParams([parameters], [{ args: [{
4242
4416
  in: "body",
@@ -4257,6 +4431,11 @@ var TemplateDocuments = class {
4257
4431
  }
4258
4432
  });
4259
4433
  }
4434
+ /**
4435
+ * Get a template document
4436
+ *
4437
+ * Returns the current authoritative source, revision, and metadata for a template document.
4438
+ */
4260
4439
  static get(parameters, options) {
4261
4440
  const params = buildClientParams([parameters], [{ args: [{
4262
4441
  in: "path",
@@ -4272,6 +4451,137 @@ var TemplateDocuments = class {
4272
4451
  ...params
4273
4452
  });
4274
4453
  }
4454
+ /**
4455
+ * Issue an agent admission
4456
+ *
4457
+ * Authorizes a bounded template-agent operation against the current document and returns the admission context.
4458
+ */
4459
+ static issueAgentAdmission(parameters, options) {
4460
+ const params = buildClientParams([parameters], [{ args: [
4461
+ {
4462
+ in: "path",
4463
+ key: "templateId"
4464
+ },
4465
+ {
4466
+ in: "body",
4467
+ key: "method"
4468
+ },
4469
+ {
4470
+ in: "body",
4471
+ key: "route"
4472
+ },
4473
+ {
4474
+ in: "body",
4475
+ key: "referenceDigest"
4476
+ },
4477
+ {
4478
+ in: "body",
4479
+ key: "research"
4480
+ },
4481
+ {
4482
+ in: "body",
4483
+ key: "competitorMessage"
4484
+ }
4485
+ ] }]);
4486
+ return (options?.client ?? client).post({
4487
+ security: [{
4488
+ name: "x-api-key",
4489
+ type: "apiKey"
4490
+ }],
4491
+ url: "/v1/template-documents/{templateId}/agent-admission",
4492
+ ...options,
4493
+ ...params,
4494
+ headers: {
4495
+ "Content-Type": "application/json",
4496
+ ...options?.headers,
4497
+ ...params.headers
4498
+ }
4499
+ });
4500
+ }
4501
+ /**
4502
+ * Complete an agent conversation clear
4503
+ *
4504
+ * Records completion of an admitted agent conversation-clear operation for the template document.
4505
+ */
4506
+ static completeAgentConversationClear(parameters, options) {
4507
+ const params = buildClientParams([parameters], [{ args: [{
4508
+ in: "path",
4509
+ key: "templateId"
4510
+ }, {
4511
+ in: "body",
4512
+ key: "conversationId"
4513
+ }] }]);
4514
+ return (options?.client ?? client).post({
4515
+ security: [{
4516
+ name: "x-api-key",
4517
+ type: "apiKey"
4518
+ }],
4519
+ url: "/v1/template-documents/{templateId}/agent-conversation/clear-completion",
4520
+ ...options,
4521
+ ...params,
4522
+ headers: {
4523
+ "Content-Type": "application/json",
4524
+ ...options?.headers,
4525
+ ...params.headers
4526
+ }
4527
+ });
4528
+ }
4529
+ /**
4530
+ * Apply an agent proposal
4531
+ *
4532
+ * Applies an admitted agent-authored source proposal when its revision and source digest still match the document.
4533
+ */
4534
+ static applyAgentProposal(parameters, options) {
4535
+ const params = buildClientParams([parameters], [{ args: [
4536
+ {
4537
+ in: "path",
4538
+ key: "templateId"
4539
+ },
4540
+ {
4541
+ in: "body",
4542
+ key: "expectedRevision"
4543
+ },
4544
+ {
4545
+ in: "body",
4546
+ key: "sourceDigest"
4547
+ },
4548
+ {
4549
+ in: "body",
4550
+ key: "idempotencyKey"
4551
+ },
4552
+ {
4553
+ in: "body",
4554
+ key: "source"
4555
+ },
4556
+ {
4557
+ in: "body",
4558
+ key: "references"
4559
+ },
4560
+ {
4561
+ in: "body",
4562
+ key: "proposalBinding"
4563
+ }
4564
+ ] }]);
4565
+ return (options?.client ?? client).post({
4566
+ security: [{
4567
+ name: "x-api-key",
4568
+ type: "apiKey"
4569
+ }],
4570
+ url: "/v1/template-documents/{templateId}/agent-proposals/apply",
4571
+ ...options,
4572
+ ...params,
4573
+ headers: {
4574
+ "Content-Type": "application/json",
4575
+ ...options?.headers,
4576
+ ...params.headers
4577
+ }
4578
+ });
4579
+ }
4580
+ /**
4581
+ * Replace template source
4582
+ *
4583
+ * Replaces the editable SML source when the expected revision matches and returns the updated document snapshot.
4584
+ */
4275
4585
  static replace(parameters, options) {
4276
4586
  const params = buildClientParams([parameters], [{ args: [
4277
4587
  {
@@ -4302,6 +4612,11 @@ var TemplateDocuments = class {
4302
4612
  }
4303
4613
  });
4304
4614
  }
4615
+ /**
4616
+ * Save a template document
4617
+ *
4618
+ * Materializes the specified document revision as a durable template source version and returns its receipt.
4619
+ */
4305
4620
  static save(parameters, options) {
4306
4621
  const params = buildClientParams([parameters], [{ args: [{
4307
4622
  in: "path",
@@ -4325,6 +4640,11 @@ var TemplateDocuments = class {
4325
4640
  }
4326
4641
  });
4327
4642
  }
4643
+ /**
4644
+ * Render a template document
4645
+ *
4646
+ * Renders the specified document revision with optional variables and reports any missing variables.
4647
+ */
4328
4648
  static render(parameters, options) {
4329
4649
  const params = buildClientParams([parameters], [{ args: [
4330
4650
  {
@@ -4355,6 +4675,11 @@ var TemplateDocuments = class {
4355
4675
  }
4356
4676
  });
4357
4677
  }
4678
+ /**
4679
+ * Check a template document for spam
4680
+ *
4681
+ * Renders and analyzes the specified document revision for spam risks, returning issues and recommendations.
4682
+ */
4358
4683
  static spamCheck(parameters, options) {
4359
4684
  const params = buildClientParams([parameters], [{ args: [
4360
4685
  {
@@ -4385,6 +4710,11 @@ var TemplateDocuments = class {
4385
4710
  }
4386
4711
  });
4387
4712
  }
4713
+ /**
4714
+ * Send a template test
4715
+ *
4716
+ * Renders the specified document revision and sends a test message to one recipient without publishing it.
4717
+ */
4388
4718
  static testSend(parameters, options) {
4389
4719
  const params = buildClientParams([parameters], [{ args: [
4390
4720
  {
@@ -4419,6 +4749,11 @@ var TemplateDocuments = class {
4419
4749
  }
4420
4750
  });
4421
4751
  }
4752
+ /**
4753
+ * Send a template document
4754
+ *
4755
+ * Sends or schedules the specified document revision for one or more recipients with optional variables.
4756
+ */
4422
4757
  static send(parameters, options) {
4423
4758
  const params = buildClientParams([parameters], [{ args: [
4424
4759
  {
@@ -4457,6 +4792,11 @@ var TemplateDocuments = class {
4457
4792
  }
4458
4793
  });
4459
4794
  }
4795
+ /**
4796
+ * List template document versions
4797
+ *
4798
+ * Returns the saved source-version history for a template document.
4799
+ */
4460
4800
  static versions(parameters, options) {
4461
4801
  const params = buildClientParams([parameters], [{ args: [{
4462
4802
  in: "path",
@@ -4472,6 +4812,11 @@ var TemplateDocuments = class {
4472
4812
  ...params
4473
4813
  });
4474
4814
  }
4815
+ /**
4816
+ * Publish a template document
4817
+ *
4818
+ * Publishes the current saved template source version and returns its lifecycle receipt.
4819
+ */
4475
4820
  static publish(parameters, options) {
4476
4821
  const params = buildClientParams([parameters], [{ args: [{
4477
4822
  in: "path",
@@ -4487,6 +4832,11 @@ var TemplateDocuments = class {
4487
4832
  ...params
4488
4833
  });
4489
4834
  }
4835
+ /**
4836
+ * Unpublish a template document
4837
+ *
4838
+ * Unpublishes the current template source version and returns its lifecycle receipt.
4839
+ */
4490
4840
  static unpublish(parameters, options) {
4491
4841
  const params = buildClientParams([parameters], [{ args: [{
4492
4842
  in: "path",
@@ -4502,6 +4852,11 @@ var TemplateDocuments = class {
4502
4852
  ...params
4503
4853
  });
4504
4854
  }
4855
+ /**
4856
+ * Restore a template document version
4857
+ *
4858
+ * Restores a saved source version into the editable document when the expected revision matches.
4859
+ */
4505
4860
  static restore(parameters, options) {
4506
4861
  const params = buildClientParams([parameters], [{ args: [
4507
4862
  {
@@ -5197,7 +5552,7 @@ var ApiKeys = class {
5197
5552
  /**
5198
5553
  * Rotate an API key
5199
5554
  *
5200
- * Deactivates the existing key and issues a replacement with the same name and permissions. Returns the new key, including the plaintext secret.
5555
+ * Issues a replacement with the same owner, name, and permissions, then deactivates the existing key. Returns the new key, including the plaintext secret.
5201
5556
  */
5202
5557
  static rotate(parameters, options) {
5203
5558
  const params = buildClientParams([parameters], [{ args: [{
@@ -5786,7 +6141,7 @@ function createPromiseMessagesTransport(clientInstance) {
5786
6141
  getEmail: boundMessages.getEmail,
5787
6142
  getStatus: boundMessages.getStatus,
5788
6143
  getEvents: boundMessages.getEvents,
5789
- send: (input, options) => Messages.send({ body: buildMessagesSendPayload(input) }, {
6144
+ send: (input, options) => Messages.send({ emailSendMessagePayload: buildMessagesSendPayload(input) }, {
5790
6145
  ...options,
5791
6146
  client: clientInstance
5792
6147
  })
@@ -5805,7 +6160,7 @@ function createPromiseEmailTransport(clientInstance) {
5805
6160
  client: clientInstance
5806
6161
  });
5807
6162
  },
5808
- send: (input, options) => Messages.send({ body: buildEmailSendPayload(input) }, {
6163
+ send: (input, options) => Messages.send({ emailSendMessagePayload: buildEmailSendPayload(input) }, {
5809
6164
  ...options,
5810
6165
  client: clientInstance
5811
6166
  })
@@ -5876,6 +6231,7 @@ function createClient(config) {
5876
6231
  scheduledMessages: createBoundService(ScheduledMessages, clientInstance),
5877
6232
  campaigns: createBoundService(Campaigns, clientInstance),
5878
6233
  email: createBoundService(Email, clientInstance),
6234
+ media: createBoundService(Media, clientInstance),
5879
6235
  templates: createBoundService(Templates, clientInstance),
5880
6236
  templateDocuments: createBoundService(TemplateDocuments, clientInstance),
5881
6237
  contacts: createBoundService(Contacts, clientInstance),
@@ -5894,6 +6250,7 @@ function createClient(config) {
5894
6250
  scheduledMessages: createDirectService(raw.scheduledMessages),
5895
6251
  campaigns: createDirectService(raw.campaigns),
5896
6252
  email: createDirectService(promiseEmail),
6253
+ media: createDirectService(raw.media),
5897
6254
  templates: createDirectService(raw.templates),
5898
6255
  templateDocuments: createDirectService(raw.templateDocuments),
5899
6256
  contacts: createDirectService(raw.contacts),
@@ -5908,4 +6265,4 @@ function createClient(config) {
5908
6265
  //#endregion
5909
6266
  export { fromApiError as _, ExternalServiceError as a, InternalError as c, ResourceNotFoundError as d, SamvaApiError as f, WebhookEnqueueError as g, ValidationError as h, EmailChannelError as i, PaymentRequiredError as l, UnauthorizedError as m, BillingProviderError as n, FlagDisabledError as o, SamvaTransportError as p, ConflictError as r, ForbiddenError as s, createClient as t, RateLimitedError as u };
5910
6267
 
5911
- //# sourceMappingURL=promises-Dgv8UmCC.js.map
6268
+ //# sourceMappingURL=promises-oiy7mOyu.js.map
@@ -120,6 +120,13 @@ export declare const SDK_SERVICE_OPERATIONS: {
120
120
  readonly getStatus: "messagesGetStatus";
121
121
  readonly getEvents: "messagesGetEvents";
122
122
  };
123
+ readonly media: {
124
+ readonly create: "mediaCreate";
125
+ readonly getById: "mediaGetById";
126
+ readonly remove: "mediaRemove";
127
+ readonly complete: "mediaComplete";
128
+ readonly downloadUrl: "mediaDownloadUrl";
129
+ };
123
130
  readonly operations: {
124
131
  readonly list: "operationsList";
125
132
  readonly get: "operationsGet";
@@ -226,6 +233,25 @@ export declare const SDK_OPERATION_CALLS: {
226
233
  readonly kind: "path";
227
234
  readonly paths: readonly ["id"];
228
235
  };
236
+ readonly mediaCreate: {
237
+ readonly kind: "payload";
238
+ };
239
+ readonly mediaGetById: {
240
+ readonly kind: "path";
241
+ readonly paths: readonly ["mediaId"];
242
+ };
243
+ readonly mediaRemove: {
244
+ readonly kind: "path";
245
+ readonly paths: readonly ["mediaId"];
246
+ };
247
+ readonly mediaComplete: {
248
+ readonly kind: "path";
249
+ readonly paths: readonly ["mediaId"];
250
+ };
251
+ readonly mediaDownloadUrl: {
252
+ readonly kind: "path";
253
+ readonly paths: readonly ["mediaId"];
254
+ };
229
255
  readonly scheduledMessagesList: {
230
256
  readonly kind: "params";
231
257
  };