@contractspec/example.service-business-os 1.56.1 → 1.58.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.
- package/dist/browser/client/client.operations.js +72 -0
- package/dist/browser/client/client.schema.js +31 -0
- package/dist/browser/client/index.js +74 -0
- package/dist/browser/docs/index.js +96 -0
- package/dist/browser/docs/service-business-os.docblock.js +96 -0
- package/dist/browser/entities/index.js +246 -0
- package/dist/browser/events.js +135 -0
- package/dist/browser/example.js +39 -0
- package/dist/browser/handlers/index.js +5 -0
- package/dist/browser/index.js +752 -0
- package/dist/browser/invoice/index.js +77 -0
- package/dist/browser/invoice/invoice.operations.js +75 -0
- package/dist/browser/invoice/invoice.schema.js +34 -0
- package/dist/browser/job/index.js +175 -0
- package/dist/browser/job/job.operations.js +172 -0
- package/dist/browser/job/job.schema.js +41 -0
- package/dist/browser/operations/index.js +506 -0
- package/dist/browser/payment/index.js +69 -0
- package/dist/browser/payment/payment.operations.js +67 -0
- package/dist/browser/payment/payment.schema.js +30 -0
- package/dist/browser/presentations/index.js +13 -0
- package/dist/browser/presentations.js +172 -0
- package/dist/browser/quote/index.js +122 -0
- package/dist/browser/quote/quote.operations.js +119 -0
- package/dist/browser/quote/quote.schema.js +45 -0
- package/dist/browser/service-business-os.capability.js +28 -0
- package/dist/browser/service.feature.js +74 -0
- package/dist/client/client.operations.d.ts +54 -60
- package/dist/client/client.operations.d.ts.map +1 -1
- package/dist/client/client.operations.js +71 -51
- package/dist/client/client.schema.d.ts +54 -59
- package/dist/client/client.schema.d.ts.map +1 -1
- package/dist/client/client.schema.js +30 -75
- package/dist/client/index.d.ts +6 -3
- package/dist/client/index.d.ts.map +1 -0
- package/dist/client/index.js +74 -3
- package/dist/docs/index.d.ts +2 -1
- package/dist/docs/index.d.ts.map +1 -0
- package/dist/docs/index.js +97 -1
- package/dist/docs/service-business-os.docblock.d.ts +2 -1
- package/dist/docs/service-business-os.docblock.d.ts.map +1 -0
- package/dist/docs/service-business-os.docblock.js +52 -64
- package/dist/entities/index.d.ts +156 -161
- package/dist/entities/index.d.ts.map +1 -1
- package/dist/entities/index.js +236 -278
- package/dist/events.d.ts +253 -259
- package/dist/events.d.ts.map +1 -1
- package/dist/events.js +123 -217
- package/dist/example.d.ts +2 -6
- package/dist/example.d.ts.map +1 -1
- package/dist/example.js +37 -50
- package/dist/handlers/index.d.ts +11 -16
- package/dist/handlers/index.d.ts.map +1 -1
- package/dist/handlers/index.js +5 -5
- package/dist/index.d.ts +13 -18
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +752 -18
- package/dist/invoice/index.d.ts +6 -3
- package/dist/invoice/index.d.ts.map +1 -0
- package/dist/invoice/index.js +77 -3
- package/dist/invoice/invoice.operations.d.ts +54 -60
- package/dist/invoice/invoice.operations.d.ts.map +1 -1
- package/dist/invoice/invoice.operations.js +74 -55
- package/dist/invoice/invoice.schema.d.ts +54 -59
- package/dist/invoice/invoice.schema.d.ts.map +1 -1
- package/dist/invoice/invoice.schema.js +33 -75
- package/dist/job/index.d.ts +6 -3
- package/dist/job/index.d.ts.map +1 -0
- package/dist/job/index.js +175 -3
- package/dist/job/job.operations.d.ts +220 -226
- package/dist/job/job.operations.d.ts.map +1 -1
- package/dist/job/job.operations.js +167 -169
- package/dist/job/job.schema.d.ts +67 -72
- package/dist/job/job.schema.d.ts.map +1 -1
- package/dist/job/job.schema.js +39 -95
- package/dist/node/client/client.operations.js +72 -0
- package/dist/node/client/client.schema.js +31 -0
- package/dist/node/client/index.js +74 -0
- package/dist/node/docs/index.js +96 -0
- package/dist/node/docs/service-business-os.docblock.js +96 -0
- package/dist/node/entities/index.js +246 -0
- package/dist/node/events.js +135 -0
- package/dist/node/example.js +39 -0
- package/dist/node/handlers/index.js +5 -0
- package/dist/node/index.js +752 -0
- package/dist/node/invoice/index.js +77 -0
- package/dist/node/invoice/invoice.operations.js +75 -0
- package/dist/node/invoice/invoice.schema.js +34 -0
- package/dist/node/job/index.js +175 -0
- package/dist/node/job/job.operations.js +172 -0
- package/dist/node/job/job.schema.js +41 -0
- package/dist/node/operations/index.js +506 -0
- package/dist/node/payment/index.js +69 -0
- package/dist/node/payment/payment.operations.js +67 -0
- package/dist/node/payment/payment.schema.js +30 -0
- package/dist/node/presentations/index.js +13 -0
- package/dist/node/presentations.js +172 -0
- package/dist/node/quote/index.js +122 -0
- package/dist/node/quote/quote.operations.js +119 -0
- package/dist/node/quote/quote.schema.js +45 -0
- package/dist/node/service-business-os.capability.js +28 -0
- package/dist/node/service.feature.js +74 -0
- package/dist/operations/index.d.ts +6 -16
- package/dist/operations/index.d.ts.map +1 -0
- package/dist/operations/index.js +506 -16
- package/dist/payment/index.d.ts +6 -3
- package/dist/payment/index.d.ts.map +1 -0
- package/dist/payment/index.js +69 -3
- package/dist/payment/payment.operations.d.ts +50 -56
- package/dist/payment/payment.operations.d.ts.map +1 -1
- package/dist/payment/payment.operations.js +66 -51
- package/dist/payment/payment.schema.d.ts +50 -55
- package/dist/payment/payment.schema.d.ts.map +1 -1
- package/dist/payment/payment.schema.js +29 -71
- package/dist/presentations/index.d.ts +1 -4
- package/dist/presentations/index.d.ts.map +1 -1
- package/dist/presentations/index.js +13 -17
- package/dist/presentations.d.ts +7 -12
- package/dist/presentations.d.ts.map +1 -1
- package/dist/presentations.js +166 -172
- package/dist/quote/index.d.ts +6 -3
- package/dist/quote/index.d.ts.map +1 -0
- package/dist/quote/index.js +122 -3
- package/dist/quote/quote.operations.d.ts +120 -126
- package/dist/quote/quote.operations.d.ts.map +1 -1
- package/dist/quote/quote.operations.js +117 -96
- package/dist/quote/quote.schema.d.ts +83 -88
- package/dist/quote/quote.schema.d.ts.map +1 -1
- package/dist/quote/quote.schema.js +43 -111
- package/dist/service-business-os.capability.d.ts +2 -7
- package/dist/service-business-os.capability.d.ts.map +1 -1
- package/dist/service-business-os.capability.js +29 -29
- package/dist/service.feature.d.ts +1 -6
- package/dist/service.feature.d.ts.map +1 -1
- package/dist/service.feature.js +73 -164
- package/package.json +301 -64
- package/dist/client/client.operations.js.map +0 -1
- package/dist/client/client.schema.js.map +0 -1
- package/dist/docs/service-business-os.docblock.js.map +0 -1
- package/dist/entities/index.js.map +0 -1
- package/dist/events.js.map +0 -1
- package/dist/example.js.map +0 -1
- package/dist/handlers/index.js.map +0 -1
- package/dist/invoice/invoice.operations.js.map +0 -1
- package/dist/invoice/invoice.schema.js.map +0 -1
- package/dist/job/job.operations.js.map +0 -1
- package/dist/job/job.schema.js.map +0 -1
- package/dist/payment/payment.operations.js.map +0 -1
- package/dist/payment/payment.schema.js.map +0 -1
- package/dist/presentations/index.js.map +0 -1
- package/dist/presentations.js.map +0 -1
- package/dist/quote/quote.operations.js.map +0 -1
- package/dist/quote/quote.schema.js.map +0 -1
- package/dist/service-business-os.capability.js.map +0 -1
- package/dist/service.feature.js.map +0 -1
|
@@ -1,61 +1,55 @@
|
|
|
1
|
-
import * as _contractspec_lib_schema384 from "@contractspec/lib.schema";
|
|
2
|
-
import * as _contractspec_lib_contracts27 from "@contractspec/lib.contracts";
|
|
3
|
-
|
|
4
|
-
//#region src/payment/payment.operations.d.ts
|
|
5
1
|
/**
|
|
6
2
|
* Record a payment.
|
|
7
3
|
*/
|
|
8
|
-
declare const RecordPaymentContract:
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
}>,
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
4
|
+
export declare const RecordPaymentContract: import("@contractspec/lib.contracts").OperationSpec<import("@contractspec/lib.schema").SchemaModel<{
|
|
5
|
+
invoiceId: {
|
|
6
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
7
|
+
isOptional: false;
|
|
8
|
+
};
|
|
9
|
+
amount: {
|
|
10
|
+
type: import("@contractspec/lib.schema").FieldType<number, number>;
|
|
11
|
+
isOptional: false;
|
|
12
|
+
};
|
|
13
|
+
method: {
|
|
14
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
15
|
+
isOptional: false;
|
|
16
|
+
};
|
|
17
|
+
reference: {
|
|
18
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
19
|
+
isOptional: true;
|
|
20
|
+
};
|
|
21
|
+
receivedAt: {
|
|
22
|
+
type: import("@contractspec/lib.schema").FieldType<Date, string>;
|
|
23
|
+
isOptional: true;
|
|
24
|
+
};
|
|
25
|
+
}>, import("@contractspec/lib.schema").SchemaModel<{
|
|
26
|
+
id: {
|
|
27
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
28
|
+
isOptional: false;
|
|
29
|
+
};
|
|
30
|
+
invoiceId: {
|
|
31
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
32
|
+
isOptional: false;
|
|
33
|
+
};
|
|
34
|
+
amount: {
|
|
35
|
+
type: import("@contractspec/lib.schema").FieldType<number, number>;
|
|
36
|
+
isOptional: false;
|
|
37
|
+
};
|
|
38
|
+
currency: {
|
|
39
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
40
|
+
isOptional: false;
|
|
41
|
+
};
|
|
42
|
+
method: {
|
|
43
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
44
|
+
isOptional: false;
|
|
45
|
+
};
|
|
46
|
+
reference: {
|
|
47
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
48
|
+
isOptional: true;
|
|
49
|
+
};
|
|
50
|
+
receivedAt: {
|
|
51
|
+
type: import("@contractspec/lib.schema").FieldType<Date, string>;
|
|
52
|
+
isOptional: false;
|
|
53
|
+
};
|
|
58
54
|
}>, undefined>;
|
|
59
|
-
//#endregion
|
|
60
|
-
export { RecordPaymentContract };
|
|
61
55
|
//# sourceMappingURL=payment.operations.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"payment.operations.d.ts","
|
|
1
|
+
{"version":3,"file":"payment.operations.d.ts","sourceRoot":"","sources":["../../src/payment/payment.operations.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAiChC,CAAC"}
|
|
@@ -1,53 +1,68 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
},
|
|
28
|
-
policy: { auth: "user" },
|
|
29
|
-
acceptance: {
|
|
30
|
-
scenarios: [{
|
|
31
|
-
key: "record-payment-happy-path",
|
|
32
|
-
given: ["Invoice exists"],
|
|
33
|
-
when: ["User records payment"],
|
|
34
|
-
then: ["Payment is recorded"]
|
|
35
|
-
}],
|
|
36
|
-
examples: [{
|
|
37
|
-
key: "record-check",
|
|
38
|
-
input: {
|
|
39
|
-
invoiceId: "inv-456",
|
|
40
|
-
amount: 100,
|
|
41
|
-
method: "check"
|
|
42
|
-
},
|
|
43
|
-
output: {
|
|
44
|
-
id: "pay-123",
|
|
45
|
-
status: "completed"
|
|
46
|
-
}
|
|
47
|
-
}]
|
|
48
|
-
}
|
|
1
|
+
// @bun
|
|
2
|
+
// src/payment/payment.schema.ts
|
|
3
|
+
import { defineSchemaModel, ScalarTypeEnum } from "@contractspec/lib.schema";
|
|
4
|
+
var PaymentModel = defineSchemaModel({
|
|
5
|
+
name: "Payment",
|
|
6
|
+
description: "Payment applied to invoice",
|
|
7
|
+
fields: {
|
|
8
|
+
id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
9
|
+
invoiceId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
10
|
+
amount: { type: ScalarTypeEnum.Float_unsecure(), isOptional: false },
|
|
11
|
+
currency: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
12
|
+
method: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
13
|
+
reference: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
|
|
14
|
+
receivedAt: { type: ScalarTypeEnum.DateTime(), isOptional: false }
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
var RecordPaymentInputModel = defineSchemaModel({
|
|
18
|
+
name: "RecordPaymentInput",
|
|
19
|
+
description: "Input for recording a payment",
|
|
20
|
+
fields: {
|
|
21
|
+
invoiceId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
22
|
+
amount: { type: ScalarTypeEnum.Float_unsecure(), isOptional: false },
|
|
23
|
+
method: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
24
|
+
reference: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
|
|
25
|
+
receivedAt: { type: ScalarTypeEnum.DateTime(), isOptional: true }
|
|
26
|
+
}
|
|
49
27
|
});
|
|
50
28
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
29
|
+
// src/payment/payment.operations.ts
|
|
30
|
+
import { defineCommand } from "@contractspec/lib.contracts";
|
|
31
|
+
var OWNERS = ["@examples.service-business-os"];
|
|
32
|
+
var RecordPaymentContract = defineCommand({
|
|
33
|
+
meta: {
|
|
34
|
+
key: "service.payment.record",
|
|
35
|
+
version: "1.0.0",
|
|
36
|
+
stability: "stable",
|
|
37
|
+
owners: [...OWNERS],
|
|
38
|
+
tags: ["service-business-os", "payment", "record"],
|
|
39
|
+
description: "Record a payment.",
|
|
40
|
+
goal: "Track payments.",
|
|
41
|
+
context: "Billing."
|
|
42
|
+
},
|
|
43
|
+
io: {
|
|
44
|
+
input: RecordPaymentInputModel,
|
|
45
|
+
output: PaymentModel
|
|
46
|
+
},
|
|
47
|
+
policy: { auth: "user" },
|
|
48
|
+
acceptance: {
|
|
49
|
+
scenarios: [
|
|
50
|
+
{
|
|
51
|
+
key: "record-payment-happy-path",
|
|
52
|
+
given: ["Invoice exists"],
|
|
53
|
+
when: ["User records payment"],
|
|
54
|
+
then: ["Payment is recorded"]
|
|
55
|
+
}
|
|
56
|
+
],
|
|
57
|
+
examples: [
|
|
58
|
+
{
|
|
59
|
+
key: "record-check",
|
|
60
|
+
input: { invoiceId: "inv-456", amount: 100, method: "check" },
|
|
61
|
+
output: { id: "pay-123", status: "completed" }
|
|
62
|
+
}
|
|
63
|
+
]
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
export {
|
|
67
|
+
RecordPaymentContract
|
|
68
|
+
};
|
|
@@ -1,64 +1,59 @@
|
|
|
1
|
-
import * as _contractspec_lib_schema417 from "@contractspec/lib.schema";
|
|
2
|
-
|
|
3
|
-
//#region src/payment/payment.schema.d.ts
|
|
4
1
|
/**
|
|
5
2
|
* Payment applied to invoice.
|
|
6
3
|
*/
|
|
7
|
-
declare const PaymentModel:
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
4
|
+
export declare const PaymentModel: import("@contractspec/lib.schema").SchemaModel<{
|
|
5
|
+
id: {
|
|
6
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
7
|
+
isOptional: false;
|
|
8
|
+
};
|
|
9
|
+
invoiceId: {
|
|
10
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
11
|
+
isOptional: false;
|
|
12
|
+
};
|
|
13
|
+
amount: {
|
|
14
|
+
type: import("@contractspec/lib.schema").FieldType<number, number>;
|
|
15
|
+
isOptional: false;
|
|
16
|
+
};
|
|
17
|
+
currency: {
|
|
18
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
19
|
+
isOptional: false;
|
|
20
|
+
};
|
|
21
|
+
method: {
|
|
22
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
23
|
+
isOptional: false;
|
|
24
|
+
};
|
|
25
|
+
reference: {
|
|
26
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
27
|
+
isOptional: true;
|
|
28
|
+
};
|
|
29
|
+
receivedAt: {
|
|
30
|
+
type: import("@contractspec/lib.schema").FieldType<Date, string>;
|
|
31
|
+
isOptional: false;
|
|
32
|
+
};
|
|
36
33
|
}>;
|
|
37
34
|
/**
|
|
38
35
|
* Input for recording a payment.
|
|
39
36
|
*/
|
|
40
|
-
declare const RecordPaymentInputModel:
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
37
|
+
export declare const RecordPaymentInputModel: import("@contractspec/lib.schema").SchemaModel<{
|
|
38
|
+
invoiceId: {
|
|
39
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
40
|
+
isOptional: false;
|
|
41
|
+
};
|
|
42
|
+
amount: {
|
|
43
|
+
type: import("@contractspec/lib.schema").FieldType<number, number>;
|
|
44
|
+
isOptional: false;
|
|
45
|
+
};
|
|
46
|
+
method: {
|
|
47
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
48
|
+
isOptional: false;
|
|
49
|
+
};
|
|
50
|
+
reference: {
|
|
51
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
52
|
+
isOptional: true;
|
|
53
|
+
};
|
|
54
|
+
receivedAt: {
|
|
55
|
+
type: import("@contractspec/lib.schema").FieldType<Date, string>;
|
|
56
|
+
isOptional: true;
|
|
57
|
+
};
|
|
61
58
|
}>;
|
|
62
|
-
//#endregion
|
|
63
|
-
export { PaymentModel, RecordPaymentInputModel };
|
|
64
59
|
//# sourceMappingURL=payment.schema.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"payment.schema.d.ts","
|
|
1
|
+
{"version":3,"file":"payment.schema.d.ts","sourceRoot":"","sources":["../../src/payment/payment.schema.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAYvB,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;EAUlC,CAAC"}
|
|
@@ -1,73 +1,31 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
17
|
-
isOptional: false
|
|
18
|
-
},
|
|
19
|
-
amount: {
|
|
20
|
-
type: ScalarTypeEnum.Float_unsecure(),
|
|
21
|
-
isOptional: false
|
|
22
|
-
},
|
|
23
|
-
currency: {
|
|
24
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
25
|
-
isOptional: false
|
|
26
|
-
},
|
|
27
|
-
method: {
|
|
28
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
29
|
-
isOptional: false
|
|
30
|
-
},
|
|
31
|
-
reference: {
|
|
32
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
33
|
-
isOptional: true
|
|
34
|
-
},
|
|
35
|
-
receivedAt: {
|
|
36
|
-
type: ScalarTypeEnum.DateTime(),
|
|
37
|
-
isOptional: false
|
|
38
|
-
}
|
|
39
|
-
}
|
|
1
|
+
// @bun
|
|
2
|
+
// src/payment/payment.schema.ts
|
|
3
|
+
import { defineSchemaModel, ScalarTypeEnum } from "@contractspec/lib.schema";
|
|
4
|
+
var PaymentModel = defineSchemaModel({
|
|
5
|
+
name: "Payment",
|
|
6
|
+
description: "Payment applied to invoice",
|
|
7
|
+
fields: {
|
|
8
|
+
id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
9
|
+
invoiceId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
10
|
+
amount: { type: ScalarTypeEnum.Float_unsecure(), isOptional: false },
|
|
11
|
+
currency: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
12
|
+
method: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
13
|
+
reference: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
|
|
14
|
+
receivedAt: { type: ScalarTypeEnum.DateTime(), isOptional: false }
|
|
15
|
+
}
|
|
40
16
|
});
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
},
|
|
52
|
-
amount: {
|
|
53
|
-
type: ScalarTypeEnum.Float_unsecure(),
|
|
54
|
-
isOptional: false
|
|
55
|
-
},
|
|
56
|
-
method: {
|
|
57
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
58
|
-
isOptional: false
|
|
59
|
-
},
|
|
60
|
-
reference: {
|
|
61
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
62
|
-
isOptional: true
|
|
63
|
-
},
|
|
64
|
-
receivedAt: {
|
|
65
|
-
type: ScalarTypeEnum.DateTime(),
|
|
66
|
-
isOptional: true
|
|
67
|
-
}
|
|
68
|
-
}
|
|
17
|
+
var RecordPaymentInputModel = defineSchemaModel({
|
|
18
|
+
name: "RecordPaymentInput",
|
|
19
|
+
description: "Input for recording a payment",
|
|
20
|
+
fields: {
|
|
21
|
+
invoiceId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
22
|
+
amount: { type: ScalarTypeEnum.Float_unsecure(), isOptional: false },
|
|
23
|
+
method: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
24
|
+
reference: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
|
|
25
|
+
receivedAt: { type: ScalarTypeEnum.DateTime(), isOptional: true }
|
|
26
|
+
}
|
|
69
27
|
});
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
28
|
+
export {
|
|
29
|
+
RecordPaymentInputModel,
|
|
30
|
+
PaymentModel
|
|
31
|
+
};
|
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
//#region src/presentations/index.d.ts
|
|
2
1
|
/**
|
|
3
2
|
* Presentation descriptors for Service Business OS.
|
|
4
3
|
* These names map to renderers in Studio (react/markdown) to keep specs multi-surface.
|
|
5
4
|
*/
|
|
6
|
-
declare const ServiceBusinessPresentations: string[];
|
|
7
|
-
//#endregion
|
|
8
|
-
export { ServiceBusinessPresentations };
|
|
5
|
+
export declare const ServiceBusinessPresentations: string[];
|
|
9
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/presentations/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,4BAA4B,UAQxC,CAAC"}
|
|
@@ -1,18 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
"service-business-os.job.board",
|
|
12
|
-
"service-business-os.invoice.list",
|
|
13
|
-
"service-business-os.payment.list"
|
|
1
|
+
// @bun
|
|
2
|
+
// src/presentations/index.ts
|
|
3
|
+
var ServiceBusinessPresentations = [
|
|
4
|
+
"service-business-os.dashboard",
|
|
5
|
+
"service-business-os.client.list",
|
|
6
|
+
"service-business-os.quote.list",
|
|
7
|
+
"service-business-os.quote.detail",
|
|
8
|
+
"service-business-os.job.board",
|
|
9
|
+
"service-business-os.invoice.list",
|
|
10
|
+
"service-business-os.payment.list"
|
|
14
11
|
];
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
//# sourceMappingURL=index.js.map
|
|
12
|
+
export {
|
|
13
|
+
ServiceBusinessPresentations
|
|
14
|
+
};
|
package/dist/presentations.d.ts
CHANGED
|
@@ -1,13 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
declare const
|
|
5
|
-
declare const
|
|
6
|
-
declare const
|
|
7
|
-
declare const
|
|
8
|
-
declare const JobBoardPresentation: _contractspec_lib_contracts12.PresentationSpec;
|
|
9
|
-
declare const InvoiceListPresentation: _contractspec_lib_contracts12.PresentationSpec;
|
|
10
|
-
declare const PaymentListPresentation: _contractspec_lib_contracts12.PresentationSpec;
|
|
11
|
-
//#endregion
|
|
12
|
-
export { ClientListPresentation, InvoiceListPresentation, JobBoardPresentation, PaymentListPresentation, QuoteDetailPresentation, QuoteListPresentation, ServiceDashboardPresentation };
|
|
1
|
+
export declare const ServiceDashboardPresentation: import("@contractspec/lib.contracts").PresentationSpec;
|
|
2
|
+
export declare const ClientListPresentation: import("@contractspec/lib.contracts").PresentationSpec;
|
|
3
|
+
export declare const QuoteListPresentation: import("@contractspec/lib.contracts").PresentationSpec;
|
|
4
|
+
export declare const QuoteDetailPresentation: import("@contractspec/lib.contracts").PresentationSpec;
|
|
5
|
+
export declare const JobBoardPresentation: import("@contractspec/lib.contracts").PresentationSpec;
|
|
6
|
+
export declare const InvoiceListPresentation: import("@contractspec/lib.contracts").PresentationSpec;
|
|
7
|
+
export declare const PaymentListPresentation: import("@contractspec/lib.contracts").PresentationSpec;
|
|
13
8
|
//# sourceMappingURL=presentations.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"presentations.d.ts","
|
|
1
|
+
{"version":3,"file":"presentations.d.ts","sourceRoot":"","sources":["../src/presentations.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,4BAA4B,wDAsBvC,CAAC;AAEH,eAAO,MAAM,sBAAsB,wDAsBjC,CAAC;AAEH,eAAO,MAAM,qBAAqB,wDAsBhC,CAAC;AAEH,eAAO,MAAM,uBAAuB,wDAsBlC,CAAC;AAEH,eAAO,MAAM,oBAAoB,wDAsB/B,CAAC;AAEH,eAAO,MAAM,uBAAuB,wDAsBlC,CAAC;AAEH,eAAO,MAAM,uBAAuB,wDAsBlC,CAAC"}
|