Skip to content

Commit

Permalink
Merge branch 'main' into test-with-msw
Browse files Browse the repository at this point in the history
  • Loading branch information
douglowder authored Dec 20, 2024
2 parents 49aed10 + ab85c94 commit fe5f47c
Show file tree
Hide file tree
Showing 4 changed files with 610 additions and 903 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
name: Tests
on: push
on:
push:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -18,7 +22,7 @@ jobs:
- run: yarn tsc
- run: yarn lint --max-warnings=0
- run: yarn test --coverage
- uses: codecov/codecov-action@v4
- uses: codecov/codecov-action@v5
with:
flags: "node_${{ matrix.node-version }}"
env:
Expand Down
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "expo-server-sdk",
"version": "3.11.0",
"version": "3.13.0",
"description": "Server-side library for working with Expo using Node.js",
"main": "build/ExpoClient.js",
"types": "build/ExpoClient.d.ts",
Expand Down Expand Up @@ -52,12 +52,13 @@
"promise-retry": "^2.0.1"
},
"devDependencies": {
"@tsconfig/node-lts": "^20.1.3",
"@tsconfig/node-lts": "^22.0.0",
"@tsconfig/strictest": "^2.0.5",
"@types/node-fetch": "^2.6.11",
"@types/promise-retry": "^1.1.6",
"eslint": "^8.57.0",
"eslint-config-universe": "^13.0.0",
"eslint-config-universe": "^14.0.0",
"fetch-mock": "^9.11.0",
"jest": "^29.7.0",
"msw": "^2.4.9",
"prettier": "^3.2.5",
Expand Down
11 changes: 7 additions & 4 deletions src/ExpoClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -343,27 +343,30 @@ export type ExpoClientOptions = {

export type ExpoPushToken = string;

// see "Message request format" at https://docs.expo.dev/push-notifications/sending-notifications/#message-request-format
export type ExpoPushMessage = {
to: ExpoPushToken | ExpoPushToken[];
data?: object;
data?: Record<string, unknown>;
title?: string;
subtitle?: string;
body?: string;
sound?:
| 'default'
| string
| null
| {
critical?: boolean;
name?: 'default' | null;
name?: string | null;
volume?: number;
};
ttl?: number;
expiration?: number;
priority?: 'default' | 'normal' | 'high';
interruptionLevel?: 'active' | 'critical' | 'passive' | 'time-sensitive';
badge?: number;
channelId?: string;
categoryId?: string;
mutableContent?: boolean;
_contentAvailable?: boolean;
};

export type ExpoPushReceiptId = string;
Expand Down Expand Up @@ -396,8 +399,8 @@ export type ExpoPushErrorReceipt = {
| 'MessageRateExceeded'
| 'MessageTooBig'
| 'ProviderError';
expoPushToken?: string;
};
expoPushToken?: string;
// Internal field used only by developers working on Expo
__debug?: any;
};
Expand Down
Loading

0 comments on commit fe5f47c

Please sign in to comment.