Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 7 additions & 11 deletions sdk/orbital/arm-orbital/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
# Release History

## 1.0.0-beta.2 (2021-12-27)

The package of @azure/arm-orbital is using our next generation design principles since version 1.0.0-beta.2, which contains breaking changes.

## 1.0.0-beta.2 (Unreleased)
To understand the detail of the change, please refer to [Changelog](https://aka.ms/js-track2-changelog).

### Features Added
To migrate the existing applications to the latest version, please refer to [Migration Guide](https://aka.ms/js-track2-migration-guide).

### Breaking Changes

### Bugs Fixed

### Other Changes

## 1.0.0-beta.1 (2021-11-22)

- Initial Release
To learn more, please refer to our documentation [Quick Start](https://aka.ms/js-track2-quickstart).
6 changes: 3 additions & 3 deletions sdk/orbital/arm-orbital/_meta.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"commit": "e827b527ff33475b4b561d445f06bf4b184e3efe",
"commit": "c77c6c634dc3644d65d3e35df5d73a9c34d3c956",
"readme": "specification/orbital/resource-manager/readme.md",
"autorest_command": "autorest --version=3.1.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\mydev\\azure-sdk-for-js ../azure-rest-api-specs/specification/orbital/resource-manager/readme.md --use=@autorest/typescript@6.0.0-alpha.15.20211116.1",
"autorest_command": "autorest --version=3.1.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\mydev\\azure-sdk-for-js ../azure-rest-api-specs/specification/orbital/resource-manager/readme.md --use=@autorest/typescript@6.0.0-alpha.16.20211217.1",
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
"use": "@autorest/typescript@6.0.0-alpha.15.20211116.1"
"use": "@autorest/typescript@6.0.0-alpha.16.20211217.1"
}
16 changes: 3 additions & 13 deletions sdk/orbital/arm-orbital/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@
"author": "Microsoft Corporation",
"description": "A generated SDK for AzureOrbital.",
"version": "1.0.0-beta.2",
"engines": {
"node": ">=12.0.0"
},
"engines": { "node": ">=12.0.0" },
"dependencies": {
"@azure/core-lro": "^2.2.0",
"@azure/abort-controller": "^1.0.0",
Expand All @@ -16,13 +14,7 @@
"@azure/core-rest-pipeline": "^1.1.0",
"tslib": "^2.2.0"
},
"keywords": [
"node",
"azure",
"typescript",
"browser",
"isomorphic"
],
"keywords": ["node", "azure", "typescript", "browser", "isomorphic"],
"license": "MIT",
"main": "./dist/index.js",
"module": "./dist-esm/src/index.js",
Expand All @@ -49,9 +41,7 @@
"type": "git",
"url": "https://github.com/Azure/azure-sdk-for-js.git"
},
"bugs": {
"url": "https://github.com/Azure/azure-sdk-for-js/issues"
},
"bugs": { "url": "https://github.com/Azure/azure-sdk-for-js/issues" },
"files": [
"dist/**/*.js",
"dist/**/*.js.map",
Expand Down
17 changes: 7 additions & 10 deletions sdk/orbital/arm-orbital/review/arm-orbital.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,13 @@ export interface AvailableGroundStationsListByCapabilityOptionalParams extends c
export type AvailableGroundStationsListByCapabilityResponse = AvailableGroundStationListResult;

// @public (undocumented)
export class AzureOrbital extends AzureOrbitalContext {
export class AzureOrbital extends coreClient.ServiceClient {
// (undocumented)
$host: string;
constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: AzureOrbitalOptionalParams);
// (undocumented)
apiVersion: string;
// (undocumented)
availableGroundStations: AvailableGroundStations;
// (undocumented)
contactProfiles: ContactProfiles;
Expand All @@ -99,15 +103,6 @@ export class AzureOrbital extends AzureOrbitalContext {
operations: Operations;
// (undocumented)
spacecrafts: Spacecrafts;
}

// @public (undocumented)
export class AzureOrbitalContext extends coreClient.ServiceClient {
// (undocumented)
$host: string;
constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: AzureOrbitalOptionalParams);
// (undocumented)
apiVersion: string;
// (undocumented)
subscriptionId: string;
}
Expand Down Expand Up @@ -175,6 +170,7 @@ export type ContactProfile = TrackedResource & {
minimumViableContactDuration?: string;
minimumElevationDegrees?: number;
autoTrackingConfiguration?: AutoTrackingConfiguration;
eventHubUri?: string;
links?: ContactProfileLink[];
};

Expand Down Expand Up @@ -219,6 +215,7 @@ export interface ContactProfiles {
// @public
export interface ContactProfilesCreateOrUpdateOptionalParams extends coreClient.OperationOptions {
autoTrackingConfiguration?: AutoTrackingConfiguration;
eventHubUri?: string;
links?: ContactProfileLink[];
minimumElevationDegrees?: number;
minimumViableContactDuration?: string;
Expand Down
49 changes: 46 additions & 3 deletions sdk/orbital/arm-orbital/src/azureOrbital.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/

import * as coreClient from "@azure/core-client";
import * as coreAuth from "@azure/core-auth";
import {
OperationsImpl,
Expand All @@ -21,10 +22,13 @@ import {
ContactProfiles,
AvailableGroundStations
} from "./operationsInterfaces";
import { AzureOrbitalContext } from "./azureOrbitalContext";
import { AzureOrbitalOptionalParams } from "./models";

export class AzureOrbital extends AzureOrbitalContext {
export class AzureOrbital extends coreClient.ServiceClient {
$host: string;
apiVersion: string;
subscriptionId: string;

/**
* Initializes a new instance of the AzureOrbital class.
* @param credentials Subscription credentials which uniquely identify client subscription.
Expand All @@ -36,7 +40,46 @@ export class AzureOrbital extends AzureOrbitalContext {
subscriptionId: string,
options?: AzureOrbitalOptionalParams
) {
super(credentials, subscriptionId, options);
if (credentials === undefined) {
throw new Error("'credentials' cannot be null");
}
if (subscriptionId === undefined) {
throw new Error("'subscriptionId' cannot be null");
}

// Initializing default values for options
if (!options) {
options = {};
}
const defaults: AzureOrbitalOptionalParams = {
requestContentType: "application/json; charset=utf-8",
credential: credentials
};

const packageDetails = `azsdk-js-arm-orbital/1.0.0-beta.2`;
const userAgentPrefix =
options.userAgentOptions && options.userAgentOptions.userAgentPrefix
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
: `${packageDetails}`;

if (!options.credentialScopes) {
options.credentialScopes = ["https://management.azure.com/.default"];
}
const optionsWithDefaults = {
...defaults,
...options,
userAgentOptions: {
userAgentPrefix
},
baseUri: options.endpoint || "https://management.azure.com"
};
super(optionsWithDefaults);
// Parameter assignments
this.subscriptionId = subscriptionId;

// Assigning values to Constant parameters
this.$host = options.$host || "https://management.azure.com";
this.apiVersion = options.apiVersion || "2021-04-04-preview";
this.operations = new OperationsImpl(this);
this.spacecrafts = new SpacecraftsImpl(this);
this.contacts = new ContactsImpl(this);
Expand Down
70 changes: 0 additions & 70 deletions sdk/orbital/arm-orbital/src/azureOrbitalContext.ts

This file was deleted.

1 change: 0 additions & 1 deletion sdk/orbital/arm-orbital/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,4 @@
/// <reference lib="esnext.asynciterable" />
export * from "./models";
export { AzureOrbital } from "./azureOrbital";
export { AzureOrbitalContext } from "./azureOrbitalContext";
export * from "./operationsInterfaces";
4 changes: 4 additions & 0 deletions sdk/orbital/arm-orbital/src/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,8 @@ export type ContactProfile = TrackedResource & {
minimumElevationDegrees?: number;
/** Auto track configuration. */
autoTrackingConfiguration?: AutoTrackingConfiguration;
/** The URI of the Event Hub used for telemetry */
eventHubUri?: string;
/** Links of the Contact Profile */
links?: ContactProfileLink[];
};
Expand Down Expand Up @@ -779,6 +781,8 @@ export interface ContactProfilesCreateOrUpdateOptionalParams
minimumElevationDegrees?: number;
/** Auto track configuration. */
autoTrackingConfiguration?: AutoTrackingConfiguration;
/** The URI of the Event Hub used for telemetry */
eventHubUri?: string;
/** Links of the Contact Profile */
links?: ContactProfileLink[];
/** Delay to wait until next poll, in milliseconds. */
Expand Down
6 changes: 6 additions & 0 deletions sdk/orbital/arm-orbital/src/models/mappers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -968,6 +968,12 @@ export const ContactProfile: coreClient.CompositeMapper = {
allowedValues: ["disabled", "xBand", "sBand"]
}
},
eventHubUri: {
serializedName: "properties.eventHubUri",
type: {
name: "String"
}
},
links: {
serializedName: "properties.links",
type: {
Expand Down
5 changes: 5 additions & 0 deletions sdk/orbital/arm-orbital/src/models/parameters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,11 @@ export const autoTrackingConfiguration: OperationParameter = {
mapper: ContactProfileMapper
};

export const eventHubUri: OperationParameter = {
parameterPath: ["options", "eventHubUri"],
mapper: ContactProfileMapper
};

export const links1: OperationParameter = {
parameterPath: ["options", "links"],
mapper: ContactProfileMapper
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { AvailableGroundStations } from "../operationsInterfaces";
import * as coreClient from "@azure/core-client";
import * as Mappers from "../models/mappers";
import * as Parameters from "../models/parameters";
import { AzureOrbitalContext } from "../azureOrbitalContext";
import { AzureOrbital } from "../azureOrbital";
import {
AvailableGroundStation,
Enum6,
Expand All @@ -26,13 +26,13 @@ import {
/// <reference lib="esnext.asynciterable" />
/** Class containing AvailableGroundStations operations. */
export class AvailableGroundStationsImpl implements AvailableGroundStations {
private readonly client: AzureOrbitalContext;
private readonly client: AzureOrbital;

/**
* Initialize a new instance of the class AvailableGroundStations class.
* @param client Reference to the service client
*/
constructor(client: AzureOrbitalContext) {
constructor(client: AzureOrbital) {
this.client = client;
}

Expand Down
7 changes: 4 additions & 3 deletions sdk/orbital/arm-orbital/src/operations/contactProfiles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { ContactProfiles } from "../operationsInterfaces";
import * as coreClient from "@azure/core-client";
import * as Mappers from "../models/mappers";
import * as Parameters from "../models/parameters";
import { AzureOrbitalContext } from "../azureOrbitalContext";
import { AzureOrbital } from "../azureOrbital";
import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro";
import { LroImpl } from "../lroImpl";
import {
Expand All @@ -33,13 +33,13 @@ import {
/// <reference lib="esnext.asynciterable" />
/** Class containing ContactProfiles operations. */
export class ContactProfilesImpl implements ContactProfiles {
private readonly client: AzureOrbitalContext;
private readonly client: AzureOrbital;

/**
* Initialize a new instance of the class ContactProfiles class.
* @param client Reference to the service client
*/
constructor(client: AzureOrbitalContext) {
constructor(client: AzureOrbital) {
this.client = client;
}

Expand Down Expand Up @@ -408,6 +408,7 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = {
minimumViableContactDuration: ["options", "minimumViableContactDuration"],
minimumElevationDegrees: ["options", "minimumElevationDegrees"],
autoTrackingConfiguration: ["options", "autoTrackingConfiguration"],
eventHubUri: ["options", "eventHubUri"],
links: ["options", "links"]
},
mapper: { ...Mappers.ContactProfile, required: true }
Expand Down
6 changes: 3 additions & 3 deletions sdk/orbital/arm-orbital/src/operations/contacts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { Contacts } from "../operationsInterfaces";
import * as coreClient from "@azure/core-client";
import * as Mappers from "../models/mappers";
import * as Parameters from "../models/parameters";
import { AzureOrbitalContext } from "../azureOrbitalContext";
import { AzureOrbital } from "../azureOrbital";
import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro";
import { LroImpl } from "../lroImpl";
import {
Expand All @@ -28,13 +28,13 @@ import {
/// <reference lib="esnext.asynciterable" />
/** Class containing Contacts operations. */
export class ContactsImpl implements Contacts {
private readonly client: AzureOrbitalContext;
private readonly client: AzureOrbital;

/**
* Initialize a new instance of the class Contacts class.
* @param client Reference to the service client
*/
constructor(client: AzureOrbitalContext) {
constructor(client: AzureOrbital) {
this.client = client;
}

Expand Down
Loading