@xyo-network/url-safety-plugin 4.1.0 → 4.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,53 +1,3 @@
1
- import * as _xyo_network_payloadset_plugin from '@xyo-network/payloadset-plugin';
2
- import { AnyConfigSchema } from '@xyo-network/module-model';
3
- import { WitnessConfig, WitnessParams } from '@xyo-network/witness-model';
4
- import { AbstractWitness } from '@xyo-network/abstract-witness';
5
- import { Schema, Payload } from '@xyo-network/payload-model';
6
- import { UrlPayload } from '@xyo-network/url-payload-plugin';
7
- import { UrlSafetyPayload } from '@xyo-network/url-safety-payload-plugin';
8
-
9
- declare const UrlSafetyWitnessConfigSchema: "network.xyo.url.safety.witness.config";
10
- type UrlSafetyWitnessConfigSchema = typeof UrlSafetyWitnessConfigSchema;
11
- type UrlSafetyWitnessConfig = WitnessConfig<{
12
- google?: {
13
- safeBrowsing?: {
14
- endPoint?: string;
15
- };
16
- };
17
- schema: UrlSafetyWitnessConfigSchema;
18
- urls?: string[];
19
- }>;
20
-
21
- interface UrlSafetyWitnessParams extends WitnessParams<AnyConfigSchema<UrlSafetyWitnessConfig>> {
22
- google?: {
23
- safeBrowsing?: {
24
- endPoint?: string;
25
- key?: string;
26
- };
27
- };
28
- }
29
-
30
- type GoogleSafeBrowsingMatchSchema = 'com.google.safebrowsing.match';
31
- declare const GoogleSafeBrowsingMatchSchema: GoogleSafeBrowsingMatchSchema;
32
- interface GoogleSafeBrowsingMatch {
33
- cacheDuration: string;
34
- platformType: string;
35
- threat: {
36
- url: string;
37
- };
38
- threatEntryType: string;
39
- threatType: string;
40
- }
41
- type GoogleSafeBrowsingMatchPayload = Payload<GoogleSafeBrowsingMatch, GoogleSafeBrowsingMatchSchema>;
42
- declare class UrlSafetyWitness<TParams extends UrlSafetyWitnessParams = UrlSafetyWitnessParams> extends AbstractWitness<TParams> {
43
- static readonly configSchemas: Schema[];
44
- static readonly defaultConfigSchema: Schema;
45
- get key(): string | undefined;
46
- get urls(): string[] | undefined;
47
- protected observeHandler(payloads?: UrlPayload[]): Promise<UrlSafetyPayload[]>;
48
- }
49
-
50
- declare const UrlSafetyPlugin: () => _xyo_network_payloadset_plugin.PayloadSetWitnessPlugin<UrlSafetyWitness<UrlSafetyWitnessParams>>;
51
-
52
- export { GoogleSafeBrowsingMatchSchema, UrlSafetyPlugin, UrlSafetyWitness, UrlSafetyWitnessConfigSchema, UrlSafetyPlugin as default };
53
- export type { GoogleSafeBrowsingMatch, GoogleSafeBrowsingMatchPayload, UrlSafetyWitnessConfig, UrlSafetyWitnessParams };
1
+ export { UrlSafetyPlugin as default, UrlSafetyPlugin } from './Plugin.ts';
2
+ export * from './Witness/index.ts';
3
+ //# sourceMappingURL=index.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xyo-network/url-safety-plugin",
3
- "version": "4.1.0",
3
+ "version": "4.2.0",
4
4
  "description": "Typescript/Javascript Plugins for XYO Platform",
5
5
  "homepage": "https://xyo.network",
6
6
  "bugs": {
@@ -29,19 +29,18 @@
29
29
  "module": "dist/neutral/index.mjs",
30
30
  "types": "dist/neutral/index.d.ts",
31
31
  "dependencies": {
32
- "@xylabs/axios": "^4.13.15",
33
- "@xyo-network/abstract-witness": "^4.1.1",
34
- "@xyo-network/module-model": "^4.1.1",
35
- "@xyo-network/payload-model": "^4.1.1",
36
- "@xyo-network/payloadset-plugin": "^4.1.1",
37
- "@xyo-network/url-payload-plugin": "^4.1.0",
38
- "@xyo-network/url-safety-payload-plugin": "^4.1.0",
39
- "@xyo-network/witness-model": "^4.1.1"
32
+ "@xylabs/axios": "^4.15.1",
33
+ "@xyo-network/abstract-witness": "^4.3.0",
34
+ "@xyo-network/module-model": "^4.3.0",
35
+ "@xyo-network/payload-model": "^4.3.0",
36
+ "@xyo-network/payloadset-plugin": "^4.3.0",
37
+ "@xyo-network/url-payload-plugin": "^4.2.0",
38
+ "@xyo-network/url-safety-payload-plugin": "^4.2.0",
39
+ "@xyo-network/witness-model": "^4.3.0"
40
40
  },
41
41
  "devDependencies": {
42
- "@xylabs/ts-scripts-yarn3": "^7.0.0-rc.24",
43
- "@xylabs/tsconfig": "^7.0.0-rc.24",
44
- "knip": "^5.61.3",
42
+ "@xylabs/ts-scripts-yarn3": "^7.0.1",
43
+ "@xylabs/tsconfig": "^7.0.1",
45
44
  "typescript": "^5.8.3",
46
45
  "vitest": "^3.2.4"
47
46
  },