@powerhousedao/network-admin 0.0.38 → 0.0.39
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.
- package/dist/document-models/network-profile/gen/reducer.d.ts +1 -1
- package/dist/document-models/network-profile/gen/reducer.d.ts.map +1 -1
- package/dist/document-models/request-for-proposals/gen/ph-factories.js +1 -1
- package/dist/document-models/request-for-proposals/gen/utils.js +1 -1
- package/dist/document-models/workstream/hooks.d.ts +1 -1
- package/dist/document-models/workstream/hooks.d.ts.map +1 -1
- package/dist/document-models/workstream/module.d.ts +1 -1
- package/dist/document-models/workstream/module.d.ts.map +1 -1
- package/dist/powerhouse.manifest.json +9 -1
- package/dist/subgraphs/index.d.ts +0 -5
- package/dist/subgraphs/index.d.ts.map +1 -1
- package/dist/subgraphs/index.js +0 -5
- package/package.json +15 -15
- package/dist/scripts/sow-mirror/mirror_sow_state.d.ts +0 -3
- package/dist/scripts/sow-mirror/mirror_sow_state.d.ts.map +0 -1
- package/dist/scripts/sow-mirror/mirror_sow_state.js +0 -441
- package/dist/subgraphs/networks/index.d.ts +0 -11
- package/dist/subgraphs/networks/index.d.ts.map +0 -1
- package/dist/subgraphs/networks/index.js +0 -11
- package/dist/subgraphs/networks/resolvers.d.ts +0 -3
- package/dist/subgraphs/networks/resolvers.d.ts.map +0 -1
- package/dist/subgraphs/networks/resolvers.js +0 -42
- package/dist/subgraphs/networks/schema.d.ts +0 -3
- package/dist/subgraphs/networks/schema.d.ts.map +0 -1
- package/dist/subgraphs/networks/schema.js +0 -39
- package/dist/subgraphs/payment-terms/index.d.ts +0 -11
- package/dist/subgraphs/payment-terms/index.d.ts.map +0 -1
- package/dist/subgraphs/payment-terms/index.js +0 -11
- package/dist/subgraphs/payment-terms/resolvers.d.ts +0 -3
- package/dist/subgraphs/payment-terms/resolvers.d.ts.map +0 -1
- package/dist/subgraphs/payment-terms/resolvers.js +0 -264
- package/dist/subgraphs/payment-terms/schema.d.ts +0 -3
- package/dist/subgraphs/payment-terms/schema.d.ts.map +0 -1
- package/dist/subgraphs/payment-terms/schema.js +0 -199
- package/dist/subgraphs/request-for-proposals/index.d.ts +0 -11
- package/dist/subgraphs/request-for-proposals/index.d.ts.map +0 -1
- package/dist/subgraphs/request-for-proposals/index.js +0 -11
- package/dist/subgraphs/request-for-proposals/resolvers.d.ts +0 -3
- package/dist/subgraphs/request-for-proposals/resolvers.d.ts.map +0 -1
- package/dist/subgraphs/request-for-proposals/resolvers.js +0 -144
- package/dist/subgraphs/request-for-proposals/schema.d.ts +0 -3
- package/dist/subgraphs/request-for-proposals/schema.d.ts.map +0 -1
- package/dist/subgraphs/request-for-proposals/schema.js +0 -141
- package/dist/subgraphs/workstream/index.d.ts +0 -11
- package/dist/subgraphs/workstream/index.d.ts.map +0 -1
- package/dist/subgraphs/workstream/index.js +0 -11
- package/dist/subgraphs/workstream/resolvers.d.ts +0 -3
- package/dist/subgraphs/workstream/resolvers.d.ts.map +0 -1
- package/dist/subgraphs/workstream/resolvers.js +0 -180
- package/dist/subgraphs/workstream/schema.d.ts +0 -3
- package/dist/subgraphs/workstream/schema.d.ts.map +0 -1
- package/dist/subgraphs/workstream/schema.js +0 -146
- package/dist/subgraphs/workstreams/index.d.ts +0 -11
- package/dist/subgraphs/workstreams/index.d.ts.map +0 -1
- package/dist/subgraphs/workstreams/index.js +0 -11
- package/dist/subgraphs/workstreams/resolvers.d.ts +0 -3
- package/dist/subgraphs/workstreams/resolvers.d.ts.map +0 -1
- package/dist/subgraphs/workstreams/resolvers.js +0 -380
- package/dist/subgraphs/workstreams/schema.d.ts +0 -3
- package/dist/subgraphs/workstreams/schema.d.ts.map +0 -1
- package/dist/subgraphs/workstreams/schema.js +0 -326
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import {} from "@powerhousedao/reactor-api";
|
|
2
|
-
export const getResolvers = (subgraph) => {
|
|
3
|
-
const reactor = subgraph.reactor;
|
|
4
|
-
return {
|
|
5
|
-
Query: {
|
|
6
|
-
allNetworks: async () => {
|
|
7
|
-
const drives = await reactor.getDrives();
|
|
8
|
-
const docs = [];
|
|
9
|
-
for (const driveId of drives) {
|
|
10
|
-
const docsIds = await reactor.getDocuments(driveId);
|
|
11
|
-
const driveDocs = await Promise.allSettled(docsIds.map(async (docId) => reactor.getDocument(docId)));
|
|
12
|
-
driveDocs.forEach((result) => {
|
|
13
|
-
if (result.status === "fulfilled" &&
|
|
14
|
-
result.value.header.documentType === "powerhouse/network-profile") {
|
|
15
|
-
docs.push(result.value);
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
return docs.map((doc) => {
|
|
20
|
-
const state = doc.state.global;
|
|
21
|
-
return {
|
|
22
|
-
id: doc.header.id,
|
|
23
|
-
documentType: doc.header.documentType,
|
|
24
|
-
network: {
|
|
25
|
-
name: state.name,
|
|
26
|
-
icon: state.icon,
|
|
27
|
-
logo: state.logo,
|
|
28
|
-
logoBig: state.logoBig,
|
|
29
|
-
website: state.website ?? null,
|
|
30
|
-
description: state.description,
|
|
31
|
-
category: state.category,
|
|
32
|
-
x: state.x ?? null,
|
|
33
|
-
github: state.github ?? null,
|
|
34
|
-
discord: state.discord ?? null,
|
|
35
|
-
youtube: state.youtube ?? null,
|
|
36
|
-
},
|
|
37
|
-
};
|
|
38
|
-
});
|
|
39
|
-
},
|
|
40
|
-
},
|
|
41
|
-
};
|
|
42
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../subgraphs/networks/schema.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE5C,eAAO,MAAM,MAAM,EAAE,YAqCpB,CAAC"}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { gql } from "graphql-tag";
|
|
2
|
-
export const schema = gql `
|
|
3
|
-
"""
|
|
4
|
-
Subgraph definition
|
|
5
|
-
"""
|
|
6
|
-
type Query {
|
|
7
|
-
allNetworks: [AllNetworks!]!
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
type AllNetworks {
|
|
12
|
-
id: PHID
|
|
13
|
-
documentType: String
|
|
14
|
-
network: Network
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
type Network {
|
|
18
|
-
name: String!
|
|
19
|
-
icon: String!
|
|
20
|
-
logo: String!
|
|
21
|
-
logoBig: String!
|
|
22
|
-
website: String
|
|
23
|
-
description: String!
|
|
24
|
-
category: [NetworkCategory!]!
|
|
25
|
-
x: String
|
|
26
|
-
github: String
|
|
27
|
-
discord: String
|
|
28
|
-
youtube: String
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
enum NetworkCategory {
|
|
32
|
-
DEFI
|
|
33
|
-
OSS
|
|
34
|
-
CRYPTO
|
|
35
|
-
NGO
|
|
36
|
-
CHARITY
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
`;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { BaseSubgraph } from "@powerhousedao/reactor-api";
|
|
2
|
-
import type { DocumentNode } from "graphql";
|
|
3
|
-
export declare class PaymentTermsSubgraph extends BaseSubgraph {
|
|
4
|
-
name: string;
|
|
5
|
-
typeDefs: DocumentNode;
|
|
6
|
-
resolvers: Record<string, unknown>;
|
|
7
|
-
additionalContextFields: {};
|
|
8
|
-
onSetup(): Promise<void>;
|
|
9
|
-
onDisconnect(): Promise<void>;
|
|
10
|
-
}
|
|
11
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../subgraphs/payment-terms/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAI5C,qBAAa,oBAAqB,SAAQ,YAAY;IACpD,IAAI,SAAmB;IACvB,QAAQ,EAAE,YAAY,CAAU;IAChC,SAAS,0BAAsB;IAC/B,uBAAuB,KAAM;IACvB,OAAO;IACP,YAAY;CACnB"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { BaseSubgraph } from "@powerhousedao/reactor-api";
|
|
2
|
-
import { schema } from "./schema.js";
|
|
3
|
-
import { getResolvers } from "./resolvers.js";
|
|
4
|
-
export class PaymentTermsSubgraph extends BaseSubgraph {
|
|
5
|
-
name = "payment-terms";
|
|
6
|
-
typeDefs = schema;
|
|
7
|
-
resolvers = getResolvers(this);
|
|
8
|
-
additionalContextFields = {};
|
|
9
|
-
async onSetup() { }
|
|
10
|
-
async onDisconnect() { }
|
|
11
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"resolvers.d.ts","sourceRoot":"","sources":["../../../subgraphs/payment-terms/resolvers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AA4B/D,eAAO,MAAM,YAAY,GACvB,UAAU,YAAY,KACrB,MAAM,CAAC,MAAM,EAAE,OAAO,CA6cxB,CAAC"}
|
|
@@ -1,264 +0,0 @@
|
|
|
1
|
-
import { addFile } from "document-drive";
|
|
2
|
-
import { setName } from "document-model";
|
|
3
|
-
import { actions, paymentTermsDocumentType, } from "../../document-models/payment-terms/index.js";
|
|
4
|
-
export const getResolvers = (subgraph) => {
|
|
5
|
-
const reactor = subgraph.reactor;
|
|
6
|
-
return {
|
|
7
|
-
Query: {
|
|
8
|
-
PaymentTerms: async () => {
|
|
9
|
-
return {
|
|
10
|
-
getDocument: async (args) => {
|
|
11
|
-
const { docId, driveId } = args;
|
|
12
|
-
if (!docId) {
|
|
13
|
-
throw new Error("Document id is required");
|
|
14
|
-
}
|
|
15
|
-
if (driveId) {
|
|
16
|
-
const docIds = await reactor.getDocuments(driveId);
|
|
17
|
-
if (!docIds.includes(docId)) {
|
|
18
|
-
throw new Error(`Document with id ${docId} is not part of ${driveId}`);
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
const doc = await reactor.getDocument(docId);
|
|
22
|
-
return {
|
|
23
|
-
driveId: driveId,
|
|
24
|
-
...doc,
|
|
25
|
-
...doc.header,
|
|
26
|
-
created: doc.header.createdAtUtcIso,
|
|
27
|
-
lastModified: doc.header.lastModifiedAtUtcIso,
|
|
28
|
-
state: doc.state.global,
|
|
29
|
-
stateJSON: doc.state.global,
|
|
30
|
-
revision: doc.header?.revision?.global ?? 0,
|
|
31
|
-
};
|
|
32
|
-
},
|
|
33
|
-
getDocuments: async (args) => {
|
|
34
|
-
const { driveId } = args;
|
|
35
|
-
const docsIds = await reactor.getDocuments(driveId);
|
|
36
|
-
const docs = await Promise.all(docsIds.map(async (docId) => {
|
|
37
|
-
const doc = await reactor.getDocument(docId);
|
|
38
|
-
return {
|
|
39
|
-
driveId: driveId,
|
|
40
|
-
...doc,
|
|
41
|
-
...doc.header,
|
|
42
|
-
created: doc.header.createdAtUtcIso,
|
|
43
|
-
lastModified: doc.header.lastModifiedAtUtcIso,
|
|
44
|
-
state: doc.state.global,
|
|
45
|
-
stateJSON: doc.state.global,
|
|
46
|
-
revision: doc.header?.revision?.global ?? 0,
|
|
47
|
-
};
|
|
48
|
-
}));
|
|
49
|
-
return docs.filter((doc) => doc.header.documentType === paymentTermsDocumentType);
|
|
50
|
-
},
|
|
51
|
-
};
|
|
52
|
-
},
|
|
53
|
-
},
|
|
54
|
-
Mutation: {
|
|
55
|
-
PaymentTerms_createDocument: async (_, args) => {
|
|
56
|
-
const { driveId, name } = args;
|
|
57
|
-
const document = await reactor.addDocument(paymentTermsDocumentType);
|
|
58
|
-
if (driveId) {
|
|
59
|
-
await reactor.addAction(driveId, addFile({
|
|
60
|
-
name,
|
|
61
|
-
id: document.header.id,
|
|
62
|
-
documentType: paymentTermsDocumentType,
|
|
63
|
-
}));
|
|
64
|
-
}
|
|
65
|
-
if (name) {
|
|
66
|
-
await reactor.addAction(document.header.id, setName(name));
|
|
67
|
-
}
|
|
68
|
-
return document.header.id;
|
|
69
|
-
},
|
|
70
|
-
PaymentTerms_setBasicTerms: async (_, args) => {
|
|
71
|
-
const { docId, input } = args;
|
|
72
|
-
const doc = await reactor.getDocument(docId);
|
|
73
|
-
if (!doc) {
|
|
74
|
-
throw new Error("Document not found");
|
|
75
|
-
}
|
|
76
|
-
const result = await reactor.addAction(docId, actions.setBasicTerms(input));
|
|
77
|
-
if (result.status !== "SUCCESS") {
|
|
78
|
-
throw new Error(result.error?.message ?? "Failed to setBasicTerms");
|
|
79
|
-
}
|
|
80
|
-
return true;
|
|
81
|
-
},
|
|
82
|
-
PaymentTerms_updateStatus: async (_, args) => {
|
|
83
|
-
const { docId, input } = args;
|
|
84
|
-
const doc = await reactor.getDocument(docId);
|
|
85
|
-
if (!doc) {
|
|
86
|
-
throw new Error("Document not found");
|
|
87
|
-
}
|
|
88
|
-
const result = await reactor.addAction(docId, actions.updateStatus(input));
|
|
89
|
-
if (result.status !== "SUCCESS") {
|
|
90
|
-
throw new Error(result.error?.message ?? "Failed to updateStatus");
|
|
91
|
-
}
|
|
92
|
-
return true;
|
|
93
|
-
},
|
|
94
|
-
PaymentTerms_setTimeAndMaterials: async (_, args) => {
|
|
95
|
-
const { docId, input } = args;
|
|
96
|
-
const doc = await reactor.getDocument(docId);
|
|
97
|
-
if (!doc) {
|
|
98
|
-
throw new Error("Document not found");
|
|
99
|
-
}
|
|
100
|
-
const result = await reactor.addAction(docId, actions.setTimeAndMaterials(input));
|
|
101
|
-
if (result.status !== "SUCCESS") {
|
|
102
|
-
throw new Error(result.error?.message ?? "Failed to setTimeAndMaterials");
|
|
103
|
-
}
|
|
104
|
-
return true;
|
|
105
|
-
},
|
|
106
|
-
PaymentTerms_setEscrowDetails: async (_, args) => {
|
|
107
|
-
const { docId, input } = args;
|
|
108
|
-
const doc = await reactor.getDocument(docId);
|
|
109
|
-
if (!doc) {
|
|
110
|
-
throw new Error("Document not found");
|
|
111
|
-
}
|
|
112
|
-
const result = await reactor.addAction(docId, actions.setEscrowDetails(input));
|
|
113
|
-
if (result.status !== "SUCCESS") {
|
|
114
|
-
throw new Error(result.error?.message ?? "Failed to setEscrowDetails");
|
|
115
|
-
}
|
|
116
|
-
return true;
|
|
117
|
-
},
|
|
118
|
-
PaymentTerms_setEvaluationTerms: async (_, args) => {
|
|
119
|
-
const { docId, input } = args;
|
|
120
|
-
const doc = await reactor.getDocument(docId);
|
|
121
|
-
if (!doc) {
|
|
122
|
-
throw new Error("Document not found");
|
|
123
|
-
}
|
|
124
|
-
const result = await reactor.addAction(docId, actions.setEvaluationTerms(input));
|
|
125
|
-
if (result.status !== "SUCCESS") {
|
|
126
|
-
throw new Error(result.error?.message ?? "Failed to setEvaluationTerms");
|
|
127
|
-
}
|
|
128
|
-
return true;
|
|
129
|
-
},
|
|
130
|
-
PaymentTerms_addMilestone: async (_, args) => {
|
|
131
|
-
const { docId, input } = args;
|
|
132
|
-
const doc = await reactor.getDocument(docId);
|
|
133
|
-
if (!doc) {
|
|
134
|
-
throw new Error("Document not found");
|
|
135
|
-
}
|
|
136
|
-
const result = await reactor.addAction(docId, actions.addMilestone(input));
|
|
137
|
-
if (result.status !== "SUCCESS") {
|
|
138
|
-
throw new Error(result.error?.message ?? "Failed to addMilestone");
|
|
139
|
-
}
|
|
140
|
-
return true;
|
|
141
|
-
},
|
|
142
|
-
PaymentTerms_updateMilestone: async (_, args) => {
|
|
143
|
-
const { docId, input } = args;
|
|
144
|
-
const doc = await reactor.getDocument(docId);
|
|
145
|
-
if (!doc) {
|
|
146
|
-
throw new Error("Document not found");
|
|
147
|
-
}
|
|
148
|
-
const result = await reactor.addAction(docId, actions.updateMilestone(input));
|
|
149
|
-
if (result.status !== "SUCCESS") {
|
|
150
|
-
throw new Error(result.error?.message ?? "Failed to updateMilestone");
|
|
151
|
-
}
|
|
152
|
-
return true;
|
|
153
|
-
},
|
|
154
|
-
PaymentTerms_updateMilestoneStatus: async (_, args) => {
|
|
155
|
-
const { docId, input } = args;
|
|
156
|
-
const doc = await reactor.getDocument(docId);
|
|
157
|
-
if (!doc) {
|
|
158
|
-
throw new Error("Document not found");
|
|
159
|
-
}
|
|
160
|
-
const result = await reactor.addAction(docId, actions.updateMilestoneStatus(input));
|
|
161
|
-
if (result.status !== "SUCCESS") {
|
|
162
|
-
throw new Error(result.error?.message ?? "Failed to updateMilestoneStatus");
|
|
163
|
-
}
|
|
164
|
-
return true;
|
|
165
|
-
},
|
|
166
|
-
PaymentTerms_deleteMilestone: async (_, args) => {
|
|
167
|
-
const { docId, input } = args;
|
|
168
|
-
const doc = await reactor.getDocument(docId);
|
|
169
|
-
if (!doc) {
|
|
170
|
-
throw new Error("Document not found");
|
|
171
|
-
}
|
|
172
|
-
const result = await reactor.addAction(docId, actions.deleteMilestone(input));
|
|
173
|
-
if (result.status !== "SUCCESS") {
|
|
174
|
-
throw new Error(result.error?.message ?? "Failed to deleteMilestone");
|
|
175
|
-
}
|
|
176
|
-
return true;
|
|
177
|
-
},
|
|
178
|
-
PaymentTerms_reorderMilestones: async (_, args) => {
|
|
179
|
-
const { docId, input } = args;
|
|
180
|
-
const doc = await reactor.getDocument(docId);
|
|
181
|
-
if (!doc) {
|
|
182
|
-
throw new Error("Document not found");
|
|
183
|
-
}
|
|
184
|
-
const result = await reactor.addAction(docId, actions.reorderMilestones(input));
|
|
185
|
-
if (result.status !== "SUCCESS") {
|
|
186
|
-
throw new Error(result.error?.message ?? "Failed to reorderMilestones");
|
|
187
|
-
}
|
|
188
|
-
return true;
|
|
189
|
-
},
|
|
190
|
-
PaymentTerms_addBonusClause: async (_, args) => {
|
|
191
|
-
const { docId, input } = args;
|
|
192
|
-
const doc = await reactor.getDocument(docId);
|
|
193
|
-
if (!doc) {
|
|
194
|
-
throw new Error("Document not found");
|
|
195
|
-
}
|
|
196
|
-
const result = await reactor.addAction(docId, actions.addBonusClause(input));
|
|
197
|
-
if (result.status !== "SUCCESS") {
|
|
198
|
-
throw new Error(result.error?.message ?? "Failed to addBonusClause");
|
|
199
|
-
}
|
|
200
|
-
return true;
|
|
201
|
-
},
|
|
202
|
-
PaymentTerms_updateBonusClause: async (_, args) => {
|
|
203
|
-
const { docId, input } = args;
|
|
204
|
-
const doc = await reactor.getDocument(docId);
|
|
205
|
-
if (!doc) {
|
|
206
|
-
throw new Error("Document not found");
|
|
207
|
-
}
|
|
208
|
-
const result = await reactor.addAction(docId, actions.updateBonusClause(input));
|
|
209
|
-
if (result.status !== "SUCCESS") {
|
|
210
|
-
throw new Error(result.error?.message ?? "Failed to updateBonusClause");
|
|
211
|
-
}
|
|
212
|
-
return true;
|
|
213
|
-
},
|
|
214
|
-
PaymentTerms_deleteBonusClause: async (_, args) => {
|
|
215
|
-
const { docId, input } = args;
|
|
216
|
-
const doc = await reactor.getDocument(docId);
|
|
217
|
-
if (!doc) {
|
|
218
|
-
throw new Error("Document not found");
|
|
219
|
-
}
|
|
220
|
-
const result = await reactor.addAction(docId, actions.deleteBonusClause(input));
|
|
221
|
-
if (result.status !== "SUCCESS") {
|
|
222
|
-
throw new Error(result.error?.message ?? "Failed to deleteBonusClause");
|
|
223
|
-
}
|
|
224
|
-
return true;
|
|
225
|
-
},
|
|
226
|
-
PaymentTerms_addPenaltyClause: async (_, args) => {
|
|
227
|
-
const { docId, input } = args;
|
|
228
|
-
const doc = await reactor.getDocument(docId);
|
|
229
|
-
if (!doc) {
|
|
230
|
-
throw new Error("Document not found");
|
|
231
|
-
}
|
|
232
|
-
const result = await reactor.addAction(docId, actions.addPenaltyClause(input));
|
|
233
|
-
if (result.status !== "SUCCESS") {
|
|
234
|
-
throw new Error(result.error?.message ?? "Failed to addPenaltyClause");
|
|
235
|
-
}
|
|
236
|
-
return true;
|
|
237
|
-
},
|
|
238
|
-
PaymentTerms_updatePenaltyClause: async (_, args) => {
|
|
239
|
-
const { docId, input } = args;
|
|
240
|
-
const doc = await reactor.getDocument(docId);
|
|
241
|
-
if (!doc) {
|
|
242
|
-
throw new Error("Document not found");
|
|
243
|
-
}
|
|
244
|
-
const result = await reactor.addAction(docId, actions.updatePenaltyClause(input));
|
|
245
|
-
if (result.status !== "SUCCESS") {
|
|
246
|
-
throw new Error(result.error?.message ?? "Failed to updatePenaltyClause");
|
|
247
|
-
}
|
|
248
|
-
return true;
|
|
249
|
-
},
|
|
250
|
-
PaymentTerms_deletePenaltyClause: async (_, args) => {
|
|
251
|
-
const { docId, input } = args;
|
|
252
|
-
const doc = await reactor.getDocument(docId);
|
|
253
|
-
if (!doc) {
|
|
254
|
-
throw new Error("Document not found");
|
|
255
|
-
}
|
|
256
|
-
const result = await reactor.addAction(docId, actions.deletePenaltyClause(input));
|
|
257
|
-
if (result.status !== "SUCCESS") {
|
|
258
|
-
throw new Error(result.error?.message ?? "Failed to deletePenaltyClause");
|
|
259
|
-
}
|
|
260
|
-
return true;
|
|
261
|
-
},
|
|
262
|
-
},
|
|
263
|
-
};
|
|
264
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../subgraphs/payment-terms/schema.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE5C,eAAO,MAAM,MAAM,EAAE,YAqMpB,CAAC"}
|
|
@@ -1,199 +0,0 @@
|
|
|
1
|
-
import { gql } from "graphql-tag";
|
|
2
|
-
export const schema = gql `
|
|
3
|
-
"""
|
|
4
|
-
Queries: PaymentTerms Document
|
|
5
|
-
"""
|
|
6
|
-
type PaymentTermsQueries {
|
|
7
|
-
getDocument(docId: PHID!, driveId: PHID): PaymentTerms
|
|
8
|
-
getDocuments(driveId: String!): [PaymentTerms!]
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
type Query {
|
|
12
|
-
PaymentTerms: PaymentTermsQueries
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
"""
|
|
16
|
-
Mutations: PaymentTerms
|
|
17
|
-
"""
|
|
18
|
-
type Mutation {
|
|
19
|
-
PaymentTerms_createDocument(name: String!, driveId: String): String
|
|
20
|
-
|
|
21
|
-
PaymentTerms_setBasicTerms(
|
|
22
|
-
driveId: String
|
|
23
|
-
docId: PHID
|
|
24
|
-
input: PaymentTerms_SetBasicTermsInput
|
|
25
|
-
): Int
|
|
26
|
-
PaymentTerms_updateStatus(
|
|
27
|
-
driveId: String
|
|
28
|
-
docId: PHID
|
|
29
|
-
input: PaymentTerms_UpdateStatusInput
|
|
30
|
-
): Int
|
|
31
|
-
PaymentTerms_setTimeAndMaterials(
|
|
32
|
-
driveId: String
|
|
33
|
-
docId: PHID
|
|
34
|
-
input: PaymentTerms_SetTimeAndMaterialsInput
|
|
35
|
-
): Int
|
|
36
|
-
PaymentTerms_setEscrowDetails(
|
|
37
|
-
driveId: String
|
|
38
|
-
docId: PHID
|
|
39
|
-
input: PaymentTerms_SetEscrowDetailsInput
|
|
40
|
-
): Int
|
|
41
|
-
PaymentTerms_setEvaluationTerms(
|
|
42
|
-
driveId: String
|
|
43
|
-
docId: PHID
|
|
44
|
-
input: PaymentTerms_SetEvaluationTermsInput
|
|
45
|
-
): Int
|
|
46
|
-
PaymentTerms_addMilestone(
|
|
47
|
-
driveId: String
|
|
48
|
-
docId: PHID
|
|
49
|
-
input: PaymentTerms_AddMilestoneInput
|
|
50
|
-
): Int
|
|
51
|
-
PaymentTerms_updateMilestone(
|
|
52
|
-
driveId: String
|
|
53
|
-
docId: PHID
|
|
54
|
-
input: PaymentTerms_UpdateMilestoneInput
|
|
55
|
-
): Int
|
|
56
|
-
PaymentTerms_updateMilestoneStatus(
|
|
57
|
-
driveId: String
|
|
58
|
-
docId: PHID
|
|
59
|
-
input: PaymentTerms_UpdateMilestoneStatusInput
|
|
60
|
-
): Int
|
|
61
|
-
PaymentTerms_deleteMilestone(
|
|
62
|
-
driveId: String
|
|
63
|
-
docId: PHID
|
|
64
|
-
input: PaymentTerms_DeleteMilestoneInput
|
|
65
|
-
): Int
|
|
66
|
-
PaymentTerms_reorderMilestones(
|
|
67
|
-
driveId: String
|
|
68
|
-
docId: PHID
|
|
69
|
-
input: PaymentTerms_ReorderMilestonesInput
|
|
70
|
-
): Int
|
|
71
|
-
PaymentTerms_addBonusClause(
|
|
72
|
-
driveId: String
|
|
73
|
-
docId: PHID
|
|
74
|
-
input: PaymentTerms_AddBonusClauseInput
|
|
75
|
-
): Int
|
|
76
|
-
PaymentTerms_updateBonusClause(
|
|
77
|
-
driveId: String
|
|
78
|
-
docId: PHID
|
|
79
|
-
input: PaymentTerms_UpdateBonusClauseInput
|
|
80
|
-
): Int
|
|
81
|
-
PaymentTerms_deleteBonusClause(
|
|
82
|
-
driveId: String
|
|
83
|
-
docId: PHID
|
|
84
|
-
input: PaymentTerms_DeleteBonusClauseInput
|
|
85
|
-
): Int
|
|
86
|
-
PaymentTerms_addPenaltyClause(
|
|
87
|
-
driveId: String
|
|
88
|
-
docId: PHID
|
|
89
|
-
input: PaymentTerms_AddPenaltyClauseInput
|
|
90
|
-
): Int
|
|
91
|
-
PaymentTerms_updatePenaltyClause(
|
|
92
|
-
driveId: String
|
|
93
|
-
docId: PHID
|
|
94
|
-
input: PaymentTerms_UpdatePenaltyClauseInput
|
|
95
|
-
): Int
|
|
96
|
-
PaymentTerms_deletePenaltyClause(
|
|
97
|
-
driveId: String
|
|
98
|
-
docId: PHID
|
|
99
|
-
input: PaymentTerms_DeletePenaltyClauseInput
|
|
100
|
-
): Int
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
"""
|
|
104
|
-
Module: Terms
|
|
105
|
-
"""
|
|
106
|
-
input PaymentTerms_SetBasicTermsInput {
|
|
107
|
-
proposer: String!
|
|
108
|
-
payer: String!
|
|
109
|
-
currency: PaymentTerms_PaymentCurrency!
|
|
110
|
-
paymentModel: PaymentTerms_PaymentModel!
|
|
111
|
-
totalAmount: Amount
|
|
112
|
-
}
|
|
113
|
-
input PaymentTerms_UpdateStatusInput {
|
|
114
|
-
status: PaymentTerms_PaymentTermsStatus!
|
|
115
|
-
}
|
|
116
|
-
input PaymentTerms_SetTimeAndMaterialsInput {
|
|
117
|
-
retainerAmount: Amount
|
|
118
|
-
hourlyRate: Amount
|
|
119
|
-
variableCap: Amount
|
|
120
|
-
billingFrequency: PaymentTerms_BillingFrequency!
|
|
121
|
-
timesheetRequired: Boolean!
|
|
122
|
-
}
|
|
123
|
-
input PaymentTerms_SetEscrowDetailsInput {
|
|
124
|
-
amountHeld: Amount!
|
|
125
|
-
proofOfFundsDocumentId: String
|
|
126
|
-
releaseConditions: String!
|
|
127
|
-
escrowProvider: String
|
|
128
|
-
}
|
|
129
|
-
input PaymentTerms_SetEvaluationTermsInput {
|
|
130
|
-
evaluationFrequency: PaymentTerms_EvaluationFrequency!
|
|
131
|
-
evaluatorTeam: String!
|
|
132
|
-
criteria: [String!]!
|
|
133
|
-
impactsPayout: Boolean!
|
|
134
|
-
impactsReputation: Boolean!
|
|
135
|
-
commentsVisibleToClient: Boolean!
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
"""
|
|
139
|
-
Module: Milestones
|
|
140
|
-
"""
|
|
141
|
-
input PaymentTerms_AddMilestoneInput {
|
|
142
|
-
id: OID!
|
|
143
|
-
name: String!
|
|
144
|
-
amount: Amount!
|
|
145
|
-
expectedCompletionDate: Date
|
|
146
|
-
requiresApproval: Boolean!
|
|
147
|
-
}
|
|
148
|
-
input PaymentTerms_UpdateMilestoneInput {
|
|
149
|
-
id: OID!
|
|
150
|
-
name: String
|
|
151
|
-
amount: Amount
|
|
152
|
-
expectedCompletionDate: Date
|
|
153
|
-
requiresApproval: Boolean
|
|
154
|
-
}
|
|
155
|
-
input PaymentTerms_UpdateMilestoneStatusInput {
|
|
156
|
-
id: OID!
|
|
157
|
-
payoutStatus: PaymentTerms_MilestonePayoutStatus!
|
|
158
|
-
}
|
|
159
|
-
input PaymentTerms_DeleteMilestoneInput {
|
|
160
|
-
id: OID!
|
|
161
|
-
}
|
|
162
|
-
input PaymentTerms_ReorderMilestonesInput {
|
|
163
|
-
order: [OID!]!
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
"""
|
|
167
|
-
Module: Clauses
|
|
168
|
-
"""
|
|
169
|
-
input PaymentTerms_AddBonusClauseInput {
|
|
170
|
-
id: OID!
|
|
171
|
-
condition: String!
|
|
172
|
-
bonusAmount: Amount!
|
|
173
|
-
comment: String
|
|
174
|
-
}
|
|
175
|
-
input PaymentTerms_UpdateBonusClauseInput {
|
|
176
|
-
id: OID!
|
|
177
|
-
condition: String
|
|
178
|
-
bonusAmount: Amount
|
|
179
|
-
comment: String
|
|
180
|
-
}
|
|
181
|
-
input PaymentTerms_DeleteBonusClauseInput {
|
|
182
|
-
id: OID!
|
|
183
|
-
}
|
|
184
|
-
input PaymentTerms_AddPenaltyClauseInput {
|
|
185
|
-
id: OID!
|
|
186
|
-
condition: String!
|
|
187
|
-
deductionAmount: Amount!
|
|
188
|
-
comment: String
|
|
189
|
-
}
|
|
190
|
-
input PaymentTerms_UpdatePenaltyClauseInput {
|
|
191
|
-
id: OID!
|
|
192
|
-
condition: String
|
|
193
|
-
deductionAmount: Amount
|
|
194
|
-
comment: String
|
|
195
|
-
}
|
|
196
|
-
input PaymentTerms_DeletePenaltyClauseInput {
|
|
197
|
-
id: OID!
|
|
198
|
-
}
|
|
199
|
-
`;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { BaseSubgraph } from "@powerhousedao/reactor-api";
|
|
2
|
-
import type { DocumentNode } from "graphql";
|
|
3
|
-
export declare class RequestForProposalsSubgraph extends BaseSubgraph {
|
|
4
|
-
name: string;
|
|
5
|
-
typeDefs: DocumentNode;
|
|
6
|
-
resolvers: Record<string, unknown>;
|
|
7
|
-
additionalContextFields: {};
|
|
8
|
-
onSetup(): Promise<void>;
|
|
9
|
-
onDisconnect(): Promise<void>;
|
|
10
|
-
}
|
|
11
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../subgraphs/request-for-proposals/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAI5C,qBAAa,2BAA4B,SAAQ,YAAY;IAC3D,IAAI,SAA2B;IAC/B,QAAQ,EAAE,YAAY,CAAU;IAChC,SAAS,0BAAsB;IAC/B,uBAAuB,KAAM;IACvB,OAAO;IACP,YAAY;CACnB"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { BaseSubgraph } from "@powerhousedao/reactor-api";
|
|
2
|
-
import { schema } from "./schema.js";
|
|
3
|
-
import { getResolvers } from "./resolvers.js";
|
|
4
|
-
export class RequestForProposalsSubgraph extends BaseSubgraph {
|
|
5
|
-
name = "request-for-proposals";
|
|
6
|
-
typeDefs = schema;
|
|
7
|
-
resolvers = getResolvers(this);
|
|
8
|
-
additionalContextFields = {};
|
|
9
|
-
async onSetup() { }
|
|
10
|
-
async onDisconnect() { }
|
|
11
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"resolvers.d.ts","sourceRoot":"","sources":["../../../subgraphs/request-for-proposals/resolvers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAkB/D,eAAO,MAAM,YAAY,GACvB,UAAU,YAAY,KACrB,MAAM,CAAC,MAAM,EAAE,OAAO,CA0OxB,CAAC"}
|