@makegov/tango-node 0.1.4

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.
Files changed (125) hide show
  1. package/.editorconfig +13 -0
  2. package/.eslintrc.cjs +20 -0
  3. package/.prettierrc +8 -0
  4. package/CHANGELOG.md +15 -0
  5. package/LICENSE +21 -0
  6. package/README.md +331 -0
  7. package/dist/client.d.ts +48 -0
  8. package/dist/client.d.ts.map +1 -0
  9. package/dist/client.js +321 -0
  10. package/dist/client.js.map +1 -0
  11. package/dist/config.d.ts +11 -0
  12. package/dist/config.d.ts.map +1 -0
  13. package/dist/config.js +21 -0
  14. package/dist/config.js.map +1 -0
  15. package/dist/errors.d.ts +39 -0
  16. package/dist/errors.d.ts.map +1 -0
  17. package/dist/errors.js +78 -0
  18. package/dist/errors.js.map +1 -0
  19. package/dist/index.d.ts +6 -0
  20. package/dist/index.d.ts.map +1 -0
  21. package/dist/index.js +6 -0
  22. package/dist/index.js.map +1 -0
  23. package/dist/models/Agency.d.ts +8 -0
  24. package/dist/models/Agency.d.ts.map +1 -0
  25. package/dist/models/Agency.js +2 -0
  26. package/dist/models/Agency.js.map +1 -0
  27. package/dist/models/Contract.d.ts +17 -0
  28. package/dist/models/Contract.d.ts.map +1 -0
  29. package/dist/models/Contract.js +2 -0
  30. package/dist/models/Contract.js.map +1 -0
  31. package/dist/models/Department.d.ts +5 -0
  32. package/dist/models/Department.d.ts.map +1 -0
  33. package/dist/models/Department.js +2 -0
  34. package/dist/models/Department.js.map +1 -0
  35. package/dist/models/Entity.d.ts +11 -0
  36. package/dist/models/Entity.d.ts.map +1 -0
  37. package/dist/models/Entity.js +2 -0
  38. package/dist/models/Entity.js.map +1 -0
  39. package/dist/models/Forecast.d.ts +12 -0
  40. package/dist/models/Forecast.d.ts.map +1 -0
  41. package/dist/models/Forecast.js +2 -0
  42. package/dist/models/Forecast.js.map +1 -0
  43. package/dist/models/Grant.d.ts +10 -0
  44. package/dist/models/Grant.d.ts.map +1 -0
  45. package/dist/models/Grant.js +2 -0
  46. package/dist/models/Grant.js.map +1 -0
  47. package/dist/models/Location.d.ts +17 -0
  48. package/dist/models/Location.d.ts.map +1 -0
  49. package/dist/models/Location.js +2 -0
  50. package/dist/models/Location.js.map +1 -0
  51. package/dist/models/Notice.d.ts +9 -0
  52. package/dist/models/Notice.d.ts.map +1 -0
  53. package/dist/models/Notice.js +2 -0
  54. package/dist/models/Notice.js.map +1 -0
  55. package/dist/models/Opportunity.d.ts +11 -0
  56. package/dist/models/Opportunity.d.ts.map +1 -0
  57. package/dist/models/Opportunity.js +2 -0
  58. package/dist/models/Opportunity.js.map +1 -0
  59. package/dist/models/RecipientProfile.d.ts +12 -0
  60. package/dist/models/RecipientProfile.d.ts.map +1 -0
  61. package/dist/models/RecipientProfile.js +2 -0
  62. package/dist/models/RecipientProfile.js.map +1 -0
  63. package/dist/models/index.d.ts +11 -0
  64. package/dist/models/index.d.ts.map +1 -0
  65. package/dist/models/index.js +2 -0
  66. package/dist/models/index.js.map +1 -0
  67. package/dist/shapes/explicitSchemas.d.ts +24 -0
  68. package/dist/shapes/explicitSchemas.d.ts.map +1 -0
  69. package/dist/shapes/explicitSchemas.js +1818 -0
  70. package/dist/shapes/explicitSchemas.js.map +1 -0
  71. package/dist/shapes/factory.d.ts +29 -0
  72. package/dist/shapes/factory.d.ts.map +1 -0
  73. package/dist/shapes/factory.js +93 -0
  74. package/dist/shapes/factory.js.map +1 -0
  75. package/dist/shapes/generator.d.ts +53 -0
  76. package/dist/shapes/generator.d.ts.map +1 -0
  77. package/dist/shapes/generator.js +117 -0
  78. package/dist/shapes/generator.js.map +1 -0
  79. package/dist/shapes/index.d.ts +8 -0
  80. package/dist/shapes/index.d.ts.map +1 -0
  81. package/dist/shapes/index.js +8 -0
  82. package/dist/shapes/index.js.map +1 -0
  83. package/dist/shapes/parser.d.ts +36 -0
  84. package/dist/shapes/parser.d.ts.map +1 -0
  85. package/dist/shapes/parser.js +169 -0
  86. package/dist/shapes/parser.js.map +1 -0
  87. package/dist/shapes/schema.d.ts +30 -0
  88. package/dist/shapes/schema.d.ts.map +1 -0
  89. package/dist/shapes/schema.js +63 -0
  90. package/dist/shapes/schema.js.map +1 -0
  91. package/dist/shapes/schemaTypes.d.ts +42 -0
  92. package/dist/shapes/schemaTypes.d.ts.map +1 -0
  93. package/dist/shapes/schemaTypes.js +2 -0
  94. package/dist/shapes/schemaTypes.js.map +1 -0
  95. package/dist/shapes/types.d.ts +46 -0
  96. package/dist/shapes/types.d.ts.map +1 -0
  97. package/dist/shapes/types.js +25 -0
  98. package/dist/shapes/types.js.map +1 -0
  99. package/dist/types.d.ts +28 -0
  100. package/dist/types.d.ts.map +1 -0
  101. package/dist/types.js +2 -0
  102. package/dist/types.js.map +1 -0
  103. package/dist/utils/dates.d.ts +14 -0
  104. package/dist/utils/dates.d.ts.map +1 -0
  105. package/dist/utils/dates.js +25 -0
  106. package/dist/utils/dates.js.map +1 -0
  107. package/dist/utils/http.d.ts +23 -0
  108. package/dist/utils/http.d.ts.map +1 -0
  109. package/dist/utils/http.js +158 -0
  110. package/dist/utils/http.js.map +1 -0
  111. package/dist/utils/number.d.ts +14 -0
  112. package/dist/utils/number.d.ts.map +1 -0
  113. package/dist/utils/number.js +14 -0
  114. package/dist/utils/number.js.map +1 -0
  115. package/dist/utils/unflatten.d.ts +11 -0
  116. package/dist/utils/unflatten.d.ts.map +1 -0
  117. package/dist/utils/unflatten.js +49 -0
  118. package/dist/utils/unflatten.js.map +1 -0
  119. package/docs/API_REFERENCE.md +201 -0
  120. package/docs/DYNAMIC_MODELS.md +127 -0
  121. package/docs/SHAPES.md +94 -0
  122. package/eslint.config.js +37 -0
  123. package/package.json +73 -0
  124. package/tsconfig.json +21 -0
  125. package/vitest.config.ts +18 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Forecast.d.ts","sourceRoot":"","sources":["../../src/models/Forecast.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,sBAAsB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvC,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,SAAS,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IAC3B,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACxB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=Forecast.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Forecast.js","sourceRoot":"","sources":["../../src/models/Forecast.ts"],"names":[],"mappings":""}
