New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@trycourier/client-graphql

Package Overview
Dependencies
Maintainers
3
Versions
510
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@trycourier/client-graphql - npm Package Compare versions

Comparing version 4.8.1-internal.7507a73.0 to 4.8.1-internal.bba30b1.0

4

package.json
{
"name": "@trycourier/client-graphql",
"version": "4.8.1-internal.7507a73.0+7507a73",
"version": "4.8.1-internal.bba30b1.0+bba30b1",
"description": "",

@@ -27,3 +27,3 @@ "main": "dist/index.js",

],
"gitHead": "7507a73ae5e816b511f7dba57a52affcfe0e0c06"
"gitHead": "bba30b170671230f8ea901e4fc1fc0c7d96f3073"
}

@@ -99,2 +99,50 @@ ## Courier Client GraphQl

### Preferences
You can use our GraphQL endpoints to read and write advanced user preferences and see draft preferences. This API has getRecipientPreferences, getPreferencePage, getDraftPreferencePage, and updateRecipientPreferences methods. You can see the response payloads in action on [User Preference Tester](https://bwebs.github.io/courier-test/window-preferences.html)
```js
import { Preferences } from "@trycourier/client-graphql";
const preferencesApi = Preferences({
clientKey: "abc123",
userId: "@me",
userSignature: "SUPER_SECRET",
});
const getRecipientPreferences = async (tenantId?: string) => {
const user_preferences = await preferencesApi.getRecipientPreferences(
tenantId
);
return user_preferences;
};
const getPreferencePage = async (tenantId?: string) => {
const page_with_defaults = await preferencesApi.getPreferencePage(tenantId);
return page_with_defaults;
};
const getDraftPreferencePage = async (tenantId?: string) => {
const draft_page_with_defaults = await preferencesApi.getDraftPreferencePage(
tenantId
);
return draft_page_with_defaults;
};
const updateRecipientPreferences = async (
payload: UpdateRecipientPreferencesPayload
) => {
const update_preferences = await preferencesApi.updateRecipientPreferences(
payload
);
return update_preferences;
};
```
```ts
interface UpdateRecipientPreferencesPayload {
templateId: string;
status: string;
hasCustomRouting: boolean;
routingPreferences: Array<string>;
digestSchedule: string;
tenantId?: string;
}
```
### Banners

@@ -101,0 +149,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc