@sneat/extension-splitus-contract 0.0.1

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/README.md ADDED
@@ -0,0 +1,8 @@
1
+ # @sneat/extension-splitus-contract
2
+
3
+ The `contract` tier of the **splitus** extension (extension library-architecture
4
+ convention). See the repo root `README.md` → Frontend for the tier table.
5
+
6
+ ## Running unit tests
7
+
8
+ Run `npx nx test extension-splitus-contract` to execute the unit tests.
@@ -0,0 +1,10 @@
1
+ import { InjectionToken } from '@angular/core';
2
+
3
+ const SPLITUS_SERVICE = new InjectionToken('SplitusService');
4
+
5
+ /**
6
+ * Generated bundle index. Do not edit.
7
+ */
8
+
9
+ export { SPLITUS_SERVICE };
10
+ //# sourceMappingURL=sneat-extension-splitus-contract.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sneat-extension-splitus-contract.mjs","sources":["../../../../../../libs/extensions/splitus/contract/src/lib/services/splitus-service.ts","../../../../../../libs/extensions/splitus/contract/src/sneat-extension-splitus-contract.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\nimport { Observable } from 'rxjs';\n\nexport type CurrencyCode = 'EUR' | 'USD';\n\nexport interface ICreateSplitRecordRequest {\n spaceID: string;\n contactID: string;\n currency: CurrencyCode;\n amount: number;\n}\n\n// ISplitusService is the runtime-light contract the splitus components depend on.\n// Members mirror the concrete SplitusService's public surface exactly; the\n// implementation lives in the -internal lib and is provided via the\n// SPLITUS_SERVICE token below.\nexport interface ISplitusService {\n createSplitRecord(request: ICreateSplitRecordRequest): Observable<string>;\n}\n\nexport const SPLITUS_SERVICE = new InjectionToken<ISplitusService>('SplitusService');\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;MAoBa,eAAe,GAAG,IAAI,cAAc,CAAkB,gBAAgB;;ACpBnF;;AAEG;;;;"}
package/package.json ADDED
@@ -0,0 +1,27 @@
1
+ {
2
+ "name": "@sneat/extension-splitus-contract",
3
+ "version": "0.0.1",
4
+ "peerDependencies": {
5
+ "@angular/core": "^21.0.0",
6
+ "rxjs": "^7.0.0"
7
+ },
8
+ "sideEffects": false,
9
+ "publishConfig": {
10
+ "access": "public"
11
+ },
12
+ "module": "fesm2022/sneat-extension-splitus-contract.mjs",
13
+ "typings": "types/sneat-extension-splitus-contract.d.ts",
14
+ "exports": {
15
+ "./package.json": {
16
+ "default": "./package.json"
17
+ },
18
+ ".": {
19
+ "types": "./types/sneat-extension-splitus-contract.d.ts",
20
+ "default": "./fesm2022/sneat-extension-splitus-contract.mjs"
21
+ }
22
+ },
23
+ "type": "module",
24
+ "dependencies": {
25
+ "tslib": "^2.3.0"
26
+ }
27
+ }
@@ -0,0 +1,17 @@
1
+ import { InjectionToken } from '@angular/core';
2
+ import { Observable } from 'rxjs';
3
+
4
+ type CurrencyCode = 'EUR' | 'USD';
5
+ interface ICreateSplitRecordRequest {
6
+ spaceID: string;
7
+ contactID: string;
8
+ currency: CurrencyCode;
9
+ amount: number;
10
+ }
11
+ interface ISplitusService {
12
+ createSplitRecord(request: ICreateSplitRecordRequest): Observable<string>;
13
+ }
14
+ declare const SPLITUS_SERVICE: InjectionToken<ISplitusService>;
15
+
16
+ export { SPLITUS_SERVICE };
17
+ export type { CurrencyCode, ICreateSplitRecordRequest, ISplitusService };