Skip to content
This repository has been archived by the owner on Jul 31, 2024. It is now read-only.

Commit

Permalink
Merge pull request #59 from jaxx2104/fix-type-custom-headers
Browse files Browse the repository at this point in the history
FreeeAPIClient の 型情報を更新
  • Loading branch information
sakakibara-setu authored Jun 12, 2023
2 parents 3dec4a9 + 5286436 commit 0f815bb
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 19 deletions.
32 changes: 24 additions & 8 deletions lib/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { AxiosPromise } from 'axios';
import * as express from 'express';
import * as admin from 'firebase-admin';
import { ParamJSON, SDKConfig } from '../src/sdk/const/types';
import { AxiosPromise } from 'axios'
import * as express from 'express'
import * as admin from 'firebase-admin'
import { CustomHeaders, ParamJSON, SDKConfig } from '../src/sdk/const/types'

declare module 'freee-firebase-sdk' {
/**
Expand Down Expand Up @@ -30,11 +30,27 @@ declare module 'freee-firebase-sdk' {
get<T = any>(
url: string,
params: ParamJSON,
userId: string
userId: string,
customHeaders?: CustomHeaders
): AxiosPromise<T>
post<T = any>(url: string, data: ParamJSON, userId: string): AxiosPromise<T>
put<T = any>(url: string, data: ParamJSON, userId: string): AxiosPromise<T>
delete(url: string, data: ParamJSON, userId: string): AxiosPromise
post<T = any>(
url: string,
data: ParamJSON,
userId: string,
customHeaders?: CustomHeaders
): AxiosPromise<T>
put<T = any>(
url: string,
data: ParamJSON,
userId: string,
customHeaders?: CustomHeaders
): AxiosPromise<T>
delete(
url: string,
data: ParamJSON,
userId: string,
customHeaders?: CustomHeaders
): AxiosPromise
}

class FreeeFirebaseAuthClient {
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "freee-firebase-sdk",
"version": "2.2.0",
"version": "2.2.1",
"license": "MIT",
"homepage": "https://github.com/freee/firebase-sdk-js",
"repository": {
Expand Down
32 changes: 24 additions & 8 deletions typings/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { AxiosPromise } from 'axios';
import * as express from 'express';
import * as admin from 'firebase-admin';
import { ParamJSON, SDKConfig } from '../src/sdk/const/types';
import { AxiosPromise } from 'axios'
import * as express from 'express'
import * as admin from 'firebase-admin'
import { CustomHeaders, ParamJSON, SDKConfig } from '../src/sdk/const/types'

declare module 'freee-firebase-sdk' {
/**
Expand Down Expand Up @@ -30,11 +30,27 @@ declare module 'freee-firebase-sdk' {
get<T = any>(
url: string,
params: ParamJSON,
userId: string
userId: string,
customHeaders?: CustomHeaders
): AxiosPromise<T>
post<T = any>(url: string, data: ParamJSON, userId: string): AxiosPromise<T>
put<T = any>(url: string, data: ParamJSON, userId: string): AxiosPromise<T>
delete(url: string, data: ParamJSON, userId: string): AxiosPromise
post<T = any>(
url: string,
data: ParamJSON,
userId: string,
customHeaders?: CustomHeaders
): AxiosPromise<T>
put<T = any>(
url: string,
data: ParamJSON,
userId: string,
customHeaders?: CustomHeaders
): AxiosPromise<T>
delete(
url: string,
data: ParamJSON,
userId: string,
customHeaders?: CustomHeaders
): AxiosPromise
}

class FreeeFirebaseAuthClient {
Expand Down

0 comments on commit 0f815bb

Please sign in to comment.