@atproto/ozone 0.1.126 → 0.1.128
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 +18 -0
- package/dist/api/index.d.ts.map +1 -1
- package/dist/api/index.js +10 -0
- package/dist/api/index.js.map +1 -1
- package/dist/api/moderation/emitEvent.d.ts.map +1 -1
- package/dist/api/moderation/emitEvent.js +2 -0
- package/dist/api/moderation/emitEvent.js.map +1 -1
- package/dist/api/moderation/queryEvents.d.ts.map +1 -1
- package/dist/api/moderation/queryEvents.js +2 -1
- package/dist/api/moderation/queryEvents.js.map +1 -1
- package/dist/api/report/createReport.d.ts.map +1 -1
- package/dist/api/report/createReport.js +2 -1
- package/dist/api/report/createReport.js.map +1 -1
- package/dist/api/safelink/addRule.d.ts +4 -0
- package/dist/api/safelink/addRule.d.ts.map +1 -0
- package/dist/api/safelink/addRule.js +37 -0
- package/dist/api/safelink/addRule.js.map +1 -0
- package/dist/api/safelink/queryEvents.d.ts +4 -0
- package/dist/api/safelink/queryEvents.d.ts.map +1 -0
- package/dist/api/safelink/queryEvents.js +29 -0
- package/dist/api/safelink/queryEvents.js.map +1 -0
- package/dist/api/safelink/queryRules.d.ts +4 -0
- package/dist/api/safelink/queryRules.d.ts.map +1 -0
- package/dist/api/safelink/queryRules.js +43 -0
- package/dist/api/safelink/queryRules.js.map +1 -0
- package/dist/api/safelink/removeRule.d.ts +4 -0
- package/dist/api/safelink/removeRule.d.ts.map +1 -0
- package/dist/api/safelink/removeRule.js +35 -0
- package/dist/api/safelink/removeRule.js.map +1 -0
- package/dist/api/safelink/updateRule.d.ts +4 -0
- package/dist/api/safelink/updateRule.d.ts.map +1 -0
- package/dist/api/safelink/updateRule.js +37 -0
- package/dist/api/safelink/updateRule.js.map +1 -0
- package/dist/api/util.d.ts +8 -0
- package/dist/api/util.d.ts.map +1 -1
- package/dist/api/util.js +33 -1
- package/dist/api/util.js.map +1 -1
- package/dist/context.d.ts +3 -0
- package/dist/context.d.ts.map +1 -1
- package/dist/context.js +12 -6
- package/dist/context.js.map +1 -1
- package/dist/db/migrations/20250609T110704000Z-safelink.d.ts +4 -0
- package/dist/db/migrations/20250609T110704000Z-safelink.d.ts.map +1 -0
- package/dist/db/migrations/20250609T110704000Z-safelink.js +51 -0
- package/dist/db/migrations/20250609T110704000Z-safelink.js.map +1 -0
- package/dist/db/migrations/20250618T180246000Z-add-mod-tool-to-moderation-event.d.ts +4 -0
- package/dist/db/migrations/20250618T180246000Z-add-mod-tool-to-moderation-event.d.ts.map +1 -0
- package/dist/db/migrations/20250618T180246000Z-add-mod-tool-to-moderation-event.js +20 -0
- package/dist/db/migrations/20250618T180246000Z-add-mod-tool-to-moderation-event.js.map +1 -0
- package/dist/db/migrations/index.d.ts +2 -0
- package/dist/db/migrations/index.d.ts.map +1 -1
- package/dist/db/migrations/index.js +3 -1
- package/dist/db/migrations/index.js.map +1 -1
- package/dist/db/schema/index.d.ts +2 -1
- package/dist/db/schema/index.d.ts.map +1 -1
- package/dist/db/schema/moderation_event.d.ts +6 -0
- package/dist/db/schema/moderation_event.d.ts.map +1 -1
- package/dist/db/schema/safelink.d.ts +31 -0
- package/dist/db/schema/safelink.d.ts.map +1 -0
- package/dist/db/schema/safelink.js +6 -0
- package/dist/db/schema/safelink.js.map +1 -0
- package/dist/lexicon/index.d.ts +15 -0
- package/dist/lexicon/index.d.ts.map +1 -1
- package/dist/lexicon/index.js +40 -1
- package/dist/lexicon/index.js.map +1 -1
- package/dist/lexicon/lexicons.d.ts +3427 -2489
- package/dist/lexicon/lexicons.d.ts.map +1 -1
- package/dist/lexicon/lexicons.js +499 -0
- package/dist/lexicon/lexicons.js.map +1 -1
- package/dist/lexicon/types/com/atproto/moderation/createReport.d.ts +14 -0
- package/dist/lexicon/types/com/atproto/moderation/createReport.d.ts.map +1 -1
- package/dist/lexicon/types/com/atproto/moderation/createReport.js +9 -0
- package/dist/lexicon/types/com/atproto/moderation/createReport.js.map +1 -1
- package/dist/lexicon/types/tools/ozone/moderation/defs.d.ts +14 -0
- package/dist/lexicon/types/tools/ozone/moderation/defs.d.ts.map +1 -1
- package/dist/lexicon/types/tools/ozone/moderation/defs.js +9 -0
- package/dist/lexicon/types/tools/ozone/moderation/defs.js.map +1 -1
- package/dist/lexicon/types/tools/ozone/moderation/emitEvent.d.ts +1 -0
- package/dist/lexicon/types/tools/ozone/moderation/emitEvent.d.ts.map +1 -1
- package/dist/lexicon/types/tools/ozone/moderation/queryEvents.d.ts +2 -0
- package/dist/lexicon/types/tools/ozone/moderation/queryEvents.d.ts.map +1 -1
- package/dist/lexicon/types/tools/ozone/safelink/addRule.d.ts +47 -0
- package/dist/lexicon/types/tools/ozone/safelink/addRule.d.ts.map +1 -0
- package/dist/lexicon/types/tools/ozone/safelink/addRule.js +7 -0
- package/dist/lexicon/types/tools/ozone/safelink/addRule.js.map +1 -0
- package/dist/lexicon/types/tools/ozone/safelink/defs.d.ts +47 -0
- package/dist/lexicon/types/tools/ozone/safelink/defs.d.ts.map +1 -0
- package/dist/lexicon/types/tools/ozone/safelink/defs.js +25 -0
- package/dist/lexicon/types/tools/ozone/safelink/defs.js.map +1 -0
- package/dist/lexicon/types/tools/ozone/safelink/queryEvents.d.ts +51 -0
- package/dist/lexicon/types/tools/ozone/safelink/queryEvents.d.ts.map +1 -0
- package/dist/lexicon/types/tools/ozone/safelink/queryEvents.js +7 -0
- package/dist/lexicon/types/tools/ozone/safelink/queryEvents.js.map +1 -0
- package/dist/lexicon/types/tools/ozone/safelink/queryRules.d.ts +57 -0
- package/dist/lexicon/types/tools/ozone/safelink/queryRules.d.ts.map +1 -0
- package/dist/lexicon/types/tools/ozone/safelink/queryRules.js +7 -0
- package/dist/lexicon/types/tools/ozone/safelink/queryRules.js.map +1 -0
- package/dist/lexicon/types/tools/ozone/safelink/removeRule.d.ts +45 -0
- package/dist/lexicon/types/tools/ozone/safelink/removeRule.d.ts.map +1 -0
- package/dist/lexicon/types/tools/ozone/safelink/removeRule.js +7 -0
- package/dist/lexicon/types/tools/ozone/safelink/removeRule.js.map +1 -0
- package/dist/lexicon/types/tools/ozone/safelink/updateRule.d.ts +47 -0
- package/dist/lexicon/types/tools/ozone/safelink/updateRule.d.ts.map +1 -0
- package/dist/lexicon/types/tools/ozone/safelink/updateRule.js +7 -0
- package/dist/lexicon/types/tools/ozone/safelink/updateRule.js.map +1 -0
- package/dist/mod-service/index.d.ts +13 -1
- package/dist/mod-service/index.d.ts.map +1 -1
- package/dist/mod-service/index.js +10 -3
- package/dist/mod-service/index.js.map +1 -1
- package/dist/mod-service/status.d.ts +6 -0
- package/dist/mod-service/status.d.ts.map +1 -1
- package/dist/mod-service/views.d.ts.map +1 -1
- package/dist/mod-service/views.js +6 -0
- package/dist/mod-service/views.js.map +1 -1
- package/dist/safelink/service.d.ts +69 -0
- package/dist/safelink/service.d.ts.map +1 -0
- package/dist/safelink/service.js +179 -0
- package/dist/safelink/service.js.map +1 -0
- package/package.json +5 -5
- package/src/api/index.ts +10 -0
- package/src/api/moderation/emitEvent.ts +2 -0
- package/src/api/moderation/queryEvents.ts +2 -0
- package/src/api/report/createReport.ts +2 -1
- package/src/api/safelink/addRule.ts +48 -0
- package/src/api/safelink/queryEvents.ts +32 -0
- package/src/api/safelink/queryRules.ts +58 -0
- package/src/api/safelink/removeRule.ts +42 -0
- package/src/api/safelink/updateRule.ts +48 -0
- package/src/api/util.ts +38 -0
- package/src/context.ts +11 -0
- package/src/db/migrations/20250609T110704000Z-safelink.ts +53 -0
- package/src/db/migrations/20250618T180246000Z-add-mod-tool-to-moderation-event.ts +18 -0
- package/src/db/migrations/index.ts +2 -0
- package/src/db/schema/index.ts +3 -1
- package/src/db/schema/moderation_event.ts +1 -0
- package/src/db/schema/safelink.ts +39 -0
- package/src/lexicon/index.ts +70 -0
- package/src/lexicon/lexicons.ts +509 -0
- package/src/lexicon/types/com/atproto/moderation/createReport.ts +20 -0
- package/src/lexicon/types/tools/ozone/moderation/defs.ts +21 -0
- package/src/lexicon/types/tools/ozone/moderation/emitEvent.ts +1 -0
- package/src/lexicon/types/tools/ozone/moderation/queryEvents.ts +2 -0
- package/src/lexicon/types/tools/ozone/safelink/addRule.ts +64 -0
- package/src/lexicon/types/tools/ozone/safelink/defs.ts +76 -0
- package/src/lexicon/types/tools/ozone/safelink/queryEvents.ts +68 -0
- package/src/lexicon/types/tools/ozone/safelink/queryRules.ts +74 -0
- package/src/lexicon/types/tools/ozone/safelink/removeRule.ts +62 -0
- package/src/lexicon/types/tools/ozone/safelink/updateRule.ts +64 -0
- package/src/mod-service/index.ts +17 -2
- package/src/mod-service/views.ts +6 -0
- package/src/safelink/service.ts +304 -0
- package/tests/__snapshots__/safelink.test.ts.snap +179 -0
- package/tests/communication-templates.test.ts +7 -7
- package/tests/mod-tool.test.ts +128 -0
- package/tests/safelink.test.ts +534 -0
- package/tsconfig.build.tsbuildinfo +1 -1
- package/tsconfig.tests.tsbuildinfo +1 -1
package/src/context.ts
CHANGED
|
@@ -17,6 +17,10 @@ import { BlobDiverter } from './daemon/blob-diverter'
|
|
|
17
17
|
import { Database } from './db'
|
|
18
18
|
import { ImageInvalidator } from './image-invalidator'
|
|
19
19
|
import { ModerationService, ModerationServiceCreator } from './mod-service'
|
|
20
|
+
import {
|
|
21
|
+
SafelinkRuleService,
|
|
22
|
+
SafelinkRuleServiceCreator,
|
|
23
|
+
} from './safelink/service'
|
|
20
24
|
import { Sequencer } from './sequencer/sequencer'
|
|
21
25
|
import { SetService, SetServiceCreator } from './set/service'
|
|
22
26
|
import { SettingService, SettingServiceCreator } from './setting/service'
|
|
@@ -42,6 +46,7 @@ export type AppContextOptions = {
|
|
|
42
46
|
cfg: OzoneConfig
|
|
43
47
|
modService: ModerationServiceCreator
|
|
44
48
|
communicationTemplateService: CommunicationTemplateServiceCreator
|
|
49
|
+
safelinkRuleService: SafelinkRuleServiceCreator
|
|
45
50
|
setService: SetServiceCreator
|
|
46
51
|
settingService: SettingServiceCreator
|
|
47
52
|
teamService: TeamServiceCreator
|
|
@@ -130,6 +135,7 @@ export class AppContext {
|
|
|
130
135
|
)
|
|
131
136
|
|
|
132
137
|
const communicationTemplateService = CommunicationTemplateService.creator()
|
|
138
|
+
const safelinkRuleService = SafelinkRuleService.creator()
|
|
133
139
|
const teamService = TeamService.creator(
|
|
134
140
|
appviewAgent,
|
|
135
141
|
cfg.appview.did,
|
|
@@ -154,6 +160,7 @@ export class AppContext {
|
|
|
154
160
|
cfg,
|
|
155
161
|
modService,
|
|
156
162
|
communicationTemplateService,
|
|
163
|
+
safelinkRuleService,
|
|
157
164
|
teamService,
|
|
158
165
|
setService,
|
|
159
166
|
settingService,
|
|
@@ -204,6 +211,10 @@ export class AppContext {
|
|
|
204
211
|
return this.opts.communicationTemplateService
|
|
205
212
|
}
|
|
206
213
|
|
|
214
|
+
get safelinkRuleService(): SafelinkRuleServiceCreator {
|
|
215
|
+
return this.opts.safelinkRuleService
|
|
216
|
+
}
|
|
217
|
+
|
|
207
218
|
get teamService(): TeamServiceCreator {
|
|
208
219
|
return this.opts.teamService
|
|
209
220
|
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { Kysely } from 'kysely'
|
|
2
|
+
|
|
3
|
+
export async function up(db: Kysely<unknown>): Promise<void> {
|
|
4
|
+
await db.schema
|
|
5
|
+
.createTable('safelink_event')
|
|
6
|
+
.addColumn('id', 'bigserial', (col) => col.primaryKey())
|
|
7
|
+
.addColumn('eventType', 'varchar', (col) => col.notNull())
|
|
8
|
+
.addColumn('url', 'varchar', (col) => col.notNull())
|
|
9
|
+
.addColumn('pattern', 'varchar', (col) => col.notNull())
|
|
10
|
+
.addColumn('action', 'varchar', (col) => col.notNull())
|
|
11
|
+
.addColumn('reason', 'varchar', (col) => col.notNull())
|
|
12
|
+
.addColumn('createdBy', 'varchar', (col) => col.notNull())
|
|
13
|
+
.addColumn('createdAt', 'varchar', (col) => col.notNull())
|
|
14
|
+
.addColumn('comment', 'text')
|
|
15
|
+
.execute()
|
|
16
|
+
|
|
17
|
+
await db.schema
|
|
18
|
+
.createTable('safelink_rule')
|
|
19
|
+
.addColumn('id', 'bigserial', (col) => col.primaryKey())
|
|
20
|
+
.addColumn('url', 'varchar', (col) => col.notNull())
|
|
21
|
+
.addColumn('pattern', 'varchar', (col) => col.notNull())
|
|
22
|
+
.addColumn('action', 'varchar', (col) => col.notNull())
|
|
23
|
+
.addColumn('reason', 'varchar', (col) => col.notNull())
|
|
24
|
+
.addColumn('createdBy', 'varchar', (col) => col.notNull())
|
|
25
|
+
.addColumn('createdAt', 'varchar', (col) => col.notNull())
|
|
26
|
+
.addColumn('updatedAt', 'varchar', (col) => col.notNull())
|
|
27
|
+
.addColumn('comment', 'text')
|
|
28
|
+
.addUniqueConstraint('safelink_rule_url_pattern_key', ['url', 'pattern'])
|
|
29
|
+
.execute()
|
|
30
|
+
|
|
31
|
+
await db.schema
|
|
32
|
+
.createIndex('safelink_event_url_pattern_idx')
|
|
33
|
+
.on('safelink_event')
|
|
34
|
+
.columns(['url', 'pattern'])
|
|
35
|
+
.execute()
|
|
36
|
+
|
|
37
|
+
await db.schema
|
|
38
|
+
.createIndex('safelink_rule_action_idx')
|
|
39
|
+
.on('safelink_rule')
|
|
40
|
+
.column('action')
|
|
41
|
+
.execute()
|
|
42
|
+
|
|
43
|
+
await db.schema
|
|
44
|
+
.createIndex('safelink_rule_reason_idx')
|
|
45
|
+
.on('safelink_rule')
|
|
46
|
+
.column('reason')
|
|
47
|
+
.execute()
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export async function down(db: Kysely<unknown>): Promise<void> {
|
|
51
|
+
await db.schema.dropTable('safelink_rule').execute()
|
|
52
|
+
await db.schema.dropTable('safelink_event').execute()
|
|
53
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Kysely, sql } from 'kysely'
|
|
2
|
+
|
|
3
|
+
export async function up(db: Kysely<unknown>): Promise<void> {
|
|
4
|
+
await db.schema
|
|
5
|
+
.alterTable('moderation_event')
|
|
6
|
+
.addColumn('modTool', 'jsonb')
|
|
7
|
+
.execute()
|
|
8
|
+
|
|
9
|
+
await db.schema
|
|
10
|
+
.createIndex('moderation_event_mod_tool_name_idx')
|
|
11
|
+
.on('moderation_event')
|
|
12
|
+
.expression(sql`("modTool" ->> 'name')`)
|
|
13
|
+
.execute()
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export async function down(db: Kysely<unknown>): Promise<void> {
|
|
17
|
+
await db.schema.alterTable('moderation_event').dropColumn('modTool').execute()
|
|
18
|
+
}
|
|
@@ -25,3 +25,5 @@ export * as _20250221T132135150Z from './20250221T132135150Z-member-details'
|
|
|
25
25
|
export * as _20250404T201720309Z from './20250404T201720309Z-subject-status-sort-idxs'
|
|
26
26
|
export * as _20250415T201720309Z from './20250415T201720309Z-verification'
|
|
27
27
|
export * as _20250417T201720309Z from './20250417T201720309Z-firehose-cursor'
|
|
28
|
+
export * as _20250609T110704000Z from './20250609T110704000Z-safelink'
|
|
29
|
+
export * as _20250618T180246000Z from './20250618T180246000Z-add-mod-tool-to-moderation-event'
|
package/src/db/schema/index.ts
CHANGED
|
@@ -13,6 +13,7 @@ import * as set from './ozone_set'
|
|
|
13
13
|
import * as recordEventsStats from './record_events_stats'
|
|
14
14
|
import * as recordPushEvent from './record_push_event'
|
|
15
15
|
import * as repoPushEvent from './repo_push_event'
|
|
16
|
+
import * as safelink from './safelink'
|
|
16
17
|
import * as setting from './setting'
|
|
17
18
|
import * as signingKey from './signing_key'
|
|
18
19
|
import * as verification from './verification'
|
|
@@ -33,7 +34,8 @@ export type DatabaseSchemaType = modEvent.PartialDB &
|
|
|
33
34
|
accountRecordEventsStats.PartialDB &
|
|
34
35
|
accountRecordStatusStats.PartialDB &
|
|
35
36
|
verification.PartialDB &
|
|
36
|
-
firehoseCursor.PartialDB
|
|
37
|
+
firehoseCursor.PartialDB &
|
|
38
|
+
safelink.PartialDB
|
|
37
39
|
|
|
38
40
|
export type DatabaseSchema = Kysely<DatabaseSchemaType>
|
|
39
41
|
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { GeneratedAlways } from 'kysely'
|
|
2
|
+
import {
|
|
3
|
+
SafelinkActionType,
|
|
4
|
+
SafelinkEventType,
|
|
5
|
+
SafelinkPatternType,
|
|
6
|
+
SafelinkReasonType,
|
|
7
|
+
} from '../../api/util'
|
|
8
|
+
|
|
9
|
+
export const safelinkRuleTableName = 'safelink_rule'
|
|
10
|
+
export const safelinkEventTableName = 'safelink_event'
|
|
11
|
+
|
|
12
|
+
export interface SafelinkRule {
|
|
13
|
+
id: GeneratedAlways<number>
|
|
14
|
+
url: string
|
|
15
|
+
pattern: SafelinkPatternType
|
|
16
|
+
action: SafelinkActionType
|
|
17
|
+
reason: SafelinkReasonType
|
|
18
|
+
createdBy: string
|
|
19
|
+
createdAt: string
|
|
20
|
+
updatedAt: string
|
|
21
|
+
comment: string | null
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export interface SafelinkEvent {
|
|
25
|
+
id: GeneratedAlways<number>
|
|
26
|
+
eventType: SafelinkEventType
|
|
27
|
+
url: string
|
|
28
|
+
pattern: SafelinkPatternType
|
|
29
|
+
action: SafelinkActionType
|
|
30
|
+
reason: SafelinkReasonType
|
|
31
|
+
createdBy: string
|
|
32
|
+
createdAt: string
|
|
33
|
+
comment: string | null
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export type PartialDB = {
|
|
37
|
+
[safelinkRuleTableName]: SafelinkRule
|
|
38
|
+
[safelinkEventTableName]: SafelinkEvent
|
|
39
|
+
}
|
package/src/lexicon/index.ts
CHANGED
|
@@ -206,6 +206,11 @@ import * as ToolsOzoneModerationGetSubjects from './types/tools/ozone/moderation
|
|
|
206
206
|
import * as ToolsOzoneModerationQueryEvents from './types/tools/ozone/moderation/queryEvents.js'
|
|
207
207
|
import * as ToolsOzoneModerationQueryStatuses from './types/tools/ozone/moderation/queryStatuses.js'
|
|
208
208
|
import * as ToolsOzoneModerationSearchRepos from './types/tools/ozone/moderation/searchRepos.js'
|
|
209
|
+
import * as ToolsOzoneSafelinkAddRule from './types/tools/ozone/safelink/addRule.js'
|
|
210
|
+
import * as ToolsOzoneSafelinkQueryEvents from './types/tools/ozone/safelink/queryEvents.js'
|
|
211
|
+
import * as ToolsOzoneSafelinkQueryRules from './types/tools/ozone/safelink/queryRules.js'
|
|
212
|
+
import * as ToolsOzoneSafelinkRemoveRule from './types/tools/ozone/safelink/removeRule.js'
|
|
213
|
+
import * as ToolsOzoneSafelinkUpdateRule from './types/tools/ozone/safelink/updateRule.js'
|
|
209
214
|
import * as ToolsOzoneServerGetConfig from './types/tools/ozone/server/getConfig.js'
|
|
210
215
|
import * as ToolsOzoneSetAddValues from './types/tools/ozone/set/addValues.js'
|
|
211
216
|
import * as ToolsOzoneSetDeleteSet from './types/tools/ozone/set/deleteSet.js'
|
|
@@ -2571,6 +2576,7 @@ export class ToolsOzoneNS {
|
|
|
2571
2576
|
communication: ToolsOzoneCommunicationNS
|
|
2572
2577
|
hosting: ToolsOzoneHostingNS
|
|
2573
2578
|
moderation: ToolsOzoneModerationNS
|
|
2579
|
+
safelink: ToolsOzoneSafelinkNS
|
|
2574
2580
|
server: ToolsOzoneServerNS
|
|
2575
2581
|
set: ToolsOzoneSetNS
|
|
2576
2582
|
setting: ToolsOzoneSettingNS
|
|
@@ -2583,6 +2589,7 @@ export class ToolsOzoneNS {
|
|
|
2583
2589
|
this.communication = new ToolsOzoneCommunicationNS(server)
|
|
2584
2590
|
this.hosting = new ToolsOzoneHostingNS(server)
|
|
2585
2591
|
this.moderation = new ToolsOzoneModerationNS(server)
|
|
2592
|
+
this.safelink = new ToolsOzoneSafelinkNS(server)
|
|
2586
2593
|
this.server = new ToolsOzoneServerNS(server)
|
|
2587
2594
|
this.set = new ToolsOzoneSetNS(server)
|
|
2588
2595
|
this.setting = new ToolsOzoneSettingNS(server)
|
|
@@ -2792,6 +2799,69 @@ export class ToolsOzoneModerationNS {
|
|
|
2792
2799
|
}
|
|
2793
2800
|
}
|
|
2794
2801
|
|
|
2802
|
+
export class ToolsOzoneSafelinkNS {
|
|
2803
|
+
_server: Server
|
|
2804
|
+
|
|
2805
|
+
constructor(server: Server) {
|
|
2806
|
+
this._server = server
|
|
2807
|
+
}
|
|
2808
|
+
|
|
2809
|
+
addRule<AV extends AuthVerifier>(
|
|
2810
|
+
cfg: ConfigOf<
|
|
2811
|
+
AV,
|
|
2812
|
+
ToolsOzoneSafelinkAddRule.Handler<ExtractAuth<AV>>,
|
|
2813
|
+
ToolsOzoneSafelinkAddRule.HandlerReqCtx<ExtractAuth<AV>>
|
|
2814
|
+
>,
|
|
2815
|
+
) {
|
|
2816
|
+
const nsid = 'tools.ozone.safelink.addRule' // @ts-ignore
|
|
2817
|
+
return this._server.xrpc.method(nsid, cfg)
|
|
2818
|
+
}
|
|
2819
|
+
|
|
2820
|
+
queryEvents<AV extends AuthVerifier>(
|
|
2821
|
+
cfg: ConfigOf<
|
|
2822
|
+
AV,
|
|
2823
|
+
ToolsOzoneSafelinkQueryEvents.Handler<ExtractAuth<AV>>,
|
|
2824
|
+
ToolsOzoneSafelinkQueryEvents.HandlerReqCtx<ExtractAuth<AV>>
|
|
2825
|
+
>,
|
|
2826
|
+
) {
|
|
2827
|
+
const nsid = 'tools.ozone.safelink.queryEvents' // @ts-ignore
|
|
2828
|
+
return this._server.xrpc.method(nsid, cfg)
|
|
2829
|
+
}
|
|
2830
|
+
|
|
2831
|
+
queryRules<AV extends AuthVerifier>(
|
|
2832
|
+
cfg: ConfigOf<
|
|
2833
|
+
AV,
|
|
2834
|
+
ToolsOzoneSafelinkQueryRules.Handler<ExtractAuth<AV>>,
|
|
2835
|
+
ToolsOzoneSafelinkQueryRules.HandlerReqCtx<ExtractAuth<AV>>
|
|
2836
|
+
>,
|
|
2837
|
+
) {
|
|
2838
|
+
const nsid = 'tools.ozone.safelink.queryRules' // @ts-ignore
|
|
2839
|
+
return this._server.xrpc.method(nsid, cfg)
|
|
2840
|
+
}
|
|
2841
|
+
|
|
2842
|
+
removeRule<AV extends AuthVerifier>(
|
|
2843
|
+
cfg: ConfigOf<
|
|
2844
|
+
AV,
|
|
2845
|
+
ToolsOzoneSafelinkRemoveRule.Handler<ExtractAuth<AV>>,
|
|
2846
|
+
ToolsOzoneSafelinkRemoveRule.HandlerReqCtx<ExtractAuth<AV>>
|
|
2847
|
+
>,
|
|
2848
|
+
) {
|
|
2849
|
+
const nsid = 'tools.ozone.safelink.removeRule' // @ts-ignore
|
|
2850
|
+
return this._server.xrpc.method(nsid, cfg)
|
|
2851
|
+
}
|
|
2852
|
+
|
|
2853
|
+
updateRule<AV extends AuthVerifier>(
|
|
2854
|
+
cfg: ConfigOf<
|
|
2855
|
+
AV,
|
|
2856
|
+
ToolsOzoneSafelinkUpdateRule.Handler<ExtractAuth<AV>>,
|
|
2857
|
+
ToolsOzoneSafelinkUpdateRule.HandlerReqCtx<ExtractAuth<AV>>
|
|
2858
|
+
>,
|
|
2859
|
+
) {
|
|
2860
|
+
const nsid = 'tools.ozone.safelink.updateRule' // @ts-ignore
|
|
2861
|
+
return this._server.xrpc.method(nsid, cfg)
|
|
2862
|
+
}
|
|
2863
|
+
}
|
|
2864
|
+
|
|
2795
2865
|
export class ToolsOzoneServerNS {
|
|
2796
2866
|
_server: Server
|
|
2797
2867
|
|