@soilsidekick/sdk 1.2.0 → 2.0.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/package.json +5 -17
- package/sdks/README.md +254 -0
- package/sdks/__tests__/devices.test.ts +87 -0
- package/sdks/client.ts +198 -0
- package/sdks/dist/client.d.ts +94 -0
- package/sdks/dist/client.js +174 -0
- package/sdks/dist/index.d.ts +12 -0
- package/sdks/dist/index.js +39 -0
- package/sdks/dist/sensors/alerts.d.ts +45 -0
- package/sdks/dist/sensors/alerts.js +129 -0
- package/sdks/dist/sensors/devices.d.ts +65 -0
- package/sdks/dist/sensors/devices.js +123 -0
- package/sdks/dist/sensors/index.d.ts +4 -0
- package/sdks/dist/sensors/index.js +11 -0
- package/sdks/dist/sensors/mqtt.d.ts +55 -0
- package/sdks/dist/sensors/mqtt.js +179 -0
- package/sdks/dist/sensors/readings.d.ts +81 -0
- package/sdks/dist/sensors/readings.js +205 -0
- package/sdks/dist/test-sdk.d.ts +406 -0
- package/sdks/dist/test-sdk.js +366 -0
- package/sdks/dist/types.d.ts +162 -0
- package/sdks/dist/types.js +7 -0
- package/sdks/generate-sdk.sh +169 -0
- package/sdks/generated/.gitkeep +5 -0
- package/sdks/index.ts +25 -0
- package/sdks/jest.config.js +19 -0
- package/sdks/openapitools.json +73 -0
- package/sdks/package-lock.json +4306 -0
- package/sdks/package.json +53 -0
- package/sdks/sensors/alerts.ts +153 -0
- package/sdks/sensors/devices.ts +147 -0
- package/sdks/sensors/index.ts +4 -0
- package/sdks/sensors/mqtt.ts +211 -0
- package/sdks/sensors/readings.ts +241 -0
- package/sdks/test-sdk.ts +432 -0
- package/sdks/tsconfig.json +25 -0
- package/sdks/types.ts +222 -0
- package/soilsidekick-sdk-v2.zip +0 -0
- package/.openapi-generator/FILES +0 -156
- package/.openapi-generator/VERSION +0 -1
- package/.openapi-generator-ignore +0 -23
- package/README.md +0 -201
- package/dist/apis/AIServicesApi.d.ts +0 -70
- package/dist/apis/AIServicesApi.js +0 -177
- package/dist/apis/CarbonApi.d.ts +0 -31
- package/dist/apis/CarbonApi.js +0 -69
- package/dist/apis/EnvironmentalApi.d.ts +0 -31
- package/dist/apis/EnvironmentalApi.js +0 -69
- package/dist/apis/GeographicApi.d.ts +0 -31
- package/dist/apis/GeographicApi.js +0 -69
- package/dist/apis/LeafEnginesApi.d.ts +0 -31
- package/dist/apis/LeafEnginesApi.js +0 -69
- package/dist/apis/SatelliteDataApi.d.ts +0 -31
- package/dist/apis/SatelliteDataApi.js +0 -69
- package/dist/apis/SoilAnalysisApi.d.ts +0 -57
- package/dist/apis/SoilAnalysisApi.js +0 -141
- package/dist/apis/VRTApi.d.ts +0 -31
- package/dist/apis/VRTApi.js +0 -69
- package/dist/apis/WaterQualityApi.d.ts +0 -44
- package/dist/apis/WaterQualityApi.js +0 -105
- package/dist/apis/index.d.ts +0 -9
- package/dist/apis/index.js +0 -27
- package/dist/esm/apis/AIServicesApi.d.ts +0 -70
- package/dist/esm/apis/AIServicesApi.js +0 -173
- package/dist/esm/apis/CarbonApi.d.ts +0 -31
- package/dist/esm/apis/CarbonApi.js +0 -65
- package/dist/esm/apis/EnvironmentalApi.d.ts +0 -31
- package/dist/esm/apis/EnvironmentalApi.js +0 -65
- package/dist/esm/apis/GeographicApi.d.ts +0 -31
- package/dist/esm/apis/GeographicApi.js +0 -65
- package/dist/esm/apis/LeafEnginesApi.d.ts +0 -31
- package/dist/esm/apis/LeafEnginesApi.js +0 -65
- package/dist/esm/apis/SatelliteDataApi.d.ts +0 -31
- package/dist/esm/apis/SatelliteDataApi.js +0 -65
- package/dist/esm/apis/SoilAnalysisApi.d.ts +0 -57
- package/dist/esm/apis/SoilAnalysisApi.js +0 -137
- package/dist/esm/apis/VRTApi.d.ts +0 -31
- package/dist/esm/apis/VRTApi.js +0 -65
- package/dist/esm/apis/WaterQualityApi.d.ts +0 -44
- package/dist/esm/apis/WaterQualityApi.js +0 -101
- package/dist/esm/apis/index.d.ts +0 -9
- package/dist/esm/apis/index.js +0 -11
- package/dist/esm/index.d.ts +0 -3
- package/dist/esm/index.js +0 -5
- package/dist/esm/models/AIAnalysis.d.ts +0 -45
- package/dist/esm/models/AIAnalysis.js +0 -46
- package/dist/esm/models/AIAnalysisRecommendationsInner.d.ts +0 -53
- package/dist/esm/models/AIAnalysisRecommendationsInner.js +0 -53
- package/dist/esm/models/CalculateCarbonCreditsRequest.d.ts +0 -65
- package/dist/esm/models/CalculateCarbonCreditsRequest.js +0 -61
- package/dist/esm/models/CalculateEnvironmentalImpactRequest.d.ts +0 -59
- package/dist/esm/models/CalculateEnvironmentalImpactRequest.js +0 -58
- package/dist/esm/models/CalculateEnvironmentalImpactRequestProposedTreatmentsInner.d.ts +0 -41
- package/dist/esm/models/CalculateEnvironmentalImpactRequestProposedTreatmentsInner.js +0 -49
- package/dist/esm/models/CalculateEnvironmentalImpactRequestSoilData.d.ts +0 -83
- package/dist/esm/models/CalculateEnvironmentalImpactRequestSoilData.js +0 -70
- package/dist/esm/models/CalculateEnvironmentalImpactRequestWaterBodyData.d.ts +0 -32
- package/dist/esm/models/CalculateEnvironmentalImpactRequestWaterBodyData.js +0 -41
- package/dist/esm/models/CarbonCreditCalculation.d.ts +0 -46
- package/dist/esm/models/CarbonCreditCalculation.js +0 -47
- package/dist/esm/models/CarbonCreditCalculationCalculationDetails.d.ts +0 -63
- package/dist/esm/models/CarbonCreditCalculationCalculationDetails.js +0 -52
- package/dist/esm/models/CarbonCreditCalculationCalculationDetailsMetadata.d.ts +0 -44
- package/dist/esm/models/CarbonCreditCalculationCalculationDetailsMetadata.js +0 -45
- package/dist/esm/models/CarbonCreditCalculationCreditRecord.d.ts +0 -64
- package/dist/esm/models/CarbonCreditCalculationCreditRecord.js +0 -56
- package/dist/esm/models/County.d.ts +0 -56
- package/dist/esm/models/County.js +0 -49
- package/dist/esm/models/CountyLookup200Response.d.ts +0 -33
- package/dist/esm/models/CountyLookup200Response.js +0 -42
- package/dist/esm/models/CountyLookupRequest.d.ts +0 -32
- package/dist/esm/models/CountyLookupRequest.js +0 -43
- package/dist/esm/models/EnvironmentalImpact.d.ts +0 -46
- package/dist/esm/models/EnvironmentalImpact.js +0 -47
- package/dist/esm/models/EnvironmentalImpactDetailedAnalysis.d.ts +0 -58
- package/dist/esm/models/EnvironmentalImpactDetailedAnalysis.js +0 -51
- package/dist/esm/models/EnvironmentalImpactDetailedAnalysisEcoAlternatives.d.ts +0 -33
- package/dist/esm/models/EnvironmentalImpactDetailedAnalysisEcoAlternatives.js +0 -42
- package/dist/esm/models/EnvironmentalImpactDetailedAnalysisEcoAlternativesAlternativesInner.d.ts +0 -56
- package/dist/esm/models/EnvironmentalImpactDetailedAnalysisEcoAlternativesAlternativesInner.js +0 -49
- package/dist/esm/models/EnvironmentalImpactDetailedAnalysisRunoffRisk.d.ts +0 -53
- package/dist/esm/models/EnvironmentalImpactDetailedAnalysisRunoffRisk.js +0 -53
- package/dist/esm/models/EnvironmentalImpactImpactAssessment.d.ts +0 -56
- package/dist/esm/models/EnvironmentalImpactImpactAssessment.js +0 -49
- package/dist/esm/models/GenerateSmartReportSummaryRequest.d.ts +0 -46
- package/dist/esm/models/GenerateSmartReportSummaryRequest.js +0 -54
- package/dist/esm/models/GenerateVRTPrescriptionRequest.d.ts +0 -53
- package/dist/esm/models/GenerateVRTPrescriptionRequest.js +0 -57
- package/dist/esm/models/GetAgriculturalIntelligenceRequest.d.ts +0 -47
- package/dist/esm/models/GetAgriculturalIntelligenceRequest.js +0 -55
- package/dist/esm/models/GetLiveAgriculturalDataRequest.d.ts +0 -60
- package/dist/esm/models/GetLiveAgriculturalDataRequest.js +0 -64
- package/dist/esm/models/GetPlantingCalendarRequest.d.ts +0 -38
- package/dist/esm/models/GetPlantingCalendarRequest.js +0 -47
- package/dist/esm/models/GetSatelliteDataRequest.d.ts +0 -38
- package/dist/esm/models/GetSatelliteDataRequest.js +0 -47
- package/dist/esm/models/GetSeasonalPlanningAssistantRequest.d.ts +0 -67
- package/dist/esm/models/GetSeasonalPlanningAssistantRequest.js +0 -63
- package/dist/esm/models/GetSeasonalPlanningAssistantRequestLocation.d.ts +0 -44
- package/dist/esm/models/GetSeasonalPlanningAssistantRequestLocation.js +0 -45
- package/dist/esm/models/GetSoilDataRequest.d.ts +0 -32
- package/dist/esm/models/GetSoilDataRequest.js +0 -43
- package/dist/esm/models/GetTerritorialWaterAnalyticsRequest.d.ts +0 -54
- package/dist/esm/models/GetTerritorialWaterAnalyticsRequest.js +0 -54
- package/dist/esm/models/GetTerritorialWaterAnalyticsRequestDateRange.d.ts +0 -38
- package/dist/esm/models/GetTerritorialWaterAnalyticsRequestDateRange.js +0 -43
- package/dist/esm/models/GetWaterQualityRequest.d.ts +0 -32
- package/dist/esm/models/GetWaterQualityRequest.js +0 -43
- package/dist/esm/models/LeafEnginesCompatibility.d.ts +0 -46
- package/dist/esm/models/LeafEnginesCompatibility.js +0 -47
- package/dist/esm/models/LeafEnginesCompatibilityData.d.ts +0 -85
- package/dist/esm/models/LeafEnginesCompatibilityData.js +0 -65
- package/dist/esm/models/LeafEnginesCompatibilityDataBreakdown.d.ts +0 -45
- package/dist/esm/models/LeafEnginesCompatibilityDataBreakdown.js +0 -46
- package/dist/esm/models/LeafEnginesCompatibilityDataBreakdownSoil.d.ts +0 -44
- package/dist/esm/models/LeafEnginesCompatibilityDataBreakdownSoil.js +0 -45
- package/dist/esm/models/LeafEnginesCompatibilityDataMetadata.d.ts +0 -44
- package/dist/esm/models/LeafEnginesCompatibilityDataMetadata.js +0 -45
- package/dist/esm/models/LeafEnginesCompatibilityUsage.d.ts +0 -38
- package/dist/esm/models/LeafEnginesCompatibilityUsage.js +0 -43
- package/dist/esm/models/LeafenginesQueryRequest.d.ts +0 -47
- package/dist/esm/models/LeafenginesQueryRequest.js +0 -52
- package/dist/esm/models/LeafenginesQueryRequestLocation.d.ts +0 -50
- package/dist/esm/models/LeafenginesQueryRequestLocation.js +0 -47
- package/dist/esm/models/LeafenginesQueryRequestOptions.d.ts +0 -44
- package/dist/esm/models/LeafenginesQueryRequestOptions.js +0 -45
- package/dist/esm/models/LeafenginesQueryRequestPlant.d.ts +0 -51
- package/dist/esm/models/LeafenginesQueryRequestPlant.js +0 -48
- package/dist/esm/models/LeafenginesQueryRequestPlantCareRequirements.d.ts +0 -63
- package/dist/esm/models/LeafenginesQueryRequestPlantCareRequirements.js +0 -62
- package/dist/esm/models/LeafenginesQueryRequestPlantCareRequirementsSoilPhRange.d.ts +0 -38
- package/dist/esm/models/LeafenginesQueryRequestPlantCareRequirementsSoilPhRange.js +0 -43
- package/dist/esm/models/LiveAgriculturalData.d.ts +0 -77
- package/dist/esm/models/LiveAgriculturalData.js +0 -61
- package/dist/esm/models/LiveAgriculturalDataData.d.ts +0 -50
- package/dist/esm/models/LiveAgriculturalDataData.js +0 -47
- package/dist/esm/models/ModelError.d.ts +0 -44
- package/dist/esm/models/ModelError.js +0 -45
- package/dist/esm/models/PlantingCalendar.d.ts +0 -57
- package/dist/esm/models/PlantingCalendar.js +0 -50
- package/dist/esm/models/SatelliteData.d.ts +0 -56
- package/dist/esm/models/SatelliteData.js +0 -49
- package/dist/esm/models/SeasonalPlanningResponse.d.ts +0 -52
- package/dist/esm/models/SeasonalPlanningResponse.js +0 -49
- package/dist/esm/models/SeasonalPlanningResponseRecommendations.d.ts +0 -44
- package/dist/esm/models/SeasonalPlanningResponseRecommendations.js +0 -45
- package/dist/esm/models/SeasonalPlanningResponseWeatherData.d.ts +0 -62
- package/dist/esm/models/SeasonalPlanningResponseWeatherData.js +0 -51
- package/dist/esm/models/SmartReportSummary.d.ts +0 -45
- package/dist/esm/models/SmartReportSummary.js +0 -46
- package/dist/esm/models/SmartReportSummarySummary.d.ts +0 -50
- package/dist/esm/models/SmartReportSummarySummary.js +0 -47
- package/dist/esm/models/SoilData.d.ts +0 -94
- package/dist/esm/models/SoilData.js +0 -61
- package/dist/esm/models/TerritorialWaterAnalytics.d.ts +0 -45
- package/dist/esm/models/TerritorialWaterAnalytics.js +0 -46
- package/dist/esm/models/TerritorialWaterAnalyticsAnalytics.d.ts +0 -50
- package/dist/esm/models/TerritorialWaterAnalyticsAnalytics.js +0 -47
- package/dist/esm/models/VRTPrescription.d.ts +0 -51
- package/dist/esm/models/VRTPrescription.js +0 -48
- package/dist/esm/models/VRTPrescriptionZonesInner.d.ts +0 -44
- package/dist/esm/models/VRTPrescriptionZonesInner.js +0 -45
- package/dist/esm/models/VisualCropAnalysis.d.ts +0 -51
- package/dist/esm/models/VisualCropAnalysis.js +0 -48
- package/dist/esm/models/VisualCropAnalysisAnalysis.d.ts +0 -65
- package/dist/esm/models/VisualCropAnalysisAnalysis.js +0 -57
- package/dist/esm/models/VisualCropAnalysisRequest.d.ts +0 -60
- package/dist/esm/models/VisualCropAnalysisRequest.js +0 -60
- package/dist/esm/models/VisualCropAnalysisRequestLocation.d.ts +0 -44
- package/dist/esm/models/VisualCropAnalysisRequestLocation.js +0 -45
- package/dist/esm/models/WaterQuality.d.ts +0 -77
- package/dist/esm/models/WaterQuality.js +0 -61
- package/dist/esm/models/index.d.ts +0 -64
- package/dist/esm/models/index.js +0 -66
- package/dist/esm/runtime.d.ts +0 -184
- package/dist/esm/runtime.js +0 -334
- package/dist/index.d.ts +0 -3
- package/dist/index.js +0 -21
- package/dist/models/AIAnalysis.d.ts +0 -45
- package/dist/models/AIAnalysis.js +0 -53
- package/dist/models/AIAnalysisRecommendationsInner.d.ts +0 -53
- package/dist/models/AIAnalysisRecommendationsInner.js +0 -61
- package/dist/models/CalculateCarbonCreditsRequest.d.ts +0 -65
- package/dist/models/CalculateCarbonCreditsRequest.js +0 -69
- package/dist/models/CalculateEnvironmentalImpactRequest.d.ts +0 -59
- package/dist/models/CalculateEnvironmentalImpactRequest.js +0 -65
- package/dist/models/CalculateEnvironmentalImpactRequestProposedTreatmentsInner.d.ts +0 -41
- package/dist/models/CalculateEnvironmentalImpactRequestProposedTreatmentsInner.js +0 -57
- package/dist/models/CalculateEnvironmentalImpactRequestSoilData.d.ts +0 -83
- package/dist/models/CalculateEnvironmentalImpactRequestSoilData.js +0 -78
- package/dist/models/CalculateEnvironmentalImpactRequestWaterBodyData.d.ts +0 -32
- package/dist/models/CalculateEnvironmentalImpactRequestWaterBodyData.js +0 -48
- package/dist/models/CarbonCreditCalculation.d.ts +0 -46
- package/dist/models/CarbonCreditCalculation.js +0 -54
- package/dist/models/CarbonCreditCalculationCalculationDetails.d.ts +0 -63
- package/dist/models/CarbonCreditCalculationCalculationDetails.js +0 -59
- package/dist/models/CarbonCreditCalculationCalculationDetailsMetadata.d.ts +0 -44
- package/dist/models/CarbonCreditCalculationCalculationDetailsMetadata.js +0 -52
- package/dist/models/CarbonCreditCalculationCreditRecord.d.ts +0 -64
- package/dist/models/CarbonCreditCalculationCreditRecord.js +0 -64
- package/dist/models/County.d.ts +0 -56
- package/dist/models/County.js +0 -56
- package/dist/models/CountyLookup200Response.d.ts +0 -33
- package/dist/models/CountyLookup200Response.js +0 -49
- package/dist/models/CountyLookupRequest.d.ts +0 -32
- package/dist/models/CountyLookupRequest.js +0 -50
- package/dist/models/EnvironmentalImpact.d.ts +0 -46
- package/dist/models/EnvironmentalImpact.js +0 -54
- package/dist/models/EnvironmentalImpactDetailedAnalysis.d.ts +0 -58
- package/dist/models/EnvironmentalImpactDetailedAnalysis.js +0 -58
- package/dist/models/EnvironmentalImpactDetailedAnalysisEcoAlternatives.d.ts +0 -33
- package/dist/models/EnvironmentalImpactDetailedAnalysisEcoAlternatives.js +0 -49
- package/dist/models/EnvironmentalImpactDetailedAnalysisEcoAlternativesAlternativesInner.d.ts +0 -56
- package/dist/models/EnvironmentalImpactDetailedAnalysisEcoAlternativesAlternativesInner.js +0 -56
- package/dist/models/EnvironmentalImpactDetailedAnalysisRunoffRisk.d.ts +0 -53
- package/dist/models/EnvironmentalImpactDetailedAnalysisRunoffRisk.js +0 -61
- package/dist/models/EnvironmentalImpactImpactAssessment.d.ts +0 -56
- package/dist/models/EnvironmentalImpactImpactAssessment.js +0 -56
- package/dist/models/GenerateSmartReportSummaryRequest.d.ts +0 -46
- package/dist/models/GenerateSmartReportSummaryRequest.js +0 -62
- package/dist/models/GenerateVRTPrescriptionRequest.d.ts +0 -53
- package/dist/models/GenerateVRTPrescriptionRequest.js +0 -65
- package/dist/models/GetAgriculturalIntelligenceRequest.d.ts +0 -47
- package/dist/models/GetAgriculturalIntelligenceRequest.js +0 -63
- package/dist/models/GetLiveAgriculturalDataRequest.d.ts +0 -60
- package/dist/models/GetLiveAgriculturalDataRequest.js +0 -72
- package/dist/models/GetPlantingCalendarRequest.d.ts +0 -38
- package/dist/models/GetPlantingCalendarRequest.js +0 -54
- package/dist/models/GetSatelliteDataRequest.d.ts +0 -38
- package/dist/models/GetSatelliteDataRequest.js +0 -54
- package/dist/models/GetSeasonalPlanningAssistantRequest.d.ts +0 -67
- package/dist/models/GetSeasonalPlanningAssistantRequest.js +0 -71
- package/dist/models/GetSeasonalPlanningAssistantRequestLocation.d.ts +0 -44
- package/dist/models/GetSeasonalPlanningAssistantRequestLocation.js +0 -52
- package/dist/models/GetSoilDataRequest.d.ts +0 -32
- package/dist/models/GetSoilDataRequest.js +0 -50
- package/dist/models/GetTerritorialWaterAnalyticsRequest.d.ts +0 -54
- package/dist/models/GetTerritorialWaterAnalyticsRequest.js +0 -62
- package/dist/models/GetTerritorialWaterAnalyticsRequestDateRange.d.ts +0 -38
- package/dist/models/GetTerritorialWaterAnalyticsRequestDateRange.js +0 -50
- package/dist/models/GetWaterQualityRequest.d.ts +0 -32
- package/dist/models/GetWaterQualityRequest.js +0 -50
- package/dist/models/LeafEnginesCompatibility.d.ts +0 -46
- package/dist/models/LeafEnginesCompatibility.js +0 -54
- package/dist/models/LeafEnginesCompatibilityData.d.ts +0 -85
- package/dist/models/LeafEnginesCompatibilityData.js +0 -73
- package/dist/models/LeafEnginesCompatibilityDataBreakdown.d.ts +0 -45
- package/dist/models/LeafEnginesCompatibilityDataBreakdown.js +0 -53
- package/dist/models/LeafEnginesCompatibilityDataBreakdownSoil.d.ts +0 -44
- package/dist/models/LeafEnginesCompatibilityDataBreakdownSoil.js +0 -52
- package/dist/models/LeafEnginesCompatibilityDataMetadata.d.ts +0 -44
- package/dist/models/LeafEnginesCompatibilityDataMetadata.js +0 -52
- package/dist/models/LeafEnginesCompatibilityUsage.d.ts +0 -38
- package/dist/models/LeafEnginesCompatibilityUsage.js +0 -50
- package/dist/models/LeafenginesQueryRequest.d.ts +0 -47
- package/dist/models/LeafenginesQueryRequest.js +0 -59
- package/dist/models/LeafenginesQueryRequestLocation.d.ts +0 -50
- package/dist/models/LeafenginesQueryRequestLocation.js +0 -54
- package/dist/models/LeafenginesQueryRequestOptions.d.ts +0 -44
- package/dist/models/LeafenginesQueryRequestOptions.js +0 -52
- package/dist/models/LeafenginesQueryRequestPlant.d.ts +0 -51
- package/dist/models/LeafenginesQueryRequestPlant.js +0 -55
- package/dist/models/LeafenginesQueryRequestPlantCareRequirements.d.ts +0 -63
- package/dist/models/LeafenginesQueryRequestPlantCareRequirements.js +0 -70
- package/dist/models/LeafenginesQueryRequestPlantCareRequirementsSoilPhRange.d.ts +0 -38
- package/dist/models/LeafenginesQueryRequestPlantCareRequirementsSoilPhRange.js +0 -50
- package/dist/models/LiveAgriculturalData.d.ts +0 -77
- package/dist/models/LiveAgriculturalData.js +0 -69
- package/dist/models/LiveAgriculturalDataData.d.ts +0 -50
- package/dist/models/LiveAgriculturalDataData.js +0 -54
- package/dist/models/ModelError.d.ts +0 -44
- package/dist/models/ModelError.js +0 -52
- package/dist/models/PlantingCalendar.d.ts +0 -57
- package/dist/models/PlantingCalendar.js +0 -57
- package/dist/models/SatelliteData.d.ts +0 -56
- package/dist/models/SatelliteData.js +0 -56
- package/dist/models/SeasonalPlanningResponse.d.ts +0 -52
- package/dist/models/SeasonalPlanningResponse.js +0 -56
- package/dist/models/SeasonalPlanningResponseRecommendations.d.ts +0 -44
- package/dist/models/SeasonalPlanningResponseRecommendations.js +0 -52
- package/dist/models/SeasonalPlanningResponseWeatherData.d.ts +0 -62
- package/dist/models/SeasonalPlanningResponseWeatherData.js +0 -58
- package/dist/models/SmartReportSummary.d.ts +0 -45
- package/dist/models/SmartReportSummary.js +0 -53
- package/dist/models/SmartReportSummarySummary.d.ts +0 -50
- package/dist/models/SmartReportSummarySummary.js +0 -54
- package/dist/models/SoilData.d.ts +0 -94
- package/dist/models/SoilData.js +0 -68
- package/dist/models/TerritorialWaterAnalytics.d.ts +0 -45
- package/dist/models/TerritorialWaterAnalytics.js +0 -53
- package/dist/models/TerritorialWaterAnalyticsAnalytics.d.ts +0 -50
- package/dist/models/TerritorialWaterAnalyticsAnalytics.js +0 -54
- package/dist/models/VRTPrescription.d.ts +0 -51
- package/dist/models/VRTPrescription.js +0 -55
- package/dist/models/VRTPrescriptionZonesInner.d.ts +0 -44
- package/dist/models/VRTPrescriptionZonesInner.js +0 -52
- package/dist/models/VisualCropAnalysis.d.ts +0 -51
- package/dist/models/VisualCropAnalysis.js +0 -55
- package/dist/models/VisualCropAnalysisAnalysis.d.ts +0 -65
- package/dist/models/VisualCropAnalysisAnalysis.js +0 -65
- package/dist/models/VisualCropAnalysisRequest.d.ts +0 -60
- package/dist/models/VisualCropAnalysisRequest.js +0 -68
- package/dist/models/VisualCropAnalysisRequestLocation.d.ts +0 -44
- package/dist/models/VisualCropAnalysisRequestLocation.js +0 -52
- package/dist/models/WaterQuality.d.ts +0 -77
- package/dist/models/WaterQuality.js +0 -69
- package/dist/models/index.d.ts +0 -64
- package/dist/models/index.js +0 -82
- package/dist/runtime.d.ts +0 -184
- package/dist/runtime.js +0 -350
- package/docs/AIAnalysis.md +0 -38
- package/docs/AIAnalysisRecommendationsInner.md +0 -38
- package/docs/AIServicesApi.md +0 -308
- package/docs/CalculateCarbonCreditsRequest.md +0 -42
- package/docs/CalculateEnvironmentalImpactRequest.md +0 -42
- package/docs/CalculateEnvironmentalImpactRequestProposedTreatmentsInner.md +0 -34
- package/docs/CalculateEnvironmentalImpactRequestSoilData.md +0 -44
- package/docs/CalculateEnvironmentalImpactRequestWaterBodyData.md +0 -34
- package/docs/CarbonApi.md +0 -83
- package/docs/CarbonCreditCalculation.md +0 -38
- package/docs/CarbonCreditCalculationCalculationDetails.md +0 -44
- package/docs/CarbonCreditCalculationCalculationDetailsMetadata.md +0 -38
- package/docs/CarbonCreditCalculationCreditRecord.md +0 -42
- package/docs/County.md +0 -42
- package/docs/CountyLookup200Response.md +0 -34
- package/docs/CountyLookupRequest.md +0 -34
- package/docs/EnvironmentalApi.md +0 -83
- package/docs/EnvironmentalImpact.md +0 -38
- package/docs/EnvironmentalImpactDetailedAnalysis.md +0 -42
- package/docs/EnvironmentalImpactDetailedAnalysisEcoAlternatives.md +0 -34
- package/docs/EnvironmentalImpactDetailedAnalysisEcoAlternativesAlternativesInner.md +0 -42
- package/docs/EnvironmentalImpactDetailedAnalysisRunoffRisk.md +0 -38
- package/docs/EnvironmentalImpactImpactAssessment.md +0 -42
- package/docs/GenerateSmartReportSummaryRequest.md +0 -36
- package/docs/GenerateVRTPrescriptionRequest.md +0 -38
- package/docs/GeographicApi.md +0 -82
- package/docs/GetAgriculturalIntelligenceRequest.md +0 -36
- package/docs/GetLiveAgriculturalDataRequest.md +0 -40
- package/docs/GetPlantingCalendarRequest.md +0 -36
- package/docs/GetSatelliteDataRequest.md +0 -36
- package/docs/GetSeasonalPlanningAssistantRequest.md +0 -42
- package/docs/GetSeasonalPlanningAssistantRequestLocation.md +0 -38
- package/docs/GetSoilDataRequest.md +0 -34
- package/docs/GetTerritorialWaterAnalyticsRequest.md +0 -38
- package/docs/GetTerritorialWaterAnalyticsRequestDateRange.md +0 -36
- package/docs/GetWaterQualityRequest.md +0 -34
- package/docs/LeafEnginesApi.md +0 -83
- package/docs/LeafEnginesCompatibility.md +0 -38
- package/docs/LeafEnginesCompatibilityData.md +0 -48
- package/docs/LeafEnginesCompatibilityDataBreakdown.md +0 -38
- package/docs/LeafEnginesCompatibilityDataBreakdownSoil.md +0 -38
- package/docs/LeafEnginesCompatibilityDataMetadata.md +0 -38
- package/docs/LeafEnginesCompatibilityUsage.md +0 -36
- package/docs/LeafenginesQueryRequest.md +0 -38
- package/docs/LeafenginesQueryRequestLocation.md +0 -40
- package/docs/LeafenginesQueryRequestOptions.md +0 -38
- package/docs/LeafenginesQueryRequestPlant.md +0 -40
- package/docs/LeafenginesQueryRequestPlantCareRequirements.md +0 -38
- package/docs/LeafenginesQueryRequestPlantCareRequirementsSoilPhRange.md +0 -36
- package/docs/LiveAgriculturalData.md +0 -46
- package/docs/LiveAgriculturalDataData.md +0 -40
- package/docs/ModelError.md +0 -38
- package/docs/PlantingCalendar.md +0 -42
- package/docs/SatelliteData.md +0 -42
- package/docs/SatelliteDataApi.md +0 -83
- package/docs/SeasonalPlanningResponse.md +0 -40
- package/docs/SeasonalPlanningResponseRecommendations.md +0 -38
- package/docs/SeasonalPlanningResponseWeatherData.md +0 -44
- package/docs/SmartReportSummary.md +0 -38
- package/docs/SmartReportSummarySummary.md +0 -40
- package/docs/SoilAnalysisApi.md +0 -234
- package/docs/SoilData.md +0 -54
- package/docs/TerritorialWaterAnalytics.md +0 -38
- package/docs/TerritorialWaterAnalyticsAnalytics.md +0 -40
- package/docs/VRTApi.md +0 -83
- package/docs/VRTPrescription.md +0 -40
- package/docs/VRTPrescriptionZonesInner.md +0 -38
- package/docs/VisualCropAnalysis.md +0 -40
- package/docs/VisualCropAnalysisAnalysis.md +0 -42
- package/docs/VisualCropAnalysisRequest.md +0 -40
- package/docs/VisualCropAnalysisRequestLocation.md +0 -38
- package/docs/WaterQuality.md +0 -46
- package/docs/WaterQualityApi.md +0 -158
- package/package.json.save +0 -8
- package/src/apis/AIServicesApi.ts +0 -247
- package/src/apis/CarbonApi.ts +0 -82
- package/src/apis/EnvironmentalApi.ts +0 -82
- package/src/apis/GeographicApi.ts +0 -82
- package/src/apis/LeafEnginesApi.ts +0 -82
- package/src/apis/SatelliteDataApi.ts +0 -82
- package/src/apis/SoilAnalysisApi.ts +0 -192
- package/src/apis/VRTApi.ts +0 -82
- package/src/apis/WaterQualityApi.ts +0 -137
- package/src/apis/index.ts +0 -11
- package/src/index.ts +0 -5
- package/src/models/AIAnalysis.ts +0 -89
- package/src/models/AIAnalysisRecommendationsInner.ts +0 -93
- package/src/models/CalculateCarbonCreditsRequest.ts +0 -111
- package/src/models/CalculateEnvironmentalImpactRequest.ts +0 -122
- package/src/models/CalculateEnvironmentalImpactRequestProposedTreatmentsInner.ts +0 -77
- package/src/models/CalculateEnvironmentalImpactRequestSoilData.ts +0 -130
- package/src/models/CalculateEnvironmentalImpactRequestWaterBodyData.ts +0 -65
- package/src/models/CarbonCreditCalculation.ts +0 -96
- package/src/models/CarbonCreditCalculationCalculationDetails.ts +0 -113
- package/src/models/CarbonCreditCalculationCalculationDetailsMetadata.ts +0 -81
- package/src/models/CarbonCreditCalculationCreditRecord.ts +0 -108
- package/src/models/County.ts +0 -97
- package/src/models/CountyLookup200Response.ts +0 -73
- package/src/models/CountyLookupRequest.ts +0 -66
- package/src/models/EnvironmentalImpact.ts +0 -96
- package/src/models/EnvironmentalImpactDetailedAnalysis.ts +0 -112
- package/src/models/EnvironmentalImpactDetailedAnalysisEcoAlternatives.ts +0 -73
- package/src/models/EnvironmentalImpactDetailedAnalysisEcoAlternativesAlternativesInner.ts +0 -97
- package/src/models/EnvironmentalImpactDetailedAnalysisRunoffRisk.ts +0 -93
- package/src/models/EnvironmentalImpactImpactAssessment.ts +0 -97
- package/src/models/GenerateSmartReportSummaryRequest.ts +0 -86
- package/src/models/GenerateVRTPrescriptionRequest.ts +0 -95
- package/src/models/GetAgriculturalIntelligenceRequest.ts +0 -87
- package/src/models/GetLiveAgriculturalDataRequest.ts +0 -106
- package/src/models/GetPlantingCalendarRequest.ts +0 -75
- package/src/models/GetSatelliteDataRequest.ts +0 -75
- package/src/models/GetSeasonalPlanningAssistantRequest.ts +0 -120
- package/src/models/GetSeasonalPlanningAssistantRequestLocation.ts +0 -81
- package/src/models/GetSoilDataRequest.ts +0 -66
- package/src/models/GetTerritorialWaterAnalyticsRequest.ts +0 -101
- package/src/models/GetTerritorialWaterAnalyticsRequestDateRange.ts +0 -73
- package/src/models/GetWaterQualityRequest.ts +0 -66
- package/src/models/LeafEnginesCompatibility.ts +0 -96
- package/src/models/LeafEnginesCompatibilityData.ts +0 -148
- package/src/models/LeafEnginesCompatibilityDataBreakdown.ts +0 -89
- package/src/models/LeafEnginesCompatibilityDataBreakdownSoil.ts +0 -81
- package/src/models/LeafEnginesCompatibilityDataMetadata.ts +0 -81
- package/src/models/LeafEnginesCompatibilityUsage.ts +0 -73
- package/src/models/LeafenginesQueryRequest.ts +0 -105
- package/src/models/LeafenginesQueryRequestLocation.ts +0 -89
- package/src/models/LeafenginesQueryRequestOptions.ts +0 -81
- package/src/models/LeafenginesQueryRequestPlant.ts +0 -97
- package/src/models/LeafenginesQueryRequestPlantCareRequirements.ts +0 -111
- package/src/models/LeafenginesQueryRequestPlantCareRequirementsSoilPhRange.ts +0 -73
- package/src/models/LiveAgriculturalData.ts +0 -132
- package/src/models/LiveAgriculturalDataData.ts +0 -89
- package/src/models/ModelError.ts +0 -81
- package/src/models/PlantingCalendar.ts +0 -105
- package/src/models/SatelliteData.ts +0 -97
- package/src/models/SeasonalPlanningResponse.ts +0 -104
- package/src/models/SeasonalPlanningResponseRecommendations.ts +0 -81
- package/src/models/SeasonalPlanningResponseWeatherData.ts +0 -105
- package/src/models/SmartReportSummary.ts +0 -89
- package/src/models/SmartReportSummarySummary.ts +0 -89
- package/src/models/SoilData.ts +0 -145
- package/src/models/TerritorialWaterAnalytics.ts +0 -89
- package/src/models/TerritorialWaterAnalyticsAnalytics.ts +0 -89
- package/src/models/VRTPrescription.ts +0 -97
- package/src/models/VRTPrescriptionZonesInner.ts +0 -81
- package/src/models/VisualCropAnalysis.ts +0 -97
- package/src/models/VisualCropAnalysisAnalysis.ts +0 -109
- package/src/models/VisualCropAnalysisRequest.ts +0 -111
- package/src/models/VisualCropAnalysisRequestLocation.ts +0 -81
- package/src/models/WaterQuality.ts +0 -125
- package/src/models/index.ts +0 -66
- package/src/runtime.ts +0 -432
- package/tsconfig.esm.json +0 -7
- package/tsconfig.json +0 -16
|
@@ -0,0 +1,366 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* SoilSidekick Pro SDK Test Script
|
|
4
|
+
*
|
|
5
|
+
* This script validates SDK functionality including:
|
|
6
|
+
* - Authentication with API keys
|
|
7
|
+
* - Rate limiting headers
|
|
8
|
+
* - Tier-based feature access
|
|
9
|
+
* - Error handling
|
|
10
|
+
*
|
|
11
|
+
* Usage:
|
|
12
|
+
* npx ts-node sdks/test-sdk.ts <API_KEY>
|
|
13
|
+
*
|
|
14
|
+
* Or with environment variable:
|
|
15
|
+
* SOILSIDEKICK_API_KEY=ss_prod_xxx npx ts-node sdks/test-sdk.ts
|
|
16
|
+
*/
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.ENDPOINT_TESTS = void 0;
|
|
19
|
+
exports.runTestSuite = runTestSuite;
|
|
20
|
+
exports.testEndpoint = testEndpoint;
|
|
21
|
+
const BASE_URL = 'https://wzgnxkoeqzvueypwzvyn.supabase.co/functions/v1';
|
|
22
|
+
// Test configurations by tier
|
|
23
|
+
const ENDPOINT_TESTS = [
|
|
24
|
+
// Free tier endpoints
|
|
25
|
+
{
|
|
26
|
+
endpoint: '/get-soil-data',
|
|
27
|
+
method: 'POST',
|
|
28
|
+
body: { county_fips: '12086' }, // Miami-Dade
|
|
29
|
+
tierRequired: 'free',
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
endpoint: '/county-lookup',
|
|
33
|
+
method: 'POST',
|
|
34
|
+
body: { term: 'Miami' },
|
|
35
|
+
tierRequired: 'free',
|
|
36
|
+
},
|
|
37
|
+
// Starter tier endpoints
|
|
38
|
+
{
|
|
39
|
+
endpoint: '/territorial-water-quality',
|
|
40
|
+
method: 'POST',
|
|
41
|
+
body: { county_fips: '12086' },
|
|
42
|
+
tierRequired: 'starter',
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
endpoint: '/territorial-water-analytics',
|
|
46
|
+
method: 'POST',
|
|
47
|
+
body: { territory_type: 'state' },
|
|
48
|
+
tierRequired: 'starter',
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
endpoint: '/multi-parameter-planting-calendar',
|
|
52
|
+
method: 'POST',
|
|
53
|
+
body: { county_fips: '12086', crop_type: 'tomato' },
|
|
54
|
+
tierRequired: 'starter',
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
endpoint: '/live-agricultural-data',
|
|
58
|
+
method: 'POST',
|
|
59
|
+
body: {
|
|
60
|
+
county_fips: '12086',
|
|
61
|
+
data_types: ['weather', 'soil'],
|
|
62
|
+
state_code: 'FL',
|
|
63
|
+
county_name: 'Miami-Dade'
|
|
64
|
+
},
|
|
65
|
+
tierRequired: 'starter',
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
endpoint: '/environmental-impact-engine',
|
|
69
|
+
method: 'POST',
|
|
70
|
+
body: {
|
|
71
|
+
analysis_id: '00000000-0000-0000-0000-000000000000',
|
|
72
|
+
county_fips: '12086',
|
|
73
|
+
soil_data: { ph_level: 6.5, organic_matter: 3.2 }
|
|
74
|
+
},
|
|
75
|
+
tierRequired: 'starter',
|
|
76
|
+
},
|
|
77
|
+
// Pro tier endpoints
|
|
78
|
+
{
|
|
79
|
+
endpoint: '/alpha-earth-environmental-enhancement',
|
|
80
|
+
method: 'POST',
|
|
81
|
+
body: { latitude: 25.7617, longitude: -80.1918 },
|
|
82
|
+
tierRequired: 'pro',
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
endpoint: '/agricultural-intelligence',
|
|
86
|
+
method: 'POST',
|
|
87
|
+
body: { county_fips: '12086', analysis_type: 'crop_recommendation' },
|
|
88
|
+
tierRequired: 'pro',
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
endpoint: '/seasonal-planning-assistant',
|
|
92
|
+
method: 'POST',
|
|
93
|
+
body: {
|
|
94
|
+
location: { county_fips: '12086', state_code: 'FL' },
|
|
95
|
+
planningType: 'spring_planting'
|
|
96
|
+
},
|
|
97
|
+
tierRequired: 'pro',
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
endpoint: '/smart-report-summary',
|
|
101
|
+
method: 'POST',
|
|
102
|
+
body: {
|
|
103
|
+
reportType: 'soil',
|
|
104
|
+
reportData: { ph_level: 6.5, organic_matter: 3.2 }
|
|
105
|
+
},
|
|
106
|
+
tierRequired: 'pro',
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
endpoint: '/carbon-credit-calculator',
|
|
110
|
+
method: 'POST',
|
|
111
|
+
body: {
|
|
112
|
+
field_name: 'Test Field',
|
|
113
|
+
field_size_acres: 100
|
|
114
|
+
},
|
|
115
|
+
tierRequired: 'pro',
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
endpoint: '/leafengines-query',
|
|
119
|
+
method: 'POST',
|
|
120
|
+
body: {
|
|
121
|
+
location: { county_fips: '12086' },
|
|
122
|
+
plant: { common_name: 'Tomato' }
|
|
123
|
+
},
|
|
124
|
+
tierRequired: 'pro',
|
|
125
|
+
useXApiKey: true, // This endpoint uses x-api-key header
|
|
126
|
+
},
|
|
127
|
+
// Enterprise tier endpoints
|
|
128
|
+
{
|
|
129
|
+
endpoint: '/visual-crop-analysis',
|
|
130
|
+
method: 'POST',
|
|
131
|
+
body: {
|
|
132
|
+
image: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg==',
|
|
133
|
+
analysis_type: 'crop_health'
|
|
134
|
+
},
|
|
135
|
+
tierRequired: 'enterprise',
|
|
136
|
+
},
|
|
137
|
+
];
|
|
138
|
+
exports.ENDPOINT_TESTS = ENDPOINT_TESTS;
|
|
139
|
+
async function testEndpoint(apiKey, config) {
|
|
140
|
+
const startTime = Date.now();
|
|
141
|
+
try {
|
|
142
|
+
const headers = {
|
|
143
|
+
'Content-Type': 'application/json',
|
|
144
|
+
};
|
|
145
|
+
// Some endpoints use x-api-key, others use Authorization Bearer
|
|
146
|
+
if (config.useXApiKey) {
|
|
147
|
+
headers['x-api-key'] = apiKey;
|
|
148
|
+
}
|
|
149
|
+
else {
|
|
150
|
+
headers['Authorization'] = `Bearer ${apiKey}`;
|
|
151
|
+
}
|
|
152
|
+
const response = await fetch(`${BASE_URL}${config.endpoint}`, {
|
|
153
|
+
method: config.method,
|
|
154
|
+
headers,
|
|
155
|
+
body: JSON.stringify(config.body),
|
|
156
|
+
});
|
|
157
|
+
const responseTime = Date.now() - startTime;
|
|
158
|
+
// Extract rate limit headers
|
|
159
|
+
const rateLimitHeaders = {
|
|
160
|
+
limit: response.headers.get('X-RateLimit-Limit') || undefined,
|
|
161
|
+
remaining: response.headers.get('X-RateLimit-Remaining') || undefined,
|
|
162
|
+
reset: response.headers.get('X-RateLimit-Reset') || undefined,
|
|
163
|
+
};
|
|
164
|
+
// Determine test result
|
|
165
|
+
let status = 'fail';
|
|
166
|
+
let error;
|
|
167
|
+
if (response.ok) {
|
|
168
|
+
status = 'pass';
|
|
169
|
+
}
|
|
170
|
+
else if (response.status === 401) {
|
|
171
|
+
error = 'Authentication failed - check API key';
|
|
172
|
+
}
|
|
173
|
+
else if (response.status === 403) {
|
|
174
|
+
// Tier restriction is expected for higher tiers
|
|
175
|
+
status = 'skip';
|
|
176
|
+
error = `Tier restriction - requires ${config.tierRequired} tier`;
|
|
177
|
+
}
|
|
178
|
+
else if (response.status === 429) {
|
|
179
|
+
error = 'Rate limited';
|
|
180
|
+
}
|
|
181
|
+
else {
|
|
182
|
+
const errorBody = await response.text();
|
|
183
|
+
error = `HTTP ${response.status}: ${errorBody.substring(0, 200)}`;
|
|
184
|
+
}
|
|
185
|
+
return {
|
|
186
|
+
endpoint: config.endpoint,
|
|
187
|
+
status,
|
|
188
|
+
statusCode: response.status,
|
|
189
|
+
rateLimitHeaders,
|
|
190
|
+
responseTime,
|
|
191
|
+
error,
|
|
192
|
+
tierRequired: config.tierRequired,
|
|
193
|
+
};
|
|
194
|
+
}
|
|
195
|
+
catch (err) {
|
|
196
|
+
return {
|
|
197
|
+
endpoint: config.endpoint,
|
|
198
|
+
status: 'fail',
|
|
199
|
+
responseTime: Date.now() - startTime,
|
|
200
|
+
error: err instanceof Error ? err.message : 'Unknown error',
|
|
201
|
+
tierRequired: config.tierRequired,
|
|
202
|
+
};
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
async function testRateLimiting(apiKey) {
|
|
206
|
+
console.log('\n🔄 Testing Rate Limiting...');
|
|
207
|
+
const results = [];
|
|
208
|
+
// Make rapid requests to test rate limiting
|
|
209
|
+
const rapidRequests = 5;
|
|
210
|
+
for (let i = 0; i < rapidRequests; i++) {
|
|
211
|
+
const result = await testEndpoint(apiKey, ENDPOINT_TESTS[0]); // Use free tier endpoint
|
|
212
|
+
results.push({
|
|
213
|
+
...result,
|
|
214
|
+
endpoint: `/get-soil-data (request ${i + 1}/${rapidRequests})`,
|
|
215
|
+
});
|
|
216
|
+
// Log rate limit headers
|
|
217
|
+
if (result.rateLimitHeaders?.remaining) {
|
|
218
|
+
console.log(` Request ${i + 1}: Remaining: ${result.rateLimitHeaders.remaining}`);
|
|
219
|
+
}
|
|
220
|
+
// Small delay to avoid overwhelming
|
|
221
|
+
await new Promise(r => setTimeout(r, 100));
|
|
222
|
+
}
|
|
223
|
+
return results;
|
|
224
|
+
}
|
|
225
|
+
async function testAuthenticationFailure() {
|
|
226
|
+
console.log('\n🔐 Testing Authentication Failure...');
|
|
227
|
+
const startTime = Date.now();
|
|
228
|
+
const response = await fetch(`${BASE_URL}/get-soil-data`, {
|
|
229
|
+
method: 'POST',
|
|
230
|
+
headers: {
|
|
231
|
+
'Content-Type': 'application/json',
|
|
232
|
+
'Authorization': 'Bearer invalid_api_key_12345',
|
|
233
|
+
},
|
|
234
|
+
body: JSON.stringify({ county_fips: '12086' }),
|
|
235
|
+
});
|
|
236
|
+
const passed = response.status === 401;
|
|
237
|
+
return {
|
|
238
|
+
endpoint: '/get-soil-data (invalid key)',
|
|
239
|
+
status: passed ? 'pass' : 'fail',
|
|
240
|
+
statusCode: response.status,
|
|
241
|
+
responseTime: Date.now() - startTime,
|
|
242
|
+
error: passed ? undefined : `Expected 401, got ${response.status}`,
|
|
243
|
+
};
|
|
244
|
+
}
|
|
245
|
+
async function testMissingAuthentication() {
|
|
246
|
+
console.log('\n🔐 Testing Missing Authentication...');
|
|
247
|
+
const startTime = Date.now();
|
|
248
|
+
const response = await fetch(`${BASE_URL}/get-soil-data`, {
|
|
249
|
+
method: 'POST',
|
|
250
|
+
headers: {
|
|
251
|
+
'Content-Type': 'application/json',
|
|
252
|
+
},
|
|
253
|
+
body: JSON.stringify({ county_fips: '12086' }),
|
|
254
|
+
});
|
|
255
|
+
const passed = response.status === 401;
|
|
256
|
+
return {
|
|
257
|
+
endpoint: '/get-soil-data (no auth)',
|
|
258
|
+
status: passed ? 'pass' : 'fail',
|
|
259
|
+
statusCode: response.status,
|
|
260
|
+
responseTime: Date.now() - startTime,
|
|
261
|
+
error: passed ? undefined : `Expected 401, got ${response.status}`,
|
|
262
|
+
};
|
|
263
|
+
}
|
|
264
|
+
async function runTestSuite(apiKey) {
|
|
265
|
+
console.log('═'.repeat(60));
|
|
266
|
+
console.log('🧪 SoilSidekick Pro SDK Test Suite');
|
|
267
|
+
console.log('═'.repeat(60));
|
|
268
|
+
console.log(`\n📍 Base URL: ${BASE_URL}`);
|
|
269
|
+
console.log(`🔑 API Key: ${apiKey.substring(0, 12)}...${apiKey.slice(-4)}`);
|
|
270
|
+
const results = [];
|
|
271
|
+
// Test authentication failure scenarios
|
|
272
|
+
results.push(await testAuthenticationFailure());
|
|
273
|
+
results.push(await testMissingAuthentication());
|
|
274
|
+
// Test all endpoints
|
|
275
|
+
console.log('\n📋 Testing Endpoints by Tier...');
|
|
276
|
+
const tierGroups = {
|
|
277
|
+
free: ENDPOINT_TESTS.filter(t => t.tierRequired === 'free'),
|
|
278
|
+
starter: ENDPOINT_TESTS.filter(t => t.tierRequired === 'starter'),
|
|
279
|
+
pro: ENDPOINT_TESTS.filter(t => t.tierRequired === 'pro'),
|
|
280
|
+
enterprise: ENDPOINT_TESTS.filter(t => t.tierRequired === 'enterprise'),
|
|
281
|
+
};
|
|
282
|
+
for (const [tier, tests] of Object.entries(tierGroups)) {
|
|
283
|
+
console.log(`\n [${tier.toUpperCase()} TIER]`);
|
|
284
|
+
for (const test of tests) {
|
|
285
|
+
const result = await testEndpoint(apiKey, test);
|
|
286
|
+
results.push(result);
|
|
287
|
+
const statusIcon = result.status === 'pass' ? '✅' : result.status === 'skip' ? '⏭️' : '❌';
|
|
288
|
+
console.log(` ${statusIcon} ${test.endpoint} (${result.responseTime}ms)`);
|
|
289
|
+
if (result.error && result.status === 'fail') {
|
|
290
|
+
console.log(` └─ ${result.error}`);
|
|
291
|
+
}
|
|
292
|
+
// Small delay between requests
|
|
293
|
+
await new Promise(r => setTimeout(r, 200));
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
// Test rate limiting
|
|
297
|
+
const rateLimitResults = await testRateLimiting(apiKey);
|
|
298
|
+
results.push(...rateLimitResults);
|
|
299
|
+
// Calculate summary
|
|
300
|
+
const summary = {
|
|
301
|
+
passed: results.filter(r => r.status === 'pass').length,
|
|
302
|
+
failed: results.filter(r => r.status === 'fail').length,
|
|
303
|
+
skipped: results.filter(r => r.status === 'skip').length,
|
|
304
|
+
};
|
|
305
|
+
return {
|
|
306
|
+
name: 'SoilSidekick Pro SDK Tests',
|
|
307
|
+
results,
|
|
308
|
+
summary,
|
|
309
|
+
};
|
|
310
|
+
}
|
|
311
|
+
function printSummary(suite) {
|
|
312
|
+
console.log('\n' + '═'.repeat(60));
|
|
313
|
+
console.log('📊 Test Summary');
|
|
314
|
+
console.log('═'.repeat(60));
|
|
315
|
+
console.log(`\n ✅ Passed: ${suite.summary.passed}`);
|
|
316
|
+
console.log(` ❌ Failed: ${suite.summary.failed}`);
|
|
317
|
+
console.log(` ⏭️ Skipped: ${suite.summary.skipped}`);
|
|
318
|
+
console.log(` 📝 Total: ${suite.results.length}`);
|
|
319
|
+
// List failed tests
|
|
320
|
+
const failed = suite.results.filter(r => r.status === 'fail');
|
|
321
|
+
if (failed.length > 0) {
|
|
322
|
+
console.log('\n Failed Tests:');
|
|
323
|
+
for (const test of failed) {
|
|
324
|
+
console.log(` - ${test.endpoint}: ${test.error}`);
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
// Print rate limit info from last successful request
|
|
328
|
+
const lastWithRateLimit = suite.results
|
|
329
|
+
.filter(r => r.rateLimitHeaders?.limit)
|
|
330
|
+
.pop();
|
|
331
|
+
if (lastWithRateLimit?.rateLimitHeaders) {
|
|
332
|
+
console.log('\n Rate Limit Status:');
|
|
333
|
+
console.log(` Limit: ${lastWithRateLimit.rateLimitHeaders.limit}`);
|
|
334
|
+
console.log(` Remaining: ${lastWithRateLimit.rateLimitHeaders.remaining}`);
|
|
335
|
+
console.log(` Reset: ${lastWithRateLimit.rateLimitHeaders.reset}`);
|
|
336
|
+
}
|
|
337
|
+
console.log('\n' + '═'.repeat(60));
|
|
338
|
+
// Exit code based on failures
|
|
339
|
+
const exitCode = suite.summary.failed > 0 ? 1 : 0;
|
|
340
|
+
console.log(`\n${exitCode === 0 ? '✅ All tests passed!' : '❌ Some tests failed.'}\n`);
|
|
341
|
+
return exitCode;
|
|
342
|
+
}
|
|
343
|
+
// CLI entry point
|
|
344
|
+
async function main() {
|
|
345
|
+
const apiKey = process.argv[2] || process.env.SOILSIDEKICK_API_KEY;
|
|
346
|
+
if (!apiKey) {
|
|
347
|
+
console.error('❌ Error: API key required');
|
|
348
|
+
console.error('\nUsage:');
|
|
349
|
+
console.error(' npx ts-node sdks/test-sdk.ts <API_KEY>');
|
|
350
|
+
console.error(' SOILSIDEKICK_API_KEY=xxx npx ts-node sdks/test-sdk.ts');
|
|
351
|
+
process.exit(1);
|
|
352
|
+
}
|
|
353
|
+
try {
|
|
354
|
+
const suite = await runTestSuite(apiKey);
|
|
355
|
+
const exitCode = printSummary(suite);
|
|
356
|
+
process.exit(exitCode);
|
|
357
|
+
}
|
|
358
|
+
catch (error) {
|
|
359
|
+
console.error('❌ Test suite failed:', error);
|
|
360
|
+
process.exit(1);
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
// Run if executed directly
|
|
364
|
+
if (typeof require !== 'undefined' && require.main === module) {
|
|
365
|
+
main();
|
|
366
|
+
}
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* LeafEngines SDK v2.0 - Sensor Types
|
|
3
|
+
*
|
|
4
|
+
* Core type definitions for Skyline Instruments sensor integration
|
|
5
|
+
*/
|
|
6
|
+
export type DeviceType = 'mmwave_radar' | 'quantum_rf' | 'precision_timing';
|
|
7
|
+
export type DeviceStatus = 'active' | 'inactive' | 'error' | 'maintenance';
|
|
8
|
+
export interface SensorDevice {
|
|
9
|
+
id: string;
|
|
10
|
+
deviceId: string;
|
|
11
|
+
deviceType: DeviceType;
|
|
12
|
+
farmId?: string;
|
|
13
|
+
firmwareVersion: string;
|
|
14
|
+
status: DeviceStatus;
|
|
15
|
+
batteryLevel?: number;
|
|
16
|
+
signalStrength?: number;
|
|
17
|
+
lastSeenAt: Date;
|
|
18
|
+
createdAt: Date;
|
|
19
|
+
updatedAt: Date;
|
|
20
|
+
}
|
|
21
|
+
export interface RegisterDeviceParams {
|
|
22
|
+
deviceId: string;
|
|
23
|
+
deviceType: DeviceType;
|
|
24
|
+
farmId?: string;
|
|
25
|
+
firmwareVersion: string;
|
|
26
|
+
}
|
|
27
|
+
export interface UpdateDeviceParams {
|
|
28
|
+
farmId?: string;
|
|
29
|
+
firmwareVersion?: string;
|
|
30
|
+
status?: DeviceStatus;
|
|
31
|
+
}
|
|
32
|
+
export interface SensorReading {
|
|
33
|
+
id: string;
|
|
34
|
+
deviceId: string;
|
|
35
|
+
timestamp: Date;
|
|
36
|
+
metric: string;
|
|
37
|
+
value: number;
|
|
38
|
+
unit: string;
|
|
39
|
+
confidence?: number;
|
|
40
|
+
receivedAt: Date;
|
|
41
|
+
}
|
|
42
|
+
export interface SensorReadingData {
|
|
43
|
+
metric: string;
|
|
44
|
+
value: number;
|
|
45
|
+
unit: string;
|
|
46
|
+
confidence?: number;
|
|
47
|
+
timestamp: Date;
|
|
48
|
+
}
|
|
49
|
+
export interface SensorReadingPayload {
|
|
50
|
+
deviceId: string;
|
|
51
|
+
deviceType: DeviceType;
|
|
52
|
+
timestamp: Date;
|
|
53
|
+
readings: SensorReadingData[];
|
|
54
|
+
metadata: {
|
|
55
|
+
firmwareVersion: string;
|
|
56
|
+
batteryLevel?: number;
|
|
57
|
+
signalStrength?: number;
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
export interface IngestionResponse {
|
|
61
|
+
ingestionId: string;
|
|
62
|
+
queuedAt: Date;
|
|
63
|
+
processedReadings: number;
|
|
64
|
+
estimatedProcessingMs: number;
|
|
65
|
+
status: 'success' | 'partial' | 'failed';
|
|
66
|
+
}
|
|
67
|
+
export interface ReadingsQueryParams {
|
|
68
|
+
deviceId?: string;
|
|
69
|
+
metric?: string;
|
|
70
|
+
startTime: Date;
|
|
71
|
+
endTime: Date;
|
|
72
|
+
limit?: number;
|
|
73
|
+
offset?: number;
|
|
74
|
+
order?: 'asc' | 'desc';
|
|
75
|
+
}
|
|
76
|
+
export interface ReadingsAggregation {
|
|
77
|
+
deviceId: string;
|
|
78
|
+
metric: string;
|
|
79
|
+
startTime: Date;
|
|
80
|
+
endTime: Date;
|
|
81
|
+
count: number;
|
|
82
|
+
avg?: number;
|
|
83
|
+
min?: number;
|
|
84
|
+
max?: number;
|
|
85
|
+
sum?: number;
|
|
86
|
+
interval: string;
|
|
87
|
+
}
|
|
88
|
+
export type AlertSeverity = 'info' | 'warning' | 'critical';
|
|
89
|
+
export type AlertType = 'heat_stress' | 'equipment_malfunction' | 'battery_low' | 'signal_lost' | 'anomaly_detected' | 'threshold_exceeded' | 'environmental_hazard';
|
|
90
|
+
export interface SensorAlert {
|
|
91
|
+
id: string;
|
|
92
|
+
deviceId: string;
|
|
93
|
+
alertType: AlertType;
|
|
94
|
+
severity: AlertSeverity;
|
|
95
|
+
message: string;
|
|
96
|
+
details?: Record<string, any>;
|
|
97
|
+
acknowledged: boolean;
|
|
98
|
+
acknowledgedBy?: string;
|
|
99
|
+
acknowledgedAt?: Date;
|
|
100
|
+
timestamp: Date;
|
|
101
|
+
createdAt: Date;
|
|
102
|
+
}
|
|
103
|
+
export interface AlertsQueryParams {
|
|
104
|
+
deviceId?: string;
|
|
105
|
+
alertType?: AlertType;
|
|
106
|
+
severity?: AlertSeverity;
|
|
107
|
+
acknowledged?: boolean;
|
|
108
|
+
startTime?: Date;
|
|
109
|
+
endTime?: Date;
|
|
110
|
+
limit?: number;
|
|
111
|
+
}
|
|
112
|
+
export interface AlertSubscription {
|
|
113
|
+
severity?: AlertSeverity[];
|
|
114
|
+
deviceId?: string;
|
|
115
|
+
alertType?: AlertType;
|
|
116
|
+
}
|
|
117
|
+
export interface MQTTConfig {
|
|
118
|
+
host: string;
|
|
119
|
+
port: number;
|
|
120
|
+
protocol: 'mqtts' | 'wss';
|
|
121
|
+
username: string;
|
|
122
|
+
password: string;
|
|
123
|
+
reconnectPeriod?: number;
|
|
124
|
+
connectTimeout?: number;
|
|
125
|
+
}
|
|
126
|
+
export interface MQTTPublishOptions {
|
|
127
|
+
qos?: 0 | 1 | 2;
|
|
128
|
+
retain?: boolean;
|
|
129
|
+
}
|
|
130
|
+
export type ConnectionStatus = 'connecting' | 'connected' | 'disconnected' | 'error';
|
|
131
|
+
export interface APIResponse<T> {
|
|
132
|
+
data: T;
|
|
133
|
+
meta?: {
|
|
134
|
+
total?: number;
|
|
135
|
+
limit?: number;
|
|
136
|
+
offset?: number;
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
export interface APIError {
|
|
140
|
+
code: string;
|
|
141
|
+
message: string;
|
|
142
|
+
details?: Record<string, any>;
|
|
143
|
+
}
|
|
144
|
+
export interface Subscription {
|
|
145
|
+
unsubscribe(): void;
|
|
146
|
+
isActive(): boolean;
|
|
147
|
+
}
|
|
148
|
+
export type MessageHandler<T> = (message: T) => void;
|
|
149
|
+
export interface ClientConfig {
|
|
150
|
+
apiKey: string;
|
|
151
|
+
projectRef: string;
|
|
152
|
+
baseUrl?: string;
|
|
153
|
+
environment?: 'production' | 'sandbox';
|
|
154
|
+
timeout?: number;
|
|
155
|
+
}
|
|
156
|
+
export interface RequestOptions {
|
|
157
|
+
method: 'GET' | 'POST' | 'PATCH' | 'DELETE';
|
|
158
|
+
endpoint: string;
|
|
159
|
+
body?: any;
|
|
160
|
+
params?: Record<string, any>;
|
|
161
|
+
headers?: Record<string, string>;
|
|
162
|
+
}
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
# SoilSidekick Pro SDK Generator
|
|
4
|
+
# Usage: ./generate-sdk.sh [language] [version]
|
|
5
|
+
# Languages: typescript, python, go, ruby, java, php, all
|
|
6
|
+
|
|
7
|
+
set -e
|
|
8
|
+
|
|
9
|
+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
10
|
+
SPEC_FILE="$SCRIPT_DIR/../openapi-spec.yaml"
|
|
11
|
+
OUTPUT_DIR="$SCRIPT_DIR/generated"
|
|
12
|
+
VERSION="${2:-1.2.0}"
|
|
13
|
+
LANGUAGE="${1:-all}"
|
|
14
|
+
|
|
15
|
+
# Colors for output
|
|
16
|
+
RED='\033[0;31m'
|
|
17
|
+
GREEN='\033[0;32m'
|
|
18
|
+
YELLOW='\033[1;33m'
|
|
19
|
+
NC='\033[0m' # No Color
|
|
20
|
+
|
|
21
|
+
echo "═══════════════════════════════════════════════════════════"
|
|
22
|
+
echo " SoilSidekick Pro SDK Generator v${VERSION}"
|
|
23
|
+
echo "═══════════════════════════════════════════════════════════"
|
|
24
|
+
|
|
25
|
+
# Check for openapi-generator-cli
|
|
26
|
+
if ! command -v openapi-generator-cli &> /dev/null; then
|
|
27
|
+
echo -e "${YELLOW}Installing openapi-generator-cli...${NC}"
|
|
28
|
+
npm install -g @openapitools/openapi-generator-cli
|
|
29
|
+
fi
|
|
30
|
+
|
|
31
|
+
# Validate spec first
|
|
32
|
+
echo -e "\n${YELLOW}Validating OpenAPI specification...${NC}"
|
|
33
|
+
openapi-generator-cli validate -i "$SPEC_FILE"
|
|
34
|
+
echo -e "${GREEN}✓ Specification is valid${NC}"
|
|
35
|
+
|
|
36
|
+
# Create output directories
|
|
37
|
+
mkdir -p "$OUTPUT_DIR"
|
|
38
|
+
|
|
39
|
+
generate_typescript() {
|
|
40
|
+
echo -e "\n${YELLOW}Generating TypeScript SDK...${NC}"
|
|
41
|
+
openapi-generator-cli generate \
|
|
42
|
+
-i "$SPEC_FILE" \
|
|
43
|
+
-g typescript-fetch \
|
|
44
|
+
-o "$OUTPUT_DIR/typescript" \
|
|
45
|
+
--additional-properties=npmName=@soilsidekick/sdk,npmVersion=$VERSION,supportsES6=true,typescriptThreePlus=true \
|
|
46
|
+
--skip-validate-spec
|
|
47
|
+
|
|
48
|
+
# Create tsconfig for the generated SDK
|
|
49
|
+
cat > "$OUTPUT_DIR/typescript/tsconfig.json" << 'EOF'
|
|
50
|
+
{
|
|
51
|
+
"compilerOptions": {
|
|
52
|
+
"target": "ES2020",
|
|
53
|
+
"module": "ESNext",
|
|
54
|
+
"moduleResolution": "node",
|
|
55
|
+
"declaration": true,
|
|
56
|
+
"declarationMap": true,
|
|
57
|
+
"sourceMap": true,
|
|
58
|
+
"outDir": "./dist",
|
|
59
|
+
"strict": true,
|
|
60
|
+
"esModuleInterop": true,
|
|
61
|
+
"skipLibCheck": true
|
|
62
|
+
},
|
|
63
|
+
"include": ["src/**/*"],
|
|
64
|
+
"exclude": ["node_modules", "dist"]
|
|
65
|
+
}
|
|
66
|
+
EOF
|
|
67
|
+
echo -e "${GREEN}✓ TypeScript SDK generated at $OUTPUT_DIR/typescript${NC}"
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
generate_python() {
|
|
71
|
+
echo -e "\n${YELLOW}Generating Python SDK...${NC}"
|
|
72
|
+
openapi-generator-cli generate \
|
|
73
|
+
-i "$SPEC_FILE" \
|
|
74
|
+
-g python \
|
|
75
|
+
-o "$OUTPUT_DIR/python" \
|
|
76
|
+
--additional-properties=packageName=soilsidekick,packageVersion=$VERSION,projectName=soilsidekick-sdk \
|
|
77
|
+
--skip-validate-spec
|
|
78
|
+
echo -e "${GREEN}✓ Python SDK generated at $OUTPUT_DIR/python${NC}"
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
generate_go() {
|
|
82
|
+
echo -e "\n${YELLOW}Generating Go SDK...${NC}"
|
|
83
|
+
openapi-generator-cli generate \
|
|
84
|
+
-i "$SPEC_FILE" \
|
|
85
|
+
-g go \
|
|
86
|
+
-o "$OUTPUT_DIR/go" \
|
|
87
|
+
--additional-properties=packageName=soilsidekick,packageVersion=$VERSION,isGoSubmodule=true \
|
|
88
|
+
--skip-validate-spec
|
|
89
|
+
echo -e "${GREEN}✓ Go SDK generated at $OUTPUT_DIR/go${NC}"
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
generate_ruby() {
|
|
93
|
+
echo -e "\n${YELLOW}Generating Ruby SDK...${NC}"
|
|
94
|
+
openapi-generator-cli generate \
|
|
95
|
+
-i "$SPEC_FILE" \
|
|
96
|
+
-g ruby \
|
|
97
|
+
-o "$OUTPUT_DIR/ruby" \
|
|
98
|
+
--additional-properties=gemName=soilsidekick,gemVersion=$VERSION,moduleName=SoilSidekick \
|
|
99
|
+
--skip-validate-spec
|
|
100
|
+
echo -e "${GREEN}✓ Ruby SDK generated at $OUTPUT_DIR/ruby${NC}"
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
generate_java() {
|
|
104
|
+
echo -e "\n${YELLOW}Generating Java SDK...${NC}"
|
|
105
|
+
openapi-generator-cli generate \
|
|
106
|
+
-i "$SPEC_FILE" \
|
|
107
|
+
-g java \
|
|
108
|
+
-o "$OUTPUT_DIR/java" \
|
|
109
|
+
--additional-properties=artifactId=soilsidekick-sdk,groupId=com.soilsidekick,artifactVersion=$VERSION,library=native \
|
|
110
|
+
--skip-validate-spec
|
|
111
|
+
echo -e "${GREEN}✓ Java SDK generated at $OUTPUT_DIR/java${NC}"
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
generate_php() {
|
|
115
|
+
echo -e "\n${YELLOW}Generating PHP SDK...${NC}"
|
|
116
|
+
openapi-generator-cli generate \
|
|
117
|
+
-i "$SPEC_FILE" \
|
|
118
|
+
-g php \
|
|
119
|
+
-o "$OUTPUT_DIR/php" \
|
|
120
|
+
--additional-properties=packageName=SoilSidekick,invokerPackage=SoilSidekick,artifactVersion=$VERSION \
|
|
121
|
+
--skip-validate-spec
|
|
122
|
+
echo -e "${GREEN}✓ PHP SDK generated at $OUTPUT_DIR/php${NC}"
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
# Generate based on language argument
|
|
126
|
+
case $LANGUAGE in
|
|
127
|
+
typescript|ts)
|
|
128
|
+
generate_typescript
|
|
129
|
+
;;
|
|
130
|
+
python|py)
|
|
131
|
+
generate_python
|
|
132
|
+
;;
|
|
133
|
+
go)
|
|
134
|
+
generate_go
|
|
135
|
+
;;
|
|
136
|
+
ruby|rb)
|
|
137
|
+
generate_ruby
|
|
138
|
+
;;
|
|
139
|
+
java)
|
|
140
|
+
generate_java
|
|
141
|
+
;;
|
|
142
|
+
php)
|
|
143
|
+
generate_php
|
|
144
|
+
;;
|
|
145
|
+
all)
|
|
146
|
+
generate_typescript
|
|
147
|
+
generate_python
|
|
148
|
+
generate_go
|
|
149
|
+
generate_ruby
|
|
150
|
+
generate_java
|
|
151
|
+
generate_php
|
|
152
|
+
;;
|
|
153
|
+
*)
|
|
154
|
+
echo -e "${RED}Unknown language: $LANGUAGE${NC}"
|
|
155
|
+
echo "Supported: typescript, python, go, ruby, java, php, all"
|
|
156
|
+
exit 1
|
|
157
|
+
;;
|
|
158
|
+
esac
|
|
159
|
+
|
|
160
|
+
echo -e "\n═══════════════════════════════════════════════════════════"
|
|
161
|
+
echo -e "${GREEN}SDK generation complete!${NC}"
|
|
162
|
+
echo "═══════════════════════════════════════════════════════════"
|
|
163
|
+
echo ""
|
|
164
|
+
echo "Generated SDKs are in: $OUTPUT_DIR"
|
|
165
|
+
echo ""
|
|
166
|
+
echo "Next steps:"
|
|
167
|
+
echo " 1. cd $OUTPUT_DIR/<language>"
|
|
168
|
+
echo " 2. Follow the README.md for installation"
|
|
169
|
+
echo " 3. Run tests: npm run test (from sdks directory)"
|