@modrinth/api-client 0.96.0 → 0.97.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/index.d.ts CHANGED
@@ -2850,24 +2850,6 @@ export declare namespace Labrinth {
2850
2850
  };
2851
2851
  }
2852
2852
  }
2853
- export namespace Affiliate {
2854
- export namespace Internal {
2855
- export type AffiliateCode = {
2856
- id: string;
2857
- created_at: string | null;
2858
- created_by: string | null;
2859
- affiliate: string;
2860
- source_name: string;
2861
- };
2862
- export type CreateRequest = {
2863
- affiliate?: string;
2864
- source_name: string;
2865
- };
2866
- export type PatchRequest = {
2867
- source_name: string;
2868
- };
2869
- }
2870
- }
2871
2853
  export namespace Attribution {
2872
2854
  export namespace Internal {
2873
2855
  export type AttributionPermissionKind = 'license' | 'my_project' | 'special_permissions' | 'globally_allowed' | 'no_permission';
@@ -3054,9 +3036,6 @@ export declare namespace Labrinth {
3054
3036
  project_downloads?: Metrics<ProjectDownloadsField, ProjectDownloadsFilters>;
3055
3037
  project_playtime?: Metrics<ProjectPlaytimeField, ProjectPlaytimeFilters>;
3056
3038
  project_revenue?: Metrics<ProjectRevenueField, ProjectRevenueFilters>;
3057
- affiliate_code_clicks?: Metrics<AffiliateCodeClicksField, AffiliateCodeClicksFilters>;
3058
- affiliate_code_conversions?: Metrics<AffiliateCodeConversionsField, AffiliateCodeConversionsFilters>;
3059
- affiliate_code_revenue?: Metrics<AffiliateCodeRevenueField, AffiliateCodeRevenueFilters>;
3060
3039
  };
3061
3040
  export type Metrics<BucketBy, FilterBy> = {
3062
3041
  bucket_by?: BucketBy[];
@@ -3067,9 +3046,6 @@ export declare namespace Labrinth {
3067
3046
  export type ProjectPlaytimeField = 'project_id' | 'version_id' | 'loader' | 'game_version' | 'country';
3068
3047
  export type ProjectRevenueField = 'project_id' | 'user_id';
3069
3048
  export type DownloadReason = 'standalone' | 'dependency' | 'modpack' | 'update';
3070
- export type AffiliateCodeClicksField = 'affiliate_code_id';
3071
- export type AffiliateCodeConversionsField = 'affiliate_code_id';
3072
- export type AffiliateCodeRevenueField = 'affiliate_code_id';
3073
3049
  export type ProjectViewsFilters = {
3074
3050
  domain?: string[];
3075
3051
  site_path?: string[];
@@ -3096,15 +3072,6 @@ export declare namespace Labrinth {
3096
3072
  export type ProjectRevenueFilters = {
3097
3073
  user_id?: string[];
3098
3074
  };
3099
- export type AffiliateCodeClicksFilters = {
3100
- affiliate_code_id?: string[];
3101
- };
3102
- export type AffiliateCodeConversionsFilters = {
3103
- affiliate_code_id?: string[];
3104
- };
3105
- export type AffiliateCodeRevenueFilters = {
3106
- affiliate_code_id?: string[];
3107
- };
3108
3075
  export type FetchResponse = {
3109
3076
  metrics: TimeSlice[];
3110
3077
  projects: Record<string, Projects.v3.Project>;
@@ -3157,7 +3124,7 @@ export declare namespace Labrinth {
3157
3124
  status_from: Projects.v2.ProjectStatus;
3158
3125
  status_to: Projects.v2.ProjectStatus;
3159
3126
  };
3160
- export type AnalyticsData = ProjectAnalytics | AffiliateCodeAnalytics;
3127
+ export type AnalyticsData = ProjectAnalytics;
3161
3128
  export type ProjectAnalytics = {
3162
3129
  source_project: string;
3163
3130
  } & ProjectMetrics;
@@ -3200,25 +3167,6 @@ export declare namespace Labrinth {
3200
3167
  user_id?: string;
3201
3168
  revenue: string;
3202
3169
  };
3203
- export type AffiliateCodeAnalytics = {
3204
- source_affiliate_code: string;
3205
- } & AffiliateCodeMetrics;
3206
- export type AffiliateCodeMetrics = ({
3207
- metric_kind: 'clicks';
3208
- } & AffiliateCodeClicks) | ({
3209
- metric_kind: 'conversions';
3210
- } & AffiliateCodeConversions) | ({
3211
- metric_kind: 'revenue';
3212
- } & AffiliateCodeRevenue);
3213
- export type AffiliateCodeClicks = {
3214
- clicks: number;
3215
- };
3216
- export type AffiliateCodeConversions = {
3217
- conversions: number;
3218
- };
3219
- export type AffiliateCodeRevenue = {
3220
- revenue: string;
3221
- };
3222
3170
  }
3223
3171
  }
3224
3172
  export namespace Auth {
@@ -5279,35 +5227,6 @@ export declare namespace Labrinth {
5279
5227
  }
5280
5228
  }
5281
5229
 
5282
- declare class LabrinthAffiliateInternalModule extends AbstractModule {
5283
- getModuleID(): string;
5284
- /**
5285
- * Get all affiliate codes for the authenticated user (or all if admin)
5286
- * GET /_internal/affiliate
5287
- */
5288
- getAll(): Promise<Labrinth.Affiliate.Internal.AffiliateCode[]>;
5289
- /**
5290
- * Create a new affiliate code
5291
- * PUT /_internal/affiliate
5292
- */
5293
- create(data: Labrinth.Affiliate.Internal.CreateRequest): Promise<Labrinth.Affiliate.Internal.AffiliateCode>;
5294
- /**
5295
- * Get a specific affiliate code by ID
5296
- * GET /_internal/affiliate/{id}
5297
- */
5298
- get(id: string): Promise<Labrinth.Affiliate.Internal.AffiliateCode>;
5299
- /**
5300
- * Delete an affiliate code
5301
- * DELETE /_internal/affiliate/{id}
5302
- */
5303
- delete(id: string): Promise<void>;
5304
- /**
5305
- * Update an affiliate code's source name
5306
- * PATCH /_internal/affiliate/{id}
5307
- */
5308
- patch(id: string, data: Labrinth.Affiliate.Internal.PatchRequest): Promise<void>;
5309
- }
5310
-
5311
5230
  declare class LabrinthAnalyticsInternalModule extends AbstractModule {
5312
5231
  getModuleID(): string;
5313
5232
  /**
@@ -5330,8 +5249,7 @@ declare class LabrinthAnalyticsInternalModule extends AbstractModule {
5330
5249
  declare class LabrinthAnalyticsV3Module extends AbstractModule {
5331
5250
  getModuleID(): string;
5332
5251
  /**
5333
- * Fetch analytics data for the authenticated user's accessible projects
5334
- * and affiliate codes.
5252
+ * Fetch analytics data for the authenticated user's accessible projects.
5335
5253
  *
5336
5254
  * @param data - Analytics request body defining time range and requested metrics
5337
5255
  * @returns Promise resolving to the analytics response, with time slices in `metrics`
@@ -7434,7 +7352,6 @@ declare const MODULE_REGISTRY: {
7434
7352
  readonly kyros_files_v1: typeof KyrosFilesV1Module;
7435
7353
  readonly kyros_logs_v1: typeof KyrosLogsV1Module;
7436
7354
  readonly kyros_upload_sessions_v1: typeof KyrosUploadSessionsV1Module;
7437
- readonly labrinth_affiliate_internal: typeof LabrinthAffiliateInternalModule;
7438
7355
  readonly labrinth_analytics_internal: typeof LabrinthAnalyticsInternalModule;
7439
7356
  readonly labrinth_analytics_v3: typeof LabrinthAnalyticsV3Module;
7440
7357
  readonly labrinth_auth_internal: typeof LabrinthAuthInternalModule;