@fincuratech/sikka-sdk-js 1.7.0 → 1.9.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 +48 -0
- package/dist/lib/client.js +41 -1
- package/dist/lib/client.js.map +1 -1
- package/dist/lib/types.js.map +1 -1
- package/dist/types/lib/client.d.ts +5 -1
- package/dist/types/lib/client.d.ts.map +1 -1
- package/dist/types/lib/types.d.ts +24 -0
- package/dist/types/lib/types.d.ts.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -199,6 +199,36 @@ const cashType = await sikka.paymentTypes.list({ code: '1' });
|
|
|
199
199
|
|
|
200
200
|
---
|
|
201
201
|
|
|
202
|
+
### PMS Users
|
|
203
|
+
|
|
204
|
+
> [!NOTE]
|
|
205
|
+
> **Provisional.** Surfaced to support the Eaglesoft-only `user` field on `claimPayment.post()`. The `/v4/pms_users` path is confirmed, but the per-item response shape is pending written confirmation from Sikka support.
|
|
206
|
+
|
|
207
|
+
#### `pmsUsers.list(params)`
|
|
208
|
+
|
|
209
|
+
List the users configured in the practice management system. Use this to resolve a valid value for the Eaglesoft-only `user` writeback field.
|
|
210
|
+
|
|
211
|
+
**Parameters:**
|
|
212
|
+
|
|
213
|
+
| Name | Type | Required | Description |
|
|
214
|
+
|------|------|----------|-------------|
|
|
215
|
+
| `practice_id` | string | | Filter by practice ID |
|
|
216
|
+
| `user_id` | string | | Filter by PMS user ID |
|
|
217
|
+
| `limit` | number | | Results per page |
|
|
218
|
+
| `offset` | number | | Pagination offset |
|
|
219
|
+
|
|
220
|
+
**Returns:** `Promise<SikkaPmsUser[]>`
|
|
221
|
+
|
|
222
|
+
```typescript
|
|
223
|
+
// Get all PMS users
|
|
224
|
+
const users = await sikka.pmsUsers.list();
|
|
225
|
+
|
|
226
|
+
// Resolve a value for the Eaglesoft `user` writeback field
|
|
227
|
+
const userId = users[0]?.user_id;
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
---
|
|
231
|
+
|
|
202
232
|
### Insurance Company Details
|
|
203
233
|
|
|
204
234
|
#### `insuranceCompanyDetails.list(params)`
|
|
@@ -331,6 +361,19 @@ Post a payment to a claim. Uses pipe-delimited values for posting payments acros
|
|
|
331
361
|
| `is_payment_by_procedure_code` | string | ✓ | `'true'` or `'false'` |
|
|
332
362
|
| `note` | string | ✓ | Payment notes |
|
|
333
363
|
|
|
364
|
+
> [!NOTE]
|
|
365
|
+
> **Eaglesoft-only fields (provisional).** The following fields are accepted only by the Eaglesoft writeback contract — sending them on other PMSs (Dentrix, Open Dental, Tracker) is unsupported. Field names/accepted values are sourced from Sikka's developer portal and are pending written confirmation from Sikka support; treat as provisional.
|
|
366
|
+
|
|
367
|
+
| Name | Type | Required | Description |
|
|
368
|
+
|------|------|----------|-------------|
|
|
369
|
+
| `impacts` | string | | How the payment is booked. Likely `Collection` or `Adjustment`; defaults to `Adjustment` when omitted. Eaglesoft-only. |
|
|
370
|
+
| `is_final_payment` | string | | `'true'` (default) or `'false'`. Set `'false'` on every call except the last when posting a claim across multiple provider groups. Eaglesoft-only. |
|
|
371
|
+
| `is_credit_adjustment_writeback` | string | | `'true'` or `'false'`. Triggers a credit adjustment (write-off) write-back. Eaglesoft-only. |
|
|
372
|
+
| `credit_adjustment_amount` | string | | Credit adjustment amount(s) (xx.xx), pipe-delimited per procedure. Eaglesoft-only. |
|
|
373
|
+
| `credit_adjustment_transaction_sr_no` | string | | Transaction ID(s) the credit adjustment applies to, pipe-delimited per procedure. Eaglesoft-only. |
|
|
374
|
+
| `credit_adjustment_type` | string | | Credit adjustment type ID (from `payment_types` with `is_adjustment_type=true`). Eaglesoft-only. |
|
|
375
|
+
| `user` | string | | PMS user the writeback is attributed to (from the `pms_users` API). Eaglesoft-only. |
|
|
376
|
+
|
|
334
377
|
**Returns:** `Promise<SikkaClaimPaymentResponse>`
|
|
335
378
|
|
|
336
379
|
```typescript
|
|
@@ -389,6 +432,11 @@ import type {
|
|
|
389
432
|
SikkaPaymentTypeListParams,
|
|
390
433
|
SikkaPaymentTypeListResponse,
|
|
391
434
|
|
|
435
|
+
// PMS Users
|
|
436
|
+
SikkaPmsUser,
|
|
437
|
+
SikkaPmsUserListParams,
|
|
438
|
+
SikkaPmsUserListResponse,
|
|
439
|
+
|
|
392
440
|
// Insurance Company Details
|
|
393
441
|
SikkaInsuranceCompanyDetail,
|
|
394
442
|
SikkaInsuranceCompanyDetailListParams,
|
package/dist/lib/client.js
CHANGED
|
@@ -20,7 +20,7 @@ export class SikkaClient {
|
|
|
20
20
|
let offset = params.offset ?? 0;
|
|
21
21
|
let limit = params.limit ?? AUTHORIZED_PRACTICES_PAGE_SIZE;
|
|
22
22
|
for (;;) {
|
|
23
|
-
const response = await this.
|
|
23
|
+
const response = await this.appAuthGet('/v4/authorized_practices', { ...params, limit, offset });
|
|
24
24
|
const pageItems = response.items ?? [];
|
|
25
25
|
items.push(...pageItems);
|
|
26
26
|
const totalCount = Number.parseInt(response.total_count, 10);
|
|
@@ -76,6 +76,12 @@ export class SikkaClient {
|
|
|
76
76
|
return response.items;
|
|
77
77
|
},
|
|
78
78
|
};
|
|
79
|
+
pmsUsers = {
|
|
80
|
+
list: async (params = {}) => {
|
|
81
|
+
const response = await this.get('/v4/pms_users', params);
|
|
82
|
+
return response.items;
|
|
83
|
+
},
|
|
84
|
+
};
|
|
79
85
|
practiceVariables = {
|
|
80
86
|
list: async (params = {}) => {
|
|
81
87
|
const response = await this.get('/v4/practice_variables', params);
|
|
@@ -119,6 +125,40 @@ export class SikkaClient {
|
|
|
119
125
|
this.baseUrl = config.baseUrl ?? SIKKA_BASE_URL;
|
|
120
126
|
this.credentials = config.credentials;
|
|
121
127
|
}
|
|
128
|
+
async appAuthGet(endpoint, params) {
|
|
129
|
+
const log = getLogger();
|
|
130
|
+
const url = new URL(`${this.baseUrl}${endpoint}`);
|
|
131
|
+
if (params) {
|
|
132
|
+
for (const [key, value] of Object.entries(params)) {
|
|
133
|
+
if (value !== null && value !== undefined) {
|
|
134
|
+
url.searchParams.set(key, String(value));
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
log.debug('Sikka API app-auth GET request', { endpoint, params });
|
|
139
|
+
const response = await fetch(url.toString(), {
|
|
140
|
+
headers: {
|
|
141
|
+
'App-Id': this.credentials.appId,
|
|
142
|
+
'App-Key': this.credentials.appKey,
|
|
143
|
+
'Content-Type': 'application/json',
|
|
144
|
+
},
|
|
145
|
+
method: 'GET',
|
|
146
|
+
});
|
|
147
|
+
if (!response.ok) {
|
|
148
|
+
const errorBody = await response.text();
|
|
149
|
+
throw new Error(`Sikka API GET ${endpoint} failed: ${response.status} ${response.statusText} - ${errorBody}`);
|
|
150
|
+
}
|
|
151
|
+
const text = await response.text();
|
|
152
|
+
if (!text || text.trim() === '') {
|
|
153
|
+
return { items: [] };
|
|
154
|
+
}
|
|
155
|
+
const data = JSON.parse(text);
|
|
156
|
+
log.debug('Sikka API app-auth GET response', {
|
|
157
|
+
endpoint,
|
|
158
|
+
status: response.status,
|
|
159
|
+
});
|
|
160
|
+
return data;
|
|
161
|
+
}
|
|
122
162
|
async authenticate() {
|
|
123
163
|
const log = getLogger();
|
|
124
164
|
log.debug('Sikka API: Authenticating');
|
package/dist/lib/client.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../src/lib/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAyCxC,MAAM,cAAc,GAAG,2BAA2B,CAAC;AAEnD,MAAM,oBAAoB,GAAG,aAAa,CAAC;AAK3C,MAAM,8BAA8B,GAAG,GAAG,CAAC;AAM3C,MAAM,gBAAgB,GAAG,CAAC,WAA+B,EAAiB,EAAE;IAC1E,IAAI,CAAC,WAAW,EAAE,CAAC;QACjB,OAAO,IAAI,CAAC;IACd,CAAC;IAED,MAAM,KAAK,GAAG,oBAAoB,CAAC,IAAI,CAAC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OAAgB,EACH,EAAE;IACf,OAAO,IAAI,WAAW,CAAC,EAAE,OAAO,EAAE,WAAW,EAAE,CAAC,CAAC;AACnD,CAAC,CAAC","sourcesContent":["import { getLogger } from './logger.js';\nimport {\n type SikkaApiError,\n type SikkaAuthorizedPractice,\n type SikkaAuthorizedPracticeListParams,\n type SikkaAuthorizedPracticeListResponse,\n type SikkaClaim,\n type SikkaClaimListParams,\n type SikkaClaimListResponse,\n type SikkaClaimPaymentRequest,\n type SikkaClaimPaymentResponse,\n type SikkaClaimPaymentResult,\n type SikkaClaimUpdateRequest,\n type SikkaClaimUpdateResponse,\n type SikkaClaimUpdateResult,\n type SikkaClientConfig,\n type SikkaClientCredentials,\n type SikkaInsuranceCompanyDetail,\n type SikkaInsuranceCompanyDetailListParams,\n type SikkaInsuranceCompanyDetailListResponse,\n type SikkaPatient,\n type SikkaPatientListParams,\n type SikkaPatientListResponse,\n type SikkaPaymentType,\n type SikkaPaymentTypeListParams,\n type SikkaPaymentTypeListResponse,\n type SikkaPracticeVariable,\n type SikkaPracticeVariableListParams,\n type SikkaPracticeVariableListResponse,\n type SikkaRequestKeyRequest,\n type SikkaRequestKeyResponse,\n type SikkaSubscriber,\n type SikkaSubscriberListParams,\n type SikkaSubscriberListResponse,\n type SikkaTransaction,\n type SikkaTransactionListParams,\n type SikkaTransactionListResponse,\n type SikkaWritebackStatusItem,\n type SikkaWritebackStatusResponse,\n} from './types.js';\n\nconst SIKKA_BASE_URL = 'https://api.sikkasoft.com';\n\nconst WRITEBACK_ID_PATTERN = /^Id:(\\d+)$/u;\n\n/**\n * Page size used when auto-paginating the authorized_practices endpoint.\n */\nconst AUTHORIZED_PRACTICES_PAGE_SIZE = 500;\n\n/**\n * Extract the numeric writeback tracking ID from the long_message field.\n * Expected format: \"Id:3809955\"\n */\nconst parseWritebackId = (longMessage: string | undefined): string | null => {\n if (!longMessage) {\n return null;\n }\n\n const match = WRITEBACK_ID_PATTERN.exec(longMessage);\n return match?.[1] ?? null;\n};\n\n/**\n * Sikka API Client\n *\n * Provides authenticated access to Sikka's ONE API for a specific practice/office.\n *\n * @example\n * ```typescript\n * const client = new SikkaClient({\n * credentials: {\n * appId: 'your-app-id',\n * appKey: 'your-app-key',\n * officeId: 'practice-office-id',\n * secretKey: 'practice-secret-key',\n * },\n * });\n *\n * await client.authenticate();\n *\n * const patients = await client.patients.list({ firstname: 'John' });\n * ```\n */\nexport class SikkaClient {\n /**\n * Authorized practices endpoints.\n * Returns your authorized practices with the Sikka practice utility last\n * refresh and data insert times.\n */\n public readonly authorizedPractices = {\n /**\n * Get a single authorized practice by its office ID.\n *\n * This is the primary access pattern for resolving \"what PMS does this\n * office run\", since `office_id` (e.g. \"D13303\") is the unique identifier\n * for a practice/office. Matching is a case-sensitive exact match.\n *\n * Internally this lists all authorized practices (`show: 'all'`, with\n * auto-pagination) and returns the first record whose `office_id` matches.\n *\n * @param officeId - The unique office ID to look up\n * @returns The matching authorized practice, or `null` if none matches\n *\n * @example\n * ```typescript\n * const practice = await client.authorizedPractices.getByOfficeId('D13303');\n * if (practice) {\n * console.log(practice.practice_management_system);\n * }\n * ```\n */\n getByOfficeId: async (\n officeId: string,\n ): Promise<SikkaAuthorizedPractice | null> => {\n const practices = await this.authorizedPractices.list({ show: 'all' });\n return (\n practices.find((practice) => practice.office_id === officeId) ?? null\n );\n },\n\n /**\n * List your authorized practices, auto-paginating to completion.\n *\n * By default the API returns only practice id 1. Pass `show: 'all'` to\n * retrieve every authorized office. This method follows the response\n * pagination (offset/limit + `pagination.next`) and accumulates all pages,\n * so the returned array contains every matching record.\n *\n * Items are returned RAW: no normalization, filtering, or coercion is\n * applied. In particular, `practice_management_system` values are\n * inconsistent in case/spelling across records — callers should normalize\n * themselves.\n *\n * WARNING: `practice_id` is NOT unique across offices — the live API can\n * return the same `practice_id` (e.g. \"1\") for every authorized office. Key\n * off `office_id` (e.g. \"D13303\") instead. See `getByOfficeId()`.\n *\n * @param params - Optional filter, sort, and pagination parameters. A\n * caller-supplied `offset`/`limit` controls the starting page and page\n * size; pagination then continues from there until all items are fetched.\n * @returns List of all authorized practices across every page\n *\n * @example\n * ```typescript\n * // Get the default practice\n * const practices = await client.authorizedPractices.list();\n *\n * // Get all authorized practices (across all pages)\n * const allPractices = await client.authorizedPractices.list({\n * show: 'all',\n * });\n * ```\n */\n list: async (\n params: SikkaAuthorizedPracticeListParams = {},\n ): Promise<SikkaAuthorizedPractice[]> => {\n const items: SikkaAuthorizedPractice[] = [];\n\n // Sikka's `offset` is a 0-indexed PAGE NUMBER (not a record offset): the\n // next page is `offset + 1` with `limit` held constant. To stay correct\n // regardless of those semantics, we never compute the next offset\n // ourselves — we follow the `pagination.next` URL's query params verbatim.\n let offset: number | string = params.offset ?? 0;\n let limit: number | string =\n params.limit ?? AUTHORIZED_PRACTICES_PAGE_SIZE;\n\n for (;;) {\n const response: SikkaAuthorizedPracticeListResponse =\n await this.get<SikkaAuthorizedPracticeListResponse>(\n '/v4/authorized_practices',\n { ...params, limit, offset },\n );\n\n const pageItems = response.items ?? [];\n items.push(...pageItems);\n\n const totalCount = Number.parseInt(response.total_count, 10);\n const pageSize = Number.parseInt(String(limit), 10);\n const nextUrl = response.pagination?.next;\n\n // Stop when the page came back empty, we've reached the reported\n // total, the API reported no next page, or the page was not full\n // (a reliable \"last page\" signal that guards against infinite loops).\n if (\n pageItems.length === 0 ||\n (!Number.isNaN(totalCount) && items.length >= totalCount) ||\n !nextUrl ||\n (!Number.isNaN(pageSize) && pageItems.length < pageSize)\n ) {\n break;\n }\n\n // Advance strictly by what the API tells us, rather than doing\n // `offset += limit` arithmetic (which would be wrong for page-number\n // semantics).\n const nextSearch = new URL(nextUrl).searchParams;\n offset = nextSearch.get('offset') ?? offset;\n limit = nextSearch.get('limit') ?? limit;\n }\n\n return items;\n },\n };\n\n /**\n * Claim payment endpoints.\n */\n public readonly claimPayment = {\n /**\n * Post a payment to a claim.\n *\n * The Sikka API accepts the request (201) but the actual PMS writeback\n * is asynchronous. The returned `writeback_id` can be used with\n * `writebackStatus.get()` to poll for completion.\n *\n * @param request - Payment details\n * @returns Payment response with parsed writeback tracking ID\n *\n * @example\n * ```typescript\n * const result = await client.claimPayment.post({\n * claim_sr_no: '123456',\n * practice_id: 'practice-id',\n * payment_amount: '100.00|50.00',\n * transaction_sr_no: '789|790',\n * deductible: '0.00|0.00',\n * write_off: '0.00|0.00',\n * claim_payment_date: '2024-01-15',\n * payment_mode: 'EFT',\n * is_payment_by_procedure_code: 'true',\n * note: 'Insurance payment',\n * });\n *\n * if (result.writeback_id) {\n * const status = await client.writebackStatus.get(result.writeback_id);\n * }\n * ```\n */\n post: async (\n request: SikkaClaimPaymentRequest,\n ): Promise<SikkaClaimPaymentResult> => {\n const response = await this.post<SikkaClaimPaymentResponse>(\n '/v4/claim_payment',\n request as unknown as Record<string, unknown>,\n );\n const writebackId = parseWritebackId(response.long_message);\n return { ...response, writeback_id: writebackId };\n },\n };\n\n /**\n * Claims management endpoints.\n */\n public readonly claims = {\n /**\n * List claims matching the given criteria.\n *\n * @param params - Search parameters\n * @returns List of matching claims\n *\n * @example\n * ```typescript\n * const claims = await client.claims.list({\n * patient_id: '12345',\n * status: 'Pending',\n * start_date: '2024-01-01',\n * end_date: '2024-12-31',\n * });\n * ```\n */\n list: async (params: SikkaClaimListParams): Promise<SikkaClaim[]> => {\n const response = await this.get<SikkaClaimListResponse>(\n '/v4/claims',\n params,\n );\n return response.items;\n },\n\n /**\n * Update a claim's status and/or note.\n *\n * The Sikka API accepts the request but the actual PMS writeback\n * is asynchronous. The returned `writeback_id` can be used with\n * `writebackStatus.get()` to poll for completion.\n *\n * At least one of `status` or `note` must be provided.\n *\n * @param request - Claim update details including claim_sr_no\n * @returns Update response with parsed writeback tracking ID\n *\n * @example\n * ```typescript\n * const result = await client.claims.update({\n * claim_sr_no: '123456',\n * practice_id: 'practice-id',\n * status: 'Received',\n * note: 'Claim received and under review',\n * });\n *\n * if (result.writeback_id) {\n * const status = await client.writebackStatus.get(result.writeback_id);\n * }\n * ```\n */\n update: async (\n request: SikkaClaimUpdateRequest,\n ): Promise<SikkaClaimUpdateResult> => {\n const { claim_sr_no: claimSrNo, ...body } = request;\n const response = await this.patch<SikkaClaimUpdateResponse>(\n `/v4/claims/${claimSrNo}`,\n body as unknown as Record<string, unknown>,\n );\n const writebackId = parseWritebackId(response.long_message);\n return { ...response, writeback_id: writebackId };\n },\n };\n\n /**\n * Insurance company details endpoints.\n * Returns insurance company information associated with practices.\n */\n public readonly insuranceCompanyDetails = {\n /**\n * List insurance company details, optionally filtered by practice or company.\n *\n * @param params - Optional filter, sort, and pagination parameters\n * @returns List of insurance company details\n *\n * @example\n * ```typescript\n * // Get all insurance companies\n * const companies = await client.insuranceCompanyDetails.list();\n *\n * // Get insurance companies for a specific practice\n * const practiceCompanies = await client.insuranceCompanyDetails.list({\n * practice_id: '1',\n * });\n * ```\n */\n list: async (\n params: SikkaInsuranceCompanyDetailListParams = {},\n ): Promise<SikkaInsuranceCompanyDetail[]> => {\n const response = await this.get<SikkaInsuranceCompanyDetailListResponse>(\n '/v4/insurance_company_details',\n params,\n );\n return response.items;\n },\n };\n\n /**\n * Patient management endpoints.\n */\n public readonly patients = {\n /**\n * List patients matching the given criteria.\n *\n * @param params - Search parameters\n * @returns List of matching patients\n *\n * @example\n * ```typescript\n * const patients = await client.patients.list({\n * firstname: 'John',\n * lastname: 'Doe',\n * });\n * ```\n */\n list: async (params: SikkaPatientListParams): Promise<SikkaPatient[]> => {\n const response = await this.get<SikkaPatientListResponse>(\n '/v4/patients',\n params,\n );\n return response.items;\n },\n };\n\n /**\n * Payment types management endpoints.\n * Payment types represent the different methods a practice accepts for payments.\n */\n public readonly paymentTypes = {\n /**\n * List payment types for the practice.\n *\n * @param params - Optional filter and pagination parameters\n * @returns List of payment types\n *\n * @example\n * ```typescript\n * // Get all payment types\n * const types = await client.paymentTypes.list();\n *\n * // Get only insurance payment types\n * const insuranceTypes = await client.paymentTypes.list({\n * is_insurance_type: true,\n * });\n * ```\n */\n list: async (\n params: SikkaPaymentTypeListParams = {},\n ): Promise<SikkaPaymentType[]> => {\n const response = await this.get<SikkaPaymentTypeListResponse>(\n '/v4/payment_types',\n params,\n );\n return response.items;\n },\n };\n\n /**\n * Practice variables endpoints.\n * Returns configurable values from the practice management system such as\n * appointment statuses, claim statuses, and patient statuses.\n */\n public readonly practiceVariables = {\n /**\n * List practice variables, optionally filtered by service name.\n *\n * @param params - Optional filter and pagination parameters\n * @returns List of practice variables\n *\n * @example\n * ```typescript\n * // Get all claim statuses\n * const claimStatuses = await client.practiceVariables.list({\n * service_name: 'Claim Status',\n * });\n *\n * // Use the value field for claims.update()\n * const validStatuses = claimStatuses.map(v => v.value);\n * ```\n */\n list: async (\n params: SikkaPracticeVariableListParams = {},\n ): Promise<SikkaPracticeVariable[]> => {\n const response = await this.get<SikkaPracticeVariableListResponse>(\n '/v4/practice_variables',\n params,\n );\n return response.items;\n },\n };\n\n /**\n * Subscribers endpoints.\n * Returns insurance subscriber data associated with patients in practices.\n */\n public readonly subscribers = {\n /**\n * List subscribers, optionally filtered by patient, practice, or subscriber ID.\n *\n * @param params - Optional filter, sort, and pagination parameters\n * @returns List of subscribers\n *\n * @example\n * ```typescript\n * // Get all subscribers\n * const subscribers = await client.subscribers.list();\n *\n * // Get subscribers for a specific patient\n * const patientSubscribers = await client.subscribers.list({\n * patient_id: '994',\n * });\n * ```\n */\n list: async (\n params: SikkaSubscriberListParams = {},\n ): Promise<SikkaSubscriber[]> => {\n const response = await this.get<SikkaSubscriberListResponse>(\n '/v4/subscribers',\n params,\n );\n return response.items;\n },\n };\n\n /**\n * Transactions management endpoints.\n * Transactions include both procedures (service line items) and payments.\n */\n public readonly transactions = {\n /**\n * List transactions matching the given criteria.\n *\n * @param params - Search parameters\n * @returns List of matching transactions\n *\n * @example\n * ```typescript\n * const transactions = await client.transactions.list({\n * claim_sr_no: '123456',\n * });\n * ```\n */\n list: async (\n params: SikkaTransactionListParams,\n ): Promise<SikkaTransaction[]> => {\n const response = await this.get<SikkaTransactionListResponse>(\n '/v4/transactions',\n params,\n );\n return response.items;\n },\n\n /**\n * List only procedure transactions for a specific claim.\n *\n * @param claimSrNo - The claim serial number\n * @returns List of procedure transactions\n */\n listProcedures: async (claimSrNo: string): Promise<SikkaTransaction[]> => {\n const transactions = await this.transactions.list({\n claim_sr_no: claimSrNo,\n });\n return transactions.filter((txn) => txn.transaction_type === 'Procedure');\n },\n };\n\n /**\n * Writeback status endpoints.\n * Used to poll for the result of asynchronous PMS writeback operations\n * (e.g., after posting a claim payment).\n */\n public readonly writebackStatus = {\n /**\n * Get the status of a writeback operation.\n *\n * @param id - The writeback tracking ID (returned from claimPayment.post as writeback_id)\n * @returns The writeback status record\n *\n * @example\n * ```typescript\n * const result = await client.claimPayment.post({ ... });\n * if (result.writeback_id) {\n * const status = await client.writebackStatus.get(result.writeback_id);\n * console.log(status.status, status.is_completed);\n * }\n * ```\n */\n get: async (id: string): Promise<SikkaWritebackStatusItem> => {\n const response = await this.get<SikkaWritebackStatusResponse>(\n '/v4/writeback_status',\n { id },\n );\n const item = response.items[0];\n if (!item) {\n throw new Error(`No writeback status found for id: ${id}`);\n }\n\n return item;\n },\n };\n\n private readonly baseUrl: string;\n\n private readonly credentials: SikkaClientCredentials;\n\n private refreshKey: string | null = null;\n\n private requestKey: string | null = null;\n\n private requestKeyExpiresAt: Date | null = null;\n\n constructor(config: SikkaClientConfig) {\n this.baseUrl = config.baseUrl ?? SIKKA_BASE_URL;\n this.credentials = config.credentials;\n }\n\n /**\n * Authenticate with the Sikka API.\n * Must be called before making any other API requests.\n * The request key is valid for 24 hours.\n */\n async authenticate(): Promise<void> {\n const log = getLogger();\n\n log.debug('Sikka API: Authenticating');\n\n const requestBody: SikkaRequestKeyRequest = {\n app_id: this.credentials.appId,\n app_key: this.credentials.appKey,\n grant_type: 'request_key',\n office_id: this.credentials.officeId,\n secret_key: this.credentials.secretKey,\n };\n\n const response = await this.requestNewKey(requestBody);\n this.requestKey = response.request_key;\n this.refreshKey = response.refresh_key;\n this.requestKeyExpiresAt = new Date(response.end_time);\n\n log.debug('Sikka API: Authenticated successfully', {\n expiresAt: this.requestKeyExpiresAt.toISOString(),\n });\n }\n\n /**\n * Clear the current authentication state.\n */\n clearAuth(): void {\n this.requestKey = null;\n this.refreshKey = null;\n this.requestKeyExpiresAt = null;\n }\n\n /**\n * Ensure the client is authenticated, refreshing if necessary.\n * Automatically refreshes if token expires within 1 hour.\n */\n async ensureAuthenticated(): Promise<void> {\n if (!this.requestKey) {\n throw new Error('Not authenticated. Call authenticate() first.');\n }\n\n const oneHourFromNow = new Date(Date.now() + 60 * 60 * 1_000);\n if (this.requestKeyExpiresAt && this.requestKeyExpiresAt < oneHourFromNow) {\n await this.refreshAuthentication();\n }\n }\n\n /**\n * Make an authenticated GET request to the Sikka API.\n */\n async get<T>(endpoint: string, params?: Record<string, unknown>): Promise<T> {\n const log = getLogger();\n\n await this.ensureAuthenticated();\n\n const requestKey = this.getRequestKey();\n const url = new URL(`${this.baseUrl}${endpoint}`);\n url.searchParams.set('request_key', requestKey);\n\n if (params) {\n for (const [key, value] of Object.entries(params)) {\n if (value !== null && value !== undefined) {\n url.searchParams.set(key, String(value));\n }\n }\n }\n\n log.debug('Sikka API GET request', { endpoint, params });\n\n const response = await fetch(url.toString(), {\n headers: {\n 'Content-Type': 'application/json',\n 'Request-Key': requestKey,\n },\n method: 'GET',\n });\n\n if (!response.ok) {\n const errorBody = await response.text();\n throw new Error(\n `Sikka API GET ${endpoint} failed: ${response.status} ${response.statusText} - ${errorBody}`,\n );\n }\n\n const text = await response.text();\n if (!text || text.trim() === '') {\n return { items: [] } as T;\n }\n\n const data = JSON.parse(text) as T;\n\n log.debug('Sikka API GET response', { endpoint, status: response.status });\n\n return data;\n }\n\n /**\n * Get the current request key.\n *\n * @throws Error if not authenticated\n */\n getRequestKey(): string {\n if (!this.requestKey) {\n throw new Error('Not authenticated. Call authenticate() first.');\n }\n\n return this.requestKey;\n }\n\n // -------------------------------------------------------------------------\n // API Modules\n\n /**\n * Check if the client is currently authenticated with a valid token.\n */\n isAuthenticated(): boolean {\n if (!this.requestKey || !this.requestKeyExpiresAt) {\n return false;\n }\n\n return this.requestKeyExpiresAt > new Date();\n }\n\n /**\n * Make an authenticated PATCH request to the Sikka API.\n */\n async patch<T>(endpoint: string, body: Record<string, unknown>): Promise<T> {\n const log = getLogger();\n\n await this.ensureAuthenticated();\n\n const requestKey = this.getRequestKey();\n const url = new URL(`${this.baseUrl}${endpoint}`);\n url.searchParams.set('request_key', requestKey);\n\n log.debug('Sikka API PATCH request', { body, endpoint });\n\n const response = await fetch(url.toString(), {\n body: JSON.stringify(body),\n headers: {\n 'Content-Type': 'application/json',\n 'Request-Key': requestKey,\n },\n method: 'PATCH',\n });\n\n if (!response.ok) {\n const errorBody = await response.text();\n throw new Error(\n `Sikka API PATCH ${endpoint} failed: ${response.status} ${response.statusText} - ${errorBody}`,\n );\n }\n\n const data = (await response.json()) as T;\n\n log.debug('Sikka API PATCH response', {\n endpoint,\n status: response.status,\n });\n\n return data;\n }\n\n /**\n * Make an authenticated POST request to the Sikka API.\n */\n async post<T>(endpoint: string, body: Record<string, unknown>): Promise<T> {\n const log = getLogger();\n\n await this.ensureAuthenticated();\n\n const requestKey = this.getRequestKey();\n const url = new URL(`${this.baseUrl}${endpoint}`);\n url.searchParams.set('request_key', requestKey);\n\n log.debug('Sikka API POST request', { body, endpoint });\n\n const response = await fetch(url.toString(), {\n body: JSON.stringify(body),\n headers: {\n 'Content-Type': 'application/json',\n 'Request-Key': requestKey,\n },\n method: 'POST',\n });\n\n if (!response.ok) {\n const errorBody = await response.text();\n throw new Error(\n `Sikka API POST ${endpoint} failed: ${response.status} ${response.statusText} - ${errorBody}`,\n );\n }\n\n const data = (await response.json()) as T;\n\n log.debug('Sikka API POST response', { endpoint, status: response.status });\n\n return data;\n }\n\n /**\n * Refresh the authentication token using the refresh key.\n * Called automatically when token is near expiration.\n */\n async refreshAuthentication(): Promise<void> {\n const log = getLogger();\n\n if (!this.refreshKey) {\n throw new Error('No refresh key available. Call authenticate() first.');\n }\n\n log.debug('Sikka API: Refreshing authentication');\n\n const requestBody: SikkaRequestKeyRequest = {\n app_id: this.credentials.appId,\n app_key: this.credentials.appKey,\n grant_type: 'refresh_key',\n refresh_key: this.refreshKey,\n };\n\n const response = await this.requestNewKey(requestBody);\n this.requestKey = response.request_key;\n this.refreshKey = response.refresh_key;\n this.requestKeyExpiresAt = new Date(response.end_time);\n\n log.debug('Sikka API: Authentication refreshed', {\n expiresAt: this.requestKeyExpiresAt.toISOString(),\n });\n }\n\n private async requestNewKey(\n requestBody: SikkaRequestKeyRequest,\n ): Promise<SikkaRequestKeyResponse> {\n const response = await fetch(`${this.baseUrl}/v4/request_key`, {\n body: JSON.stringify(requestBody),\n headers: { 'Content-Type': 'application/json' },\n method: 'POST',\n });\n\n if (!response.ok) {\n let errorMessage = `${response.status} ${response.statusText}`;\n try {\n const errorBody = (await response.json()) as SikkaApiError;\n errorMessage =\n errorBody.error_description ??\n errorBody.error ??\n errorBody.message ??\n errorMessage;\n } catch {\n // Ignore JSON parse errors\n }\n\n throw new Error(`Sikka authentication failed: ${errorMessage}`);\n }\n\n return response.json() as Promise<SikkaRequestKeyResponse>;\n }\n}\n\n/**\n * Create a new Sikka client instance.\n *\n * @param credentials - Office-level credentials\n * @param baseUrl - Optional base URL override\n * @returns A new SikkaClient instance\n *\n * @example\n * ```typescript\n * const client = createSikkaClient({\n * appId: 'your-app-id',\n * appKey: 'your-app-key',\n * officeId: 'practice-office-id',\n * secretKey: 'practice-secret-key',\n * });\n *\n * await client.authenticate();\n * ```\n */\nexport const createSikkaClient = (\n credentials: SikkaClientCredentials,\n baseUrl?: string,\n): SikkaClient => {\n return new SikkaClient({ baseUrl, credentials });\n};\n"]}
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../src/lib/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CA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zB,WAAmC;QAEnC,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,GAAG,IAAI,CAAC,OAAO,iBAAiB,EAAE;YAC7D,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC;YACjC,OAAO,EAAE,EAAE,cAAc,EAAE,kBAAkB,EAAE;YAC/C,MAAM,EAAE,MAAM;SACf,CAAC,CAAC;QAEH,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;YACjB,IAAI,YAAY,GAAG,GAAG,QAAQ,CAAC,MAAM,IAAI,QAAQ,CAAC,UAAU,EAAE,CAAC;YAC/D,IAAI,CAAC;gBACH,MAAM,SAAS,GAAG,CAAC,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAkB,CAAC;gBAC3D,YAAY;oBACV,SAAS,CAAC,iBAAiB;wBAC3B,SAAS,CAAC,KAAK;wBACf,SAAS,CAAC,OAAO;wBACjB,YAAY,CAAC;YACjB,CAAC;YAAC,MAAM,CAAC;YAET,CAAC;YAED,MAAM,IAAI,KAAK,CAAC,gCAAgC,YAAY,EAAE,CAAC,CAAC;QAClE,CAAC;QAED,OAAO,QAAQ,CAAC,IAAI,EAAsC,CAAC;IAC7D,CAAC;CACF;AAqBD,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAC/B,WAAmC,EACnC,OAAgB,EACH,EAAE;IACf,OAAO,IAAI,WAAW,CAAC,EAAE,OAAO,EAAE,WAAW,EAAE,CAAC,CAAC;AACnD,CAAC,CAAC","sourcesContent":["import { getLogger } from './logger.js';\nimport {\n type SikkaApiError,\n type SikkaAuthorizedPractice,\n type SikkaAuthorizedPracticeListParams,\n type SikkaAuthorizedPracticeListResponse,\n type SikkaClaim,\n type SikkaClaimListParams,\n type SikkaClaimListResponse,\n type SikkaClaimPaymentRequest,\n type SikkaClaimPaymentResponse,\n type SikkaClaimPaymentResult,\n type SikkaClaimUpdateRequest,\n type SikkaClaimUpdateResponse,\n type SikkaClaimUpdateResult,\n type SikkaClientConfig,\n type SikkaClientCredentials,\n type SikkaInsuranceCompanyDetail,\n type SikkaInsuranceCompanyDetailListParams,\n type SikkaInsuranceCompanyDetailListResponse,\n type SikkaPatient,\n type SikkaPatientListParams,\n type SikkaPatientListResponse,\n type SikkaPaymentType,\n type SikkaPaymentTypeListParams,\n type SikkaPaymentTypeListResponse,\n type SikkaPmsUser,\n type SikkaPmsUserListParams,\n type SikkaPmsUserListResponse,\n type SikkaPracticeVariable,\n type SikkaPracticeVariableListParams,\n type SikkaPracticeVariableListResponse,\n type SikkaRequestKeyRequest,\n type SikkaRequestKeyResponse,\n type SikkaSubscriber,\n type SikkaSubscriberListParams,\n type SikkaSubscriberListResponse,\n type SikkaTransaction,\n type SikkaTransactionListParams,\n type SikkaTransactionListResponse,\n type SikkaWritebackStatusItem,\n type SikkaWritebackStatusResponse,\n} from './types.js';\n\nconst SIKKA_BASE_URL = 'https://api.sikkasoft.com';\n\nconst WRITEBACK_ID_PATTERN = /^Id:(\\d+)$/u;\n\n/**\n * Page size used when auto-paginating the authorized_practices endpoint.\n */\nconst AUTHORIZED_PRACTICES_PAGE_SIZE = 500;\n\n/**\n * Extract the numeric writeback tracking ID from the long_message field.\n * Expected format: \"Id:3809955\"\n */\nconst parseWritebackId = (longMessage: string | undefined): string | null => {\n if (!longMessage) {\n return null;\n }\n\n const match = WRITEBACK_ID_PATTERN.exec(longMessage);\n return match?.[1] ?? null;\n};\n\n/**\n * Sikka API Client\n *\n * Provides authenticated access to Sikka's ONE API for a specific practice/office.\n *\n * @example\n * ```typescript\n * const client = new SikkaClient({\n * credentials: {\n * appId: 'your-app-id',\n * appKey: 'your-app-key',\n * officeId: 'practice-office-id',\n * secretKey: 'practice-secret-key',\n * },\n * });\n *\n * await client.authenticate();\n *\n * const patients = await client.patients.list({ firstname: 'John' });\n * ```\n */\nexport class SikkaClient {\n /**\n * Authorized practices endpoints.\n * Returns your authorized practices with the Sikka practice utility last\n * refresh and data insert times.\n *\n * This is an application-scoped resource: requests authenticate with the\n * application credentials (`App-Id` / `App-Key` headers), so no prior\n * `authenticate()` call is required.\n */\n public readonly authorizedPractices = {\n /**\n * Get a single authorized practice by its office ID.\n *\n * This is the primary access pattern for resolving \"what PMS does this\n * office run\", since `office_id` (e.g. \"D13303\") is the unique identifier\n * for a practice/office. Matching is a case-sensitive exact match.\n *\n * Internally this lists all authorized practices (`show: 'all'`, with\n * auto-pagination) and returns the first record whose `office_id` matches.\n * Application-scoped: no prior `authenticate()` call is required.\n *\n * @param officeId - The unique office ID to look up\n * @returns The matching authorized practice, or `null` if none matches\n *\n * @example\n * ```typescript\n * const practice = await client.authorizedPractices.getByOfficeId('D13303');\n * if (practice) {\n * console.log(practice.practice_management_system);\n * }\n * ```\n */\n getByOfficeId: async (\n officeId: string,\n ): Promise<SikkaAuthorizedPractice | null> => {\n const practices = await this.authorizedPractices.list({ show: 'all' });\n return (\n practices.find((practice) => practice.office_id === officeId) ?? null\n );\n },\n\n /**\n * List your authorized practices, auto-paginating to completion.\n *\n * By default the API returns only practice id 1. Pass `show: 'all'` to\n * retrieve every authorized office. This method follows the response\n * pagination (offset/limit + `pagination.next`) and accumulates all pages,\n * so the returned array contains every matching record.\n *\n * Application-scoped: requests use the `App-Id` / `App-Key` headers, so no\n * prior `authenticate()` call is required.\n *\n * Items are returned RAW: no normalization, filtering, or coercion is\n * applied. In particular, `practice_management_system` values are\n * inconsistent in case/spelling across records — callers should normalize\n * themselves.\n *\n * WARNING: `practice_id` is NOT unique across offices — the live API can\n * return the same `practice_id` (e.g. \"1\") for every authorized office. Key\n * off `office_id` (e.g. \"D13303\") instead. See `getByOfficeId()`.\n *\n * @param params - Optional filter, sort, and pagination parameters. A\n * caller-supplied `offset`/`limit` controls the starting page and page\n * size; pagination then continues from there until all items are fetched.\n * @returns List of all authorized practices across every page\n *\n * @example\n * ```typescript\n * // Get the default practice\n * const practices = await client.authorizedPractices.list();\n *\n * // Get all authorized practices (across all pages)\n * const allPractices = await client.authorizedPractices.list({\n * show: 'all',\n * });\n * ```\n */\n list: async (\n params: SikkaAuthorizedPracticeListParams = {},\n ): Promise<SikkaAuthorizedPractice[]> => {\n const items: SikkaAuthorizedPractice[] = [];\n\n // Sikka's `offset` is a 0-indexed PAGE NUMBER (not a record offset): the\n // next page is `offset + 1` with `limit` held constant. To stay correct\n // regardless of those semantics, we never compute the next offset\n // ourselves — we follow the `pagination.next` URL's query params verbatim.\n let offset: number | string = params.offset ?? 0;\n let limit: number | string =\n params.limit ?? AUTHORIZED_PRACTICES_PAGE_SIZE;\n\n for (;;) {\n const response: SikkaAuthorizedPracticeListResponse =\n await this.appAuthGet<SikkaAuthorizedPracticeListResponse>(\n '/v4/authorized_practices',\n { ...params, limit, offset },\n );\n\n const pageItems = response.items ?? [];\n items.push(...pageItems);\n\n const totalCount = Number.parseInt(response.total_count, 10);\n const pageSize = Number.parseInt(String(limit), 10);\n const nextUrl = response.pagination?.next;\n\n // Stop when the page came back empty, we've reached the reported\n // total, the API reported no next page, or the page was not full\n // (a reliable \"last page\" signal that guards against infinite loops).\n if (\n pageItems.length === 0 ||\n (!Number.isNaN(totalCount) && items.length >= totalCount) ||\n !nextUrl ||\n (!Number.isNaN(pageSize) && pageItems.length < pageSize)\n ) {\n break;\n }\n\n // Advance strictly by what the API tells us, rather than doing\n // `offset += limit` arithmetic (which would be wrong for page-number\n // semantics).\n const nextSearch = new URL(nextUrl).searchParams;\n offset = nextSearch.get('offset') ?? offset;\n limit = nextSearch.get('limit') ?? limit;\n }\n\n return items;\n },\n };\n\n /**\n * Claim payment endpoints.\n */\n public readonly claimPayment = {\n /**\n * Post a payment to a claim.\n *\n * The Sikka API accepts the request (201) but the actual PMS writeback\n * is asynchronous. The returned `writeback_id` can be used with\n * `writebackStatus.get()` to poll for completion.\n *\n * @param request - Payment details\n * @returns Payment response with parsed writeback tracking ID\n *\n * @example\n * ```typescript\n * const result = await client.claimPayment.post({\n * claim_sr_no: '123456',\n * practice_id: 'practice-id',\n * payment_amount: '100.00|50.00',\n * transaction_sr_no: '789|790',\n * deductible: '0.00|0.00',\n * write_off: '0.00|0.00',\n * claim_payment_date: '2024-01-15',\n * payment_mode: 'EFT',\n * is_payment_by_procedure_code: 'true',\n * note: 'Insurance payment',\n * });\n *\n * if (result.writeback_id) {\n * const status = await client.writebackStatus.get(result.writeback_id);\n * }\n * ```\n */\n post: async (\n request: SikkaClaimPaymentRequest,\n ): Promise<SikkaClaimPaymentResult> => {\n const response = await this.post<SikkaClaimPaymentResponse>(\n '/v4/claim_payment',\n request as unknown as Record<string, unknown>,\n );\n const writebackId = parseWritebackId(response.long_message);\n return { ...response, writeback_id: writebackId };\n },\n };\n\n /**\n * Claims management endpoints.\n */\n public readonly claims = {\n /**\n * List claims matching the given criteria.\n *\n * @param params - Search parameters\n * @returns List of matching claims\n *\n * @example\n * ```typescript\n * const claims = await client.claims.list({\n * patient_id: '12345',\n * status: 'Pending',\n * start_date: '2024-01-01',\n * end_date: '2024-12-31',\n * });\n * ```\n */\n list: async (params: SikkaClaimListParams): Promise<SikkaClaim[]> => {\n const response = await this.get<SikkaClaimListResponse>(\n '/v4/claims',\n params,\n );\n return response.items;\n },\n\n /**\n * Update a claim's status and/or note.\n *\n * The Sikka API accepts the request but the actual PMS writeback\n * is asynchronous. The returned `writeback_id` can be used with\n * `writebackStatus.get()` to poll for completion.\n *\n * At least one of `status` or `note` must be provided.\n *\n * @param request - Claim update details including claim_sr_no\n * @returns Update response with parsed writeback tracking ID\n *\n * @example\n * ```typescript\n * const result = await client.claims.update({\n * claim_sr_no: '123456',\n * practice_id: 'practice-id',\n * status: 'Received',\n * note: 'Claim received and under review',\n * });\n *\n * if (result.writeback_id) {\n * const status = await client.writebackStatus.get(result.writeback_id);\n * }\n * ```\n */\n update: async (\n request: SikkaClaimUpdateRequest,\n ): Promise<SikkaClaimUpdateResult> => {\n const { claim_sr_no: claimSrNo, ...body } = request;\n const response = await this.patch<SikkaClaimUpdateResponse>(\n `/v4/claims/${claimSrNo}`,\n body as unknown as Record<string, unknown>,\n );\n const writebackId = parseWritebackId(response.long_message);\n return { ...response, writeback_id: writebackId };\n },\n };\n\n /**\n * Insurance company details endpoints.\n * Returns insurance company information associated with practices.\n */\n public readonly insuranceCompanyDetails = {\n /**\n * List insurance company details, optionally filtered by practice or company.\n *\n * @param params - Optional filter, sort, and pagination parameters\n * @returns List of insurance company details\n *\n * @example\n * ```typescript\n * // Get all insurance companies\n * const companies = await client.insuranceCompanyDetails.list();\n *\n * // Get insurance companies for a specific practice\n * const practiceCompanies = await client.insuranceCompanyDetails.list({\n * practice_id: '1',\n * });\n * ```\n */\n list: async (\n params: SikkaInsuranceCompanyDetailListParams = {},\n ): Promise<SikkaInsuranceCompanyDetail[]> => {\n const response = await this.get<SikkaInsuranceCompanyDetailListResponse>(\n '/v4/insurance_company_details',\n params,\n );\n return response.items;\n },\n };\n\n /**\n * Patient management endpoints.\n */\n public readonly patients = {\n /**\n * List patients matching the given criteria.\n *\n * @param params - Search parameters\n * @returns List of matching patients\n *\n * @example\n * ```typescript\n * const patients = await client.patients.list({\n * firstname: 'John',\n * lastname: 'Doe',\n * });\n * ```\n */\n list: async (params: SikkaPatientListParams): Promise<SikkaPatient[]> => {\n const response = await this.get<SikkaPatientListResponse>(\n '/v4/patients',\n params,\n );\n return response.items;\n },\n };\n\n /**\n * Payment types management endpoints.\n * Payment types represent the different methods a practice accepts for payments.\n */\n public readonly paymentTypes = {\n /**\n * List payment types for the practice.\n *\n * @param params - Optional filter and pagination parameters\n * @returns List of payment types\n *\n * @example\n * ```typescript\n * // Get all payment types\n * const types = await client.paymentTypes.list();\n *\n * // Get only insurance payment types\n * const insuranceTypes = await client.paymentTypes.list({\n * is_insurance_type: true,\n * });\n * ```\n */\n list: async (\n params: SikkaPaymentTypeListParams = {},\n ): Promise<SikkaPaymentType[]> => {\n const response = await this.get<SikkaPaymentTypeListResponse>(\n '/v4/payment_types',\n params,\n );\n return response.items;\n },\n };\n\n /**\n * PMS users endpoints.\n * Returns the users configured in the practice management system.\n *\n * Provisional: surfaced to support the Eaglesoft-only `user` writeback field\n * on `claimPayment.post()`. The `/v4/pms_users` path is confirmed, but the\n * per-item response shape is pending written confirmation from Sikka support.\n */\n public readonly pmsUsers = {\n /**\n * List PMS users for the practice.\n *\n * @param params - Optional filter and pagination parameters\n * @returns List of PMS users\n *\n * @example\n * ```typescript\n * // Get all PMS users\n * const users = await client.pmsUsers.list();\n *\n * // Resolve a value for the Eaglesoft `user` writeback field\n * const userId = users[0]?.user_id;\n * ```\n */\n list: async (\n params: SikkaPmsUserListParams = {},\n ): Promise<SikkaPmsUser[]> => {\n const response = await this.get<SikkaPmsUserListResponse>(\n '/v4/pms_users',\n params,\n );\n return response.items;\n },\n };\n\n /**\n * Practice variables endpoints.\n * Returns configurable values from the practice management system such as\n * appointment statuses, claim statuses, and patient statuses.\n */\n public readonly practiceVariables = {\n /**\n * List practice variables, optionally filtered by service name.\n *\n * @param params - Optional filter and pagination parameters\n * @returns List of practice variables\n *\n * @example\n * ```typescript\n * // Get all claim statuses\n * const claimStatuses = await client.practiceVariables.list({\n * service_name: 'Claim Status',\n * });\n *\n * // Use the value field for claims.update()\n * const validStatuses = claimStatuses.map(v => v.value);\n * ```\n */\n list: async (\n params: SikkaPracticeVariableListParams = {},\n ): Promise<SikkaPracticeVariable[]> => {\n const response = await this.get<SikkaPracticeVariableListResponse>(\n '/v4/practice_variables',\n params,\n );\n return response.items;\n },\n };\n\n /**\n * Subscribers endpoints.\n * Returns insurance subscriber data associated with patients in practices.\n */\n public readonly subscribers = {\n /**\n * List subscribers, optionally filtered by patient, practice, or subscriber ID.\n *\n * @param params - Optional filter, sort, and pagination parameters\n * @returns List of subscribers\n *\n * @example\n * ```typescript\n * // Get all subscribers\n * const subscribers = await client.subscribers.list();\n *\n * // Get subscribers for a specific patient\n * const patientSubscribers = await client.subscribers.list({\n * patient_id: '994',\n * });\n * ```\n */\n list: async (\n params: SikkaSubscriberListParams = {},\n ): Promise<SikkaSubscriber[]> => {\n const response = await this.get<SikkaSubscriberListResponse>(\n '/v4/subscribers',\n params,\n );\n return response.items;\n },\n };\n\n /**\n * Transactions management endpoints.\n * Transactions include both procedures (service line items) and payments.\n */\n public readonly transactions = {\n /**\n * List transactions matching the given criteria.\n *\n * @param params - Search parameters\n * @returns List of matching transactions\n *\n * @example\n * ```typescript\n * const transactions = await client.transactions.list({\n * claim_sr_no: '123456',\n * });\n * ```\n */\n list: async (\n params: SikkaTransactionListParams,\n ): Promise<SikkaTransaction[]> => {\n const response = await this.get<SikkaTransactionListResponse>(\n '/v4/transactions',\n params,\n );\n return response.items;\n },\n\n /**\n * List only procedure transactions for a specific claim.\n *\n * @param claimSrNo - The claim serial number\n * @returns List of procedure transactions\n */\n listProcedures: async (claimSrNo: string): Promise<SikkaTransaction[]> => {\n const transactions = await this.transactions.list({\n claim_sr_no: claimSrNo,\n });\n return transactions.filter((txn) => txn.transaction_type === 'Procedure');\n },\n };\n\n /**\n * Writeback status endpoints.\n * Used to poll for the result of asynchronous PMS writeback operations\n * (e.g., after posting a claim payment).\n */\n public readonly writebackStatus = {\n /**\n * Get the status of a writeback operation.\n *\n * @param id - The writeback tracking ID (returned from claimPayment.post as writeback_id)\n * @returns The writeback status record\n *\n * @example\n * ```typescript\n * const result = await client.claimPayment.post({ ... });\n * if (result.writeback_id) {\n * const status = await client.writebackStatus.get(result.writeback_id);\n * console.log(status.status, status.is_completed);\n * }\n * ```\n */\n get: async (id: string): Promise<SikkaWritebackStatusItem> => {\n const response = await this.get<SikkaWritebackStatusResponse>(\n '/v4/writeback_status',\n { id },\n );\n const item = response.items[0];\n if (!item) {\n throw new Error(`No writeback status found for id: ${id}`);\n }\n\n return item;\n },\n };\n\n private readonly baseUrl: string;\n\n private readonly credentials: SikkaClientCredentials;\n\n private refreshKey: string | null = null;\n\n private requestKey: string | null = null;\n\n private requestKeyExpiresAt: Date | null = null;\n\n constructor(config: SikkaClientConfig) {\n this.baseUrl = config.baseUrl ?? SIKKA_BASE_URL;\n this.credentials = config.credentials;\n }\n\n /**\n * Make an application-scoped GET request to the Sikka API.\n *\n * Used for endpoints that authenticate with the application credentials\n * (`App-Id` / `App-Key` headers) rather than the per-office request_key\n * scheme — e.g. `/v4/authorized_practices`. This does NOT require a prior\n * `authenticate()` call and does NOT set the `request_key` query param.\n */\n async appAuthGet<T>(\n endpoint: string,\n params?: Record<string, unknown>,\n ): Promise<T> {\n const log = getLogger();\n\n const url = new URL(`${this.baseUrl}${endpoint}`);\n\n if (params) {\n for (const [key, value] of Object.entries(params)) {\n if (value !== null && value !== undefined) {\n url.searchParams.set(key, String(value));\n }\n }\n }\n\n log.debug('Sikka API app-auth GET request', { endpoint, params });\n\n const response = await fetch(url.toString(), {\n headers: {\n 'App-Id': this.credentials.appId,\n 'App-Key': this.credentials.appKey,\n 'Content-Type': 'application/json',\n },\n method: 'GET',\n });\n\n if (!response.ok) {\n const errorBody = await response.text();\n throw new Error(\n `Sikka API GET ${endpoint} failed: ${response.status} ${response.statusText} - ${errorBody}`,\n );\n }\n\n const text = await response.text();\n if (!text || text.trim() === '') {\n return { items: [] } as T;\n }\n\n const data = JSON.parse(text) as T;\n\n log.debug('Sikka API app-auth GET response', {\n endpoint,\n status: response.status,\n });\n\n return data;\n }\n\n /**\n * Authenticate with the Sikka API.\n * Must be called before making any other API requests.\n * The request key is valid for 24 hours.\n */\n async authenticate(): Promise<void> {\n const log = getLogger();\n\n log.debug('Sikka API: Authenticating');\n\n const requestBody: SikkaRequestKeyRequest = {\n app_id: this.credentials.appId,\n app_key: this.credentials.appKey,\n grant_type: 'request_key',\n office_id: this.credentials.officeId,\n secret_key: this.credentials.secretKey,\n };\n\n const response = await this.requestNewKey(requestBody);\n this.requestKey = response.request_key;\n this.refreshKey = response.refresh_key;\n this.requestKeyExpiresAt = new Date(response.end_time);\n\n log.debug('Sikka API: Authenticated successfully', {\n expiresAt: this.requestKeyExpiresAt.toISOString(),\n });\n }\n\n /**\n * Clear the current authentication state.\n */\n clearAuth(): void {\n this.requestKey = null;\n this.refreshKey = null;\n this.requestKeyExpiresAt = null;\n }\n\n /**\n * Ensure the client is authenticated, refreshing if necessary.\n * Automatically refreshes if token expires within 1 hour.\n */\n async ensureAuthenticated(): Promise<void> {\n if (!this.requestKey) {\n throw new Error('Not authenticated. Call authenticate() first.');\n }\n\n const oneHourFromNow = new Date(Date.now() + 60 * 60 * 1_000);\n if (this.requestKeyExpiresAt && this.requestKeyExpiresAt < oneHourFromNow) {\n await this.refreshAuthentication();\n }\n }\n\n /**\n * Make an authenticated GET request to the Sikka API.\n */\n async get<T>(endpoint: string, params?: Record<string, unknown>): Promise<T> {\n const log = getLogger();\n\n await this.ensureAuthenticated();\n\n const requestKey = this.getRequestKey();\n const url = new URL(`${this.baseUrl}${endpoint}`);\n url.searchParams.set('request_key', requestKey);\n\n if (params) {\n for (const [key, value] of Object.entries(params)) {\n if (value !== null && value !== undefined) {\n url.searchParams.set(key, String(value));\n }\n }\n }\n\n log.debug('Sikka API GET request', { endpoint, params });\n\n const response = await fetch(url.toString(), {\n headers: {\n 'Content-Type': 'application/json',\n 'Request-Key': requestKey,\n },\n method: 'GET',\n });\n\n if (!response.ok) {\n const errorBody = await response.text();\n throw new Error(\n `Sikka API GET ${endpoint} failed: ${response.status} ${response.statusText} - ${errorBody}`,\n );\n }\n\n const text = await response.text();\n if (!text || text.trim() === '') {\n return { items: [] } as T;\n }\n\n const data = JSON.parse(text) as T;\n\n log.debug('Sikka API GET response', { endpoint, status: response.status });\n\n return data;\n }\n\n /**\n * Get the current request key.\n *\n * @throws Error if not authenticated\n */\n getRequestKey(): string {\n if (!this.requestKey) {\n throw new Error('Not authenticated. Call authenticate() first.');\n }\n\n return this.requestKey;\n }\n\n // -------------------------------------------------------------------------\n // API Modules\n\n /**\n * Check if the client is currently authenticated with a valid token.\n */\n isAuthenticated(): boolean {\n if (!this.requestKey || !this.requestKeyExpiresAt) {\n return false;\n }\n\n return this.requestKeyExpiresAt > new Date();\n }\n\n /**\n * Make an authenticated PATCH request to the Sikka API.\n */\n async patch<T>(endpoint: string, body: Record<string, unknown>): Promise<T> {\n const log = getLogger();\n\n await this.ensureAuthenticated();\n\n const requestKey = this.getRequestKey();\n const url = new URL(`${this.baseUrl}${endpoint}`);\n url.searchParams.set('request_key', requestKey);\n\n log.debug('Sikka API PATCH request', { body, endpoint });\n\n const response = await fetch(url.toString(), {\n body: JSON.stringify(body),\n headers: {\n 'Content-Type': 'application/json',\n 'Request-Key': requestKey,\n },\n method: 'PATCH',\n });\n\n if (!response.ok) {\n const errorBody = await response.text();\n throw new Error(\n `Sikka API PATCH ${endpoint} failed: ${response.status} ${response.statusText} - ${errorBody}`,\n );\n }\n\n const data = (await response.json()) as T;\n\n log.debug('Sikka API PATCH response', {\n endpoint,\n status: response.status,\n });\n\n return data;\n }\n\n /**\n * Make an authenticated POST request to the Sikka API.\n */\n async post<T>(endpoint: string, body: Record<string, unknown>): Promise<T> {\n const log = getLogger();\n\n await this.ensureAuthenticated();\n\n const requestKey = this.getRequestKey();\n const url = new URL(`${this.baseUrl}${endpoint}`);\n url.searchParams.set('request_key', requestKey);\n\n log.debug('Sikka API POST request', { body, endpoint });\n\n const response = await fetch(url.toString(), {\n body: JSON.stringify(body),\n headers: {\n 'Content-Type': 'application/json',\n 'Request-Key': requestKey,\n },\n method: 'POST',\n });\n\n if (!response.ok) {\n const errorBody = await response.text();\n throw new Error(\n `Sikka API POST ${endpoint} failed: ${response.status} ${response.statusText} - ${errorBody}`,\n );\n }\n\n const data = (await response.json()) as T;\n\n log.debug('Sikka API POST response', { endpoint, status: response.status });\n\n return data;\n }\n\n /**\n * Refresh the authentication token using the refresh key.\n * Called automatically when token is near expiration.\n */\n async refreshAuthentication(): Promise<void> {\n const log = getLogger();\n\n if (!this.refreshKey) {\n throw new Error('No refresh key available. Call authenticate() first.');\n }\n\n log.debug('Sikka API: Refreshing authentication');\n\n const requestBody: SikkaRequestKeyRequest = {\n app_id: this.credentials.appId,\n app_key: this.credentials.appKey,\n grant_type: 'refresh_key',\n refresh_key: this.refreshKey,\n };\n\n const response = await this.requestNewKey(requestBody);\n this.requestKey = response.request_key;\n this.refreshKey = response.refresh_key;\n this.requestKeyExpiresAt = new Date(response.end_time);\n\n log.debug('Sikka API: Authentication refreshed', {\n expiresAt: this.requestKeyExpiresAt.toISOString(),\n });\n }\n\n private async requestNewKey(\n requestBody: SikkaRequestKeyRequest,\n ): Promise<SikkaRequestKeyResponse> {\n const response = await fetch(`${this.baseUrl}/v4/request_key`, {\n body: JSON.stringify(requestBody),\n headers: { 'Content-Type': 'application/json' },\n method: 'POST',\n });\n\n if (!response.ok) {\n let errorMessage = `${response.status} ${response.statusText}`;\n try {\n const errorBody = (await response.json()) as SikkaApiError;\n errorMessage =\n errorBody.error_description ??\n errorBody.error ??\n errorBody.message ??\n errorMessage;\n } catch {\n // Ignore JSON parse errors\n }\n\n throw new Error(`Sikka authentication failed: ${errorMessage}`);\n }\n\n return response.json() as Promise<SikkaRequestKeyResponse>;\n }\n}\n\n/**\n * Create a new Sikka client instance.\n *\n * @param credentials - Office-level credentials\n * @param baseUrl - Optional base URL override\n * @returns A new SikkaClient instance\n *\n * @example\n * ```typescript\n * const client = createSikkaClient({\n * appId: 'your-app-id',\n * appKey: 'your-app-key',\n * officeId: 'practice-office-id',\n * secretKey: 'practice-secret-key',\n * });\n *\n * await client.authenticate();\n * ```\n */\nexport const createSikkaClient = (\n credentials: SikkaClientCredentials,\n baseUrl?: string,\n): SikkaClient => {\n return new SikkaClient({ baseUrl, credentials });\n};\n"]}
|
package/dist/lib/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/lib/types.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Sikka SDK Types\n *\n * Types for interacting with the Sikka API (https://api.sikkasoft.com)\n */\n\n/**\n * Grant type for authentication\n */\nexport type SikkaGrantType = 'refresh_key' | 'request_key';\n\n/**\n * Request body for obtaining a request key\n */\nexport type SikkaRequestKeyRequest = {\n app_id: string;\n app_key: string;\n grant_type: SikkaGrantType;\n office_id?: string;\n refresh_key?: string;\n secret_key?: string;\n};\n\n/**\n * Response from the request_key endpoint\n */\nexport type SikkaRequestKeyResponse = {\n domain: string;\n end_time: string;\n expires_in: string;\n href: string;\n issued_to: string;\n refresh_key: string;\n request_count: string;\n request_key: string;\n scope: string;\n start_time: string;\n status: string;\n};\n\n/**\n * Sikka API error response\n */\nexport type SikkaApiError = {\n error?: string;\n error_description?: string;\n message?: string;\n};\n\n/**\n * App-level credentials (from env vars)\n */\nexport type SikkaAppCredentials = {\n appId: string;\n appKey: string;\n};\n\n/**\n * Credentials required to initialize the Sikka client for a specific office\n */\nexport type SikkaClientCredentials = {\n appId: string;\n appKey: string;\n officeId: string;\n secretKey: string;\n};\n\n/**\n * Configuration for the Sikka client\n */\nexport type SikkaClientConfig = {\n baseUrl?: string;\n credentials: SikkaClientCredentials;\n};\n\n// -----------------------------------------------------------------------------\n// Paginated Response Types\n\n/**\n * Generic paginated response from Sikka API\n */\nexport type SikkaPaginatedResponse<T> = {\n execution_time: string;\n items: T[];\n limit: string;\n offset: string;\n pagination: {\n current: string;\n first: string;\n last: string;\n next: string;\n previous: string;\n };\n total_count: string;\n};\n\n// -----------------------------------------------------------------------------\n// Patient Types\n\n/**\n * Sikka patient record\n */\nexport type SikkaPatient = {\n address_line1: string;\n address_line2: string;\n appointment_href: string;\n birthdate: string;\n cell: string;\n city: string;\n created_date: string;\n email: string;\n fee_no: string;\n first_visit: string;\n firstname: string;\n guarantor_first_name: string;\n guarantor_href: string;\n guarantor_id: string;\n guarantor_last_name: string;\n href: string;\n last_visit: string;\n lastname: string;\n middlename: string;\n other_referral: string;\n patient_id: string;\n patient_referral: string;\n practice_href: string;\n practice_id: string;\n preferred_communication_method: string;\n preferred_contact: string;\n preferred_name: string;\n primary_insurance_company_href: string;\n primary_insurance_company_id: string;\n primary_medical_insurance: string;\n primary_medical_insurance_id: string;\n primary_medical_relationship: string;\n primary_medical_subscriber_id: string;\n primary_relationship: string;\n provider_href: string;\n provider_id: string;\n referred_out: string;\n salutation: string;\n state: string;\n status: string;\n subscriber_id: string;\n zipcode: string;\n};\n\n/**\n * Parameters for listing patients\n */\nexport type SikkaPatientListParams = {\n birthdate?: string;\n firstname?: string;\n lastname?: string;\n limit?: number;\n offset?: number;\n patient_id?: string;\n};\n\n/**\n * Response from the patients endpoint\n */\nexport type SikkaPatientListResponse = SikkaPaginatedResponse<SikkaPatient>;\n\n// -----------------------------------------------------------------------------\n// Claim Types\n\n/**\n * Sikka claim record\n */\nexport type SikkaClaim = {\n bank_no: string;\n carrier_id: string;\n cheque_no: string;\n claim_channel: string;\n claim_description_href: string;\n claim_description_id: string;\n claim_payment_date: string;\n claim_sent_date: string;\n claim_sr_no: string;\n claim_status: string;\n creation_date: string;\n estimated_amount: string;\n guarantor_href: string;\n guarantor_id: string;\n href: string;\n insurance_company_href: string;\n insurance_company_id: string;\n insurance_company_name: string;\n note: string;\n on_hold_date: string;\n others: string;\n patient_href: string;\n patient_id: string;\n pay_to_provider: string;\n payer_id: string;\n payment_amount: string;\n practice_href: string;\n practice_id: string;\n preventive: string;\n primary_claim_id: string;\n primary_or_secondary: string;\n provider_href: string;\n provider_id: string;\n rendering_provider: string;\n resent_date: string;\n return_date: string;\n sent_claim_status: string;\n standard: string;\n total_billed_amount: string;\n total_paid_amount: string;\n tp: string;\n tracer: string;\n};\n\n/**\n * Parameters for listing claims\n */\nexport type SikkaClaimListParams = {\n claim_id?: string;\n end_date?: string;\n limit?: number;\n offset?: number;\n patient_id?: string;\n start_date?: string;\n status?: string;\n};\n\n/**\n * Response from the claims endpoint\n */\nexport type SikkaClaimListResponse = SikkaPaginatedResponse<SikkaClaim>;\n\n/**\n * Request body for updating a claim's status and/or note.\n * Must contain at least one of `status` or `note`.\n */\nexport type SikkaClaimUpdateRequest = {\n /**\n * The generic ID of the claim to update.\n * Used as a URL path parameter: PATCH /v4/claims/{claim_sr_no}\n */\n claim_sr_no: string;\n\n /**\n * The unique identifier for the practice.\n * Retrieve this using the Practices API.\n */\n practice_id: string;\n\n /**\n * Claim status. Only values accepted by the practice management software are valid.\n * Get valid statuses from the practice_variables API where service_name='Claim Status'.\n */\n status?: string;\n\n /**\n * Claim note. At least one of `status` or `note` must be provided.\n */\n note?: string;\n\n /**\n * Internal note for the claim.\n */\n internal_note?: string;\n\n /**\n * Date the claim was sent (format: yyyy-mm-dd).\n */\n date_sent?: string;\n\n /**\n * User who performed the update. Defaults to 'Sikkauser' if not provided.\n */\n user?: string;\n\n /**\n * Date the claim was resent (format: yyyy-mm-dd).\n */\n date_resent?: string;\n\n /**\n * Custom tracking status for OpenDental PMS only.\n * Check PMS settings via pms_general_settings API with\n * setting_name=ClaimTrackingStatusExcludesNone to determine if mandatory.\n * Get values from writeback_details API with category=CustomTrackStatusType\n * and writeback_type=claim_status.\n */\n custom_track_status?: string;\n\n /**\n * SPU check flag.\n */\n check_spu?: string;\n};\n\n/**\n * Raw API response from updating a claim.\n */\nexport type SikkaClaimUpdateResponse = {\n error_code: string;\n http_code: string;\n http_code_desc: string;\n long_message: string;\n more_information: string;\n short_message: string;\n};\n\n/**\n * Enriched result from claims.update() that includes\n * the parsed writeback tracking ID extracted from long_message.\n */\nexport type SikkaClaimUpdateResult = SikkaClaimUpdateResponse & {\n writeback_id: string | null;\n};\n\n// -----------------------------------------------------------------------------\n// Transaction Types\n\n/**\n * Transaction type in Sikka (Procedure = service line item, Payment = payment)\n */\nexport type SikkaTransactionType = 'Payment' | 'Procedure';\n\n/**\n * Sikka transaction record (represents both procedures and payments)\n */\nexport type SikkaTransaction = {\n amount: string;\n claim_href: string;\n claim_sr_no: string;\n created_by: string;\n cust_id: string;\n estimated_insurance_payment: string;\n guarantor_href: string;\n guarantor_id: string;\n href: string;\n insurance_payment: string;\n last_updated_by: string;\n note: string;\n patient_href: string;\n patient_id: string;\n payment_type: string;\n practice_href: string;\n practice_id: string;\n primary_insurance_estimate: string;\n procedure_code: string;\n procedure_description: string;\n provider_href: string;\n provider_id: string;\n quantity: string;\n rowhash: string;\n surface: string;\n tooth_from: string;\n tooth_to: string;\n transaction_date: string;\n transaction_entry_date: string;\n transaction_sr_no: string;\n transaction_type: SikkaTransactionType;\n};\n\n/**\n * Parameters for listing transactions\n */\nexport type SikkaTransactionListParams = {\n claim_sr_no?: string;\n limit?: number;\n offset?: number;\n patient_id?: string;\n transaction_type?: SikkaTransactionType;\n};\n\n/**\n * Response from the transactions endpoint\n */\nexport type SikkaTransactionListResponse =\n SikkaPaginatedResponse<SikkaTransaction>;\n\n// -----------------------------------------------------------------------------\n// Claim Payment Types\n\n/**\n * Payment mode for posting payments\n */\nexport type SikkaPaymentMode = 'Cash' | 'Check' | 'EFT';\n\n/**\n * Request body for posting a claim payment.\n * Uses pipe-delimited values for line item amounts when is_payment_by_procedure_code=true.\n */\nexport type SikkaClaimPaymentRequest = {\n /**\n * The generic ID of the claim for which you want to post the payment.\n */\n claim_sr_no: string;\n\n /**\n * The unique identifier for the practice.\n */\n practice_id: string;\n\n /**\n * The total payment amount (format: xx.xx).\n * If is_payment_by_procedure_code=true, use pipe-delimited values (e.g., \"100.00|50.00\").\n */\n payment_amount: string;\n\n /**\n * Boolean flag indicating if the payment is allocated by procedure code.\n * For Tracker, value should be true only as PMS does not support without procedure code.\n */\n is_payment_by_procedure_code: 'false' | 'true';\n\n /**\n * The date of the payment (format: yyyy-MM-dd).\n */\n claim_payment_date: string;\n\n /**\n * The method of payment.\n * Get valid modes from payment_types API with is_insurance_type=true.\n */\n payment_mode: SikkaPaymentMode;\n\n /**\n * The deductible amount (format: xx.xx). Pass \"0\" if no amount.\n * PMS-specific formats:\n * - Dentrix Enterprise/G6: pipe-delimited \"standard|preventive|others\" (e.g., \"0|0|0\")\n * - Dentrix Ascend: pipe-delimited \"major|preventive|basic|ortho\" (e.g., \"0|0|0|0\")\n * - Tracker: Not supported\n */\n deductible: string;\n\n /**\n * The write-off amount (format: xx.xx). Pass \"0\" if no amount.\n * If is_payment_by_procedure_code=true, use pipe-delimited values.\n * - Dentrix Ascend: write_off not allowed for is_payment_by_procedure_code=false, pass \"0\"\n * - Tracker: Not supported\n */\n write_off: string;\n\n /**\n * The specific transaction ID(s) associated with the payment.\n * Required only if is_payment_by_procedure_code=true.\n * For multiple procedures, use pipe-delimited values (e.g., \"123|124|125\").\n */\n transaction_sr_no?: string;\n\n /**\n * Payment notes/remarks.\n * Should not contain special characters (<, >, &, ,).\n */\n note?: string;\n\n /**\n * The credit adjustment type ID.\n * Get from payment_types API with is_adjustment_type=true.\n * Supported only for Dentrix Enterprise, Dentrix Ascend, and Dentrix G6+.\n * Required if write_off value is negative in Dentrix Enterprise/Ascend.\n */\n adjustment_type?: string;\n\n /**\n * The provider ID for the credit adjustment.\n * Supported only for Dentrix G6+.\n * Must match count of write_off values (pipe-delimited).\n */\n credit_adjustment_provider?: string;\n\n /**\n * Boolean to trigger a debit adjustment write-back.\n * Not supported for Tracker.\n */\n is_debit_adjustment_writeback?: 'false' | 'true';\n\n /**\n * The amount for the debit adjustment (format: xx.xx).\n * Required only if performing debit adjustment write-back.\n * Must be positive (Dentrix G6+ allows 0).\n */\n debit_adjustment_amount?: string;\n\n /**\n * Date of the debit adjustment (format: yyyy-MM-dd).\n * Required for Open Dental PMS if performing debit adjustment write-back.\n * Not supported for Dentrix Ascend.\n */\n debit_adjustment_date?: string;\n\n /**\n * The debit adjustment type ID.\n * Get from payment_types API with is_debit_adjustment_type=true.\n * Required for Open Dental and Dentrix Ascend if performing debit adjustment write-back.\n */\n debit_adjustment_type?: string;\n\n /**\n * Notes for the debit adjustment.\n * Must not contain special characters (<, >, &, ,).\n * Not supported for Dentrix Ascend.\n */\n debit_adjustment_note?: string;\n\n /**\n * Boolean for procedure-level debit adjustments.\n * Supported for Open Dental only.\n * If true, debit_adjustment_amount, debit_adjustment_transaction_sr_no,\n * debit_adjustment_provider, and debit_adjustment_type must have matching counts (pipe-delimited).\n */\n is_debit_adjustment_by_procedure?: 'false' | 'true';\n\n /**\n * Transaction ID(s) for the debit adjustment.\n * Required if is_debit_adjustment_by_procedure=true.\n * Supported for Open Dental only.\n */\n debit_adjustment_transaction_sr_no?: string;\n\n /**\n * The provider ID for the debit adjustment.\n * Required for Open Dental if performing debit adjustment write-back.\n * For Dentrix G6+, must match count of debit_adjustment_amount (pipe-delimited).\n */\n debit_adjustment_provider?: string;\n\n /**\n * The cheque number.\n * Mandatory if payment mode is Cheque for Tracker.\n */\n cheque_no?: string;\n\n /**\n * The bank number.\n */\n bank_no?: string;\n\n /**\n * The name of the bank.\n * Mandatory for Tracker.\n * Get using writeback_details API with category=bank name and writeback_type=claim_payment.\n */\n bank_name?: string;\n\n /**\n * The direct deposit reference number.\n * Mandatory if payment mode is Direct Deposit for Tracker.\n */\n direct_deposit_number?: string;\n\n /**\n * The provider ID.\n * Get using providers API.\n * Supported only for Tracker and Dentrix PMS.\n */\n provider_id?: string;\n};\n\n/**\n * Raw API response from posting a claim payment.\n * The Sikka API returns a 201 with writeback tracking fields rather than\n * the final PMS result, since the actual writeback is asynchronous.\n */\nexport type SikkaClaimPaymentResponse = {\n error_code: string;\n http_code: string;\n http_code_desc: string;\n long_message: string;\n more_information: string;\n short_message: string;\n};\n\n/**\n * Enriched result from claimPayment.post() that includes\n * the parsed writeback tracking ID extracted from long_message.\n */\nexport type SikkaClaimPaymentResult = SikkaClaimPaymentResponse & {\n writeback_id: string | null;\n};\n\n// -----------------------------------------------------------------------------\n// Writeback Status Types\n\n/**\n * A single writeback status record returned by the writeback_status endpoint.\n * Represents the state of an asynchronous PMS writeback operation.\n */\nexport type SikkaWritebackStatusItem = {\n completed_time: string;\n current_status: string;\n has_error: string;\n id: string;\n is_completed: string;\n request_time: string;\n result: string;\n status: string;\n};\n\n/**\n * Response from GET /v4/writeback_status\n */\nexport type SikkaWritebackStatusResponse = {\n items: SikkaWritebackStatusItem[];\n};\n\n// -----------------------------------------------------------------------------\n// Payment Type Types\n\n/**\n * Sikka payment type record\n */\nexport type SikkaPaymentType = {\n code: string;\n description: string;\n href: string;\n practice_href: string;\n practice_id: string;\n};\n\n/**\n * Parameters for listing payment types\n */\nexport type SikkaPaymentTypeListParams = {\n /**\n * Filter by payment type code in practice management system\n */\n code?: string;\n /**\n * Customer ID of office\n */\n customer_id?: string;\n /**\n * If true, returns Credit Adjustment Types only\n */\n is_adjustment_type?: boolean;\n /**\n * If true, returns Payment Types which require credit card details\n * for POST transaction (Planet DDS PMS only)\n */\n are_credit_card_details_required?: boolean;\n /**\n * If true, returns Debit Adjustment Types only\n */\n is_debit_adjustment_type?: boolean;\n /**\n * If true, returns Insurance Payment Types only\n */\n is_insurance_type?: boolean;\n /**\n * Results per page\n */\n limit?: number;\n /**\n * Pagination offset\n */\n offset?: number;\n /**\n * Practice ID of office\n */\n practice_id?: string;\n};\n\n/**\n * Response from the payment_types endpoint\n */\nexport type SikkaPaymentTypeListResponse =\n SikkaPaginatedResponse<SikkaPaymentType>;\n\n// -----------------------------------------------------------------------------\n// Practice Variable Types\n\n/**\n * Sikka practice variable record.\n * Represents configurable values like appointment statuses, claim statuses,\n * and patient statuses from the practice management system.\n */\nexport type SikkaPracticeVariable = {\n description: string;\n href: string;\n practice_href: string;\n practice_id: string;\n service_name: string;\n value: string;\n};\n\n/**\n * Parameters for listing practice variables\n */\nexport type SikkaPracticeVariableListParams = {\n /**\n * Results per page\n */\n limit?: number;\n /**\n * Pagination offset\n */\n offset?: number;\n /**\n * Practice ID of office\n */\n practice_id?: string;\n /**\n * Service item as per the response\n */\n service_item?: string;\n /**\n * Service name filter (e.g. \"Claim Status\", \"Appointment Status\")\n */\n service_name?: string;\n};\n\n/**\n * Response from the practice_variables endpoint\n */\nexport type SikkaPracticeVariableListResponse =\n SikkaPaginatedResponse<SikkaPracticeVariable>;\n\n// -----------------------------------------------------------------------------\n// Insurance Company Details\n// -----------------------------------------------------------------------------\n\n/**\n * Sikka insurance company detail record.\n * Represents an insurance company associated with a practice.\n */\nexport type SikkaInsuranceCompanyDetail = {\n address_line1: string;\n beeper: string;\n cell: string;\n city: string;\n contact: string;\n default_plan: string;\n email1: string;\n email2: string;\n era_capable: string;\n ext1: string;\n ext2: string;\n ext3: string;\n fax1: string;\n fax2: string;\n href: string;\n insurance_company_id: string;\n insurance_company_name: string;\n notes: string;\n payer_id: string;\n payer_type: string;\n phone1: string;\n phone2: string;\n phone3: string;\n practice_href: string;\n practice_id: string;\n provider_practice_id: string;\n state: string;\n trojan_id: string;\n web_link: string;\n zipcode: string;\n};\n\n/**\n * Parameters for listing insurance company details\n */\nexport type SikkaInsuranceCompanyDetailListParams = {\n /**\n * Results per page\n */\n limit?: number;\n /**\n * Pagination offset\n */\n offset?: number;\n /**\n * Practice ID of office\n */\n practice_id?: string;\n /**\n * Insurance company ID in practice management system\n */\n insurance_company_id?: string;\n /**\n * Sort order for results\n */\n sort_by?: 'insurance_company_id' | 'insurance_company_name' | 'practice_id';\n};\n\n/**\n * Response from the insurance_company_details endpoint\n */\nexport type SikkaInsuranceCompanyDetailListResponse =\n SikkaPaginatedResponse<SikkaInsuranceCompanyDetail>;\n\n// -----------------------------------------------------------------------------\n// Subscribers\n// -----------------------------------------------------------------------------\n\n/**\n * Sikka subscriber record.\n * Represents insurance subscriber data associated with a patient in a practice.\n */\nexport type SikkaSubscriber = {\n address_line1: string;\n address_line2: string;\n birthdate: string;\n city: string;\n employer_name: string;\n family_deductible_reamining: string;\n firstname: string;\n gender: string;\n href: string;\n identification_type: string;\n individual_deductible_remaining: string;\n individual_used: string;\n individual_used_treatment_plan: string;\n insurance_company_href: string;\n insurance_company_id: string;\n insurance_effective_date: string;\n lastname: string;\n middlename: string;\n ortho_used: string;\n ortho_used_treatment_plan: string;\n patient_href: string;\n patient_id: string;\n patient_relation: string;\n practice_href: string;\n practice_id: string;\n salutation: string;\n state: string;\n subscriber_id: string;\n type: string;\n zipcode: string;\n};\n\n/**\n * Parameters for listing subscribers\n */\nexport type SikkaSubscriberListParams = {\n /**\n * Results per page\n */\n limit?: number;\n /**\n * Pagination offset\n */\n offset?: number;\n /**\n * Patient ID from practice\n */\n patient_id?: string;\n /**\n * Practice ID of office\n */\n practice_id?: string;\n /**\n * Subscriber ID of office\n */\n subscriber_id?: string;\n /**\n * Sort order for results\n */\n sort_by?: 'patient_id' | 'practice_id';\n};\n\n/**\n * Response from the subscribers endpoint\n */\nexport type SikkaSubscriberListResponse =\n SikkaPaginatedResponse<SikkaSubscriber>;\n\n// -----------------------------------------------------------------------------\n// Authorized Practices\n// -----------------------------------------------------------------------------\n\n/**\n * Sikka authorized practice record.\n * Represents a practice authorized for your app, including the Sikka practice\n * utility last refresh and data insert times.\n *\n * IMPORTANT: `practice_id` is NOT unique across offices — the live API can\n * return the same `practice_id` (e.g. \"1\") for every authorized office. Use\n * `office_id` (e.g. \"D13303\") as the unique identifier for a practice/office.\n *\n * Values such as `practice_management_system` are returned RAW from the\n * provider and are inconsistent in case/spelling across records (e.g.\n * \"Opendental\" vs \"OpenDental\"). The SDK does not normalize them; callers are\n * responsible for any normalization.\n */\nexport type SikkaAuthorizedPractice = {\n address: string;\n city: string;\n data_insert_date: string;\n data_synchronization_date: string;\n /**\n * Difference in minutes between the last PMS refresh and data insert.\n * May be absent on some records.\n */\n difference_in_minutes?: string;\n domain: string;\n /**\n * Email associated with the office. May be absent on some records.\n */\n email?: string;\n /**\n * Financial system name. May be absent for practices without a financial\n * system integration.\n */\n financial_system?: string;\n financial_system_refresh_date?: string;\n financial_system_version?: string;\n href: string;\n /**\n * Unique identifier for the office (e.g. \"D13303\"). Prefer this over\n * `practice_id`, which is NOT unique across offices.\n */\n office_id: string;\n partner_id?: string;\n /**\n * NOT unique across offices — the live API can return the same value (e.g.\n * \"1\") for multiple offices. Use `office_id` as the unique identifier.\n */\n practice_id: string;\n /**\n * Raw practice management system name from the provider. Inconsistent in\n * case/spelling (e.g. \"Opendental\" vs \"OpenDental\"); not normalized.\n */\n practice_management_system: string;\n practice_management_system_refresh_date: string;\n practice_management_system_refresh_date_time_zone?: string;\n practice_management_system_refresh_date_time_zone_utc_offset?: string;\n practice_management_system_version: string;\n practice_name: string;\n secret_key: string;\n state: string;\n zip: string;\n};\n\n/**\n * Parameters for listing authorized practices\n */\nexport type SikkaAuthorizedPracticeListParams = {\n /**\n * Financial system\n */\n financial_system?: string;\n /**\n * Financial system version\n */\n financial_system_version?: string;\n /**\n * Results per page\n */\n limit?: number;\n /**\n * Pagination offset\n */\n offset?: number;\n /**\n * Practice ID\n */\n practice_id?: string;\n /**\n * Practice management system\n */\n practice_management_system?: string;\n /**\n * Practice management system refresh date time zone\n */\n practice_management_system_refresh_date_time_zone?: string;\n /**\n * Practice management system version\n */\n practice_management_system_version?: string;\n /**\n * Practice name\n */\n practice_name?: string;\n /**\n * value should be 'all'. API returns by default practice id 1.\n * Use this parameter to get all practices.\n */\n show?: 'all';\n /**\n * Sort order for results\n */\n sort_by?: 'office_id' | 'practice_id';\n};\n\n/**\n * Response from the authorized_practices endpoint\n */\nexport type SikkaAuthorizedPracticeListResponse =\n SikkaPaginatedResponse<SikkaAuthorizedPractice>;\n"]}
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/lib/types.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Sikka SDK Types\n *\n * Types for interacting with the Sikka API (https://api.sikkasoft.com)\n */\n\n/**\n * Grant type for authentication\n */\nexport type SikkaGrantType = 'refresh_key' | 'request_key';\n\n/**\n * Request body for obtaining a request key\n */\nexport type SikkaRequestKeyRequest = {\n app_id: string;\n app_key: string;\n grant_type: SikkaGrantType;\n office_id?: string;\n refresh_key?: string;\n secret_key?: string;\n};\n\n/**\n * Response from the request_key endpoint\n */\nexport type SikkaRequestKeyResponse = {\n domain: string;\n end_time: string;\n expires_in: string;\n href: string;\n issued_to: string;\n refresh_key: string;\n request_count: string;\n request_key: string;\n scope: string;\n start_time: string;\n status: string;\n};\n\n/**\n * Sikka API error response\n */\nexport type SikkaApiError = {\n error?: string;\n error_description?: string;\n message?: string;\n};\n\n/**\n * App-level credentials (from env vars)\n */\nexport type SikkaAppCredentials = {\n appId: string;\n appKey: string;\n};\n\n/**\n * Credentials required to initialize the Sikka client for a specific office\n */\nexport type SikkaClientCredentials = {\n appId: string;\n appKey: string;\n officeId: string;\n secretKey: string;\n};\n\n/**\n * Configuration for the Sikka client\n */\nexport type SikkaClientConfig = {\n baseUrl?: string;\n credentials: SikkaClientCredentials;\n};\n\n// -----------------------------------------------------------------------------\n// Paginated Response Types\n\n/**\n * Generic paginated response from Sikka API\n */\nexport type SikkaPaginatedResponse<T> = {\n execution_time: string;\n items: T[];\n limit: string;\n offset: string;\n pagination: {\n current: string;\n first: string;\n last: string;\n next: string;\n previous: string;\n };\n total_count: string;\n};\n\n// -----------------------------------------------------------------------------\n// Patient Types\n\n/**\n * Sikka patient record\n */\nexport type SikkaPatient = {\n address_line1: string;\n address_line2: string;\n appointment_href: string;\n birthdate: string;\n cell: string;\n city: string;\n created_date: string;\n email: string;\n fee_no: string;\n first_visit: string;\n firstname: string;\n guarantor_first_name: string;\n guarantor_href: string;\n guarantor_id: string;\n guarantor_last_name: string;\n href: string;\n last_visit: string;\n lastname: string;\n middlename: string;\n other_referral: string;\n patient_id: string;\n patient_referral: string;\n practice_href: string;\n practice_id: string;\n preferred_communication_method: string;\n preferred_contact: string;\n preferred_name: string;\n primary_insurance_company_href: string;\n primary_insurance_company_id: string;\n primary_medical_insurance: string;\n primary_medical_insurance_id: string;\n primary_medical_relationship: string;\n primary_medical_subscriber_id: string;\n primary_relationship: string;\n provider_href: string;\n provider_id: string;\n referred_out: string;\n salutation: string;\n state: string;\n status: string;\n subscriber_id: string;\n zipcode: string;\n};\n\n/**\n * Parameters for listing patients\n */\nexport type SikkaPatientListParams = {\n birthdate?: string;\n firstname?: string;\n lastname?: string;\n limit?: number;\n offset?: number;\n patient_id?: string;\n};\n\n/**\n * Response from the patients endpoint\n */\nexport type SikkaPatientListResponse = SikkaPaginatedResponse<SikkaPatient>;\n\n// -----------------------------------------------------------------------------\n// Claim Types\n\n/**\n * Sikka claim record\n */\nexport type SikkaClaim = {\n bank_no: string;\n carrier_id: string;\n cheque_no: string;\n claim_channel: string;\n claim_description_href: string;\n claim_description_id: string;\n claim_payment_date: string;\n claim_sent_date: string;\n claim_sr_no: string;\n claim_status: string;\n creation_date: string;\n estimated_amount: string;\n guarantor_href: string;\n guarantor_id: string;\n href: string;\n insurance_company_href: string;\n insurance_company_id: string;\n insurance_company_name: string;\n note: string;\n on_hold_date: string;\n others: string;\n patient_href: string;\n patient_id: string;\n pay_to_provider: string;\n payer_id: string;\n payment_amount: string;\n practice_href: string;\n practice_id: string;\n preventive: string;\n primary_claim_id: string;\n primary_or_secondary: string;\n provider_href: string;\n provider_id: string;\n rendering_provider: string;\n resent_date: string;\n return_date: string;\n sent_claim_status: string;\n standard: string;\n total_billed_amount: string;\n total_paid_amount: string;\n tp: string;\n tracer: string;\n};\n\n/**\n * Parameters for listing claims\n */\nexport type SikkaClaimListParams = {\n claim_id?: string;\n end_date?: string;\n limit?: number;\n offset?: number;\n patient_id?: string;\n start_date?: string;\n status?: string;\n};\n\n/**\n * Response from the claims endpoint\n */\nexport type SikkaClaimListResponse = SikkaPaginatedResponse<SikkaClaim>;\n\n/**\n * Request body for updating a claim's status and/or note.\n * Must contain at least one of `status` or `note`.\n */\nexport type SikkaClaimUpdateRequest = {\n /**\n * The generic ID of the claim to update.\n * Used as a URL path parameter: PATCH /v4/claims/{claim_sr_no}\n */\n claim_sr_no: string;\n\n /**\n * The unique identifier for the practice.\n * Retrieve this using the Practices API.\n */\n practice_id: string;\n\n /**\n * Claim status. Only values accepted by the practice management software are valid.\n * Get valid statuses from the practice_variables API where service_name='Claim Status'.\n */\n status?: string;\n\n /**\n * Claim note. At least one of `status` or `note` must be provided.\n */\n note?: string;\n\n /**\n * Internal note for the claim.\n */\n internal_note?: string;\n\n /**\n * Date the claim was sent (format: yyyy-mm-dd).\n */\n date_sent?: string;\n\n /**\n * User who performed the update. Defaults to 'Sikkauser' if not provided.\n */\n user?: string;\n\n /**\n * Date the claim was resent (format: yyyy-mm-dd).\n */\n date_resent?: string;\n\n /**\n * Custom tracking status for OpenDental PMS only.\n * Check PMS settings via pms_general_settings API with\n * setting_name=ClaimTrackingStatusExcludesNone to determine if mandatory.\n * Get values from writeback_details API with category=CustomTrackStatusType\n * and writeback_type=claim_status.\n */\n custom_track_status?: string;\n\n /**\n * SPU check flag.\n */\n check_spu?: string;\n};\n\n/**\n * Raw API response from updating a claim.\n */\nexport type SikkaClaimUpdateResponse = {\n error_code: string;\n http_code: string;\n http_code_desc: string;\n long_message: string;\n more_information: string;\n short_message: string;\n};\n\n/**\n * Enriched result from claims.update() that includes\n * the parsed writeback tracking ID extracted from long_message.\n */\nexport type SikkaClaimUpdateResult = SikkaClaimUpdateResponse & {\n writeback_id: string | null;\n};\n\n// -----------------------------------------------------------------------------\n// Transaction Types\n\n/**\n * Transaction type in Sikka (Procedure = service line item, Payment = payment)\n */\nexport type SikkaTransactionType = 'Payment' | 'Procedure';\n\n/**\n * Sikka transaction record (represents both procedures and payments)\n */\nexport type SikkaTransaction = {\n amount: string;\n claim_href: string;\n claim_sr_no: string;\n created_by: string;\n cust_id: string;\n estimated_insurance_payment: string;\n guarantor_href: string;\n guarantor_id: string;\n href: string;\n insurance_payment: string;\n last_updated_by: string;\n note: string;\n patient_href: string;\n patient_id: string;\n payment_type: string;\n practice_href: string;\n practice_id: string;\n primary_insurance_estimate: string;\n procedure_code: string;\n procedure_description: string;\n provider_href: string;\n provider_id: string;\n quantity: string;\n rowhash: string;\n surface: string;\n tooth_from: string;\n tooth_to: string;\n transaction_date: string;\n transaction_entry_date: string;\n transaction_sr_no: string;\n transaction_type: SikkaTransactionType;\n};\n\n/**\n * Parameters for listing transactions\n */\nexport type SikkaTransactionListParams = {\n claim_sr_no?: string;\n limit?: number;\n offset?: number;\n patient_id?: string;\n transaction_type?: SikkaTransactionType;\n};\n\n/**\n * Response from the transactions endpoint\n */\nexport type SikkaTransactionListResponse =\n SikkaPaginatedResponse<SikkaTransaction>;\n\n// -----------------------------------------------------------------------------\n// Claim Payment Types\n\n/**\n * Payment mode for posting payments\n */\nexport type SikkaPaymentMode = 'Cash' | 'Check' | 'EFT';\n\n/**\n * Request body for posting a claim payment.\n * Uses pipe-delimited values for line item amounts when is_payment_by_procedure_code=true.\n */\nexport type SikkaClaimPaymentRequest = {\n /**\n * The generic ID of the claim for which you want to post the payment.\n */\n claim_sr_no: string;\n\n /**\n * The unique identifier for the practice.\n */\n practice_id: string;\n\n /**\n * The total payment amount (format: xx.xx).\n * If is_payment_by_procedure_code=true, use pipe-delimited values (e.g., \"100.00|50.00\").\n */\n payment_amount: string;\n\n /**\n * Boolean flag indicating if the payment is allocated by procedure code.\n * For Tracker, value should be true only as PMS does not support without procedure code.\n */\n is_payment_by_procedure_code: 'false' | 'true';\n\n /**\n * The date of the payment (format: yyyy-MM-dd).\n */\n claim_payment_date: string;\n\n /**\n * The method of payment.\n * Get valid modes from payment_types API with is_insurance_type=true.\n */\n payment_mode: SikkaPaymentMode;\n\n /**\n * The deductible amount (format: xx.xx). Pass \"0\" if no amount.\n * PMS-specific formats:\n * - Dentrix Enterprise/G6: pipe-delimited \"standard|preventive|others\" (e.g., \"0|0|0\")\n * - Dentrix Ascend: pipe-delimited \"major|preventive|basic|ortho\" (e.g., \"0|0|0|0\")\n * - Tracker: Not supported\n */\n deductible: string;\n\n /**\n * The write-off amount (format: xx.xx). Pass \"0\" if no amount.\n * If is_payment_by_procedure_code=true, use pipe-delimited values.\n * - Dentrix Ascend: write_off not allowed for is_payment_by_procedure_code=false, pass \"0\"\n * - Tracker: Not supported\n */\n write_off: string;\n\n /**\n * The specific transaction ID(s) associated with the payment.\n * Required only if is_payment_by_procedure_code=true.\n * For multiple procedures, use pipe-delimited values (e.g., \"123|124|125\").\n */\n transaction_sr_no?: string;\n\n /**\n * Payment notes/remarks.\n * Should not contain special characters (<, >, &, ,).\n */\n note?: string;\n\n /**\n * The credit adjustment type ID.\n * Get from payment_types API with is_adjustment_type=true.\n * Supported only for Dentrix Enterprise, Dentrix Ascend, and Dentrix G6+.\n * Required if write_off value is negative in Dentrix Enterprise/Ascend.\n */\n adjustment_type?: string;\n\n /**\n * The provider ID for the credit adjustment.\n * Supported only for Dentrix G6+.\n * Must match count of write_off values (pipe-delimited).\n */\n credit_adjustment_provider?: string;\n\n // ---------------------------------------------------------------------------\n // Eaglesoft-specific fields\n //\n // The following fields are accepted only by the Eaglesoft writeback contract.\n // Sending them on other PMSs (Dentrix, Open Dental, Tracker) is unsupported.\n // Field names/accepted values are sourced from Sikka's developer portal and\n // are pending written confirmation from Sikka support; treat as provisional.\n\n /**\n * How the payment is booked in Eaglesoft. Required for Eaglesoft; when\n * omitted Eaglesoft defaults the writeback to `Adjustment` rather than a\n * collection. Likely values: `Collection` | `Adjustment`. Eaglesoft-only.\n */\n impacts?: string;\n\n /**\n * Whether this call finalizes the claim in Eaglesoft. Defaults to `true`\n * when omitted, which closes the claim after the first call — set `'false'`\n * on every call except the last when a claim is posted across multiple\n * provider groups. Eaglesoft-only.\n */\n is_final_payment?: 'false' | 'true';\n\n /**\n * Boolean to trigger a credit adjustment (write-off) write-back in Eaglesoft.\n * Eaglesoft uses this family instead of the Dentrix `write_off` /\n * `adjustment_type` fields. Eaglesoft-only.\n */\n is_credit_adjustment_writeback?: 'false' | 'true';\n\n /**\n * The credit adjustment (write-off) amount(s) for Eaglesoft (format: xx.xx).\n * Pipe-delimited when applied per procedure. Eaglesoft-only.\n */\n credit_adjustment_amount?: string;\n\n /**\n * Transaction ID(s) the Eaglesoft credit adjustment applies to.\n * Pipe-delimited when applied per procedure. Eaglesoft-only.\n */\n credit_adjustment_transaction_sr_no?: string;\n\n /**\n * The credit adjustment type ID for Eaglesoft.\n * Get from payment_types API with is_adjustment_type=true. Eaglesoft-only.\n */\n credit_adjustment_type?: string;\n\n /**\n * The PMS user the writeback is attributed to in Eaglesoft.\n * Get from the pms_users API. Eaglesoft-only.\n */\n user?: string;\n\n /**\n * Boolean to trigger a debit adjustment write-back.\n * Not supported for Tracker.\n */\n is_debit_adjustment_writeback?: 'false' | 'true';\n\n /**\n * The amount for the debit adjustment (format: xx.xx).\n * Required only if performing debit adjustment write-back.\n * Must be positive (Dentrix G6+ allows 0).\n */\n debit_adjustment_amount?: string;\n\n /**\n * Date of the debit adjustment (format: yyyy-MM-dd).\n * Required for Open Dental PMS if performing debit adjustment write-back.\n * Not supported for Dentrix Ascend.\n */\n debit_adjustment_date?: string;\n\n /**\n * The debit adjustment type ID.\n * Get from payment_types API with is_debit_adjustment_type=true.\n * Required for Open Dental and Dentrix Ascend if performing debit adjustment write-back.\n */\n debit_adjustment_type?: string;\n\n /**\n * Notes for the debit adjustment.\n * Must not contain special characters (<, >, &, ,).\n * Not supported for Dentrix Ascend.\n */\n debit_adjustment_note?: string;\n\n /**\n * Boolean for procedure-level debit adjustments.\n * Supported for Open Dental only.\n * If true, debit_adjustment_amount, debit_adjustment_transaction_sr_no,\n * debit_adjustment_provider, and debit_adjustment_type must have matching counts (pipe-delimited).\n */\n is_debit_adjustment_by_procedure?: 'false' | 'true';\n\n /**\n * Transaction ID(s) for the debit adjustment.\n * Required if is_debit_adjustment_by_procedure=true.\n * Supported for Open Dental only.\n */\n debit_adjustment_transaction_sr_no?: string;\n\n /**\n * The provider ID for the debit adjustment.\n * Required for Open Dental if performing debit adjustment write-back.\n * For Dentrix G6+, must match count of debit_adjustment_amount (pipe-delimited).\n */\n debit_adjustment_provider?: string;\n\n /**\n * The cheque number.\n * Mandatory if payment mode is Cheque for Tracker.\n */\n cheque_no?: string;\n\n /**\n * The bank number.\n */\n bank_no?: string;\n\n /**\n * The name of the bank.\n * Mandatory for Tracker.\n * Get using writeback_details API with category=bank name and writeback_type=claim_payment.\n */\n bank_name?: string;\n\n /**\n * The direct deposit reference number.\n * Mandatory if payment mode is Direct Deposit for Tracker.\n */\n direct_deposit_number?: string;\n\n /**\n * The provider ID.\n * Get using providers API.\n * Supported only for Tracker and Dentrix PMS.\n */\n provider_id?: string;\n};\n\n/**\n * Raw API response from posting a claim payment.\n * The Sikka API returns a 201 with writeback tracking fields rather than\n * the final PMS result, since the actual writeback is asynchronous.\n */\nexport type SikkaClaimPaymentResponse = {\n error_code: string;\n http_code: string;\n http_code_desc: string;\n long_message: string;\n more_information: string;\n short_message: string;\n};\n\n/**\n * Enriched result from claimPayment.post() that includes\n * the parsed writeback tracking ID extracted from long_message.\n */\nexport type SikkaClaimPaymentResult = SikkaClaimPaymentResponse & {\n writeback_id: string | null;\n};\n\n// -----------------------------------------------------------------------------\n// Writeback Status Types\n\n/**\n * A single writeback status record returned by the writeback_status endpoint.\n * Represents the state of an asynchronous PMS writeback operation.\n */\nexport type SikkaWritebackStatusItem = {\n completed_time: string;\n current_status: string;\n has_error: string;\n id: string;\n is_completed: string;\n request_time: string;\n result: string;\n status: string;\n};\n\n/**\n * Response from GET /v4/writeback_status\n */\nexport type SikkaWritebackStatusResponse = {\n items: SikkaWritebackStatusItem[];\n};\n\n// -----------------------------------------------------------------------------\n// Payment Type Types\n\n/**\n * Sikka payment type record\n */\nexport type SikkaPaymentType = {\n code: string;\n description: string;\n href: string;\n practice_href: string;\n practice_id: string;\n};\n\n/**\n * Parameters for listing payment types\n */\nexport type SikkaPaymentTypeListParams = {\n /**\n * Filter by payment type code in practice management system\n */\n code?: string;\n /**\n * Customer ID of office\n */\n customer_id?: string;\n /**\n * If true, returns Credit Adjustment Types only\n */\n is_adjustment_type?: boolean;\n /**\n * If true, returns Payment Types which require credit card details\n * for POST transaction (Planet DDS PMS only)\n */\n are_credit_card_details_required?: boolean;\n /**\n * If true, returns Debit Adjustment Types only\n */\n is_debit_adjustment_type?: boolean;\n /**\n * If true, returns Insurance Payment Types only\n */\n is_insurance_type?: boolean;\n /**\n * Results per page\n */\n limit?: number;\n /**\n * Pagination offset\n */\n offset?: number;\n /**\n * Practice ID of office\n */\n practice_id?: string;\n};\n\n/**\n * Response from the payment_types endpoint\n */\nexport type SikkaPaymentTypeListResponse =\n SikkaPaginatedResponse<SikkaPaymentType>;\n\n// -----------------------------------------------------------------------------\n// PMS User Types\n//\n// Provisional: surfaced to support the Eaglesoft-only `user` field on\n// SikkaClaimPaymentRequest. The `/v4/pms_users` endpoint path is confirmed and\n// uses the standard Sikka paginated envelope, but the per-item field set is\n// pending written confirmation from Sikka support; treat as provisional.\n\n/**\n * Sikka PMS user record.\n * Represents a user configured in the practice management system. Used to\n * resolve a valid value for the Eaglesoft-only `user` writeback field.\n *\n * Provisional shape: additional fields may be returned by the live API\n * (use `fields=get_all` on the endpoint to enumerate them).\n */\nexport type SikkaPmsUser = {\n first_name: string;\n href: string;\n last_name: string;\n practice_href: string;\n practice_id: string;\n status: string;\n user_id: string;\n user_name: string;\n};\n\n/**\n * Parameters for listing PMS users\n */\nexport type SikkaPmsUserListParams = {\n /**\n * Results per page\n */\n limit?: number;\n /**\n * Pagination offset\n */\n offset?: number;\n /**\n * Practice ID of office\n */\n practice_id?: string;\n /**\n * Filter by PMS user ID\n */\n user_id?: string;\n};\n\n/**\n * Response from the pms_users endpoint\n */\nexport type SikkaPmsUserListResponse = SikkaPaginatedResponse<SikkaPmsUser>;\n\n// -----------------------------------------------------------------------------\n// Practice Variable Types\n\n/**\n * Sikka practice variable record.\n * Represents configurable values like appointment statuses, claim statuses,\n * and patient statuses from the practice management system.\n */\nexport type SikkaPracticeVariable = {\n description: string;\n href: string;\n practice_href: string;\n practice_id: string;\n service_name: string;\n value: string;\n};\n\n/**\n * Parameters for listing practice variables\n */\nexport type SikkaPracticeVariableListParams = {\n /**\n * Results per page\n */\n limit?: number;\n /**\n * Pagination offset\n */\n offset?: number;\n /**\n * Practice ID of office\n */\n practice_id?: string;\n /**\n * Service item as per the response\n */\n service_item?: string;\n /**\n * Service name filter (e.g. \"Claim Status\", \"Appointment Status\")\n */\n service_name?: string;\n};\n\n/**\n * Response from the practice_variables endpoint\n */\nexport type SikkaPracticeVariableListResponse =\n SikkaPaginatedResponse<SikkaPracticeVariable>;\n\n// -----------------------------------------------------------------------------\n// Insurance Company Details\n// -----------------------------------------------------------------------------\n\n/**\n * Sikka insurance company detail record.\n * Represents an insurance company associated with a practice.\n */\nexport type SikkaInsuranceCompanyDetail = {\n address_line1: string;\n beeper: string;\n cell: string;\n city: string;\n contact: string;\n default_plan: string;\n email1: string;\n email2: string;\n era_capable: string;\n ext1: string;\n ext2: string;\n ext3: string;\n fax1: string;\n fax2: string;\n href: string;\n insurance_company_id: string;\n insurance_company_name: string;\n notes: string;\n payer_id: string;\n payer_type: string;\n phone1: string;\n phone2: string;\n phone3: string;\n practice_href: string;\n practice_id: string;\n provider_practice_id: string;\n state: string;\n trojan_id: string;\n web_link: string;\n zipcode: string;\n};\n\n/**\n * Parameters for listing insurance company details\n */\nexport type SikkaInsuranceCompanyDetailListParams = {\n /**\n * Results per page\n */\n limit?: number;\n /**\n * Pagination offset\n */\n offset?: number;\n /**\n * Practice ID of office\n */\n practice_id?: string;\n /**\n * Insurance company ID in practice management system\n */\n insurance_company_id?: string;\n /**\n * Sort order for results\n */\n sort_by?: 'insurance_company_id' | 'insurance_company_name' | 'practice_id';\n};\n\n/**\n * Response from the insurance_company_details endpoint\n */\nexport type SikkaInsuranceCompanyDetailListResponse =\n SikkaPaginatedResponse<SikkaInsuranceCompanyDetail>;\n\n// -----------------------------------------------------------------------------\n// Subscribers\n// -----------------------------------------------------------------------------\n\n/**\n * Sikka subscriber record.\n * Represents insurance subscriber data associated with a patient in a practice.\n */\nexport type SikkaSubscriber = {\n address_line1: string;\n address_line2: string;\n birthdate: string;\n city: string;\n employer_name: string;\n family_deductible_reamining: string;\n firstname: string;\n gender: string;\n href: string;\n identification_type: string;\n individual_deductible_remaining: string;\n individual_used: string;\n individual_used_treatment_plan: string;\n insurance_company_href: string;\n insurance_company_id: string;\n insurance_effective_date: string;\n lastname: string;\n middlename: string;\n ortho_used: string;\n ortho_used_treatment_plan: string;\n patient_href: string;\n patient_id: string;\n patient_relation: string;\n practice_href: string;\n practice_id: string;\n salutation: string;\n state: string;\n subscriber_id: string;\n type: string;\n zipcode: string;\n};\n\n/**\n * Parameters for listing subscribers\n */\nexport type SikkaSubscriberListParams = {\n /**\n * Results per page\n */\n limit?: number;\n /**\n * Pagination offset\n */\n offset?: number;\n /**\n * Patient ID from practice\n */\n patient_id?: string;\n /**\n * Practice ID of office\n */\n practice_id?: string;\n /**\n * Subscriber ID of office\n */\n subscriber_id?: string;\n /**\n * Sort order for results\n */\n sort_by?: 'patient_id' | 'practice_id';\n};\n\n/**\n * Response from the subscribers endpoint\n */\nexport type SikkaSubscriberListResponse =\n SikkaPaginatedResponse<SikkaSubscriber>;\n\n// -----------------------------------------------------------------------------\n// Authorized Practices\n// -----------------------------------------------------------------------------\n\n/**\n * Sikka authorized practice record.\n * Represents a practice authorized for your app, including the Sikka practice\n * utility last refresh and data insert times.\n *\n * IMPORTANT: `practice_id` is NOT unique across offices — the live API can\n * return the same `practice_id` (e.g. \"1\") for every authorized office. Use\n * `office_id` (e.g. \"D13303\") as the unique identifier for a practice/office.\n *\n * Values such as `practice_management_system` are returned RAW from the\n * provider and are inconsistent in case/spelling across records (e.g.\n * \"Opendental\" vs \"OpenDental\"). The SDK does not normalize them; callers are\n * responsible for any normalization.\n */\nexport type SikkaAuthorizedPractice = {\n address: string;\n city: string;\n data_insert_date: string;\n data_synchronization_date: string;\n /**\n * Difference in minutes between the last PMS refresh and data insert.\n * May be absent on some records.\n */\n difference_in_minutes?: string;\n domain: string;\n /**\n * Email associated with the office. May be absent on some records.\n */\n email?: string;\n /**\n * Financial system name. May be absent for practices without a financial\n * system integration.\n */\n financial_system?: string;\n financial_system_refresh_date?: string;\n financial_system_version?: string;\n href: string;\n /**\n * Unique identifier for the office (e.g. \"D13303\"). Prefer this over\n * `practice_id`, which is NOT unique across offices.\n */\n office_id: string;\n partner_id?: string;\n /**\n * NOT unique across offices — the live API can return the same value (e.g.\n * \"1\") for multiple offices. Use `office_id` as the unique identifier.\n */\n practice_id: string;\n /**\n * Raw practice management system name from the provider. Inconsistent in\n * case/spelling (e.g. \"Opendental\" vs \"OpenDental\"); not normalized.\n */\n practice_management_system: string;\n practice_management_system_refresh_date: string;\n practice_management_system_refresh_date_time_zone?: string;\n practice_management_system_refresh_date_time_zone_utc_offset?: string;\n practice_management_system_version: string;\n practice_name: string;\n secret_key: string;\n state: string;\n zip: string;\n};\n\n/**\n * Parameters for listing authorized practices\n */\nexport type SikkaAuthorizedPracticeListParams = {\n /**\n * Financial system\n */\n financial_system?: string;\n /**\n * Financial system version\n */\n financial_system_version?: string;\n /**\n * Results per page\n */\n limit?: number;\n /**\n * Pagination offset\n */\n offset?: number;\n /**\n * Practice ID\n */\n practice_id?: string;\n /**\n * Practice management system\n */\n practice_management_system?: string;\n /**\n * Practice management system refresh date time zone\n */\n practice_management_system_refresh_date_time_zone?: string;\n /**\n * Practice management system version\n */\n practice_management_system_version?: string;\n /**\n * Practice name\n */\n practice_name?: string;\n /**\n * value should be 'all'. API returns by default practice id 1.\n * Use this parameter to get all practices.\n */\n show?: 'all';\n /**\n * Sort order for results\n */\n sort_by?: 'office_id' | 'practice_id';\n};\n\n/**\n * Response from the authorized_practices endpoint\n */\nexport type SikkaAuthorizedPracticeListResponse =\n SikkaPaginatedResponse<SikkaAuthorizedPractice>;\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type SikkaAuthorizedPractice, type SikkaAuthorizedPracticeListParams, type SikkaClaim, type SikkaClaimListParams, type SikkaClaimPaymentRequest, type SikkaClaimPaymentResult, type SikkaClaimUpdateRequest, type SikkaClaimUpdateResult, type SikkaClientConfig, type SikkaClientCredentials, type SikkaInsuranceCompanyDetail, type SikkaInsuranceCompanyDetailListParams, type SikkaPatient, type SikkaPatientListParams, type SikkaPaymentType, type SikkaPaymentTypeListParams, type SikkaPracticeVariable, type SikkaPracticeVariableListParams, type SikkaSubscriber, type SikkaSubscriberListParams, type SikkaTransaction, type SikkaTransactionListParams, type SikkaWritebackStatusItem } from './types.js';
|
|
1
|
+
import { type SikkaAuthorizedPractice, type SikkaAuthorizedPracticeListParams, type SikkaClaim, type SikkaClaimListParams, type SikkaClaimPaymentRequest, type SikkaClaimPaymentResult, type SikkaClaimUpdateRequest, type SikkaClaimUpdateResult, type SikkaClientConfig, type SikkaClientCredentials, type SikkaInsuranceCompanyDetail, type SikkaInsuranceCompanyDetailListParams, type SikkaPatient, type SikkaPatientListParams, type SikkaPaymentType, type SikkaPaymentTypeListParams, type SikkaPmsUser, type SikkaPmsUserListParams, type SikkaPracticeVariable, type SikkaPracticeVariableListParams, type SikkaSubscriber, type SikkaSubscriberListParams, type SikkaTransaction, type SikkaTransactionListParams, type SikkaWritebackStatusItem } from './types.js';
|
|
2
2
|
export declare class SikkaClient {
|
|
3
3
|
readonly authorizedPractices: {
|
|
4
4
|
getByOfficeId: (officeId: string) => Promise<SikkaAuthorizedPractice | null>;
|
|
@@ -20,6 +20,9 @@ export declare class SikkaClient {
|
|
|
20
20
|
readonly paymentTypes: {
|
|
21
21
|
list: (params?: SikkaPaymentTypeListParams) => Promise<SikkaPaymentType[]>;
|
|
22
22
|
};
|
|
23
|
+
readonly pmsUsers: {
|
|
24
|
+
list: (params?: SikkaPmsUserListParams) => Promise<SikkaPmsUser[]>;
|
|
25
|
+
};
|
|
23
26
|
readonly practiceVariables: {
|
|
24
27
|
list: (params?: SikkaPracticeVariableListParams) => Promise<SikkaPracticeVariable[]>;
|
|
25
28
|
};
|
|
@@ -39,6 +42,7 @@ export declare class SikkaClient {
|
|
|
39
42
|
private requestKey;
|
|
40
43
|
private requestKeyExpiresAt;
|
|
41
44
|
constructor(config: SikkaClientConfig);
|
|
45
|
+
appAuthGet<T>(endpoint: string, params?: Record<string, unknown>): Promise<T>;
|
|
42
46
|
authenticate(): Promise<void>;
|
|
43
47
|
clearAuth(): void;
|
|
44
48
|
ensureAuthenticated(): Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/lib/client.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MAAM,EAAE,iBAAiB;IAa/B,UAAU,CAAC,CAAC,EAChB,QAAQ,EAAE,MAAM,EAChB,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC/B,OAAO,CAAC,CAAC,CAAC;IAmDP,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC;IA0BnC,SAAS,IAAI,IAAI;IAUX,mBAAmB,IAAI,OAAO,CAAC,IAAI,CAAC;IAcpC,GAAG,CAAC,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC;IAmD5E,aAAa,IAAI,MAAM;IAcvB,eAAe,IAAI,OAAO;IAWpB,KAAK,CAAC,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC;IAwCrE,IAAI,CAAC,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC;IAsCpE,qBAAqB,IAAI,OAAO,CAAC,IAAI,CAAC;YA0B9B,aAAa;CA2B5B;AAqBD,eAAO,MAAM,iBAAiB,GAC5B,aAAa,sBAAsB,EACnC,UAAU,MAAM,KACf,WAEF,CAAC"}
|
|
@@ -239,6 +239,13 @@ export type SikkaClaimPaymentRequest = {
|
|
|
239
239
|
note?: string;
|
|
240
240
|
adjustment_type?: string;
|
|
241
241
|
credit_adjustment_provider?: string;
|
|
242
|
+
impacts?: string;
|
|
243
|
+
is_final_payment?: 'false' | 'true';
|
|
244
|
+
is_credit_adjustment_writeback?: 'false' | 'true';
|
|
245
|
+
credit_adjustment_amount?: string;
|
|
246
|
+
credit_adjustment_transaction_sr_no?: string;
|
|
247
|
+
credit_adjustment_type?: string;
|
|
248
|
+
user?: string;
|
|
242
249
|
is_debit_adjustment_writeback?: 'false' | 'true';
|
|
243
250
|
debit_adjustment_amount?: string;
|
|
244
251
|
debit_adjustment_date?: string;
|
|
@@ -296,6 +303,23 @@ export type SikkaPaymentTypeListParams = {
|
|
|
296
303
|
practice_id?: string;
|
|
297
304
|
};
|
|
298
305
|
export type SikkaPaymentTypeListResponse = SikkaPaginatedResponse<SikkaPaymentType>;
|
|
306
|
+
export type SikkaPmsUser = {
|
|
307
|
+
first_name: string;
|
|
308
|
+
href: string;
|
|
309
|
+
last_name: string;
|
|
310
|
+
practice_href: string;
|
|
311
|
+
practice_id: string;
|
|
312
|
+
status: string;
|
|
313
|
+
user_id: string;
|
|
314
|
+
user_name: string;
|
|
315
|
+
};
|
|
316
|
+
export type SikkaPmsUserListParams = {
|
|
317
|
+
limit?: number;
|
|
318
|
+
offset?: number;
|
|
319
|
+
practice_id?: string;
|
|
320
|
+
user_id?: string;
|
|
321
|
+
};
|
|
322
|
+
export type SikkaPmsUserListResponse = SikkaPaginatedResponse<SikkaPmsUser>;
|
|
299
323
|
export type SikkaPracticeVariable = {
|
|
300
324
|
description: string;
|
|
301
325
|
href: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/lib/types.ts"],"names":[],"mappings":"AASA,MAAM,MAAM,cAAc,GAAG,aAAa,GAAG,aAAa,CAAC;AAK3D,MAAM,MAAM,sBAAsB,GAAG;IACnC,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,cAAc,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAKF,MAAM,MAAM,uBAAuB,GAAG;IACpC,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,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