@greensecurity/javascript-sdk 0.49.0-beta.1 → 0.49.0-beta.10

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 (164) hide show
  1. package/README.md +1 -1
  2. package/dist/commonjs/__tests__/vendors.test.js +1 -1
  3. package/dist/commonjs/__tests__/vendors.test.js.map +1 -1
  4. package/dist/commonjs/__tests__/webhooks.test.js +5 -4
  5. package/dist/commonjs/__tests__/webhooks.test.js.map +1 -1
  6. package/dist/commonjs/__tests__/zones.test.js +9 -2
  7. package/dist/commonjs/__tests__/zones.test.js.map +1 -1
  8. package/dist/commonjs/admin-funcs/lookupsAddressAutocomplete.d.ts +1 -1
  9. package/dist/commonjs/admin-funcs/lookupsAddressAutocomplete.d.ts.map +1 -1
  10. package/dist/commonjs/admin-funcs/lookupsAddressAutocomplete.js +2 -1
  11. package/dist/commonjs/admin-funcs/lookupsAddressAutocomplete.js.map +1 -1
  12. package/dist/commonjs/admin-funcs/lookupsAddressPlace.d.ts +1 -1
  13. package/dist/commonjs/admin-funcs/lookupsAddressPlace.d.ts.map +1 -1
  14. package/dist/commonjs/admin-funcs/lookupsAddressPlace.js +4 -5
  15. package/dist/commonjs/admin-funcs/lookupsAddressPlace.js.map +1 -1
  16. package/dist/commonjs/admin-funcs/lookupsAddressValidation.d.ts +1 -1
  17. package/dist/commonjs/admin-funcs/lookupsAddressValidation.d.ts.map +1 -1
  18. package/dist/commonjs/admin-funcs/lookupsAddressValidation.js +1 -1
  19. package/dist/commonjs/admin-funcs/lookupsAddressValidation.js.map +1 -1
  20. package/dist/commonjs/admin-funcs/registerCompanies.d.ts +16 -1
  21. package/dist/commonjs/admin-funcs/registerCompanies.d.ts.map +1 -1
  22. package/dist/commonjs/admin-funcs/registerCompanies.js +10 -0
  23. package/dist/commonjs/admin-funcs/registerCompanies.js.map +1 -1
  24. package/dist/commonjs/admin-funcs/registerGeneralInfo.d.ts +5 -4
  25. package/dist/commonjs/admin-funcs/registerGeneralInfo.d.ts.map +1 -1
  26. package/dist/commonjs/admin-funcs/registerGeneralInfo.js.map +1 -1
  27. package/dist/commonjs/admin-funcs/registerPassword.d.ts +2 -1
  28. package/dist/commonjs/admin-funcs/registerPassword.d.ts.map +1 -1
  29. package/dist/commonjs/admin-funcs/registerPassword.js.map +1 -1
  30. package/dist/commonjs/admin-funcs/subscriptionUpdatePaymentProfile.d.ts +2 -0
  31. package/dist/commonjs/admin-funcs/subscriptionUpdatePaymentProfile.d.ts.map +1 -1
  32. package/dist/commonjs/admin-funcs/subscriptionUpdatePaymentProfile.js.map +1 -1
  33. package/dist/commonjs/funcs/companiesLookupCompanies.js +2 -0
  34. package/dist/commonjs/funcs/companiesLookupCompanies.js.map +1 -1
  35. package/dist/commonjs/index.extras.d.ts +3 -5
  36. package/dist/commonjs/index.extras.d.ts.map +1 -1
  37. package/dist/commonjs/index.extras.js +3 -5
  38. package/dist/commonjs/index.extras.js.map +1 -1
  39. package/dist/commonjs/lib/config.d.ts +3 -3
  40. package/dist/commonjs/lib/config.js +3 -3
  41. package/dist/commonjs/lib/config.js.map +1 -1
  42. package/dist/commonjs/lib/env.d.ts.map +1 -1
  43. package/dist/commonjs/lib/env.js +4 -1
  44. package/dist/commonjs/lib/env.js.map +1 -1
  45. package/dist/commonjs/models/components/companylookup.d.ts +21 -1
  46. package/dist/commonjs/models/components/companylookup.d.ts.map +1 -1
  47. package/dist/commonjs/models/components/companylookup.js +5 -0
  48. package/dist/commonjs/models/components/companylookup.js.map +1 -1
  49. package/dist/commonjs/models/operations/createvendor.d.ts +0 -5
  50. package/dist/commonjs/models/operations/createvendor.d.ts.map +1 -1
  51. package/dist/commonjs/models/operations/createvendor.js +0 -1
  52. package/dist/commonjs/models/operations/createvendor.js.map +1 -1
  53. package/dist/commonjs/models/operations/lookupcompanies.d.ts +13 -0
  54. package/dist/commonjs/models/operations/lookupcompanies.d.ts.map +1 -1
  55. package/dist/commonjs/models/operations/lookupcompanies.js +4 -0
  56. package/dist/commonjs/models/operations/lookupcompanies.js.map +1 -1
  57. package/dist/commonjs/react-query/companiesLookupCompanies.core.d.ts +4 -0
  58. package/dist/commonjs/react-query/companiesLookupCompanies.core.d.ts.map +1 -1
  59. package/dist/commonjs/react-query/companiesLookupCompanies.core.js +4 -0
  60. package/dist/commonjs/react-query/companiesLookupCompanies.core.js.map +1 -1
  61. package/dist/commonjs/react-query/companiesLookupCompanies.d.ts +4 -0
  62. package/dist/commonjs/react-query/companiesLookupCompanies.d.ts.map +1 -1
  63. package/dist/commonjs/react-query/companiesLookupCompanies.js.map +1 -1
  64. package/dist/esm/__tests__/vendors.test.js +1 -1
  65. package/dist/esm/__tests__/vendors.test.js.map +1 -1
  66. package/dist/esm/__tests__/webhooks.test.js +5 -4
  67. package/dist/esm/__tests__/webhooks.test.js.map +1 -1
  68. package/dist/esm/__tests__/zones.test.js +9 -2
  69. package/dist/esm/__tests__/zones.test.js.map +1 -1
  70. package/dist/esm/admin-funcs/lookupsAddressAutocomplete.d.ts +1 -1
  71. package/dist/esm/admin-funcs/lookupsAddressAutocomplete.d.ts.map +1 -1
  72. package/dist/esm/admin-funcs/lookupsAddressAutocomplete.js +2 -1
  73. package/dist/esm/admin-funcs/lookupsAddressAutocomplete.js.map +1 -1
  74. package/dist/esm/admin-funcs/lookupsAddressPlace.d.ts +1 -1
  75. package/dist/esm/admin-funcs/lookupsAddressPlace.d.ts.map +1 -1
  76. package/dist/esm/admin-funcs/lookupsAddressPlace.js +4 -5
  77. package/dist/esm/admin-funcs/lookupsAddressPlace.js.map +1 -1
  78. package/dist/esm/admin-funcs/lookupsAddressValidation.d.ts +1 -1
  79. package/dist/esm/admin-funcs/lookupsAddressValidation.d.ts.map +1 -1
  80. package/dist/esm/admin-funcs/lookupsAddressValidation.js +1 -1
  81. package/dist/esm/admin-funcs/lookupsAddressValidation.js.map +1 -1
  82. package/dist/esm/admin-funcs/registerCompanies.d.ts +16 -1
  83. package/dist/esm/admin-funcs/registerCompanies.d.ts.map +1 -1
  84. package/dist/esm/admin-funcs/registerCompanies.js +9 -1
  85. package/dist/esm/admin-funcs/registerCompanies.js.map +1 -1
  86. package/dist/esm/admin-funcs/registerGeneralInfo.d.ts +5 -4
  87. package/dist/esm/admin-funcs/registerGeneralInfo.d.ts.map +1 -1
  88. package/dist/esm/admin-funcs/registerGeneralInfo.js.map +1 -1
  89. package/dist/esm/admin-funcs/registerPassword.d.ts +2 -1
  90. package/dist/esm/admin-funcs/registerPassword.d.ts.map +1 -1
  91. package/dist/esm/admin-funcs/registerPassword.js.map +1 -1
  92. package/dist/esm/admin-funcs/subscriptionUpdatePaymentProfile.d.ts +2 -0
  93. package/dist/esm/admin-funcs/subscriptionUpdatePaymentProfile.d.ts.map +1 -1
  94. package/dist/esm/admin-funcs/subscriptionUpdatePaymentProfile.js.map +1 -1
  95. package/dist/esm/funcs/companiesLookupCompanies.js +2 -0
  96. package/dist/esm/funcs/companiesLookupCompanies.js.map +1 -1
  97. package/dist/esm/index.extras.d.ts +3 -5
  98. package/dist/esm/index.extras.d.ts.map +1 -1
  99. package/dist/esm/index.extras.js +4 -6
  100. package/dist/esm/index.extras.js.map +1 -1
  101. package/dist/esm/lib/config.d.ts +3 -3
  102. package/dist/esm/lib/config.js +3 -3
  103. package/dist/esm/lib/config.js.map +1 -1
  104. package/dist/esm/lib/env.d.ts.map +1 -1
  105. package/dist/esm/lib/env.js +4 -1
  106. package/dist/esm/lib/env.js.map +1 -1
  107. package/dist/esm/models/components/companylookup.d.ts +21 -1
  108. package/dist/esm/models/components/companylookup.d.ts.map +1 -1
  109. package/dist/esm/models/components/companylookup.js +5 -0
  110. package/dist/esm/models/components/companylookup.js.map +1 -1
  111. package/dist/esm/models/operations/createvendor.d.ts +0 -5
  112. package/dist/esm/models/operations/createvendor.d.ts.map +1 -1
  113. package/dist/esm/models/operations/createvendor.js +0 -1
  114. package/dist/esm/models/operations/createvendor.js.map +1 -1
  115. package/dist/esm/models/operations/lookupcompanies.d.ts +13 -0
  116. package/dist/esm/models/operations/lookupcompanies.d.ts.map +1 -1
  117. package/dist/esm/models/operations/lookupcompanies.js +4 -0
  118. package/dist/esm/models/operations/lookupcompanies.js.map +1 -1
  119. package/dist/esm/react-query/companiesLookupCompanies.core.d.ts +4 -0
  120. package/dist/esm/react-query/companiesLookupCompanies.core.d.ts.map +1 -1
  121. package/dist/esm/react-query/companiesLookupCompanies.core.js +4 -0
  122. package/dist/esm/react-query/companiesLookupCompanies.core.js.map +1 -1
  123. package/dist/esm/react-query/companiesLookupCompanies.d.ts +4 -0
  124. package/dist/esm/react-query/companiesLookupCompanies.d.ts.map +1 -1
  125. package/dist/esm/react-query/companiesLookupCompanies.js.map +1 -1
  126. package/jsr.json +1 -1
  127. package/package.json +2 -2
  128. package/src/__tests__/vendors.test.ts +1 -1
  129. package/src/__tests__/webhooks.test.ts +5 -4
  130. package/src/__tests__/zones.test.ts +9 -2
  131. package/src/admin-funcs/lookupsAddressAutocomplete.ts +2 -2
  132. package/src/admin-funcs/lookupsAddressPlace.ts +4 -6
  133. package/src/admin-funcs/lookupsAddressValidation.ts +3 -2
  134. package/src/admin-funcs/registerCompanies.ts +22 -2
  135. package/src/admin-funcs/registerGeneralInfo.ts +5 -4
  136. package/src/admin-funcs/registerPassword.ts +2 -1
  137. package/src/admin-funcs/subscriptionUpdatePaymentProfile.ts +3 -0
  138. package/src/funcs/companiesLookupCompanies.ts +2 -0
  139. package/src/index.extras.ts +8 -6
  140. package/src/lib/config.ts +3 -3
  141. package/src/lib/env.ts +7 -1
  142. package/src/models/components/companylookup.ts +26 -1
  143. package/src/models/operations/createvendor.ts +0 -6
  144. package/src/models/operations/lookupcompanies.ts +17 -0
  145. package/src/react-query/companiesLookupCompanies.core.ts +8 -0
  146. package/src/react-query/companiesLookupCompanies.ts +4 -0
  147. package/dist/commonjs/admin-funcs/companyManagerGetPaymentForm.d.ts +0 -3
  148. package/dist/commonjs/admin-funcs/companyManagerGetPaymentForm.d.ts.map +0 -1
  149. package/dist/commonjs/admin-funcs/companyManagerGetPaymentForm.js +0 -9
  150. package/dist/commonjs/admin-funcs/companyManagerGetPaymentForm.js.map +0 -1
  151. package/dist/commonjs/admin-funcs/vendorGetPaymentForm.d.ts +0 -3
  152. package/dist/commonjs/admin-funcs/vendorGetPaymentForm.d.ts.map +0 -1
  153. package/dist/commonjs/admin-funcs/vendorGetPaymentForm.js +0 -9
  154. package/dist/commonjs/admin-funcs/vendorGetPaymentForm.js.map +0 -1
  155. package/dist/esm/admin-funcs/companyManagerGetPaymentForm.d.ts +0 -3
  156. package/dist/esm/admin-funcs/companyManagerGetPaymentForm.d.ts.map +0 -1
  157. package/dist/esm/admin-funcs/companyManagerGetPaymentForm.js +0 -6
  158. package/dist/esm/admin-funcs/companyManagerGetPaymentForm.js.map +0 -1
  159. package/dist/esm/admin-funcs/vendorGetPaymentForm.d.ts +0 -3
  160. package/dist/esm/admin-funcs/vendorGetPaymentForm.d.ts.map +0 -1
  161. package/dist/esm/admin-funcs/vendorGetPaymentForm.js +0 -6
  162. package/dist/esm/admin-funcs/vendorGetPaymentForm.js.map +0 -1
  163. package/src/admin-funcs/companyManagerGetPaymentForm.ts +0 -6
  164. package/src/admin-funcs/vendorGetPaymentForm.ts +0 -6
@@ -1,9 +1,9 @@
1
1
  import { APIPromise } from "../types/async.js";
2
- import { $doPost, internalApiResult } from "./doAdmin.js";
2
+ import { $doGetSingle, $doPost, internalApiResult } from "./doAdmin.js";
3
3
 
4
4
  export type companyPayload = {
5
5
  name: string;
6
- contact_name: string;
6
+ contact_name?: string;
7
7
  contact_email: string;
8
8
  address: string;
9
9
  city: string;
@@ -21,3 +21,23 @@ export function submitCompany(request: companyPayload): internalApiResult {
21
21
  request
22
22
  ));
23
23
  }
24
+
25
+ /** Add-company values read from a website's JSON-LD. Resolves to `{ company }`, `{}` when nothing was found. */
26
+ export function prefillCompany(request: { website: string }): internalApiResult {
27
+ return new APIPromise($doGetSingle("/vendors/register/companies/prefill", request));
28
+ }
29
+
30
+ export type registrationSupervisor = {
31
+ name: string;
32
+ email: string;
33
+ phone: string | null;
34
+ kind: "company_manager" | "supervisor";
35
+ };
36
+
37
+ /** Supervisor suggestions for a company whose name has a word starting with `q` (2+ chars). Resolves to `{ items }`. */
38
+ export function getCompanySupervisors(request: { company_id: number; q: string }): internalApiResult {
39
+ return new APIPromise($doGetSingle(
40
+ "/vendors/register/companies/" + request.company_id + "/supervisors",
41
+ { q: request.q }
42
+ ));
43
+ }
@@ -2,7 +2,6 @@ import { APIPromise } from "../types/async.js";
2
2
  import { $doPost, internalApiResult } from "./doAdmin.js";
3
3
 
4
4
  export type formInputs = {
5
- federal: string;
6
5
  first_name: string;
7
6
  last_name: string;
8
7
  vendor_job_id: number;
@@ -11,9 +10,11 @@ export type formInputs = {
11
10
  fax: string;
12
11
  timezone: string;
13
12
  company_id: string;
14
- supervisor_name: string;
15
- supervisor_email: string;
16
- supervisor_phone: string;
13
+ /** When true the supervisor fields are omitted and cleared. */
14
+ no_supervisor?: boolean;
15
+ supervisor_name?: string;
16
+ supervisor_email?: string;
17
+ supervisor_phone?: string;
17
18
  /** Contact emails; the login stays the email the vendor registered with, which must be one of the two. */
18
19
  work_email?: string;
19
20
  personal_email?: string;
@@ -3,7 +3,8 @@ import { $doPost, internalApiResult } from "./doAdmin.js";
3
3
 
4
4
  export type passwordRegisterData = {
5
5
  password: string | null;
6
- password_confirm: string | null;
6
+ /** Omitted by the single-field form. */
7
+ password_confirm?: string | null;
7
8
  };
8
9
 
9
10
  export function submitPassword(request: passwordRegisterData): internalApiResult {
@@ -8,6 +8,9 @@ export type subscriptionUpdatePaymentProfileRequest = {
8
8
  first_name?: string;
9
9
  last_name?: string;
10
10
  address?: string;
11
+ address2?: string;
12
+ // From POST /lookups/address-validation. Required when the country is one Google can validate.
13
+ address_verification_hash?: string;
11
14
  city?: string;
12
15
  state?: string;
13
16
  zip?: string;
@@ -113,9 +113,11 @@ async function $do(
113
113
  const query = encodeFormQuery({
114
114
  "desc": payload.desc,
115
115
  "items_per_page": payload.items_per_page,
116
+ "match_email_domain": payload.match_email_domain,
116
117
  "name_like": payload.name_like,
117
118
  "page": payload.page,
118
119
  "sort": payload.sort,
120
+ "tax_id": payload.tax_id,
119
121
  });
120
122
 
121
123
  const headers = new Headers(compactMap({
@@ -32,7 +32,11 @@ import { handoffStayAlive } from "./admin-funcs/handoffStayAlive.js";
32
32
  import { submitEmailStep } from "./admin-funcs/registerEmail.js";
33
33
  import { submitPassword } from "./admin-funcs/registerPassword.js";
34
34
  import { submitGeneralInfo } from "./admin-funcs/registerGeneralInfo.js";
35
- import { submitCompany } from "./admin-funcs/registerCompanies.js";
35
+ import {
36
+ getCompanySupervisors,
37
+ prefillCompany,
38
+ submitCompany,
39
+ } from "./admin-funcs/registerCompanies.js";
36
40
  import {
37
41
  clearComplete,
38
42
  clearCreateSession,
@@ -49,10 +53,8 @@ import { smartBadgeReportVerifiedPsk } from "./admin-funcs/smartBadgeReportVerif
49
53
  import { notifyVendorCredentialFileUploaded } from "./admin-funcs/notifyVendorCredentialFileUploaded.js";
50
54
  import { vendorCredentialGetFormLineItems } from "./admin-funcs/vendorCredentialGetFormLineItems.js";
51
55
  import { vendorCredentialCreateFormQuote } from "./admin-funcs/vendorCredentialCreateFormQuote.js";
52
- import { companyManagerGetPaymentForm } from "./admin-funcs/companyManagerGetPaymentForm.js";
53
56
  import { companyManagerGetAutopay } from "./admin-funcs/companyManagerGetAutopay.js";
54
57
  import { companyManagerUpdateAutopay } from "./admin-funcs/companyManagerUpdateAutopay.js";
55
- import { vendorGetPaymentForm } from "./admin-funcs/vendorGetPaymentForm.js";
56
58
  import { vendorGetSystemsRequiringSmartBadge } from "./admin-funcs/vendorGetSystemsRequiringSmartBadge.js";
57
59
  import { vendorGetCompanyCredentialsSummary } from "./admin-funcs/vendorGetCompanyCredentialsSummary.js";
58
60
 
@@ -136,7 +138,9 @@ export const __internal = {
136
138
  submitEmailStep,
137
139
  submitPassword,
138
140
  submitGeneralInfo,
139
- submitCompany
141
+ submitCompany,
142
+ prefillCompany,
143
+ getCompanySupervisors
140
144
  },
141
145
 
142
146
  clear: {
@@ -183,13 +187,11 @@ export const __internal = {
183
187
  },
184
188
 
185
189
  companyManager: {
186
- getPaymentForm: companyManagerGetPaymentForm,
187
190
  getAutopay: companyManagerGetAutopay,
188
191
  updateAutopay: companyManagerUpdateAutopay,
189
192
  },
190
193
 
191
194
  vendor: {
192
- getPaymentForm: vendorGetPaymentForm,
193
195
  getSystemsRequiringSmartBadge: vendorGetSystemsRequiringSmartBadge,
194
196
  getCompanyCredentialsSummary: vendorGetCompanyCredentialsSummary
195
197
  },
package/src/lib/config.ts CHANGED
@@ -80,8 +80,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
80
80
  export const SDK_METADATA = {
81
81
  language: "typescript",
82
82
  openapiDocVersion: "0.48.0",
83
- sdkVersion: "0.49.0-beta.1",
84
- genVersion: "2.956.1",
83
+ sdkVersion: "0.49.0-beta.10",
84
+ genVersion: "2.960.8",
85
85
  userAgent:
86
- "speakeasy-sdk/typescript 0.49.0-beta.1 2.956.1 0.48.0 @greensecurity/javascript-sdk",
86
+ "speakeasy-sdk/typescript 0.49.0-beta.10 2.960.8 0.48.0 @greensecurity/javascript-sdk",
87
87
  } as const;
package/src/lib/env.ts CHANGED
@@ -15,9 +15,15 @@ export const envSchema: z.ZodType<Env, z.ZodTypeDef, unknown> = z.object({
15
15
  GREEN_SECURITY_TOKEN: z.string().optional(),
16
16
  GREEN_SECURITY_BEARER_JWT: z.string().optional(),
17
17
 
18
- GREEN_SECURITY_DEBUG: z.coerce.boolean().optional(),
18
+ GREEN_SECURITY_DEBUG: z.unknown().transform(parseEnvFlag).optional(),
19
19
  });
20
20
 
21
+ function parseEnvFlag(value: unknown): boolean {
22
+ return ["true", "1", "yes", "on"].includes(
23
+ String(value).trim().toLowerCase(),
24
+ );
25
+ }
26
+
21
27
  /**
22
28
  * Checks for the existence of the Deno global object to determine the environment.
23
29
  * @returns {boolean} True if the runtime is Deno, false otherwise.
@@ -9,7 +9,7 @@ import * as types from "../../types/primitives.js";
9
9
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
10
 
11
11
  /**
12
- * A minimal reference to a company, used in lookups.
12
+ * A minimal reference to a company, used in lookups. Never includes the tax ID.
13
13
  */
14
14
  export type CompanyLookup = {
15
15
  /**
@@ -20,6 +20,26 @@ export type CompanyLookup = {
20
20
  * The name of the company, or `null` if none.
21
21
  */
22
22
  name: string | null;
23
+ /**
24
+ * The company status, such as `Active`, or `Inactive` while it awaits review.
25
+ */
26
+ status?: string | null | undefined;
27
+ /**
28
+ * The company's first email domain, else its website host, or `null` if neither.
29
+ */
30
+ domain?: string | null | undefined;
31
+ /**
32
+ * The company website, or `null` if none.
33
+ */
34
+ website?: string | null | undefined;
35
+ /**
36
+ * The company city, or `null` if none.
37
+ */
38
+ city?: string | null | undefined;
39
+ /**
40
+ * The company state or province, or `null` if none.
41
+ */
42
+ state?: string | null | undefined;
23
43
  };
24
44
 
25
45
  /** @internal */
@@ -30,6 +50,11 @@ export const CompanyLookup$inboundSchema: z.ZodType<
30
50
  > = z.object({
31
51
  id: types.number(),
32
52
  name: types.nullable(types.string()),
53
+ status: z.nullable(types.string()).optional(),
54
+ domain: z.nullable(types.string()).optional(),
55
+ website: z.nullable(types.string()).optional(),
56
+ city: z.nullable(types.string()).optional(),
57
+ state: z.nullable(types.string()).optional(),
33
58
  });
34
59
 
35
60
  export function companyLookupFromJSON(
@@ -49,10 +49,6 @@ export type CreateVendorRequestBody = {
49
49
  * Rails timezone name (for example, Eastern Time (US and Canada))
50
50
  */
51
51
  timezone?: string | undefined;
52
- /**
53
- * Whether a federal agency has listed the vendor as disbarred or excluded
54
- */
55
- federal?: boolean | undefined;
56
52
  /**
57
53
  * ID of the vendor's primary facility
58
54
  */
@@ -122,7 +118,6 @@ export type CreateVendorRequestBody$Outbound = {
122
118
  mobile_phone?: string | undefined;
123
119
  fax?: string | undefined;
124
120
  timezone?: string | undefined;
125
- federal?: boolean | undefined;
126
121
  primary_facility_id: number;
127
122
  supervisor_name: string;
128
123
  supervisor_email: string;
@@ -150,7 +145,6 @@ export const CreateVendorRequestBody$outboundSchema: z.ZodType<
150
145
  mobilePhone: z.string().optional(),
151
146
  fax: z.string().optional(),
152
147
  timezone: z.string().optional(),
153
- federal: z.boolean().optional(),
154
148
  primaryFacilityId: z.number().int(),
155
149
  supervisorName: z.string(),
156
150
  supervisorEmail: z.string(),
@@ -30,6 +30,17 @@ export type LookupCompaniesRequest = {
30
30
  * A partial string to search in the object name. Do not include any wildcard characters. Searches are not case-sensitive by default.
31
31
  */
32
32
  nameLike?: string | undefined;
33
+ /**
34
+ * Only the company holding this federal tax ID (EIN or SSN format, dash optional).
35
+ */
36
+ taxId?: string | undefined;
37
+ /**
38
+ * Only companies that own the caller's login email domain, or whose vendors sign in with it.
39
+ *
40
+ * @remarks
41
+ * Free-mail domains such as gmail.com match nothing.
42
+ */
43
+ matchEmailDomain?: boolean | undefined;
33
44
  };
34
45
 
35
46
  /**
@@ -54,6 +65,8 @@ export type LookupCompaniesRequest$Outbound = {
54
65
  page?: number | undefined;
55
66
  items_per_page: number;
56
67
  name_like?: string | undefined;
68
+ tax_id?: string | undefined;
69
+ match_email_domain?: boolean | undefined;
57
70
  };
58
71
 
59
72
  /** @internal */
@@ -67,10 +80,14 @@ export const LookupCompaniesRequest$outboundSchema: z.ZodType<
67
80
  page: z.number().int().optional(),
68
81
  itemsPerPage: z.number().int().default(25),
69
82
  nameLike: z.string().optional(),
83
+ taxId: z.string().optional(),
84
+ matchEmailDomain: z.boolean().optional(),
70
85
  }).transform((v) => {
71
86
  return remap$(v, {
72
87
  itemsPerPage: "items_per_page",
73
88
  nameLike: "name_like",
89
+ taxId: "tax_id",
90
+ matchEmailDomain: "match_email_domain",
74
91
  });
75
92
  });
76
93
 
@@ -80,6 +80,8 @@ export function buildCompaniesLookupCompaniesQuery(
80
80
  page: request.page,
81
81
  itemsPerPage: request.itemsPerPage,
82
82
  nameLike: request.nameLike,
83
+ taxId: request.taxId,
84
+ matchEmailDomain: request.matchEmailDomain,
83
85
  }),
84
86
  queryFn: async function companiesLookupCompaniesQueryFn(
85
87
  ctx,
@@ -121,6 +123,8 @@ export function buildCompaniesLookupCompaniesInfiniteQuery(
121
123
  page: request.page,
122
124
  itemsPerPage: request.itemsPerPage,
123
125
  nameLike: request.nameLike,
126
+ taxId: request.taxId,
127
+ matchEmailDomain: request.matchEmailDomain,
124
128
  }),
125
129
  queryFn: async function companiesLookupCompaniesQuery(
126
130
  ctx,
@@ -159,6 +163,8 @@ export function queryKeyCompaniesLookupCompanies(
159
163
  page?: number | undefined;
160
164
  itemsPerPage?: number | undefined;
161
165
  nameLike?: string | undefined;
166
+ taxId?: string | undefined;
167
+ matchEmailDomain?: boolean | undefined;
162
168
  },
163
169
  ): QueryKey {
164
170
  return [
@@ -176,6 +182,8 @@ export function queryKeyCompaniesLookupCompaniesInfinite(
176
182
  page?: number | undefined;
177
183
  itemsPerPage?: number | undefined;
178
184
  nameLike?: string | undefined;
185
+ taxId?: string | undefined;
186
+ matchEmailDomain?: boolean | undefined;
179
187
  },
180
188
  ): QueryKey {
181
189
  return [
@@ -236,6 +236,8 @@ export function setCompaniesLookupCompaniesData(
236
236
  page?: number | undefined;
237
237
  itemsPerPage?: number | undefined;
238
238
  nameLike?: string | undefined;
239
+ taxId?: string | undefined;
240
+ matchEmailDomain?: boolean | undefined;
239
241
  },
240
242
  ],
241
243
  data: CompaniesLookupCompaniesQueryData,
@@ -254,6 +256,8 @@ export function invalidateCompaniesLookupCompanies(
254
256
  page?: number | undefined;
255
257
  itemsPerPage?: number | undefined;
256
258
  nameLike?: string | undefined;
259
+ taxId?: string | undefined;
260
+ matchEmailDomain?: boolean | undefined;
257
261
  }]
258
262
  >,
259
263
  filters?: Omit<InvalidateQueryFilters, "queryKey" | "predicate" | "exact">,
@@ -1,3 +0,0 @@
1
- import { internalApiResult } from "./doAdmin.js";
2
- export declare function companyManagerGetPaymentForm(): internalApiResult;
3
- //# sourceMappingURL=companyManagerGetPaymentForm.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"companyManagerGetPaymentForm.d.ts","sourceRoot":"","sources":["../../../src/admin-funcs/companyManagerGetPaymentForm.ts"],"names":[],"mappings":"AACA,OAAO,EAAgB,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAE/D,wBAAgB,4BAA4B,IAAI,iBAAiB,CAEhE"}
@@ -1,9 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.companyManagerGetPaymentForm = companyManagerGetPaymentForm;
4
- const async_js_1 = require("../types/async.js");
5
- const doAdmin_js_1 = require("./doAdmin.js");
6
- function companyManagerGetPaymentForm() {
7
- return new async_js_1.APIPromise((0, doAdmin_js_1.$doGetSingle)("/company_managers/me/payment_form", {}));
8
- }
9
- //# sourceMappingURL=companyManagerGetPaymentForm.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"companyManagerGetPaymentForm.js","sourceRoot":"","sources":["../../../src/admin-funcs/companyManagerGetPaymentForm.ts"],"names":[],"mappings":";;AAGA,oEAEC;AALD,gDAA+C;AAC/C,6CAA+D;AAE/D,SAAgB,4BAA4B;IAC1C,OAAO,IAAI,qBAAU,CAAC,IAAA,yBAAY,EAAC,mCAAmC,EAAE,EAAE,CAAC,CAAC,CAAC;AAC/E,CAAC"}
@@ -1,3 +0,0 @@
1
- import { internalApiResult } from "./doAdmin.js";
2
- export declare function vendorGetPaymentForm(): internalApiResult;
3
- //# sourceMappingURL=vendorGetPaymentForm.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"vendorGetPaymentForm.d.ts","sourceRoot":"","sources":["../../../src/admin-funcs/vendorGetPaymentForm.ts"],"names":[],"mappings":"AACA,OAAO,EAAgB,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAE/D,wBAAgB,oBAAoB,IAAI,iBAAiB,CAExD"}
@@ -1,9 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.vendorGetPaymentForm = vendorGetPaymentForm;
4
- const async_js_1 = require("../types/async.js");
5
- const doAdmin_js_1 = require("./doAdmin.js");
6
- function vendorGetPaymentForm() {
7
- return new async_js_1.APIPromise((0, doAdmin_js_1.$doGetSingle)("/vendors/me/payment_form", {}));
8
- }
9
- //# sourceMappingURL=vendorGetPaymentForm.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"vendorGetPaymentForm.js","sourceRoot":"","sources":["../../../src/admin-funcs/vendorGetPaymentForm.ts"],"names":[],"mappings":";;AAGA,oDAEC;AALD,gDAA+C;AAC/C,6CAA+D;AAE/D,SAAgB,oBAAoB;IAClC,OAAO,IAAI,qBAAU,CAAC,IAAA,yBAAY,EAAC,0BAA0B,EAAE,EAAE,CAAC,CAAC,CAAC;AACtE,CAAC"}
@@ -1,3 +0,0 @@
1
- import { internalApiResult } from "./doAdmin.js";
2
- export declare function companyManagerGetPaymentForm(): internalApiResult;
3
- //# sourceMappingURL=companyManagerGetPaymentForm.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"companyManagerGetPaymentForm.d.ts","sourceRoot":"","sources":["../../../src/admin-funcs/companyManagerGetPaymentForm.ts"],"names":[],"mappings":"AACA,OAAO,EAAgB,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAE/D,wBAAgB,4BAA4B,IAAI,iBAAiB,CAEhE"}
@@ -1,6 +0,0 @@
1
- import { APIPromise } from "../types/async.js";
2
- import { $doGetSingle } from "./doAdmin.js";
3
- export function companyManagerGetPaymentForm() {
4
- return new APIPromise($doGetSingle("/company_managers/me/payment_form", {}));
5
- }
6
- //# sourceMappingURL=companyManagerGetPaymentForm.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"companyManagerGetPaymentForm.js","sourceRoot":"","sources":["../../../src/admin-funcs/companyManagerGetPaymentForm.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAqB,MAAM,cAAc,CAAC;AAE/D,MAAM,UAAU,4BAA4B;IAC1C,OAAO,IAAI,UAAU,CAAC,YAAY,CAAC,mCAAmC,EAAE,EAAE,CAAC,CAAC,CAAC;AAC/E,CAAC"}
@@ -1,3 +0,0 @@
1
- import { internalApiResult } from "./doAdmin.js";
2
- export declare function vendorGetPaymentForm(): internalApiResult;
3
- //# sourceMappingURL=vendorGetPaymentForm.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"vendorGetPaymentForm.d.ts","sourceRoot":"","sources":["../../../src/admin-funcs/vendorGetPaymentForm.ts"],"names":[],"mappings":"AACA,OAAO,EAAgB,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAE/D,wBAAgB,oBAAoB,IAAI,iBAAiB,CAExD"}
@@ -1,6 +0,0 @@
1
- import { APIPromise } from "../types/async.js";
2
- import { $doGetSingle } from "./doAdmin.js";
3
- export function vendorGetPaymentForm() {
4
- return new APIPromise($doGetSingle("/vendors/me/payment_form", {}));
5
- }
6
- //# sourceMappingURL=vendorGetPaymentForm.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"vendorGetPaymentForm.js","sourceRoot":"","sources":["../../../src/admin-funcs/vendorGetPaymentForm.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAqB,MAAM,cAAc,CAAC;AAE/D,MAAM,UAAU,oBAAoB;IAClC,OAAO,IAAI,UAAU,CAAC,YAAY,CAAC,0BAA0B,EAAE,EAAE,CAAC,CAAC,CAAC;AACtE,CAAC"}
@@ -1,6 +0,0 @@
1
- import { APIPromise } from "../types/async.js";
2
- import { $doGetSingle, internalApiResult } from "./doAdmin.js";
3
-
4
- export function companyManagerGetPaymentForm(): internalApiResult {
5
- return new APIPromise($doGetSingle("/company_managers/me/payment_form", {}));
6
- }
@@ -1,6 +0,0 @@
1
- import { APIPromise } from "../types/async.js";
2
- import { $doGetSingle, internalApiResult } from "./doAdmin.js";
3
-
4
- export function vendorGetPaymentForm(): internalApiResult {
5
- return new APIPromise($doGetSingle("/vendors/me/payment_form", {}));
6
- }