Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@trycourier/client-graphql

Package Overview
Dependencies
Maintainers
2
Versions
501
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 1.17.1-internal.ba2edf7.0 to 1.18.1-internal.184b35c.0

1

dist/client.js

@@ -19,3 +19,2 @@ "use strict";

headers = {
"x-courier-client-key": params.clientKey,
authorization: "Bearer ".concat(params.authorization)

@@ -22,0 +21,0 @@ };

4

package.json
{
"name": "@trycourier/client-graphql",
"version": "1.17.1-internal.ba2edf7.0+ba2edf7",
"version": "1.18.1-internal.184b35c.0+184b35c",
"description": "",

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

],
"gitHead": "ba2edf785c16549ee4cd6dd50d688cb8e9fa9c76"
"gitHead": "184b35c61ad69bf845b791d968db9763af6ad576"
}

@@ -17,5 +17,13 @@ ## Courier Client GraphQl

or you can create the client separtly and pass the client in:
Or alternately, you can use an issued [authorization token](https://www.courier.com/docs/reference/auth/issue-token/).
```
{
authorization: string;
}
```
You can also create the client separately and pass the client in:
```
import { createCourierClient } from "@trycourier/client-graphql";

@@ -36,7 +44,5 @@ const courierClient = createCourierClient({

import { Messages } from "@trycourier/client-graphql";
const messagesApi = Messages({
clientKey: "abc123",
userId: "@me",
userSignature: "SUPER_SECRET",
});
const messagesApi = Messages({ authorization: "abc123" });
const getMessageCount = async (params?: {

@@ -112,10 +118,7 @@ isRead?: boolean,

#### For > 1 user
#### With JWT (Supports multiple users)
```js
import { Banner } from "@trycourier/client-graphql";
const bannerApi = Banner({
clientKey: "abc123",
authorization: "MY JWT TOKEN",
});
const bannerApi = Banner({ authorization: "MY JWT TOKEN" });
const getBanners = async (params?: { tags?: string[], locale?: string }) => {

@@ -122,0 +125,0 @@ const myBanners = await bannerApi.getBanners(params);

@@ -12,3 +12,4 @@ import { Client } from "urql";

authorization: string;
clientKey: string;
/** @deprecated (Not needed for JWT auth) */
clientKey?: string;
apiUrl?: string;

@@ -23,5 +24,6 @@ };

export declare type CourierJWTHeaders = RequestInit["headers"] & {
"x-courier-client-key": string;
authorization: string;
/** @deprecated (Not needed for JWT auth) */
"x-courier-client-key"?: string;
};
//# sourceMappingURL=types.d.ts.map

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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