Skip to content

Commit

Permalink
chore: add test file
Browse files Browse the repository at this point in the history
  • Loading branch information
solufa committed Aug 15, 2024
1 parent 39b12dd commit bb1b49c
Show file tree
Hide file tree
Showing 23 changed files with 78 additions and 1,084 deletions.
231 changes: 2 additions & 229 deletions samples/freee.json
Original file line number Diff line number Diff line change
Expand Up @@ -18666,15 +18666,8 @@
"type": "string"
},
"receipt": {
"description": "証憑ファイル",
"anyOf": [
{
"$ref": "#/components/schemas/File"
},
{
"$ref": "#/components/schemas/ReadStream"
}
]
"$ref": "#/components/schemas/File",
"description": "証憑ファイル"
}
},
"required": [
Expand Down Expand Up @@ -26226,226 +26219,6 @@
"type",
"webkitRelativePath"
]
},
"ReadStream": {
"description": "Instances of `fs.ReadStream` are created and returned using the {@link createReadStream} function.",
"type": "object",
"properties": {
"bytesRead": {
"description": "The number of bytes that have been read so far.",
"type": "number"
},
"path": {
"description": "The path to the file the stream is reading from as specified in the first\nargument to `fs.createReadStream()`. If `path` is passed as a string, then`readStream.path` will be a string. If `path` is passed as a `Buffer`, then`readStream.path` will be a\n`Buffer`. If `fd` is specified, then`readStream.path` will be `undefined`.",
"anyOf": [
{
"type": "object",
"additionalProperties": false,
"patternProperties": {
"^[0-9]+$": {
"type": "number"
}
},
"properties": {
"BYTES_PER_ELEMENT": {
"type": "number"
},
"buffer": {
"$ref": "#/components/schemas/ArrayBufferLike"
},
"byteLength": {
"type": "number"
},
"byteOffset": {
"type": "number"
},
"length": {
"type": "number"
},
"__@toStringTag@138753": {
"type": "string",
"const": "Uint8Array"
}
},
"required": [
"BYTES_PER_ELEMENT",
"__@toStringTag@138753",
"buffer",
"byteLength",
"byteOffset",
"length"
]
},
{
"type": "string"
}
]
},
"pending": {
"description": "This property is `true` if the underlying file has not been opened yet,\ni.e. before the `'ready'` event is emitted.",
"type": "boolean"
},
"readableAborted": {
"description": "Returns whether the stream was destroyed or errored before emitting `'end'`.",
"type": "boolean"
},
"readable": {
"description": "Is `true` if it is safe to call {@link read}, which means\nthe stream has not been destroyed or emitted `'error'` or `'end'`.",
"type": "boolean"
},
"readableDidRead": {
"description": "Returns whether `'data'` has been emitted.",
"type": "boolean"
},
"readableEncoding": {
"description": "Getter for the property `encoding` of a given `Readable` stream. The `encoding` property can be set using the {@link setEncoding} method.",
"anyOf": [
{
"enum": [
"ascii",
"base64",
"base64url",
"binary",
"hex",
"latin1",
"ucs-2",
"ucs2",
"utf-16le",
"utf-8",
"utf16le",
"utf8"
],
"type": "string"
},
{
"type": "null"
}
]
},
"readableEnded": {
"description": "Becomes `true` when [`'end'`](https://nodejs.org/docs/latest-v22.x/api/stream.html#event-end) event is emitted.",
"type": "boolean"
},
"readableFlowing": {
"description": "This property reflects the current state of a `Readable` stream as described\nin the [Three states](https://nodejs.org/docs/latest-v22.x/api/stream.html#three-states) section.",
"type": [
"null",
"boolean"
]
},
"readableHighWaterMark": {
"description": "Returns the value of `highWaterMark` passed when creating this `Readable`.",
"type": "number"
},
"readableLength": {
"description": "This property contains the number of bytes (or objects) in the queue\nready to be read. The value provides introspection data regarding\nthe status of the `highWaterMark`.",
"type": "number"
},
"readableObjectMode": {
"description": "Getter for the property `objectMode` of a given `Readable` stream.",
"type": "boolean"
},
"destroyed": {
"description": "Is `true` after `readable.destroy()` has been called.",
"type": "boolean"
},
"closed": {
"description": "Is `true` after `'close'` has been emitted.",
"type": "boolean"
},
"errored": {
"description": "Returns error if the stream has been destroyed with an error.",
"anyOf": [
{
"$ref": "#/components/schemas/Error"
},
{
"type": "null"
}
]
}
},
"required": [
"bytesRead",
"closed",
"destroyed",
"errored",
"path",
"pending",
"readable",
"readableAborted",
"readableDidRead",
"readableEncoding",
"readableEnded",
"readableFlowing",
"readableHighWaterMark",
"readableLength",
"readableObjectMode"
]
},
"ArrayBufferLike": {
"anyOf": [
{
"$ref": "#/components/schemas/ArrayBuffer"
},
{
"$ref": "#/components/schemas/SharedArrayBuffer"
}
]
},
"ArrayBuffer": {
"type": "object",
"properties": {
"byteLength": {
"type": "number"
},
"__@toStringTag@138753": {
"type": "string"
}
},
"required": [
"__@toStringTag@138753",
"byteLength"
]
},
"SharedArrayBuffer": {
"type": "object",
"properties": {
"byteLength": {
"type": "number"
},
"__@species@139211": {
"$ref": "#/components/schemas/SharedArrayBuffer"
},
"__@toStringTag@138753": {
"type": "string",
"const": "SharedArrayBuffer"
}
},
"required": [
"__@species@139211",
"__@toStringTag@138753",
"byteLength"
]
},
"Error": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"message": {
"type": "string"
},
"stack": {
"type": "string"
},
"cause": {}
},
"required": [
"message",
"name"
]
}
}
}
Expand Down
4 changes: 1 addition & 3 deletions samples/freee/@types/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
/* eslint-disable */
import type { ReadStream } from 'fs'

export type PaymentParams = {
/** 事業所ID */
company_id: number;
Expand Down Expand Up @@ -578,7 +576,7 @@ export type ReceiptCreateParams = {
/** 取引日 (yyyy-mm-dd) */
issue_date?: string | undefined;
/** 証憑ファイル */
receipt: (File | ReadStream);
receipt: File;
}

export type ReceiptUpdateParams = {
Expand Down
Loading

0 comments on commit bb1b49c

Please sign in to comment.