@mercurjs/types 2.0.0-canary.40 → 2.0.0-canary.42

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,16 @@
1
+ export type BaseField = {
2
+ type: 'string' | 'text' | 'integer' | 'boolean' | 'date' | 'time' | 'datetime' | 'json' | 'array' | 'float';
3
+ nullable?: boolean;
4
+ defaultValue?: any;
5
+ };
6
+ export type EnumField = Omit<BaseField, 'type'> & {
7
+ type: 'enum';
8
+ enum: string[];
9
+ };
10
+ export type Field = BaseField | EnumField;
11
+ export type CustomFieldsModuleOptions = {
12
+ customFields?: {
13
+ [K in string]?: Record<string, Field>;
14
+ };
15
+ };
16
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/custom-fields/index.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,SAAS,GAAG;IACpB,IAAI,EAAE,QAAQ,GACZ,MAAM,GACN,SAAS,GACT,SAAS,GACT,MAAM,GACN,MAAM,GACN,UAAU,GACV,MAAM,GACN,OAAO,GACP,OAAO,CAAC;IACV,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,YAAY,CAAC,EAAE,GAAG,CAAA;CACrB,CAAA;AAED,MAAM,MAAM,SAAS,GAAG,IAAI,CAAC,SAAS,EAAE,MAAM,CAAC,GAAG;IAC9C,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,EAAE,CAAC;CAClB,CAAA;AAED,MAAM,MAAM,KAAK,GAAG,SAAS,GAAG,SAAS,CAAA;AAEzC,MAAM,MAAM,yBAAyB,GAAG;IAAE,YAAY,CAAC,EAAE;SAAG,CAAC,IAAI,MAAM,CAAC,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC;KAAE,CAAA;CAAE,CAAA"}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/dist/index.d.ts CHANGED
@@ -5,4 +5,5 @@ export * from "./commission";
5
5
  export * as HttpTypes from "./http";
6
6
  export * from "./payout";
7
7
  export * from "./modules";
8
+ export * from "./custom-fields";
8
9
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAA;AAG/B,cAAc,UAAU,CAAA;AAGxB,cAAc,eAAe,CAAA;AAG7B,cAAc,cAAc,CAAA;AAG5B,OAAO,KAAK,SAAS,MAAM,QAAQ,CAAA;AAGnC,cAAc,UAAU,CAAA;AAGxB,cAAc,WAAW,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAA;AAG/B,cAAc,UAAU,CAAA;AAGxB,cAAc,eAAe,CAAA;AAG7B,cAAc,cAAc,CAAA;AAG5B,OAAO,KAAK,SAAS,MAAM,QAAQ,CAAA;AAGnC,cAAc,UAAU,CAAA;AAGxB,cAAc,WAAW,CAAA;AAGzB,cAAc,iBAAiB,CAAA"}
package/dist/index.js CHANGED
@@ -50,3 +50,5 @@ exports.HttpTypes = __importStar(require("./http"));
50
50
  __exportStar(require("./payout"), exports);
51
51
  // Modules
52
52
  __exportStar(require("./modules"), exports);
53
+ // Custom fields types
54
+ __exportStar(require("./custom-fields"), exports);
package/dist/modules.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  export declare enum MercurModules {
2
2
  SELLER = "seller",
3
3
  COMMISSION = "commission",
4
- PAYOUT = "payout"
4
+ PAYOUT = "payout",
5
+ CUSTOM_FIELDS = "custom_fields"
5
6
  }
6
7
  //# sourceMappingURL=modules.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"modules.d.ts","sourceRoot":"","sources":["../src/modules.ts"],"names":[],"mappings":"AAAA,oBAAY,aAAa;IACrB,MAAM,WAAW;IACjB,UAAU,eAAe;IACzB,MAAM,WAAW;CACpB"}
1
+ {"version":3,"file":"modules.d.ts","sourceRoot":"","sources":["../src/modules.ts"],"names":[],"mappings":"AAAA,oBAAY,aAAa;IACrB,MAAM,WAAW;IACjB,UAAU,eAAe;IACzB,MAAM,WAAW;IACjB,aAAa,kBAAkB;CAClC"}
package/dist/modules.js CHANGED
@@ -6,4 +6,5 @@ var MercurModules;
6
6
  MercurModules["SELLER"] = "seller";
7
7
  MercurModules["COMMISSION"] = "commission";
8
8
  MercurModules["PAYOUT"] = "payout";
9
+ MercurModules["CUSTOM_FIELDS"] = "custom_fields";
9
10
  })(MercurModules || (exports.MercurModules = MercurModules = {}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mercurjs/types",
3
- "version": "2.0.0-canary.40",
3
+ "version": "2.0.0-canary.42",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/mercurjs/mercur",