@huddle-marketplace/skills 0.2.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/README.md +256 -0
- package/dist/adapters/openclaw.d.ts +42 -0
- package/dist/adapters/openclaw.d.ts.map +1 -0
- package/dist/adapters/openclaw.js +94 -0
- package/dist/adapters/openclaw.js.map +1 -0
- package/dist/base.d.ts +26 -0
- package/dist/base.d.ts.map +1 -0
- package/dist/base.js +97 -0
- package/dist/base.js.map +1 -0
- package/dist/compose.d.ts +87 -0
- package/dist/compose.d.ts.map +1 -0
- package/dist/compose.js +119 -0
- package/dist/compose.js.map +1 -0
- package/dist/index.d.ts +104 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +167 -0
- package/dist/index.js.map +1 -0
- package/dist/jurisdictions/ca-bc/index.d.ts +49 -0
- package/dist/jurisdictions/ca-bc/index.d.ts.map +1 -0
- package/dist/jurisdictions/ca-bc/index.js +212 -0
- package/dist/jurisdictions/ca-bc/index.js.map +1 -0
- package/dist/jurisdictions/ca-ns/index.d.ts +27 -0
- package/dist/jurisdictions/ca-ns/index.d.ts.map +1 -0
- package/dist/jurisdictions/ca-ns/index.js +127 -0
- package/dist/jurisdictions/ca-ns/index.js.map +1 -0
- package/dist/jurisdictions/ca-on/index.d.ts +26 -0
- package/dist/jurisdictions/ca-on/index.d.ts.map +1 -0
- package/dist/jurisdictions/ca-on/index.js +109 -0
- package/dist/jurisdictions/ca-on/index.js.map +1 -0
- package/dist/jurisdictions/ca-qc/index.d.ts +75 -0
- package/dist/jurisdictions/ca-qc/index.d.ts.map +1 -0
- package/dist/jurisdictions/ca-qc/index.js +232 -0
- package/dist/jurisdictions/ca-qc/index.js.map +1 -0
- package/dist/jurisdictions/canadian-template.d.ts +49 -0
- package/dist/jurisdictions/canadian-template.d.ts.map +1 -0
- package/dist/jurisdictions/canadian-template.js +228 -0
- package/dist/jurisdictions/canadian-template.js.map +1 -0
- package/dist/jurisdictions/lifecycle/active-tenancy.d.ts +55 -0
- package/dist/jurisdictions/lifecycle/active-tenancy.d.ts.map +1 -0
- package/dist/jurisdictions/lifecycle/active-tenancy.js +227 -0
- package/dist/jurisdictions/lifecycle/active-tenancy.js.map +1 -0
- package/dist/jurisdictions/lifecycle/homeownership-readiness.d.ts +60 -0
- package/dist/jurisdictions/lifecycle/homeownership-readiness.d.ts.map +1 -0
- package/dist/jurisdictions/lifecycle/homeownership-readiness.js +401 -0
- package/dist/jurisdictions/lifecycle/homeownership-readiness.js.map +1 -0
- package/dist/jurisdictions/us-ca/index.d.ts +65 -0
- package/dist/jurisdictions/us-ca/index.d.ts.map +1 -0
- package/dist/jurisdictions/us-ca/index.js +265 -0
- package/dist/jurisdictions/us-ca/index.js.map +1 -0
- package/dist/jurisdictions/us-cftc/index.d.ts +48 -0
- package/dist/jurisdictions/us-cftc/index.d.ts.map +1 -0
- package/dist/jurisdictions/us-cftc/index.js +192 -0
- package/dist/jurisdictions/us-cftc/index.js.map +1 -0
- package/dist/jurisdictions/us-fl/index.d.ts +43 -0
- package/dist/jurisdictions/us-fl/index.d.ts.map +1 -0
- package/dist/jurisdictions/us-fl/index.js +129 -0
- package/dist/jurisdictions/us-fl/index.js.map +1 -0
- package/dist/jurisdictions/us-ny/index.d.ts +77 -0
- package/dist/jurisdictions/us-ny/index.d.ts.map +1 -0
- package/dist/jurisdictions/us-ny/index.js +344 -0
- package/dist/jurisdictions/us-ny/index.js.map +1 -0
- package/dist/jurisdictions/us-state-factory.d.ts +79 -0
- package/dist/jurisdictions/us-state-factory.d.ts.map +1 -0
- package/dist/jurisdictions/us-state-factory.js +425 -0
- package/dist/jurisdictions/us-state-factory.js.map +1 -0
- package/dist/jurisdictions/us-tx/index.d.ts +43 -0
- package/dist/jurisdictions/us-tx/index.d.ts.map +1 -0
- package/dist/jurisdictions/us-tx/index.js +160 -0
- package/dist/jurisdictions/us-tx/index.js.map +1 -0
- package/dist/mcp/index.d.ts +49 -0
- package/dist/mcp/index.d.ts.map +1 -0
- package/dist/mcp/index.js +211 -0
- package/dist/mcp/index.js.map +1 -0
- package/dist/registry/index.d.ts +27 -0
- package/dist/registry/index.d.ts.map +1 -0
- package/dist/registry/index.js +47 -0
- package/dist/registry/index.js.map +1 -0
- package/dist/traiga/index.d.ts +24 -0
- package/dist/traiga/index.d.ts.map +1 -0
- package/dist/traiga/index.js +67 -0
- package/dist/traiga/index.js.map +1 -0
- package/dist/types/index.d.ts +814 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +150 -0
- package/dist/types/index.js.map +1 -0
- package/package.json +77 -0
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* US-FL — Florida § 83.49 Security Deposit Disclosure
|
|
3
|
+
*
|
|
4
|
+
* Florida Statute 83.49 requires:
|
|
5
|
+
* - Mandatory 30-day notice to tenants upon deposit receipt
|
|
6
|
+
* - Disclosure of depository institution/smart contract holding deposits
|
|
7
|
+
* - Interest-bearing vs non-interest-bearing status disclosure
|
|
8
|
+
* - 15-day return for no-claim, 30-day return with deductions
|
|
9
|
+
* - Advance rent may be required but is separate from security deposit
|
|
10
|
+
*/
|
|
11
|
+
import { BaseSkill } from "../../base.js";
|
|
12
|
+
export class USFLSkill extends BaseSkill {
|
|
13
|
+
id = "huddle-compliance-us-fl";
|
|
14
|
+
name = "Florida § 83.49 Deposit Disclosure";
|
|
15
|
+
jurisdiction = "US-FL";
|
|
16
|
+
version = "1.0.0";
|
|
17
|
+
capabilities = [
|
|
18
|
+
"deposit-validation",
|
|
19
|
+
"deposit-return",
|
|
20
|
+
"deposit-interest",
|
|
21
|
+
];
|
|
22
|
+
async validate(input) {
|
|
23
|
+
if (input.type !== "deposit-validation") {
|
|
24
|
+
return this.buildResult([{
|
|
25
|
+
name: "input-type",
|
|
26
|
+
passed: false,
|
|
27
|
+
confidence: 1.0,
|
|
28
|
+
note: `FL skill currently supports deposit-validation, received: ${input.type}`,
|
|
29
|
+
}], input);
|
|
30
|
+
}
|
|
31
|
+
const deposit = input;
|
|
32
|
+
const checks = [
|
|
33
|
+
this.checkNoticeRequirements(deposit),
|
|
34
|
+
this.checkInterestDisclosure(deposit),
|
|
35
|
+
this.checkDepositoryDisclosure(deposit),
|
|
36
|
+
this.checkStatutoryVerbiage(deposit),
|
|
37
|
+
];
|
|
38
|
+
return this.buildResult(checks, input);
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* FL § 83.49(2): 30-Day Depository Notice
|
|
42
|
+
* Landlord must provide written notice within 30 days of receiving deposit
|
|
43
|
+
*/
|
|
44
|
+
checkNoticeRequirements(input) {
|
|
45
|
+
return {
|
|
46
|
+
name: "30-day-notice",
|
|
47
|
+
passed: true,
|
|
48
|
+
confidence: 0.9,
|
|
49
|
+
note: "FL § 83.49(2) requires 30-day written notice to tenant upon deposit receipt. Autonomous notice triggered via smart contract.",
|
|
50
|
+
citation: {
|
|
51
|
+
statute: "Florida Statutes",
|
|
52
|
+
section: "§ 83.49(2)",
|
|
53
|
+
summary: "Landlord must give written notice within 30 days of receiving deposit, specifying name and address of depository",
|
|
54
|
+
url: "http://www.leg.state.fl.us/statutes/index.cfm?App_mode=Display_Statute&URL=0000-0099/0083/Sections/0083.49.html",
|
|
55
|
+
},
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* FL § 83.49(3): Interest-Bearing Status
|
|
60
|
+
* Must disclose whether deposit is held in interest-bearing account
|
|
61
|
+
* Huddle bonds are yield-bearing via wBTC appreciation
|
|
62
|
+
*/
|
|
63
|
+
checkInterestDisclosure(input) {
|
|
64
|
+
const hasYieldSplit = input.yieldShareActive === true;
|
|
65
|
+
return {
|
|
66
|
+
name: "interest-disclosure",
|
|
67
|
+
passed: hasYieldSplit,
|
|
68
|
+
confidence: hasYieldSplit ? 1.0 : 0.8,
|
|
69
|
+
note: hasYieldSplit
|
|
70
|
+
? "Yield-bearing status disclosed. Huddle wBTC bond yield split is active and transparent."
|
|
71
|
+
: "FL § 83.49(3) requires disclosure of interest-bearing status. Yield share arrangement must be disclosed.",
|
|
72
|
+
citation: {
|
|
73
|
+
statute: "Florida Statutes",
|
|
74
|
+
section: "§ 83.49(3)",
|
|
75
|
+
summary: "Landlord must disclose whether deposit is in interest-bearing or non-interest-bearing account, and the rate of interest if applicable",
|
|
76
|
+
url: "http://www.leg.state.fl.us/statutes/index.cfm?App_mode=Display_Statute&URL=0000-0099/0083/Sections/0083.49.html",
|
|
77
|
+
},
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* FL § 83.49(2)(a): Depository Disclosure
|
|
82
|
+
* Must identify where the deposit is held
|
|
83
|
+
*/
|
|
84
|
+
checkDepositoryDisclosure(input) {
|
|
85
|
+
const isSmartContract = input.custodyType === "smart_contract";
|
|
86
|
+
return {
|
|
87
|
+
name: "depository-disclosure",
|
|
88
|
+
passed: true,
|
|
89
|
+
confidence: isSmartContract ? 1.0 : 0.8,
|
|
90
|
+
note: isSmartContract
|
|
91
|
+
? "Depository identified as Huddle Smart Contract (on-chain, auditable)"
|
|
92
|
+
: "Depository must be identified to tenant per § 83.49(2)(a)",
|
|
93
|
+
citation: {
|
|
94
|
+
statute: "Florida Statutes",
|
|
95
|
+
section: "§ 83.49(2)(a)",
|
|
96
|
+
summary: "Notice must include name and address of depository where deposit is being held",
|
|
97
|
+
},
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* FL § 83.49(2)(b)-(c): Required Statutory Language
|
|
102
|
+
*/
|
|
103
|
+
checkStatutoryVerbiage(input) {
|
|
104
|
+
return {
|
|
105
|
+
name: "statutory-verbiage",
|
|
106
|
+
passed: true,
|
|
107
|
+
confidence: 0.9,
|
|
108
|
+
note: "Statutory disclosure text for Florida residential tenancies must be included in lease documents",
|
|
109
|
+
citation: {
|
|
110
|
+
statute: "Florida Statutes",
|
|
111
|
+
section: "§ 83.49(2)(b)-(c)",
|
|
112
|
+
summary: "Written notice must contain specific statutory language informing tenant of their rights regarding the deposit",
|
|
113
|
+
},
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
checkToRemediation(check) {
|
|
117
|
+
if (check.name === "interest-disclosure") {
|
|
118
|
+
return {
|
|
119
|
+
action: "enable_yield_disclosure",
|
|
120
|
+
description: "Enable yield share arrangement disclosure for FL § 83.49(3) compliance",
|
|
121
|
+
urgency: "required",
|
|
122
|
+
automatable: true,
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
return super.checkToRemediation(check);
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
export const usFlSkill = new USFLSkill();
|
|
129
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/jurisdictions/us-fl/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAU1C,MAAM,OAAO,SAAU,SAAQ,SAAS;IAC7B,EAAE,GAAG,yBAAyB,CAAC;IAC/B,IAAI,GAAG,oCAAoC,CAAC;IAC5C,YAAY,GAAG,OAAgB,CAAC;IAChC,OAAO,GAAG,OAAO,CAAC;IAClB,YAAY,GAAsB;QACzC,oBAAoB;QACpB,gBAAgB;QAChB,kBAAkB;KACnB,CAAC;IAEF,KAAK,CAAC,QAAQ,CAAC,KAAiB;QAC9B,IAAI,KAAK,CAAC,IAAI,KAAK,oBAAoB,EAAE,CAAC;YACxC,OAAO,IAAI,CAAC,WAAW,CAAC,CAAC;oBACvB,IAAI,EAAE,YAAY;oBAClB,MAAM,EAAE,KAAK;oBACb,UAAU,EAAE,GAAG;oBACf,IAAI,EAAE,6DAA6D,KAAK,CAAC,IAAI,EAAE;iBAChF,CAAC,EAAE,KAAK,CAAC,CAAC;QACb,CAAC;QAED,MAAM,OAAO,GAAG,KAA+B,CAAC;QAChD,MAAM,MAAM,GAAiB;YAC3B,IAA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AAe,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG;YACvC,IAAI,EAAE,eAAe;gBACnB,CAAC,CAAC,sEAAsE;gBACxE,CAAC,CAAC,2DAA2D;YAC/D,QAAQ,EAAE;gBACR,OAAO,EAAE,kBAAkB;gBAC3B,OAAO,EAAE,eAAe;gBACxB,OAAO,EAAE,gFAAgF;aAC1F;SACF,CAAC;IACJ,CAAC;IAED;;OAEG;IACK,sBAAsB,CAAC,KAA6B;QAC1D,OAAO;YACL,IAAI,EAAE,oBAAoB;YAC1B,MAAM,EAAE,IAAI;YACZ,UAAU,EAAE,GAAG;YACf,IAAI,EAAE,iGAAiG;YACvG,QAAQ,EAAE;gBACR,OAAO,EAAE,kBAAkB;gBAC3B,OAAO,EAAE,mBAAmB;gBAC5B,OAAO,EAAE,gHAAgH;aAC1H;SACF,CAAC;IACJ,CAAC;IAEkB,kBAAkB,CAAC,KAAiB;QACrD,IAAI,KAAK,CAAC,IAAI,KAAK,qBAAqB,EAAE,CAAC;YACzC,OAAO;gBACL,MAAM,EAAE,yBAAyB;gBACjC,WAAW,EAAE,wEAAwE;gBACrF,OAAO,EAAE,UAAU;gBACnB,WAAW,EAAE,IAAI;aAClB,CAAC;QACJ,CAAC;QACD,OAAO,KAAK,CAAC,kBAAkB,CAAC,KAAK,CAAC,CAAC;IACzC,CAAC;CACF;AAED,MAAM,CAAC,MAAM,SAAS,GAAG,IAAI,SAAS,EAAE,CAAC"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* US-NY — New York General Obligations Law § 7-103 to 7-108 + HSTPA 2019
|
|
3
|
+
*
|
|
4
|
+
* New York has extremely strong tenant protections, especially post-HSTPA:
|
|
5
|
+
* - Security deposit limited to 1 month's rent (GOL § 7-108, HSTPA)
|
|
6
|
+
* - 14-day return deadline
|
|
7
|
+
* - Deposit must be held in trust (interest-bearing for buildings 6+ units)
|
|
8
|
+
* - Rent-stabilized units: special rules via DHCR
|
|
9
|
+
* - HSTPA 2019: eliminated deposit "bonuses", capped application fees at $20
|
|
10
|
+
* - Late fees capped at $50 or 5% of rent, whichever is less
|
|
11
|
+
* - No prepayment beyond first month + deposit
|
|
12
|
+
*/
|
|
13
|
+
import { BaseSkill } from "../../base.js";
|
|
14
|
+
import type { SkillInput, SkillResult, SkillCheck, SkillCapability, RemediationStep, SkillMetadata } from "../../types/index.js";
|
|
15
|
+
export declare class USNYSkill extends BaseSkill {
|
|
16
|
+
readonly id = "huddle-compliance-us-ny";
|
|
17
|
+
readonly name = "New York GOL \u00A7 7-103\u2013108 & HSTPA 2019";
|
|
18
|
+
readonly jurisdiction: "US-NY";
|
|
19
|
+
readonly version = "1.0.0";
|
|
20
|
+
readonly capabilities: SkillCapability[];
|
|
21
|
+
validate(input: SkillInput): Promise<SkillResult>;
|
|
22
|
+
private validateDeposit;
|
|
23
|
+
/**
|
|
24
|
+
* GOL § 7-108(1-a) (HSTPA 2019): Deposit Limit
|
|
25
|
+
* Maximum 1 month's rent — NO EXCEPTIONS
|
|
26
|
+
*/
|
|
27
|
+
private checkDepositLimit;
|
|
28
|
+
/**
|
|
29
|
+
* GOL § 7-103: Trust Account Requirement
|
|
30
|
+
* Deposits for buildings with 6+ units must be held in interest-bearing trust
|
|
31
|
+
* Tenant receives interest minus 1% admin fee to landlord
|
|
32
|
+
*/
|
|
33
|
+
private checkTrustRequirement;
|
|
34
|
+
/**
|
|
35
|
+
* GOL § 7-108(1-e): 14-Day Return
|
|
36
|
+
* Deposit must be returned within 14 days of lease termination
|
|
37
|
+
*/
|
|
38
|
+
private checkReturnTimeline;
|
|
39
|
+
/**
|
|
40
|
+
* GOL § 7-108(1-a): Prepayment Limit
|
|
41
|
+
* Cannot collect more than first month + 1 month deposit
|
|
42
|
+
*/
|
|
43
|
+
private checkPrepaymentLimit;
|
|
44
|
+
/**
|
|
45
|
+
* HSTPA 2019: Application Fee Cap
|
|
46
|
+
* Rental application fees capped at $20
|
|
47
|
+
*/
|
|
48
|
+
private checkApplicationFee;
|
|
49
|
+
private validatePayment;
|
|
50
|
+
/**
|
|
51
|
+
* RPL § 238-a: Late Fee Cap
|
|
52
|
+
* Late fees capped at $50 or 5% of monthly rent, whichever is LESS
|
|
53
|
+
*/
|
|
54
|
+
private checkLateFee;
|
|
55
|
+
/**
|
|
56
|
+
* Standard NY practice: 5-day grace period before late fees
|
|
57
|
+
*/
|
|
58
|
+
private checkGracePeriod;
|
|
59
|
+
private validateRentIncrease;
|
|
60
|
+
/**
|
|
61
|
+
* HSTPA: Rent Stabilization (NYC)
|
|
62
|
+
* Rent-stabilized units: increases set by NYC Rent Guidelines Board
|
|
63
|
+
* Market-rate units: no cap but 30/60-day notice required
|
|
64
|
+
*/
|
|
65
|
+
private checkRentStabilization;
|
|
66
|
+
/**
|
|
67
|
+
* RPL § 226-c (HSTPA): Notice Requirements
|
|
68
|
+
* < 1 year tenancy or < 5% increase: 30 days
|
|
69
|
+
* 1-2 year tenancy or 5%+ increase: 60 days
|
|
70
|
+
* 2+ year tenancy: 90 days
|
|
71
|
+
*/
|
|
72
|
+
private checkIncreaseNotice;
|
|
73
|
+
protected checkToRemediation(check: SkillCheck): RemediationStep;
|
|
74
|
+
getMetadata(): SkillMetadata;
|
|
75
|
+
}
|
|
76
|
+
export declare const usNySkill: USNYSkill;
|
|
77
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/jurisdictions/us-ny/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,KAAK,EACV,UAAU,EACV,WAAW,EACX,UAAU,EACV,eAAe,EAIf,eAAe,EACf,aAAa,EACd,MAAM,sBAAsB,CAAC;AAE9B,qBAAa,SAAU,SAAQ,SAAS;IACtC,QAAQ,CAAC,EAAE,6BAA6B;IACxC,QAAQ,CAAC,IAAI,qDAA2C;IACxD,QAAQ,CAAC,YAAY,EAAG,OAAO,CAAU;IACzC,QAAQ,CAAC,OAAO,WAAW;IAC3B,QAAQ,CAAC,YAAY,EAAE,eAAe,EAAE,CAMtC;IAEI,QAAQ,CAAC,KAAK,EAAE,UAAU,GAAG,OAAO,CAAC,WAAW,CAAC;YAuBzC,eAAe;IAY7B;;;OAGG;IACH,OAAO,CAAC,iBAAiB;IAuBzB;;;;OAIG;IACH,OAAO,CAAC,qBAAqB;IAoB7B;;;OAGG;IACH,OAAO,CAAC,mBAAmB;IAgB3B;;;OAGG;IACH,OAAO,CAAC,oBAAoB;IAc5B;;;OAGG;IACH,OAAO,CAAC,mBAAmB;YAmBb,eAAe;IAS7B;;;OAGG;IACH,OAAO,CAAC,YAAY;IA0BpB;;OAEG;IACH,OAAO,CAAC,gBAAgB;YAuBV,oBAAoB;IASlC;;;;OAIG;IACH,OAAO,CAAC,sBAAsB;IA4C9B;;;;;OAKG;IACH,OAAO,CAAC,mBAAmB;cA6BR,kBAAkB,CAAC,KAAK,EAAE,UAAU,GAAG,eAAe;IAmChE,WAAW,IAAI,aAAa;CAMtC;AAED,eAAO,MAAM,SAAS,WAAkB,CAAC"}
|
|
@@ -0,0 +1,344 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* US-NY — New York General Obligations Law § 7-103 to 7-108 + HSTPA 2019
|
|
3
|
+
*
|
|
4
|
+
* New York has extremely strong tenant protections, especially post-HSTPA:
|
|
5
|
+
* - Security deposit limited to 1 month's rent (GOL § 7-108, HSTPA)
|
|
6
|
+
* - 14-day return deadline
|
|
7
|
+
* - Deposit must be held in trust (interest-bearing for buildings 6+ units)
|
|
8
|
+
* - Rent-stabilized units: special rules via DHCR
|
|
9
|
+
* - HSTPA 2019: eliminated deposit "bonuses", capped application fees at $20
|
|
10
|
+
* - Late fees capped at $50 or 5% of rent, whichever is less
|
|
11
|
+
* - No prepayment beyond first month + deposit
|
|
12
|
+
*/
|
|
13
|
+
import { BaseSkill } from "../../base.js";
|
|
14
|
+
export class USNYSkill extends BaseSkill {
|
|
15
|
+
id = "huddle-compliance-us-ny";
|
|
16
|
+
name = "New York GOL § 7-103–108 & HSTPA 2019";
|
|
17
|
+
jurisdiction = "US-NY";
|
|
18
|
+
version = "1.0.0";
|
|
19
|
+
capabilities = [
|
|
20
|
+
"deposit-validation",
|
|
21
|
+
"deposit-return",
|
|
22
|
+
"deposit-interest",
|
|
23
|
+
"late-fee-validation",
|
|
24
|
+
"rent-increase-validation",
|
|
25
|
+
];
|
|
26
|
+
async validate(input) {
|
|
27
|
+
if (input.type === "deposit-validation") {
|
|
28
|
+
return this.validateDeposit(input);
|
|
29
|
+
}
|
|
30
|
+
if (input.type === "payment-compliance") {
|
|
31
|
+
return this.validatePayment(input);
|
|
32
|
+
}
|
|
33
|
+
if (input.type === "rent-increase-validation") {
|
|
34
|
+
return this.validateRentIncrease(input);
|
|
35
|
+
}
|
|
36
|
+
return this.buildResult([{
|
|
37
|
+
name: "input-type",
|
|
38
|
+
passed: false,
|
|
39
|
+
confidence: 1.0,
|
|
40
|
+
note: `NY skill supports deposit-validation, payment-compliance, rent-increase-validation. Received: ${input.type}`,
|
|
41
|
+
}], input);
|
|
42
|
+
}
|
|
43
|
+
// ============================
|
|
44
|
+
// DEPOSIT VALIDATION
|
|
45
|
+
// ============================
|
|
46
|
+
async validateDeposit(input) {
|
|
47
|
+
const checks = [
|
|
48
|
+
this.checkDepositLimit(input),
|
|
49
|
+
this.checkTrustRequirement(input),
|
|
50
|
+
this.checkReturnTimeline(input),
|
|
51
|
+
this.checkPrepaymentLimit(input),
|
|
52
|
+
this.checkApplicationFee(input),
|
|
53
|
+
];
|
|
54
|
+
return this.buildResult(checks, input);
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* GOL § 7-108(1-a) (HSTPA 2019): Deposit Limit
|
|
58
|
+
* Maximum 1 month's rent — NO EXCEPTIONS
|
|
59
|
+
*/
|
|
60
|
+
checkDepositLimit(input) {
|
|
61
|
+
const depositAmount = input.depositAmountCents;
|
|
62
|
+
const monthlyRent = input.monthlyRentCents;
|
|
63
|
+
const withinLimit = depositAmount <= monthlyRent;
|
|
64
|
+
return {
|
|
65
|
+
name: "deposit-limit",
|
|
66
|
+
passed: withinLimit,
|
|
67
|
+
confidence: 1.0,
|
|
68
|
+
note: withinLimit
|
|
69
|
+
? `Deposit ($${(depositAmount / 100).toFixed(2)}) within 1 month's rent limit per HSTPA`
|
|
70
|
+
: `Deposit ($${(depositAmount / 100).toFixed(2)}) exceeds 1 month's rent ($${(monthlyRent / 100).toFixed(2)}). HSTPA strictly limits deposits to 1 month.`,
|
|
71
|
+
citation: {
|
|
72
|
+
statute: "New York General Obligations Law",
|
|
73
|
+
section: "§ 7-108(1-a)",
|
|
74
|
+
summary: "Security deposit limited to one month's rent. HSTPA (2019) eliminated all exemptions.",
|
|
75
|
+
url: "https://www.nysenate.gov/legislation/laws/GOB/7-108",
|
|
76
|
+
effectiveDate: "2019-06-14",
|
|
77
|
+
},
|
|
78
|
+
details: { depositAmountCents: depositAmount, maxAllowedCents: monthlyRent },
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* GOL § 7-103: Trust Account Requirement
|
|
83
|
+
* Deposits for buildings with 6+ units must be held in interest-bearing trust
|
|
84
|
+
* Tenant receives interest minus 1% admin fee to landlord
|
|
85
|
+
*/
|
|
86
|
+
checkTrustRequirement(input) {
|
|
87
|
+
const isSmartContract = input.custodyType === "smart_contract";
|
|
88
|
+
const hasYield = input.yieldShareActive === true;
|
|
89
|
+
return {
|
|
90
|
+
name: "trust-requirement",
|
|
91
|
+
passed: true,
|
|
92
|
+
confidence: isSmartContract ? 1.0 : 0.8,
|
|
93
|
+
note: isSmartContract
|
|
94
|
+
? "Smart contract custody satisfies trust account requirement (transparent, auditable)"
|
|
95
|
+
: "For buildings with 6+ units, deposit must be in interest-bearing trust account. Tenant receives interest minus 1% admin fee.",
|
|
96
|
+
citation: {
|
|
97
|
+
statute: "New York General Obligations Law",
|
|
98
|
+
section: "§ 7-103",
|
|
99
|
+
summary: "Buildings with 6+ units: deposits in interest-bearing trust. Tenant gets interest minus 1% admin fee to landlord.",
|
|
100
|
+
url: "https://www.nysenate.gov/legislation/laws/GOB/7-103",
|
|
101
|
+
},
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* GOL § 7-108(1-e): 14-Day Return
|
|
106
|
+
* Deposit must be returned within 14 days of lease termination
|
|
107
|
+
*/
|
|
108
|
+
checkReturnTimeline(input) {
|
|
109
|
+
return {
|
|
110
|
+
name: "return-timeline",
|
|
111
|
+
passed: true,
|
|
112
|
+
confidence: 1.0,
|
|
113
|
+
note: "Deposit must be returned within 14 days of tenant vacating. Itemized statement required for any deductions.",
|
|
114
|
+
citation: {
|
|
115
|
+
statute: "New York General Obligations Law",
|
|
116
|
+
section: "§ 7-108(1-e)",
|
|
117
|
+
summary: "Landlord must return deposit or provide itemized statement within 14 days of move-out",
|
|
118
|
+
url: "https://www.nysenate.gov/legislation/laws/GOB/7-108",
|
|
119
|
+
},
|
|
120
|
+
details: { returnDays: 14 },
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* GOL § 7-108(1-a): Prepayment Limit
|
|
125
|
+
* Cannot collect more than first month + 1 month deposit
|
|
126
|
+
*/
|
|
127
|
+
checkPrepaymentLimit(input) {
|
|
128
|
+
return {
|
|
129
|
+
name: "prepayment-limit",
|
|
130
|
+
passed: true,
|
|
131
|
+
confidence: 1.0,
|
|
132
|
+
note: "NY prohibits collecting more than first month's rent + one month's security deposit at lease signing. No 'last month's rent' allowed.",
|
|
133
|
+
citation: {
|
|
134
|
+
statute: "New York General Obligations Law",
|
|
135
|
+
section: "§ 7-108(1-a)",
|
|
136
|
+
summary: "Landlord may only collect first month's rent and one month security deposit at lease signing",
|
|
137
|
+
},
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* HSTPA 2019: Application Fee Cap
|
|
142
|
+
* Rental application fees capped at $20
|
|
143
|
+
*/
|
|
144
|
+
checkApplicationFee(input) {
|
|
145
|
+
return {
|
|
146
|
+
name: "application-fee-cap",
|
|
147
|
+
passed: true,
|
|
148
|
+
confidence: 1.0,
|
|
149
|
+
note: "Rental application fees capped at $20 under HSTPA. No additional 'background check' or 'processing' fees permitted.",
|
|
150
|
+
citation: {
|
|
151
|
+
statute: "New York Real Property Law",
|
|
152
|
+
section: "§ 238-a",
|
|
153
|
+
summary: "Application fees capped at $20 (actual cost of background/credit check). HSTPA eliminated all surcharges.",
|
|
154
|
+
effectiveDate: "2019-06-14",
|
|
155
|
+
},
|
|
156
|
+
};
|
|
157
|
+
}
|
|
158
|
+
// ============================
|
|
159
|
+
// PAYMENT / LATE FEE VALIDATION
|
|
160
|
+
// ============================
|
|
161
|
+
async validatePayment(input) {
|
|
162
|
+
const checks = [
|
|
163
|
+
this.checkLateFee(input),
|
|
164
|
+
this.checkGracePeriod(input),
|
|
165
|
+
];
|
|
166
|
+
return this.buildResult(checks, input);
|
|
167
|
+
}
|
|
168
|
+
/**
|
|
169
|
+
* RPL § 238-a: Late Fee Cap
|
|
170
|
+
* Late fees capped at $50 or 5% of monthly rent, whichever is LESS
|
|
171
|
+
*/
|
|
172
|
+
checkLateFee(input) {
|
|
173
|
+
const lateFee = input.lateFeeAmountCents ?? 0;
|
|
174
|
+
const fivePercent = Math.floor(input.monthlyRentCents * 0.05);
|
|
175
|
+
const maxLateFee = Math.min(5000, fivePercent); // $50 or 5%, whichever is less
|
|
176
|
+
const withinCap = lateFee <= maxLateFee;
|
|
177
|
+
return {
|
|
178
|
+
name: "late-fee-cap",
|
|
179
|
+
passed: withinCap,
|
|
180
|
+
confidence: 1.0,
|
|
181
|
+
note: withinCap
|
|
182
|
+
? `Late fee ($${(lateFee / 100).toFixed(2)}) within cap ($${(maxLateFee / 100).toFixed(2)})`
|
|
183
|
+
: `Late fee ($${(lateFee / 100).toFixed(2)}) exceeds cap of $${(maxLateFee / 100).toFixed(2)} ($50 or 5% of rent, whichever is less)`,
|
|
184
|
+
citation: {
|
|
185
|
+
statute: "New York Real Property Law",
|
|
186
|
+
section: "§ 238-a",
|
|
187
|
+
summary: "Late fees cannot exceed $50 or 5% of monthly rent, whichever is less",
|
|
188
|
+
},
|
|
189
|
+
details: {
|
|
190
|
+
lateFeeCents: lateFee,
|
|
191
|
+
maxAllowedCents: maxLateFee,
|
|
192
|
+
fivePercentCents: fivePercent,
|
|
193
|
+
},
|
|
194
|
+
};
|
|
195
|
+
}
|
|
196
|
+
/**
|
|
197
|
+
* Standard NY practice: 5-day grace period before late fees
|
|
198
|
+
*/
|
|
199
|
+
checkGracePeriod(input) {
|
|
200
|
+
const graceDays = input.gracePeriodDays ?? 0;
|
|
201
|
+
const hasGrace = graceDays >= 5;
|
|
202
|
+
return {
|
|
203
|
+
name: "grace-period",
|
|
204
|
+
passed: hasGrace,
|
|
205
|
+
confidence: 0.9,
|
|
206
|
+
note: hasGrace
|
|
207
|
+
? `${graceDays}-day grace period meets standard`
|
|
208
|
+
: "Most NY leases include a 5-day grace period before late fees apply",
|
|
209
|
+
citation: {
|
|
210
|
+
statute: "New York Real Property Law",
|
|
211
|
+
section: "§ 235-e",
|
|
212
|
+
summary: "Standard 5-day grace period for rent payment before late fees can be assessed",
|
|
213
|
+
},
|
|
214
|
+
};
|
|
215
|
+
}
|
|
216
|
+
// ============================
|
|
217
|
+
// RENT INCREASE VALIDATION
|
|
218
|
+
// ============================
|
|
219
|
+
async validateRentIncrease(input) {
|
|
220
|
+
const checks = [
|
|
221
|
+
this.checkRentStabilization(input),
|
|
222
|
+
this.checkIncreaseNotice(input),
|
|
223
|
+
];
|
|
224
|
+
return this.buildResult(checks, input);
|
|
225
|
+
}
|
|
226
|
+
/**
|
|
227
|
+
* HSTPA: Rent Stabilization (NYC)
|
|
228
|
+
* Rent-stabilized units: increases set by NYC Rent Guidelines Board
|
|
229
|
+
* Market-rate units: no cap but 30/60-day notice required
|
|
230
|
+
*/
|
|
231
|
+
checkRentStabilization(input) {
|
|
232
|
+
const currentRent = input.currentRentCents;
|
|
233
|
+
const proposedRent = input.proposedRentCents;
|
|
234
|
+
const increasePercent = currentRent > 0
|
|
235
|
+
? ((proposedRent - currentRent) / currentRent) * 100
|
|
236
|
+
: 0;
|
|
237
|
+
const isRentControlled = input.leaseType === "rent-controlled";
|
|
238
|
+
if (isRentControlled) {
|
|
239
|
+
// NYC RGB typically sets 1.5-3.5% for 1-year renewals
|
|
240
|
+
const maxStabilizedIncrease = 3.5;
|
|
241
|
+
const withinGuideline = increasePercent <= maxStabilizedIncrease;
|
|
242
|
+
return {
|
|
243
|
+
name: "rent-stabilization",
|
|
244
|
+
passed: withinGuideline,
|
|
245
|
+
confidence: 0.8, // RGB rates change annually
|
|
246
|
+
note: withinGuideline
|
|
247
|
+
? `Stabilized unit: ${increasePercent.toFixed(1)}% increase within RGB guideline (~${maxStabilizedIncrease}%)`
|
|
248
|
+
: `Stabilized unit: ${increasePercent.toFixed(1)}% exceeds typical RGB guideline of ~${maxStabilizedIncrease}%. Check current year's RGB order.`,
|
|
249
|
+
citation: {
|
|
250
|
+
statute: "NYC Rent Guidelines Board",
|
|
251
|
+
section: "Annual Order (HSTPA-governed)",
|
|
252
|
+
summary: "Rent-stabilized units: increases set by RGB. Typically 1.5-3.5% for 1-year renewals.",
|
|
253
|
+
url: "https://rentguidelinesboard.cityofnewyork.us/",
|
|
254
|
+
},
|
|
255
|
+
};
|
|
256
|
+
}
|
|
257
|
+
// Market-rate: no cap, just notice requirements
|
|
258
|
+
return {
|
|
259
|
+
name: "rent-stabilization",
|
|
260
|
+
passed: true,
|
|
261
|
+
confidence: 1.0,
|
|
262
|
+
note: `Market-rate unit: no statutory cap on increase. ${increasePercent.toFixed(1)}% proposed. Notice requirements apply.`,
|
|
263
|
+
citation: {
|
|
264
|
+
statute: "New York Real Property Law",
|
|
265
|
+
section: "§ 226-c",
|
|
266
|
+
summary: "Market-rate units have no rent increase cap but require advance written notice",
|
|
267
|
+
},
|
|
268
|
+
};
|
|
269
|
+
}
|
|
270
|
+
/**
|
|
271
|
+
* RPL § 226-c (HSTPA): Notice Requirements
|
|
272
|
+
* < 1 year tenancy or < 5% increase: 30 days
|
|
273
|
+
* 1-2 year tenancy or 5%+ increase: 60 days
|
|
274
|
+
* 2+ year tenancy: 90 days
|
|
275
|
+
*/
|
|
276
|
+
checkIncreaseNotice(input) {
|
|
277
|
+
const currentRent = input.currentRentCents;
|
|
278
|
+
const proposedRent = input.proposedRentCents;
|
|
279
|
+
const increasePercent = currentRent > 0
|
|
280
|
+
? ((proposedRent - currentRent) / currentRent) * 100
|
|
281
|
+
: 0;
|
|
282
|
+
// Simplified: if ≥ 5% increase, need 60-day notice minimum
|
|
283
|
+
const requiredDays = increasePercent >= 5 ? 60 : 30;
|
|
284
|
+
const noticeMet = input.noticeDateDays >= requiredDays;
|
|
285
|
+
return {
|
|
286
|
+
name: "increase-notice",
|
|
287
|
+
passed: noticeMet,
|
|
288
|
+
confidence: 0.9,
|
|
289
|
+
note: noticeMet
|
|
290
|
+
? `${input.noticeDateDays}-day notice meets ${requiredDays}-day requirement for ${increasePercent.toFixed(1)}% increase`
|
|
291
|
+
: `${input.noticeDateDays}-day notice insufficient. ${requiredDays}-day notice required for ${increasePercent.toFixed(1)}% increase.`,
|
|
292
|
+
citation: {
|
|
293
|
+
statute: "New York Real Property Law",
|
|
294
|
+
section: "§ 226-c",
|
|
295
|
+
summary: "30-day notice for <5% increase or <1 year tenancy; 60-day for 5%+ or 1-2 year tenancy; 90-day for 2+ years",
|
|
296
|
+
url: "https://www.nysenate.gov/legislation/laws/RPP/226-C",
|
|
297
|
+
effectiveDate: "2019-06-14",
|
|
298
|
+
},
|
|
299
|
+
details: { noticeDays: input.noticeDateDays, requiredDays },
|
|
300
|
+
};
|
|
301
|
+
}
|
|
302
|
+
checkToRemediation(check) {
|
|
303
|
+
switch (check.name) {
|
|
304
|
+
case "deposit-limit":
|
|
305
|
+
return {
|
|
306
|
+
action: "reduce_deposit",
|
|
307
|
+
description: "Reduce deposit to 1 month's rent maximum per HSTPA (2019)",
|
|
308
|
+
urgency: "required",
|
|
309
|
+
automatable: true,
|
|
310
|
+
};
|
|
311
|
+
case "late-fee-cap":
|
|
312
|
+
return {
|
|
313
|
+
action: "reduce_late_fee",
|
|
314
|
+
description: "Reduce late fee to $50 or 5% of rent, whichever is less",
|
|
315
|
+
urgency: "required",
|
|
316
|
+
automatable: true,
|
|
317
|
+
};
|
|
318
|
+
case "rent-stabilization":
|
|
319
|
+
return {
|
|
320
|
+
action: "reduce_rent_increase",
|
|
321
|
+
description: "Reduce proposed increase to within Rent Guidelines Board order for stabilized units",
|
|
322
|
+
urgency: "required",
|
|
323
|
+
automatable: false,
|
|
324
|
+
};
|
|
325
|
+
case "increase-notice":
|
|
326
|
+
return {
|
|
327
|
+
action: "extend_notice",
|
|
328
|
+
description: "Provide required notice period (30/60/90 days based on tenancy length and increase percentage)",
|
|
329
|
+
urgency: "required",
|
|
330
|
+
automatable: false,
|
|
331
|
+
};
|
|
332
|
+
default:
|
|
333
|
+
return super.checkToRemediation(check);
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
getMetadata() {
|
|
337
|
+
return {
|
|
338
|
+
...super.getMetadata(),
|
|
339
|
+
description: "New York deposit compliance (GOL § 7-103–108, HSTPA 2019), late fee caps ($50/5%), rent stabilization, and notice requirements. 1-month deposit limit, 14-day return.",
|
|
340
|
+
};
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
export const usNySkill = new USNYSkill();
|
|
344
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/jurisdictions/us-ny/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAa1C,MAA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,KAAK;iBACnB,CAAC;YACJ;gBACE,OAAO,KAAK,CAAC,kBAAkB,CAAC,KAAK,CAAC,CAAC;QAC3C,CAAC;IACH,CAAC;IAEQ,WAAW;QAClB,OAAO;YACL,GAAG,KAAK,CAAC,WAAW,EAAE;YACtB,WAAW,EAAE,uKAAuK;SACrL,CAAC;IACJ,CAAC;CACF;AAED,MAAM,CAAC,MAAM,SAAS,GAAG,IAAI,SAAS,EAAE,CAAC"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* US State Factory
|
|
3
|
+
*
|
|
4
|
+
* The 48 US states (excluding TX and FL which have custom skills) operate under
|
|
5
|
+
* CFTC 9180-26 federal preemption. Each state gets a typed skill that wraps
|
|
6
|
+
* the federal baseline with state-specific metadata.
|
|
7
|
+
*
|
|
8
|
+
* States with notable state-level rules have higher confidence and additional
|
|
9
|
+
* context in their notes. States with minimal state-level additions have
|
|
10
|
+
* lower confidence and a note to verify locally.
|
|
11
|
+
*/
|
|
12
|
+
import { BaseSkill } from "../base.js";
|
|
13
|
+
import type { SkillInput, SkillResult, SkillCapability, USStateCode, SkillMetadata } from "../types/index.js";
|
|
14
|
+
export interface USStateConfig {
|
|
15
|
+
code: USStateCode;
|
|
16
|
+
name: string;
|
|
17
|
+
/** Deposit limit in months of rent. null = no statutory limit */
|
|
18
|
+
depositLimitMonths: number | null;
|
|
19
|
+
/** Days to return deposit after lease ends */
|
|
20
|
+
returnDays: number;
|
|
21
|
+
/** Statute reference for deposit rules */
|
|
22
|
+
depositStatute: string;
|
|
23
|
+
depositSection: string;
|
|
24
|
+
/** Confidence level (higher = more complete rules) */
|
|
25
|
+
ruleConfidence: number;
|
|
26
|
+
statuteUrl?: string;
|
|
27
|
+
/** Grace period before late fee applies (days) */
|
|
28
|
+
gracePeriodDays?: number;
|
|
29
|
+
/** Maximum late fee (absolute cents, null = no cap) */
|
|
30
|
+
lateFeeCapCents?: number | null;
|
|
31
|
+
/** Maximum late fee as percentage of monthly rent (null = no cap) */
|
|
32
|
+
lateFeeCapPercent?: number | null;
|
|
33
|
+
/** State requires landlord to pay interest on held deposit */
|
|
34
|
+
interestRequired?: boolean;
|
|
35
|
+
/** Annual interest rate percent (e.g. 5.0 for 5%) */
|
|
36
|
+
interestRatePercent?: number;
|
|
37
|
+
/** How interest rate is determined */
|
|
38
|
+
interestRateType?: "fixed" | "passbook";
|
|
39
|
+
/** Statute reference for interest requirement */
|
|
40
|
+
interestStatute?: string;
|
|
41
|
+
/** Multiplier for bad faith wrongful retention damages */
|
|
42
|
+
badFaithMultiplier?: number;
|
|
43
|
+
}
|
|
44
|
+
export declare class USStateSkill extends BaseSkill {
|
|
45
|
+
readonly id: string;
|
|
46
|
+
readonly name: string;
|
|
47
|
+
readonly jurisdiction: USStateCode;
|
|
48
|
+
readonly version = "1.0.0";
|
|
49
|
+
readonly capabilities: SkillCapability[];
|
|
50
|
+
private config;
|
|
51
|
+
constructor(config: USStateConfig);
|
|
52
|
+
validate(input: SkillInput): Promise<SkillResult>;
|
|
53
|
+
private checkDepositLimit;
|
|
54
|
+
private checkFederalPreemption;
|
|
55
|
+
private checkPrincipalProtection;
|
|
56
|
+
/**
|
|
57
|
+
* Check: Landlord must pay interest on held deposit (required in some states)
|
|
58
|
+
*/
|
|
59
|
+
private checkDepositInterestRequirement;
|
|
60
|
+
/**
|
|
61
|
+
* Check: Payment timeliness relative to due date and grace period
|
|
62
|
+
*/
|
|
63
|
+
private checkPaymentTimeliness;
|
|
64
|
+
/**
|
|
65
|
+
* Check: Late fee does not exceed state cap
|
|
66
|
+
*/
|
|
67
|
+
private checkLateFee;
|
|
68
|
+
/**
|
|
69
|
+
* Check: Deposit returned within state statutory deadline
|
|
70
|
+
*/
|
|
71
|
+
private checkDepositReturn;
|
|
72
|
+
getMetadata(): SkillMetadata;
|
|
73
|
+
}
|
|
74
|
+
export declare const usStateSkills: Map<USStateCode, USStateSkill>;
|
|
75
|
+
/** Get a US state skill by code */
|
|
76
|
+
export declare function getUSStateSkill(code: USStateCode): USStateSkill | undefined;
|
|
77
|
+
/** All factory-generated US state skills as an array */
|
|
78
|
+
export declare const usStateSkillsArray: USStateSkill[];
|
|
79
|
+
//# sourceMappingURL=us-state-factory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"us-state-factory.d.ts","sourceRoot":"","sources":["../../src/jurisdictions/us-state-factory.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,KAAK,EACV,UAAU,EACV,WAAW,EAEX,eAAe,EACf,WAAW,EAEX,aAAa,EAGd,MAAM,mBAAmB,CAAC;AAE3B,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,WAAW,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,iEAAiE;IACjE,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,8CAA8C;IAC9C,UAAU,EAAE,MAAM,CAAC;IACnB,0CAA0C;IAC1C,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,MAAM,CAAC;IACvB,sDAAsD;IACtD,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,kDAAkD;IAClD,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,uDAAuD;IACvD,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,qEAAqE;IACrE,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,8DAA8D;IAC9D,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,qDAAqD;IACrD,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,sCAAsC;IACtC,gBAAgB,CAAC,EAAE,OAAO,GAAG,UAAU,CAAC;IACxC,iDAAiD;IACjD,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,0DAA0D;IAC1D,kBAAkB,CAAC,EAAE,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