Giter Site home page Giter Site logo

indirectus's People

Contributors

wolfulus avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

indirectus's Issues

Field generated as unknown

I don't know if it's still WIP of if there is an issue but all my field are marked as unknown;

  export interface ExtraDirectusUser {
    private_key: Optional<
      UnknownType<{
        schema: {
          raw: {
            collection: "directus_users";
            field: "private_key";
            type: "string";
            schema: {
              name: "private_key";
              table: "directus_users";
              data_type: "varchar";
              default_value: null;
              max_length: 255;
              numeric_precision: null;
              numeric_scale: null;
              is_generated: false;
              generation_expression: null;
              is_nullable: true;
              is_unique: false;
              is_primary_key: false;
              has_auto_increment: false;
              foreign_key_column: null;
              foreign_key_table: null;
            };
            meta: {
              id: 40;
              collection: "directus_users";
              field: "private_key";
              special: null;
              interface: "input";
              options: null;
              display: null;
              display_options: null;
              readonly: false;
              hidden: false;
              sort: 1;
              width: "half";
              translations: null;
              note: null;
              conditions: null;
              required: false;
              group: null;
              validation: null;
              validation_message: null;
            };
          };
          raw_relation: null;
        };
        meta: {
          id: 40;
          collection: "directus_users";
          field: "private_key";
          special: null;
          interface: "input";
          options: null;
          display: null;
          display_options: null;
          readonly: false;
          hidden: false;
          sort: 1;
          width: "half";
          translations: null;
          note: null;
          conditions: null;
          required: false;
          group: null;
          validation: null;
          validation_message: null;
        };
      }>
    >;
...
    {
      "collection": "directus_users",
      "field": "private_key",
      "type": "string",
      "schema": {
        "name": "private_key",
        "table": "directus_users",
        "data_type": "varchar",
        "default_value": null,
        "max_length": 255,
        "numeric_precision": null,
        "numeric_scale": null,
        "is_generated": false,
        "generation_expression": null,
        "is_nullable": true,
        "is_unique": false,
        "is_primary_key": false,
        "has_auto_increment": false,
        "foreign_key_column": null,
        "foreign_key_table": null
      },
      "meta": {
        "id": 40,
        "collection": "directus_users",
        "field": "private_key",
        "special": null,
        "interface": "input",
        "options": null,
        "display": null,
        "display_options": null,
        "readonly": false,
        "hidden": false,
        "sort": 1,
        "width": "half",
        "translations": null,
        "note": null,
        "conditions": null,
        "required": false,
        "group": null,
        "validation": null,
        "validation_message": null
      }
    },

Thanks for your help

Bug: types for v11 does not work

Description of the bug

the system types does not work for the v11 instance

Steps To Reproduce

No response

Additional Information

No response

Bug: types safety does not work when using instance.createUser()

Description of the bug

when using the instance created by createTypesClient the function createUser does not have the same type safety as if i do DirectusSDKcreateUser()

type collections = {
directus_users: {
namteste: Types.Optional<Types.String>
}[]
}

const directus = createTypedClient('http://localhost:8055')

directus.createUser({
test: 'test', <- error: Object literal may only specify known properties, and 'test' does not exist in type X
})

directus.request(
DirectusSDK.createUser({
test: 'test', <- no error
})
)

Steps To Reproduce

  1. create a new field inside the collection user like test: string
  2. generate the client.ts
  3. use the createTypedClient to generate a new instanceOfDirectus with the custom function
  4. use the function instance.createUser and see that the property test is not infered as a property required in createUser
  5. however: when using the request cunction i have the infered type (directus.request(DirectusDSK.createUser({test: 'test'}))<- no error)

Additional Information

No response

Bug: `--fetch` effect should be the default one?

Description of the bug

I find it confusing a bit that the cached schema is playing a role in the final client.ts generation.

I continuously tried to regen each time not knowing why it did not change, so I figured out I have to use the --fetch command.

I think the effect of the --fetch flag should be the default and possibly introduce a --with-cache flag to use the cache instead if needed?

Steps To Reproduce

No response

Additional Information

No response

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.