@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.
Files changed (40) hide show
  1. package/dist/client.d.ts +42 -0
  2. package/dist/client.d.ts.map +1 -0
  3. package/dist/constants.d.ts +29 -0
  4. package/dist/constants.d.ts.map +1 -0
  5. package/dist/errors.d.ts +1 -0
  6. package/dist/errors.d.ts.map +1 -0
  7. package/dist/errors.js +1730 -0
  8. package/dist/factory.d.ts +42 -0
  9. package/dist/factory.d.ts.map +1 -0
  10. package/dist/index.d.ts +560 -0
  11. package/dist/index.d.ts.map +1 -0
  12. package/dist/index.js +16966 -0
  13. package/dist/lib/index.d.ts +7 -0
  14. package/dist/lib/index.d.ts.map +1 -0
  15. package/dist/lib/resolve.d.ts +19 -0
  16. package/dist/lib/resolve.d.ts.map +1 -0
  17. package/dist/lib/transport.d.ts +27 -0
  18. package/dist/lib/transport.d.ts.map +1 -0
  19. package/dist/public-types.d.ts +327 -0
  20. package/dist/public-types.d.ts.map +1 -0
  21. package/dist/public-types.js +0 -0
  22. package/dist/resources/associations.d.ts +21 -0
  23. package/dist/resources/associations.d.ts.map +1 -0
  24. package/dist/resources/documents.d.ts +30 -0
  25. package/dist/resources/documents.d.ts.map +1 -0
  26. package/dist/resources/index.d.ts +8 -0
  27. package/dist/resources/index.d.ts.map +1 -0
  28. package/dist/resources/items.d.ts +30 -0
  29. package/dist/resources/items.d.ts.map +1 -0
  30. package/dist/resources/packages.d.ts +45 -0
  31. package/dist/resources/packages.d.ts.map +1 -0
  32. package/dist/types/client.d.ts +38 -0
  33. package/dist/types/client.d.ts.map +1 -0
  34. package/dist/types/index.d.ts +4 -0
  35. package/dist/types/index.d.ts.map +1 -0
  36. package/dist/types.d.ts +10 -0
  37. package/dist/types.d.ts.map +1 -0
  38. package/dist/utils.d.ts +5 -0
  39. package/dist/utils.d.ts.map +1 -0
  40. package/package.json +43 -0
