@xyo-network/module-model-mongodb 4.0.3 → 4.1.1

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.
@@ -0,0 +1,60 @@
1
+ import { BaseMongoSdkPublicConfig, BaseMongoSdkConfig, BaseMongoSdk, BaseMongoSdkPrivateConfig } from '@xylabs/mongo';
2
+ import { ModuleConfig, Labels, ModuleParams, AnyConfigSchema } from '@xyo-network/module-model';
3
+ import { BoundWitnessWithMongoMeta, PayloadWithMongoMeta } from '@xyo-network/payload-mongodb';
4
+ import { JobQueue } from '@xyo-network/shared';
5
+
6
+ declare const MongoDBModuleConfigSchema = "network.xyo.module.mongodb.config";
7
+ type MongoDBModuleConfigSchema = typeof MongoDBModuleConfigSchema;
8
+
9
+ type MongoDBModuleConfig = ModuleConfig<{
10
+ boundWitnessSdkConfig?: Partial<BaseMongoSdkPublicConfig>;
11
+ payloadSdkConfig?: Partial<BaseMongoSdkPublicConfig>;
12
+ schema: MongoDBModuleConfigSchema;
13
+ }>;
14
+
15
+ type MongoDBModuleConfigV2 = ModuleConfig<{
16
+ /**
17
+ * The maximum number of payloads to store in the archivist.
18
+ * If not specified, there is no limit. If specified, the archivist
19
+ * will automatically clear old payloads when the limit is reached
20
+ * in a LIFO fashion.
21
+ */
22
+ max?: number;
23
+ payloadSdkConfig?: Partial<BaseMongoSdkPublicConfig>;
24
+ schema: MongoDBModuleConfigSchema;
25
+ }>;
26
+
27
+ interface MongoDBStorageClassLabels extends Labels {
28
+ 'network.xyo.storage.class': 'mongodb';
29
+ }
30
+ declare const MongoDBStorageClassLabels: MongoDBStorageClassLabels;
31
+
32
+ interface MongoDBModule {
33
+ get boundWitnessSdkConfig(): BaseMongoSdkConfig;
34
+ get boundWitnesses(): BaseMongoSdk<BoundWitnessWithMongoMeta>;
35
+ get payloadSdkConfig(): BaseMongoSdkConfig;
36
+ get payloads(): BaseMongoSdk<PayloadWithMongoMeta>;
37
+ }
38
+
39
+ interface MongoDBModuleV2 {
40
+ get payloadSdkConfig(): BaseMongoSdkConfig;
41
+ get payloads(): BaseMongoSdk<PayloadWithMongoMeta>;
42
+ }
43
+
44
+ interface MongoDBModuleStatic<T extends MongoDBStorageClassLabels = MongoDBStorageClassLabels> {
45
+ labels: T;
46
+ }
47
+
48
+ interface MongoDBModuleParams extends ModuleParams<AnyConfigSchema<MongoDBModuleConfig>> {
49
+ boundWitnessSdkConfig?: (BaseMongoSdkPrivateConfig & Partial<BaseMongoSdkPublicConfig>);
50
+ jobQueue?: JobQueue;
51
+ payloadSdkConfig?: (BaseMongoSdkPrivateConfig & Partial<BaseMongoSdkPublicConfig>);
52
+ }
53
+
54
+ interface MongoDBModuleParamsV2<TConfig extends AnyConfigSchema<MongoDBModuleConfigV2> = AnyConfigSchema<MongoDBModuleConfigV2>> extends ModuleParams<TConfig> {
55
+ jobQueue?: JobQueue;
56
+ payloadSdkConfig?: (BaseMongoSdkPrivateConfig & Partial<BaseMongoSdkPublicConfig>);
57
+ }
58
+
59
+ export { MongoDBModuleConfigSchema, MongoDBStorageClassLabels };
60
+ export type { MongoDBModule, MongoDBModuleConfig, MongoDBModuleConfigV2, MongoDBModuleParams, MongoDBModuleParamsV2, MongoDBModuleStatic, MongoDBModuleV2 };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xyo-network/module-model-mongodb",
3
- "version": "4.0.3",
3
+ "version": "4.1.1",
4
4
  "description": "Primary SDK for using XYO Protocol 2.0",
5
5
  "homepage": "https://xyo.network",
6
6
  "bugs": {
@@ -21,32 +21,30 @@
21
21
  "type": "module",
22
22
  "exports": {
23
23
  ".": {
24
- "browser": {
25
- "types": "./dist/types/index.d.ts",
26
- "default": "./dist/browser/index.mjs"
27
- },
24
+ "browser": {},
28
25
  "node": {
29
- "types": "./dist/types/index.d.ts",
26
+ "types": "./dist/node/index.d.ts",
30
27
  "default": "./dist/node/index.mjs"
31
- },
32
- "types": "./dist/types/index.d.ts",
33
- "default": "./dist/node/index.mjs"
28
+ }
34
29
  },
35
30
  "./package.json": "./package.json"
36
31
  },
