2.0.20220806 • Published 2 years ago

@maxim_mazurok/gapi.client.cloudsupport v2.0.20220806

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

TypeScript typings for Google Cloud Support API v2beta

Manages Google Cloud technical support cases for Customer Care support offerings. For detailed description please check documentation.

Installing

Install typings for Google Cloud Support API:

npm install @types/gapi.client.cloudsupport@v2beta --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('cloudsupport', 'v2beta', () => {
  // now we can use gapi.client.cloudsupport
  // ...
});

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',
    ],
    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 Google Cloud Support API resources:

/*
Create a file attachment on a case or Cloud resource.
*/
await gapi.client.cloudsupport.attachments.create({ parent: "parent",  });

/*
Retrieve valid classifications to be used when creating a support case. The classications are hierarchical, with each classification containing all levels of the hierarchy, separated by " > ". For example "Technical Issue > Compute > Compute Engine".
*/
await gapi.client.cloudsupport.caseClassifications.search({  });

/*
Close the specified case.
*/
await gapi.client.cloudsupport.cases.close({ name: "name",  });

/*
Create a new case and associate it with the given Cloud resource.
*/
await gapi.client.cloudsupport.cases.create({ parent: "parent",  });

/*
Escalate a case. Escalating a case will initiate the Cloud Support escalation management process. This operation is only available to certain Customer Care tiers. Go to https://cloud.google.com/support and look for 'Technical support escalations' in the feature list to find out which tiers are able to perform escalations.
*/
await gapi.client.cloudsupport.cases.escalate({ name: "name",  });

/*
Retrieve the specified case.
*/
await gapi.client.cloudsupport.cases.get({ name: "name",  });

/*
Retrieve all cases under the specified parent. Note: Listing cases under an Organization returns only the cases directly parented by that organization. To retrieve all cases under an organization, including cases parented by projects under that organization, use `cases.search`.
*/
await gapi.client.cloudsupport.cases.list({ parent: "parent",  });

/*
Update the specified case. Only a subset of fields (display_name, description, time_zone, subscriber_email_addresses, related_resources, severity, priority, primary_contact, and labels) can be updated.
*/
await gapi.client.cloudsupport.cases.patch({ name: "name",  });

/*
Search cases using the specified query.
*/
await gapi.client.cloudsupport.cases.search({  });

/*
Download a file attachment on a case. Note: HTTP requests must append "?alt=media" to the URL.
*/
await gapi.client.cloudsupport.media.download({ name: "name",  });

/*
Create a file attachment on a case or Cloud resource.
*/
await gapi.client.cloudsupport.media.upload({ parent: "parent",  });
2.0.20220711

2 years ago

2.0.20220612

2 years ago

2.0.20220706

2 years ago

2.0.20220805

2 years ago

2.0.20220727

2 years ago

2.0.20220628

2 years ago

2.0.20220806

2 years ago

2.0.20220708

2 years ago

2.0.20220625

2 years ago

2.0.20220726

2 years ago

2.0.20220627

2 years ago

2.0.20220725

2 years ago

2.0.20220703

2 years ago

2.0.20220621

2 years ago

2.0.20220620

2 years ago

2.0.20220722

2 years ago

2.0.20220622

2 years ago

2.0.20220719

2 years ago

2.0.20220718

2 years ago

2.0.20220713

2 years ago

2.0.20220712

2 years ago

2.0.20220615

2 years ago

2.0.20220609

2 years ago

2.0.20220607

2 years ago

2.0.20220606

2 years ago

2.0.20220601

2 years ago

2.0.20220527

2 years ago

2.0.20220525

2 years ago

2.0.20220522

2 years ago

2.0.20220517

2 years ago