@adatechnology/purchase-module 0.0.0-stage → 0.1.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.
@@ -0,0 +1,13 @@
1
+ {
2
+ "version": "7",
3
+ "dialect": "postgresql",
4
+ "entries": [
5
+ {
6
+ "idx": 0,
7
+ "version": "7",
8
+ "when": 1795884420285,
9
+ "tag": "0000_initial",
10
+ "breakpoints": true
11
+ }
12
+ ]
13
+ }
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
+
21
+ // src/openapi.ts
22
+ var openapi_exports = {};
23
+ __export(openapi_exports, {
24
+ purchaseOpenApiPaths: () => purchaseOpenApiPaths
25
+ });
26
+ module.exports = __toCommonJS(openapi_exports);
27
+ var import_openapi = require("@adatechnology/module-http/openapi");
28
+ function purchaseOpenApiPaths(params) {
29
+ return (0, import_openapi.moduleOpenApiPaths)({
30
+ ...params,
31
+ tags: [
32
+ "purchase"
33
+ ]
34
+ });
35
+ }
36
+ __name(purchaseOpenApiPaths, "purchaseOpenApiPaths");
37
+ // Annotate the CommonJS export names for ESM import in node:
38
+ 0 && (module.exports = {
39
+ purchaseOpenApiPaths
40
+ });
41
+ //# sourceMappingURL=openapi.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/openapi.ts"],"sourcesContent":["/**\n * Copyright (c) 2026 Ada Technology. MIT License.\n */\n\nimport { moduleOpenApiPaths, type OpenApiPaths } from '@adatechnology/module-http/openapi'\nimport type { ModuleRouteTable } from '@adatechnology/module-http'\n\n/** Paths OpenAPI das rotas de compras, já com a tag do módulo. */\nexport function purchaseOpenApiPaths(params: { routes: ModuleRouteTable; basePath?: string }): OpenApiPaths {\n return moduleOpenApiPaths({ ...params, tags: ['purchase'] })\n}\n\nexport type { OpenApiPaths }\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;;;;;AAIA,qBAAsD;AAI/C,SAASA,qBAAqBC,QAAuD;AAC1F,aAAOC,mCAAmB;IAAE,GAAGD;IAAQE,MAAM;MAAC;;EAAY,CAAA;AAC5D;AAFgBH;","names":["purchaseOpenApiPaths","params","moduleOpenApiPaths","tags"]}
@@ -0,0 +1,15 @@
1
+ import { OpenApiPaths } from '@adatechnology/module-http/openapi';
2
+ export { OpenApiPaths } from '@adatechnology/module-http/openapi';
3
+ import { ModuleRouteTable } from '@adatechnology/module-http';
4
+
5
+ /**
6
+ * Copyright (c) 2026 Ada Technology. MIT License.
7
+ */
8
+
9
+ /** Paths OpenAPI das rotas de compras, já com a tag do módulo. */
10
+ declare function purchaseOpenApiPaths(params: {
11
+ routes: ModuleRouteTable;
12
+ basePath?: string;
13
+ }): OpenApiPaths;
14
+
15
+ export { purchaseOpenApiPaths };
@@ -0,0 +1,15 @@
1
+ import { OpenApiPaths } from '@adatechnology/module-http/openapi';
2
+ export { OpenApiPaths } from '@adatechnology/module-http/openapi';
3
+ import { ModuleRouteTable } from '@adatechnology/module-http';
4
+
5
+ /**
6
+ * Copyright (c) 2026 Ada Technology. MIT License.
7
+ */
8
+
9
+ /** Paths OpenAPI das rotas de compras, já com a tag do módulo. */
10
+ declare function purchaseOpenApiPaths(params: {
11
+ routes: ModuleRouteTable;
12
+ basePath?: string;
13
+ }): OpenApiPaths;
14
+
15
+ export { purchaseOpenApiPaths };
@@ -0,0 +1,18 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
+
4
+ // src/openapi.ts
5
+ import { moduleOpenApiPaths } from "@adatechnology/module-http/openapi";
6
+ function purchaseOpenApiPaths(params) {
7
+ return moduleOpenApiPaths({
8
+ ...params,
9
+ tags: [
10
+ "purchase"
11
+ ]
12
+ });
13
+ }
14
+ __name(purchaseOpenApiPaths, "purchaseOpenApiPaths");
15
+ export {
16
+ purchaseOpenApiPaths
17
+ };
18
+ //# sourceMappingURL=openapi.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/openapi.ts"],"sourcesContent":["/**\n * Copyright (c) 2026 Ada Technology. MIT License.\n */\n\nimport { moduleOpenApiPaths, type OpenApiPaths } from '@adatechnology/module-http/openapi'\nimport type { ModuleRouteTable } from '@adatechnology/module-http'\n\n/** Paths OpenAPI das rotas de compras, já com a tag do módulo. */\nexport function purchaseOpenApiPaths(params: { routes: ModuleRouteTable; basePath?: string }): OpenApiPaths {\n return moduleOpenApiPaths({ ...params, tags: ['purchase'] })\n}\n\nexport type { OpenApiPaths }\n"],"mappings":";;;;AAIA,SAASA,0BAA6C;AAI/C,SAASC,qBAAqBC,QAAuD;AAC1F,SAAOC,mBAAmB;IAAE,GAAGD;IAAQE,MAAM;MAAC;;EAAY,CAAA;AAC5D;AAFgBH;","names":["moduleOpenApiPaths","purchaseOpenApiPaths","params","moduleOpenApiPaths","tags"]}
package/package.json CHANGED
@@ -1,6 +1,59 @@
1
1
  {
2
2
  "name": "@adatechnology/purchase-module",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "version": "0.1.0",
4
+ "license": "MIT",
5
+ "description": "Optional stateful purchasing module — suppliers with items and price history, purchase orders with numbering, approval above a threshold and expected delivery, dispatch to the supplier (WhatsApp/e-mail through a port), partial receipts with batch/expiry, divergence and landed cost, incoming supply for stock, purchase suggestion, late-order scan, NF-e XML import, accounts-payable hand-off and spend reports; works alone and plugs into stock, recipes and expenses through optional ports; schema, migrations and module-http routes",
6
+ "publishConfig": {
7
+ "access": "public"
8
+ },
9
+ "type": "module",
10
+ "main": "dist/index.js",
11
+ "types": "dist/index.d.ts",
12
+ "exports": {
13
+ ".": {
14
+ "types": "./dist/index.d.ts",
15
+ "import": "./dist/index.js",
16
+ "require": "./dist/index.cjs"
17
+ },
18
+ "./http/fetch": {
19
+ "types": "./dist/http/fetch.d.ts",
20
+ "import": "./dist/http/fetch.js",
21
+ "require": "./dist/http/fetch.cjs"
22
+ },
23
+ "./http/uws": {
24
+ "types": "./dist/http/uws.d.ts",
25
+ "import": "./dist/http/uws.js",
26
+ "require": "./dist/http/uws.cjs"
27
+ },
28
+ "./openapi": {
29
+ "types": "./dist/openapi.d.ts",
30
+ "import": "./dist/openapi.js",
31
+ "require": "./dist/openapi.cjs"
32
+ }
33
+ },
34
+ "files": [
35
+ "dist"
36
+ ],
37
+ "dependencies": {
38
+ "zod": "^3.24.1",
39
+ "@adatechnology/module-http": "0.4.0",
40
+ "@adatechnology/purchase-contracts": "0.1.0",
41
+ "@adatechnology/recipe-contracts": "0.1.0"
42
+ },
43
+ "devDependencies": {
44
+ "@types/bun": "1.3.14",
45
+ "drizzle-kit": "0.31.10",
46
+ "drizzle-orm": "0.45.2",
47
+ "tsup": "^8.5.1",
48
+ "typescript": "^5.7.3"
49
+ },
50
+ "peerDependencies": {
51
+ "drizzle-orm": ">=0.36.0 <1"
52
+ },
53
+ "scripts": {
54
+ "build": "tsup",
55
+ "check": "tsc -p tsconfig.json --noEmit",
56
+ "test": "bun test",
57
+ "db:generate": "drizzle-kit generate --config drizzle.config.ts"
58
+ }
6
59
  }