@fincuratech/sikka-sdk-js 1.3.0 → 1.5.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/dist/lib/client.js +38 -0
- package/dist/lib/client.js.map +1 -1
- package/dist/lib/types.js.map +1 -1
- package/dist/types/lib/client.d.ts +6 -1
- package/dist/types/lib/client.d.ts.map +1 -1
- package/dist/types/lib/types.d.ts +39 -0
- package/dist/types/lib/types.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/lib/client.js
CHANGED
|
@@ -21,6 +21,12 @@ export class SikkaClient {
|
|
|
21
21
|
const response = await this.get('/v4/claims', params);
|
|
22
22
|
return response.items;
|
|
23
23
|
},
|
|
24
|
+
update: async (request) => {
|
|
25
|
+
const { claim_sr_no: claimSrNo, ...body } = request;
|
|
26
|
+
const response = await this.patch(`/v4/claims/${claimSrNo}`, body);
|
|
27
|
+
const writebackId = parseWritebackId(response.long_message);
|
|
28
|
+
return { ...response, writeback_id: writebackId };
|
|
29
|
+
},
|
|
24
30
|
};
|
|
25
31
|
patients = {
|
|
26
32
|
list: async (params) => {
|
|
@@ -34,6 +40,12 @@ export class SikkaClient {
|
|
|
34
40
|
return response.items;
|
|
35
41
|
},
|
|
36
42
|
};
|
|
43
|
+
practiceVariables = {
|
|
44
|
+
list: async (params = {}) => {
|
|
45
|
+
const response = await this.get('/v4/practice_variables', params);
|
|
46
|
+
return response.items;
|
|
47
|
+
},
|
|
48
|
+
};
|
|
37
49
|
transactions = {
|
|
38
50
|
list: async (params) => {
|
|
39
51
|
const response = await this.get('/v4/transactions', params);
|
|
@@ -142,6 +154,32 @@ export class SikkaClient {
|
|
|
142
154
|
}
|
|
143
155
|
return this.requestKeyExpiresAt > new Date();
|
|
144
156
|
}
|
|
157
|
+
async patch(endpoint, body) {
|
|
158
|
+
const log = getLogger();
|
|
159
|
+
await this.ensureAuthenticated();
|
|
160
|
+
const requestKey = this.getRequestKey();
|
|
161
|
+
const url = new URL(`${this.baseUrl}${endpoint}`);
|
|
162
|
+
url.searchParams.set('request_key', requestKey);
|
|
163
|
+
log.debug('Sikka API PATCH request', { body, endpoint });
|
|
164
|
+
const response = await fetch(url.toString(), {
|
|
165
|
+
body: JSON.stringify(body),
|
|
166
|
+
headers: {
|
|
167
|
+
'Content-Type': 'application/json',
|
|
168
|
+
'Request-Key': requestKey,
|
|
169
|
+
},
|
|
170
|
+
method: 'PATCH',
|
|
171
|
+
});
|
|
172
|
+
if (!response.ok) {
|
|
173
|
+
const errorBody = await response.text();
|
|
174
|
+
throw new Error(`Sikka API PATCH ${endpoint} failed: ${response.status} ${response.statusText} - ${errorBody}`);
|
|
175
|
+
}
|
|
176
|
+
const data = (await response.json());
|
|
177
|
+
log.debug('Sikka API PATCH response', {
|
|
178
|
+
endpoint,
|
|
179
|
+
status: response.status,
|
|
180
|
+
});
|
|
181
|
+
return data;
|
|
182
|
+
}
|
|
145
183
|
async post(endpoint, body) {
|
|
146
184
|
const log = getLogger();
|
|
147
185
|
await this.ensureAuthenticated();
|
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;AA0BxC,MAAM,cAAc,GAAG,2BAA2B,CAAC;AAEnD,MAAM,oBAAoB,GAAG,aAAa,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,WAAW,CAAC,CAAC;IACrD,OAAO,KAAK,EAAE,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC;AAC5B,CAAC,CAAC;AAuBF,MAAM,OAAO,WAAW;IAIN,YAAY,GAAG;QA+B7B,IAAI,EAAE,K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AmB,CAAC,WAAW,EAAE;SAClD,CAAC,CAAC;IACL,CAAC;IAEO,KAAK,CAAC,aAAa,CACzB,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 SikkaClaim,\n type SikkaClaimListParams,\n type SikkaClaimListResponse,\n type SikkaClaimPaymentRequest,\n type SikkaClaimPaymentResponse,\n type SikkaClaimPaymentResult,\n type SikkaClientConfig,\n type SikkaClientCredentials,\n type SikkaPatient,\n type SikkaPatientListParams,\n type SikkaPatientListResponse,\n type SikkaPaymentType,\n type SikkaPaymentTypeListParams,\n type SikkaPaymentTypeListResponse,\n type SikkaRequestKeyRequest,\n type SikkaRequestKeyResponse,\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 * 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 * 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 /**\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 * 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 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,CAAC;AAgCxC,MAAM,cAAc,GAAG,2BAA2B,CAAC;AAEnD,MAAM,oBAAoB,GAAG,aAAa,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,WAAW,CAAC,CAAC;IACrD,OAAO,KAAK,EAAE,CAAC,CAAC,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AAiB;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 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 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 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 * 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 * 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 * 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 * 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"]}
|
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 * An authorized practice from the authorized_practices endpoint\n */\nexport type SikkaAuthorizedPractice = {\n address: string;\n city: string;\n data_insert_date: string;\n data_synchronization_date: string;\n domain: string;\n email: string;\n href: string;\n office_id: string;\n practice_id: string;\n practice_management_system: string;\n practice_management_system_refresh_date: 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 * Response from the authorized_practices endpoint\n */\nexport type SikkaAuthorizedPracticesResponse = {\n execution_time: string;\n items: SikkaAuthorizedPractice[];\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 * 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// 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"]}
|
|
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 * An authorized practice from the authorized_practices endpoint\n */\nexport type SikkaAuthorizedPractice = {\n address: string;\n city: string;\n data_insert_date: string;\n data_synchronization_date: string;\n domain: string;\n email: string;\n href: string;\n office_id: string;\n practice_id: string;\n practice_management_system: string;\n practice_management_system_refresh_date: 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 * Response from the authorized_practices endpoint\n */\nexport type SikkaAuthorizedPracticesResponse = {\n execution_time: string;\n items: SikkaAuthorizedPractice[];\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 * 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"]}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { type SikkaClaim, type SikkaClaimListParams, type SikkaClaimPaymentRequest, type SikkaClaimPaymentResult, type SikkaClientConfig, type SikkaClientCredentials, type SikkaPatient, type SikkaPatientListParams, type SikkaPaymentType, type SikkaPaymentTypeListParams, type SikkaTransaction, type SikkaTransactionListParams, type SikkaWritebackStatusItem } from './types.js';
|
|
1
|
+
import { type SikkaClaim, type SikkaClaimListParams, type SikkaClaimPaymentRequest, type SikkaClaimPaymentResult, type SikkaClaimUpdateRequest, type SikkaClaimUpdateResult, type SikkaClientConfig, type SikkaClientCredentials, type SikkaPatient, type SikkaPatientListParams, type SikkaPaymentType, type SikkaPaymentTypeListParams, type SikkaPracticeVariable, type SikkaPracticeVariableListParams, type SikkaTransaction, type SikkaTransactionListParams, type SikkaWritebackStatusItem } from './types.js';
|
|
2
2
|
export declare class SikkaClient {
|
|
3
3
|
readonly claimPayment: {
|
|
4
4
|
post: (request: SikkaClaimPaymentRequest) => Promise<SikkaClaimPaymentResult>;
|
|
5
5
|
};
|
|
6
6
|
readonly claims: {
|
|
7
7
|
list: (params: SikkaClaimListParams) => Promise<SikkaClaim[]>;
|
|
8
|
+
update: (request: SikkaClaimUpdateRequest) => Promise<SikkaClaimUpdateResult>;
|
|
8
9
|
};
|
|
9
10
|
readonly patients: {
|
|
10
11
|
list: (params: SikkaPatientListParams) => Promise<SikkaPatient[]>;
|
|
@@ -12,6 +13,9 @@ export declare class SikkaClient {
|
|
|
12
13
|
readonly paymentTypes: {
|
|
13
14
|
list: (params?: SikkaPaymentTypeListParams) => Promise<SikkaPaymentType[]>;
|
|
14
15
|
};
|
|
16
|
+
readonly practiceVariables: {
|
|
17
|
+
list: (params?: SikkaPracticeVariableListParams) => Promise<SikkaPracticeVariable[]>;
|
|
18
|
+
};
|
|
15
19
|
readonly transactions: {
|
|
16
20
|
list: (params: SikkaTransactionListParams) => Promise<SikkaTransaction[]>;
|
|
17
21
|
listProcedures: (claimSrNo: string) => Promise<SikkaTransaction[]>;
|
|
@@ -31,6 +35,7 @@ export declare class SikkaClient {
|
|
|
31
35
|
get<T>(endpoint: string, params?: Record<string, unknown>): Promise<T>;
|
|
32
36
|
getRequestKey(): string;
|
|
33
37
|
isAuthenticated(): boolean;
|
|
38
|
+
patch<T>(endpoint: string, body: Record<string, unknown>): Promise<T>;
|
|
34
39
|
post<T>(endpoint: string, body: Record<string, unknown>): Promise<T>;
|
|
35
40
|
refreshAuthentication(): Promise<void>;
|
|
36
41
|
private requestNewKey;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/lib/client.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,KAAK,UAAU,EACf,KAAK,oBAAoB,EAEzB,KAAK,wBAAwB,EAE7B,KAAK,uBAAuB,EAC5B,KAAK,iBAAiB,EACtB,KAAK,sBAAsB,EAC3B,KAAK,YAAY,EACjB,KAAK,sBAAsB,EAE3B,KAAK,gBAAgB,EACrB,KAAK,0BAA0B,
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/lib/client.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,KAAK,UAAU,EACf,KAAK,oBAAoB,EAEzB,KAAK,wBAAwB,EAE7B,KAAK,uBAAuB,EAC5B,KAAK,uBAAuB,EAE5B,KAAK,sBAAsB,EAC3B,KAAK,iBAAiB,EACtB,KAAK,sBAAsB,EAC3B,KAAK,YAAY,EACjB,KAAK,sBAAsB,EAE3B,KAAK,gBAAgB,EACrB,KAAK,0B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AAC,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"}
|
|
@@ -192,6 +192,29 @@ export type SikkaClaimListParams = {
|
|
|
192
192
|
status?: string;
|
|
193
193
|
};
|
|
194
194
|
export type SikkaClaimListResponse = SikkaPaginatedResponse<SikkaClaim>;
|
|
195
|
+
export type SikkaClaimUpdateRequest = {
|
|
196
|
+
claim_sr_no: string;
|
|
197
|
+
practice_id: string;
|
|
198
|
+
status?: string;
|
|
199
|
+
note?: string;
|
|
200
|
+
internal_note?: string;
|
|
201
|
+
date_sent?: string;
|
|
202
|
+
user?: string;
|
|
203
|
+
date_resent?: string;
|
|
204
|
+
custom_track_status?: string;
|
|
205
|
+
check_spu?: string;
|
|
206
|
+
};
|
|
207
|
+
export type SikkaClaimUpdateResponse = {
|
|
208
|
+
error_code: string;
|
|
209
|
+
http_code: string;
|
|
210
|
+
http_code_desc: string;
|
|
211
|
+
long_message: string;
|
|
212
|
+
more_information: string;
|
|
213
|
+
short_message: string;
|
|
214
|
+
};
|
|
215
|
+
export type SikkaClaimUpdateResult = SikkaClaimUpdateResponse & {
|
|
216
|
+
writeback_id: string | null;
|
|
217
|
+
};
|
|
195
218
|
export type SikkaTransactionType = 'Payment' | 'Procedure';
|
|
196
219
|
export type SikkaTransaction = {
|
|
197
220
|
amount: string;
|
|
@@ -305,4 +328,20 @@ export type SikkaPaymentTypeListParams = {
|
|
|
305
328
|
practice_id?: string;
|
|
306
329
|
};
|
|
307
330
|
export type SikkaPaymentTypeListResponse = SikkaPaginatedResponse<SikkaPaymentType>;
|
|
331
|
+
export type SikkaPracticeVariable = {
|
|
332
|
+
description: string;
|
|
333
|
+
href: string;
|
|
334
|
+
practice_href: string;
|
|
335
|
+
practice_id: string;
|
|
336
|
+
service_name: string;
|
|
337
|
+
value: string;
|
|
338
|
+
};
|
|
339
|
+
export type SikkaPracticeVariableListParams = {
|
|
340
|
+
limit?: number;
|
|
341
|
+
offset?: number;
|
|
342
|
+
practice_id?: string;
|
|
343
|
+
service_item?: string;
|
|
344
|
+
service_name?: string;
|
|
345
|
+
};
|
|
346
|
+
export type SikkaPracticeVariableListResponse = SikkaPaginatedResponse<SikkaPracticeVariable>;
|
|
308
347
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -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,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW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