0.0.20241030 • Published 8 months ago

@maxim_mazurok/gapi.client.sasportal-v1alpha1 v0.0.20241030

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

TypeScript typings for SAS Portal API v1alpha1

For detailed description please check documentation.

Installing

Install typings for SAS Portal API:

npm install @types/gapi.client.sasportal-v1alpha1 --save-dev

Usage

You need to initialize Google API client in your code:

gapi.load('client', () => {
  // now we can use gapi.client
  // ...
});

Then load api client wrapper:

gapi.client.load(
  'https://sasportal.googleapis.com/$discovery/rest?version=v1alpha1',
  () => {
    // now we can use:
    // gapi.client.sasportal
  }
);
// Deprecated, use discovery document URL, see https://github.com/google/google-api-javascript-client/blob/master/docs/reference.md#----gapiclientloadname----version----callback--
gapi.client.load('sasportal', 'v1alpha1', () => {
  // now we can use:
  // gapi.client.sasportal
});

Don't forget to authenticate your client before sending any request to resources:

// declare client_id registered in Google Developers Console
var client_id = '',
  scope = [
    // See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account.
    'https://www.googleapis.com/auth/cloud-platform',

    // Read, create, update, and delete your SAS Portal data.
    'https://www.googleapis.com/auth/sasportal',
  ],
  immediate = true;
// ...

gapi.auth.authorize(
  {client_id: client_id, scope: scope, immediate: immediate},
  authResult => {
    if (authResult && !authResult.error) {
      /* handle successful authorization */
    } else {
      /* handle authorization error */
    }
  }
);

After that you can use SAS Portal API resources:

/*
Returns a requested customer.
*/
await gapi.client.sasportal.customers.get({name: 'name'});

/*
Returns a list of requested customers.
*/
await gapi.client.sasportal.customers.list({});

/*
Returns a list of SAS deployments associated with current GCP project. Includes whether SAS analytics has been enabled or not.
*/
await gapi.client.sasportal.customers.listGcpProjectDeployments({});

/*
Returns a list of legacy organizations.
*/
await gapi.client.sasportal.customers.listLegacyOrganizations({});

/*
Migrates a SAS organization to the cloud. This will create GCP projects for each deployment and associate them. The SAS Organization is linked to the gcp project that called the command. go/sas-legacy-customer-migration
*/
await gapi.client.sasportal.customers.migrateOrganization({});

/*
Updates an existing customer.
*/
await gapi.client.sasportal.customers.patch({name: 'name'});

/*
Creates a new SAS deployment through the GCP workflow. Creates a SAS organization if an organization match is not found.
*/
await gapi.client.sasportal.customers.provisionDeployment({});

/*
Setups the a GCP Project to receive SAS Analytics messages via GCP Pub/Sub with a subscription to BigQuery. All the Pub/Sub topics and BigQuery tables are created automatically as part of this service.
*/
await gapi.client.sasportal.customers.setupSasAnalytics({});

/*
Returns a requested deployment.
*/
await gapi.client.sasportal.deployments.get({name: 'name'});

/*
Generates a secret to be used with the ValidateInstaller.
*/
await gapi.client.sasportal.installer.generateSecret({});

/*
Validates the identity of a Certified Professional Installer (CPI).
*/
await gapi.client.sasportal.installer.validate({});

/*
Returns a requested node.
*/
await gapi.client.sasportal.nodes.get({name: 'name'});

/*
Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.
*/
await gapi.client.sasportal.policies.get({});

/*
Sets the access control policy on the specified resource. Replaces any existing policy.
*/
await gapi.client.sasportal.policies.set({});

/*
Returns permissions that a caller has on the specified resource.
*/
await gapi.client.sasportal.policies.test({});
0.0.20241030

8 months ago

0.0.20241024

9 months ago

0.0.20241023

9 months ago

0.0.20241029

9 months ago

0.0.20241028

9 months ago

0.0.20241027

9 months ago

0.0.20241022

9 months ago

0.0.20241021

9 months ago

0.0.20241020

9 months ago

0.0.20241017

9 months ago

0.0.20241016

9 months ago

0.0.20241015

9 months ago

0.0.20241014

9 months ago

0.0.20241013

9 months ago

0.0.20240926

10 months ago

0.0.20240923

10 months ago

0.0.20240924

10 months ago

0.0.20240930

10 months ago

0.0.20241002

9 months ago

0.0.20241001

9 months ago

0.0.20241008

9 months ago

0.0.20241007

9 months ago

0.0.20241006

9 months ago

0.0.20241009

9 months ago

0.0.20240908

10 months ago

0.0.20240905

10 months ago

0.0.20240918

10 months ago

0.0.20240917

10 months ago

0.0.20240922

10 months ago

0.0.20240920

10 months ago

0.0.20240904

10 months ago

0.0.20240606

1 year ago

0.0.20240723

12 months ago

0.0.20240603

1 year ago

