@timeback/case 0.1.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/client.d.ts +42 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/constants.d.ts +29 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/errors.d.ts +1 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +1730 -0
- package/dist/factory.d.ts +42 -0
- package/dist/factory.d.ts.map +1 -0
- package/dist/index.d.ts +560 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +16966 -0
- package/dist/lib/index.d.ts +7 -0
- package/dist/lib/index.d.ts.map +1 -0
- package/dist/lib/resolve.d.ts +19 -0
- package/dist/lib/resolve.d.ts.map +1 -0
- package/dist/lib/transport.d.ts +27 -0
- package/dist/lib/transport.d.ts.map +1 -0
- package/dist/public-types.d.ts +327 -0
- package/dist/public-types.d.ts.map +1 -0
- package/dist/public-types.js +0 -0
- package/dist/resources/associations.d.ts +21 -0
- package/dist/resources/associations.d.ts.map +1 -0
- package/dist/resources/documents.d.ts +30 -0
- package/dist/resources/documents.d.ts.map +1 -0
- package/dist/resources/index.d.ts +8 -0
- package/dist/resources/index.d.ts.map +1 -0
- package/dist/resources/items.d.ts +30 -0
- package/dist/resources/items.d.ts.map +1 -0
- package/dist/resources/packages.d.ts +45 -0
- package/dist/resources/packages.d.ts.map +1 -0
- package/dist/types/client.d.ts +38 -0
- package/dist/types/client.d.ts.map +1 -0
- package/dist/types/index.d.ts +4 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types.d.ts +10 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/utils.d.ts +5 -0
- package/dist/utils.d.ts.map +1 -0
- package/package.json +43 -0
package/dist/client.d.ts
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CASE Client
|
|
3
|
+
*
|
|
4
|
+
* Main entry point for the CASE SDK.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* CASE API client for Competency and Academic Standards Exchange.
|
|
8
|
+
*
|
|
9
|
+
* Provides access to CASE endpoints including documents, items,
|
|
10
|
+
* associations, and package management.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```typescript
|
|
14
|
+
* const client = new CaseClient({
|
|
15
|
+
* env: 'staging',
|
|
16
|
+
* auth: {
|
|
17
|
+
* clientId: 'your-client-id',
|
|
18
|
+
* clientSecret: 'your-client-secret',
|
|
19
|
+
* },
|
|
20
|
+
* })
|
|
21
|
+
*
|
|
22
|
+
* // List all framework documents
|
|
23
|
+
* const docs = await client.documents.list()
|
|
24
|
+
*
|
|
25
|
+
* // Get a specific package
|
|
26
|
+
* const pkg = await client.packages.get(sourcedId)
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
export declare const CaseClient: {
|
|
30
|
+
new (config?: import("./types").CaseClientConfig): {
|
|
31
|
+
readonly transport: import("./types").CaseTransportLike;
|
|
32
|
+
readonly _provider?: import("@timeback/internal-client-infra").TimebackProvider | undefined;
|
|
33
|
+
readonly documents: import("./resources").DocumentsResource;
|
|
34
|
+
readonly items: import("./resources").ItemsResource;
|
|
35
|
+
readonly associations: import("./resources").AssociationsResource;
|
|
36
|
+
readonly packages: import("./resources").PackagesResource;
|
|
37
|
+
getTransport(): import("./types").CaseTransportLike;
|
|
38
|
+
checkAuth(): Promise<import("@timeback/internal-client-infra").AuthCheckResult>;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
export type { CaseClientInstance } from './types';
|
|
42
|
+
//# sourceMappingURL=client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,UAAU;;;;;;;;;;;CAAqB,CAAA;AAE5C,YAAY,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAA"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CASE Constants
|
|
3
|
+
*
|
|
4
|
+
* Configuration constants for the CASE client.
|
|
5
|
+
*/
|
|
6
|
+
import type { ClientUrlMaps, Platform } from '@timeback/internal-client-infra';
|
|
7
|
+
/**
|
|
8
|
+
* Environment variable names for fallback config.
|
|
9
|
+
*
|
|
10
|
+
* Supports fallback chains - tries each env var in order until one is defined:
|
|
11
|
+
* - `TIMEBACK_API_*` (canonical/preferred)
|
|
12
|
+
* - `TIMEBACK_*` (unified Timeback shorthand)
|
|
13
|
+
* - `CASE_*` (service-specific)
|
|
14
|
+
*/
|
|
15
|
+
export declare const CASE_ENV_VARS: {
|
|
16
|
+
readonly baseUrl: readonly ["TIMEBACK_API_BASE_URL", "TIMEBACK_BASE_URL", "CASE_BASE_URL"];
|
|
17
|
+
readonly clientId: readonly ["TIMEBACK_API_CLIENT_ID", "TIMEBACK_CLIENT_ID", "CASE_CLIENT_ID"];
|
|
18
|
+
readonly clientSecret: readonly ["TIMEBACK_API_CLIENT_SECRET", "TIMEBACK_CLIENT_SECRET", "CASE_CLIENT_SECRET"];
|
|
19
|
+
readonly authUrl: readonly ["TIMEBACK_API_AUTH_URL", "TIMEBACK_AUTH_URL", "CASE_TOKEN_URL"];
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* Get URL maps for a specific platform.
|
|
23
|
+
*
|
|
24
|
+
* CASE uses the main API server (same as OneRoster/Edubridge/CLR).
|
|
25
|
+
* @param platform - Platform name
|
|
26
|
+
* @returns Client URL maps for the platform
|
|
27
|
+
*/
|
|
28
|
+
export declare function getUrlMapsForPlatform(platform?: Platform): ClientUrlMaps;
|
|
29
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,KAAK,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAA;AAE9E;;;;;;;GAOG;AACH,eAAO,MAAM,aAAa;;;;;CAKhB,CAAA;AAEV;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CAAC,QAAQ,GAAE,QAA2B,GAAG,aAAa,CAM1F"}
|
package/dist/errors.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ApiError as CaseError, ForbiddenError, InputValidationError, NotFoundError, UnauthorizedError, ValidationError } from '@timeback/internal-client-infra';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EACN,QAAQ,EACR,cAAc,EACd,oBAAoB,EACpB,aAAa,EACb,iBAAiB,EACjB,eAAe,EACf,MAAM,iCAAiC,CAAA;AAExC,OAAO,EACN,QAAQ,IAAI,SAAS,EACrB,cAAc,EACd,oBAAoB,EACpB,aAAa,EACb,iBAAiB,EACjB,eAAe,GACf,CAAA"}
|