0.0.20240509 • Published 21 hours ago

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

Weekly downloads
-
License
MIT
Repository
github
Last release
21 hours 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.20240509

21 hours ago

0.0.20240429

9 days ago

0.0.20240424

16 days ago

0.0.20240422

18 days ago

0.0.20240418

22 days ago

0.0.20240409

25 days ago

0.0.20240401

1 month ago

0.0.20240331

1 month ago

0.0.20240325

1 month ago

0.0.20240318

2 months ago

0.0.20240303

2 months ago

0.0.20240226

2 months ago

0.0.20240222

2 months ago

0.0.20240220

3 months ago

0.0.20240221

3 months ago

0.0.20240218

3 months ago

0.0.20240215

3 months ago

0.0.20240209

3 months ago

0.0.20240207

3 months ago

0.0.20240205

3 months ago

0.0.20240204

3 months ago

0.0.20240201

3 months ago

0.0.20240111

4 months ago

0.0.20240110

4 months ago

0.0.20240109

4 months ago

0.0.20240104

4 months ago

0.0.20240102

4 months ago

0.0.20240101

4 months ago

0.0.20231220

5 months ago

0.0.20231218

5 months ago

0.0.20231217

5 months ago

0.0.20231214

5 months ago

0.0.20231213

5 months ago

0.0.20231212

5 months ago

0.0.20231211

5 months ago

0.0.20231204

5 months ago

0.0.20231203

5 months ago

0.0.20231130

5 months ago

0.0.20231127

5 months ago

0.0.20230816

9 months ago

0.0.20230731

9 months ago

0.0.20230814

9 months ago

0.0.20231109

6 months ago

0.0.20231113

6 months ago

0.0.20231112

6 months ago

0.0.20231115

6 months ago

0.0.20231114

6 months ago

0.0.20231030

6 months ago

0.0.20230808

9 months ago

0.0.20230920

8 months ago

0.0.20230720

10 months ago

0.0.20230724

9 months ago

0.0.20230917

8 months ago

0.0.20230711

10 months ago

0.0.20231006

7 months ago

0.0.20230910

8 months ago

0.0.20230710

10 months ago

0.0.20230913

8 months ago

0.0.20230914

8 months ago

0.0.20230911

8 months ago

0.0.20230912

8 months ago

0.0.20231013

7 months ago

0.0.20230829

8 months ago

0.0.20230708

10 months ago

0.0.20230907

8 months ago

0.0.20231116

6 months ago

0.0.20231119

6 months ago

0.0.20230628

10 months ago

0.0.20231120

6 months ago

0.0.20231122

6 months ago

0.0.20231001

7 months ago

0.0.20231121

6 months ago

0.0.20231003

7 months ago

0.0.20231123

5 months ago

0.0.20231002

7 months ago

0.0.20231126

5 months ago

0.0.20230625

11 months ago

0.0.20230612

11 months ago

0.0.20230607

11 months ago

0.0.20230525

12 months ago

0.0.20230606

11 months ago

0.0.20230514

12 months ago

0.0.20230517

12 months ago

0.0.20230518

12 months ago

0.0.20230515

12 months ago

0.0.20230521

12 months ago

0.0.20230509

12 months ago

0.0.20230510

12 months ago

0.0.20230409

1 year ago

0.0.20230326

1 year ago

0.0.20230324

1 year ago

0.0.20230309

1 year ago

0.0.20230328

1 year ago

0.0.20230306

1 year ago

0.0.20230406

1 year ago

0.0.20230219

1 year ago

0.0.20230220

1 year ago

0.0.20230129

1 year ago

0.0.20230127

1 year ago

0.0.20230131

1 year ago

0.0.20230117

1 year ago

0.0.20230118

1 year ago

0.0.20221214

1 year ago

0.0.20230115

1 year ago

0.0.20230116

1 year ago

0.0.20230119

1 year ago

0.0.20230121

1 year ago

0.0.20230124

1 year ago

0.0.20230105

1 year ago

0.0.20230110

1 year ago

0.0.20230111

1 year ago

0.0.20221013

2 years ago

0.0.20221001

2 years ago

0.0.20221011

2 years ago

0.0.20220927

2 years ago

0.0.20220928

2 years ago

0.0.20220922

2 years ago

0.0.20220926

2 years ago

0.0.20220916

2 years ago

0.0.20220919

2 years ago

0.0.20220920

2 years ago

0.0.20220921

2 years ago

0.0.20220825

2 years ago

0.0.20220815

2 years ago

0.0.20220727

2 years ago