Socket
Socket
Sign inDemoInstall

@lab-mi/ds-api-client

Package Overview
Dependencies
Maintainers
3
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lab-mi/ds-api-client - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

9

dist/__helpers.js

@@ -1,6 +0,9 @@

import { DsApiClient } from "./index";
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.dsApiClient = void 0;
const index_1 = require("./index");
require("dotenv").config();
const { API_URL, API_TOKEN } = process.env;
const dsApiClient = new DsApiClient(API_URL, API_TOKEN);
export { dsApiClient };
const dsApiClient = new index_1.DsApiClient(API_URL, API_TOKEN);
exports.dsApiClient = dsApiClient;
//# sourceMappingURL=__helpers.js.map

@@ -1,2 +0,5 @@

export var AddressType;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.TypeOrganisme = exports.TypeDeChamp = exports.TitreIdentiteGrantType = exports.Order = exports.GeoAreaSource = exports.EntrepriseEtatAdministratif = exports.DossierState = exports.DossierDeclarativeState = exports.DemarcheState = exports.Civilite = exports.AddressType = void 0;
var AddressType;
(function (AddressType) {

@@ -7,9 +10,9 @@ AddressType["Housenumber"] = "housenumber";

AddressType["Locality"] = "locality";
})(AddressType || (AddressType = {}));
export var Civilite;
})(AddressType = exports.AddressType || (exports.AddressType = {}));
var Civilite;
(function (Civilite) {
Civilite["M"] = "M";
Civilite["Mme"] = "Mme";
})(Civilite || (Civilite = {}));
export var DemarcheState;
})(Civilite = exports.Civilite || (exports.Civilite = {}));
var DemarcheState;
(function (DemarcheState) {

@@ -20,9 +23,9 @@ DemarcheState["Brouillon"] = "brouillon";

DemarcheState["Depubliee"] = "depubliee";
})(DemarcheState || (DemarcheState = {}));
export var DossierDeclarativeState;
})(DemarcheState = exports.DemarcheState || (exports.DemarcheState = {}));
var DossierDeclarativeState;
(function (DossierDeclarativeState) {
DossierDeclarativeState["EnInstruction"] = "en_instruction";
DossierDeclarativeState["Accepte"] = "accepte";
})(DossierDeclarativeState || (DossierDeclarativeState = {}));
export var DossierState;
})(DossierDeclarativeState = exports.DossierDeclarativeState || (exports.DossierDeclarativeState = {}));
var DossierState;
(function (DossierState) {

@@ -34,24 +37,24 @@ DossierState["EnConstruction"] = "en_construction";

DossierState["SansSuite"] = "sans_suite";
})(DossierState || (DossierState = {}));
export var EntrepriseEtatAdministratif;
})(DossierState = exports.DossierState || (exports.DossierState = {}));
var EntrepriseEtatAdministratif;
(function (EntrepriseEtatAdministratif) {
EntrepriseEtatAdministratif["Actif"] = "Actif";
EntrepriseEtatAdministratif["Ferme"] = "Ferme";
})(EntrepriseEtatAdministratif || (EntrepriseEtatAdministratif = {}));
export var GeoAreaSource;
})(EntrepriseEtatAdministratif = exports.EntrepriseEtatAdministratif || (exports.EntrepriseEtatAdministratif = {}));
var GeoAreaSource;
(function (GeoAreaSource) {
GeoAreaSource["Cadastre"] = "cadastre";
GeoAreaSource["SelectionUtilisateur"] = "selection_utilisateur";
})(GeoAreaSource || (GeoAreaSource = {}));
export var Order;
})(GeoAreaSource = exports.GeoAreaSource || (exports.GeoAreaSource = {}));
var Order;
(function (Order) {
Order["Asc"] = "ASC";
Order["Desc"] = "DESC";
})(Order || (Order = {}));
export var TitreIdentiteGrantType;
})(Order = exports.Order || (exports.Order = {}));
var TitreIdentiteGrantType;
(function (TitreIdentiteGrantType) {
TitreIdentiteGrantType["FranceConnect"] = "france_connect";
TitreIdentiteGrantType["PieceJustificative"] = "piece_justificative";
})(TitreIdentiteGrantType || (TitreIdentiteGrantType = {}));
export var TypeDeChamp;
})(TitreIdentiteGrantType = exports.TitreIdentiteGrantType || (exports.TitreIdentiteGrantType = {}));
var TypeDeChamp;
(function (TypeDeChamp) {

@@ -93,4 +96,4 @@ TypeDeChamp["Text"] = "text";

TypeDeChamp["Mesri"] = "mesri";
})(TypeDeChamp || (TypeDeChamp = {}));
export var TypeOrganisme;
})(TypeDeChamp = exports.TypeDeChamp || (exports.TypeDeChamp = {}));
var TypeOrganisme;
(function (TypeOrganisme) {

@@ -104,3 +107,3 @@ TypeOrganisme["AdministrationCentrale"] = "administration_centrale";

TypeOrganisme["Autre"] = "autre";
})(TypeOrganisme || (TypeOrganisme = {}));
})(TypeOrganisme = exports.TypeOrganisme || (exports.TypeOrganisme = {}));
//# sourceMappingURL=types.js.map