@@ -0,0 +1,10 @@
1
+ export interface Grant {
2
+ grant_id: number;
3
+ opportunity_number: string;
4
+ title: string;
5
+ agency_code?: string | null;
6
+ status?: string | null;
7
+ description?: string | null;
8
+ last_updated?: string | null;
9
+ }
10
+ //# sourceMappingURL=Grant.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Grant.d.ts","sourceRoot":"","sources":["../../src/models/Grant.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,KAAK;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC9B"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=Grant.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Grant.js","sourceRoot":"","sources":["../../src/models/Grant.ts"],"names":[],"mappings":""}
@@ -0,0 +1,17 @@
1
+ export interface Location {
2
+ address_line1?: string | null;
3
+ address_line2?: string | null;
4
+ city?: string | null;
5
+ state?: string | null;
6
+ state_code?: string | null;
7
+ zip_code?: string | null;
8
+ zip?: string | null;
9
+ zip4?: string | null;
10
+ country?: string | null;
11
+ country_code?: string | null;
12
+ county?: string | null;
13
+ congressional_district?: string | null;
14
+ latitude?: number | null;
15
+ longitude?: number | null;
16
+ }
17
+ //# sourceMappingURL=Location.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Location.d.ts","sourceRoot":"","sources":["../../src/models/Location.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,QAAQ;IACvB,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,sBAAsB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvC,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=Location.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Location.js","sourceRoot":"","sources":["../../src/models/Location.ts"],"names":[],"mappings":""}
@@ -0,0 +1,9 @@
1
+ export interface Notice {
2
+ notice_id: string;
3
+ title: string;
4
+ solicitation_number?: string | null;
5
+ description?: string | null;
6
+ posted_date?: string | null;
7
+ naics_code?: string | null;
8
+ }
9
+ //# sourceMappingURL=Notice.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Notice.d.ts","sourceRoot":"","sources":["../../src/models/Notice.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,MAAM;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,mBAAmB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=Notice.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Notice.js","sourceRoot":"","sources":["../../src/models/Notice.ts"],"names":[],"mappings":""}
@@ -0,0 +1,11 @@
1
+ export interface Opportunity {
2
+ opportunity_id: string;
3
+ title: string;
4
+ solicitation_number?: string | null;
5
+ description?: string | null;
6
+ response_deadline?: string | null;
7
+ active?: boolean | null;
8
+ naics_code?: string | null;
9
+ psc_code?: string | null;
10
+ }
11
+ //# sourceMappingURL=Opportunity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Opportunity.d.ts","sourceRoot":"","sources":["../../src/models/Opportunity.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,WAAW;IAC1B,cAAc,EAAE,MAAM,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,mBAAmB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,MAAM,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IACxB,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=Opportunity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Opportunity.js","sourceRoot":"","sources":["../../src/models/Opportunity.ts"],"names":[],"mappings":""}
@@ -0,0 +1,12 @@
1
+ import { Location } from "./Location.js";
2
+ export interface RecipientProfile {
3
+ uei?: string | null;
4
+ cage_code?: string | null;
5
+ display_name?: string | null;
6
+ legal_business_name?: string | null;
7
+ parent_uei?: string | null;
8
+ parent_name?: string | null;
9
+ business_types?: string[] | null;
10
+ location?: Location | null;
11
+ }
12
+ //# sourceMappingURL=RecipientProfile.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RecipientProfile.d.ts","sourceRoot":"","sources":["../../src/models/RecipientProfile.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,MAAM,WAAW,gBAAgB;IAC/B,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,mBAAmB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,cAAc,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IACjC,QAAQ,CAAC,EAAE,QAAQ,GAAG,IAAI,CAAC;CAC5B"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=RecipientProfile.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RecipientProfile.js","sourceRoot":"","sources":["../../src/models/RecipientProfile.ts"],"names":[],"mappings":""}
@@ -0,0 +1,11 @@
1
+ export type { Agency } from "./Agency.js";
2
+ export type { Contract } from "./Contract.js";
3
+ export type { Department } from "./Department.js";
4
+ export type { Entity } from "./Entity.js";
5
+ export type { Forecast } from "./Forecast.js";
6
+ export type { Grant } from "./Grant.js";
7
+ export type { Location } from "./Location.js";
8
+ export type { Notice } from "./Notice.js";
9
+ export type { Opportunity } from "./Opportunity.js";
10
+ export type { RecipientProfile } from "./RecipientProfile.js";
11
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/models/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAC1C,YAAY,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAC9C,YAAY,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,YAAY,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAC1C,YAAY,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAC9C,YAAY,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACxC,YAAY,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAC9C,YAAY,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAC1C,YAAY,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACpD,YAAY,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/models/index.ts"],"names":[],"mappings":""}
@@ -0,0 +1,24 @@
1
+ import type { FieldSchemaMap, ExplicitSchemas } from "./schemaTypes.js";
2
+ export declare const OFFICE_SCHEMA: FieldSchemaMap;
3
+ export declare const LOCATION_SCHEMA: FieldSchemaMap;
4
+ export declare const PLACE_OF_PERFORMANCE_SCHEMA: FieldSchemaMap;
5
+ export declare const COMPETITION_SCHEMA: FieldSchemaMap;
6
+ export declare const PARENT_AWARD_SCHEMA: FieldSchemaMap;
7
+ export declare const LEGISLATIVE_MANDATES_SCHEMA: FieldSchemaMap;
8
+ export declare const SUBAWARDS_SUMMARY_SCHEMA: FieldSchemaMap;
9
+ export declare const TRANSACTION_SCHEMA: FieldSchemaMap;
10
+ export declare const DEPARTMENT_SCHEMA: FieldSchemaMap;
11
+ export declare const CONTACT_SCHEMA: FieldSchemaMap;
12
+ export declare const RECIPIENT_PROFILE_SCHEMA: FieldSchemaMap;
13
+ export declare const CONTRACT_SCHEMA: FieldSchemaMap;
14
+ export declare const ENTITY_SCHEMA: FieldSchemaMap;
15
+ export declare const FORECAST_SCHEMA: FieldSchemaMap;
16
+ export declare const OPPORTUNITY_SCHEMA: FieldSchemaMap;
17
+ export declare const NOTICE_SCHEMA: FieldSchemaMap;
18
+ export declare const AGENCY_SCHEMA: FieldSchemaMap;
19
+ export declare const CFDA_NUMBER_SCHEMA: FieldSchemaMap;
20
+ export declare const CODE_DESCRIPTION_SCHEMA: FieldSchemaMap;
21
+ export declare const GRANT_ATTACHMENT_SCHEMA: FieldSchemaMap;
22
+ export declare const GRANT_SCHEMA: FieldSchemaMap;
23
+ export declare const EXPLICIT_SCHEMAS: ExplicitSchemas;
24
+ //# sourceMappingURL=explicitSchemas.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"explicitSchemas.d.ts","sourceRoot":"","sources":["../../src/shapes/explicitSchemas.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAKxE,eAAO,MAAM,aAAa,EAAE,cAsB3B,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,cA2C7B,CAAC;AAEF,eAAO,MAAM,2BAA2B,EAAE,cA2CzC,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,cAkDhC,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,cA6BjC,CAAC;AAEF,eAAO,MAAM,2BAA2B,EAAE,cAyDzC,CAAC;AAEF,eAAO,MAAM,wBAAwB,EAAE,cAetC,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,cAoChC,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,cAsB/B,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,cAoC5B,CAAC;AAEF,eAAO,MAAM,wBAAwB,EAAE,cAyDtC,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,cAyY7B,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,cA2X3B,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,cAiH7B,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,cAsIhC,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,cA0G3B,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,cA6B3B,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,cAehC,CAAC;AAEF,eAAO,MAAM,uBAAuB,EAAE,cAerC,CAAC;AAEF,eAAO,MAAM,uBAAuB,EAAE,cAkDrC,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,cA+H1B,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,eAsB9B,CAAC"}