Code Monkey home page Code Monkey logo

api-sdk-nodejs's Introduction

User Documentation

See the Wiki page for this repository.

Development

For developers interested in modifying the tool.

Building package

make <target>

Where target is:

  • deb for building Debian packages:

    make deb
    
  • rpm for building Fedora packages:

    make rpm
    

Specific settings can be set in built-time:

VERSION:

make VERSION=<version-string> <target>

MAINTAINER:

make MAINTAINER=<maintainer> <target>

An executable named smartling-cli should become available in your $GOPATH/bin.

Managing dependencies

Project uses manul vendoring tool, which uses vendoring through git-submodules.

After adding any third-party libraries, you need to update vendoring:

manul -Ir

api-sdk-nodejs's People

Contributors

aghreed avatar chemdrew avatar dimitrystd avatar kyle-heddon avatar pavelloparev avatar phinpho avatar snigdhasinha-signifyd avatar vfisyuk-smartling avatar vsolovei-smartling avatar

Stargazers

 avatar  avatar  avatar

Watchers

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

api-sdk-nodejs's Issues

CustomFieldDto is missing fieldValue

I get typescript errors when trying to access a customField's fieldValue:

const jobDetails = await jobsApi.getJob(projectId, translationJobUid);
const customField = jobDetails.customFields.find(findMyCustomFieldByFieldUid);
if (customField) {
  const value = customField.fieldValue; // TS2339: Property 'fieldValue' does not exist on type 'CustomFieldDto'.
  console.log({value});
}

This happens because the CustomFieldDto interface is missing fieldValue.

While you can work around the issue with a @ts-ignore comment, it doesn't help with discoverability.

jobs API - upload file

Hi,

I 'd be interested in implementing the Smartling API Flow - Files & Jobs depicted in the API Flow Example of docs.

I don't seem to be able to find some helper like the one of the batches to either

  • create a new job with a list of file URIs or
  • add files to job after it is being created.

Is this not implemented or I miss the way of working? Thanks!

Callback url in file upload api

Similarly to the batches, the file upload api should have a setCallbackUrl helper.

Also, we do it before sending but you might want to consider encoding callback urls wherever you send them. Or do you see no reason?

Authorize job endpoint support / job.callbackUrl parameter

Hi again. I have some extra usage needs to encapsulate some calls. Both are for automation purposes. In my use case, we want to streamline as much as possible (devs own the content) the manual work. So, I 'd be interested in:

Please let me know if you are ok with supporting these endpoints/configuration to see how to proceed.

Thanks!

uploadFile failed due to node.js version issue

my local node.js version is v18.12.1 , it will display this issue

TypeError: Cannot set property closed of #<Readable> which has only a getter
      at new ReadStream (/Users/user/work/fe-tools/node_modules/string-to-file-stream/index.js:57:15)
      at string2fileStream (/Users/user/work/fe-tools/node_modules/string-to-file-stream/index.js:227:10)
      at UploadFileParameters.setFileContent (/Users/user/work/fe-tools/node_modules/smartling-api-sdk-nodejs/built/api/files/params/upload-file-parameters.js:47:62)

but when I switch to version v16.16 , it's fine.
dig into the source code, It seems we can't set the property closed in higher node.js version

// node_modules/string-to-file-stream/index.js:57,15
const { Readable } = require('stream');
function ReadStream(input, options) {
  // ...
  Readable.call(this, options);
 // ...
  this.pos = undefined;
  this.bytesRead = 0;
  this.closed = false; // โŒ
}

npm install - network error

Hi,
I'm trying to run npm install but ETIMEDOUT error occurs.

npm WARN Could not resolve dependency:
npm WARN peer eslint@"^4.9.0" from [email protected]
npm WARN node_modules/eslint-config-airbnb
npm WARN   dev eslint-config-airbnb@"^16.1.0" from the root project
npm ERR! code ETIMEDOUT
npm ERR! syscall connect
npm ERR! errno ETIMEDOUT
npm ERR! network request to https://artifactory-vpc.smartling.net/artifactory/api/npm/nodejs/eslint failed, reason: connect ETIMEDOUT 172.27.110.235:443
npm ERR! network This is a problem related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network 
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly.  See: 'npm help config' 

this link is not reachable: https://artifactory-vpc.smartling.net/artifactory/api/npm/nodejs/eslint

could you please check?
Thanks

npm install requires access to artifactory

when I clone the project and then run npm i I receive the error below when npm attempts to install @smartling/eslint-config-smartling.

Looks like it's behind a firewall

Screen Shot 2022-04-06 at 10 22 23 AM

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.