@atproto/ozone 0.0.2 → 0.0.4

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 (73) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/api/admin/listCommunicationTemplates.d.ts +3 -0
  3. package/dist/api/admin/updateCommunicationTemplate.d.ts +3 -0
  4. package/dist/communication-service/template.d.ts +18 -0
  5. package/dist/context.d.ts +3 -0
  6. package/dist/db/index.js +18 -1
  7. package/dist/db/index.js.map +3 -3
  8. package/dist/db/migrations/20240116T085607200Z-communication-template.d.ts +3 -0
  9. package/dist/db/migrations/index.d.ts +1 -0
  10. package/dist/db/schema/communication_template.d.ts +15 -0
  11. package/dist/db/schema/index.d.ts +2 -1
  12. package/dist/index.js +861 -240
  13. package/dist/index.js.map +3 -3
  14. package/dist/lexicon/index.d.ts +8 -0
  15. package/dist/lexicon/lexicons.d.ts +182 -0
  16. package/dist/lexicon/types/{app/bsky/unspecced/getPopular.d.ts → com/atproto/admin/createCommunicationTemplate.d.ts} +11 -9
  17. package/dist/lexicon/types/com/atproto/admin/defs.d.ts +13 -0
  18. package/dist/lexicon/types/com/atproto/admin/deleteCommunicationTemplate.d.ts +25 -0
  19. package/dist/lexicon/types/{app/bsky/moderation/getServices.d.ts → com/atproto/admin/listCommunicationTemplates.d.ts} +2 -3
  20. package/dist/lexicon/types/{app/bsky/moderation/getService.d.ts → com/atproto/admin/updateCommunicationTemplate.d.ts} +15 -5
  21. package/package.json +8 -8
  22. package/src/api/admin/createCommunicationTemplate.ts +37 -0
  23. package/src/api/admin/deleteCommunicationTemplate.ts +23 -0
  24. package/src/api/admin/listCommunicationTemplates.ts +31 -0
  25. package/src/api/admin/updateCommunicationTemplate.ts +40 -0
  26. package/src/api/index.ts +8 -0
  27. package/src/communication-service/template.ts +105 -0
  28. package/src/context.ts +12 -0
  29. package/src/db/migrations/20240116T085607200Z-communication-template.ts +23 -0
  30. package/src/db/migrations/index.ts +1 -0
  31. package/src/db/schema/communication_template.ts +18 -0
  32. package/src/db/schema/index.ts +3 -1
  33. package/src/lexicon/index.ts +48 -0
  34. package/src/lexicon/lexicons.ts +199 -0
  35. package/src/lexicon/types/com/atproto/admin/createCommunicationTemplate.ts +54 -0
  36. package/src/lexicon/types/com/atproto/admin/defs.ts +35 -0
  37. package/src/lexicon/types/com/atproto/admin/deleteCommunicationTemplate.ts +38 -0
  38. package/src/lexicon/types/com/atproto/admin/listCommunicationTemplates.ts +44 -0
  39. package/src/lexicon/types/com/atproto/admin/updateCommunicationTemplate.ts +57 -0
  40. package/tests/communication-templates.test.ts +131 -0
  41. package/dist/api/com/atproto/admin/emitModerationEvent.d.ts +0 -3
  42. package/dist/api/com/atproto/admin/getModerationEvent.d.ts +0 -3
  43. package/dist/api/com/atproto/admin/getRecord.d.ts +0 -3
  44. package/dist/api/com/atproto/admin/getRepo.d.ts +0 -3
  45. package/dist/api/com/atproto/admin/queryModerationEvents.d.ts +0 -3
  46. package/dist/api/com/atproto/admin/queryModerationStatuses.d.ts +0 -3
  47. package/dist/api/com/atproto/admin/searchRepos.d.ts +0 -3
  48. package/dist/api/com/atproto/admin/util.d.ts +0 -5
  49. package/dist/api/com/atproto/moderation/createReport.d.ts +0 -3
  50. package/dist/api/com/atproto/moderation/util.d.ts +0 -4
  51. package/dist/api/com/atproto/temp/fetchLabels.d.ts +0 -3
  52. package/dist/api/util.d.ts +0 -2
  53. package/dist/auth-verifier.d.ts +0 -47
  54. package/dist/config.d.ts +0 -42
  55. package/dist/daemon/config.d.ts +0 -23
  56. package/dist/lexicon/types/app/bsky/moderation/defs.d.ts +0 -49
  57. package/dist/lexicon/types/app/bsky/moderation/service.d.ts +0 -17
  58. package/dist/sequencer/index.d.ts +0 -2
  59. package/dist/sequencer/outbox.d.ts +0 -16
  60. package/dist/sequencer/sequencer.d.ts +0 -35
  61. package/dist/services/index.d.ts +0 -7
  62. package/dist/services/moderation/index.d.ts +0 -144
  63. package/dist/services/moderation/status.d.ts +0 -12
  64. package/dist/services/moderation/subject.d.ts +0 -60
  65. package/dist/services/moderation/types.d.ts +0 -19
  66. package/dist/services/moderation/views.d.ts +0 -42
  67. package/dist/services/types.d.ts +0 -2
  68. package/dist/util/date.d.ts +0 -1
  69. package/dist/util/debug.d.ts +0 -1
  70. package/dist/util/retry.d.ts +0 -3
  71. package/test.log +0 -0
  72. /package/dist/api/{label/queryLabels.d.ts → admin/createCommunicationTemplate.d.ts} +0 -0
  73. /package/dist/api/{label/subscribeLabels.d.ts → admin/deleteCommunicationTemplate.d.ts} +0 -0
package/dist/index.js CHANGED
@@ -27864,16 +27864,16 @@ var require_validate = __commonJS({
27864
27864
  const matches = RELATIVE_JSON_POINTER.exec($data);
27865
27865
  if (!matches)
27866
27866
  throw new Error(`Invalid JSON-pointer: ${$data}`);
27867
- const up2 = +matches[1];
27867
+ const up3 = +matches[1];
27868
27868
  jsonPointer = matches[2];
27869
27869
  if (jsonPointer === "#") {
27870
- if (up2 >= dataLevel)
27871
- throw new Error(errorMsg("property/index", up2));
27872
- return dataPathArr[dataLevel - up2];
27870
+ if (up3 >= dataLevel)
27871
+ throw new Error(errorMsg("property/index", up3));
27872
+ return dataPathArr[dataLevel - up3];
27873
27873
  }
27874
- if (up2 > dataLevel)
27875
- throw new Error(errorMsg("data", up2));
27876
- data = dataNames[dataLevel - up2];
27874
+ if (up3 > dataLevel)
27875
+ throw new Error(errorMsg("data", up3));
27876
+ data = dataNames[dataLevel - up3];
27877
27877
  if (!jsonPointer)
27878
27878
  return data;
27879
27879
  }
@@ -27886,8 +27886,8 @@ var require_validate = __commonJS({
27886
27886
  }
27887
27887
  }
27888
27888
  return expr;
27889
- function errorMsg(pointerType, up2) {
27890
- return `Cannot access ${pointerType} ${up2} levels up, current level is ${dataLevel}`;
27889
+ function errorMsg(pointerType, up3) {
27890
+ return `Cannot access ${pointerType} ${up3} levels up, current level is ${dataLevel}`;
27891
27891
  }
27892
27892
  }
27893
27893
  exports.getData = getData;
@@ -101599,6 +101599,49 @@ var REASONAPPEAL = "com.atproto.moderation.defs#reasonAppeal";
101599
101599
 
101600
101600
  // src/lexicon/lexicons.ts
101601
101601
  var schemaDict = {
101602
+ ComAtprotoAdminCreateCommunicationTemplate: {
101603
+ lexicon: 1,
101604
+ id: "com.atproto.admin.createCommunicationTemplate",
101605
+ defs: {
101606
+ main: {
101607
+ type: "procedure",
101608
+ description: "Administrative action to create a new, re-usable communication (email for now) template.",
101609
+ input: {
101610
+ encoding: "application/json",
101611
+ schema: {
101612
+ type: "object",
101613
+ required: ["subject", "contentMarkdown", "name"],
101614
+ properties: {
101615
+ name: {
101616
+ type: "string",
101617
+ description: "Name of the template."
101618
+ },
101619
+ contentMarkdown: {
101620
+ type: "string",
101621
+ description: "Content of the template, markdown supported, can contain variable placeholders."
101622
+ },
101623
+ subject: {
101624
+ type: "string",
101625
+ description: "Subject of the message, used in emails."
101626
+ },
101627
+ createdBy: {
101628
+ type: "string",
101629
+ format: "did",
101630
+ description: "DID of the user who is creating the template."
101631
+ }
101632
+ }
101633
+ }
101634
+ },
101635
+ output: {
101636
+ encoding: "application/json",
101637
+ schema: {
101638
+ type: "ref",
101639
+ ref: "lex:com.atproto.admin.defs#communicationTemplateView"
101640
+ }
101641
+ }
101642
+ }
101643
+ }
101644
+ },
101602
101645
  ComAtprotoAdminDefs: {
101603
101646
  lexicon: 1,
101604
101647
  id: "com.atproto.admin.defs",
@@ -102436,6 +102479,51 @@ var schemaDict = {
102436
102479
  description: "Additional comment about the outgoing comm."
102437
102480
  }
102438
102481
  }
102482
+ },
102483
+ communicationTemplateView: {
102484
+ type: "object",
102485
+ required: [
102486
+ "id",
102487
+ "name",
102488
+ "contentMarkdown",
102489
+ "disabled",
102490
+ "lastUpdatedBy",
102491
+ "createdAt",
102492
+ "updatedAt"
102493
+ ],
102494
+ properties: {
102495
+ id: {
102496
+ type: "string"
102497
+ },
102498
+ name: {
102499
+ type: "string",
102500
+ description: "Name of the template."
102501
+ },
102502
+ subject: {
102503
+ type: "string",
102504
+ description: "Content of the template, can contain markdown and variable placeholders."
102505
+ },
102506
+ contentMarkdown: {
102507
+ type: "string",
102508
+ description: "Subject of the message, used in emails."
102509
+ },
102510
+ disabled: {
102511
+ type: "boolean"
102512
+ },
102513
+ lastUpdatedBy: {
102514
+ type: "string",
102515
+ format: "did",
102516
+ description: "DID of the user who last updated the template."
102517
+ },
102518
+ createdAt: {
102519
+ type: "string",
102520
+ format: "datetime"
102521
+ },
102522
+ updatedAt: {
102523
+ type: "string",
102524
+ format: "datetime"
102525
+ }
102526
+ }
102439
102527
  }
102440
102528
  }
102441
102529
  },
@@ -102462,6 +102550,28 @@ var schemaDict = {
102462
102550
  }
102463
102551
  }
102464
102552
  },
102553
+ ComAtprotoAdminDeleteCommunicationTemplate: {
102554
+ lexicon: 1,
102555
+ id: "com.atproto.admin.deleteCommunicationTemplate",
102556
+ defs: {
102557
+ main: {
102558
+ type: "procedure",
102559
+ description: "Delete a communication template.",
102560
+ input: {
102561
+ encoding: "application/json",
102562
+ schema: {
102563
+ type: "object",
102564
+ required: ["id"],
102565
+ properties: {
102566
+ id: {
102567
+ type: "string"
102568
+ }
102569
+ }
102570
+ }
102571
+ }
102572
+ }
102573
+ }
102574
+ },
102465
102575
  ComAtprotoAdminDisableAccountInvites: {
102466
102576
  lexicon: 1,
102467
102577
  id: "com.atproto.admin.disableAccountInvites",
@@ -102866,6 +102976,32 @@ var schemaDict = {
102866
102976
  }
102867
102977
  }
102868
102978
  },
102979
+ ComAtprotoAdminListCommunicationTemplates: {
102980
+ lexicon: 1,
102981
+ id: "com.atproto.admin.listCommunicationTemplates",
102982
+ defs: {
102983
+ main: {
102984
+ type: "query",
102985
+ description: "Get list of all communication templates.",
102986
+ output: {
102987
+ encoding: "application/json",
102988
+ schema: {
102989
+ type: "object",
102990
+ required: ["communicationTemplates"],
102991
+ properties: {
102992
+ communicationTemplates: {
102993
+ type: "array",
102994
+ items: {
102995
+ type: "ref",
102996
+ ref: "lex:com.atproto.admin.defs#communicationTemplateView"
102997
+ }
102998
+ }
102999
+ }
103000
+ }
103001
+ }
103002
+ }
103003
+ }
103004
+ },
102869
103005
  ComAtprotoAdminQueryModerationEvents: {
102870
103006
  lexicon: 1,
102871
103007
  id: "com.atproto.admin.queryModerationEvents",
@@ -103197,6 +103333,56 @@ var schemaDict = {
103197
103333
  }
103198
103334
  }
103199
103335
  },
103336
+ ComAtprotoAdminUpdateCommunicationTemplate: {
103337
+ lexicon: 1,
103338
+ id: "com.atproto.admin.updateCommunicationTemplate",
103339
+ defs: {
103340
+ main: {
103341
+ type: "procedure",
103342
+ description: "Administrative action to update an existing communication template. Allows passing partial fields to patch specific fields only.",
103343
+ input: {
103344
+ encoding: "application/json",
103345
+ schema: {
103346
+ type: "object",
103347
+ required: ["id"],
103348
+ properties: {
103349
+ id: {
103350
+ type: "string",
103351
+ description: "ID of the template to be updated."
103352
+ },
103353
+ name: {
103354
+ type: "string",
103355
+ description: "Name of the template."
103356
+ },
103357
+ contentMarkdown: {
103358
+ type: "string",
103359
+ description: "Content of the template, markdown supported, can contain variable placeholders."
103360
+ },
103361
+ subject: {
103362
+ type: "string",
103363
+ description: "Subject of the message, used in emails."
103364
+ },
103365
+ updatedBy: {
103366
+ type: "string",
103367
+ format: "did",
103368
+ description: "DID of the user who is updating the template."
103369
+ },
103370
+ disabled: {
103371
+ type: "boolean"
103372
+ }
103373
+ }
103374
+ }
103375
+ },
103376
+ output: {
103377
+ encoding: "application/json",
103378
+ schema: {
103379
+ type: "ref",
103380
+ ref: "lex:com.atproto.admin.defs#communicationTemplateView"
103381
+ }
103382
+ }
103383
+ }
103384
+ }
103385
+ },
103200
103386
  ComAtprotoAdminUpdateSubjectStatus: {
103201
103387
  lexicon: 1,
103202
103388
  id: "com.atproto.admin.updateSubjectStatus",
@@ -109931,6 +110117,103 @@ function fetchLabels_default(server, ctx) {
109931
110117
  });