@@ -1,5 +0,8 @@

import query from "./graphql/getDemarche";
export const getDemarche = async (client, idDemarche) => {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getDemarche = void 0;
const getDemarche_1 = require("./graphql/getDemarche");
const getDemarche = async (client, idDemarche) => {
try {
return await client.request(query, { demarcheNumber: idDemarche }, { "Content-Type": "application/json" });
return await client.request(getDemarche_1.default, { demarcheNumber: idDemarche }, { "Content-Type": "application/json" });
}

@@ -10,2 +13,3 @@ catch (error) {

};
exports.getDemarche = getDemarche;
//# sourceMappingURL=demarche.js.map

@@ -1,5 +0,8 @@

import query from "./graphql/getDossier";
export const getDossier = async (client, idDossier) => {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getDossier = void 0;
const getDossier_1 = require("./graphql/getDossier");
const getDossier = async (client, idDossier) => {
try {
return await client.request(query, { dossierNumber: idDossier }, { "Content-Type": "application/json" });
return await client.request(getDossier_1.default, { dossierNumber: idDossier }, { "Content-Type": "application/json" });
}

@@ -10,2 +13,3 @@ catch (error) {

};
exports.getDossier = getDossier;
//# sourceMappingURL=dossier.js.map

@@ -1,3 +0,5 @@

import { gql } from "graphql-request";
export default gql `
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const graphql_request_1 = require("graphql-request");
exports.default = (0, graphql_request_1.gql) `
fragment DossierFragment on Dossier {

@@ -4,0 +6,0 @@ id

@@ -1,3 +0,5 @@

import { gql } from "graphql-request";
export default gql `
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const graphql_request_1 = require("graphql-request");
exports.default = (0, graphql_request_1.gql) `
fragment AddressFragment on Address {

@@ -4,0 +6,0 @@ label

@@ -1,3 +0,5 @@

import { gql } from "graphql-request";
export default gql `
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const graphql_request_1 = require("graphql-request");
exports.default = (0, graphql_request_1.gql) `
fragment AvisFragment on Avis {

@@ -4,0 +6,0 @@ id

@@ -1,3 +0,5 @@

import { gql } from "graphql-request";
export default gql `
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const graphql_request_1 = require("graphql-request");
exports.default = (0, graphql_request_1.gql) `
fragment ChampDescriptorFragment on ChampDescriptor {

@@ -4,0 +6,0 @@ id

@@ -1,3 +0,5 @@

import { gql } from "graphql-request";
export default gql `
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const graphql_request_1 = require("graphql-request");
exports.default = (0, graphql_request_1.gql) `
fragment ChampFragment on Champ {

@@ -4,0 +6,0 @@ id

@@ -1,3 +0,5 @@

import { gql } from "graphql-request";
export default gql `
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const graphql_request_1 = require("graphql-request");
exports.default = (0, graphql_request_1.gql) `
fragment DemarcheDescriptorFragment on DemarcheDescriptor {

@@ -4,0 +6,0 @@ id

@@ -1,13 +0,15 @@

import { gql } from "graphql-request";
import AddressFragment from "./AddressFragment";
import ChampDescriptorFragment from "./ChampDescriptorFragment";
import GeoAreaFragment from "./GeoAreaFragment";
import FileFragment from "./FileFragment";
import RevisionFragment from "./RevisionFragment";
import ChampFragment from "./ChampFragment";
import RootChampFragment from "./RootChampFragment";
import AvisFragment from "./AvisFragment";
import MessageFragment from "./MessageFragment";
import PersonneMoraleFragment from "./PersonneMoraleFragment";
export default gql `
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const graphql_request_1 = require("graphql-request");
const AddressFragment_1 = require("./AddressFragment");
const ChampDescriptorFragment_1 = require("./ChampDescriptorFragment");
const GeoAreaFragment_1 = require("./GeoAreaFragment");
const FileFragment_1 = require("./FileFragment");
const RevisionFragment_1 = require("./RevisionFragment");
const ChampFragment_1 = require("./ChampFragment");
const RootChampFragment_1 = require("./RootChampFragment");
const AvisFragment_1 = require("./AvisFragment");
const MessageFragment_1 = require("./MessageFragment");
const PersonneMoraleFragment_1 = require("./PersonneMoraleFragment");
exports.default = (0, graphql_request_1.gql) `
fragment DossierFragment on Dossier {

@@ -77,13 +79,13 @@ id

}
${AddressFragment}
${ChampDescriptorFragment}
${GeoAreaFragment}
${FileFragment}
${RevisionFragment}
${ChampFragment}
${RootChampFragment}
${AvisFragment}
${MessageFragment}
${PersonneMoraleFragment}
${AddressFragment_1.default}
${ChampDescriptorFragment_1.default}
${GeoAreaFragment_1.default}
${FileFragment_1.default}
${RevisionFragment_1.default}
${ChampFragment_1.default}
${RootChampFragment_1.default}
${AvisFragment_1.default}
${MessageFragment_1.default}
${PersonneMoraleFragment_1.default}
`;
//# sourceMappingURL=DossierFragment.js.map

@@ -1,3 +0,5 @@

import { gql } from "graphql-request";
export default gql `
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const graphql_request_1 = require("graphql-request");
exports.default = (0, graphql_request_1.gql) `
fragment FileFragment on File {

@@ -4,0 +6,0 @@ filename

@@ -1,3 +0,5 @@

import { gql } from "graphql-request";
export default gql `
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const graphql_request_1 = require("graphql-request");
exports.default = (0, graphql_request_1.gql) `
fragment GeoAreaFragment on GeoArea {

@@ -4,0 +6,0 @@ id

@@ -1,3 +0,5 @@

import { gql } from "graphql-request";
export default gql `
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const graphql_request_1 = require("graphql-request");
exports.default = (0, graphql_request_1.gql) `
fragment MessageFragment on Message {

@@ -4,0 +6,0 @@ id

@@ -1,3 +0,5 @@

import { gql } from "graphql-request";
export default gql `
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const graphql_request_1 = require("graphql-request");
exports.default = (0, graphql_request_1.gql) `
fragment PersonneMoraleFragment on PersonneMorale {

@@ -4,0 +6,0 @@ siret

@@ -1,3 +0,5 @@

import { gql } from "graphql-request";
export default gql `
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const graphql_request_1 = require("graphql-request");
exports.default = (0, graphql_request_1.gql) `
fragment RevisionFragment on Revision {

@@ -4,0 +6,0 @@ id

@@ -1,3 +0,5 @@

import { gql } from "graphql-request";
export default gql `
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const graphql_request_1 = require("graphql-request");
exports.default = (0, graphql_request_1.gql) `
fragment RootChampFragment on Champ {

@@ -4,0 +6,0 @@ ... on RepetitionChamp {

@@ -1,4 +0,6 @@

import { gql } from "graphql-request";
import DossierFragment from "./fragment/DossierFragment";
export default gql `
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const graphql_request_1 = require("graphql-request");
const DossierFragment_1 = require("./fragment/DossierFragment");
exports.default = (0, graphql_request_1.gql) `
query getDemarche(

@@ -33,4 +35,4 @@ $demarcheNumber: Int!

}
${DossierFragment}
${DossierFragment_1.default}
`;
//# sourceMappingURL=getDemarche.js.map

@@ -1,5 +0,7 @@

import { gql } from "graphql-request";
import DossierFragment from "./fragment/DossierFragment";
import DemarcheDescriptorFragment from "./fragment/DemarcheDescriptorFragment";
export default gql `
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const graphql_request_1 = require("graphql-request");
const DossierFragment_1 = require("./fragment/DossierFragment");
const DemarcheDescriptorFragment_1 = require("./fragment/DemarcheDescriptorFragment");
exports.default = (0, graphql_request_1.gql) `
query getDossier($dossierNumber: Int!) {

@@ -13,5 +15,5 @@ dossier(number: $dossierNumber) {

}
${DossierFragment}
${DemarcheDescriptorFragment}
${DossierFragment_1.default}
${DemarcheDescriptorFragment_1.default}
`;
//# sourceMappingURL=getDossier.js.map

@@ -1,4 +0,6 @@

import { gql } from "graphql-request";
import DossierFragment from "./fragment/DossierFragment";
export default gql `
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const graphql_request_1 = require("graphql-request");
const DossierFragment_1 = require("./fragment/DossierFragment");
exports.default = (0, graphql_request_1.gql) `
query getGroupeInstructeur(

@@ -25,4 +27,4 @@ $groupeInstructeurNumber: Int!

}
${DossierFragment}
${DossierFragment_1.default}
`;
//# sourceMappingURL=getGroupInstructeur.js.map

@@ -1,5 +0,8 @@

import query from "./graphql/getGroupInstructeur";
export const getGroupInstructeur = async (client, idGroupeInstructeur) => {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getGroupInstructeur = void 0;
const getGroupInstructeur_1 = require("./graphql/getGroupInstructeur");
const getGroupInstructeur = async (client, idGroupeInstructeur) => {
try {
return await client.request(query, { groupeInstructeurNumber: idGroupeInstructeur }, { "Content-Type": "application/json" });
return await client.request(getGroupInstructeur_1.default, { groupeInstructeurNumber: idGroupeInstructeur }, { "Content-Type": "application/json" });
}

@@ -10,2 +13,3 @@ catch (error) {

};
exports.getGroupInstructeur = getGroupInstructeur;
//# sourceMappingURL=groupeInstructeur.js.map

@@ -1,9 +0,11 @@

import { GraphQLClient } from "graphql-request";
import { getDemarche } from "./demarche";
import { getDossier } from "./dossier";
import { getGroupInstructeur } from "./groupeInstructeur";
export class DsApiClient {
client;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.DsApiClient = void 0;
const graphql_request_1 = require("graphql-request");
const demarche_1 = require("./demarche");
const dossier_1 = require("./dossier");
const groupeInstructeur_1 = require("./groupeInstructeur");
class DsApiClient {
constructor(url, token) {
this.client = new GraphQLClient(url, {
this.client = new graphql_request_1.GraphQLClient(url, {
headers: {

@@ -17,11 +19,12 @@ Authorization: `Bearer ${token}`,

async demarche(idDemarche) {
return await getDemarche(this.client, idDemarche);
return await (0, demarche_1.getDemarche)(this.client, idDemarche);
}
async dossier(idDossier) {
return await getDossier(this.client, idDossier);
return await (0, dossier_1.getDossier)(this.client, idDossier);
}
async groupeInstructeur(idGroupeInstructeur) {
return await getGroupInstructeur(this.client, idGroupeInstructeur);
return await (0, groupeInstructeur_1.getGroupInstructeur)(this.client, idGroupeInstructeur);
}
}
exports.DsApiClient = DsApiClient;
//# sourceMappingURL=index.js.map
{
"name": "@lab-mi/ds-api-client",
"version": "1.0.1",
"version": "1.0.2",
"description": "Un DS Client GraphQL prenant en charge Node et les navigateurs pour les scripts ou les applications simples",

@@ -5,0 +5,0 @@ "author": "LAB-MI",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc