@atproto/pds 0.4.55 → 0.4.57

Sign up to get free protection for your applications and to get access to all the features.
Files changed (123) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/api/com/atproto/repo/applyWrites.d.ts.map +1 -1
  3. package/dist/api/com/atproto/repo/applyWrites.js +43 -7
  4. package/dist/api/com/atproto/repo/applyWrites.js.map +1 -1
  5. package/dist/api/com/atproto/repo/createRecord.d.ts.map +1 -1
  6. package/dist/api/com/atproto/repo/createRecord.js +10 -2
  7. package/dist/api/com/atproto/repo/createRecord.js.map +1 -1
  8. package/dist/api/com/atproto/repo/deleteRecord.d.ts.map +1 -1
  9. package/dist/api/com/atproto/repo/deleteRecord.js +11 -0
  10. package/dist/api/com/atproto/repo/deleteRecord.js.map +1 -1
  11. package/dist/api/com/atproto/repo/putRecord.d.ts.map +1 -1
  12. package/dist/api/com/atproto/repo/putRecord.js +7 -0
  13. package/dist/api/com/atproto/repo/putRecord.js.map +1 -1
  14. package/dist/lexicon/index.d.ts +11 -0
  15. package/dist/lexicon/index.d.ts.map +1 -1
  16. package/dist/lexicon/index.js +32 -1
  17. package/dist/lexicon/index.js.map +1 -1
  18. package/dist/lexicon/lexicons.d.ts +367 -18
  19. package/dist/lexicon/lexicons.d.ts.map +1 -1
  20. package/dist/lexicon/lexicons.js +390 -24
  21. package/dist/lexicon/lexicons.js.map +1 -1
  22. package/dist/lexicon/types/app/bsky/embed/defs.d.ts +13 -0
  23. package/dist/lexicon/types/app/bsky/embed/defs.d.ts.map +1 -0
  24. package/dist/lexicon/types/app/bsky/embed/defs.js +16 -0
  25. package/dist/lexicon/types/app/bsky/embed/defs.js.map +1 -0
  26. package/dist/lexicon/types/app/bsky/embed/images.d.ts +3 -10
  27. package/dist/lexicon/types/app/bsky/embed/images.d.ts.map +1 -1
  28. package/dist/lexicon/types/app/bsky/embed/images.js +1 -11
  29. package/dist/lexicon/types/app/bsky/embed/images.js.map +1 -1
  30. package/dist/lexicon/types/app/bsky/embed/record.d.ts +2 -1
  31. package/dist/lexicon/types/app/bsky/embed/record.d.ts.map +1 -1
  32. package/dist/lexicon/types/app/bsky/embed/record.js.map +1 -1
  33. package/dist/lexicon/types/app/bsky/embed/recordWithMedia.d.ts +3 -2
  34. package/dist/lexicon/types/app/bsky/embed/recordWithMedia.d.ts.map +1 -1
  35. package/dist/lexicon/types/app/bsky/embed/recordWithMedia.js.map +1 -1
  36. package/dist/lexicon/types/app/bsky/embed/video.d.ts +33 -0
  37. package/dist/lexicon/types/app/bsky/embed/video.d.ts.map +1 -0
  38. package/dist/lexicon/types/app/bsky/embed/video.js +35 -0
  39. package/dist/lexicon/types/app/bsky/embed/video.js.map +1 -0
  40. package/dist/lexicon/types/app/bsky/feed/defs.d.ts +2 -1
  41. package/dist/lexicon/types/app/bsky/feed/defs.d.ts.map +1 -1
  42. package/dist/lexicon/types/app/bsky/feed/defs.js.map +1 -1
  43. package/dist/lexicon/types/app/bsky/feed/post.d.ts +2 -1
  44. package/dist/lexicon/types/app/bsky/feed/post.d.ts.map +1 -1
  45. package/dist/lexicon/types/app/bsky/feed/post.js.map +1 -1
  46. package/dist/lexicon/types/app/bsky/video/defs.d.ts +19 -0
  47. package/dist/lexicon/types/app/bsky/video/defs.d.ts.map +1 -0
  48. package/dist/lexicon/types/app/bsky/video/defs.js +16 -0
  49. package/dist/lexicon/types/app/bsky/video/defs.js.map +1 -0
  50. package/dist/lexicon/types/app/bsky/video/getJobStatus.d.ts +36 -0
  51. package/dist/lexicon/types/app/bsky/video/getJobStatus.d.ts.map +1 -0
  52. package/dist/lexicon/types/app/bsky/video/getJobStatus.js +3 -0
  53. package/dist/lexicon/types/app/bsky/video/getJobStatus.js.map +1 -0
  54. package/dist/lexicon/types/app/bsky/video/getUploadLimits.d.ts +38 -0
  55. package/dist/lexicon/types/app/bsky/video/getUploadLimits.d.ts.map +1 -0
  56. package/dist/lexicon/types/app/bsky/video/getUploadLimits.js +3 -0
  57. package/dist/lexicon/types/app/bsky/video/getUploadLimits.js.map +1 -0
  58. package/dist/lexicon/types/app/bsky/video/uploadVideo.d.ts +41 -0
  59. package/dist/lexicon/types/app/bsky/video/uploadVideo.d.ts.map +1 -0
  60. package/dist/lexicon/types/app/bsky/video/uploadVideo.js +3 -0
  61. package/dist/lexicon/types/app/bsky/video/uploadVideo.js.map +1 -0
  62. package/dist/lexicon/types/com/atproto/repo/applyWrites.d.ts +38 -4
  63. package/dist/lexicon/types/com/atproto/repo/applyWrites.d.ts.map +1 -1
  64. package/dist/lexicon/types/com/atproto/repo/applyWrites.js +31 -1
  65. package/dist/lexicon/types/com/atproto/repo/applyWrites.js.map +1 -1
  66. package/dist/lexicon/types/com/atproto/repo/createRecord.d.ts +5 -2
  67. package/dist/lexicon/types/com/atproto/repo/createRecord.d.ts.map +1 -1
  68. package/dist/lexicon/types/com/atproto/repo/defs.d.ts +12 -0
  69. package/dist/lexicon/types/com/atproto/repo/defs.d.ts.map +1 -0
  70. package/dist/lexicon/types/com/atproto/repo/defs.js +16 -0
  71. package/dist/lexicon/types/com/atproto/repo/defs.js.map +1 -0
  72. package/dist/lexicon/types/com/atproto/repo/deleteRecord.d.ts +14 -2
  73. package/dist/lexicon/types/com/atproto/repo/deleteRecord.d.ts.map +1 -1
  74. package/dist/lexicon/types/com/atproto/repo/putRecord.d.ts +5 -2
  75. package/dist/lexicon/types/com/atproto/repo/putRecord.d.ts.map +1 -1
  76. package/dist/lexicon/types/tools/ozone/communication/createTemplate.d.ts +3 -0
  77. package/dist/lexicon/types/tools/ozone/communication/createTemplate.d.ts.map +1 -1
  78. package/dist/lexicon/types/tools/ozone/communication/defs.d.ts +2 -0
  79. package/dist/lexicon/types/tools/ozone/communication/defs.d.ts.map +1 -1
  80. package/dist/lexicon/types/tools/ozone/communication/defs.js.map +1 -1
  81. package/dist/lexicon/types/tools/ozone/communication/updateTemplate.d.ts +3 -0
  82. package/dist/lexicon/types/tools/ozone/communication/updateTemplate.d.ts.map +1 -1
  83. package/dist/lexicon/types/tools/ozone/moderation/emitEvent.d.ts +1 -1
  84. package/dist/lexicon/types/tools/ozone/moderation/emitEvent.d.ts.map +1 -1
  85. package/dist/read-after-write/viewer.d.ts +4 -4
  86. package/dist/repo/prepare.d.ts +4 -2
  87. package/dist/repo/prepare.d.ts.map +1 -1
  88. package/dist/repo/prepare.js +30 -14
  89. package/dist/repo/prepare.js.map +1 -1
  90. package/dist/repo/types.d.ts +3 -0
  91. package/dist/repo/types.d.ts.map +1 -1
  92. package/dist/repo/types.js.map +1 -1
  93. package/dist/sequencer/events.d.ts +2 -2
  94. package/package.json +4 -4
  95. package/src/api/com/atproto/repo/applyWrites.ts +41 -0
  96. package/src/api/com/atproto/repo/createRecord.ts +16 -7
  97. package/src/api/com/atproto/repo/deleteRecord.ts +11 -0
  98. package/src/api/com/atproto/repo/putRecord.ts +7 -0
  99. package/src/lexicon/index.ts +46 -0
  100. package/src/lexicon/lexicons.ts +393 -25
  101. package/src/lexicon/types/app/bsky/embed/defs.ts +26 -0
  102. package/src/lexicon/types/app/bsky/embed/images.ts +3 -21
  103. package/src/lexicon/types/app/bsky/embed/record.ts +2 -0
  104. package/src/lexicon/types/app/bsky/embed/recordWithMedia.ts +3 -0
  105. package/src/lexicon/types/app/bsky/embed/video.ts +67 -0
  106. package/src/lexicon/types/app/bsky/feed/defs.ts +2 -0
  107. package/src/lexicon/types/app/bsky/feed/post.ts +2 -0
  108. package/src/lexicon/types/app/bsky/video/defs.ts +32 -0
  109. package/src/lexicon/types/app/bsky/video/getJobStatus.ts +46 -0
  110. package/src/lexicon/types/app/bsky/video/getUploadLimits.ts +47 -0
  111. package/src/lexicon/types/app/bsky/video/uploadVideo.ts +48 -0
  112. package/src/lexicon/types/com/atproto/repo/applyWrites.ts +70 -3
  113. package/src/lexicon/types/com/atproto/repo/createRecord.ts +5 -2
  114. package/src/lexicon/types/com/atproto/repo/defs.ts +25 -0
  115. package/src/lexicon/types/com/atproto/repo/deleteRecord.ts +13 -1
  116. package/src/lexicon/types/com/atproto/repo/putRecord.ts +5 -2
  117. package/src/lexicon/types/tools/ozone/communication/createTemplate.ts +3 -0
  118. package/src/lexicon/types/tools/ozone/communication/defs.ts +2 -0
  119. package/src/lexicon/types/tools/ozone/communication/updateTemplate.ts +3 -0
  120. package/src/lexicon/types/tools/ozone/moderation/emitEvent.ts +1 -0
  121. package/src/repo/prepare.ts +31 -13
  122. package/src/repo/types.ts +4 -0
  123. package/tests/crud.test.ts +131 -14
@@ -0,0 +1 @@
1
+ {"version":3,"file":"uploadVideo.js","sourceRoot":"","sources":["../../../../../../src/lexicon/types/app/bsky/video/uploadVideo.ts"],"names":[],"mappings":""}
@@ -3,29 +3,42 @@
3
3
  */
4
4
  import express from 'express';
5
5
  import { ValidationResult } from '@atproto/lexicon';
6
- import { HandlerAuth } from '@atproto/xrpc-server';
6
+ import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server';
7
+ import * as ComAtprotoRepoDefs from './defs';
7
8
  export interface QueryParams {
8
9
  }
9
10
  export interface InputSchema {
10
11
  /** The handle or DID of the repo (aka, current account). */
11
12
  repo: string;
12
- /** Can be set to 'false' to skip Lexicon schema validation of record data, for all operations. */
13
- validate: boolean;
13
+ /** Can be set to 'false' to skip Lexicon schema validation of record data across all operations, 'true' to require it, or leave unset to validate only for known Lexicons. */
14
+ validate?: boolean;
14
15
  writes: (Create | Update | Delete)[];
15
16
  /** If provided, the entire operation will fail if the current repo commit CID does not match this value. Used to prevent conflicting repo mutations. */
16
17
  swapCommit?: string;
17
18
  [k: string]: unknown;
18
19
  }
20
+ export interface OutputSchema {
21
+ commit?: ComAtprotoRepoDefs.CommitMeta;
22
+ results?: (CreateResult | UpdateResult | DeleteResult)[];
23
+ [k: string]: unknown;
24
+ }
19
25
  export interface HandlerInput {
20
26
  encoding: 'application/json';
21
27
  body: InputSchema;
22
28
  }
29
+ export interface HandlerSuccess {
30
+ encoding: 'application/json';
31
+ body: OutputSchema;
32
+ headers?: {
33
+ [key: string]: string;
34
+ };
35
+ }
23
36
  export interface HandlerError {
24
37
  status: number;
25
38
  message?: string;
26
39
  error?: 'InvalidSwap';
27
40
  }