109932
110118
  }
109933
110119
 
110120
+ // src/api/admin/createCommunicationTemplate.ts
110121
+ function createCommunicationTemplate_default(server, ctx) {
110122
+ server.com.atproto.admin.createCommunicationTemplate({
110123
+ auth: ctx.roleVerifier,
110124
+ handler: async ({ input, auth }) => {
110125
+ const access = auth.credentials;
110126
+ const db = ctx.db;
110127
+ const { createdBy, ...template } = input.body;
110128
+ if (!access.admin) {
110129
+ throw new AuthRequiredError("Must be an admin to create a communication template");
110130
+ }
110131
+ if (!createdBy) {
110132
+ throw new InvalidRequestError("createdBy field is required");
110133
+ }
110134
+ const communicationTemplate = ctx.communicationTemplateService(db);
110135
+ const newTemplate = await communicationTemplate.create({
110136
+ ...template,
110137
+ disabled: false,
110138
+ lastUpdatedBy: createdBy
110139
+ });
110140
+ return {
110141
+ encoding: "application/json",
110142
+ body: communicationTemplate.view(newTemplate)
110143
+ };
110144
+ }
110145
+ });
110146
+ }
110147
+
110148
+ // src/api/admin/updateCommunicationTemplate.ts
110149
+ function updateCommunicationTemplate_default(server, ctx) {
110150
+ server.com.atproto.admin.updateCommunicationTemplate({
110151
+ auth: ctx.roleVerifier,
110152
+ handler: async ({ input, auth }) => {
110153
+ const access = auth.credentials;
110154
+ const db = ctx.db;
110155
+ const { id, updatedBy, ...template } = input.body;
110156
+ if (!access.admin) {
110157
+ throw new AuthRequiredError("Must be an admin to update a communication template");
110158
+ }
110159
+ if (!updatedBy) {
110160
+ throw new InvalidRequestError("updatedBy field is required");
110161
+ }
110162
+ if (!Object.keys(template).length) {
110163
+ throw new InvalidRequestError("Missing update data in request body");
110164
+ }
110165
+ const communicationTemplate = ctx.communicationTemplateService(db);
110166
+ const updatedTemplate = await communicationTemplate.update(Number(id), {
110167
+ ...template,
110168
+ lastUpdatedBy: updatedBy
110169
+ });
110170
+ return {
110171
+ encoding: "application/json",
110172
+ body: communicationTemplate.view(updatedTemplate)
110173
+ };
110174
+ }
110175
+ });
110176
+ }
110177
+
110178
+ // src/api/admin/deleteCommunicationTemplate.ts
110179
+ function deleteCommunicationTemplate_default(server, ctx) {
110180
+ server.com.atproto.admin.deleteCommunicationTemplate({
110181
+ auth: ctx.roleVerifier,
110182
+ handler: async ({ input, auth }) => {
110183
+ const access = auth.credentials;
110184
+ const db = ctx.db;
110185
+ const { id } = input.body;
110186
+ if (!access.admin) {
110187
+ throw new AuthRequiredError("Must be an admin to delete a communication template");
110188
+ }
110189
+ const communicationTemplate = ctx.communicationTemplateService(db);
110190
+ await communicationTemplate.delete(Number(id));
110191
+ }
110192
+ });
110193
+ }
110194
+
110195
+ // src/api/admin/listCommunicationTemplates.ts
110196
+ function listCommunicationTemplates_default(server, ctx) {
110197
+ server.com.atproto.admin.listCommunicationTemplates({
110198
+ auth: ctx.roleVerifier,
110199
+ handler: async ({ auth }) => {
110200
+ const access = auth.credentials;
110201
+ const db = ctx.db;
110202
+ if (!access.moderator) {
110203
+ throw new AuthRequiredError("Must be a full moderator to view list of communication template");
110204
+ }
110205
+ const communicationTemplate = ctx.communicationTemplateService(db);
110206
+ const list = await communicationTemplate.list();
110207
+ return {
110208
+ encoding: "application/json",
110209
+ body: {
110210
+ communicationTemplates: list.map((item) => communicationTemplate.view(item))
110211
+ }
110212
+ };
110213
+ }
110214
+ });
110215
+ }
110216
+
109934
110217
  // src/api/health.ts
109935
110218
  var health_exports = {};
109936
110219
  __export(health_exports, {
@@ -117536,6 +117819,10 @@ function api_default(server, ctx) {
117536
117819
  queryModerationEvents_default(server, ctx);
117537
117820
  queryModerationStatuses_default(server, ctx);
117538
117821
  fetchLabels_default(server, ctx);
117822
+ listCommunicationTemplates_default(server, ctx);
117823
+ createCommunicationTemplate_default(server, ctx);
117824
+ updateCommunicationTemplate_default(server, ctx);
117825
+ deleteCommunicationTemplate_default(server, ctx);
117539
117826
  return server;
117540
117827
  }
117541
117828
 
@@ -117599,10 +117886,18 @@ var ComAtprotoAdminNS = class {
117599
117886
  constructor(server) {
117600
117887
  this._server = server;
117601
117888
  }
117889
+ createCommunicationTemplate(cfg) {
117890
+ const nsid2 = "com.atproto.admin.createCommunicationTemplate";
117891
+ return this._server.xrpc.method(nsid2, cfg);
117892
+ }
117602
117893
  deleteAccount(cfg) {
117603
117894
  const nsid2 = "com.atproto.admin.deleteAccount";
117604
117895
  return this._server.xrpc.method(nsid2, cfg);
117605
117896
  }
117897
+ deleteCommunicationTemplate(cfg) {
117898
+ const nsid2 = "com.atproto.admin.deleteCommunicationTemplate";
117899
+ return this._server.xrpc.method(nsid2, cfg);
117900
+ }
117606
117901
  disableAccountInvites(cfg) {
117607
117902
  const nsid2 = "com.atproto.admin.disableAccountInvites";
117608
117903
  return this._server.xrpc.method(nsid2, cfg);
@@ -117647,6 +117942,10 @@ var ComAtprotoAdminNS = class {
117647
117942
  const nsid2 = "com.atproto.admin.getSubjectStatus";
117648
117943
  return this._server.xrpc.method(nsid2, cfg);
117649
117944
  }
117945
+ listCommunicationTemplates(cfg) {
117946
+ const nsid2 = "com.atproto.admin.listCommunicationTemplates";
117947
+ return this._server.xrpc.method(nsid2, cfg);
117948
+ }
117650
117949
  queryModerationEvents(cfg) {
117651
117950
  const nsid2 = "com.atproto.admin.queryModerationEvents";
117652
117951
  return this._server.xrpc.method(nsid2, cfg);
@@ -117671,6 +117970,10 @@ var ComAtprotoAdminNS = class {
117671
117970
  const nsid2 = "com.atproto.admin.updateAccountHandle";
117672
117971
  return this._server.xrpc.method(nsid2, cfg);
117673
117972
  }
117973
+ updateCommunicationTemplate(cfg) {
117974
+ const nsid2 = "com.atproto.admin.updateCommunicationTemplate";
117975
+ return this._server.xrpc.method(nsid2, cfg);
117976
+ }
117674
117977
  updateSubjectStatus(cfg) {
117675
117978
  const nsid2 = "com.atproto.admin.updateSubjectStatus";
117676
117979
  return this._server.xrpc.method(nsid2, cfg);
@@ -118486,6 +118789,49 @@ var IdResolver = class {
118486
118789
 
118487
118790
  // ../api/src/client/lexicons.ts
118488
118791
  var schemaDict2 = {
118792
+ ComAtprotoAdminCreateCommunicationTemplate: {
118793
+ lexicon: 1,
118794
+ id: "com.atproto.admin.createCommunicationTemplate",
118795
+ defs: {
118796
+ main: {
118797
+ type: "procedure",
118798
+ description: "Administrative action to create a new, re-usable communication (email for now) template.",
118799
+ input: {
118800
+ encoding: "application/json",
118801
+ schema: {
118802
+ type: "object",
118803
+ required: ["subject", "contentMarkdown", "name"],
118804
+ properties: {
118805
+ name: {
118806
+ type: "string",
118807
+ description: "Name of the template."
118808
+ },
118809
+ contentMarkdown: {
118810
+ type: "string",
118811
+ description: "Content of the template, markdown supported, can contain variable placeholders."
118812
+ },
118813
+ subject: {
118814
+ type: "string",
118815
+ description: "Subject of the message, used in emails."
118816
+ },
118817
+ createdBy: {
118818
+ type: "string",
118819
+ format: "did",
118820
+ description: "DID of the user who is creating the template."
118821
+ }
118822
+ }
118823
+ }
118824
+ },
118825
+ output: {
118826
+ encoding: "application/json",
118827
+ schema: {
118828
+ type: "ref",
118829
+ ref: "lex:com.atproto.admin.defs#communicationTemplateView"
118830
+ }
118831
+ }
118832
+ }
118833
+ }
118834
+ },
118489
118835
  ComAtprotoAdminDefs: {
118490
118836
  lexicon: 1,
118491
118837
  id: "com.atproto.admin.defs",
@@ -119323,6 +119669,51 @@ var schemaDict2 = {
119323
119669
  description: "Additional comment about the outgoing comm."
119324
119670
  }
119325
119671
  }
119672
+ },
119673
+ communicationTemplateView: {
119674
+ type: "object",
119675
+ required: [
119676
+ "id",
119677
+ "name",
119678
+ "contentMarkdown",
119679
+ "disabled",
119680
+ "lastUpdatedBy",
119681
+ "createdAt",
119682
+ "updatedAt"
119683
+ ],
119684
+ properties: {
119685
+ id: {
119686
+ type: "string"
119687
+ },
119688
+ name: {
119689
+ type: "string",
119690
+ description: "Name of the template."
119691
+ },
119692
+ subject: {
119693
+ type: "string",
119694
+ description: "Content of the template, can contain markdown and variable placeholders."
119695
+ },
119696
+ contentMarkdown: {
119697
+ type: "string",
119698
+ description: "Subject of the message, used in emails."
119699
+ },
119700
+ disabled: {
119701
+ type: "boolean"
119702
+ },
119703
+ lastUpdatedBy: {
119704
+ type: "string",
119705
+ format: "did",
119706
+ description: "DID of the user who last updated the template."
119707
+ },
119708
+ createdAt: {
119709
+ type: "string",
119710
+ format: "datetime"
119711
+ },
119712
+ updatedAt: {
119713
+ type: "string",
119714
+ format: "datetime"
119715
+ }
119716
+ }
119326
119717
  }
119327
119718
  }
119328
119719
  },
@@ -119349,6 +119740,28 @@ var schemaDict2 = {
119349
119740
  }
119350
119741
  }
119351
119742
  },
119743
+ ComAtprotoAdminDeleteCommunicationTemplate: {
119744
+ lexicon: 1,
119745
+ id: "com.atproto.admin.deleteCommunicationTemplate",
119746
+ defs: {
119747
+ main: {
119748
+ type: "procedure",
119749
+ description: "Delete a communication template.",
119750
+ input: {
119751
+ encoding: "application/json",
119752
+ schema: {
119753
+ type: "object",
119754
+ required: ["id"],
119755
+ properties: {
119756
+ id: {
119757
+ type: "string"
119758
+ }
119759
+ }
119760
+ }
119761
+ }
119762
+ }
119763
+ }
119764
+ },
119352
119765
  ComAtprotoAdminDisableAccountInvites: {
119353
119766
  lexicon: 1,
119354
119767
  id: "com.atproto.admin.disableAccountInvites",
@@ -119753,6 +120166,32 @@ var schemaDict2 = {
119753
120166
  }
119754
120167
  }
119755
120168
  },
120169
+ ComAtprotoAdminListCommunicationTemplates: {
120170
+ lexicon: 1,
120171
+ id: "com.atproto.admin.listCommunicationTemplates",
120172
+ defs: {
120173
+ main: {
120174
+ type: "query",
120175
+ description: "Get list of all communication templates.",
120176
+ output: {
120177
+ encoding: "application/json",
120178
+ schema: {
120179
+ type: "object",
120180
+ required: ["communicationTemplates"],
120181
+ properties: {
120182
+ communicationTemplates: {
120183
+ type: "array",
120184
+ items: {
120185
+ type: "ref",
120186
+ ref: "lex:com.atproto.admin.defs#communicationTemplateView"
120187
+ }
120188
+ }
120189
+ }
120190
+ }
120191
+ }
120192
+ }
120193
+ }
120194
+ },
119756
120195
  ComAtprotoAdminQueryModerationEvents: {
119757
120196
  lexicon: 1,
119758
120197
  id: "com.atproto.admin.queryModerationEvents",
@@ -120084,6 +120523,56 @@ var schemaDict2 = {
120084
120523
  }
120085
120524
  }
120086
120525
  },
120526
+ ComAtprotoAdminUpdateCommunicationTemplate: {
120527
+ lexicon: 1,
120528
+ id: "com.atproto.admin.updateCommunicationTemplate",
120529
+ defs: {
120530
+ main: {
120531
+ type: "procedure",
120532
+ description: "Administrative action to update an existing communication template. Allows passing partial fields to patch specific fields only.",
120533
+ input: {
120534
+ encoding: "application/json",
120535
+ schema: {
120536
+ type: "object",
120537
+ required: ["id"],
120538
+ properties: {
120539
+ id: {
120540
+ type: "string",
120541
+ description: "ID of the template to be updated."
120542
+ },
120543
+ name: {
120544
+ type: "string",
120545
+ description: "Name of the template."
120546
+ },
120547
+ contentMarkdown: {
120548
+ type: "string",
120549
+ description: "Content of the template, markdown supported, can contain variable placeholders."
120550
+ },
120551
+ subject: {
120552
+ type: "string",
120553
+ description: "Subject of the message, used in emails."
120554
+ },
120555
+ updatedBy: {
120556
+ type: "string",
120557
+ format: "did",
120558
+ description: "DID of the user who is updating the template."
120559
+ },
120560
+ disabled: {
120561
+ type: "boolean"
120562
+ }
120563
+ }
120564
+ }
120565
+ },
120566
+ output: {
120567
+ encoding: "application/json",
120568
+ schema: {
120569
+ type: "ref",
120570
+ ref: "lex:com.atproto.admin.defs#communicationTemplateView"
120571
+ }
120572
+ }
120573
+ }
120574
+ }
120575
+ },
120087
120576
  ComAtprotoAdminUpdateSubjectStatus: {
120088
120577
  lexicon: 1,
120089
120578
  id: "com.atproto.admin.updateSubjectStatus",
@@ -126296,34 +126785,48 @@ var schemaDict2 = {
126296
126785
  var schemas2 = Object.values(schemaDict2);
126297
126786
  var lexicons2 = new Lexicons(schemas2);
126298
126787
 
126299
- // ../api/src/client/types/com/atproto/admin/deleteAccount.ts
126788
+ // ../api/src/client/types/com/atproto/admin/createCommunicationTemplate.ts
126300
126789
  function toKnownErr(e) {
126301
126790
  if (e instanceof XRPCError) {
126302
126791
  }
126303
126792
  return e;
126304
126793
  }
126305
126794
 
126306
- // ../api/src/client/types/com/atproto/admin/disableAccountInvites.ts
126795
+ // ../api/src/client/types/com/atproto/admin/deleteAccount.ts
126307
126796
  function toKnownErr2(e) {
126308
126797
  if (e instanceof XRPCError) {
126309
126798
  }
126310
126799
  return e;
126311
126800
  }
126312
126801
 
126313
- // ../api/src/client/types/com/atproto/admin/disableInviteCodes.ts
126802
+ // ../api/src/client/types/com/atproto/admin/deleteCommunicationTemplate.ts
126314
126803
  function toKnownErr3(e) {
126315
126804
  if (e instanceof XRPCError) {
126316
126805
  }
126317
126806
  return e;
126318
126807
  }
126319
126808
 
126809
+ // ../api/src/client/types/com/atproto/admin/disableAccountInvites.ts
126810
+ function toKnownErr4(e) {
126811
+ if (e instanceof XRPCError) {
126812
+ }
126813
+ return e;
126814
+ }
126815
+
126816
+ // ../api/src/client/types/com/atproto/admin/disableInviteCodes.ts
126817
+ function toKnownErr5(e) {
126818
+ if (e instanceof XRPCError) {
126819
+ }
126820
+ return e;
126821
+ }
126822
+
126320
126823
  // ../api/src/client/types/com/atproto/admin/emitModerationEvent.ts
126321
126824
  var SubjectHasActionError = class extends XRPCError {
126322
126825
  constructor(src3) {
126323
126826
  super(src3.status, src3.error, src3.message, src3.headers);
126324
126827
  }
126325
126828
  };
126326
- function toKnownErr4(e) {
126829
+ function toKnownErr6(e) {
126327
126830
  if (e instanceof XRPCError) {
126328
126831
  if (e.error === "SubjectHasAction")
126329
126832
  return new SubjectHasActionError(e);
@@ -126332,35 +126835,35 @@ function toKnownErr4(e) {
126332
126835
  }
126333
126836
 
126334
126837
  // ../api/src/client/types/com/atproto/admin/enableAccountInvites.ts
126335
- function toKnownErr5(e) {
126838
+ function toKnownErr7(e) {
126336
126839
  if (e instanceof XRPCError) {
126337
126840
  }
126338
126841
  return e;
126339
126842
  }
126340
126843
 
126341
126844
  // ../api/src/client/types/com/atproto/admin/getAccountInfo.ts
126342
- function toKnownErr6(e) {
126845
+ function toKnownErr8(e) {
126343
126846
  if (e instanceof XRPCError) {
126344
126847
  }
126345
126848
  return e;
126346
126849
  }
126347
126850
 
126348
126851
  // ../api/src/client/types/com/atproto/admin/getAccountInfos.ts
126349
- function toKnownErr7(e) {
126852
+ function toKnownErr9(e) {
126350
126853
  if (e instanceof XRPCError) {
126351
126854
  }
126352
126855
  return e;
126353
126856
  }
126354
126857
 
126355
126858
  // ../api/src/client/types/com/atproto/admin/getInviteCodes.ts
126356
- function toKnownErr8(e) {
126859
+ function toKnownErr10(e) {
126357
126860
  if (e instanceof XRPCError) {
126358
126861
  }
126359
126862
  return e;
126360
126863
  }
126361
126864
 
126362
126865
  // ../api/src/client/types/com/atproto/admin/getModerationEvent.ts
126363
- function toKnownErr9(e) {
126866
+ function toKnownErr11(e) {
126364
126867
  if (e instanceof XRPCError) {
126365
126868
  }
126366
126869
  return e;
@@ -126372,7 +126875,7 @@ var RecordNotFoundError = class extends XRPCError {
126372
126875
  super(src3.status, src3.error, src3.message, src3.headers);
126373
126876
  }
126374
126877
  };
126375
- function toKnownErr10(e) {
126878
+ function toKnownErr12(e) {
126376
126879
  if (e instanceof XRPCError) {
126377
126880
  if (e.error === "RecordNotFound")
126378
126881
  return new RecordNotFoundError(e);
@@ -126386,7 +126889,7 @@ var RepoNotFoundError = class extends XRPCError {
126386
126889
  super(src3.status, src3.error, src3.message, src3.headers);
126387
126890
  }
126388
126891
  };
126389
- function toKnownErr11(e) {
126892
+ function toKnownErr13(e) {
126390
126893
  if (e instanceof XRPCError) {
126391
126894
  if (e.error === "RepoNotFound")
126392
126895
  return new RepoNotFoundError(e);
@@ -126395,84 +126898,98 @@ function toKnownErr11(e) {
126395
126898
  }
126396
126899
 
126397
126900
  // ../api/src/client/types/com/atproto/admin/getSubjectStatus.ts
126398
- function toKnownErr12(e) {
126901
+ function toKnownErr14(e) {
126902
+ if (e instanceof XRPCError) {
126903
+ }
126904
+ return e;
126905
+ }
126906
+
126907
+ // ../api/src/client/types/com/atproto/admin/listCommunicationTemplates.ts
126908
+ function toKnownErr15(e) {
126399
126909
  if (e instanceof XRPCError) {
126400
126910
  }
126401
126911
  return e;
126402
126912
  }
126403
126913
 
126404
126914
  // ../api/src/client/types/com/atproto/admin/queryModerationEvents.ts
126405
- function toKnownErr13(e) {
126915
+ function toKnownErr16(e) {
126406
126916
  if (e instanceof XRPCError) {
126407
126917
  }
126408
126918
  return e;
126409
126919
  }
126410
126920
 
126411
126921
  // ../api/src/client/types/com/atproto/admin/queryModerationStatuses.ts
126412
- function toKnownErr14(e) {
126922
+ function toKnownErr17(e) {
126413
126923
  if (e instanceof XRPCError) {
126414
126924
  }
126415
126925
  return e;
126416
126926
  }
126417
126927
 
126418
126928
  // ../api/src/client/types/com/atproto/admin/searchRepos.ts
126419
- function toKnownErr15(e) {
126929
+ function toKnownErr18(e) {
126420
126930
  if (e instanceof XRPCError) {
126421
126931
  }
126422
126932
  return e;
126423
126933
  }
126424
126934
 
126425
126935
  // ../api/src/client/types/com/atproto/admin/sendEmail.ts
126426
- function toKnownErr16(e) {
126936
+ function toKnownErr19(e) {
126427
126937
  if (e instanceof XRPCError) {
126428
126938
  }
126429
126939
  return e;
126430
126940
  }
126431
126941
 
126432
126942
  // ../api/src/client/types/com/atproto/admin/updateAccountEmail.ts
126433
- function toKnownErr17(e) {
126943
+ function toKnownErr20(e) {
126434
126944
  if (e instanceof XRPCError) {
126435
126945
  }
126436
126946
  return e;
126437
126947
  }
126438
126948
 
126439
126949
  // ../api/src/client/types/com/atproto/admin/updateAccountHandle.ts
126440
- function toKnownErr18(e) {
126950
+ function toKnownErr21(e) {
126951
+ if (e instanceof XRPCError) {
126952
+ }
126953
+ return e;
126954
+ }
126955
+
126956
+ // ../api/src/client/types/com/atproto/admin/updateCommunicationTemplate.ts
126957
+ function toKnownErr22(e) {
126441
126958
  if (e instanceof XRPCError) {
126442
126959
  }
126443
126960
  return e;
126444
126961
  }
126445
126962
 
126446
126963
  // ../api/src/client/types/com/atproto/admin/updateSubjectStatus.ts
126447
- function toKnownErr19(e) {
126964
+ function toKnownErr23(e) {
126448
126965
  if (e instanceof XRPCError) {
126449
126966
  }
126450
126967
  return e;
126451
126968
  }
126452
126969
 
126453
126970
  // ../api/src/client/types/com/atproto/identity/resolveHandle.ts
126454
- function toKnownErr20(e) {
126971
+ function toKnownErr24(e) {
126455
126972
  if (e instanceof XRPCError) {
126456
126973
  }
126457
126974
  return e;
126458
126975
  }
126459
126976
 
126460
126977
  // ../api/src/client/types/com/atproto/identity/updateHandle.ts
126461
- function toKnownErr21(e) {
126978
+ function toKnownErr25(e) {
126462
126979
  if (e instanceof XRPCError) {
126463
126980
  }
126464
126981
  return e;
126465
126982
  }
126466
126983
 
126467
126984
  // ../api/src/client/types/com/atproto/label/queryLabels.ts
126468
- function toKnownErr22(e) {
126985
+ function toKnownErr26(e) {
126469
126986
  if (e instanceof XRPCError) {
126470
126987
  }
126471
126988
  return e;
126472
126989
  }
126473
126990
 
126474
126991
  // ../api/src/client/types/com/atproto/moderation/createReport.ts
126475
- function toKnownErr23(e) {
126992
+ function toKnownErr27(e) {
126476
126993
  if (e instanceof XRPCError) {
126477
126994
  }
126478
126995
  return e;
@@ -126484,7 +127001,7 @@ var InvalidSwapError = class extends XRPCError {
126484
127001
  super(src3.status, src3.error, src3.message, src3.headers);
126485
127002
  }
126486
127003
  };
126487
- function toKnownErr24(e) {
127004
+ function toKnownErr28(e) {
126488
127005
  if (e instanceof XRPCError) {
126489
127006
  if (e.error === "InvalidSwap")
126490
127007
  return new InvalidSwapError(e);
@@ -126498,7 +127015,7 @@ var InvalidSwapError2 = class extends XRPCError {
126498
127015
  super(src3.status, src3.error, src3.message, src3.headers);
126499
127016
  }
126500
127017
  };
126501
- function toKnownErr25(e) {
127018
+ function toKnownErr29(e) {
126502
127019
  if (e instanceof XRPCError) {
126503
127020
  if (e.error === "InvalidSwap")
126504
127021
  return new InvalidSwapError2(e);
@@ -126512,7 +127029,7 @@ var InvalidSwapError3 = class extends XRPCError {
126512
127029
  super(src3.status, src3.error, src3.message, src3.headers);
126513
127030
  }
126514
127031
  };
126515
- function toKnownErr26(e) {
127032
+ function toKnownErr30(e) {
126516
127033
  if (e instanceof XRPCError) {
126517
127034
  if (e.error === "InvalidSwap")
126518
127035
  return new InvalidSwapError3(e);
@@ -126521,21 +127038,21 @@ function toKnownErr26(e) {
126521
127038
  }
126522
127039
 
126523
127040
  // ../api/src/client/types/com/atproto/repo/describeRepo.ts
126524
- function toKnownErr27(e) {
127041
+ function toKnownErr31(e) {
126525
127042
  if (e instanceof XRPCError) {
126526
127043
  }
126527
127044
  return e;
126528
127045
  }
126529
127046
 
126530
127047
  // ../api/src/client/types/com/atproto/repo/getRecord.ts
126531
- function toKnownErr28(e) {
127048
+ function toKnownErr32(e) {
126532
127049
  if (e instanceof XRPCError) {
126533
127050
  }
126534
127051
  return e;
126535
127052
  }
126536
127053
 
126537
127054
  // ../api/src/client/types/com/atproto/repo/listRecords.ts
126538
- function toKnownErr29(e) {
127055
+ function toKnownErr33(e) {
126539
127056
  if (e instanceof XRPCError) {
126540
127057
  }
126541
127058
  return e;
@@ -126547,7 +127064,7 @@ var InvalidSwapError4 = class extends XRPCError {
126547
127064
  super(src3.status, src3.error, src3.message, src3.headers);
126548
127065
  }
126549
127066
  };
126550
- function toKnownErr30(e) {
127067
+ function toKnownErr34(e) {
126551
127068
  if (e instanceof XRPCError) {
126552
127069
  if (e.error === "InvalidSwap")
126553
127070
  return new InvalidSwapError4(e);
@@ -126556,7 +127073,7 @@ function toKnownErr30(e) {
126556
127073
  }
126557
127074
 
126558
127075
  // ../api/src/client/types/com/atproto/repo/uploadBlob.ts
126559
- function toKnownErr31(e) {
127076
+ function toKnownErr35(e) {
126560
127077
  if (e instanceof XRPCError) {
126561
127078
  }
126562
127079
  return e;
@@ -126583,7 +127100,7 @@ var InvalidEmailError = class extends XRPCError {
126583
127100
  super(src3.status, src3.error, src3.message, src3.headers);
126584
127101
  }
126585
127102
  };
126586
- function toKnownErr32(e) {
127103
+ function toKnownErr36(e) {
126587
127104
  if (e instanceof XRPCError) {
126588
127105
  if (e.error === "AccountNotFound")
126589
127106
  return new AccountNotFoundError(e);
@@ -126633,7 +127150,7 @@ var IncompatibleDidDocError = class extends XRPCError {
126633
127150
  super(src3.status, src3.error, src3.message, src3.headers);
126634
127151
  }
126635
127152
  };
126636
- function toKnownErr33(e) {
127153
+ function toKnownErr37(e) {
126637
127154
  if (e instanceof XRPCError) {
126638
127155
  if (e.error === "InvalidHandle")
126639
127156
  return new InvalidHandleError2(e);
@@ -126659,7 +127176,7 @@ var AccountTakedownError = class extends XRPCError {
126659
127176
  super(src3.status, src3.error, src3.message, src3.headers);
126660
127177
  }
126661
127178
  };
126662
- function toKnownErr34(e) {
127179
+ function toKnownErr38(e) {
126663
127180
  if (e instanceof XRPCError) {
126664
127181
  if (e.error === "AccountTakedown")
126665
127182
  return new AccountTakedownError(e);
@@ -126668,14 +127185,14 @@ function toKnownErr34(e) {
126668
127185
  }
126669
127186
 
126670
127187
  // ../api/src/client/types/com/atproto/server/createInviteCode.ts
126671
- function toKnownErr35(e) {
127188
+ function toKnownErr39(e) {
126672
127189
  if (e instanceof XRPCError) {
126673
127190
  }
126674
127191
  return e;
126675
127192
  }
126676
127193
 
126677
127194
  // ../api/src/client/types/com/atproto/server/createInviteCodes.ts
126678
- function toKnownErr36(e) {
127195
+ function toKnownErr40(e) {
126679
127196
  if (e instanceof XRPCError) {
126680
127197
  }
126681
127198
  return e;
@@ -126687,7 +127204,7 @@ var AccountTakedownError2 = class extends XRPCError {
126687
127204
  super(src3.status, src3.error, src3.message, src3.headers);
126688
127205
  }
126689
127206
  };
126690
- function toKnownErr37(e) {
127207
+ function toKnownErr41(e) {
126691
127208
  if (e instanceof XRPCError) {
126692
127209
  if (e.error === "AccountTakedown")
126693
127210
  return new AccountTakedownError2(e);
@@ -126706,7 +127223,7 @@ var InvalidTokenError2 = class extends XRPCError {
126706
127223
  super(src3.status, src3.error, src3.message, src3.headers);
126707
127224
  }
126708
127225
  };
126709
- function toKnownErr38(e) {
127226
+ function toKnownErr42(e) {
126710
127227
  if (e instanceof XRPCError) {
126711
127228
  if (e.error === "ExpiredToken")
126712
127229
  return new ExpiredTokenError2(e);
@@ -126717,14 +127234,14 @@ function toKnownErr38(e) {
126717
127234
  }
126718
127235
 
126719
127236
  // ../api/src/client/types/com/atproto/server/deleteSession.ts
126720
- function toKnownErr39(e) {
127237
+ function toKnownErr43(e) {
126721
127238
  if (e instanceof XRPCError) {
126722
127239
  }
126723
127240
  return e;
126724
127241
  }
126725
127242
 
126726
127243
  // ../api/src/client/types/com/atproto/server/describeServer.ts
126727
- function toKnownErr40(e) {
127244
+ function toKnownErr44(e) {
126728
127245
  if (e instanceof XRPCError) {
126729
127246
  }
126730
127247
  return e;
@@ -126736,7 +127253,7 @@ var DuplicateCreateError = class extends XRPCError {
126736
127253
  super(src3.status, src3.error, src3.message, src3.headers);
126737
127254
  }
126738
127255
  };
126739
- function toKnownErr41(e) {
127256
+ function toKnownErr45(e) {
126740
127257
  if (e instanceof XRPCError) {
126741
127258
  if (e.error === "DuplicateCreate")
126742
127259
  return new DuplicateCreateError(e);
@@ -126745,7 +127262,7 @@ function toKnownErr41(e) {
126745
127262
  }
126746
127263
 
126747
127264
  // ../api/src/client/types/com/atproto/server/getSession.ts
126748
- function toKnownErr42(e) {
127265
+ function toKnownErr46(e) {
126749
127266
  if (e instanceof XRPCError) {
126750
127267
  }
126751
127268
  return e;
@@ -126757,7 +127274,7 @@ var AccountTakedownError3 = class extends XRPCError {
126757
127274
  super(src3.status, src3.error, src3.message, src3.headers);
126758
127275
  }
126759
127276
  };
126760
- function toKnownErr43(e) {
127277
+ function toKnownErr47(e) {
126761
127278
  if (e instanceof XRPCError) {
126762
127279
  if (e.error === "AccountTakedown")
126763
127280
  return new AccountTakedownError3(e);
@@ -126771,7 +127288,7 @@ var AccountTakedownError4 = class extends XRPCError {
126771
127288
  super(src3.status, src3.error, src3.message, src3.headers);
126772
127289
  }
126773
127290
  };
126774
- function toKnownErr44(e) {
127291
+ function toKnownErr48(e) {
126775
127292
  if (e instanceof XRPCError) {
126776
127293
  if (e.error === "AccountTakedown")
126777
127294
  return new AccountTakedownError4(e);
@@ -126780,35 +127297,35 @@ function toKnownErr44(e) {
126780
127297
  }
126781
127298
 
126782
127299
  // ../api/src/client/types/com/atproto/server/requestAccountDelete.ts
126783
- function toKnownErr45(e) {
127300
+ function toKnownErr49(e) {
126784
127301
  if (e instanceof XRPCError) {
126785
127302
  }
126786
127303
  return e;
126787
127304
  }
126788
127305
 
126789
127306
  // ../api/src/client/types/com/atproto/server/requestEmailConfirmation.ts
126790
- function toKnownErr46(e) {
127307
+ function toKnownErr50(e) {
126791
127308
  if (e instanceof XRPCError) {
126792
127309
  }
126793
127310
  return e;
126794
127311
  }
126795
127312
 
126796
127313
  // ../api/src/client/types/com/atproto/server/requestEmailUpdate.ts
126797
- function toKnownErr47(e) {
127314
+ function toKnownErr51(e) {
126798
127315
  if (e instanceof XRPCError) {
126799
127316
  }
126800
127317
  return e;
126801
127318
  }
126802
127319
 
126803
127320
  // ../api/src/client/types/com/atproto/server/requestPasswordReset.ts
126804
- function toKnownErr48(e) {
127321
+ function toKnownErr52(e) {
126805
127322
  if (e instanceof XRPCError) {
126806
127323
  }
126807
127324
  return e;
126808
127325
  }
126809
127326
 
126810
127327
  // ../api/src/client/types/com/atproto/server/reserveSigningKey.ts
126811
- function toKnownErr49(e) {
127328
+ function toKnownErr53(e) {
126812
127329
  if (e instanceof XRPCError) {
126813
127330
  }
126814
127331
  return e;
@@ -126825,7 +127342,7 @@ var InvalidTokenError3 = class extends XRPCError {
126825
127342
  super(src3.status, src3.error, src3.message, src3.headers);
126826
127343
  }
126827
127344
  };
126828
- function toKnownErr50(e) {
127345
+ function toKnownErr54(e) {
126829
127346
  if (e instanceof XRPCError) {
126830
127347
  if (e.error === "ExpiredToken")
126831
127348
  return new ExpiredTokenError3(e);
@@ -126836,7 +127353,7 @@ function toKnownErr50(e) {
126836
127353
  }
126837
127354
 
126838
127355
  // ../api/src/client/types/com/atproto/server/revokeAppPassword.ts
126839
- function toKnownErr51(e) {
127356
+ function toKnownErr55(e) {
126840
127357
  if (e instanceof XRPCError) {
126841
127358
  }
126842
127359
  return e;
@@ -126858,7 +127375,7 @@ var TokenRequiredError = class extends XRPCError {
126858
127375
  super(src3.status, src3.error, src3.message, src3.headers);
126859
127376
  }
126860
127377
  };
126861
- function toKnownErr52(e) {
127378
+ function toKnownErr56(e) {
126862
127379
  if (e instanceof XRPCError) {
126863
127380
  if (e.error === "ExpiredToken")
126864
127381
  return new ExpiredTokenError4(e);
@@ -126871,21 +127388,21 @@ function toKnownErr52(e) {
126871
127388
  }
126872
127389
 
126873
127390
  // ../api/src/client/types/com/atproto/sync/getBlob.ts
126874
- function toKnownErr53(e) {
127391
+ function toKnownErr57(e) {
126875
127392
  if (e instanceof XRPCError) {
126876
127393
  }
126877
127394
  return e;
126878
127395
  }
126879
127396
 
126880
127397
  // ../api/src/client/types/com/atproto/sync/getBlocks.ts
126881
- function toKnownErr54(e) {
127398
+ function toKnownErr58(e) {
126882
127399
  if (e instanceof XRPCError) {
126883
127400
  }
126884
127401
  return e;
126885
127402
  }
126886
127403
 
126887
127404
  // ../api/src/client/types/com/atproto/sync/getCheckout.ts
126888
- function toKnownErr55(e) {
127405
+ function toKnownErr59(e) {
126889
127406
  if (e instanceof XRPCError) {
126890
127407
  }
126891
127408
  return e;
@@ -126897,7 +127414,7 @@ var HeadNotFoundError = class extends XRPCError {
126897
127414
  super(src3.status, src3.error, src3.message, src3.headers);
126898
127415
  }
126899
127416
  };
126900
- function toKnownErr56(e) {
127417
+ function toKnownErr60(e) {
126901
127418
  if (e instanceof XRPCError) {
126902
127419
  if (e.error === "HeadNotFound")
126903
127420
  return new HeadNotFoundError(e);
@@ -126911,7 +127428,7 @@ var RepoNotFoundError2 = class extends XRPCError {
126911
127428
  super(src3.status, src3.error, src3.message, src3.headers);
126912
127429
  }
126913
127430
  };
126914
- function toKnownErr57(e) {
127431
+ function toKnownErr61(e) {
126915
127432
  if (e instanceof XRPCError) {
126916
127433
  if (e.error === "RepoNotFound")
126917
127434
  return new RepoNotFoundError2(e);
@@ -126920,70 +127437,70 @@ function toKnownErr57(e) {
126920
127437
  }
126921
127438
 
126922
127439
  // ../api/src/client/types/com/atproto/sync/getRecord.ts
126923
- function toKnownErr58(e) {
127440
+ function toKnownErr62(e) {
126924
127441
  if (e instanceof XRPCError) {
126925
127442
  }
126926
127443
  return e;
126927
127444
  }
126928
127445
 
126929
127446
  // ../api/src/client/types/com/atproto/sync/getRepo.ts
126930
- function toKnownErr59(e) {
127447
+ function toKnownErr63(e) {
126931
127448
  if (e instanceof XRPCError) {
126932
127449
  }
126933
127450
  return e;
126934
127451
  }
126935
127452
 
126936
127453
  // ../api/src/client/types/com/atproto/sync/listBlobs.ts
126937
- function toKnownErr60(e) {
127454
+ function toKnownErr64(e) {
126938
127455
  if (e instanceof XRPCError) {
126939
127456
  }
126940
127457
  return e;
126941
127458
  }
126942
127459
 
126943
127460
  // ../api/src/client/types/com/atproto/sync/listRepos.ts
126944
- function toKnownErr61(e) {
127461
+ function toKnownErr65(e) {
126945
127462
  if (e instanceof XRPCError) {
126946
127463
  }
126947
127464
  return e;
126948
127465
  }
126949
127466
 
126950
127467
  // ../api/src/client/types/com/atproto/sync/notifyOfUpdate.ts
126951
- function toKnownErr62(e) {
127468
+ function toKnownErr66(e) {
126952
127469
  if (e instanceof XRPCError) {
126953
127470
  }
126954
127471
  return e;
126955
127472
  }
126956
127473
 
126957
127474
  // ../api/src/client/types/com/atproto/sync/requestCrawl.ts
126958
- function toKnownErr63(e) {
127475
+ function toKnownErr67(e) {
126959
127476
  if (e instanceof XRPCError) {
126960
127477
  }
126961
127478
  return e;
126962
127479
  }
126963
127480
 
126964
127481
  // ../api/src/client/types/com/atproto/temp/fetchLabels.ts
126965
- function toKnownErr64(e) {
127482
+ function toKnownErr68(e) {
126966
127483
  if (e instanceof XRPCError) {
126967
127484
  }
126968
127485
  return e;
126969
127486
  }
126970
127487
 
126971
127488
  // ../api/src/client/types/com/atproto/temp/importRepo.ts
126972
- function toKnownErr65(e) {
127489
+ function toKnownErr69(e) {
126973
127490
  if (e instanceof XRPCError) {
126974
127491
  }
126975
127492
  return e;
126976
127493
  }
126977
127494
 
126978
127495
  // ../api/src/client/types/com/atproto/temp/pushBlob.ts
126979
- function toKnownErr66(e) {
127496
+ function toKnownErr70(e) {
126980
127497
  if (e instanceof XRPCError) {
126981
127498
  }
126982
127499
  return e;
126983
127500
  }
126984
127501
 
126985
127502
  // ../api/src/client/types/com/atproto/temp/requestPhoneVerification.ts
126986
- function toKnownErr67(e) {
127503
+ function toKnownErr71(e) {
126987
127504
  if (e instanceof XRPCError) {
126988
127505
  }
126989
127506
  return e;
@@ -127025,7 +127542,7 @@ var IncompatibleDidDocError2 = class extends XRPCError {
127025
127542
  super(src3.status, src3.error, src3.message, src3.headers);
127026
127543
  }
127027
127544
  };
127028
- function toKnownErr68(e) {
127545
+ function toKnownErr72(e) {
127029
127546
  if (e instanceof XRPCError) {
127030
127547
  if (e.error === "InvalidHandle")
127031
127548
  return new InvalidHandleError3(e);
@@ -127046,63 +127563,63 @@ function toKnownErr68(e) {
127046
127563
  }
127047
127564
 
127048
127565
  // ../api/src/client/types/app/bsky/actor/getPreferences.ts
127049
- function toKnownErr69(e) {
127566
+ function toKnownErr73(e) {
127050
127567
  if (e instanceof XRPCError) {
127051
127568
  }
127052
127569
  return e;
127053
127570
  }
127054
127571
 
127055
127572
  // ../api/src/client/types/app/bsky/actor/getProfile.ts
127056
- function toKnownErr70(e) {
127573
+ function toKnownErr74(e) {
127057
127574
  if (e instanceof XRPCError) {
127058
127575
  }
127059
127576
  return e;
127060
127577
  }
127061
127578
 
127062
127579
  // ../api/src/client/types/app/bsky/actor/getProfiles.ts
127063
- function toKnownErr71(e) {
127580
+ function toKnownErr75(e) {
127064
127581
  if (e instanceof XRPCError) {
127065
127582
  }
127066
127583
  return e;
127067
127584
  }
127068
127585
 
127069
127586
  // ../api/src/client/types/app/bsky/actor/getSuggestions.ts
127070
- function toKnownErr72(e) {
127587
+ function toKnownErr76(e) {
127071
127588
  if (e instanceof XRPCError) {
127072
127589
  }
127073
127590
  return e;
127074
127591
  }
127075
127592
 
127076
127593
  // ../api/src/client/types/app/bsky/actor/putPreferences.ts
127077
- function toKnownErr73(e) {
127594
+ function toKnownErr77(e) {
127078
127595
  if (e instanceof XRPCError) {
127079
127596
  }
127080
127597
  return e;
127081
127598
  }
127082
127599
 
127083
127600
  // ../api/src/client/types/app/bsky/actor/searchActors.ts
127084
- function toKnownErr74(e) {
127601
+ function toKnownErr78(e) {
127085
127602
  if (e instanceof XRPCError) {
127086
127603
  }
127087
127604
  return e;
127088
127605
  }
127089
127606
 
127090
127607
  // ../api/src/client/types/app/bsky/actor/searchActorsTypeahead.ts
127091
- function toKnownErr75(e) {
127608
+ function toKnownErr79(e) {
127092
127609
  if (e instanceof XRPCError) {
127093
127610
  }
127094
127611
  return e;
127095
127612
  }
127096
127613
 
127097
127614
  // ../api/src/client/types/app/bsky/feed/describeFeedGenerator.ts
127098
- function toKnownErr76(e) {
127615
+ function toKnownErr80(e) {
127099
127616
  if (e instanceof XRPCError) {
127100
127617
  }
127101
127618
  return e;
127102
127619
  }
127103
127620
 
127104
127621
  // ../api/src/client/types/app/bsky/feed/getActorFeeds.ts
127105
- function toKnownErr77(e) {
127622
+ function toKnownErr81(e) {
127106
127623
  if (e instanceof XRPCError) {
127107
127624
  }
127108
127625
  return e;
@@ -127119,7 +127636,7 @@ var BlockedByActorError = class extends XRPCError {
127119
127636
  super(src3.status, src3.error, src3.message, src3.headers);
127120
127637
  }
127121
127638
  };
127122
- function toKnownErr78(e) {
127639
+ function toKnownErr82(e) {
127123
127640
  if (e instanceof XRPCError) {
127124
127641
  if (e.error === "BlockedActor")
127125
127642
  return new BlockedActorError(e);
@@ -127140,7 +127657,7 @@ var BlockedByActorError2 = class extends XRPCError {
127140
127657
  super(src3.status, src3.error, src3.message, src3.headers);
127141
127658
  }
127142
127659
  };
127143
- function toKnownErr79(e) {
127660
+ function toKnownErr83(e) {
127144
127661
  if (e instanceof XRPCError) {
127145
127662
  if (e.error === "BlockedActor")
127146
127663
  return new BlockedActorError2(e);
@@ -127156,7 +127673,7 @@ var UnknownFeedError = class extends XRPCError {
127156
127673
  super(src3.status, src3.error, src3.message, src3.headers);
127157
127674
  }
127158
127675
  };
127159
- function toKnownErr80(e) {
127676
+ function toKnownErr84(e) {
127160
127677
  if (e instanceof XRPCError) {
127161
127678
  if (e.error === "UnknownFeed")
127162
127679
  return new UnknownFeedError(e);
@@ -127165,14 +127682,14 @@ function toKnownErr80(e) {
127165
127682
  }
127166
127683
 
127167
127684
  // ../api/src/client/types/app/bsky/feed/getFeedGenerator.ts
127168
- function toKnownErr81(e) {
127685
+ function toKnownErr85(e) {
127169
127686
  if (e instanceof XRPCError) {
127170
127687
  }
127171
127688
  return e;
127172
127689
  }
127173
127690
 
127174
127691
  // ../api/src/client/types/app/bsky/feed/getFeedGenerators.ts
127175
- function toKnownErr82(e) {
127692
+ function toKnownErr86(e) {
127176
127693
  if (e instanceof XRPCError) {
127177
127694
  }
127178
127695
  return e;
@@ -127184,7 +127701,7 @@ var UnknownFeedError2 = class extends XRPCError {
127184
127701
  super(src3.status, src3.error, src3.message, src3.headers);
127185
127702
  }
127186
127703
  };
127187
- function toKnownErr83(e) {
127704
+ function toKnownErr87(e) {
127188
127705
  if (e instanceof XRPCError) {
127189
127706
  if (e.error === "UnknownFeed")
127190
127707
  return new UnknownFeedError2(e);
@@ -127193,7 +127710,7 @@ function toKnownErr83(e) {
127193
127710
  }
127194
127711
 
127195
127712
  // ../api/src/client/types/app/bsky/feed/getLikes.ts
127196
- function toKnownErr84(e) {
127713
+ function toKnownErr88(e) {
127197
127714
  if (e instanceof XRPCError) {
127198
127715
  }
127199
127716
  return e;
@@ -127205,7 +127722,7 @@ var UnknownListError = class extends XRPCError {
127205
127722
  super(src3.status, src3.error, src3.message, src3.headers);
127206
127723
  }
127207
127724
  };
127208
- function toKnownErr85(e) {
127725
+ function toKnownErr89(e) {
127209
127726
  if (e instanceof XRPCError) {
127210
127727
  if (e.error === "UnknownList")
127211
127728
  return new UnknownListError(e);
@@ -127219,7 +127736,7 @@ var NotFoundError = class extends XRPCError {
127219
127736
  super(src3.status, src3.error, src3.message, src3.headers);
127220
127737
  }
127221
127738
  };
127222
- function toKnownErr86(e) {
127739
+ function toKnownErr90(e) {
127223
127740
  if (e instanceof XRPCError) {
127224
127741
  if (e.error === "NotFound")
127225
127742
  return new NotFoundError(e);
@@ -127228,28 +127745,28 @@ function toKnownErr86(e) {
127228
127745
  }
127229
127746
 
127230
127747
  // ../api/src/client/types/app/bsky/feed/getPosts.ts
127231
- function toKnownErr87(e) {
127748
+ function toKnownErr91(e) {
127232
127749
  if (e instanceof XRPCError) {
127233
127750
  }
127234
127751
  return e;
127235
127752
  }
127236
127753
 
127237
127754
  // ../api/src/client/types/app/bsky/feed/getRepostedBy.ts
127238
- function toKnownErr88(e) {
127755
+ function toKnownErr92(e) {
127239
127756
  if (e instanceof XRPCError) {
127240
127757
  }
127241
127758
  return e;
127242
127759
  }
127243
127760
 
127244
127761
  // ../api/src/client/types/app/bsky/feed/getSuggestedFeeds.ts
127245
- function toKnownErr89(e) {
127762
+ function toKnownErr93(e) {
127246
127763
  if (e instanceof XRPCError) {
127247
127764
  }
127248
127765
  return e;
127249
127766
  }
127250
127767
 
127251
127768
  // ../api/src/client/types/app/bsky/feed/getTimeline.ts
127252
- function toKnownErr90(e) {
127769
+ function toKnownErr94(e) {
127253
127770
  if (e instanceof XRPCError) {
127254
127771
  }
127255
127772
  return e;
@@ -127261,7 +127778,7 @@ var BadQueryStringError = class extends XRPCError {
127261
127778
  super(src3.status, src3.error, src3.message, src3.headers);
127262
127779
  }
127263
127780
  };
127264
- function toKnownErr91(e) {
127781
+ function toKnownErr95(e) {
127265
127782
  if (e instanceof XRPCError) {
127266
127783
  if (e.error === "BadQueryString")
127267
127784
  return new BadQueryStringError(e);
@@ -127270,126 +127787,126 @@ function toKnownErr91(e) {
127270
127787
  }
127271
127788
 
127272
127789
  // ../api/src/client/types/app/bsky/graph/getBlocks.ts
127273
- function toKnownErr92(e) {
127790
+ function toKnownErr96(e) {
127274
127791
  if (e instanceof XRPCError) {
127275
127792
  }
127276
127793
  return e;
127277
127794
  }
127278
127795
 
127279
127796
  // ../api/src/client/types/app/bsky/graph/getFollowers.ts
127280
- function toKnownErr93(e) {
127797
+ function toKnownErr97(e) {
127281
127798
  if (e instanceof XRPCError) {
127282
127799
  }
127283
127800
  return e;
127284
127801
  }
127285
127802
 
127286
127803
  // ../api/src/client/types/app/bsky/graph/getFollows.ts
127287
- function toKnownErr94(e) {
127804
+ function toKnownErr98(e) {
127288
127805
  if (e instanceof XRPCError) {
127289
127806
  }
127290
127807
  return e;
127291
127808
  }
127292
127809
 
127293
127810
  // ../api/src/client/types/app/bsky/graph/getList.ts
127294
- function toKnownErr95(e) {
127811
+ function toKnownErr99(e) {
127295
127812
  if (e instanceof XRPCError) {
127296
127813
  }
127297
127814
  return e;
127298
127815
  }
127299
127816
 
127300
127817
  // ../api/src/client/types/app/bsky/graph/getListBlocks.ts
127301
- function toKnownErr96(e) {
127818
+ function toKnownErr100(e) {
127302
127819
  if (e instanceof XRPCError) {
127303
127820
  }
127304
127821
  return e;
127305
127822
  }
127306
127823
 
127307
127824
  // ../api/src/client/types/app/bsky/graph/getListMutes.ts
127308
- function toKnownErr97(e) {
127825
+ function toKnownErr101(e) {
127309
127826
  if (e instanceof XRPCError) {
127310
127827
  }
127311
127828
  return e;
127312
127829
  }
127313
127830
 
127314
127831
  // ../api/src/client/types/app/bsky/graph/getLists.ts
127315
- function toKnownErr98(e) {
127832
+ function toKnownErr102(e) {
127316
127833
  if (e instanceof XRPCError) {
127317
127834
  }
127318
127835
  return e;
127319
127836
  }
127320
127837
 
127321
127838
  // ../api/src/client/types/app/bsky/graph/getMutes.ts
127322
- function toKnownErr99(e) {
127839
+ function toKnownErr103(e) {
127323
127840
  if (e instanceof XRPCError) {
127324
127841
  }
127325
127842
  return e;
127326
127843
  }
127327
127844
 
127328
127845
  // ../api/src/client/types/app/bsky/graph/getSuggestedFollowsByActor.ts
127329
- function toKnownErr100(e) {
127846
+ function toKnownErr104(e) {
127330
127847
  if (e instanceof XRPCError) {
127331
127848
  }
127332
127849
  return e;
127333
127850
  }
127334
127851
 
127335
127852
  // ../api/src/client/types/app/bsky/graph/muteActor.ts
127336
- function toKnownErr101(e) {
127853
+ function toKnownErr105(e) {
127337
127854
  if (e instanceof XRPCError) {
127338
127855
  }
127339
127856
  return e;
127340
127857
  }
127341
127858
 
127342
127859
  // ../api/src/client/types/app/bsky/graph/muteActorList.ts
127343
- function toKnownErr102(e) {
127860
+ function toKnownErr106(e) {
127344
127861
  if (e instanceof XRPCError) {
127345
127862
  }
127346
127863
  return e;
127347
127864
  }
127348
127865
 
127349
127866
  // ../api/src/client/types/app/bsky/graph/unmuteActor.ts
127350
- function toKnownErr103(e) {
127867
+ function toKnownErr107(e) {
127351
127868
  if (e instanceof XRPCError) {
127352
127869
  }
127353
127870
  return e;
127354
127871
  }
127355
127872
 
127356
127873
  // ../api/src/client/types/app/bsky/graph/unmuteActorList.ts
127357
- function toKnownErr104(e) {
127874
+ function toKnownErr108(e) {
127358
127875
  if (e instanceof XRPCError) {
127359
127876
  }
127360
127877
  return e;
127361
127878
  }
127362
127879
 
127363
127880
  // ../api/src/client/types/app/bsky/notification/getUnreadCount.ts
127364
- function toKnownErr105(e) {
127881
+ function toKnownErr109(e) {
127365
127882
  if (e instanceof XRPCError) {
127366
127883
  }
127367
127884
  return e;
127368
127885
  }
127369
127886
 
127370
127887
  // ../api/src/client/types/app/bsky/notification/listNotifications.ts
127371
- function toKnownErr106(e) {
127888
+ function toKnownErr110(e) {
127372
127889
  if (e instanceof XRPCError) {
127373
127890
  }
127374
127891
  return e;
127375
127892
  }
127376
127893
 
127377
127894
  // ../api/src/client/types/app/bsky/notification/registerPush.ts
127378
- function toKnownErr107(e) {
127895
+ function toKnownErr111(e) {
127379
127896
  if (e instanceof XRPCError) {
127380
127897
  }
127381
127898
  return e;
127382
127899
  }
127383
127900
 
127384
127901
  // ../api/src/client/types/app/bsky/notification/updateSeen.ts
127385
- function toKnownErr108(e) {
127902
+ function toKnownErr112(e) {
127386
127903
  if (e instanceof XRPCError) {
127387
127904
  }
127388
127905
  return e;
127389
127906
  }
127390
127907
 
127391
127908
  // ../api/src/client/types/app/bsky/unspecced/getPopularFeedGenerators.ts
127392
- function toKnownErr109(e) {
127909
+ function toKnownErr113(e) {
127393
127910
  if (e instanceof XRPCError) {
127394
127911
  }
127395
127912
  return e;
@@ -127401,7 +127918,7 @@ var UnknownFeedError3 = class extends XRPCError {
127401
127918
  super(src3.status, src3.error, src3.message, src3.headers);
127402
127919
  }
127403
127920
  };
127404
- function toKnownErr110(e) {
127921
+ function toKnownErr114(e) {
127405
127922
  if (e instanceof XRPCError) {
127406
127923
  if (e.error === "UnknownFeed")
127407
127924
  return new UnknownFeedError3(e);
@@ -127415,7 +127932,7 @@ var BadQueryStringError2 = class extends XRPCError {
127415
127932
  super(src3.status, src3.error, src3.message, src3.headers);
127416
127933
  }
127417
127934
  };
127418
- function toKnownErr111(e) {
127935
+ function toKnownErr115(e) {
127419
127936
  if (e instanceof XRPCError) {
127420
127937
  if (e.error === "BadQueryString")
127421
127938
  return new BadQueryStringError2(e);
@@ -127429,7 +127946,7 @@ var BadQueryStringError3 = class extends XRPCError {
127429
127946
  super(src3.status, src3.error, src3.message, src3.headers);
127430
127947
  }
127431
127948
  };
127432
- function toKnownErr112(e) {
127949
+ function toKnownErr116(e) {
127433
127950
  if (e instanceof XRPCError) {
127434
127951
  if (e.error === "BadQueryString")
127435
127952
  return new BadQueryStringError3(e);
@@ -127481,99 +127998,119 @@ var ComAtprotoAdminNS2 = class {
127481
127998
  constructor(service2) {
127482
127999
  this._service = service2;
127483
128000
  }
128001
+ createCommunicationTemplate(data, opts) {
128002
+ return this._service.xrpc.call("com.atproto.admin.createCommunicationTemplate", opts?.qp, data, opts).catch((e) => {
128003
+ throw toKnownErr(e);
128004
+ });
128005
+ }
127484
128006
  deleteAccount(data, opts) {
127485
128007
  return this._service.xrpc.call("com.atproto.admin.deleteAccount", opts?.qp, data, opts).catch((e) => {
127486
- throw toKnownErr(e);
128008
+ throw toKnownErr2(e);
128009
+ });
128010
+ }
128011
+ deleteCommunicationTemplate(data, opts) {
128012
+ return this._service.xrpc.call("com.atproto.admin.deleteCommunicationTemplate", opts?.qp, data, opts).catch((e) => {
128013
+ throw toKnownErr3(e);
127487
128014
  });
127488
128015
  }
127489
128016
  disableAccountInvites(data, opts) {
127490
128017
  return this._service.xrpc.call("com.atproto.admin.disableAccountInvites", opts?.qp, data, opts).catch((e) => {
127491
- throw toKnownErr2(e);
128018
+ throw toKnownErr4(e);
127492
128019
  });
127493
128020
  }
127494
128021
  disableInviteCodes(data, opts) {
127495
128022
  return this._service.xrpc.call("com.atproto.admin.disableInviteCodes", opts?.qp, data, opts).catch((e) => {
127496
- throw toKnownErr3(e);
128023
+ throw toKnownErr5(e);
127497
128024
  });
127498
128025
  }
127499
128026
  emitModerationEvent(data, opts) {
127500
128027
  return this._service.xrpc.call("com.atproto.admin.emitModerationEvent", opts?.qp, data, opts).catch((e) => {
127501
- throw toKnownErr4(e);
128028
+ throw toKnownErr6(e);
127502
128029
  });
127503
128030
  }
127504
128031
  enableAccountInvites(data, opts) {
127505
128032
  return this._service.xrpc.call("com.atproto.admin.enableAccountInvites", opts?.qp, data, opts).catch((e) => {
127506
- throw toKnownErr5(e);
128033
+ throw toKnownErr7(e);
127507
128034
  });
127508
128035
  }
127509
128036
  getAccountInfo(params2, opts) {
127510
128037
  return this._service.xrpc.call("com.atproto.admin.getAccountInfo", params2, void 0, opts).catch((e) => {
127511
- throw toKnownErr6(e);
128038
+ throw toKnownErr8(e);
127512
128039
  });
127513
128040
  }
127514
128041
  getAccountInfos(params2, opts) {
127515
128042
  return this._service.xrpc.call("com.atproto.admin.getAccountInfos", params2, void 0, opts).catch((e) => {
127516
- throw toKnownErr7(e);
128043
+ throw toKnownErr9(e);
127517
128044
  });
127518
128045
  }
127519
128046
  getInviteCodes(params2, opts) {
127520
128047
  return this._service.xrpc.call("com.atproto.admin.getInviteCodes", params2, void 0, opts).catch((e) => {
127521
- throw toKnownErr8(e);
128048
+ throw toKnownErr10(e);
127522
128049
  });
127523
128050
  }
127524
128051
  getModerationEvent(params2, opts) {
127525
128052
  return this._service.xrpc.call("com.atproto.admin.getModerationEvent", params2, void 0, opts).catch((e) => {
127526
- throw toKnownErr9(e);
128053
+ throw toKnownErr11(e);
127527
128054
  });
127528
128055
  }
127529
128056
  getRecord(params2, opts) {
127530
128057
  return this._service.xrpc.call("com.atproto.admin.getRecord", params2, void 0, opts).catch((e) => {
127531
- throw toKnownErr10(e);
128058
+ throw toKnownErr12(e);
127532
128059
  });
127533
128060
  }
127534
128061
  getRepo(params2, opts) {
127535
128062
  return this._service.xrpc.call("com.atproto.admin.getRepo", params2, void 0, opts).catch((e) => {
127536
- throw toKnownErr11(e);
128063
+ throw toKnownErr13(e);
127537
128064
  });
127538
128065
  }
127539
128066
  getSubjectStatus(params2, opts) {
127540
128067
  return this._service.xrpc.call("com.atproto.admin.getSubjectStatus", params2, void 0, opts).catch((e) => {
127541
- throw toKnownErr12(e);
128068
+ throw toKnownErr14(e);
128069
+ });
128070
+ }
128071
+ listCommunicationTemplates(params2, opts) {
128072
+ return this._service.xrpc.call("com.atproto.admin.listCommunicationTemplates", params2, void 0, opts).catch((e) => {
128073
+ throw toKnownErr15(e);
127542
128074
  });
127543
128075
  }
127544
128076
  queryModerationEvents(params2, opts) {
127545
128077
  return this._service.xrpc.call("com.atproto.admin.queryModerationEvents", params2, void 0, opts).catch((e) => {
127546
- throw toKnownErr13(e);
128078
+ throw toKnownErr16(e);
127547
128079
  });
127548
128080
  }
127549
128081
  queryModerationStatuses(params2, opts) {
127550
128082
  return this._service.xrpc.call("com.atproto.admin.queryModerationStatuses", params2, void 0, opts).catch((e) => {
127551
- throw toKnownErr14(e);
128083
+ throw toKnownErr17(e);
127552
128084
  });
127553
128085
  }
127554
128086
  searchRepos(params2, opts) {
127555
128087
  return this._service.xrpc.call("com.atproto.admin.searchRepos", params2, void 0, opts).catch((e) => {
127556
- throw toKnownErr15(e);
128088
+ throw toKnownErr18(e);
127557
128089
  });
127558
128090
  }
127559
128091
  sendEmail(data, opts) {
127560
128092
  return this._service.xrpc.call("com.atproto.admin.sendEmail", opts?.qp, data, opts).catch((e) => {
127561
- throw toKnownErr16(e);
128093
+ throw toKnownErr19(e);
127562
128094
  });
127563
128095
  }
127564
128096
  updateAccountEmail(data, opts) {
127565
128097
  return this._service.xrpc.call("com.atproto.admin.updateAccountEmail", opts?.qp, data, opts).catch((e) => {
127566
- throw toKnownErr17(e);
128098
+ throw toKnownErr20(e);
127567
128099
  });
127568
128100
  }
127569
128101
  updateAccountHandle(data, opts) {
127570
128102
  return this._service.xrpc.call("com.atproto.admin.updateAccountHandle", opts?.qp, data, opts).catch((e) => {
127571
- throw toKnownErr18(e);
128103
+ throw toKnownErr21(e);
128104
+ });
128105
+ }
128106
+ updateCommunicationTemplate(data, opts) {
128107
+ return this._service.xrpc.call("com.atproto.admin.updateCommunicationTemplate", opts?.qp, data, opts).catch((e) => {
128108
+ throw toKnownErr22(e);
127572
128109
  });
127573
128110
  }
127574
128111
  updateSubjectStatus(data, opts) {
127575
128112
  return this._service.xrpc.call("com.atproto.admin.updateSubjectStatus", opts?.qp, data, opts).catch((e) => {
127576
- throw toKnownErr19(e);
128113
+ throw toKnownErr23(e);
127577
128114
  });
127578
128115
  }
127579
128116
  };
@@ -127583,12 +128120,12 @@ var ComAtprotoIdentityNS2 = class {
127583
128120
  }
127584
128121
  resolveHandle(params2, opts) {
127585
128122
  return this._service.xrpc.call("com.atproto.identity.resolveHandle", params2, void 0, opts).catch((e) => {
127586
- throw toKnownErr20(e);
128123
+ throw toKnownErr24(e);
127587
128124
  });
127588
128125
  }
127589
128126
  updateHandle(data, opts) {
127590
128127
  return this._service.xrpc.call("com.atproto.identity.updateHandle", opts?.qp, data, opts).catch((e) => {
127591
- throw toKnownErr21(e);
128128
+ throw toKnownErr25(e);
127592
128129
  });
127593
128130
  }
127594
128131
  };
@@ -127598,7 +128135,7 @@ var ComAtprotoLabelNS2 = class {
127598
128135
  }
127599
128136
  queryLabels(params2, opts) {
127600
128137
  return this._service.xrpc.call("com.atproto.label.queryLabels", params2, void 0, opts).catch((e) => {
127601
- throw toKnownErr22(e);
128138
+ throw toKnownErr26(e);
127602
128139
  });
127603
128140
  }
127604
128141
  };
@@ -127608,7 +128145,7 @@ var ComAtprotoModerationNS2 = class {
127608
128145
  }
127609
128146
  createReport(data, opts) {
127610
128147
  return this._service.xrpc.call("com.atproto.moderation.createReport", opts?.qp, data, opts).catch((e) => {
127611
- throw toKnownErr23(e);
128148
+ throw toKnownErr27(e);
127612
128149
  });
127613
128150
  }
127614
128151
  };
@@ -127618,42 +128155,42 @@ var ComAtprotoRepoNS2 = class {
127618
128155
  }
127619
128156
  applyWrites(data, opts) {
127620
128157
  return this._service.xrpc.call("com.atproto.repo.applyWrites", opts?.qp, data, opts).catch((e) => {
127621
- throw toKnownErr24(e);
128158
+ throw toKnownErr28(e);
127622
128159
  });
127623
128160
  }
127624
128161
  createRecord(data, opts) {
127625
128162
  return this._service.xrpc.call("com.atproto.repo.createRecord", opts?.qp, data, opts).catch((e) => {
127626
- throw toKnownErr25(e);
128163
+ throw toKnownErr29(e);
127627
128164
  });
127628
128165
  }
127629
128166
  deleteRecord(data, opts) {
127630
128167
  return this._service.xrpc.call("com.atproto.repo.deleteRecord", opts?.qp, data, opts).catch((e) => {
127631
- throw toKnownErr26(e);
128168
+ throw toKnownErr30(e);
127632
128169
  });
127633
128170
  }
127634
128171
  describeRepo(params2, opts) {
127635
128172
  return this._service.xrpc.call("com.atproto.repo.describeRepo", params2, void 0, opts).catch((e) => {
127636
- throw toKnownErr27(e);
128173
+ throw toKnownErr31(e);
127637
128174
  });
127638
128175
  }
127639
128176
  getRecord(params2, opts) {
127640
128177
  return this._service.xrpc.call("com.atproto.repo.getRecord", params2, void 0, opts).catch((e) => {
127641
- throw toKnownErr28(e);
128178
+ throw toKnownErr32(e);
127642
128179
  });
127643
128180
  }
127644
128181
  listRecords(params2, opts) {
127645
128182
  return this._service.xrpc.call("com.atproto.repo.listRecords", params2, void 0, opts).catch((e) => {
127646
- throw toKnownErr29(e);
128183
+ throw toKnownErr33(e);
127647
128184
  });
127648
128185
  }
127649
128186
  putRecord(data, opts) {
127650
128187
  return this._service.xrpc.call("com.atproto.repo.putRecord", opts?.qp, data, opts).catch((e) => {
127651
- throw toKnownErr30(e);
128188
+ throw toKnownErr34(e);
127652
128189
  });
127653
128190
  }
127654
128191
  uploadBlob(data, opts) {
127655
128192
  return this._service.xrpc.call("com.atproto.repo.uploadBlob", opts?.qp, data, opts).catch((e) => {
127656
- throw toKnownErr31(e);
128193
+ throw toKnownErr35(e);
127657
128194
  });
127658
128195
  }
127659
128196
  };
@@ -127663,107 +128200,107 @@ var ComAtprotoServerNS2 = class {
127663
128200
  }
127664
128201
  confirmEmail(data, opts) {
127665
128202
  return this._service.xrpc.call("com.atproto.server.confirmEmail", opts?.qp, data, opts).catch((e) => {
127666
- throw toKnownErr32(e);
128203
+ throw toKnownErr36(e);
127667
128204
  });
127668
128205
  }
127669
128206
  createAccount(data, opts) {
127670
128207
  return this._service.xrpc.call("com.atproto.server.createAccount", opts?.qp, data, opts).catch((e) => {
127671
- throw toKnownErr33(e);
128208
+ throw toKnownErr37(e);
127672
128209
  });
127673
128210
  }
127674
128211
  createAppPassword(data, opts) {
127675
128212
  return this._service.xrpc.call("com.atproto.server.createAppPassword", opts?.qp, data, opts).catch((e) => {
127676
- throw toKnownErr34(e);
128213
+ throw toKnownErr38(e);
127677
128214
  });
127678
128215
  }
127679
128216
  createInviteCode(data, opts) {
127680
128217
  return this._service.xrpc.call("com.atproto.server.createInviteCode", opts?.qp, data, opts).catch((e) => {
127681
- throw toKnownErr35(e);
128218
+ throw toKnownErr39(e);
127682
128219
  });
127683
128220
  }
127684
128221
  createInviteCodes(data, opts) {
127685
128222
  return this._service.xrpc.call("com.atproto.server.createInviteCodes", opts?.qp, data, opts).catch((e) => {
127686
- throw toKnownErr36(e);
128223
+ throw toKnownErr40(e);
127687
128224
  });
127688
128225
  }
127689
128226
  createSession(data, opts) {
127690
128227
  return this._service.xrpc.call("com.atproto.server.createSession", opts?.qp, data, opts).catch((e) => {
127691
- throw toKnownErr37(e);
128228
+ throw toKnownErr41(e);
127692
128229
  });
127693
128230
  }
127694
128231
  deleteAccount(data, opts) {
127695
128232
  return this._service.xrpc.call("com.atproto.server.deleteAccount", opts?.qp, data, opts).catch((e) => {
127696
- throw toKnownErr38(e);
128233
+ throw toKnownErr42(e);
127697
128234
  });
127698
128235
  }
127699
128236
  deleteSession(data, opts) {
127700
128237
  return this._service.xrpc.call("com.atproto.server.deleteSession", opts?.qp, data, opts).catch((e) => {
127701
- throw toKnownErr39(e);
128238
+ throw toKnownErr43(e);
127702
128239
  });
127703
128240
  }
127704
128241
  describeServer(params2, opts) {
127705
128242
  return this._service.xrpc.call("com.atproto.server.describeServer", params2, void 0, opts).catch((e) => {
127706
- throw toKnownErr40(e);
128243
+ throw toKnownErr44(e);
127707
128244
  });
127708
128245
  }
127709
128246
  getAccountInviteCodes(params2, opts) {
127710
128247
  return this._service.xrpc.call("com.atproto.server.getAccountInviteCodes", params2, void 0, opts).catch((e) => {
127711
- throw toKnownErr41(e);
128248
+ throw toKnownErr45(e);
127712
128249
  });
127713
128250
  }
127714
128251
  getSession(params2, opts) {
127715
128252
  return this._service.xrpc.call("com.atproto.server.getSession", params2, void 0, opts).catch((e) => {
127716
- throw toKnownErr42(e);
128253
+ throw toKnownErr46(e);
127717
128254
  });
127718
128255
  }
127719
128256
  listAppPasswords(params2, opts) {
127720
128257
  return this._service.xrpc.call("com.atproto.server.listAppPasswords", params2, void 0, opts).catch((e) => {
127721
- throw toKnownErr43(e);
128258
+ throw toKnownErr47(e);
127722
128259
  });
127723
128260
  }
127724
128261
  refreshSession(data, opts) {
127725
128262
  return this._service.xrpc.call("com.atproto.server.refreshSession", opts?.qp, data, opts).catch((e) => {
127726
- throw toKnownErr44(e);
128263
+ throw toKnownErr48(e);
127727
128264
  });
127728
128265
  }
127729
128266
  requestAccountDelete(data, opts) {
127730
128267
  return this._service.xrpc.call("com.atproto.server.requestAccountDelete", opts?.qp, data, opts).catch((e) => {
127731
- throw toKnownErr45(e);
128268
+ throw toKnownErr49(e);
127732
128269
  });
127733
128270
  }
127734
128271
  requestEmailConfirmation(data, opts) {
127735
128272
  return this._service.xrpc.call("com.atproto.server.requestEmailConfirmation", opts?.qp, data, opts).catch((e) => {
127736
- throw toKnownErr46(e);
128273
+ throw toKnownErr50(e);
127737
128274
  });
127738
128275
  }
127739
128276
  requestEmailUpdate(data, opts) {
127740
128277
  return this._service.xrpc.call("com.atproto.server.requestEmailUpdate", opts?.qp, data, opts).catch((e) => {
127741
- throw toKnownErr47(e);
128278
+ throw toKnownErr51(e);
127742
128279
  });
127743
128280
  }
127744
128281
  requestPasswordReset(data, opts) {
127745
128282
  return this._service.xrpc.call("com.atproto.server.requestPasswordReset", opts?.qp, data, opts).catch((e) => {
127746
- throw toKnownErr48(e);
128283
+ throw toKnownErr52(e);
127747
128284
  });
127748
128285
  }
127749
128286
  reserveSigningKey(data, opts) {
127750
128287
  return this._service.xrpc.call("com.atproto.server.reserveSigningKey", opts?.qp, data, opts).catch((e) => {
127751
- throw toKnownErr49(e);
128288
+ throw toKnownErr53(e);
127752
128289
  });
127753
128290
  }
127754
128291
  resetPassword(data, opts) {
127755
128292
  return this._service.xrpc.call("com.atproto.server.resetPassword", opts?.qp, data, opts).catch((e) => {
127756
- throw toKnownErr50(e);
128293
+ throw toKnownErr54(e);
127757
128294
  });
127758
128295
  }
127759
128296
  revokeAppPassword(data, opts) {
127760
128297
  return this._service.xrpc.call("com.atproto.server.revokeAppPassword", opts?.qp, data, opts).catch((e) => {
127761
- throw toKnownErr51(e);
128298
+ throw toKnownErr55(e);
127762
128299
  });
127763
128300
  }
127764
128301
  updateEmail(data, opts) {
127765
128302
  return this._service.xrpc.call("com.atproto.server.updateEmail", opts?.qp, data, opts).catch((e) => {
127766
- throw toKnownErr52(e);
128303
+ throw toKnownErr56(e);
127767
128304
  });
127768
128305
  }
127769
128306
  };
@@ -127773,57 +128310,57 @@ var ComAtprotoSyncNS2 = class {
127773
128310
  }
127774
128311
  getBlob(params2, opts) {
127775
128312
  return this._service.xrpc.call("com.atproto.sync.getBlob", params2, void 0, opts).catch((e) => {
127776
- throw toKnownErr53(e);
128313
+ throw toKnownErr57(e);
127777
128314
  });
127778
128315
  }
127779
128316
  getBlocks(params2, opts) {
127780
128317
  return this._service.xrpc.call("com.atproto.sync.getBlocks", params2, void 0, opts).catch((e) => {
127781
- throw toKnownErr54(e);
128318
+ throw toKnownErr58(e);
127782
128319
  });
127783
128320
  }
127784
128321
  getCheckout(params2, opts) {
127785
128322
  return this._service.xrpc.call("com.atproto.sync.getCheckout", params2, void 0, opts).catch((e) => {
127786
- throw toKnownErr55(e);
128323
+ throw toKnownErr59(e);
127787
128324
  });
127788
128325
  }
127789
128326
  getHead(params2, opts) {
127790
128327
  return this._service.xrpc.call("com.atproto.sync.getHead", params2, void 0, opts).catch((e) => {
127791
- throw toKnownErr56(e);
128328
+ throw toKnownErr60(e);
127792
128329
  });
127793
128330
  }
127794
128331
  getLatestCommit(params2, opts) {
127795
128332
  return this._service.xrpc.call("com.atproto.sync.getLatestCommit", params2, void 0, opts).catch((e) => {
127796
- throw toKnownErr57(e);
128333
+ throw toKnownErr61(e);
127797
128334
  });
127798
128335
  }
127799
128336
  getRecord(params2, opts) {
127800
128337
  return this._service.xrpc.call("com.atproto.sync.getRecord", params2, void 0, opts).catch((e) => {
127801
- throw toKnownErr58(e);
128338
+ throw toKnownErr62(e);
127802
128339
  });
127803
128340
  }
127804
128341
  getRepo(params2, opts) {
127805
128342
  return this._service.xrpc.call("com.atproto.sync.getRepo", params2, void 0, opts).catch((e) => {
127806
- throw toKnownErr59(e);
128343
+ throw toKnownErr63(e);
127807
128344
  });
127808
128345
  }
127809
128346
  listBlobs(params2, opts) {
127810
128347
  return this._service.xrpc.call("com.atproto.sync.listBlobs", params2, void 0, opts).catch((e) => {
127811
- throw toKnownErr60(e);
128348
+ throw toKnownErr64(e);
127812
128349
  });
127813
128350
  }
127814
128351
  listRepos(params2, opts) {
127815
128352
  return this._service.xrpc.call("com.atproto.sync.listRepos", params2, void 0, opts).catch((e) => {
127816
- throw toKnownErr61(e);
128353
+ throw toKnownErr65(e);
127817
128354
  });
127818
128355
  }
127819
128356
  notifyOfUpdate(data, opts) {
127820
128357
  return this._service.xrpc.call("com.atproto.sync.notifyOfUpdate", opts?.qp, data, opts).catch((e) => {
127821
- throw toKnownErr62(e);
128358
+ throw toKnownErr66(e);
127822
128359
  });
127823
128360
  }
127824
128361
  requestCrawl(data, opts) {
127825
128362
  return this._service.xrpc.call("com.atproto.sync.requestCrawl", opts?.qp, data, opts).catch((e) => {
127826
- throw toKnownErr63(e);
128363
+ throw toKnownErr67(e);
127827
128364
  });
127828
128365
  }
127829
128366
  };
@@ -127833,27 +128370,27 @@ var ComAtprotoTempNS2 = class {
127833
128370
  }
127834
128371
  fetchLabels(params2, opts) {
127835
128372
  return this._service.xrpc.call("com.atproto.temp.fetchLabels", params2, void 0, opts).catch((e) => {
127836
- throw toKnownErr64(e);
128373
+ throw toKnownErr68(e);
127837
128374
  });
127838
128375
  }
127839
128376
  importRepo(data, opts) {
127840
128377
  return this._service.xrpc.call("com.atproto.temp.importRepo", opts?.qp, data, opts).catch((e) => {
127841
- throw toKnownErr65(e);
128378
+ throw toKnownErr69(e);
127842
128379
  });
127843
128380
  }
127844
128381
  pushBlob(data, opts) {
127845
128382
  return this._service.xrpc.call("com.atproto.temp.pushBlob", opts?.qp, data, opts).catch((e) => {
127846
- throw toKnownErr66(e);
128383
+ throw toKnownErr70(e);
127847
128384
  });
127848
128385
  }
127849
128386
  requestPhoneVerification(data, opts) {
127850
128387
  return this._service.xrpc.call("com.atproto.temp.requestPhoneVerification", opts?.qp, data, opts).catch((e) => {
127851
- throw toKnownErr67(e);
128388
+ throw toKnownErr71(e);
127852
128389
  });
127853
128390
  }
127854
128391
  transferAccount(data, opts) {
127855
128392
  return this._service.xrpc.call("com.atproto.temp.transferAccount", opts?.qp, data, opts).catch((e) => {
127856
- throw toKnownErr68(e);
128393
+ throw toKnownErr72(e);
127857
128394
  });
127858
128395
  }
127859
128396
  };
@@ -127882,37 +128419,37 @@ var AppBskyActorNS2 = class {
127882
128419
  }
127883
128420
  getPreferences(params2, opts) {
127884
128421
  return this._service.xrpc.call("app.bsky.actor.getPreferences", params2, void 0, opts).catch((e) => {
127885
- throw toKnownErr69(e);
128422
+ throw toKnownErr73(e);
127886
128423
  });
127887
128424
  }
127888
128425
  getProfile(params2, opts) {
127889
128426
  return this._service.xrpc.call("app.bsky.actor.getProfile", params2, void 0, opts).catch((e) => {
127890
- throw toKnownErr70(e);
128427
+ throw toKnownErr74(e);
127891
128428
  });
127892
128429
  }
127893
128430
  getProfiles(params2, opts) {
127894
128431
  return this._service.xrpc.call("app.bsky.actor.getProfiles", params2, void 0, opts).catch((e) => {
127895
- throw toKnownErr71(e);
128432
+ throw toKnownErr75(e);
127896
128433
  });
127897
128434
  }
127898
128435
  getSuggestions(params2, opts) {
127899
128436
  return this._service.xrpc.call("app.bsky.actor.getSuggestions", params2, void 0, opts).catch((e) => {
127900
- throw toKnownErr72(e);
128437
+ throw toKnownErr76(e);
127901
128438
  });
127902
128439
  }
127903
128440
  putPreferences(data, opts) {
127904
128441
  return this._service.xrpc.call("app.bsky.actor.putPreferences", opts?.qp, data, opts).catch((e) => {
127905
- throw toKnownErr73(e);
128442
+ throw toKnownErr77(e);
127906
128443
  });
127907
128444
  }
127908
128445
  searchActors(params2, opts) {
127909
128446
  return this._service.xrpc.call("app.bsky.actor.searchActors", params2, void 0, opts).catch((e) => {
127910
- throw toKnownErr74(e);
128447
+ throw toKnownErr78(e);
127911
128448
  });
127912
128449
  }
127913
128450
  searchActorsTypeahead(params2, opts) {
127914
128451
  return this._service.xrpc.call("app.bsky.actor.searchActorsTypeahead", params2, void 0, opts).catch((e) => {
127915
- throw toKnownErr75(e);
128452
+ throw toKnownErr79(e);
127916
128453
  });
127917
128454
  }
127918
128455
  };
@@ -127959,82 +128496,82 @@ var AppBskyFeedNS2 = class {
127959
128496
  }
127960
128497
  describeFeedGenerator(params2, opts) {
127961
128498
  return this._service.xrpc.call("app.bsky.feed.describeFeedGenerator", params2, void 0, opts).catch((e) => {
127962
- throw toKnownErr76(e);
128499
+ throw toKnownErr80(e);
127963
128500
  });
127964
128501
  }
127965
128502
  getActorFeeds(params2, opts) {
127966
128503
  return this._service.xrpc.call("app.bsky.feed.getActorFeeds", params2, void 0, opts).catch((e) => {
127967
- throw toKnownErr77(e);
128504
+ throw toKnownErr81(e);
127968
128505
  });
127969
128506
  }
127970
128507
  getActorLikes(params2, opts) {
127971
128508
  return this._service.xrpc.call("app.bsky.feed.getActorLikes", params2, void 0, opts).catch((e) => {
127972
- throw toKnownErr78(e);
128509
+ throw toKnownErr82(e);
127973
128510
  });
127974
128511
  }
127975
128512
  getAuthorFeed(params2, opts) {
127976
128513
  return this._service.xrpc.call("app.bsky.feed.getAuthorFeed", params2, void 0, opts).catch((e) => {
127977
- throw toKnownErr79(e);
128514
+ throw toKnownErr83(e);
127978
128515
  });
127979
128516
  }
127980
128517
  getFeed(params2, opts) {
127981
128518
  return this._service.xrpc.call("app.bsky.feed.getFeed", params2, void 0, opts).catch((e) => {
127982
- throw toKnownErr80(e);
128519
+ throw toKnownErr84(e);
127983
128520
  });
127984
128521
  }
127985
128522
  getFeedGenerator(params2, opts) {
127986
128523
  return this._service.xrpc.call("app.bsky.feed.getFeedGenerator", params2, void 0, opts).catch((e) => {
127987
- throw toKnownErr81(e);
128524
+ throw toKnownErr85(e);
127988
128525
  });
127989
128526
  }
127990
128527
  getFeedGenerators(params2, opts) {
127991
128528
  return this._service.xrpc.call("app.bsky.feed.getFeedGenerators", params2, void 0, opts).catch((e) => {
127992
- throw toKnownErr82(e);
128529
+ throw toKnownErr86(e);
127993
128530
  });
127994
128531
  }
127995
128532
  getFeedSkeleton(params2, opts) {
127996
128533
  return this._service.xrpc.call("app.bsky.feed.getFeedSkeleton", params2, void 0, opts).catch((e) => {
127997
- throw toKnownErr83(e);
128534
+ throw toKnownErr87(e);
127998
128535
  });
127999
128536
  }
128000
128537
  getLikes(params2, opts) {
128001
128538
  return this._service.xrpc.call("app.bsky.feed.getLikes", params2, void 0, opts).catch((e) => {
128002
- throw toKnownErr84(e);
128539
+ throw toKnownErr88(e);
128003
128540
  });
128004
128541
  }
128005
128542
  getListFeed(params2, opts) {
128006
128543
  return this._service.xrpc.call("app.bsky.feed.getListFeed", params2, void 0, opts).catch((e) => {
128007
- throw toKnownErr85(e);
128544
+ throw toKnownErr89(e);
128008
128545
  });
128009
128546
  }
128010
128547
  getPostThread(params2, opts) {
128011
128548
  return this._service.xrpc.call("app.bsky.feed.getPostThread", params2, void 0, opts).catch((e) => {
128012
- throw toKnownErr86(e);
128549
+ throw toKnownErr90(e);
128013
128550
  });
128014
128551
  }
128015
128552
  getPosts(params2, opts) {
128016
128553
  return this._service.xrpc.call("app.bsky.feed.getPosts", params2, void 0, opts).catch((e) => {
128017
- throw toKnownErr87(e);
128554
+ throw toKnownErr91(e);
128018
128555
  });
128019
128556
  }
128020
128557
  getRepostedBy(params2, opts) {
128021
128558
  return this._service.xrpc.call("app.bsky.feed.getRepostedBy", params2, void 0, opts).catch((e) => {
128022
- throw toKnownErr88(e);
128559
+ throw toKnownErr92(e);
128023
128560
  });
128024
128561
  }
128025
128562
  getSuggestedFeeds(params2, opts) {
128026
128563
  return this._service.xrpc.call("app.bsky.feed.getSuggestedFeeds", params2, void 0, opts).catch((e) => {
128027
- throw toKnownErr89(e);
128564
+ throw toKnownErr93(e);
128028
128565
  });
128029
128566
  }
128030
128567
  getTimeline(params2, opts) {
128031
128568
  return this._service.xrpc.call("app.bsky.feed.getTimeline", params2, void 0, opts).catch((e) => {
128032
- throw toKnownErr90(e);
128569
+ throw toKnownErr94(e);
128033
128570
  });
128034
128571
  }
128035
128572
  searchPosts(params2, opts) {
128036
128573
  return this._service.xrpc.call("app.bsky.feed.searchPosts", params2, void 0, opts).catch((e) => {
128037
- throw toKnownErr91(e);
128574
+ throw toKnownErr95(e);
128038
128575
  });
128039
128576
  }
128040
128577
  };
@@ -128184,67 +128721,67 @@ var AppBskyGraphNS2 = class {
128184
128721
  }
128185
128722
  getBlocks(params2, opts) {
128186
128723
  return this._service.xrpc.call("app.bsky.graph.getBlocks", params2, void 0, opts).catch((e) => {
128187
- throw toKnownErr92(e);
128724
+ throw toKnownErr96(e);
128188
128725
  });
128189
128726
  }
128190
128727
  getFollowers(params2, opts) {
128191
128728
  return this._service.xrpc.call("app.bsky.graph.getFollowers", params2, void 0, opts).catch((e) => {
128192
- throw toKnownErr93(e);
128729
+ throw toKnownErr97(e);
128193
128730
  });
128194
128731
  }
128195
128732
  getFollows(params2, opts) {
128196
128733
  return this._service.xrpc.call("app.bsky.graph.getFollows", params2, void 0, opts).catch((e) => {
128197
- throw toKnownErr94(e);
128734
+ throw toKnownErr98(e);
128198
128735
  });
128199
128736
  }
128200
128737
  getList(params2, opts) {
128201
128738
  return this._service.xrpc.call("app.bsky.graph.getList", params2, void 0, opts).catch((e) => {
128202
- throw toKnownErr95(e);
128739
+ throw toKnownErr99(e);
128203
128740
  });
128204
128741
  }
128205
128742
  getListBlocks(params2, opts) {
128206
128743
  return this._service.xrpc.call("app.bsky.graph.getListBlocks", params2, void 0, opts).catch((e) => {
128207
- throw toKnownErr96(e);
128744
+ throw toKnownErr100(e);
128208
128745
  });
128209
128746
  }
128210
128747
  getListMutes(params2, opts) {
128211
128748
  return this._service.xrpc.call("app.bsky.graph.getListMutes", params2, void 0, opts).catch((e) => {
128212
- throw toKnownErr97(e);
128749
+ throw toKnownErr101(e);
128213
128750
  });
128214
128751
  }
128215
128752
  getLists(params2, opts) {
128216
128753
  return this._service.xrpc.call("app.bsky.graph.getLists", params2, void 0, opts).catch((e) => {
128217
- throw toKnownErr98(e);
128754
+ throw toKnownErr102(e);
128218
128755
  });
128219
128756
  }
128220
128757
  getMutes(params2, opts) {
128221
128758
  return this._service.xrpc.call("app.bsky.graph.getMutes", params2, void 0, opts).catch((e) => {
128222
- throw toKnownErr99(e);
128759
+ throw toKnownErr103(e);
128223
128760
  });
128224
128761
  }
128225
128762
  getSuggestedFollowsByActor(params2, opts) {
128226
128763
  return this._service.xrpc.call("app.bsky.graph.getSuggestedFollowsByActor", params2, void 0, opts).catch((e) => {
128227
- throw toKnownErr100(e);
128764
+ throw toKnownErr104(e);
128228
128765
  });
128229
128766
  }
128230
128767
  muteActor(data, opts) {
128231
128768
  return this._service.xrpc.call("app.bsky.graph.muteActor", opts?.qp, data, opts).catch((e) => {
128232
- throw toKnownErr101(e);
128769
+ throw toKnownErr105(e);
128233
128770
  });
128234
128771
  }
128235
128772
  muteActorList(data, opts) {
128236
128773
  return this._service.xrpc.call("app.bsky.graph.muteActorList", opts?.qp, data, opts).catch((e) => {
128237
- throw toKnownErr102(e);
128774
+ throw toKnownErr106(e);
128238
128775
  });
128239
128776
  }
128240
128777
  unmuteActor(data, opts) {
128241
128778
  return this._service.xrpc.call("app.bsky.graph.unmuteActor", opts?.qp, data, opts).catch((e) => {
128242
- throw toKnownErr103(e);
128779
+ throw toKnownErr107(e);
128243
128780
  });
128244
128781
  }
128245
128782
  unmuteActorList(data, opts) {
128246
128783
  return this._service.xrpc.call("app.bsky.graph.unmuteActorList", opts?.qp, data, opts).catch((e) => {
128247
- throw toKnownErr104(e);
128784
+ throw toKnownErr108(e);
128248
128785
  });
128249
128786
  }
128250
128787
  };
@@ -128389,22 +128926,22 @@ var AppBskyNotificationNS2 = class {
128389
128926
  }
128390
128927
  getUnreadCount(params2, opts) {
128391
128928
  return this._service.xrpc.call("app.bsky.notification.getUnreadCount", params2, void 0, opts).catch((e) => {
128392
- throw toKnownErr105(e);
128929
+ throw toKnownErr109(e);
128393
128930
  });
128394
128931
  }
128395
128932
  listNotifications(params2, opts) {
128396
128933
  return this._service.xrpc.call("app.bsky.notification.listNotifications", params2, void 0, opts).catch((e) => {
128397
- throw toKnownErr106(e);
128934
+ throw toKnownErr110(e);
128398
128935
  });
128399
128936
  }
128400
128937
  registerPush(data, opts) {
128401
128938
  return this._service.xrpc.call("app.bsky.notification.registerPush", opts?.qp, data, opts).catch((e) => {
128402
- throw toKnownErr107(e);
128939
+ throw toKnownErr111(e);
128403
128940
  });
128404
128941
  }
128405
128942
  updateSeen(data, opts) {
128406
128943
  return this._service.xrpc.call("app.bsky.notification.updateSeen", opts?.qp, data, opts).catch((e) => {
128407
- throw toKnownErr108(e);
128944
+ throw toKnownErr112(e);
128408
128945
  });
128409
128946
  }
128410
128947
  };
@@ -128419,22 +128956,22 @@ var AppBskyUnspeccedNS2 = class {
128419
128956
  }
128420
128957
  getPopularFeedGenerators(params2, opts) {
128421
128958
  return this._service.xrpc.call("app.bsky.unspecced.getPopularFeedGenerators", params2, void 0, opts).catch((e) => {
128422
- throw toKnownErr109(e);
128959
+ throw toKnownErr113(e);
128423
128960
  });
128424
128961
  }
128425
128962
  getTimelineSkeleton(params2, opts) {
128426
128963
  return this._service.xrpc.call("app.bsky.unspecced.getTimelineSkeleton", params2, void 0, opts).catch((e) => {
128427
- throw toKnownErr110(e);
128964
+ throw toKnownErr114(e);
128428
128965
  });
128429
128966
  }
128430
128967
  searchActorsSkeleton(params2, opts) {
128431
128968
  return this._service.xrpc.call("app.bsky.unspecced.searchActorsSkeleton", params2, void 0, opts).catch((e) => {
128432
- throw toKnownErr111(e);
128969
+ throw toKnownErr115(e);
128433
128970
  });
128434
128971
  }
128435
128972
  searchPostsSkeleton(params2, opts) {
128436
128973
  return this._service.xrpc.call("app.bsky.unspecced.searchPostsSkeleton", params2, void 0, opts).catch((e) => {
128437
- throw toKnownErr112(e);
128974
+ throw toKnownErr116(e);
128438
128975
  });
128439
128976
  }
128440
128977
  };
@@ -128467,12 +129004,7 @@ var _AtpAgent = class {
128467
129004
  }
128468
129005
  async createAccount(opts) {
128469
129006
  try {
128470
- const res = await this.api.com.atproto.server.createAccount({
128471
- handle: opts.handle,
128472
- password: opts.password,
128473
- email: opts.email,
128474
- inviteCode: opts.inviteCode
128475
- });
129007
+ const res = await this.api.com.atproto.server.createAccount(opts);
128476
129008
  this.session = {
128477
129009
  accessJwt: res.data.accessJwt,
128478
129010
  refreshJwt: res.data.refreshJwt,
@@ -129583,7 +130115,8 @@ var import_stream8 = require("stream");
129583
130115
  // src/db/migrations/index.ts
129584
130116
  var migrations_exports = {};
129585
130117
  __export(migrations_exports, {
129586
- _20231219T205730722Z: () => T205730722Z_init_exports
130118
+ _20231219T205730722Z: () => T205730722Z_init_exports,
130119
+ _20240116T085607200Z: () => T085607200Z_communication_template_exports
129587
130120
  });
129588
130121
 
129589
130122
  // src/db/migrations/20231219T205730722Z-init.ts
@@ -129625,6 +130158,22 @@ async function down(db) {
129625
130158
  await db.schema.dropTable("blob_push_event").execute();
129626
130159
  }
129627
130160
 
130161
+ // src/db/migrations/20240116T085607200Z-communication-template.ts
130162
+ var T085607200Z_communication_template_exports = {};
130163
+ __export(T085607200Z_communication_template_exports, {
130164
+ down: () => down2,
130165
+ up: () => up2
130166
+ });
130167
+ async function up2(db) {
130168
+ await db.schema.createTable("communication_template").addColumn("id", "serial", (col) => col.primaryKey()).addColumn("name", "varchar", (col) => col.notNull()).addColumn("contentMarkdown", "varchar", (col) => col.notNull()).addColumn("subject", "varchar").addColumn("disabled", "boolean", (col) => col.defaultTo(false).notNull()).addColumn("createdAt", "timestamptz").addColumn("updatedAt", "timestamptz").addColumn("lastUpdatedBy", "varchar", (col) => col.notNull()).addUniqueConstraint("communication_template_unique_name", [
130169
+ "name",
130170
+ "disabled"
130171
+ ]).execute();
130172
+ }
130173
+ async function down2(db) {
130174
+ await db.schema.dropTable("communication_template");
130175
+ }
130176
+
129628
130177
  // src/db/migrations/provider.ts
129629
130178
  var CtxMigrationProvider = class {
129630
130179
  constructor(migrations, ctx) {
@@ -131311,6 +131860,73 @@ var OzoneDaemon = class {
131311
131860
  }
131312
131861
  };
131313
131862
 
131863
+ // src/communication-service/template.ts
131864
+ var CommunicationTemplateService = class {
131865
+ constructor(db) {
131866
+ this.db = db;
131867
+ }
131868
+ static creator() {
131869
+ return (db) => new CommunicationTemplateService(db);
131870
+ }
131871
+ async list() {
131872
+ const list = await this.db.db.selectFrom("communication_template").selectAll().execute();
131873
+ return list;
131874
+ }
131875
+ async create({
131876
+ name: name2,
131877
+ contentMarkdown,
131878
+ subject,
131879
+ disabled,
131880
+ updatedAt,
131881
+ createdAt,
131882
+ lastUpdatedBy
131883
+ }) {
131884
+ const newTemplate = await this.db.db.insertInto("communication_template").values({
131885
+ name: name2,
131886
+ contentMarkdown,
131887
+ subject,
131888
+ disabled,
131889
+ lastUpdatedBy,
131890
+ updatedAt: updatedAt || new Date(),
131891
+ createdAt: createdAt || new Date()
131892
+ }).returningAll().executeTakeFirstOrThrow();
131893
+ return newTemplate;
131894
+ }
131895
+ async update(id, {
131896
+ name: name2,
131897
+ contentMarkdown,
131898
+ subject,
131899
+ disabled,
131900
+ updatedAt,
131901
+ lastUpdatedBy
131902
+ }) {
131903
+ const updatedTemplate = await this.db.db.updateTable("communication_template").where("id", "=", id).set({
131904
+ name: name2,
131905
+ contentMarkdown,
131906
+ subject,
131907
+ disabled,
131908
+ lastUpdatedBy,
131909
+ updatedAt: updatedAt || new Date()
131910
+ }).returningAll().executeTakeFirstOrThrow();
131911
+ return updatedTemplate;
131912
+ }
131913
+ async delete(id) {
131914
+ await this.db.db.deleteFrom("communication_template").where("id", "=", id).execute();
131915
+ }
131916
+ view(template) {
131917
+ return {
131918
+ id: `${template.id}`,
131919
+ name: template.name,
131920
+ contentMarkdown: template.contentMarkdown,
131921
+ disabled: template.disabled,
131922
+ subject: template.subject || void 0,
131923
+ createdAt: template.createdAt.toISOString(),
131924
+ updatedAt: template.updatedAt.toISOString(),
131925
+ lastUpdatedBy: template.lastUpdatedBy
131926
+ };
131927
+ }
131928
+ };
131929
+
131314
131930
  // src/context.ts
131315
131931
  var AppContext = class {
131316
131932
  constructor(opts, secrets) {
@@ -131337,6 +131953,7 @@ var AppContext = class {
131337
131953
  pds: cfg.pds ?? void 0
131338
131954
  });
131339
131955
  const modService = ModerationService.creator(backgroundQueue, eventPusher, appviewAgent, appviewAuth);
131956
+ const communicationTemplateService = CommunicationTemplateService.creator();
131340
131957
  const idResolver = new IdResolver({
131341
131958
  plcUrl: cfg.identity.plcUrl
131342
131959
  });
@@ -131344,6 +131961,7 @@ var AppContext = class {
131344
131961
  db,
131345
131962
  cfg,
131346
131963
  modService,
131964
+ communicationTemplateService,
131347
131965
  appviewAgent,
131348
131966
  pdsAgent,
131349
131967
  signingKey,
@@ -131365,6 +131983,9 @@ var AppContext = class {
131365
131983
  get modService() {
131366
131984
  return this.opts.modService;
131367
131985
  }
131986
+ get communicationTemplateService() {
131987
+ return this.opts.communicationTemplateService;
131988
+ }
131368
131989
  get appviewAgent() {
131369
131990
  return this.opts.appviewAgent;
131370
131991
  }