From 1c3161b2a25f174a1e6864f34a6b2a9c01489ebf Mon Sep 17 00:00:00 2001 From: Copple <10214025+kiwicopple@users.noreply.github.com> Date: Wed, 10 Aug 2022 13:47:32 +0200 Subject: [PATCH] cleans up the spec --- spec/supabase_js_sdk.yaml | 105 ------------------ ...js_v1_sdk.yaml => supabase_js_v2_sdk.yaml} | 0 2 files changed, 105 deletions(-) delete mode 100644 spec/supabase_js_sdk.yaml rename spec/{supabase_js_v1_sdk.yaml => supabase_js_v2_sdk.yaml} (100%) diff --git a/spec/supabase_js_sdk.yaml b/spec/supabase_js_sdk.yaml deleted file mode 100644 index 48421f5a2b9..00000000000 --- a/spec/supabase_js_sdk.yaml +++ /dev/null @@ -1,105 +0,0 @@ -# The spec divided into 3 main sections: -# info: general information about the library -# types: a list of custom types -# functions: public functions which the user can access - -sdkspec: '001' - -# This section outlines the general information for the library. -info: - id: 'supabase-js' # {string} A unique ID for this library. - version: 'next' # {string} The current version number of the library. - title: 'Supabase Javascript SDK' # {string} A readable name. - language: 'javascript' # {string} The language where this library is used. - source: 'https://github.com/supabase/supabase-js' # {string} Where developers can find the source code. - bugs: 'https://github.com/supabase/supabase-js/issues' # {string} Where developers can file bugs. - spec: 'https://github.com/supabase/supabase-js/spec/libspec-v001.yml' # {string} Where developers can find this spec (to link directly in the docs). - description: - | # {string} You can use multiline strings for descriptions and supply any markdown/text. - An isomorphic Javascript library for GoTrue. - -types: [] - -# This section is an array of public functions which a user might need to execute. -functions: - - id: 'function-client-signup' # {string} A unique identifier for this function. - title: 'signUp()' # {string} Any function name. - summary: 'New user signup' - tags: ['client'] # {string[]} These tags are useful for grouping functions - description: | - - By default, the user will need to verify their email address before logging in. If you would like to change this, you can disable "Email Confirmations" by going to Authentication -> Settings on [app.supabase.com](https://app.supabase.com) - - If "Email Confirmations" is turned on, a `user` is returned but `session` will be null - - If "Email Confirmations" is turned off, both a `user` and a `session` will be returned - - When the user confirms their email address, they will be redirected to localhost:3000 by default. To change this, you can go to Authentication -> Settings on [app.supabase.com](https://app.supabase.com) - - If signUp() is called for an existing confirmed user: - - If "Enable email confirmations" is enabled on the "Authentication" -> "Settings" page, an obfuscated / fake user object will be returned. - - If "Enable email confirmations" is disabled, an error with a message "User already registered" will be returned. - - To check if a user already exists, refer to getUser(). - usage: | - ```js - const { user, session, error } = await gotrue.signUp({ - email: 'example@email.com', - password: 'example-password', - }) - ``` - links: [] - attributes: - - id: 'param-signup-options' - title: 'signUpOptions' - required: true - description: 'Some description.' - type: ['number', 'other'] # {string[]} Any values you want to appear in the docs - - id: 'param-options' - title: 'options' - default: 'defaultValue' # OPTIONAL {string} a default value - required: false - description: 'Some description.' - ref: 'CustomType' # {string} If a "type" is not supplied, a "ref" must be. This is a pointer to the types below. - children: - - id: 'param-nested' - name: 'nestedOject' - required: false - description: 'Some description.' - type: ['string'] - children: - - id: 'param-deep' # We can nest as many as required. - name: 'deepNesting' - description: 'Some description.' - required: false - type: ['string'] - returns: - - id: 'returns-error' - title: 'Error' - value: | - ```js - Promise<{ data: null, error: PostgrestError } - ``` - ref: ['PostgrestError'] # OPTIONAL {string}. This is a pointer to the types below. - - id: 'returns-success' - title: 'Success' - value: | - ```js - Promise<{ data: PostgrestSuccess, error: null } - ``` - ref: ['PostgrestSuccess'] # OPTIONAL {string}. This is a pointer to the types below. - examples: - - id: 'example-signup-with-email' - title: 'Sign up with email' - description: | - Use an email and password for email sign up. - links: [] - code: | - ```js - const { user, session, error } = await supabase.auth.signUp({ - email: 'example@email.com', - password: 'example-password', - }) - ``` - returns: - - id: 'example-success' - title: 'Success' - value: | - ```js - Promise<{ data: any, session: any, error: null } - ``` - ref: ['AuthSuccess'] diff --git a/spec/supabase_js_v1_sdk.yaml b/spec/supabase_js_v2_sdk.yaml similarity index 100% rename from spec/supabase_js_v1_sdk.yaml rename to spec/supabase_js_v2_sdk.yaml