28
- export type HandlerOutput = HandlerError | void;
41
+ export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough;
29
42
  export type HandlerReqCtx<HA extends HandlerAuth = never> = {
30
43
  auth: HA;
31
44
  params: QueryParams;
@@ -60,4 +73,25 @@ export interface Delete {
60
73
  }
61
74
  export declare function isDelete(v: unknown): v is Delete;
62
75
  export declare function validateDelete(v: unknown): ValidationResult;
76
+ export interface CreateResult {
77
+ uri: string;
78
+ cid: string;
79
+ validationStatus?: 'valid' | 'unknown' | (string & {});
80
+ [k: string]: unknown;
81
+ }
82
+ export declare function isCreateResult(v: unknown): v is CreateResult;
83
+ export declare function validateCreateResult(v: unknown): ValidationResult;
84
+ export interface UpdateResult {
85
+ uri: string;
86
+ cid: string;
87
+ validationStatus?: 'valid' | 'unknown' | (string & {});
88
+ [k: string]: unknown;
89
+ }
90
+ export declare function isUpdateResult(v: unknown): v is UpdateResult;
91
+ export declare function validateUpdateResult(v: unknown): ValidationResult;
92
+ export interface DeleteResult {
93
+ [k: string]: unknown;
94
+ }
95
+ export declare function isDeleteResult(v: unknown): v is DeleteResult;
96
+ export declare function validateDeleteResult(v: unknown): ValidationResult;
63
97
  //# sourceMappingURL=applyWrites.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"applyWrites.d.ts","sourceRoot":"","sources":["../../../../../../src/lexicon/types/com/atproto/repo/applyWrites.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,OAAO,MAAM,SAAS,CAAA;AAC7B,OAAO,EAAE,gBAAgB,EAAW,MAAM,kBAAkB,CAAA;AAI5D,OAAO,EAAE,WAAW,EAAsB,MAAM,sBAAsB,CAAA;AAEtE,MAAM,WAAW,WAAW;CAAG;AAE/B,MAAM,WAAW,WAAW;IAC1B,4DAA4D;IAC5D,IAAI,EAAE,MAAM,CAAA;IACZ,kGAAkG;IAClG,QAAQ,EAAE,OAAO,CAAA;IAC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E,MAAM,CAAA;IACX,gBAAgB,CAAC,EAAE,OAAO,GAAG,SAAS,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAA;IACtD,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;CACrB;AAED,wBAAgB,cAAc,CAAC,CAAC,EAAE,OAAO,GAAG,CAAC,IAAI,YAAY,CAM5D;AAED,wBAAgB,oBAAoB,CAAC,CAAC,EAAE,OAAO,GAAG,gBAAgB,CAEjE;AAED,MAAM,WAAW,YAAY;IAC3B,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;CACrB;AAED,wBAAgB,cAAc,CAAC,CAAC,EAAE,OAAO,GAAG,CAAC,IAAI,YAAY,CAM5D;AAED,wBAAgB,oBAAoB,CAAC,CAAC,EAAE,OAAO,GAAG,gBAAgB,CAEjE"}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.validateDelete = exports.isDelete = exports.validateUpdate = exports.isUpdate = exports.validateCreate = exports.isCreate = void 0;
3
+ exports.validateDeleteResult = exports.isDeleteResult = exports.validateUpdateResult = exports.isUpdateResult = exports.validateCreateResult = exports.isCreateResult = exports.validateDelete = exports.isDelete = exports.validateUpdate = exports.isUpdate = exports.validateCreate = exports.isCreate = void 0;
4
4
  const lexicons_1 = require("../../../../lexicons");
5
5
  const util_1 = require("../../../../util");
6
6
  function isCreate(v) {
@@ -33,4 +33,34 @@ function validateDelete(v) {
33
33
  return lexicons_1.lexicons.validate('com.atproto.repo.applyWrites#delete', v);
34
34
  }
35
35
  exports.validateDelete = validateDelete;
36
+ function isCreateResult(v) {
37
+ return ((0, util_1.isObj)(v) &&
38
+ (0, util_1.hasProp)(v, '$type') &&
39
+ v.$type === 'com.atproto.repo.applyWrites#createResult');
40
+ }
41
+ exports.isCreateResult = isCreateResult;
42
+ function validateCreateResult(v) {
43
+ return lexicons_1.lexicons.validate('com.atproto.repo.applyWrites#createResult', v);
44
+ }
45
+ exports.validateCreateResult = validateCreateResult;
46
+ function isUpdateResult(v) {
47
+ return ((0, util_1.isObj)(v) &&
48
+ (0, util_1.hasProp)(v, '$type') &&
49
+ v.$type === 'com.atproto.repo.applyWrites#updateResult');
50
+ }
51
+ exports.isUpdateResult = isUpdateResult;
52
+ function validateUpdateResult(v) {
53
+ return lexicons_1.lexicons.validate('com.atproto.repo.applyWrites#updateResult', v);
54
+ }
55
+ exports.validateUpdateResult = validateUpdateResult;
56
+ function isDeleteResult(v) {
57
+ return ((0, util_1.isObj)(v) &&
58
+ (0, util_1.hasProp)(v, '$type') &&
59
+ v.$type === 'com.atproto.repo.applyWrites#deleteResult');
60
+ }
61
+ exports.isDeleteResult = isDeleteResult;
62
+ function validateDeleteResult(v) {
63
+ return lexicons_1.lexicons.validate('com.atproto.repo.applyWrites#deleteResult', v);
64
+ }
65
+ exports.validateDeleteResult = validateDeleteResult;
36
66
  //# sourceMappingURL=applyWrites.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"applyWrites.js","sourceRoot":"","sources":["../../../../../../src/lexicon/types/com/atproto/repo/applyWrites.ts"],"names":[],"mappings":";;;AAKA,mDAA+C;AAC/C,2CAAiD;AAgDjD,SAAgB,QAAQ,CAAC,CAAU;IACjC,OAAO,CACL,IAAA,YAAK,EAAC,CAAC,CAAC;QACR,IAAA,cAAO,EAAC,CAAC,EAAE,OAAO,CAAC;QACnB,CAAC,CAAC,KAAK,KAAK,qCAAqC,CAClD,CAAA;AACH,CAAC;AAND,4BAMC;AAED,SAAgB,cAAc,CAAC,CAAU;IACvC,OAAO,mBAAQ,CAAC,QAAQ,CAAC,qCAAqC,EAAE,CAAC,CAAC,CAAA;AACpE,CAAC;AAFD,wCAEC;AAUD,SAAgB,QAAQ,CAAC,CAAU;IACjC,OAAO,CACL,IAAA,YAAK,EAAC,CAAC,CAAC;QACR,IAAA,cAAO,EAAC,CAAC,EAAE,OAAO,CAAC;QACnB,CAAC,CAAC,KAAK,KAAK,qCAAqC,CAClD,CAAA;AACH,CAAC;AAND,4BAMC;AAED,SAAgB,cAAc,CAAC,CAAU;IACvC,OAAO,mBAAQ,CAAC,QAAQ,CAAC,qCAAqC,EAAE,CAAC,CAAC,CAAA;AACpE,CAAC;AAFD,wCAEC;AASD,SAAgB,QAAQ,CAAC,CAAU;IACjC,OAAO,CACL,IAAA,YAAK,EAAC,CAAC,CAAC;QACR,IAAA,cAAO,EAAC,CAAC,EAAE,OAAO,CAAC;QACnB,CAAC,CAAC,KAAK,KAAK,qCAAqC,CAClD,CAAA;AACH,CAAC;AAND,4BAMC;AAED,SAAgB,cAAc,CAAC,CAAU;IACvC,OAAO,mBAAQ,CAAC,QAAQ,CAAC,qCAAqC,EAAE,CAAC,CAAC,CAAA;AACpE,CAAC;AAFD,wCAEC"}
1
+ {"version":3,"file":"applyWrites.js","sourceRoot":"","sources":["../../../../../../src/lexicon/types/com/atproto/repo/applyWrites.ts"],"names":[],"mappings":";;;AAKA,mDAA+C;AAC/C,2CAAiD;AA6DjD,SAAgB,QAAQ,CAAC,CAAU;IACjC,OAAO,CACL,IAAA,YAAK,EAAC,CAAC,CAAC;QACR,IAAA,cAAO,EAAC,CAAC,EAAE,OAAO,CAAC;QACnB,CAAC,CAAC,KAAK,KAAK,qCAAqC,CAClD,CAAA;AACH,CAAC;AAND,4BAMC;AAED,SAAgB,cAAc,CAAC,CAAU;IACvC,OAAO,mBAAQ,CAAC,QAAQ,CAAC,qCAAqC,EAAE,CAAC,CAAC,CAAA;AACpE,CAAC;AAFD,wCAEC;AAUD,SAAgB,QAAQ,CAAC,CAAU;IACjC,OAAO,CACL,IAAA,YAAK,EAAC,CAAC,CAAC;QACR,IAAA,cAAO,EAAC,CAAC,EAAE,OAAO,CAAC;QACnB,CAAC,CAAC,KAAK,KAAK,qCAAqC,CAClD,CAAA;AACH,CAAC;AAND,4BAMC;AAED,SAAgB,cAAc,CAAC,CAAU;IACvC,OAAO,mBAAQ,CAAC,QAAQ,CAAC,qCAAqC,EAAE,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SAAgB,oBAAoB,CAAC,CAAU;IAC7C,OAAO,mBAAQ,CAAC,QAAQ,CAAC,2CAA2C,EAAE,CAAC,CAAC,CAAA;AAC1E,CAAC;AAFD,oDAEC"}
@@ -3,6 +3,7 @@
3
3
  */
4
4
  import express from 'express';
5
5
  import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server';
6
+ import * as ComAtprotoRepoDefs from './defs';
6
7
  export interface QueryParams {
7
8
  }
8
9
  export interface InputSchema {
@@ -12,8 +13,8 @@ export interface InputSchema {
12
13
  collection: string;
13
14
  /** The Record Key. */
14
15
  rkey?: string;
15
- /** Can be set to 'false' to skip Lexicon schema validation of record data. */
16
- validate: boolean;
16
+ /** Can be set to 'false' to skip Lexicon schema validation of record data, 'true' to require it, or leave unset to validate only for known Lexicons. */
17
+ validate?: boolean;
17
18
  /** The record itself. Must contain a $type field. */
18
19
  record: {};
19
20
  /** Compare and swap with the previous commit by CID. */
@@ -23,6 +24,8 @@ export interface InputSchema {
23
24
  export interface OutputSchema {
24
25
  uri: string;
25
26
  cid: string;
27
+ commit?: ComAtprotoRepoDefs.CommitMeta;
28
+ validationStatus?: 'valid' | 'unknown' | (string & {});
26
29
  [k: string]: unknown;
27
30
  }
28
31
  export interface HandlerInput {
@@ -1 +1 @@
1
- {"version":3,"file":"createRecord.d.ts","sourceRoot":"","sources":["../../../../../../src/lexicon/types/com/atproto/repo/createRecord.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,OAAO,MAAM,SAAS,CAAA;AAK7B,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AAEtE,MAAM,WAAW,WAAW;CAAG;AAE/B,MAAM,WAAW,WAAW;IAC1B,4DAA4D;IAC5D,IAAI,EAAE,MAAM,CAAA;IACZ,yCAAyC;IACzC,UAAU,EAAE,MAAM,CAAA;IAClB,sBAAsB;IACtB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,8EAA8E;IAC9E,QAAQ,E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AE,MAAM,CAAA;IAChB,KAAK,CAAC,EAAE,aAAa,CAAA;CACtB;AAED,MAAM,MAAM,aAAa,GAAG,YAAY,GAAG,cAAc,GAAG,kBAAkB,CAAA;AAC9E,MAAM,MAAM,aAAa,CAAC,EAAE,SAAS,WAAW,GAAG,KAAK,IAAI;IAC1D,IAAI,EAAE,EAAE,CAAA;IACR,MAAM,EAAE,WAAW,CAAA;IACnB,KAAK,EAAE,YAAY,CAAA;IACnB,GAAG,EAAE,OAAO,CAAC,OAAO,CAAA;IACpB,GAAG,EAAE,OAAO,CAAC,QAAQ,CAAA;CACtB,CAAA;AACD,MAAM,MAAM,OAAO,CAAC,EAAE,SAAS,WAAW,GAAG,KAAK,IAAI,CACpD,GAAG,EAAE,aAAa,CAAC,EAAE,CAAC,KACnB,OAAO,CAAC,aAAa,CAAC,GAAG,aAAa,CAAA"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import { ValidationResult } from '@atproto/lexicon';
5
+ export interface CommitMeta {
6
+ cid: string;
7
+ rev: string;
8
+ [k: string]: unknown;
9
+ }
10
+ export declare function isCommitMeta(v: unknown): v is CommitMeta;
11
+ export declare function validateCommitMeta(v: unknown): ValidationResult;
12
+ //# sourceMappingURL=defs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"defs.d.ts","sourceRoot":"","sources":["../../../../../../src/lexicon/types/com/atproto/repo/defs.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,gBAAgB,EAAW,MAAM,kBAAkB,CAAA;AAK5D,MAAM,WAAW,UAAU;IACzB,GAAG,EAAE,MAAM,CAAA;IACX,GAAG,EAAE,MAAM,CAAA;IACX,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;CACrB;AAED,wBAAgB,YAAY,CAAC,CAAC,EAAE,OAAO,GAAG,CAAC,IAAI,UAAU,CAMxD;AAED,wBAAgB,kBAAkB,CAAC,CAAC,EAAE,OAAO,GAAG,gBAAgB,CAE/D"}
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.validateCommitMeta = exports.isCommitMeta = void 0;
4
+ const lexicons_1 = require("../../../../lexicons");
5
+ const util_1 = require("../../../../util");
6
+ function isCommitMeta(v) {
7
+ return ((0, util_1.isObj)(v) &&
8
+ (0, util_1.hasProp)(v, '$type') &&
9
+ v.$type === 'com.atproto.repo.defs#commitMeta');
10
+ }
11
+ exports.isCommitMeta = isCommitMeta;
12
+ function validateCommitMeta(v) {
13
+ return lexicons_1.lexicons.validate('com.atproto.repo.defs#commitMeta', v);
14
+ }
15
+ exports.validateCommitMeta = validateCommitMeta;
16
+ //# sourceMappingURL=defs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"defs.js","sourceRoot":"","sources":["../../../../../../src/lexicon/types/com/atproto/repo/defs.ts"],"names":[],"mappings":";;;AAIA,mDAA+C;AAC/C,2CAAiD;AASjD,SAAgB,YAAY,CAAC,CAAU;IACrC,OAAO,CACL,IAAA,YAAK,EAAC,CAAC,CAAC;QACR,IAAA,cAAO,EAAC,CAAC,EAAE,OAAO,CAAC;QACnB,CAAC,CAAC,KAAK,KAAK,kCAAkC,CAC/C,CAAA;AACH,CAAC;AAND,oCAMC;AAED,SAAgB,kBAAkB,CAAC,CAAU;IAC3C,OAAO,mBAAQ,CAAC,QAAQ,CAAC,kCAAkC,EAAE,CAAC,CAAC,CAAA;AACjE,CAAC;AAFD,gDAEC"}
@@ -2,7 +2,8 @@
2
2
  * GENERATED CODE - DO NOT MODIFY
3
3
  */
4
4
  import express from 'express';
5
- import { HandlerAuth } from '@atproto/xrpc-server';
5
+ import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server';
6
+ import * as ComAtprotoRepoDefs from './defs';
6
7
  export interface QueryParams {
7
8
  }
8
9
  export interface InputSchema {
@@ -18,16 +19,27 @@ export interface InputSchema {
18
19
  swapCommit?: string;
19
20
  [k: string]: unknown;
20
21
  }
22
+ export interface OutputSchema {
23
+ commit?: ComAtprotoRepoDefs.CommitMeta;
24
+ [k: string]: unknown;
25
+ }
21
26
  export interface HandlerInput {
22
27
  encoding: 'application/json';
23
28
  body: InputSchema;
24
29
  }
30
+ export interface HandlerSuccess {
31
+ encoding: 'application/json';
32
+ body: OutputSchema;
33
+ headers?: {
34
+ [key: string]: string;
35
+ };
36
+ }
25
37
  export interface HandlerError {
26
38
  status: number;
27
39
  message?: string;
28
40
  error?: 'InvalidSwap';
29
41
  }
30
- export type HandlerOutput = HandlerError | void;
42
+ export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough;
31
43
  export type HandlerReqCtx<HA extends HandlerAuth = never> = {
32
44
  auth: HA;
33
45
  params: QueryParams;
@@ -1 +1 @@
1
- {"version":3,"file":"deleteRecord.d.ts","sourceRoot":"","sources":["../../../../../../src/lexicon/types/com/atproto/repo/deleteRecord.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,OAAO,MAAM,SAAS,CAAA;AAK7B,OAAO,EAAE,WAAW,EAAsB,MAAM,sBAAsB,CAAA;AAEtE,MAAM,WAAW,WAAW;CAAG;AAE/B,MAAM,WAAW,WAAW;IAC1B,4DAA4D;IAC5D,IAAI,EAAE,MAAM,CAAA;IACZ,yCAAyC;IACzC,UAAU,EAAE,MAAM,CAAA;IAClB,sBAAsB;IACtB,IAAI,EAAE,MAAM,CAAA;IACZ,wDAAwD;IACxD,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,wDAAwD;IACxD,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;CACrB;AAED,MAAM,WAAW,YAAY;IAC3B,QAAQ,EAAE,kBAAkB,CAAA;IAC5B,IAAI,EAAE,WAAW,CAAA;CAClB;AAED,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,MAAM,CA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OAAO,CAAA;CACrB;AAED,MAAM,WAAW,YAAY;IAC3B,QAAQ,EAAE,kBAAkB,CAAA;IAC5B,IAAI,EAAE,WAAW,CAAA;CAClB;AAED,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,kBAAkB,CAAA;IAC5B,IAAI,EAAE,YAAY,CAAA;IAClB,OAAO,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAA;CACpC;AAED,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,KAAK,CAAC,EAAE,aAAa,CAAA;CACtB;AAED,MAAM,MAAM,aAAa,GAAG,YAAY,GAAG,cAAc,GAAG,kBAAkB,CAAA;AAC9E,MAAM,MAAM,aAAa,CAAC,EAAE,SAAS,WAAW,GAAG,KAAK,IAAI;IAC1D,IAAI,EAAE,EAAE,CAAA;IACR,MAAM,EAAE,WAAW,CAAA;IACnB,KAAK,EAAE,YAAY,CAAA;IACnB,GAAG,EAAE,OAAO,CAAC,OAAO,CAAA;IACpB,GAAG,EAAE,OAAO,CAAC,QAAQ,CAAA;CACtB,CAAA;AACD,MAAM,MAAM,OAAO,CAAC,EAAE,SAAS,WAAW,GAAG,KAAK,IAAI,CACpD,GAAG,EAAE,aAAa,CAAC,EAAE,CAAC,KACnB,OAAO,CAAC,aAAa,CAAC,GAAG,aAAa,CAAA"}
@@ -3,6 +3,7 @@
3
3
  */
4
4
  import express from 'express';
5
5
  import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server';
6
+ import * as ComAtprotoRepoDefs from './defs';
6
7
  export interface QueryParams {
7
8
  }
8
9
  export interface InputSchema {
@@ -12,8 +13,8 @@ export interface InputSchema {
12
13
  collection: string;
13
14
  /** The Record Key. */
14
15
  rkey: string;
15
- /** Can be set to 'false' to skip Lexicon schema validation of record data. */
16
- validate: boolean;
16
+ /** Can be set to 'false' to skip Lexicon schema validation of record data, 'true' to require it, or leave unset to validate only for known Lexicons. */
17
+ validate?: boolean;
17
18
  /** The record to write. */
18
19
  record: {};
19
20
  /** Compare and swap with the previous record by CID. WARNING: nullable and optional field; may cause problems with golang implementation */
@@ -25,6 +26,8 @@ export interface InputSchema {
25
26
  export interface OutputSchema {
26
27
  uri: string;
27
28
  cid: string;
29
+ commit?: ComAtprotoRepoDefs.CommitMeta;
30
+ validationStatus?: 'valid' | 'unknown' | (string & {});
28
31
  [k: string]: unknown;
29
32
  }
30
33
  export interface HandlerInput {
@@ -1 +1 @@
1
- {"version":3,"file":"putRecord.d.ts","sourceRoot":"","sources":["../../../../../../src/lexicon/types/com/atproto/repo/putRecord.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,OAAO,MAAM,SAAS,CAAA;AAK7B,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AAEtE,MAAM,WAAW,WAAW;CAAG;AAE/B,MAAM,WAAW,WAAW;IAC1B,4DAA4D;IAC5D,IAAI,EAAE,MAAM,CAAA;IACZ,yCAAyC;IACzC,UAAU,EAAE,MAAM,CAAA;IAClB,sBAAsB;IACtB,IAAI,EAAE,MAAM,CAAA;IACZ,8EAA8E;IAC9E,QAAQ,EAAE,OAAO,CAAA;IACjB,2BAA2B;IAC3B,MAAM,EAAE,EAAE,CAAA;IACV,4IAA4I;IAC5I,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC1B,wDAAwD;IACxD,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;CACrB;AAED,MAAM,WAAW,YAAY;IAC3B,GAAG,EAAE,MAAM,CAAA;IACX,GAAG,EAAE,MAAM,CAAA;IACX,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;CACrB;AAED,MAAM,WAAW,YAAY;IAC3B,QAAQ,EAAE,kBAAkB,CAAA;IAC5B,IAAI,EAAE,WAA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AAA;IACpB,GAAG,EAAE,OAAO,CAAC,QAAQ,CAAA;CACtB,CAAA;AACD,MAAM,MAAM,OAAO,CAAC,EAAE,SAAS,WAAW,GAAG,KAAK,IAAI,CACpD,GAAG,EAAE,aAAa,CAAC,EAAE,CAAC,KACnB,OAAO,CAAC,aAAa,CAAC,GAAG,aAAa,CAAA"}
@@ -13,6 +13,8 @@ export interface InputSchema {
13
13
  contentMarkdown: string;
14
14
  /** Subject of the message, used in emails. */
15
15
  subject: string;
16
+ /** Message language. */
17
+ lang?: string;
16
18
  /** DID of the user who is creating the template. */
17
19
  createdBy?: string;
18
20
  [k: string]: unknown;
@@ -32,6 +34,7 @@ export interface HandlerSuccess {
32
34
  export interface HandlerError {
33
35
  status: number;
34
36
  message?: string;
37
+ error?: 'DuplicateTemplateName';
35
38
  }
36
39
  export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough;
37
40
  export type HandlerReqCtx<HA extends HandlerAuth = never> = {
@@ -1 +1 @@
1
- {"version":3,"file":"createTemplate.d.ts","sourceRoot":"","sources":["../../../../../../src/lexicon/types/tools/ozone/communication/createTemplate.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,OAAO,MAAM,SAAS,CAAA;AAK7B,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AACtE,OAAO,KAAK,2BAA2B,MAAM,QAAQ,CAAA;AAErD,MAAM,WAAW,WAAW;CAAG;AAE/B,MAAM,WAAW,WAAW;IAC1B,4BAA4B;IAC5B,IAAI,EAAE,MAAM,CAAA;IACZ,sFAAsF;IACtF,eAAe,EAAE,MAAM,CAAA;IACvB,8CAA8C;IAC9C,OAAO,EAAE,MAAM,CAAA;IACf,oDAAoD;IACpD,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;CACrB;AAED,MAAM,MAAM,YAAY,GAAG,2BAA2B,CAAC,YAAY,CAAA;AAEnE,MAAM,WAAW,YAAY;IAC3B,QAAQ,EAAE,kBAAkB,CAAA;IAC5B,IAAI,EAAE,WAAW,CAAA;CAClB;AAED,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,kBAAkB,CAAA;IAC5B,IAAI,EAAE,YAAY,CAAA;IAClB,OAAO,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAA;CACpC;AAED,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB;AAED,MAAM,MAAM,aAAa,GAAG,YAAY,GAAG,cAAc,GAAG,kBAAkB,CAAA;AAC9E,MAAM,MAAM,aAAa,CAAC,EAAE,SAAS,WAAW,GAAG,KAAK,IAAI;IAC1D,IAAI,EAAE,EAAE,CAAA;IACR,MAAM,EAAE,WAAW,CAAA;IACnB,KAAK,EAAE,YAAY,CAAA;IACnB,GAAG,EAAE,OAAO,CAAC,OAAO,CAAA;IACpB,GAAG,EAAE,OAAO,CAAC,QAAQ,CAAA;CACtB,CAAA;AACD,MAAM,MAAM,OAAO,CAAC,EAAE,SAAS,WAAW,GAAG,KAAK,IAAI,CACpD,GAAG,EAAE,aAAa,CAAC,EAAE,CAAC,KACnB,OAAO,CAAC,aAAa,CAAC,GAAG,aAAa,CAAA"}
1
+ {"version":3,"file":"createTemplate.d.ts","sourceRoot":"","sources":["../../../../../../src/lexicon/types/tools/ozone/communication/createTemplate.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,OAAO,MAAM,SAAS,CAAA;AAK7B,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AACtE,OAAO,KAAK,2BAA2B,MAAM,QAAQ,CAAA;AAErD,MAAM,WAAW,WAAW;CAAG;AAE/B,MAAM,WAAW,WAAW;IAC1B,4BAA4B;IAC5B,IAAI,EAAE,MAAM,CAAA;IACZ,sFAAsF;IACtF,eAA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kdown: string;
13
13
  disabled: boolean;
14
+ /** Message language. */
15
+ lang?: string;
14
16
  /** DID of the user who last updated the template. */
15
17
  lastUpdatedBy: string;
16
18
  createdAt: string;
@@ -1 +1 @@
1
- {"version":3,"file":"defs.d.ts","sourceRoot":"","sources":["../../../../../../src/lexicon/types/tools/ozone/communication/defs.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,gBAAgB,EAAW,MAAM,kBAAkB,CAAA;AAK5D,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAA;IACV,4BAA4B;IAC5B,IAAI,EAAE,MAAM,CAAA;IACZ,+EAA+E;IAC/E,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,8CAA8C;IAC9C,eAAe,EAAE,MAAM,CAAA;IACvB,QAAQ,EAAE,OAAO,CAAA;IACjB,qDAAqD;IACrD,aAAa,EAAE,MAAM,CAAA;IACrB,SAAS,EAAE,MAAM,CAAA;IACjB,SAAS,EAAE,MAAM,CAAA;IACjB,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;CACrB;AAED,wBAAgB,cAAc,CAAC,CAAC,EAAE,OAAO,GAAG,CAAC,IAAI,YAAY,CAM5D;AAED,wBAAgB,oBAAoB,CAAC,CAAC,EAAE,OAAO,GAAG,gBAAgB,CAEjE"}
1
+ {"version":3,"file":"defs.d.ts","sourceRoot":"","sources":["../../../../../../src/lexicon/types/tools/ozone/communication/defs.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,gBAAgB,EAAW,MAAM,kBAAkB,CAAA;AAK5D,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAA;IACV,4BAA4B;IAC5B,IAAI,EAAE,MAAM,CAAA;IACZ,+EAA+E;IAC/E,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,8CAA8C;IAC9C,eAAe,EAAE,MAAM,CAAA;IACvB,QAAQ,EAAE,OAAO,CAAA;IACjB,wBAAwB;IACxB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,qDAAqD;IACrD,aAAa,EAAE,MAAM,CAAA;IACrB,SAAS,EAAE,MAAM,CAAA;IACjB,SAAS,EAAE,MAAM,CAAA;IACjB,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;CACrB;AAED,wBAAgB,cAAc,CAAC,CAAC,EAAE,OAAO,GAAG,CAAC,IAAI,YAAY,CAM5D;AAED,wBAAgB,oBAAoB,CAAC,CAAC,EAAE,OAAO,GAAG,gBAAgB,CAEjE"}
@@ -1 +1 @@
1
- {"version":3,"file":"defs.js","sourceRoot":"","sources":["../../../../../../src/lexicon/types/tools/ozone/communication/defs.ts"],"names":[],"mappings":";;;AAIA,mDAA+C;AAC/C,2CAAiD;AAmBjD,SAAgB,cAAc,CAAC,CAAU;IACvC,OAAO,CACL,IAAA,YAAK,EAAC,CAAC,CAAC;QACR,IAAA,cAAO,EAAC,CAAC,EAAE,OAAO,CAAC;QACnB,CAAC,CAAC,KAAK,KAAK,6CAA6C,CAC1D,CAAA;AACH,CAAC;AAND,wCAMC;AAED,SAAgB,oBAAoB,CAAC,CAAU;IAC7C,OAAO,mBAAQ,CAAC,QAAQ,CAAC,6CAA6C,EAAE,CAAC,CAAC,CAAA;AAC5E,CAAC;AAFD,oDAEC"}
1
+ {"version":3,"file":"defs.js","sourceRoot":"","sources":["../../../../../../src/lexicon/types/tools/ozone/communication/defs.ts"],"names":[],"mappings":";;;AAIA,mDAA+C;AAC/C,2CAAiD;AAqBjD,SAAgB,cAAc,CAAC,CAAU;IACvC,OAAO,CACL,IAAA,YAAK,EAAC,CAAC,CAAC;QACR,IAAA,cAAO,EAAC,CAAC,EAAE,OAAO,CAAC;QACnB,CAAC,CAAC,KAAK,KAAK,6CAA6C,CAC1D,CAAA;AACH,CAAC;AAND,wCAMC;AAED,SAAgB,oBAAoB,CAAC,CAAU;IAC7C,OAAO,mBAAQ,CAAC,QAAQ,CAAC,6CAA6C,EAAE,CAAC,CAAC,CAAA;AAC5E,CAAC;AAFD,oDAEC"}
@@ -11,6 +11,8 @@ export interface InputSchema {
11
11
  id: string;
12
12
  /** Name of the template. */
13
13
  name?: string;
14
+ /** Message language. */
15
+ lang?: string;
14
16
  /** Content of the template, markdown supported, can contain variable placeholders. */
15
17
  contentMarkdown?: string;
16
18
  /** Subject of the message, used in emails. */
@@ -35,6 +37,7 @@ export interface HandlerSuccess {
35
37
  export interface HandlerError {
36
38
  status: number;
37
39
  message?: string;
40
+ error?: 'DuplicateTemplateName';
38
41
  }
39
42
  export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough;
40
43
  export type HandlerReqCtx<HA extends HandlerAuth = never> = {
@@ -1 +1 @@
1
- {"version":3,"file":"updateTemplate.d.ts","sourceRoot":"","sources":["../../../../../../src/lexicon/types/tools/ozone/communication/updateTemplate.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,OAAO,MAAM,SAAS,CAAA;AAK7B,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AACtE,OAAO,KAAK,2BAA2B,MAAM,QAAQ,CAAA;AAErD,MAAM,WAAW,WAAW;CAAG;AAE/B,MAAM,WAAW,WAAW;IAC1B,wCAAwC;IACxC,EAAE,EAAE,MAAM,CAAA;IACV,4BAA4B;IAC5B,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,sFAAsF;IACtF,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,8CAA8C;IAC9C,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,oDAAoD;IACpD,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;CACrB;AAED,MAAM,MAAM,YAAY,GAAG,2BAA2B,CAAC,YAAY,CAAA;AAEnE,MAAM,WAAW,YAAY;IAC3B,QAAQ,EAAE,kBAAkB,CAAA;IAC5B,IAAI,EAAE,WAAW,CAAA;CAClB;AAED,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,kBAAkB,CAAA;IAC5B,IAAI,EAAE,YAAY,CAAA;IAClB,OAAO,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAA;CACpC;AAED,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB;AAED,MAAM,MAAM,aAAa,GAAG,YAAY,GAAG,cAAc,GAAG,kBAAkB,CAAA;AAC9E,MAAM,MAAM,aAAa,CAAC,EAAE,SAAS,WAAW,GAAG,KAAK,IAAI;IAC1D,IAAI,EAAE,EAAE,CAAA;IACR,MAAM,EAAE,WAAW,CAAA;IACnB,KAAK,EAAE,YAAY,CAAA;IACnB,GAAG,EAAE,OAAO,CAAC,OAAO,CAAA;IACpB,GAAG,EAAE,OAAO,CAAC,QAAQ,CAAA;CACtB,CAAA;AACD,MAAM,MAAM,OAAO,CAAC,EAAE,SAAS,WAAW,GAAG,KAAK,IAAI,CACpD,GAAG,EAAE,aAAa,CAAC,EAAE,CAAC,KACnB,OAAO,CAAC,aAAa,CAAC,GAAG,aAAa,CAAA"}
1
+ {"version":3,"file":"updateTemplate.d.ts","sourceRoot":"","sources":["../../../../../../src/lexicon/types/tools/ozone/communication/updateTemplate.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,OAAO,MAAM,SAAS,CAAA;AAK7B,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AACtE,OAAO,KAAK,2BAA2B,MAAM,QAAQ,CAAA;AAErD,MAAM,WAAW,WAAW;CAAG;AAE/B,MAAM,WAAW,WAAW;IAC1B,wCAAwC;IACxC,EAAE,EAAE,MAAM,CAAA;IACV,4BAA4B;IAC5B,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,wBAAwB;IACxB,IAAI,CAAC,EAAE,MAAM,CAAA;IAC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../com/atproto/repo/strongRef';
9
9
  export interface QueryParams {
10
10
  }
11
11
  export interface InputSchema {
12
- event: ToolsOzoneModerationDefs.ModEventTakedown | ToolsOzoneModerationDefs.ModEventAcknowledge | ToolsOzoneModerationDefs.ModEventEscalate | ToolsOzoneModerationDefs.ModEventComment | ToolsOzoneModerationDefs.ModEventLabel | ToolsOzoneModerationDefs.ModEventReport | ToolsOzoneModerationDefs.ModEventMute | ToolsOzoneModerationDefs.ModEventUnmute | ToolsOzoneModerationDefs.ModEventMuteReporter | ToolsOzoneModerationDefs.ModEventUnmuteReporter | ToolsOzoneModerationDefs.ModEventReverseTakedown | ToolsOzoneModerationDefs.ModEventEmail | ToolsOzoneModerationDefs.ModEventTag | {
12
+ event: ToolsOzoneModerationDefs.ModEventTakedown | ToolsOzoneModerationDefs.ModEventAcknowledge | ToolsOzoneModerationDefs.ModEventEscalate | ToolsOzoneModerationDefs.ModEventComment | ToolsOzoneModerationDefs.ModEventLabel | ToolsOzoneModerationDefs.ModEventReport | ToolsOzoneModerationDefs.ModEventMute | ToolsOzoneModerationDefs.ModEventUnmute | ToolsOzoneModerationDefs.ModEventMuteReporter | ToolsOzoneModerationDefs.ModEventUnmuteReporter | ToolsOzoneModerationDefs.ModEventReverseTakedown | ToolsOzoneModerationDefs.ModEventResolveAppeal | ToolsOzoneModerationDefs.ModEventEmail | ToolsOzoneModerationDefs.ModEventTag | {
13
13
  $type: string;
14
14
  [k: string]: unknown;
15
15
  };
@@ -1 +1 @@
1
- {"version":3,"file":"emitEvent.d.ts","sourceRoot":"","sources":["../../../../../../src/lexicon/types/tools/ozone/moderation/emitEvent.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,OAAO,MAAM,SAAS,CAAA;AAK7B,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AACtE,OAAO,KAAK,wBAAwB,MAAM,QAAQ,CAAA;AAClD,OAAO,KAAK,mBAAmB,MAAM,iCAAiC,CAAA;A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,YAAY,CAAA;IACnB,GAAG,EAAE,OAAO,CAAC,OAAO,CAAA;IACpB,GAAG,EAAE,OAAO,CAAC,QAAQ,CAAA;CACtB,CAAA;AACD,MAAM,MAAM,OAAO,CAAC,EAAE,SAAS,WAAW,GAAG,KAAK,IAAI,CACpD,GAAG,EAAE,aAAa,CAAC,EAAE,CAAC,KACnB,OAAO,CAAC,aAAa,CAAC,GAAG,aAAa,CAAA"}
@@ -50,7 +50,7 @@ export declare class LocalViewer {
50
50
  images: {
51
51
  thumb: string;
52
52
  fullsize: string;
53
- aspectRatio: import("../lexicon/types/app/bsky/embed/images").AspectRatio | undefined;
53
+ aspectRatio: import("../lexicon/types/app/bsky/embed/defs").AspectRatio | undefined;
54
54
  alt: string;
55
55
  }[];
56
56
  external?: undefined;
@@ -71,7 +71,7 @@ export declare class LocalViewer {
71
71
  images: {
72
72
  thumb: string;
73
73
  fullsize: string;
74
- aspectRatio: import("../lexicon/types/app/bsky/embed/images").AspectRatio | undefined;
74
+ aspectRatio: import("../lexicon/types/app/bsky/embed/defs").AspectRatio | undefined;
75
75
  alt: string;
76
76
  }[];
77
77
  external?: undefined;
@@ -91,7 +91,7 @@ export declare class LocalViewer {
91
91
  images: {
92
92
  thumb: string;
93
93
  fullsize: string;
94
- aspectRatio: import("../lexicon/types/app/bsky/embed/images").AspectRatio | undefined;
94
+ aspectRatio: import("../lexicon/types/app/bsky/embed/defs").AspectRatio | undefined;
95
95
  alt: string;
96
96
  }[];
97
97
  external?: undefined;
@@ -115,7 +115,7 @@ export declare class LocalViewer {
115
115
  images: {
116
116
  thumb: string;
117
117
  fullsize: string;
118
- aspectRatio: import("../lexicon/types/app/bsky/embed/images").AspectRatio | undefined;
118
+ aspectRatio: import("../lexicon/types/app/bsky/embed/defs").AspectRatio | undefined;
119
119
  alt: string;
120
120
  }[];
121
121
  external?: undefined;
@@ -1,8 +1,10 @@
1
1
  import { CID } from 'multiformats/cid';
2
2
  import { BlobRef, LexValue, RepoRecord } from '@atproto/lexicon';
3
3
  import { RecordDeleteOp, RecordCreateOp, RecordUpdateOp, RecordWriteOp } from '@atproto/repo';
4
- import { PreparedCreate, PreparedUpdate, PreparedDelete, PreparedWrite, PreparedBlobRef } from './types';
5
- export declare const assertValidRecord: (record: Record<string, unknown>) => void;
4
+ import { PreparedCreate, PreparedUpdate, PreparedDelete, PreparedWrite, PreparedBlobRef, ValidationStatus } from './types';
5
+ export declare const assertValidRecordWithStatus: (record: Record<string, unknown>, opts: {
6
+ requireLexicon: boolean;
7
+ }) => ValidationStatus;
6
8
  export declare const assertValidCreatedAt: (record: Record<string, unknown>) => void;
7
9
  export declare const setCollectionName: (collection: string, record: RepoRecord, validate: boolean) => RepoRecord;
8
10
  export declare const prepareCreate: (opts: {
@@ -1 +1 @@
1
- {"version":3,"file":"prepare.d.ts","sourceRoot":"","sources":["../../src/repo/prepare.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAA;AAOtC,OAAO,EACL,OAAO,EACP,QAAQ,EAER,UAAU,EAIX,MAAM,kBAAkB,CAAA;AACzB,OAAO,EAEL,cAAc,EACd,cAAc,EACd,cAAc,EACd,aAAa,EAEd,MAAM,eAAe,CAAA;AACtB,OAAO,EACL,cAAc,EACd,cAAc,EACd,cAAc,EAEd,aAAa,EACb,eAAe,EAChB,MAAM,SAAS,CAAA;AAUhB,eAAO,MAAM,iBAAiB,WAAY,OAAO,MAAM,EAAE,OAAO,CAAC,SAiBhE,CAAA;AAID,eAAO,MAAM,oBAAoB,WAAY,OAAO,MAAM,EAAE,OAAO,CAAC,SAYnE,CAAA;AAED,eAAO,MAAM,iBAAiB,eAChB,MAAM,UACV,UAAU,YACR,OAAO,eAWlB,CAAA;AAED,eAAO,MAAM,aAAa,SAAgB;IACxC,GAAG,EAAE,MAAM,CAAA;IACX,UAAU,EAAE,MAAM,CAAA;IAClB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,OAAO,CAAC,EAAE,GAAG,GAA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ED,eAAO,MAAM,eAAe,UAAW,cAAc,KAAG,cAKtD,CAAA;AAEF,eAAO,MAAM,eAAe,UAAW,cAAc,KAAG,cAKtD,CAAA;AAEF,eAAO,MAAM,eAAe,UAAW,cAAc,KAAG,cAItD,CAAA;AAEF,eAAO,MAAM,SAAS,UAAW,aAAa,KAAG,aAWhD,CAAA;AA4CD,KAAK,YAAY,GAAG;IAClB,GAAG,EAAE,OAAO,CAAA;IACZ,IAAI,EAAE,MAAM,EAAE,CAAA;CACf,CAAA;AAED,eAAO,MAAM,aAAa,WAChB,UAAU,YACR,OAAO,KAChB,eAAe,EAmBjB,CAAA;AAED,eAAO,MAAM,YAAY,QAClB,QAAQ,SACP,MAAM,EAAE,qBAEb,YAAY,EA6Bd,CAAA"}
@@ -23,7 +23,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
23
23
  return result;
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.findBlobRefs = exports.blobsForWrite = exports.writeToOp = exports.deleteWriteToOp = exports.updateWriteToOp = exports.createWriteToOp = exports.prepareDelete = exports.prepareUpdate = exports.prepareCreate = exports.setCollectionName = exports.assertValidCreatedAt = exports.assertValidRecord = void 0;
26
+ exports.findBlobRefs = exports.blobsForWrite = exports.writeToOp = exports.deleteWriteToOp = exports.updateWriteToOp = exports.createWriteToOp = exports.prepareDelete = exports.prepareUpdate = exports.prepareCreate = exports.setCollectionName = exports.assertValidCreatedAt = exports.assertValidRecordWithStatus = void 0;
27
27
  const cid_1 = require("multiformats/cid");
28
28
  const syntax_1 = require("@atproto/syntax");
29
29
  const common_1 = require("@atproto/common");
@@ -38,7 +38,7 @@ const facet_1 = require("../lexicon/types/app/bsky/richtext/facet");
38
38
  const list_1 = require("../lexicon/types/app/bsky/graph/list");
39
39
  const profile_1 = require("../lexicon/types/app/bsky/actor/profile");
40
40
  const explicit_slurs_1 = require("../handle/explicit-slurs");
41
- const assertValidRecord = (record) => {
41
+ const assertValidRecordWithStatus = (record, opts) => {
42
42
  if (typeof record.$type !== 'string') {
43
43
  throw new types_1.InvalidRecordError('No $type provided');
44
44
  }
@@ -48,12 +48,18 @@ const assertValidRecord = (record) => {
48
48
  }
49
49
  catch (e) {
50
50
  if (e instanceof lexicon_1.LexiconDefNotFoundError) {
51
- throw new types_1.InvalidRecordError(e.message);
51
+ if (opts.requireLexicon) {
52
+ throw new types_1.InvalidRecordError(e.message);
53
+ }
54
+ else {
55
+ return 'unknown';
56
+ }
52
57
  }
53
58
  throw new types_1.InvalidRecordError(`Invalid ${record.$type} record: ${e instanceof Error ? e.message : String(e)}`);
54
59
  }
60
+ return 'valid';
55
61
  };
56
- exports.assertValidRecord = assertValidRecord;
62
+ exports.assertValidRecordWithStatus = assertValidRecordWithStatus;
57
63
  // additional more rigorous check on datetimes
58
64
  // this check will eventually be in the lex sdk, but this will stop the bleed until then
59
65
  const assertValidCreatedAt = (record) => {
@@ -80,10 +86,14 @@ const setCollectionName = (collection, record, validate) => {
80
86
  };
81
87
  exports.setCollectionName = setCollectionName;
82
88
  const prepareCreate = async (opts) => {
83
- const { did, collection, swapCid, validate = true } = opts;
84
- const record = (0, exports.setCollectionName)(collection, opts.record, validate);
85
- if (validate) {
86
- (0, exports.assertValidRecord)(record);
89
+ const { did, collection, swapCid, validate } = opts;
90
+ const maybeValidate = validate !== false;
91
+ const record = (0, exports.setCollectionName)(collection, opts.record, maybeValidate);
92
+ let validationStatus;
93
+ if (maybeValidate) {
94
+ validationStatus = (0, exports.assertValidRecordWithStatus)(record, {
95
+ requireLexicon: validate === true,
96
+ });
87
97
  }
88
98
  const nextRkey = common_1.TID.next();
89
99
  const rkey = opts.rkey || nextRkey.toString();
@@ -96,15 +106,20 @@ const prepareCreate = async (opts) => {
96
106
  cid: await cidForSafeRecord(record),
97
107
  swapCid,
98
108
  record,
99
- blobs: (0, exports.blobsForWrite)(record, validate),
109
+ blobs: (0, exports.blobsForWrite)(record, maybeValidate),
110
+ validationStatus,
100
111
  };
101
112
  };
102
113
  exports.prepareCreate = prepareCreate;
103
114
  const prepareUpdate = async (opts) => {
104
- const { did, collection, rkey, swapCid, validate = true } = opts;
105
- const record = (0, exports.setCollectionName)(collection, opts.record, validate);
106
- if (validate) {
107
- (0, exports.assertValidRecord)(record);
115
+ const { did, collection, rkey, swapCid, validate } = opts;
116
+ const maybeValidate = validate !== false;
117
+ const record = (0, exports.setCollectionName)(collection, opts.record, maybeValidate);
118
+ let validationStatus;
119
+ if (maybeValidate) {
120
+ validationStatus = (0, exports.assertValidRecordWithStatus)(record, {
121
+ requireLexicon: validate === true,
122
+ });
108
123
  }
109
124
  assertNoExplicitSlurs(rkey, record);
110
125
  return {
@@ -113,7 +128,8 @@ const prepareUpdate = async (opts) => {
113
128
  cid: await cidForSafeRecord(record),
114
129
  swapCid,
115
130
  record,
116
- blobs: (0, exports.blobsForWrite)(record, validate),
131
+ blobs: (0, exports.blobsForWrite)(record, maybeValidate),
132
+ validationStatus,
117
133
  };
118
134
  };
119
135
  exports.prepareUpdate = prepareUpdate;
@@ -1 +1 @@
1
- {"version":3,"file":"prepare.js","sourceRoot":"","sources":["../../src/repo/prepare.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,0CAAsC;AACtC,4CAIwB;AACxB,4CAA6D;AAC7D,8CAQyB;AACzB,wCAOsB;AACtB,mCAOgB;AAChB,yDAA0C;AAC1C,wEAAsF;AACtF,6EAAuF;AACvF,8DAAwE;AACxE,oEAAgE;AAChE,+DAAyE;AACzE,qEAA+E;AAC/E,6DAA0D;AAEnD,MAAM,iBAAiB,GAAG,CAAC,MAA+B,EAAE,EAAE;IACnE,IAAI,OAAO,MAAM,CAAC,KAAK,KAAK,QAAQ,EAAE,CAAC;QACrC,MAAM,IAAI,0BAAkB,CAAC,mBAAmB,CAAC,CAAA;IACnD,CAAC;IACD,IAAI,CAAC;QACH,GAAG,CAAC,QAAQ,CAAC,iBAAiB,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,CA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