Skip to content

Update Juno SDK files - #66

Closed
github-actions[bot] wants to merge 3 commits into
mainfrom
update-juno-sdk-files
Closed

github-actions[bot] wants to merge 3 commits into
mainfrom
update-juno-sdk-files

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

Update Juno SDK files

@greptile-apps

greptile-apps Bot commented Feb 10, 2026

Copy link
Copy Markdown
Contributor

Greptile Overview

Greptile Summary

This PR appears to be an OpenAPI-generator refresh of the Juno SDK client code (API classes and model definitions), with large-scale reformatting and a reduced set of exported models/APIs.

Key integration impact: src/internal/api/apis.ts and src/internal/model/models.ts both removed a number of previously-exported/generated analytics/event/statistics-related APIs and models. If these endpoints still exist in the backend OpenAPI spec (or are still relied on by SDK consumers), this is a breaking SDK surface change and likely indicates regeneration against an incomplete/different spec.

There is also a concrete contract mismatch in RegisterFileProviderModel: the documented provider type changed from a string (“S3/AZURE”) to an enum of '0', '1', '-1', which would cause invalid requests unless the backend truly changed to numeric codes.

Confidence Score: 2/5

  • This PR is not safe to merge until the SDK surface changes are verified against the intended OpenAPI spec and consumer expectations.
  • Large autogenerated diff with removal of analytics/statistics models/APIs and an apparent contract mismatch for file provider type enum; these are likely breaking changes for SDK consumers and/or runtime API calls.
  • src/internal/api/apis.ts, src/internal/model/models.ts, src/internal/model/registerFileProviderModel.ts, src/internal/api/emailApi.ts

Important Files Changed

Filename Overview
src/internal/api/apis.ts Removes analytics API exports and drops AnalyticsApi/AnalyticsConfigApi from APIS list (breaking for consumers expecting analytics APIs).
src/internal/api/emailApi.ts Regenerated EmailApi; removes imports/types for email statistics responses (likely breaking if stats endpoints still exist).
src/internal/api/fileProviderApi.ts Switches file provider models used by API (FileProvider/FileProviderPartial -> FileProviderResponse), indicating possible spec drift/breaking changes.
src/internal/model/models.ts Removes exports for many previously-generated models (analytics/events, email stats, unlink/update models, etc.), likely breaking downstream imports and indicating OpenAPI spec mismatch.
src/internal/model/registerFileProviderModel.ts Changes provider type from string to numeric-string enum ('0','1','-1'), which likely violates documented API contract (S3/AZURE).
src/internal/model/registerFileBucketModel.ts Model regenerated; still serializes fileServiceFile with baseName 'FileServiceFile' (capitalized), which may mismatch backend property naming if spec expects camelCase.

Sequence Diagram

sequenceDiagram
    participant Consumer as SDK Consumer
    participant Api as *Api classes (e.g., EmailApi)
    participant Ser as ObjectSerializer
    participant HTTP as request/http

    Consumer->>Api: new EmailApi(basePath)
    Consumer->>Api: call endpoint method(payload)
    Api->>Ser: serialize(payload, ModelType)
    Ser-->>Api: JSON body w/ attributeTypeMap baseName keys
    Api->>HTTP: localVarRequest(options)
    HTTP-->>Api: response + body
    Api->>Ser: deserialize(body, ResponseType)
    Ser-->>Api: typed response instance
    Api-->>Consumer: {response, body}

    Note over Consumer,Api: If models.ts drops exports/types, consumer imports fail at build time
    Note over Ser,Api: If model baseName/enums drift (e.g., type '0'/'1'), API receives invalid payload
Loading

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

6 files reviewed, 5 comments

Edit Code Review Agent Settings | Greptile

