@atproto/ozone 0.1.6 → 0.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/dist/api/communication/createTemplate.js +2 -2
- package/dist/api/communication/createTemplate.js.map +1 -1
- package/dist/api/communication/deleteTemplate.js +2 -2
- package/dist/api/communication/deleteTemplate.js.map +1 -1
- package/dist/api/communication/updateTemplate.js +2 -2
- package/dist/api/communication/updateTemplate.js.map +1 -1
- package/dist/api/proxied.d.ts.map +1 -1
- package/dist/api/proxied.js +10 -0
- package/dist/api/proxied.js.map +1 -1
- package/dist/auth-verifier.d.ts.map +1 -1
- package/dist/db/pagination.d.ts +5 -5
- package/dist/db/pagination.d.ts.map +1 -1
- package/dist/db/types.d.ts.map +1 -1
- package/dist/lexicon/index.d.ts +16 -0
- package/dist/lexicon/index.d.ts.map +1 -1
- package/dist/lexicon/index.js +19 -1
- package/dist/lexicon/index.js.map +1 -1
- package/dist/lexicon/lexicons.d.ts +230 -0
- package/dist/lexicon/lexicons.d.ts.map +1 -1
- package/dist/lexicon/lexicons.js +243 -0
- package/dist/lexicon/lexicons.js.map +1 -1
- package/dist/lexicon/types/app/bsky/embed/record.d.ts +3 -0
- package/dist/lexicon/types/app/bsky/embed/record.d.ts.map +1 -1
- package/dist/lexicon/types/app/bsky/embed/record.js.map +1 -1
- package/dist/lexicon/types/app/bsky/feed/defs.d.ts +38 -0
- package/dist/lexicon/types/app/bsky/feed/defs.d.ts.map +1 -1
- package/dist/lexicon/types/app/bsky/feed/defs.js +35 -1
- package/dist/lexicon/types/app/bsky/feed/defs.js.map +1 -1
- package/dist/lexicon/types/app/bsky/feed/generator.d.ts +2 -0
- package/dist/lexicon/types/app/bsky/feed/generator.d.ts.map +1 -1
- package/dist/lexicon/types/app/bsky/feed/generator.js.map +1 -1
- package/dist/lexicon/types/app/bsky/feed/searchPosts.d.ts +18 -0
- package/dist/lexicon/types/app/bsky/feed/searchPosts.d.ts.map +1 -1
- package/dist/lexicon/types/app/bsky/feed/sendInteractions.d.ts +40 -0
- package/dist/lexicon/types/app/bsky/feed/sendInteractions.d.ts.map +1 -0
- package/dist/lexicon/types/app/bsky/feed/sendInteractions.js +3 -0
- package/dist/lexicon/types/app/bsky/feed/sendInteractions.js.map +1 -0
- package/dist/lexicon/types/app/bsky/unspecced/searchActorsSkeleton.d.ts +2 -0
- package/dist/lexicon/types/app/bsky/unspecced/searchActorsSkeleton.d.ts.map +1 -1
- package/dist/lexicon/types/app/bsky/unspecced/searchPostsSkeleton.d.ts +20 -0
- package/dist/lexicon/types/app/bsky/unspecced/searchPostsSkeleton.d.ts.map +1 -1
- package/dist/mod-service/index.d.ts.map +1 -1
- package/dist/mod-service/index.js +2 -2
- package/dist/mod-service/index.js.map +1 -1
- package/package.json +5 -5
- package/src/api/communication/createTemplate.ts +2 -2
- package/src/api/communication/deleteTemplate.ts +2 -2
- package/src/api/communication/updateTemplate.ts +2 -2
- package/src/api/proxied.ts +14 -0
- package/src/lexicon/index.ts +26 -0
- package/src/lexicon/lexicons.ts +269 -0
- package/src/lexicon/types/app/bsky/embed/record.ts +3 -0
- package/src/lexicon/types/app/bsky/feed/defs.ts +63 -0
- package/src/lexicon/types/app/bsky/feed/generator.ts +2 -0
- package/src/lexicon/types/app/bsky/feed/searchPosts.ts +18 -0
- package/src/lexicon/types/app/bsky/feed/sendInteractions.ts +49 -0
- package/src/lexicon/types/app/bsky/unspecced/searchActorsSkeleton.ts +2 -0
- package/src/lexicon/types/app/bsky/unspecced/searchPostsSkeleton.ts +20 -0
- package/src/mod-service/index.ts +6 -5
- package/tests/communication-templates.test.ts +5 -5
- package/tests/moderation-statuses.test.ts +27 -0
- package/tests/repo-search.test.ts +1 -1
|
@@ -42,11 +42,11 @@ describe('communication-templates', () => {
|
|
|
42
42
|
{ ...templateOne, createdBy: sc.dids.bob },
|
|
43
43
|
{
|
|
44
44
|
encoding: 'application/json',
|
|
45
|
-
headers: await network.ozone.modHeaders('
|
|
45
|
+
headers: await network.ozone.modHeaders('triage'),
|
|
46
46
|
},
|
|
47
47
|
)
|
|
48
48
|
await expect(moderatorReq).rejects.toThrow(
|
|
49
|
-
'Must be
|
|
49
|
+
'Must be a moderator to create a communication template',
|
|
50
50
|
)
|
|
51
51
|
const modReq = await agent.api.tools.ozone.communication.createTemplate(
|
|
52
52
|
{ ...templateOne, createdBy: sc.dids.bob },
|
|
@@ -105,19 +105,19 @@ describe('communication-templates', () => {
|
|
|
105
105
|
{ id: '1' },
|
|
106
106
|
{
|
|
107
107
|
encoding: 'application/json',
|
|
108
|
-
headers: await network.ozone.modHeaders('
|
|
108
|
+
headers: await network.ozone.modHeaders('triage'),
|
|
109
109
|
},
|
|
110
110
|
)
|
|
111
111
|
|
|
112
112
|
await expect(modReq).rejects.toThrow(
|
|
113
|
-
'Must be
|
|
113
|
+
'Must be a moderator to delete a communication template',
|
|
114
114
|
)
|
|
115
115
|
|
|
116
116
|
await agent.api.tools.ozone.communication.deleteTemplate(
|
|
117
117
|
{ id: '1' },
|
|
118
118
|
{
|
|
119
119
|
encoding: 'application/json',
|
|
120
|
-
headers: await network.ozone.modHeaders('
|
|
120
|
+
headers: await network.ozone.modHeaders('moderator'),
|
|
121
121
|
},
|
|
122
122
|
)
|
|
123
123
|
const list = await listTemplates()
|
|
@@ -99,6 +99,33 @@ describe('moderation-statuses', () => {
|
|
|
99
99
|
expect(nonKlingonQueue.subjectStatuses.map((s) => s.id)).not.toContain(
|
|
100
100
|
klingonQueue.subjectStatuses[0].id,
|
|
101
101
|
)
|
|
102
|
+
|
|
103
|
+
// Verify multi lang tag exclusion
|
|
104
|
+
Promise.all(
|
|
105
|
+
nonKlingonQueue.subjectStatuses.map((s, i) => {
|
|
106
|
+
return modClient.emitEvent({
|
|
107
|
+
subject: s.subject,
|
|
108
|
+
event: {
|
|
109
|
+
$type: 'tools.ozone.moderation.defs#modEventTag',
|
|
110
|
+
add: [i % 2 ? 'lang:jp' : 'lang:it'],
|
|
111
|
+
remove: [],
|
|
112
|
+
comment: 'Adding custom lang tag',
|
|
113
|
+
},
|
|
114
|
+
createdBy: sc.dids.alice,
|
|
115
|
+
})
|
|
116
|
+
}),
|
|
117
|
+
)
|
|
118
|
+
|
|
119
|
+
const queueWithoutKlingonAndItalian = await modClient.queryStatuses({
|
|
120
|
+
excludeTags: ['lang:i', 'lang:it'],
|
|
121
|
+
})
|
|
122
|
+
|
|
123
|
+
queueWithoutKlingonAndItalian.subjectStatuses
|
|
124
|
+
.map((s) => s.tags)
|
|
125
|
+
.flat()
|
|
126
|
+
.forEach((tag) => {
|
|
127
|
+
expect(['lang:it', 'lang:i']).not.toContain(tag)
|
|
128
|
+
})
|
|
102
129
|
})
|
|
103
130
|
|
|
104
131
|
it('returns paginated statuses', async () => {
|
|
@@ -52,7 +52,7 @@ describe('admin repo search view', () => {
|
|
|
52
52
|
const shouldContain = [
|
|
53
53
|
'cara-wiegand69.test', // Present despite repo takedown
|
|
54
54
|
'carlos6.test',
|
|
55
|
-
'carolina-
|
|
55
|
+
'carolina-mcderm77.test',
|
|
56
56
|
]
|
|
57
57
|
|
|
58
58
|
shouldContain.forEach((handle) => expect(handles).toContain(handle))
|