0.0.20240604

1 year ago

0.0.20240722

12 months ago

0.0.20240615

1 year ago

0.0.20240610

1 year ago

0.0.20240627

1 year ago

0.0.20240520

1 year ago

0.0.20240805

11 months ago

0.0.20240806

11 months ago

0.0.20240801

11 months ago

0.0.20240521

1 year ago

0.0.20240701

1 year ago

0.0.20240715

12 months ago

0.0.20240513

1 year ago

0.0.20240512

1 year ago

0.0.20240509

1 year ago

0.0.20240429

1 year ago

0.0.20240424

1 year ago

0.0.20240422

1 year ago

0.0.20240418

1 year ago

0.0.20240409

1 year ago

0.0.20240401

1 year ago

0.0.20240331

1 year ago

0.0.20240325

1 year ago

0.0.20240318

1 year ago

0.0.20240303

1 year ago

0.0.20240226

1 year ago

0.0.20240222

1 year ago

0.0.20240220

1 year ago

0.0.20240221

1 year ago

0.0.20240218

1 year ago

0.0.20240215

1 year ago

0.0.20240209

1 year ago

0.0.20240207

1 year ago

0.0.20240205

1 year ago

0.0.20240204

1 year ago

0.0.20240201

1 year ago

0.0.20240111

1 year ago

0.0.20240110

2 years ago

0.0.20240109

2 years ago

0.0.20240104

2 years ago

0.0.20240102

2 years ago

0.0.20240101

2 years ago

0.0.20231220

2 years ago

0.0.20231218

2 years ago

0.0.20231217

2 years ago

0.0.20231214

2 years ago

0.0.20231213

2 years ago

0.0.20231212

2 years ago

0.0.20231211

2 years ago

0.0.20231204

2 years ago

0.0.20231203

2 years ago

0.0.20231130

2 years ago

0.0.20231127

2 years ago

0.0.20230816

2 years ago

0.0.20230731

2 years ago

0.0.20230814

2 years ago

0.0.20231109

2 years ago

0.0.20231113

2 years ago

0.0.20231112

2 years ago

0.0.20231115

2 years ago

0.0.20231114

2 years ago

0.0.20231030

2 years ago

0.0.20230808

2 years ago

0.0.20230920

2 years ago

0.0.20230720

2 years ago

0.0.20230724

2 years ago

0.0.20230917

2 years ago

0.0.20230711

2 years ago

0.0.20231006

2 years ago

0.0.20230910

2 years ago

0.0.20230710

2 years ago

0.0.20230913

2 years ago

0.0.20230914

2 years ago

0.0.20230911

2 years ago

0.0.20230912

2 years ago

0.0.20231013

2 years ago

0.0.20230829

2 years ago

0.0.20230708

2 years ago

0.0.20230907

2 years ago

0.0.20231116

2 years ago

0.0.20231119

2 years ago

0.0.20230628

2 years ago

0.0.20231120

2 years ago

0.0.20231122

2 years ago

0.0.20231001

2 years ago

0.0.20231121

2 years ago

0.0.20231003

2 years ago

0.0.20231123

2 years ago

0.0.20231002

2 years ago

0.0.20231126

2 years ago

0.0.20230625

2 years ago

0.0.20230612

2 years ago

0.0.20230607

2 years ago

0.0.20230525

2 years ago

0.0.20230606

2 years ago

0.0.20230514

2 years ago

0.0.20230517

2 years ago

0.0.20230518

2 years ago

0.0.20230515

2 years ago

0.0.20230521

2 years ago

0.0.20230509

2 years ago

0.0.20230510

2 years ago

0.0.20230409

2 years ago

0.0.20230326

2 years ago

0.0.20230324

2 years ago

0.0.20230309

2 years ago

0.0.20230328

2 years ago

0.0.20230306

2 years ago

0.0.20230406

2 years ago

0.0.20230219

2 years ago

0.0.20230220

2 years ago

0.0.20230129

2 years ago

0.0.20230127

2 years ago

0.0.20230131

2 years ago

0.0.20230117

2 years ago

0.0.20230118

2 years ago

0.0.20221214

3 years ago

0.0.20230115

2 years ago

0.0.20230116

2 years ago

0.0.20230119

2 years ago

0.0.20230121

2 years ago

0.0.20230124

2 years ago

0.0.20230105

3 years ago

0.0.20230110

3 years ago

0.0.20230111

2 years ago

0.0.20221013

3 years ago

0.0.20221001

3 years ago

0.0.20221011

3 years ago

0.0.20220927

3 years ago

0.0.20220928

3 years ago

0.0.20220922

3 years ago

0.0.20220926

3 years ago

0.0.20220916

3 years ago

0.0.20220919

3 years ago

0.0.20220920

3 years ago

0.0.20220921

3 years ago

0.0.20220825

3 years ago

0.0.20220815

3 years ago

0.0.20220727

3 years ago