@@ -0,0 +1,7 @@
1
+ /**
2
+ * @internal
3
+ */
4
+ export { resolveToProvider } from './resolve';
5
+ export { Transport } from './transport';
6
+ export type { ResolvedConfig } from '@timeback/internal-client-infra';
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/lib/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAA;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAEvC,YAAY,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAA"}
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Provider Resolution
3
+ *
4
+ * @internal
5
+ */
6
+ import type { ProviderRegistry } from '@timeback/internal-client-infra';
7
+ import type { CaseClientConfig, CaseResolvedProvider } from '../types';
8
+ /**
9
+ * Resolve CASE client config to a TimebackProvider.
10
+ *
11
+ * @param config - Client configuration
12
+ * @param registry - Provider registry for platform/env resolution
13
+ * @returns Resolved provider or transport
14
+ * @throws {Error} If configuration is invalid or incomplete
15
+ *
16
+ * @internal
17
+ */
18
+ export declare function resolveToProvider(config: CaseClientConfig, registry?: ProviderRegistry): CaseResolvedProvider;
19
+ //# sourceMappingURL=resolve.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolve.d.ts","sourceRoot":"","sources":["../../src/lib/resolve.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AASH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAA;AACvE,OAAO,KAAK,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAA;AAEtE;;;;;;;;;GASG;AACH,wBAAgB,iBAAiB,CAChC,MAAM,EAAE,gBAAgB,EACxB,QAAQ,GAAE,gBAA4C,GACpD,oBAAoB,CAMtB"}
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Transport Layer
3
+ *
4
+ * HTTP transport for CASE API communication.
5
+ */
6
+ import { BaseTransport } from '@timeback/internal-client-infra';
7
+ import type { CasePaths, PaginatedResponse, RequestOptions } from '@timeback/internal-client-infra';
8
+ import type { CaseTransportConfig } from '../types';
9
+ /**
10
+ * HTTP transport layer for CASE API communication.
11
+ *
12
+ * Uses header-based pagination (same as OneRoster) for list endpoints.
13
+ */
14
+ export declare class Transport extends BaseTransport {
15
+ readonly paths: CasePaths;
16
+ constructor(config: CaseTransportConfig);
17
+ /**
18
+ * Make a paginated request using header-based pagination.
19
+ *
20
+ * @template T - Expected item type in the response array
21
+ * @param path - API endpoint path
22
+ * @param options - Request options
23
+ * @returns Response data with hasMore flag and optional total count
24
+ */
25
+ requestPaginated<T>(path: string, options?: RequestOptions): Promise<PaginatedResponse<T>>;
26
+ }
27
+ //# sourceMappingURL=transport.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transport.d.ts","sourceRoot":"","sources":["../../src/lib/transport.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,aAAa,EAAyB,MAAM,iCAAiC,CAAA;AAItF,OAAO,KAAK,EAAE,SAAS,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAA;AACnG,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAA;AAEnD;;;;GAIG;AACH,qBAAa,SAAU,SAAQ,aAAa;IAC3C,QAAQ,CAAC,KAAK,EAAE,SAAS,CAAA;IAEzB,YAAY,MAAM,EAAE,mBAAmB,EAGtC;IAED;;;;;;;OAOG;IACG,gBAAgB,CAAC,CAAC,EACvB,IAAI,EAAE,MAAM,EACZ,OAAO,GAAE,cAAmB,GAC1B,OAAO,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAI/B;CACD"}
@@ -0,0 +1,327 @@
1
+ /**
2
+ * CASE Base Types
3
+ *
4
+ * Shared types for the CASE (Competency and Academic Standards Exchange) v1p1 API.
5
+ */
6
+
7
+ /**
8
+ * URI reference to a CASE entity.
9
+ *
10
+ * A common pattern across CASE responses for linking to related entities.
11
+ */
12
+ interface LinkURI {
13
+ sourcedId: string
14
+ title: string
15
+ uri: string
16
+ }
17
+
18
+ /**
19
+ * Optional URI reference (uri may be absent).
20
+ */
21
+ interface OptionalLinkURI {
22
+ sourcedId: string
23
+ title: string
24
+ uri?: string
25
+ }
26
+
27
+ /**
28
+ * CASE Association Types
29
+ *
30
+ * Types for CASE Framework Associations (CFAssociations).
31
+ * A CFAssociation defines a relationship between two CASE entities.
32
+ */
33
+
34
+
35
+
36
+ /**
37
+ * A CASE Framework Association.
38
+ *
39
+ * Defines a typed relationship between two CASE entities
40
+ * (e.g., isChildOf, isRelatedTo, precedes).
41
+ */
42
+ interface CFAssociation {
43
+ sourcedId: string
44
+ associationType: string
45
+ sequenceNumber?: number
46
+ uri: string
47
+ originNodeURI: LinkURI
48
+ destinationNodeURI: LinkURI
49
+ CFAssociationGroupingURI?: OptionalLinkURI
50
+ lastChangeDateTime: string
51
+ notes?: string
52
+ extensions?: Record<string, unknown>
53
+ CFDocumentURI?: OptionalLinkURI
54
+ }
55
+
56
+ /**
57
+ * CASE Document Types
58
+ *
59
+ * Types for CASE Framework Documents (CFDocuments).
60
+ * A CFDocument represents a curriculum framework or standards document.
61
+ */
62
+
63
+
64
+
65
+ /**
66
+ * A CASE Framework Document.
67
+ *
68
+ * Represents a curriculum framework or standards document containing
69
+ * items (competencies/standards) and their associations.
70
+ */
71
+ interface CFDocument {
72
+ sourcedId: string
73
+ title: string
74
+ uri: string
75
+ frameworkType?: string
76
+ caseVersion?: string
77
+ creator: string
78
+ lastChangeDateTime: string
79
+ officialSourceURL?: string
80
+ publisher?: string
81
+ description?: string
82
+ subject?: string[]
83
+ subjectURI?: OptionalLinkURI[]
84
+ language?: string
85
+ version?: string
86
+ adoptionStatus?: string
87
+ statusStartDate?: string
88
+ statusEndDate?: string
89
+ licenseURI?: OptionalLinkURI
90
+ notes?: string
91
+ extensions?: Record<string, unknown>
92
+ CFPackageURI: LinkURI
93
+ }
94
+
95
+ /**
96
+ * CASE Item Types
97
+ *
98
+ * Types for CASE Framework Items (CFItems).
99
+ * A CFItem represents an individual competency, standard, or learning objective.
100
+ */
101
+
102
+
103
+
104
+ /**
105
+ * A CASE Framework Item.
106
+ *
107
+ * Represents a single competency, standard, or learning objective
108
+ * within a curriculum framework.
109
+ */
110
+ interface CFItem {
111
+ sourcedId: string
112
+ fullStatement: string
113
+ alternativeLabel?: string
114
+ CFItemType: string
115
+ uri: string
116
+ humanCodingScheme?: string
117
+ listEnumeration?: string
118
+ abbreviatedStatement?: string
119
+ conceptKeywords?: string[]
120
+ conceptKeywordsURI?: OptionalLinkURI
121
+ notes?: string
122
+ subject?: string[]
123
+ subjectURI?: OptionalLinkURI[]
124
+ language?: string
125
+ educationLevel?: string[]
126
+ CFItemTypeURI?: OptionalLinkURI
127
+ licenseURI?: OptionalLinkURI
128
+ statusStartDate?: string
129
+ statusEndDate?: string
130
+ lastChangeDateTime: string
131
+ extensions?: Record<string, unknown>
132
+ CFDocumentURI?: OptionalLinkURI
133
+ }
134
+
135
+ /**
136
+ * CASE Package Types
137
+ *
138
+ * Types for CASE Framework Packages (CFPackages).
139
+ * A CFPackage is a complete bundle of a document, its items, and associations.
140
+ */
141
+
142
+
143
+
144
+ /**
145
+ * A complete CASE Framework Package.
146
+ *
147
+ * Bundles a CFDocument with all its CFItems and CFAssociations.
148
+ */
149
+ interface CFPackage {
150
+ sourcedId: string
151
+ CFDocument: CFDocument
152
+ CFItems?: CFItem[]
153
+ CFAssociations?: CFAssociation[]
154
+ }
155
+
156
+ /**
157
+ * A CASE Framework Package with hierarchical group structure.
158
+ *
159
+ * Extends the standard package with a `structuredContent` field
160
+ * that organizes items into named groups with optional nesting.
161
+ */
162
+ interface CFPackageWithGroups {
163
+ sourcedId: string
164
+ CFDocument: CFDocument
165
+ structuredContent: Record<string, CFItemWithChildGroups[]>
166
+ }
167
+
168
+ /**
169
+ * A CFItem extended with optional child group nesting.
170
+ */
171
+ interface CFItemWithChildGroups extends CFItem {
172
+ childGroups?: Record<string, unknown[]>
173
+ }
174
+
175
+ // ═══════════════════════════════════════════════════════════════════════════════
176
+ // PACKAGE INPUT TYPES (for POST/PUT)
177
+ // ═══════════════════════════════════════════════════════════════════════════════
178
+
179
+ /**
180
+ * URI reference used in package input payloads.
181
+ *
182
+ * Package inputs use `identifier` and `uri` instead of `sourcedId`.
183
+ */
184
+ interface InputNodeURI {
185
+ title: string
186
+ identifier: string
187
+ uri: string
188
+ }
189
+
190
+ /**
191
+ * Document definition within a package upload.
192
+ */
193
+ interface CFDocumentInput {
194
+ identifier: string
195
+ uri: string
196
+ lastChangeDateTime: string
197
+ title: string
198
+ creator: string
199
+ officialSourceURL?: string
200
+ publisher?: string
201
+ description?: string
202
+ language?: string
203
+ version?: string
204
+ caseVersion?: string
205
+ adoptionStatus?: string
206
+ statusStartDate?: string
207
+ statusEndDate?: string
208
+ licenseUri?: string
209
+ notes?: string
210
+ subject?: string[]
211
+ extensions?: unknown
212
+ }
213
+
214
+ /**
215
+ * Item definition within a package upload.
216
+ */
217
+ interface CFItemInput {
218
+ identifier: string
219
+ uri: string
220
+ lastChangeDateTime: string
221
+ fullStatement: string
222
+ alternativeLabel?: string
223
+ CFItemType?: string
224
+ cfItemType?: string
225
+ humanCodingScheme?: string
226
+ listEnumeration?: string
227
+ abbreviatedStatement?: string
228
+ conceptKeywords?: string[]
229
+ notes?: string
230
+ subject?: string[]
231
+ language?: string
232
+ educationLevel?: string[]
233
+ CFItemTypeURI?: unknown
234
+ licenseURI?: unknown
235
+ statusStartDate?: string
236
+ statusEndDate?: string
237
+ extensions?: unknown
238
+ }
239
+
240
+ /**
241
+ * Association definition within a package upload.
242
+ */
243
+ interface CFAssociationInput {
244
+ identifier: string
245
+ uri: string
246
+ lastChangeDateTime: string
247
+ associationType: string
248
+ originNodeURI: InputNodeURI
249
+ destinationNodeURI: InputNodeURI
250
+ sequenceNumber?: number
251
+ extensions?: unknown
252
+ }
253
+
254
+ /**
255
+ * Optional definitions section within a package upload.
256
+ */
257
+ interface CFDefinitions {
258
+ CFItemTypes?: unknown[]
259
+ CFSubjects?: unknown[]
260
+ CFConcepts?: unknown[]
261
+ CFLicenses?: unknown[]
262
+ CFAssociationGroupings?: unknown[]
263
+ extensions?: unknown
264
+ }
265
+
266
+ /**
267
+ * Input payload for creating or replacing a CASE package.
268
+ */
269
+ interface CFPackageInput {
270
+ CFDocument: CFDocumentInput
271
+ CFItems: CFItemInput[]
272
+ CFAssociations: CFAssociationInput[]
273
+ CFDefinitions?: CFDefinitions
274
+ extensions?: unknown
275
+ }
276
+
277
+ /**
278
+ * Result returned after uploading or replacing a CASE package.
279
+ */
280
+ interface CFPackageUploadResult {
281
+ success: boolean
282
+ message: string
283
+ result: {
284
+ documentId: string
285
+ stats: {
286
+ documents: number
287
+ items: number
288
+ associations: number
289
+ }
290
+ success: boolean
291
+ }
292
+ }
293
+
294
+ type output<T> = T extends {
295
+ _zod: {
296
+ output: any;
297
+ };
298
+ } ? T["_zod"]["output"] : unknown;
299
+
300
+ /**
301
+ * CASE Schemas
302
+ *
303
+ * Zod schemas for the CASE (Competency and Academic Standards Exchange) v1p1 API.
304
+ */
305
+
306
+
307
+
308
+ /**
309
+ * Schema for creating or replacing a CASE package.
310
+ *
311
+ * Validates the required structure:
312
+ * - `CFDocument`: document with required identifier, uri, title, creator, lastChangeDateTime
313
+ * - `CFItems`: array of items with required identifier, uri, fullStatement, lastChangeDateTime
314
+ * - `CFAssociations`: array of associations with required identifier, uri, associationType, nodes
315
+ */
316
+ declare const CasePackageInput = z.object({
317
+ CFDocument: CFDocumentInputSchema,
318
+ CFItems: z.array(CFItemInputSchema),
319
+ CFAssociations: z.array(CFAssociationInputSchema),
320
+ CFDefinitions: CFDefinitionsSchema.optional(),
321
+ extensions: z.unknown().optional(),
322
+ })
323
+
324
+ type CasePackageInput = output<typeof CasePackageInput>
325
+
326
+ export { CasePackageInput };
327
+ export type { CFAssociation, CFAssociationInput, CFDefinitions, CFDocument, CFDocumentInput, CFItem, CFItemInput, CFItemWithChildGroups, CFPackage, CFPackageInput, CFPackageUploadResult, CFPackageWithGroups, InputNodeURI, LinkURI, OptionalLinkURI };
@@ -0,0 +1 @@
1
+ {"version":3,"file":"public-types.d.ts","sourceRoot":"","sources":["../src/public-types.ts"],"names":[],"mappings":"AAAA,cAAc,gCAAgC,CAAA;AAE9C,YAAY,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA"}
File without changes
@@ -0,0 +1,21 @@
1
+ /**
2
+ * CFAssociations Resource
3
+ *
4
+ * CASE Framework Associations — relationships between CASE entities.
5
+ */
6
+ import type { CaseTransportLike, CFAssociation } from '../types';
7
+ /** CASE Framework Associations resource. */
8
+ export declare class AssociationsResource {
9
+ private readonly transport;
10
+ constructor(transport: CaseTransportLike);
11
+ /**
12
+ * Get a CASE association by sourcedId.
13
+ *
14
+ * @param sourcedId - The association's sourcedId
15
+ * @returns The CFAssociation
16
+ */
17
+ get(sourcedId: string): Promise<{
18
+ CFAssociation: CFAssociation;
19
+ }>;
20
+ }
21
+ //# sourceMappingURL=associations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"associations.d.ts","sourceRoot":"","sources":["../../src/resources/associations.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,KAAK,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAEhE,4CAA4C;AAC5C,qBAAa,oBAAoB;IACpB,OAAO,CAAC,QAAQ,CAAC,SAAS;IAAtC,YAA6B,SAAS,EAAE,iBAAiB,EAAI;IAE7D;;;;;OAKG;IACH,GAAG,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,aAAa,EAAE,aAAa,CAAA;KAAE,CAAC,CAKhE;CACD"}
@@ -0,0 +1,30 @@
1
+ /**
2
+ * CFDocuments Resource
3
+ *
4
+ * CASE Framework Documents — curriculum frameworks and standards documents.
5
+ */
6
+ import type { CaseTransportLike, CFDocument } from '../types';
7
+ /** CASE Framework Documents resource. */
8
+ export declare class DocumentsResource {
9
+ private readonly transport;
10
+ constructor(transport: CaseTransportLike);
11
+ /**
12
+ * List all CASE documents.
13
+ *
14
+ * @param params - Optional query parameters (offset, limit, filter, sort, orderBy)
15
+ * @returns Wrapped response containing CFDocuments array
16
+ */
17
+ list(params?: Record<string, string | number>): Promise<{
18
+ CFDocuments: CFDocument[];
19
+ }>;
20
+ /**
21
+ * Get a CASE document by sourcedId.
22
+ *
23
+ * @param sourcedId - The document's sourcedId
24
+ * @returns The CFDocument
25
+ */
26
+ get(sourcedId: string): Promise<{
27
+ CFDocument: CFDocument;
28
+ }>;
29
+ }
30
+ //# sourceMappingURL=documents.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"documents.d.ts","sourceRoot":"","sources":["../../src/resources/documents.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,KAAK,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AAE7D,yCAAyC;AACzC,qBAAa,iBAAiB;IACjB,OAAO,CAAC,QAAQ,CAAC,SAAS;IAAtC,YAA6B,SAAS,EAAE,iBAAiB,EAAI;IAE7D;;;;;OAKG;IACH,IAAI,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,GAAG,OAAO,CAAC;QAAE,WAAW,EAAE,UAAU,EAAE,CAAA;KAAE,CAAC,CAKrF;IAED;;;;;OAKG;IACH,GAAG,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,UAAU,EAAE,UAAU,CAAA;KAAE,CAAC,CAK1D;CACD"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * CASE Resources
3
+ */
4
+ export { AssociationsResource } from './associations';
5
+ export { DocumentsResource } from './documents';
6
+ export { ItemsResource } from './items';
7
+ export { PackagesResource } from './packages';
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAA;AACrD,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAA;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AACvC,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA"}
@@ -0,0 +1,30 @@
1
+ /**
2
+ * CFItems Resource
3
+ *
4
+ * CASE Framework Items — individual competencies, standards, and learning objectives.
5
+ */
6
+ import type { CaseTransportLike, CFItem } from '../types';
7
+ /** CASE Framework Items resource. */
8
+ export declare class ItemsResource {
9
+ private readonly transport;
10
+ constructor(transport: CaseTransportLike);
11
+ /**
12
+ * List all CASE items.
13
+ *
14
+ * @param params - Optional query parameters (offset, limit, filter, sort, orderBy)
15
+ * @returns Wrapped response containing CFItems array
16
+ */
17
+ list(params?: Record<string, string | number>): Promise<{
18
+ CFItems: CFItem[];
19
+ }>;
20
+ /**
21
+ * Get a CASE item by sourcedId.
22
+ *
23
+ * @param sourcedId - The item's sourcedId
24
+ * @returns The CFItem
25
+ */
26
+ get(sourcedId: string): Promise<{
27
+ CFItem: CFItem;
28
+ }>;
29
+ }
30
+ //# sourceMappingURL=items.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"items.d.ts","sourceRoot":"","sources":["../../src/resources/items.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AAEzD,qCAAqC;AACrC,qBAAa,aAAa;IACb,OAAO,CAAC,QAAQ,CAAC,SAAS;IAAtC,YAA6B,SAAS,EAAE,iBAAiB,EAAI;IAE7D;;;;;OAKG;IACH,IAAI,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,GAAG,OAAO,CAAC;QAAE,OAAO,EAAE,MAAM,EAAE,CAAA;KAAE,CAAC,CAK7E;IAED;;;;;OAKG;IACH,GAAG,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC,CAKlD;CACD"}
@@ -0,0 +1,45 @@
1
+ /**
2
+ * CFPackages Resource
3
+ *
4
+ * CASE Framework Packages — complete bundles of documents, items, and associations.
5
+ */
6
+ import type { CaseTransportLike, CFPackage, CFPackageInput, CFPackageUploadResult, CFPackageWithGroups } from '../types';
7
+ /** CASE Framework Packages resource. */
8
+ export declare class PackagesResource {
9
+ private readonly transport;
10
+ constructor(transport: CaseTransportLike);
11
+ /**
12
+ * Upload a complete CASE package.
13
+ *
14
+ * @param input - The package to upload (document, items, and associations)
15
+ * @returns Upload result with document ID and stats
16
+ */
17
+ create(input: CFPackageInput): Promise<CFPackageUploadResult>;
18
+ /**
19
+ * Replace a CASE package by sourcedId.
20
+ *
21
+ * @param sourcedId - The package's document sourcedId
22
+ * @param input - The replacement package
23
+ * @returns Upload result with document ID and stats
24
+ */
25
+ update(sourcedId: string, input: CFPackageInput): Promise<CFPackageUploadResult>;
26
+ /**
27
+ * Get a CASE package by sourcedId.
28
+ *
29
+ * @param sourcedId - The package's document sourcedId
30
+ * @returns The complete CFPackage
31
+ */
32
+ get(sourcedId: string): Promise<{
33
+ CFPackage: CFPackage;
34
+ }>;
35
+ /**
36
+ * Get a CASE package with hierarchical group structure.
37
+ *
38
+ * @param sourcedId - The package's document sourcedId
39
+ * @returns The package with items organized into groups
40
+ */
41
+ getGroups(sourcedId: string): Promise<{
42
+ CFPackageWithGroups: CFPackageWithGroups;
43
+ }>;
44
+ }
45
+ //# sourceMappingURL=packages.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"packages.d.ts","sourceRoot":"","sources":["../../src/resources/packages.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH,OAAO,KAAK,EACX,iBAAiB,EACjB,SAAS,EACT,cAAc,EACd,qBAAqB,EACrB,mBAAmB,EACnB,MAAM,UAAU,CAAA;AAEjB,wCAAwC;AACxC,qBAAa,gBAAgB;IAChB,OAAO,CAAC,QAAQ,CAAC,SAAS;IAAtC,YAA6B,SAAS,EAAE,iBAAiB,EAAI;IAE7D;;;;;OAKG;IACH,MAAM,CAAC,KAAK,EAAE,cAAc,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAW5D;IAED;;;;;;OAMG;IACH,MAAM,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,cAAc,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAY/E;IAED;;;;;OAKG;IACH,GAAG,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,SAAS,EAAE,SAAS,CAAA;KAAE,CAAC,CAKxD;IAED;;;;;OAKG;IACH,SAAS,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,mBAAmB,EAAE,mBAAmB,CAAA;KAAE,CAAC,CAKlF;CACD"}
@@ -0,0 +1,38 @@
1
+ /**
2
+ * Client Configuration Types
3
+ */
4
+ import type { CasePaths, ClientConfig, PaginatedResponse, ProviderClientConfig, RequestOptions, ResolvedProvider, TransportConfigWithTokenProvider, TransportOnlyConfig } from '@timeback/internal-client-infra';
5
+ export type { Environment, EnvAuth, ExplicitAuth, Platform } from '@timeback/internal-client-infra';
6
+ /**
7
+ * Transport interface for CASE client.
8
+ */
9
+ export interface CaseTransportLike {
10
+ /** Base URL of the API */
11
+ baseUrl: string;
12
+ /** API path profiles for CASE operations */
13
+ paths: CasePaths;
14
+ /** Make an authenticated request */
15
+ request<T>(path: string, options?: RequestOptions): Promise<T>;
16
+ /** Make a paginated request */
17
+ requestPaginated<T>(path: string, options?: RequestOptions): Promise<PaginatedResponse<T>>;
18
+ }
19
+ /**
20
+ * All supported CASE client configuration types.
21
+ */
22
+ export type CaseClientConfig = ClientConfig | TransportOnlyConfig<CaseTransportLike> | ProviderClientConfig;
23
+ /**
24
+ * Configuration for CASE transport.
25
+ */
26
+ export interface CaseTransportConfig extends TransportConfigWithTokenProvider {
27
+ /** API path profiles for CASE operations */
28
+ paths: CasePaths;
29
+ }
30
+ /**
31
+ * Resolved provider type for CASE client.
32
+ */
33
+ export type CaseResolvedProvider = ResolvedProvider<CaseTransportLike>;
34
+ /**
35
+ * Instance type of CaseClient.
36
+ */
37
+ export type CaseClientInstance = InstanceType<typeof import('../client').CaseClient>;
38
+ //# sourceMappingURL=client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/types/client.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EACX,SAAS,EACT,YAAY,EACZ,iBAAiB,EACjB,oBAAoB,EACpB,cAAc,EACd,gBAAgB,EAChB,gCAAgC,EAChC,mBAAmB,EACnB,MAAM,iCAAiC,CAAA;AAExC,YAAY,EAAE,WAAW,EAAE,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAA;AAEnG;;GAEG;AACH,MAAM,WAAW,iBAAiB;IACjC,0BAA0B;IAC1B,OAAO,EAAE,MAAM,CAAA;IACf,4CAA4C;IAC5C,KAAK,EAAE,SAAS,CAAA;IAChB,oCAAoC;IACpC,OAAO,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,CAAC,CAAC,CAAA;IAC9D,+BAA+B;IAC/B,gBAAgB,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAAA;CAC1F;AAED;;GAEG;AACH,MAAM,MAAM,gBAAgB,GACzB,YAAY,GACZ,mBAAmB,CAAC,iBAAiB,CAAC,GACtC,oBAAoB,CAAA;AAEvB;;GAEG;AACH,MAAM,WAAW,mBAAoB,SAAQ,gCAAgC;IAC5E,4CAA4C;IAC5C,KAAK,EAAE,SAAS,CAAA;CAChB;AAED;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG,gBAAgB,CAAC,iBAAiB,CAAC,CAAA;AAEtE;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG,YAAY,CAAC,cAAc,WAAW,EAAE,UAAU,CAAC,CAAA"}
@@ -0,0 +1,4 @@
1
+ export * from '@timeback/types/protocols/case';
2
+ export * from './client';
3
+ export type { CasePackageInput } from '@timeback/types/zod';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,gCAAgC,CAAA;AAC9C,cAAc,UAAU,CAAA;AAExB,YAAY,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Subpath export for all entity types.
3
+ *
4
+ * @example
5
+ * ```typescript
6
+ * import type { CFDocument, CFPackageInput } from '@timeback/case/types'
7
+ * ```
8
+ */
9
+ export * from './types/index';
10
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,cAAc,eAAe,CAAA"}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Utility Functions
3
+ */
4
+ export declare const log: import("@timeback/internal-logger").Logger;
5
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,eAAO,MAAM,GAAG,4CAA6B,CAAA"}