@powerhousedao/contributor-billing 0.0.21 → 0.0.23

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 +1 @@
1
- {"version":3,"file":"resolvers.d.ts","sourceRoot":"","sources":["../../../subgraphs/billing-statement/resolvers.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AAO3D,eAAO,MAAM,YAAY,GAAI,UAAU,QAAQ,KAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CA8JnE,CAAC"}
1
+ {"version":3,"file":"resolvers.d.ts","sourceRoot":"","sources":["../../../subgraphs/billing-statement/resolvers.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AAO3D,eAAO,MAAM,YAAY,GAAI,UAAU,QAAQ,KAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CA4JnE,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import { addFile } from "document-drive";
2
2
  import { actions } from "../../document-models/billing-statement/index.js";
3
- import { generateId, hashKey } from "document-model";
3
+ import { generateId } from "document-model";
4
4
  const DEFAULT_DRIVE_ID = "powerhouse";
5
5
  export const getResolvers = (subgraph) => {
6
6
  const reactor = subgraph.reactor;
@@ -13,9 +13,8 @@ export const getResolvers = (subgraph) => {
13
13
  const docId = args.docId || "";
14
14
  const doc = await reactor.getDocument(driveId, docId);
15
15
  return {
16
- id: docId,
17
- driveId: driveId,
18
16
  ...doc,
17
+ driveId: driveId,
19
18
  state: doc.state.global,
20
19
  stateJSON: doc.state.global,
21
20
  revision: doc.revision.global,
@@ -27,9 +26,8 @@ export const getResolvers = (subgraph) => {
27
26
  const docs = await Promise.all(docsIds.map(async (docId) => {
28
27
  const doc = await reactor.getDocument(driveId, docId);
29
28
  return {
30
- id: docId,
31
- driveId: driveId,
32
29
  ...doc,
30
+ driveId: driveId,
33
31
  state: doc.state.global,
34
32
  stateJSON: doc.state.global,
35
33
  revision: doc.revision.global,
@@ -52,12 +50,12 @@ export const getResolvers = (subgraph) => {
52
50
  {
53
51
  branch: "main",
54
52
  scope: "global",
55
- syncId: hashKey(),
53
+ syncId: generateId(),
56
54
  },
57
55
  {
58
56
  branch: "main",
59
57
  scope: "local",
60
- syncId: hashKey(),
58
+ syncId: generateId(),
61
59
  },
62
60
  ],
63
61
  }));
@@ -1 +1 @@
1
- {"version":3,"file":"resolvers.d.ts","sourceRoot":"","sources":["../../../subgraphs/invoice/resolvers.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AAQ3D,eAAO,MAAM,YAAY,GAAI,UAAU,QAAQ,KAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CA0UnE,CAAC"}
1
+ {"version":3,"file":"resolvers.d.ts","sourceRoot":"","sources":["../../../subgraphs/invoice/resolvers.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AAQ3D,eAAO,MAAM,YAAY,GAAI,UAAU,QAAQ,KAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAwUnE,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import { addFile } from "document-drive";
2
2
  import { actions } from "../../document-models/invoice/index.js";
3
- import { generateId, hashKey } from "document-model";
3
+ import { generateId } from "document-model";
4
4
  import { Invoice_processGnosisPayment, Invoice_createRequestFinancePayment, Invoice_uploadInvoicePdfChunk } from "./customResolvers.js";
5
5
  const DEFAULT_DRIVE_ID = "powerhouse";
6
6
  export const getResolvers = (subgraph) => {
@@ -14,9 +14,8 @@ export const getResolvers = (subgraph) => {
14
14
  const docId = args.docId || "";
15
15
  const doc = await reactor.getDocument(driveId, docId);
16
16
  return {
17
- id: docId,
18
- driveId: driveId,
19
17
  ...doc,
18
+ driveId: driveId,
20
19
  state: doc.state.global,
21
20
  stateJSON: doc.state.global,
22
21
  revision: doc.revision.global,
@@ -28,9 +27,8 @@ export const getResolvers = (subgraph) => {
28
27
  const docs = await Promise.all(docsIds.map(async (docId) => {
29
28
  const doc = await reactor.getDocument(driveId, docId);
30
29
  return {
31
- id: docId,
32
- driveId: driveId,
33
30
  ...doc,
31
+ driveId: driveId,
34
32
  state: doc.state.global,
35
33
  stateJSON: doc.state.global,
36
34
  revision: doc.revision.global,
@@ -53,12 +51,12 @@ export const getResolvers = (subgraph) => {
53
51
  {
54
52
  branch: "main",
55
53
  scope: "global",
56
- syncId: hashKey(),
54
+ syncId: generateId(),
57
55
  },
58
56
  {
59
57
  branch: "main",
60
58
  scope: "local",
61
- syncId: hashKey(),
59
+ syncId: generateId(),
62
60
  },
63
61
  ],
64
62
  }));
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@powerhousedao/contributor-billing",
3
3
  "description": "Document models that help contributors of open organisations get paid anonymously for their work on a monthly basis.",
4
- "version": "0.0.21",
4
+ "version": "0.0.23",
5
5
  "license": "AGPL-3.0-only",
6
6
  "type": "module",
7
7
  "files": [
@@ -57,19 +57,20 @@
57
57
  },
58
58
  "dependencies": {
59
59
  "@google-cloud/documentai": "^8.12.0",
60
- "@powerhousedao/builder-tools": "^0.10.2",
61
- "@powerhousedao/common": "^1.11.2",
62
- "@powerhousedao/design-system": "^1.40.2",
60
+ "@powerhousedao/builder-tools": "latest",
61
+ "@powerhousedao/common": "latest",
62
+ "@powerhousedao/design-system": "latest",
63
63
  "@powerhousedao/document-engineering": "^1.13.0",
64
64
  "@react-pdf/renderer": "^4.3.0",
65
65
  "@safe-global/api-kit": "^3.0.1",
66
66
  "@safe-global/protocol-kit": "^6.0.3",
67
67
  "@safe-global/sdk-starter-kit": "^2.0.2",
68
68
  "@safe-global/types-kit": "^2.0.1",
69
+ "@testing-library/react": "^16.3.0",
69
70
  "@types/cors": "^2.8.17",
70
71
  "axios": "^1.9.0",
71
72
  "cors": "^2.8.5",
72
- "document-model": "^3.0.2",
73
+ "document-model": "latest",
73
74
  "dotenv": "^16.5.0",
74
75
  "error": "^10.4.0",
75
76
  "ethers": "^6.14.0",
@@ -83,18 +84,18 @@
83
84
  "devDependencies": {
84
85
  "@eslint/js": "^9.25.0",
85
86
  "@powerhousedao/analytics-engine-core": "^0.4.0",
86
- "@powerhousedao/codegen": "^0.50.2",
87
- "@powerhousedao/ph-cli": "^0.41.3",
88
- "@powerhousedao/reactor-api": "^1.31.2",
89
- "@powerhousedao/reactor-browser": "^1.23.2",
90
- "@powerhousedao/reactor-local": "^1.28.3",
91
- "@powerhousedao/scalars": "^2.0.1",
87
+ "@powerhousedao/codegen": "latest",
88
+ "@powerhousedao/ph-cli": "latest",
89
+ "@powerhousedao/reactor-api": "latest",
90
+ "@powerhousedao/reactor-browser": "latest",
91
+ "@powerhousedao/reactor-local": "latest",
92
+ "@powerhousedao/scalars": "latest",
92
93
  "@tailwindcss/cli": "^4.1.8",
93
94
  "@types/node": "^22.15.17",
94
95
  "@types/react": "^19.1.4",
95
96
  "@vitejs/plugin-react": "^4.4.1",
96
97
  "bun-types": "^1.2.11",
97
- "document-drive": "^1.30.2",
98
+ "document-drive": "latest",
98
99
  "eslint": "^9.25.0",
99
100
  "eslint-plugin-react": "^7.37.5",
100
101
  "eslint-plugin-react-hooks": "^5.2.0",
@@ -114,4 +115,4 @@
114
115
  "react": "^18.3.1",
115
116
  "react-dom": "^18.3.1"
116
117
  }
117
- }
118
+ }
@@ -1,3 +0,0 @@
1
- declare const LineItems: () => import("react/jsx-runtime").JSX.Element;
2
- export default LineItems;
3
- //# sourceMappingURL=lineItems.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"lineItems.d.ts","sourceRoot":"","sources":["../../../../editors/billing-statement/components/lineItems.tsx"],"names":[],"mappings":"AAOA,QAAA,MAAM,SAAS,+CA2Cd,CAAC;AAEF,eAAe,SAAS,CAAC"}
@@ -1,24 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Tag } from "lucide-react";
3
- // import { ObjectSetTable } from "@powerhousedao/document-engineering";
4
- import { useMemo } from "react";
5
- // table columns
6
- const LineItems = () => {
7
- const columns = useMemo(() => [
8
- { field: 'description', title: "Description" },
9
- { field: 'unit', title: "Unit" },
10
- { field: 'quantity', title: "Quantity" },
11
- { field: 'unitPriceCash', title: "Fiat/Unit" },
12
- { field: 'unitPricePwt', title: "POWT/Unit" },
13
- { field: 'totalPriceCash', title: "Total Fiat" },
14
- { field: 'totalPricePwt', title: "Total POWT" },
15
- ], []);
16
- return (_jsxs("div", { className: "mt-6", children: [_jsxs("div", { className: "flex justify-between", children: [_jsx("div", { className: "flex items-center", children: _jsx("h1", { className: "text-1xl font-bold px-2", children: "Line Items" }) }), _jsx("div", { className: "flex items-center", children: _jsx(Tag, { onClick: () => { }, style: {
17
- cursor: "pointer",
18
- width: 28,
19
- height: 28,
20
- color: "white",
21
- fill: "#475264",
22
- } }) })] }), _jsx("div", { className: "mt-4" })] }));
23
- };
24
- export default LineItems;