@bluehive/sdk 0.1.0-alpha.10 → 0.1.0-alpha.11

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 (113) hide show
  1. package/CHANGELOG.md +77 -0
  2. package/client.d.mts +15 -0
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +15 -0
  5. package/client.d.ts.map +1 -1
  6. package/client.js +17 -2
  7. package/client.js.map +1 -1
  8. package/client.mjs +17 -2
  9. package/client.mjs.map +1 -1
  10. package/internal/to-file.d.mts +1 -1
  11. package/internal/to-file.d.ts +1 -1
  12. package/internal/to-file.js +1 -1
  13. package/internal/to-file.mjs +1 -1
  14. package/internal/tslib.js +17 -17
  15. package/internal/utils/values.js +3 -3
  16. package/internal/utils/values.js.map +1 -1
  17. package/internal/utils/values.mjs +3 -3
  18. package/internal/utils/values.mjs.map +1 -1
  19. package/package.json +1 -1
  20. package/resources/employees.d.mts +463 -0
  21. package/resources/employees.d.mts.map +1 -0
  22. package/resources/employees.d.ts +463 -0
  23. package/resources/employees.d.ts.map +1 -0
  24. package/resources/employees.js +53 -0
  25. package/resources/employees.js.map +1 -0
  26. package/resources/employees.mjs +49 -0
  27. package/resources/employees.mjs.map +1 -0
  28. package/resources/employers/employers.d.mts +88 -0
  29. package/resources/employers/employers.d.mts.map +1 -0
  30. package/resources/employers/employers.d.ts +88 -0
  31. package/resources/employers/employers.d.ts.map +1 -0
  32. package/resources/employers/employers.js +41 -0
  33. package/resources/employers/employers.js.map +1 -0
  34. package/resources/employers/employers.mjs +36 -0
  35. package/resources/employers/employers.mjs.map +1 -0
  36. package/resources/employers/index.d.mts +3 -0
  37. package/resources/employers/index.d.mts.map +1 -0
  38. package/resources/employers/index.d.ts +3 -0
  39. package/resources/employers/index.d.ts.map +1 -0
  40. package/resources/employers/index.js +9 -0
  41. package/resources/employers/index.js.map +1 -0
  42. package/resources/employers/index.mjs +4 -0
  43. package/resources/employers/index.mjs.map +1 -0
  44. package/resources/employers/service-bundles.d.mts +110 -0
  45. package/resources/employers/service-bundles.d.mts.map +1 -0
  46. package/resources/employers/service-bundles.d.ts +110 -0
  47. package/resources/employers/service-bundles.d.ts.map +1 -0
  48. package/resources/employers/service-bundles.js +47 -0
  49. package/resources/employers/service-bundles.js.map +1 -0
  50. package/resources/employers/service-bundles.mjs +43 -0
  51. package/resources/employers/service-bundles.mjs.map +1 -0
  52. package/resources/employers.d.mts +2 -0
  53. package/resources/employers.d.mts.map +1 -0
  54. package/resources/employers.d.ts +2 -0
  55. package/resources/employers.d.ts.map +1 -0
  56. package/resources/employers.js +6 -0
  57. package/resources/employers.js.map +1 -0
  58. package/resources/employers.mjs +3 -0
  59. package/resources/employers.mjs.map +1 -0
  60. package/resources/fax.d.mts +3 -1
  61. package/resources/fax.d.mts.map +1 -1
  62. package/resources/fax.d.ts +3 -1
  63. package/resources/fax.d.ts.map +1 -1
  64. package/resources/hl7.d.mts +82 -0
  65. package/resources/hl7.d.mts.map +1 -0
  66. package/resources/hl7.d.ts +82 -0
  67. package/resources/hl7.d.ts.map +1 -0
  68. package/resources/hl7.js +22 -0
  69. package/resources/hl7.js.map +1 -0
  70. package/resources/hl7.mjs +18 -0
  71. package/resources/hl7.mjs.map +1 -0
  72. package/resources/index.d.mts +5 -0
  73. package/resources/index.d.mts.map +1 -1
  74. package/resources/index.d.ts +5 -0
  75. package/resources/index.d.ts.map +1 -1
  76. package/resources/index.js +11 -1
  77. package/resources/index.js.map +1 -1
  78. package/resources/index.mjs +5 -0
  79. package/resources/index.mjs.map +1 -1
  80. package/resources/integrations.d.mts +42 -0
  81. package/resources/integrations.d.mts.map +1 -0
  82. package/resources/integrations.d.ts +42 -0
  83. package/resources/integrations.d.ts.map +1 -0
  84. package/resources/integrations.js +33 -0
  85. package/resources/integrations.js.map +1 -0
  86. package/resources/integrations.mjs +29 -0
  87. package/resources/integrations.mjs.map +1 -0
  88. package/resources/orders.d.mts +554 -0
  89. package/resources/orders.d.mts.map +1 -0
  90. package/resources/orders.d.ts +554 -0
  91. package/resources/orders.d.ts.map +1 -0
  92. package/resources/orders.js +71 -0
  93. package/resources/orders.js.map +1 -0
  94. package/resources/orders.mjs +67 -0
  95. package/resources/orders.mjs.map +1 -0
  96. package/src/client.ts +129 -2
  97. package/src/internal/to-file.ts +1 -1
  98. package/src/internal/utils/values.ts +3 -3
  99. package/src/resources/employees.ts +633 -0
  100. package/src/resources/employers/employers.ts +160 -0
  101. package/src/resources/employers/index.ts +21 -0
  102. package/src/resources/employers/service-bundles.ts +204 -0
  103. package/src/resources/employers.ts +3 -0
  104. package/src/resources/fax.ts +1 -1
  105. package/src/resources/hl7.ts +109 -0
  106. package/src/resources/index.ts +55 -0
  107. package/src/resources/integrations.ts +72 -0
  108. package/src/resources/orders.ts +874 -0
  109. package/src/version.ts +1 -1
  110. package/version.d.mts +1 -1
  111. package/version.d.ts +1 -1
  112. package/version.js +1 -1
  113. package/version.mjs +1 -1
@@ -0,0 +1,160 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../../core/resource';
4
+ import * as ServiceBundlesAPI from './service-bundles';
5
+ import {
6
+ ServiceBundleCreateParams,
7
+ ServiceBundleCreateResponse,
8
+ ServiceBundleDeleteParams,
9
+ ServiceBundleListResponse,
10
+ ServiceBundleRetrieveParams,
11
+ ServiceBundleRetrieveResponse,
12
+ ServiceBundleUpdateParams,
13
+ ServiceBundleUpdateResponse,
14
+ ServiceBundles,
15
+ } from './service-bundles';
16
+ import { APIPromise } from '../../core/api-promise';
17
+ import { buildHeaders } from '../../internal/headers';
18
+ import { RequestOptions } from '../../internal/request-options';
19
+ import { path } from '../../internal/utils/path';
20
+
21
+ export class Employers extends APIResource {
22
+ serviceBundles: ServiceBundlesAPI.ServiceBundles = new ServiceBundlesAPI.ServiceBundles(this._client);
23
+
24
+ /**
25
+ * Create Employer
26
+ */
27
+ create(body: EmployerCreateParams, options?: RequestOptions): APIPromise<EmployerCreateResponse> {
28
+ return this._client.post('/v1/employers', { body, ...options });
29
+ }
30
+
31
+ /**
32
+ * Get Employer
33
+ */
34
+ retrieve(employerID: string, options?: RequestOptions): APIPromise<EmployerRetrieveResponse> {
35
+ return this._client.get(path`/v1/employers/${employerID}`, options);
36
+ }
37
+
38
+ /**
39
+ * Get Employers for Current User
40
+ */
41
+ list(params: EmployerListParams, options?: RequestOptions): APIPromise<EmployerListResponse> {
42
+ const { 'login-token': loginToken, 'user-id': userID } = params;
43
+ return this._client.get('/v1/employers/list', {
44
+ ...options,
45
+ headers: buildHeaders([{ 'login-token': loginToken, 'user-id': userID }, options?.headers]),
46
+ });
47
+ }
48
+ }
49
+
50
+ export interface EmployerCreateResponse {
51
+ _id: string;
52
+
53
+ address: { [key: string]: unknown };
54
+
55
+ email: string;
56
+
57
+ name: string;
58
+
59
+ phones: Array<{ [key: string]: unknown }>;
60
+
61
+ createdAt?: string;
62
+
63
+ createdBy?: string;
64
+
65
+ demo?: boolean;
66
+
67
+ employeeConsent?: boolean;
68
+
69
+ onsiteClinic?: boolean;
70
+
71
+ website?: string;
72
+ }
73
+
74
+ export type EmployerRetrieveResponse = { [key: string]: unknown };
75
+
76
+ export type EmployerListResponse = Array<{ [key: string]: unknown }>;
77
+
78
+ export interface EmployerCreateParams {
79
+ address: EmployerCreateParams.Address;
80
+
81
+ email: string;
82
+
83
+ name: string;
84
+
85
+ phones: Array<EmployerCreateParams.Phone>;
86
+
87
+ billingAddress?: { [key: string]: unknown };
88
+
89
+ checkr?: EmployerCreateParams.Checkr;
90
+
91
+ demo?: boolean;
92
+
93
+ employeeConsent?: boolean;
94
+
95
+ metadata?: { [key: string]: unknown };
96
+
97
+ onsiteClinic?: boolean;
98
+
99
+ website?: string;
100
+ }
101
+
102
+ export namespace EmployerCreateParams {
103
+ export interface Address {
104
+ city: string;
105
+
106
+ state: string;
107
+
108
+ street1: string;
109
+
110
+ zipCode: string;
111
+
112
+ country?: string;
113
+
114
+ street2?: string;
115
+ }
116
+
117
+ export interface Phone {
118
+ number: string;
119
+
120
+ primary?: boolean;
121
+
122
+ type?: string;
123
+ }
124
+
125
+ export interface Checkr {
126
+ id: string;
127
+
128
+ status?: string;
129
+ }
130
+ }
131
+
132
+ export interface EmployerListParams {
133
+ 'login-token': string;
134
+
135
+ 'user-id': string;
136
+ }
137
+
138
+ Employers.ServiceBundles = ServiceBundles;
139
+
140
+ export declare namespace Employers {
141
+ export {
142
+ type EmployerCreateResponse as EmployerCreateResponse,
143
+ type EmployerRetrieveResponse as EmployerRetrieveResponse,
144
+ type EmployerListResponse as EmployerListResponse,
145
+ type EmployerCreateParams as EmployerCreateParams,
146
+ type EmployerListParams as EmployerListParams,
147
+ };
148
+
149
+ export {
150
+ ServiceBundles as ServiceBundles,
151
+ type ServiceBundleCreateResponse as ServiceBundleCreateResponse,
152
+ type ServiceBundleRetrieveResponse as ServiceBundleRetrieveResponse,
153
+ type ServiceBundleUpdateResponse as ServiceBundleUpdateResponse,
154
+ type ServiceBundleListResponse as ServiceBundleListResponse,
155
+ type ServiceBundleCreateParams as ServiceBundleCreateParams,
156
+ type ServiceBundleRetrieveParams as ServiceBundleRetrieveParams,
157
+ type ServiceBundleUpdateParams as ServiceBundleUpdateParams,
158
+ type ServiceBundleDeleteParams as ServiceBundleDeleteParams,
159
+ };
160
+ }
@@ -0,0 +1,21 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ export {
4
+ Employers,
5
+ type EmployerCreateResponse,
6
+ type EmployerRetrieveResponse,
7
+ type EmployerListResponse,
8
+ type EmployerCreateParams,
9
+ type EmployerListParams,
10
+ } from './employers';
11
+ export {
12
+ ServiceBundles,
13
+ type ServiceBundleCreateResponse,
14
+ type ServiceBundleRetrieveResponse,
15
+ type ServiceBundleUpdateResponse,
16
+ type ServiceBundleListResponse,
17
+ type ServiceBundleCreateParams,
18
+ type ServiceBundleRetrieveParams,
19
+ type ServiceBundleUpdateParams,
20
+ type ServiceBundleDeleteParams,
21
+ } from './service-bundles';
@@ -0,0 +1,204 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../../core/resource';
4
+ import { APIPromise } from '../../core/api-promise';
5
+ import { buildHeaders } from '../../internal/headers';
6
+ import { RequestOptions } from '../../internal/request-options';
7
+ import { path } from '../../internal/utils/path';
8
+
9
+ export class ServiceBundles extends APIResource {
10
+ /**
11
+ * Create Service Bundle
12
+ */
13
+ create(
14
+ employerID: string,
15
+ body: ServiceBundleCreateParams,
16
+ options?: RequestOptions,
17
+ ): APIPromise<ServiceBundleCreateResponse> {
18
+ return this._client.post(path`/v1/employers/${employerID}/service-bundles`, { body, ...options });
19
+ }
20
+
21
+ /**
22
+ * Get Service Bundle
23
+ */
24
+ retrieve(
25
+ id: string,
26
+ params: ServiceBundleRetrieveParams,
27
+ options?: RequestOptions,
28
+ ): APIPromise<ServiceBundleRetrieveResponse> {
29
+ const { employerId } = params;
30
+ return this._client.get(path`/v1/employers/${employerId}/service-bundles/${id}`, options);
31
+ }
32
+
33
+ /**
34
+ * Update Service Bundle
35
+ */
36
+ update(
37
+ id: string,
38
+ params: ServiceBundleUpdateParams,
39
+ options?: RequestOptions,
40
+ ): APIPromise<ServiceBundleUpdateResponse> {
41
+ const { employerId, ...body } = params;
42
+ return this._client.put(path`/v1/employers/${employerId}/service-bundles/${id}`, { body, ...options });
43
+ }
44
+
45
+ /**
46
+ * List Service Bundles
47
+ */
48
+ list(employerID: string, options?: RequestOptions): APIPromise<ServiceBundleListResponse> {
49
+ return this._client.get(path`/v1/employers/${employerID}/service-bundles`, options);
50
+ }
51
+
52
+ /**
53
+ * Delete Service Bundle
54
+ */
55
+ delete(id: string, params: ServiceBundleDeleteParams, options?: RequestOptions): APIPromise<void> {
56
+ const { employerId } = params;
57
+ return this._client.delete(path`/v1/employers/${employerId}/service-bundles/${id}`, {
58
+ ...options,
59
+ headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
60
+ });
61
+ }
62
+ }
63
+
64
+ export interface ServiceBundleCreateResponse {
65
+ _id: string;
66
+
67
+ bundleName: string;
68
+
69
+ employerId: string;
70
+
71
+ serviceIds: Array<string>;
72
+
73
+ createdAt?: string;
74
+
75
+ createdBy?: string;
76
+
77
+ roles?: Array<string> | null;
78
+
79
+ updatedAt?: string;
80
+
81
+ updatedBy?: string;
82
+ }
83
+
84
+ export interface ServiceBundleRetrieveResponse {
85
+ _id: string;
86
+
87
+ bundleName: string;
88
+
89
+ employerId: string;
90
+
91
+ serviceIds: Array<string>;
92
+
93
+ createdAt?: string;
94
+
95
+ createdBy?: string;
96
+
97
+ roles?: Array<string> | null;
98
+
99
+ updatedAt?: string;
100
+
101
+ updatedBy?: string;
102
+ }
103
+
104
+ export interface ServiceBundleUpdateResponse {
105
+ _id: string;
106
+
107
+ bundleName: string;
108
+
109
+ employerId: string;
110
+
111
+ serviceIds: Array<string>;
112
+
113
+ createdAt?: string;
114
+
115
+ createdBy?: string;
116
+
117
+ roles?: Array<string> | null;
118
+
119
+ updatedAt?: string;
120
+
121
+ updatedBy?: string;
122
+ }
123
+
124
+ export type ServiceBundleListResponse = Array<ServiceBundleListResponse.ServiceBundleListResponseItem>;
125
+
126
+ export namespace ServiceBundleListResponse {
127
+ export interface ServiceBundleListResponseItem {
128
+ _id: string;
129
+
130
+ bundleName: string;
131
+
132
+ employerId: string;
133
+
134
+ serviceIds: Array<string>;
135
+
136
+ createdAt?: string;
137
+
138
+ createdBy?: string;
139
+
140
+ roles?: Array<string> | null;
141
+
142
+ updatedAt?: string;
143
+
144
+ updatedBy?: string;
145
+ }
146
+ }
147
+
148
+ export interface ServiceBundleCreateParams {
149
+ bundleName: string;
150
+
151
+ serviceIds: Array<string>;
152
+
153
+ _id?: string;
154
+
155
+ roles?: Array<string> | null;
156
+ }
157
+
158
+ export interface ServiceBundleRetrieveParams {
159
+ employerId: string;
160
+ }
161
+
162
+ export interface ServiceBundleUpdateParams {
163
+ /**
164
+ * Path param:
165
+ */
166
+ employerId: string;
167
+
168
+ /**
169
+ * Body param:
170
+ */
171
+ bundleName: string;
172
+
173
+ /**
174
+ * Body param:
175
+ */
176
+ serviceIds: Array<string>;
177
+
178
+ /**
179
+ * Body param:
180
+ */
181
+ _id?: string;
182
+
183
+ /**
184
+ * Body param:
185
+ */
186
+ roles?: Array<string> | null;
187
+ }
188
+
189
+ export interface ServiceBundleDeleteParams {
190
+ employerId: string;
191
+ }
192
+
193
+ export declare namespace ServiceBundles {
194
+ export {
195
+ type ServiceBundleCreateResponse as ServiceBundleCreateResponse,
196
+ type ServiceBundleRetrieveResponse as ServiceBundleRetrieveResponse,
197
+ type ServiceBundleUpdateResponse as ServiceBundleUpdateResponse,
198
+ type ServiceBundleListResponse as ServiceBundleListResponse,
199
+ type ServiceBundleCreateParams as ServiceBundleCreateParams,
200
+ type ServiceBundleRetrieveParams as ServiceBundleRetrieveParams,
201
+ type ServiceBundleUpdateParams as ServiceBundleUpdateParams,
202
+ type ServiceBundleDeleteParams as ServiceBundleDeleteParams,
203
+ };
204
+ }
@@ -0,0 +1,3 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ export * from './employers/index';
@@ -115,7 +115,7 @@ export interface FaxRetrieveStatusResponse {
115
115
  /**
116
116
  * Provider-specific additional data
117
117
  */
118
- providerData?: unknown;
118
+ providerData?: { [key: string]: unknown };
119
119
  }
120
120
 
121
121
  export interface FaxSendResponse {
@@ -0,0 +1,109 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../core/resource';
4
+ import { APIPromise } from '../core/api-promise';
5
+ import { RequestOptions } from '../internal/request-options';
6
+
7
+ export class Hl7 extends APIResource {
8
+ /**
9
+ * Process incoming HL7 messages from EHR systems. Accepts JSON with "message"
10
+ * field, raw text/plain HL7 content, or form-encoded data.
11
+ */
12
+ process(body: Hl7ProcessParams | null | undefined = {}, options?: RequestOptions): APIPromise<string> {
13
+ return this._client.post('/v1/hl7/', { body, ...options });
14
+ }
15
+
16
+ /**
17
+ * Send lab results or documents via HL7
18
+ */
19
+ sendResults(body: Hl7SendResultsParams, options?: RequestOptions): APIPromise<string> {
20
+ return this._client.post('/v1/hl7/results', { body, ...options });
21
+ }
22
+ }
23
+
24
+ /**
25
+ * HL7 ACK message
26
+ */
27
+ export type Hl7ProcessResponse = string;
28
+
29
+ /**
30
+ * Result of HL7 message send
31
+ */
32
+ export type Hl7SendResultsResponse = string;
33
+
34
+ export interface Hl7ProcessParams {
35
+ /**
36
+ * Form field (legacy support)
37
+ */
38
+ f?: string;
39
+
40
+ /**
41
+ * Interface identifier (legacy support)
42
+ */
43
+ interface?: string;
44
+
45
+ /**
46
+ * Login password (legacy support)
47
+ */
48
+ login_passwd?: string;
49
+
50
+ /**
51
+ * Login user (legacy support)
52
+ */
53
+ login_user?: string;
54
+
55
+ /**
56
+ * HL7 message content - the primary way to send HL7 data
57
+ */
58
+ message?: string;
59
+
60
+ /**
61
+ * Base64 encoded HL7 message (legacy support)
62
+ */
63
+ message_b64?: string;
64
+
65
+ [k: string]: unknown;
66
+ }
67
+
68
+ export interface Hl7SendResultsParams {
69
+ /**
70
+ * Employee ID to send results for
71
+ */
72
+ employeeId: string;
73
+
74
+ /**
75
+ * File containing the results
76
+ */
77
+ file: Hl7SendResultsParams.File;
78
+ }
79
+
80
+ export namespace Hl7SendResultsParams {
81
+ /**
82
+ * File containing the results
83
+ */
84
+ export interface File {
85
+ /**
86
+ * Base64 encoded file content
87
+ */
88
+ base64: string;
89
+
90
+ /**
91
+ * File name
92
+ */
93
+ name: string;
94
+
95
+ /**
96
+ * MIME type of the file
97
+ */
98
+ type: string;
99
+ }
100
+ }
101
+
102
+ export declare namespace Hl7 {
103
+ export {
104
+ type Hl7ProcessResponse as Hl7ProcessResponse,
105
+ type Hl7SendResultsResponse as Hl7SendResultsResponse,
106
+ type Hl7ProcessParams as Hl7ProcessParams,
107
+ type Hl7SendResultsParams as Hl7SendResultsParams,
108
+ };
109
+ }
@@ -1,6 +1,29 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  export { Database, type DatabaseCheckHealthResponse } from './database';
4
+ export {
5
+ Employees,
6
+ type EmployeeCreateResponse,
7
+ type EmployeeRetrieveResponse,
8
+ type EmployeeUpdateResponse,
9
+ type EmployeeListResponse,
10
+ type EmployeeDeleteResponse,
11
+ type EmployeeLinkUserResponse,
12
+ type EmployeeUnlinkUserResponse,
13
+ type EmployeeCreateParams,
14
+ type EmployeeUpdateParams,
15
+ type EmployeeListParams,
16
+ type EmployeeLinkUserParams,
17
+ type EmployeeUnlinkUserParams,
18
+ } from './employees';
19
+ export {
20
+ Employers,
21
+ type EmployerCreateResponse,
22
+ type EmployerRetrieveResponse,
23
+ type EmployerListResponse,
24
+ type EmployerCreateParams,
25
+ type EmployerListParams,
26
+ } from './employers/employers';
4
27
  export {
5
28
  Fax,
6
29
  type FaxListProvidersResponse,
@@ -9,5 +32,37 @@ export {
9
32
  type FaxSendParams,
10
33
  } from './fax';
11
34
  export { Health, type HealthCheckResponse } from './health';
35
+ export {
36
+ Hl7,
37
+ type Hl7ProcessResponse,
38
+ type Hl7SendResultsResponse,
39
+ type Hl7ProcessParams,
40
+ type Hl7SendResultsParams,
41
+ } from './hl7';
42
+ export {
43
+ Integrations,
44
+ type IntegrationListResponse,
45
+ type IntegrationCheckActiveResponse,
46
+ type IntegrationListParams,
47
+ type IntegrationCheckActiveParams,
48
+ } from './integrations';
49
+ export {
50
+ Orders,
51
+ type OrderCreateResponse,
52
+ type OrderRetrieveResponse,
53
+ type OrderUpdateResponse,
54
+ type OrderRetrieveResultsResponse,
55
+ type OrderScheduleAppointmentResponse,
56
+ type OrderSendForEmployeeResponse,
57
+ type OrderUpdateStatusResponse,
58
+ type OrderUploadResultsResponse,
59
+ type OrderCreateParams,
60
+ type OrderUpdateParams,
61
+ type OrderRetrieveResultsParams,
62
+ type OrderScheduleAppointmentParams,
63
+ type OrderSendForEmployeeParams,
64
+ type OrderUpdateStatusParams,
65
+ type OrderUploadResultsParams,
66
+ } from './orders';
12
67
  export { Providers, type ProviderLookupResponse, type ProviderLookupParams } from './providers';
13
68
  export { Version, type VersionRetrieveResponse } from './version';
@@ -0,0 +1,72 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../core/resource';
4
+ import { APIPromise } from '../core/api-promise';
5
+ import { buildHeaders } from '../internal/headers';
6
+ import { RequestOptions } from '../internal/request-options';
7
+ import { path } from '../internal/utils/path';
8
+
9
+ export class Integrations extends APIResource {
10
+ /**
11
+ * Returns the current brand integrations object keyed by integration name (empty
12
+ * object if none). Brand resolved via x-brand-id header.
13
+ */
14
+ list(params: IntegrationListParams, options?: RequestOptions): APIPromise<IntegrationListResponse> {
15
+ const { 'x-brand-id': xBrandID } = params;
16
+ return this._client.get('/v1/integrations', {
17
+ ...options,
18
+ headers: buildHeaders([{ 'x-brand-id': xBrandID }, options?.headers]),
19
+ });
20
+ }
21
+
22
+ /**
23
+ * Returns true if the named integration is active for the given brand (brand
24
+ * resolved via x-brand-id header).
25
+ */
26
+ checkActive(
27
+ name: string,
28
+ params: IntegrationCheckActiveParams,
29
+ options?: RequestOptions,
30
+ ): APIPromise<IntegrationCheckActiveResponse> {
31
+ const { 'x-brand-id': xBrandID } = params;
32
+ return this._client.get(path`/v1/integrations/${name}`, {
33
+ ...options,
34
+ headers: buildHeaders([{ 'x-brand-id': xBrandID }, options?.headers]),
35
+ });
36
+ }
37
+ }
38
+
39
+ export interface IntegrationListResponse {
40
+ integrations: { [key: string]: IntegrationListResponse.Integrations };
41
+ }
42
+
43
+ export namespace IntegrationListResponse {
44
+ export interface Integrations {
45
+ active: boolean;
46
+
47
+ displayName: string;
48
+
49
+ config?: { [key: string]: unknown };
50
+ }
51
+ }
52
+
53
+ export interface IntegrationCheckActiveResponse {
54
+ active: boolean;
55
+ }
56
+
57
+ export interface IntegrationListParams {
58
+ 'x-brand-id': string;
59
+ }
60
+
61
+ export interface IntegrationCheckActiveParams {
62
+ 'x-brand-id': string;
63
+ }
64
+
65
+ export declare namespace Integrations {
66
+ export {
67
+ type IntegrationListResponse as IntegrationListResponse,
68
+ type IntegrationCheckActiveResponse as IntegrationCheckActiveResponse,
69
+ type IntegrationListParams as IntegrationListParams,
70
+ type IntegrationCheckActiveParams as IntegrationCheckActiveParams,
71
+ };
72
+ }