37
32
  "module": "dist/node/index.mjs",
38
- "types": "dist/types/index.d.ts",
33
+ "types": "dist/node/index.d.ts",
39
34
  "dependencies": {
40
- "@xylabs/mongo": "^4.13.4",
41
- "@xyo-network/module-model": "^4.0.3",
42
- "@xyo-network/payload-mongodb": "^4.0.3",
43
- "@xyo-network/shared": "^4.0.3"
35
+ "@xylabs/mongo": "^4.13.15",
36
+ "@xyo-network/module-model": "^4.1.1",
37
+ "@xyo-network/payload-mongodb": "^4.1.1",
38
+ "@xyo-network/shared": "^4.1.1"
44
39
  },
45
40
  "devDependencies": {
46
- "@xylabs/ts-scripts-yarn3": "^6.5.18",
47
- "@xylabs/tsconfig": "^6.5.18",
41
+ "@xylabs/ts-scripts-yarn3": "^7.0.0-rc.23",
42
+ "@xylabs/tsconfig": "^7.0.0-rc.23",
48
43
  "typescript": "^5.8.3"
49
44
  },
45
+ "engines": {
46
+ "node": ">=16"
47
+ },
50
48
  "publishConfig": {
51
49
  "access": "public"
52
50
  }
package/xy.config.ts ADDED
@@ -0,0 +1,11 @@
1
+ import type { XyTsupConfig } from '@xylabs/ts-scripts-yarn3'
2
+ const config: XyTsupConfig = {
3
+ compile: {
4
+ entryMode: 'custom',
5
+ neutral: {},
6
+ browser: {},
7
+ node: { src: { entry: ['index.ts'] } },
8
+ },
9
+ }
10
+
11
+ export default config
@@ -1,10 +0,0 @@
1
- // src/Labels.ts
2
- var MongoDBStorageClassLabels = { "network.xyo.storage.class": "mongodb" };
3
-
4
- // src/Schema.ts
5
- var MongoDBModuleConfigSchema = "network.xyo.module.mongodb.config";
6
- export {
7
- MongoDBModuleConfigSchema,
8
- MongoDBStorageClassLabels
9
- };
10
- //# sourceMappingURL=index.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/Labels.ts","../../src/Schema.ts"],"sourcesContent":["import type { Labels } from '@xyo-network/module-model'\n\nexport interface MongoDBStorageClassLabels extends Labels {\n 'network.xyo.storage.class': 'mongodb'\n}\n\nexport const MongoDBStorageClassLabels: MongoDBStorageClassLabels = { 'network.xyo.storage.class': 'mongodb' }\n","export const MongoDBModuleConfigSchema = 'network.xyo.module.mongodb.config'\nexport type MongoDBModuleConfigSchema = typeof MongoDBModuleConfigSchema\n"],"mappings":";AAMO,IAAM,4BAAuD,EAAE,6BAA6B,UAAU;;;ACNtG,IAAM,4BAA4B;","names":[]}
@@ -1,10 +0,0 @@
1
- // src/Labels.ts
2
- var MongoDBStorageClassLabels = { "network.xyo.storage.class": "mongodb" };
3
-
4
- // src/Schema.ts
5
- var MongoDBModuleConfigSchema = "network.xyo.module.mongodb.config";
6
- export {
7
- MongoDBModuleConfigSchema,
8
- MongoDBStorageClassLabels
9
- };
10
- //# sourceMappingURL=index.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/Labels.ts","../../src/Schema.ts"],"sourcesContent":["import type { Labels } from '@xyo-network/module-model'\n\nexport interface MongoDBStorageClassLabels extends Labels {\n 'network.xyo.storage.class': 'mongodb'\n}\n\nexport const MongoDBStorageClassLabels: MongoDBStorageClassLabels = { 'network.xyo.storage.class': 'mongodb' }\n","export const MongoDBModuleConfigSchema = 'network.xyo.module.mongodb.config'\nexport type MongoDBModuleConfigSchema = typeof MongoDBModuleConfigSchema\n"],"mappings":";AAMO,IAAM,4BAAuD,EAAE,6BAA6B,UAAU;;;ACNtG,IAAM,4BAA4B;","names":[]}
@@ -1,10 +0,0 @@
1
- export * from './Config.ts';
2
- export * from './ConfigV2.ts';
3
- export * from './Labels.ts';
4
- export * from './Module.ts';
5
- export * from './ModuleV2.ts';
6
- export * from './MongoDBModuleStatic.ts';
7
- export * from './Params.ts';
8
- export * from './ParamsV2.ts';
9
- export * from './Schema.ts';
10
- //# sourceMappingURL=index.d.ts.map
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes