Giter VIP home page Giter VIP logo

aemcs-api-client-lib's Issues

This AEMCS-API-Client-Lib uses JWT authentication, which is deprecated, and

This AEMCS-API-Client-Lib uses JWT authentication, which is deprecated, and will no longer work from 27-JAN-25.
From JUN-24, no new Adobe Developer Console integrations with JWT authentication can be created any longer.

Will this library be updated for use of Oauth?

An additional question would be, if this library will be maintained in the future, and if it could be used in production environments as dependency?

Add TypeScript Support (Definition File)

Expected Behaviour

Being able to use the library in TypeScript without having to do anything.

Actual Behaviour

Issue about .d.ts missing

Reproduce Scenario (including but not limited to)

Import the library in TypeScript

Steps to Reproduce

Install the library into a TypeScript project

Platform and Version

All

Sample Code that illustrates the problem

'use strict';
import exchange from '@adobe/aemcs-api-client-lib';
import fs from 'fs';
const JSON_FILE = 'aemcs-service-credentials.json';

export async function getToken(): Promise<string> {
  const config = JSON.parse(fs.readFileSync(JSON_FILE, 'utf8'));
  const accessToken = await exchange(config);
  return accessToken;
}

Logs taken while reproducing problem

No log

Proposed fix:

At a minimum:

declare module '@adobe/aemcs-api-client-lib' {
  export interface ExchangeRequest {
    ok: boolean;
    integration: {
      imsEndpoint: string;
      metascopes: string;
      technicalAccount: {
        clientId: string;
        clientSecret: string;
      };
      email: string;
      id: string;
      org: string;
      privateKey: string;
      publicKey: string;
      certificateExpirationDate: string;
    };
    statusCode: number;
  }
  export interface ExchangeResponse {
    access_token: string;
    expires_in: number;
    token_type: 'bearer';
  }
  function exchange(config: ExchangeRequest): Promise<ExchangeResponse>;
  export = exchange;
}

Into a .d.ts file

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.