Initial commit

This commit is contained in:
Thorbjoern
2025-05-26 00:46:28 +02:00
commit e5bca03433
3896 changed files with 1434297 additions and 0 deletions
Binary file not shown.
+35
View File
@@ -0,0 +1,35 @@
<p align="center">
<img width="300" src=".github/supabase-functions.png"/>
</p>
<p align="center">
<img src="https://github.com/supabase-community/functions-csharp/workflows/Build%20And%20Test/badge.svg"/>
<a href="https://www.nuget.org/packages/functions-csharp/">
<img src="https://img.shields.io/badge/dynamic/json?color=green&label=Nuget%20Release&query=data[0].version&url=https%3A%2F%2Fazuresearch-usnc.nuget.org%2Fquery%3Fq%3Dpackageid%3Afunctions-csharp"/>
</a>
</p>
---
C# Client library to interact with Supabase Functions.
## Package made possible through the efforts of:
Join the ranks! See a problem? Help fix it!
<a href="https://github.com/supabase-community/functions-csharp/graphs/contributors">
<img src="https://contrib.rocks/image?repo=supabase-community/functions-csharp" />
</a>
<small>Made with [contrib.rocks](https://contrib.rocks).</small>
## Contributing
We are more than happy to have contributions! Please submit a PR.
### Testing
To run the tests locally you must have docker and docker-compose installed. Then in the root of the repository run:
- `docker-compose up -d`
- `dotnet test`
+7
View File
@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: b8cc48acf00b68d43b9cf6300ef0c8a8
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
<metadata>
<id>functions-csharp</id>
<version>1.3.2</version>
<title>Function</title>
<authors>Joseph Schultz &lt;joseph@acupofjose.com&gt;</authors>
<license type="expression">MIT</license>
<licenseUrl>https://licenses.nuget.org/MIT</licenseUrl>
<icon>icon.png</icon>
<readme>README.md</readme>
<projectUrl>https://github.com/supabase-community/functions-csharp</projectUrl>
<iconUrl>https://avatars.githubusercontent.com/u/54469796?s=200&amp;v=4</iconUrl>
<description>A C# client for Supabase Functions</description>
<copyright>MIT</copyright>
<tags>supabase, functions</tags>
<repository type="git" url="https://github.com/supabase-community/functions-csharp" commit="110a8abbe7c8357f787188b02b23a6a776c48c05" />
<dependencies>
<group targetFramework=".NETStandard2.0">
<dependency id="Newtonsoft.Json" version="13.0.3" exclude="Build,Analyzers" />
<dependency id="supabase-core" version="0.0.3" exclude="Build,Analyzers" />
</group>
</dependencies>
</metadata>
</package>
@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: a78552ad9ae7e594981ac78cd6aa6d8b
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
+3
View File
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:5521a79b4acd1013574150313315a0ec9093eca0072a4b1f6052ac1ef0c988c9
size 5771
+143
View File
@@ -0,0 +1,143 @@
fileFormatVersion: 2
guid: 62edbfc1a081474498aaf6736e2ee1d9
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 13
mipmaps:
mipMapMode: 0
enableMipMap: 1
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
flipGreenChannel: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMipmapLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 0
wrapV: 0
wrapW: 0
nPOTScale: 1
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 0
spriteTessellationDetail: -1
textureType: 0
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings:
- serializedVersion: 4
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: WebGL
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
customData:
physicsShape: []
bones: []
spriteID:
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spriteCustomMetadata:
entries: []
nameFileIdTable: {}
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:
+8
View File
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 50b2b9c11300c6141b3d679474d0d03b
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 74f4e64ff2f67ad4f87c9a971ca7ab45
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,29 @@
fileFormatVersion: 2
guid: 23753bc3e895b4a4686ae5b26cf00de4
labels:
- NuGetForUnity
PluginImporter:
externalObjects: {}
serializedVersion: 3
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
Any:
enabled: 1
settings: {}
Editor:
enabled: 0
settings:
DefaultValueInitialized: true
WindowsStoreApps:
enabled: 0
settings:
CPU: AnyCPU
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,201 @@
<?xml version="1.0"?>
<doc>
<assembly>
<name>Supabase.Functions</name>
</assembly>
<members>
<member name="T:Supabase.Functions.Client">
<inheritdoc />
</member>
<member name="P:Supabase.Functions.Client.GetHeaders">
<summary>
Function that can be set to return dynamic headers.
Headers specified in the method parameters will ALWAYS take precedence over headers returned by this function.
</summary>
</member>
<member name="M:Supabase.Functions.Client.#ctor(System.String)">
<summary>
Initializes a functions client
</summary>
<param name="baseUrl"></param>
</member>
<member name="M:Supabase.Functions.Client.RawInvoke(System.String,System.String,Supabase.Functions.Client.InvokeFunctionOptions)">
<summary>
Returns an <see cref="T:System.Net.Http.HttpContent"/> response, allowing for coersion into Streams, Strings, and byte[]
</summary>
<param name="functionName">Function Name, will be appended to BaseUrl</param>
<param name="token">Anon Key.</param>
<param name="options">Options</param>
<returns></returns>
</member>
<member name="M:Supabase.Functions.Client.Invoke(System.String,System.String,Supabase.Functions.Client.InvokeFunctionOptions)">
<summary>
Invokes a function and returns the Text content of the response.
</summary>
<param name="functionName">Function Name, will be appended to BaseUrl</param>
<param name="token">Anon Key.</param>
<param name="options">Options</param>
<returns></returns>
</member>
<member name="M:Supabase.Functions.Client.Invoke``1(System.String,System.String,Supabase.Functions.Client.InvokeFunctionOptions)">
<summary>
Invokes a function and returns a JSON Deserialized object according to the supplied generic Type <typeparamref name="T"/>
</summary>
<typeparam name="T"></typeparam>
<param name="functionName">Function Name, will be appended to BaseUrl</param>
<param name="token">Anon Key.</param>
<param name="options">Options</param>
<returns></returns>
</member>
<member name="M:Supabase.Functions.Client.HandleRequest(System.String,System.String,Supabase.Functions.Client.InvokeFunctionOptions)">
<summary>
Internal request handling
</summary>
<param name="url"></param>
<param name="token"></param>
<param name="options"></param>
<returns></returns>
<exception cref="T:Supabase.Functions.Exceptions.FunctionsException"></exception>
</member>
<member name="T:Supabase.Functions.Client.InvokeFunctionOptions">
<summary>
Options that can be supplied to a function invocation.
Note: If Headers.Authorization is set, it can be later overriden if a token is supplied in the method call.
</summary>
</member>
<member name="P:Supabase.Functions.Client.InvokeFunctionOptions.Headers">
<summary>
Headers to be included on the request.
</summary>
</member>
<member name="P:Supabase.Functions.Client.InvokeFunctionOptions.Body">
<summary>
Body of the Request
</summary>
</member>
<member name="P:Supabase.Functions.Client.InvokeFunctionOptions.HttpTimeout">
<summary>
Timout value for HttpClient Requests, defaults to 100s.
https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpclient.timeout?view=net-8.0#remarks
</summary>
</member>
<member name="T:Supabase.Functions.Exceptions.FailureHint">
<summary>
A hint as to why a request failed.
</summary>
</member>
<member name="T:Supabase.Functions.Exceptions.FailureHint.Reason">
<summary>
A failure reason
</summary>
</member>
<member name="F:Supabase.Functions.Exceptions.FailureHint.Reason.Unknown">
<summary>
An unknown reason
</summary>
</member>
<member name="F:Supabase.Functions.Exceptions.FailureHint.Reason.NotAuthorized">
<summary>
Request was not authorized
</summary>
</member>
<member name="F:Supabase.Functions.Exceptions.FailureHint.Reason.Internal">
<summary>
An internal error occurred, check your supabase logs.
</summary>
</member>
<member name="M:Supabase.Functions.Exceptions.FailureHint.DetectReason(Supabase.Functions.Exceptions.FunctionsException)">
<summary>
Attempts to detect a reason given an exception.
</summary>
<param name="ex"></param>
<returns></returns>
</member>
<member name="T:Supabase.Functions.Exceptions.FunctionsException">
<summary>
An Exception thrown within <see cref="N:Supabase.Functions"/>
</summary>
</member>
<member name="M:Supabase.Functions.Exceptions.FunctionsException.#ctor(System.String)">
<inheritdoc />
</member>
<member name="M:Supabase.Functions.Exceptions.FunctionsException.#ctor(System.String,System.Exception)">
<inheritdoc />
</member>
<member name="P:Supabase.Functions.Exceptions.FunctionsException.Response">
<summary>
The Http Response
</summary>
</member>
<member name="P:Supabase.Functions.Exceptions.FunctionsException.Content">
<summary>
The Http response content
</summary>
</member>
<member name="P:Supabase.Functions.Exceptions.FunctionsException.StatusCode">
<summary>
The Http Status code
</summary>
</member>
<member name="P:Supabase.Functions.Exceptions.FunctionsException.Reason">
<summary>
A parsed reason for a given failure
</summary>
</member>
<member name="M:Supabase.Functions.Exceptions.FunctionsException.AddReason">
<summary>
Attempts to detect a reason for this exception
</summary>
</member>
<member name="T:Supabase.Functions.Interfaces.IFunctionsClient">
<summary>
Represents a contract for a Supabase Functions Client
</summary>
</member>
<member name="M:Supabase.Functions.Interfaces.IFunctionsClient.Invoke(System.String,System.String,Supabase.Functions.Client.InvokeFunctionOptions)">
<summary>
Invokes a function given a URL and access token. Returns the string content.
</summary>
<param name="url"></param>
<param name="token"></param>
<param name="options"></param>
<returns></returns>
</member>
<member name="M:Supabase.Functions.Interfaces.IFunctionsClient.Invoke``1(System.String,System.String,Supabase.Functions.Client.InvokeFunctionOptions)">
<summary>
Invokes a function given a URL and access token. Returns a typed response (should be a JSON.net parsable object)
</summary>
<param name="url"></param>
<param name="token"></param>
<param name="options"></param>
<typeparam name="T"></typeparam>
<returns></returns>
</member>
<member name="M:Supabase.Functions.Interfaces.IFunctionsClient.RawInvoke(System.String,System.String,Supabase.Functions.Client.InvokeFunctionOptions)">
<summary>
Invokes a function given a URL and access token. Returns the raw HTTP response.
</summary>
<param name="url"></param>
<param name="token"></param>
<param name="options"></param>
<returns></returns>
</member>
<member name="T:Supabase.Functions.Responses.BaseResponse">
<summary>
A wrapper class from which all Responses derive.
</summary>
</member>
<member name="P:Supabase.Functions.Responses.BaseResponse.ResponseMessage">
<summary>
The response message
</summary>
</member>
<member name="P:Supabase.Functions.Responses.BaseResponse.Content">
<summary>
The response content.
</summary>
</member>
</members>
</doc>
@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 8c5d48e3640f1cb48947f71b9fba8df6
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant: