@pg-atlas/data-sdk 0.5.0 → 0.6.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.
@@ -1,2 +1,2 @@
1
1
  export { getContributor, getGitlogArtifact, getMetadata, getProject, getProjectContributors, getProjectDependsOn, getProjectHasDependents, getProjectRepos, getRepo, getRepoContributors, getRepoDependsOn, getRepoHasDependents, getSbomSubmission, health, ingestSbom, listContributors, listGitlogArtifacts, listProjects, listRepos, listSbomSubmissions, type Options } from './sdk.gen';
2
- export type { ActivityStatus, ClientOptions, ContributionEntry, ContributorDetailResponse, ContributorSummary, DepCounts, EdgeConfidence, GetContributorData, GetContributorError, GetContributorErrors, GetContributorResponse, GetContributorResponses, GetGitlogArtifactData, GetGitlogArtifactError, GetGitlogArtifactErrors, GetGitlogArtifactResponse, GetGitlogArtifactResponses, GetMetadataData, GetMetadataResponse, GetMetadataResponses, GetProjectContributorsData, GetProjectContributorsError, GetProjectContributorsErrors, GetProjectContributorsResponse, GetProjectContributorsResponses, GetProjectData, GetProjectDependsOnData, GetProjectDependsOnError, GetProjectDependsOnErrors, GetProjectDependsOnResponse, GetProjectDependsOnResponses, GetProjectError, GetProjectErrors, GetProjectHasDependentsData, GetProjectHasDependentsError, GetProjectHasDependentsErrors, GetProjectHasDependentsResponse, GetProjectHasDependentsResponses, GetProjectReposData, GetProjectReposError, GetProjectReposErrors, GetProjectReposResponse, GetProjectReposResponses, GetProjectResponse, GetProjectResponses, GetRepoContributorsData, GetRepoContributorsError, GetRepoContributorsErrors, GetRepoContributorsResponse, GetRepoContributorsResponses, GetRepoData, GetRepoDependsOnData, GetRepoDependsOnError, GetRepoDependsOnErrors, GetRepoDependsOnResponse, GetRepoDependsOnResponses, GetRepoError, GetRepoErrors, GetRepoHasDependentsData, GetRepoHasDependentsError, GetRepoHasDependentsErrors, GetRepoHasDependentsResponse, GetRepoHasDependentsResponses, GetRepoResponse, GetRepoResponses, GetSbomSubmissionData, GetSbomSubmissionError, GetSbomSubmissionErrors, GetSbomSubmissionResponse, GetSbomSubmissionResponses, GitLogArtifactDetailResponse, GitLogArtifactSummary, HealthData, HealthResponse, HealthResponse2, HealthResponses, HttpValidationError, IngestSbomData, IngestSbomError, IngestSbomErrors, IngestSbomResponse, IngestSbomResponses, ListContributorsData, ListContributorsError, ListContributorsErrors, ListContributorsResponse, ListContributorsResponses, ListGitlogArtifactsData, ListGitlogArtifactsError, ListGitlogArtifactsErrors, ListGitlogArtifactsResponse, ListGitlogArtifactsResponses, ListProjectsData, ListProjectsError, ListProjectsErrors, ListProjectsResponse, ListProjectsResponses, ListReposData, ListReposError, ListReposErrors, ListReposResponse, ListReposResponses, ListSbomSubmissionsData, ListSbomSubmissionsError, ListSbomSubmissionsErrors, ListSbomSubmissionsResponse, ListSbomSubmissionsResponses, MetadataResponse, PaginatedResponseContributorSummary, PaginatedResponseGitLogArtifactSummary, PaginatedResponseProjectContributorSummary, PaginatedResponseProjectSummary, PaginatedResponseRepoContributorSummary, PaginatedResponseRepoSummary, ProjectContributorSummary, ProjectDependency, ProjectDetailResponse, ProjectMetadata, ProjectSummary, ProjectType, RepoContributorSummary, RepoDependency, RepoDetailResponse, RepoSummary, RepoVertexType, SbomAcceptedResponse, SbomSubmissionDetailResponse, SbomSubmissionListResponse, SbomSubmissionResponse, ScfSubmission, SubmissionStatus, ValidationError, Visibility } from './types.gen';
2
+ export type { ActivityStatus, ClientOptions, ContributionEntry, ContributorDetailResponse, ContributorSummary, DepCounts, EdgeConfidence, GetContributorData, GetContributorError, GetContributorErrors, GetContributorResponse, GetContributorResponses, GetGitlogArtifactData, GetGitlogArtifactError, GetGitlogArtifactErrors, GetGitlogArtifactResponse, GetGitlogArtifactResponses, GetMetadataData, GetMetadataResponse, GetMetadataResponses, GetProjectContributorsData, GetProjectContributorsError, GetProjectContributorsErrors, GetProjectContributorsResponse, GetProjectContributorsResponses, GetProjectData, GetProjectDependsOnData, GetProjectDependsOnError, GetProjectDependsOnErrors, GetProjectDependsOnResponse, GetProjectDependsOnResponses, GetProjectError, GetProjectErrors, GetProjectHasDependentsData, GetProjectHasDependentsError, GetProjectHasDependentsErrors, GetProjectHasDependentsResponse, GetProjectHasDependentsResponses, GetProjectReposData, GetProjectReposError, GetProjectReposErrors, GetProjectReposResponse, GetProjectReposResponses, GetProjectResponse, GetProjectResponses, GetRepoContributorsData, GetRepoContributorsError, GetRepoContributorsErrors, GetRepoContributorsResponse, GetRepoContributorsResponses, GetRepoData, GetRepoDependsOnData, GetRepoDependsOnError, GetRepoDependsOnErrors, GetRepoDependsOnResponse, GetRepoDependsOnResponses, GetRepoError, GetRepoErrors, GetRepoHasDependentsData, GetRepoHasDependentsError, GetRepoHasDependentsErrors, GetRepoHasDependentsResponse, GetRepoHasDependentsResponses, GetRepoResponse, GetRepoResponses, GetSbomSubmissionData, GetSbomSubmissionError, GetSbomSubmissionErrors, GetSbomSubmissionResponse, GetSbomSubmissionResponses, GitLogArtifactDetailResponse, GitLogArtifactSummary, HealthComponents, HealthData, HealthResponse, HealthResponse2, HealthResponses, HttpValidationError, IngestSbomData, IngestSbomError, IngestSbomErrors, IngestSbomResponse, IngestSbomResponses, ListContributorsData, ListContributorsError, ListContributorsErrors, ListContributorsResponse, ListContributorsResponses, ListGitlogArtifactsData, ListGitlogArtifactsError, ListGitlogArtifactsErrors, ListGitlogArtifactsResponse, ListGitlogArtifactsResponses, ListProjectsData, ListProjectsError, ListProjectsErrors, ListProjectsResponse, ListProjectsResponses, ListReposData, ListReposError, ListReposErrors, ListReposResponse, ListReposResponses, ListSbomSubmissionsData, ListSbomSubmissionsError, ListSbomSubmissionsErrors, ListSbomSubmissionsResponse, ListSbomSubmissionsResponses, MetadataResponse, PaginatedResponseContributorSummary, PaginatedResponseGitLogArtifactSummary, PaginatedResponseProjectContributorSummary, PaginatedResponseProjectSummary, PaginatedResponseRepoContributorSummary, PaginatedResponseRepoSummary, ProjectContributorSummary, ProjectDependency, ProjectDetailResponse, ProjectMetadata, ProjectSummary, ProjectType, RepoContributorSummary, RepoDependency, RepoDetailResponse, RepoSummary, RepoVertexType, SbomAcceptedResponse, SbomSubmissionDetailResponse, SbomSubmissionListResponse, SbomSubmissionResponse, ScfSubmission, SubmissionStatus, ValidationError, Visibility } from './types.gen';
@@ -409,8 +409,22 @@ export declare const RepoDetailResponseSchema: {
409
409
  readonly releases: {
410
410
  readonly anyOf: readonly [{
411
411
  readonly items: {
412
- readonly additionalProperties: true;
412
+ readonly properties: {
413
+ readonly purl: {
414
+ readonly type: "string";
415
+ };
416
+ readonly version: {
417
+ readonly type: "string";
418
+ };
419
+ readonly release_date: {
420
+ readonly type: "string";
421
+ readonly default: "";
422
+ };
423
+ };
413
424
  readonly type: "object";
425
+ readonly required: readonly ["purl", "version"];
426
+ readonly title: "Release";
427
+ readonly description: "One normalized release record keyed by package PURL + version.";
414
428
  };
415
429
  readonly type: "array";
416
430
  }, {
@@ -1148,18 +1162,48 @@ export declare const HealthResponseSchema: {
1148
1162
  readonly properties: {
1149
1163
  readonly status: {
1150
1164
  readonly type: "string";
1165
+ readonly enum: readonly ["live", "ready"];
1151
1166
  readonly title: "Status";
1152
1167
  };
1153
1168
  readonly version: {
1154
1169
  readonly type: "string";
1155
1170
  readonly title: "Version";
1156
1171
  };
1172
+ readonly components: {
1173
+ readonly $ref: "#/components/schemas/HealthComponents";
1174
+ };
1157
1175
  };
1158
1176
  readonly type: "object";
1159
- readonly required: readonly ["status", "version"];
1177
+ readonly required: readonly ["status", "version", "components"];
1160
1178
  readonly title: "HealthResponse";
1161
1179
  readonly description: "Response body for GET /health.";
1162
1180
  };
1181
+ export declare const HealthComponentsSchema: {
1182
+ readonly properties: {
1183
+ readonly artifact_store: {
1184
+ readonly type: "string";
1185
+ readonly enum: readonly ["local", "IPFS"];
1186
+ readonly title: "Artifact Store";
1187
+ };
1188
+ readonly database: {
1189
+ readonly type: "string";
1190
+ readonly enum: readonly ["ready", "not-configured"];
1191
+ readonly title: "Database";
1192
+ };
1193
+ readonly schema_version: {
1194
+ readonly anyOf: readonly [{
1195
+ readonly type: "string";
1196
+ }, {
1197
+ readonly type: "null";
1198
+ }];
1199
+ readonly title: "Schema Version";
1200
+ };
1201
+ };
1202
+ readonly type: "object";
1203
+ readonly required: readonly ["artifact_store", "database", "schema_version"];
1204
+ readonly title: "HealthComponents";
1205
+ readonly description: "Component-level readiness details for GET /health.";
1206
+ };
1163
1207
  export declare const HTTPValidationErrorSchema: {
1164
1208
  readonly properties: {
1165
1209
  readonly detail: {
@@ -537,8 +537,25 @@ export const RepoDetailResponseSchema = {
537
537
  anyOf: [
538
538
  {
539
539
  items: {
540
- additionalProperties: true,
541
- type: 'object'
540
+ properties: {
541
+ purl: {
542
+ type: 'string'
543
+ },
544
+ version: {
545
+ type: 'string'
546
+ },
547
+ release_date: {
548
+ type: 'string',
549
+ default: ''
550
+ }
551
+ },
552
+ type: 'object',
553
+ required: [
554
+ 'purl',
555
+ 'version'
556
+ ],
557
+ title: 'Release',
558
+ description: 'One normalized release record keyed by package PURL + version.'
542
559
  },
543
560
  type: 'array'
544
561
  },
@@ -1502,21 +1519,68 @@ export const HealthResponseSchema = {
1502
1519
  properties: {
1503
1520
  status: {
1504
1521
  type: 'string',
1522
+ enum: [
1523
+ 'live',
1524
+ 'ready'
1525
+ ],
1505
1526
  title: 'Status'
1506
1527
  },
1507
1528
  version: {
1508
1529
  type: 'string',
1509
1530
  title: 'Version'
1531
+ },
1532
+ components: {
1533
+ $ref: '#/components/schemas/HealthComponents'
1510
1534
  }
1511
1535
  },
1512
1536
  type: 'object',
1513
1537
  required: [
1514
1538
  'status',
1515
- 'version'
1539
+ 'version',
1540
+ 'components'
1516
1541
  ],
1517
1542
  title: 'HealthResponse',
1518
1543
  description: 'Response body for GET /health.'
1519
1544
  };
1545
+ export const HealthComponentsSchema = {
1546
+ properties: {
1547
+ artifact_store: {
1548
+ type: 'string',
1549
+ enum: [
1550
+ 'local',
1551
+ 'IPFS'
1552
+ ],
1553
+ title: 'Artifact Store'
1554
+ },
1555
+ database: {
1556
+ type: 'string',
1557
+ enum: [
1558
+ 'ready',
1559
+ 'not-configured'
1560
+ ],
1561
+ title: 'Database'
1562
+ },
1563
+ schema_version: {
1564
+ anyOf: [
1565
+ {
1566
+ type: 'string'
1567
+ },
1568
+ {
1569
+ type: 'null'
1570
+ }
1571
+ ],
1572
+ title: 'Schema Version'
1573
+ }
1574
+ },
1575
+ type: 'object',
1576
+ required: [
1577
+ 'artifact_store',
1578
+ 'database',
1579
+ 'schema_version'
1580
+ ],
1581
+ title: 'HealthComponents',
1582
+ description: 'Component-level readiness details for GET /health.'
1583
+ };
1520
1584
  export const HTTPValidationErrorSchema = {
1521
1585
  properties: {
1522
1586
  detail: {
@@ -14,13 +14,9 @@ export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends
14
14
  meta?: Record<string, unknown>;
15
15
  };
16
16
  /**
17
- * Liveness check
17
+ * Readiness check
18
18
  *
19
- * Return the current health status and application version.
20
- *
21
- * This endpoint is intentionally dependency-free (no DB call) so that it
22
- * remains responsive even when the database is unreachable. A richer check
23
- * with named component statuses (db, graph) will be added in A2.
19
+ * Return the current readiness status and application version.
24
20
  */
25
21
  export declare const health: <ThrowOnError extends boolean = false>(options?: Options<HealthData, ThrowOnError>) => import("./client").RequestResult<HealthResponses, unknown, ThrowOnError, "fields">;
26
22
  /**
@@ -53,12 +49,14 @@ export declare const getMetadata: <ThrowOnError extends boolean = false>(options
53
49
  /**
54
50
  * List projects
55
51
  *
56
- * Paginated list of SCF-funded projects with optional filters.
52
+ * Paginated list of SCF-funded projects with optional filters and sorting.
57
53
  *
58
54
  * - **project_type**: filter by `public-good` or `scf-project`.
59
55
  * - **activity_status**: filter by lifecycle status (`live`, `in-dev`, etc.).
60
56
  * - **search**: case-insensitive substring match on `display_name`.
61
- * - Results are ordered by `canonical_id` for deterministic pagination.
57
+ * - **sort**: comma-separated `field:direction` pairs for server-side ordering.
58
+ * - **category**: filter by exact project category string.
59
+ * - Default order is `canonical_id` for deterministic pagination.
62
60
  */
63
61
  export declare const listProjects: <ThrowOnError extends boolean = false>(options?: Options<ListProjectsData, ThrowOnError>) => import("./client").RequestResult<ListProjectsResponses, ListProjectsErrors, ThrowOnError, "fields">;
64
62
  /**
@@ -107,11 +105,12 @@ export declare const getProjectHasDependents: <ThrowOnError extends boolean = fa
107
105
  /**
108
106
  * List repos
109
107
  *
110
- * Paginated list of in-ecosystem repos with optional filters.
108
+ * Paginated list of in-ecosystem repos with optional filters and sorting.
111
109
  *
112
110
  * - **project_id**: filter to repos belonging to a specific project.
113
111
  * - **search**: case-insensitive substring match on `display_name`.
114
- * - Results are ordered by `canonical_id` for deterministic pagination.
112
+ * - **sort**: comma-separated `field:direction` pairs for server-side ordering.
113
+ * - Default order is `canonical_id` for deterministic pagination.
115
114
  */
116
115
  export declare const listRepos: <ThrowOnError extends boolean = false>(options?: Options<ListReposData, ThrowOnError>) => import("./client").RequestResult<ListReposResponses, ListReposErrors, ThrowOnError, "fields">;
117
116
  /**
@@ -1,13 +1,9 @@
1
1
  // This file is auto-generated by @hey-api/openapi-ts
2
2
  import { client } from './client.gen';
3
3
  /**
4
- * Liveness check
4
+ * Readiness check
5
5
  *
6
- * Return the current health status and application version.
7
- *
8
- * This endpoint is intentionally dependency-free (no DB call) so that it
9
- * remains responsive even when the database is unreachable. A richer check
10
- * with named component statuses (db, graph) will be added in A2.
6
+ * Return the current readiness status and application version.
11
7
  */
12
8
  export const health = (options) => (options?.client ?? client).get({ url: '/health', ...options });
13
9
  /**
@@ -40,12 +36,14 @@ export const getMetadata = (options) => (options?.client ?? client).get({ url: '
40
36
  /**
41
37
  * List projects
42
38
  *
43
- * Paginated list of SCF-funded projects with optional filters.
39
+ * Paginated list of SCF-funded projects with optional filters and sorting.
44
40
  *
45
41
  * - **project_type**: filter by `public-good` or `scf-project`.
46
42
  * - **activity_status**: filter by lifecycle status (`live`, `in-dev`, etc.).
47
43
  * - **search**: case-insensitive substring match on `display_name`.
48
- * - Results are ordered by `canonical_id` for deterministic pagination.
44
+ * - **sort**: comma-separated `field:direction` pairs for server-side ordering.
45
+ * - **category**: filter by exact project category string.
46
+ * - Default order is `canonical_id` for deterministic pagination.
49
47
  */
50
48
  export const listProjects = (options) => (options?.client ?? client).get({ url: '/projects', ...options });
51
49
  /**
@@ -94,11 +92,12 @@ export const getProjectHasDependents = (options) => (options.client ?? client).g
94
92
  /**
95
93
  * List repos
96
94
  *
97
- * Paginated list of in-ecosystem repos with optional filters.
95
+ * Paginated list of in-ecosystem repos with optional filters and sorting.
98
96
  *
99
97
  * - **project_id**: filter to repos belonging to a specific project.
100
98
  * - **search**: case-insensitive substring match on `display_name`.
101
- * - Results are ordered by `canonical_id` for deterministic pagination.
99
+ * - **sort**: comma-separated `field:direction` pairs for server-side ordering.
100
+ * - Default order is `canonical_id` for deterministic pagination.
102
101
  */
103
102
  export const listRepos = (options) => (options?.client ?? client).get({ url: '/repos', ...options });
104
103
  /**
@@ -314,7 +314,9 @@ export type RepoDetailResponse = {
314
314
  * Releases
315
315
  */
316
316
  releases: Array<{
317
- [key: string]: unknown;
317
+ purl: string;
318
+ version: string;
319
+ release_date?: string;
318
320
  }> | null;
319
321
  parent_project: ProjectSummary | null;
320
322
  /**
@@ -872,11 +874,31 @@ export type HealthResponse = {
872
874
  /**
873
875
  * Status
874
876
  */
875
- status: string;
877
+ status: 'live' | 'ready';
876
878
  /**
877
879
  * Version
878
880
  */
879
881
  version: string;
882
+ components: HealthComponents;
883
+ };
884
+ /**
885
+ * HealthComponents
886
+ *
887
+ * Component-level readiness details for GET /health.
888
+ */
889
+ export type HealthComponents = {
890
+ /**
891
+ * Artifact Store
892
+ */
893
+ artifact_store: 'local' | 'IPFS';
894
+ /**
895
+ * Database
896
+ */
897
+ database: 'ready' | 'not-configured';
898
+ /**
899
+ * Schema Version
900
+ */
901
+ schema_version: string | null;
880
902
  };
881
903
  /**
882
904
  * HTTPValidationError
@@ -1137,6 +1159,18 @@ export type ListProjectsData = {
1137
1159
  * Search
1138
1160
  */
1139
1161
  search?: string | null;
1162
+ /**
1163
+ * Sort
1164
+ *
1165
+ * Comma-separated field:direction pairs, e.g. 'criticality_score:desc,display_name:asc'.
1166
+ */
1167
+ sort?: string | null;
1168
+ /**
1169
+ * Category
1170
+ *
1171
+ * Filter by project category (exact match).
1172
+ */
1173
+ category?: string | null;
1140
1174
  /**
1141
1175
  * Limit
1142
1176
  *
@@ -1337,6 +1371,12 @@ export type ListReposData = {
1337
1371
  * Search
1338
1372
  */
1339
1373
  search?: string | null;
1374
+ /**
1375
+ * Sort
1376
+ *
1377
+ * Comma-separated field:direction pairs, e.g. 'adoption_stars:desc,display_name:asc'.
1378
+ */
1379
+ sort?: string | null;
1340
1380
  /**
1341
1381
  * Limit
1342
1382
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pg-atlas/data-sdk",
3
- "version": "0.5.0",
3
+ "version": "0.6.0",
4
4
  "description": "TypeScript SDK for the PG Atlas API",
5
5
  "keywords": [
6
6
  "stellar",