Comment thread src/internal/api/apis.ts Outdated
Comment on lines +1 to +30
export * from './authApi';
export * from './emailApi';
export * from './fileBucketApi';
export * from './fileConfigApi';
export * from './fileDownloadApi';
export * from './fileProviderApi';
export * from './fileUploadApi';
export * from './projectApi';
export * from './userApi';
import * as http from 'http';
import { AnalyticsApi } from './analyticsApi';
import { AnalyticsConfigApi } from './analyticsConfigApi';
import { AuthApi } from './authApi';
export * from './emailApi';
import { EmailApi } from './emailApi';
export * from './fileBucketApi';
import { FileBucketApi } from './fileBucketApi';
export * from './fileConfigApi';
import { FileConfigApi } from './fileConfigApi';
export * from './fileDownloadApi';
import { FileDownloadApi } from './fileDownloadApi';
export * from './fileProviderApi';
import { FileProviderApi } from './fileProviderApi';
export * from './fileUploadApi';
import { FileUploadApi } from './fileUploadApi';
export * from './projectApi';
import { ProjectApi } from './projectApi';
export * from './userApi';
import { UserApi } from './userApi';
import * as http from 'http';

export class HttpError extends Error {
constructor(
public response: http.IncomingMessage,
public body: any,
public statusCode?: number
) {
super('HTTP request failed');
this.name = 'HttpError';
}
constructor (public response: http.IncomingMessage, public body: any, public statusCode?: number) {
super('HTTP request failed');
this.name = 'HttpError';
}
}

export { RequestFile } from '../model/models';

export const APIS = [
AnalyticsApi,
AnalyticsConfigApi,
AuthApi,
EmailApi,
FileBucketApi,
FileConfigApi,
FileDownloadApi,
FileProviderApi,
FileUploadApi,
ProjectApi,
UserApi,
];
export const APIS = [AuthApi, EmailApi, FileBucketApi, FileConfigApi, FileDownloadApi, FileProviderApi, FileUploadApi, ProjectApi, UserApi];

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed analytics exports

apis.ts no longer exports or includes AnalyticsApi / AnalyticsConfigApi in APIS (compared to the previous version). If downstream code expects import { AnalyticsApi } from .../apis or iterates APIS to register all SDK APIs, this is a breaking change and will fail at compile-time/runtime. If analytics is still part of the SDK surface, restore the exports and add the classes back into APIS.

Comment thread src/internal/api/emailApi.ts Outdated
Comment on lines +17 to +30
/* tslint:disable:no-unused-locals */
import { AggregateInterval } from '../model/aggregateInterval';
import { EmailConfigResponse } from '../model/emailConfigResponse';
import { RegisterDomainModel } from '../model/registerDomainModel';
import { RegisterDomainResponse } from '../model/registerDomainResponse';
import { RegisterEmailModel } from '../model/registerEmailModel';
import { RegisterEmailResponse } from '../model/registerEmailResponse';
import { SendEmailModel } from '../model/sendEmailModel';
import { SendEmailResponse } from '../model/sendEmailResponse';
import { SendEmailStatisticsResponses } from '../model/sendEmailStatisticsResponses';
import { SetupEmailResponse } from '../model/setupEmailResponse';
import { SetupEmailServiceModel } from '../model/setupEmailServiceModel';
import { VerifyDomainModel } from '../model/verifyDomainModel';

import {
ObjectSerializer,
Authentication,
VoidAuth,
Interceptor,
} from '../model/models';
import {
HttpBasicAuth,
HttpBearerAuth,
ApiKeyAuth,
OAuth,
} from '../model/models';
import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models';
import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models';

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed email statistics types

EmailApi no longer imports/returns SendEmailStatisticsResponses (and AggregateInterval was also removed). If the /email/* endpoints still expose statistics in the OpenAPI spec, this change breaks the SDK surface (missing types + missing methods or changed return types). Please confirm the API spec actually removed these endpoints/types; otherwise restore the generated models and corresponding API methods.

Comment on lines 3 to 41
export * from './accessKey';
export * from './aggregateInterval';
export * from './analyticsConfigResponse';
export * from './clickEventProperties';
export * from './clickEventResponse';
export * from './createAnalyticsConfigModel';
export * from './createProjectModel';
export * from './createUserModel';
export * from './customEventResponse';
export * from './customEventTypeResponse';
export * from './customGraphType';
export * from './customGraphTypeResponse';
export * from './deleteFileBucketModel';
export * from './downloadFileModel';
export * from './downloadFileResponse';
export * from './emailConfigResponse';
export * from './emailContent';
export * from './emailDomain';
export * from './emailRecipient';
export * from './emailSender';
export * from './emailSenderSendEmailModel';
export * from './fileBucket';
export * from './fileConfigResponse';
export * from './fileProvider';
export * from './fileProviderPartial';
export * from './getAllClickEventsResponse';
export * from './getAllCustomEventTypeResponse';
export * from './getAllCustomEventsResponse';
export * from './getAllInputEventsResponse';
export * from './getAllVisitEventsResponse';
export * from './getClickEventsResponse';
export * from './getCustomEventsResponse';
export * from './getInputEventsResponse';
export * from './getVisitEventsResponse';
export * from './inputEventProperties';
export * from './inputEventResponse';
export * from './fileProviderResponse';
export * from './issueApiKeyRequest';
export * from './issueApiKeyResponse';
export * from './issueJWTResponse';
export * from './linkProjectModel';
export * from './linkUserModel';
export * from './logClickEventRequest';
export * from './logCustomEventRequest';
export * from './logInputEventRequest';
export * from './logVisitEventRequest';
export * from './modelFile';
export * from './projectResponse';
export * from './registerDomainModel';
export * from './registerDomainResponse';
export * from './registerEmailModel';
export * from './registerEmailResponse';
export * from './registerFileBucketModel';
export * from './registerFileProviderModel';
export * from './sendEmailModel';
export * from './sendEmailResponse';
export * from './sendEmailStatisticsResponse';
export * from './sendEmailStatisticsResponses';
export * from './sendGridDNSRecord';
export * from './sendGridDNSResponse';
export * from './setUserTypeModel';
export * from './setupEmailResponse';
export * from './setupEmailServiceModel';
export * from './setupFileServiceResponse';
export * from './unlinkProjectModel';
export * from './updateAnalyticsConfigModel';
export * from './uploadFileModel';
export * from './uploadFileResponse';
export * from './userResponse';
export * from './userResponses';
export * from './verifyDomainModel';

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Breaking SDK surface change

src/internal/model/models.ts dropped exports/imports for many previously-generated models (analytics/event logging, file provider types like FileProvider, unlink/update models, email statistics, etc.). Any consumer importing these from ../model/models will now fail to compile. If these endpoints/types still exist in the API, this indicates the SDK was regenerated against an incomplete/different OpenAPI spec; please regenerate with the correct spec (or restore the missing models/exports).

@greptile-apps

greptile-apps Bot commented Feb 10, 2026

Copy link
Copy Markdown
Contributor
Additional Comments (2)

src/internal/model/registerFileProviderModel.ts
Incorrect provider type enum

RegisterFileProviderModel.type changed from a free-form string (doc says “one of S3 or AZURE”) to an enum with values '0', '1', and '-1' (RegisterFileProviderModel.TypeEnum). This will generate invalid payloads for an API expecting literal provider names and is a breaking change for SDK users. Unless the backend truly changed to numeric codes, the enum generation here looks wrong—please restore string literal values (e.g. 'S3' | 'AZURE') to match the API contract.


src/internal/model/registerFileBucketModel.ts
Mismatched JSON field name

RegisterFileBucketModel.fileServiceFile maps to baseName: "FileServiceFile" (capitalized) in the serialized JSON. If the backend expects the typical camelCase field (e.g. fileServiceFile), requests will silently omit/misname the field and fail server-side. Please verify the OpenAPI schema property name; if it’s fileServiceFile, the baseName here should match exactly.

@github-actions
github-actions Bot force-pushed the update-juno-sdk-files branch from 8c8579e to eb67a4b Compare February 10, 2026 02:31
@llam36 llam36 closed this Feb 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant