@8ms/helpers 1.1.2 → 1.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,12 @@
1
- import { GetAccessTokenType } from './accessToken';
1
+ import { ConfigType } from '../aws';
2
+ export declare type GetAccessTokenType = {
3
+ SsmLib: any;
4
+ awsConfig: ConfigType;
5
+ force: boolean;
6
+ ssmName: string;
7
+ ssmWithDecryption: boolean;
8
+ ssmIsJson: boolean;
9
+ };
2
10
  /**
3
11
  * Retrieve the access token from SSM Parameter Store.
4
12
  */
@@ -1,14 +1,13 @@
1
1
  import { ageGroups } from './ageGroups';
2
+ import { CampaignType } from './campaign';
2
3
  import { devices } from './devices';
3
4
  import { endpoints } from './endpoints';
4
5
  import { genders } from './genders';
5
- import getAccessToken from './getAccessToken';
6
+ import getAccessToken, { GetAccessTokenType } from './getAccessToken';
6
7
  import getAgeGroup from './getAgeGroup';
7
8
  import getCampaignIds from './getCampaignIds';
8
9
  import getDevice from './getDevice';
9
10
  import getGender from './getGender';
10
11
  import request from './request';
11
- import { GetAccessTokenType } from './accessToken';
12
- import { CampaignType } from './campaign';
13
12
  export type { CampaignType, GetAccessTokenType, };
14
13
  export { ageGroups, devices, endpoints, genders, getAccessToken, getAgeGroup, getCampaignIds, getDevice, getGender, request, };
@@ -1,4 +1,4 @@
1
- export declare const states: {
1
+ export declare const authStates: {
2
2
  AUTHENTICATED: string;
3
3
  PENDING: string;
4
4
  UNAUTHENTICATED: string;
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.states = void 0;
4
- exports.states = {
3
+ exports.authStates = void 0;
4
+ exports.authStates = {
5
5
  AUTHENTICATED: 'authenticated',
6
6
  PENDING: 'loading',
7
7
  UNAUTHENTICATED: 'unauthenticated',
@@ -1,4 +1,4 @@
1
- import { states } from './states';
1
+ import { authStates } from './authStates';
2
2
  import isSessionReady from './isSessionReady';
3
3
  export type {};
4
- export { states, isSessionReady, };
4
+ export { authStates, isSessionReady, };
@@ -3,8 +3,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.isSessionReady = exports.states = void 0;
7
- var states_1 = require("./states");
8
- Object.defineProperty(exports, "states", { enumerable: true, get: function () { return states_1.states; } });
6
+ exports.isSessionReady = exports.authStates = void 0;
7
+ var authStates_1 = require("./authStates");
8
+ Object.defineProperty(exports, "authStates", { enumerable: true, get: function () { return authStates_1.authStates; } });
9
9
  var isSessionReady_1 = __importDefault(require("./isSessionReady"));
10
10
  exports.isSessionReady = isSessionReady_1.default;
@@ -1,3 +1,3 @@
1
- import { states, StatesType } from './states';
2
- export type { StatesType, };
3
- export { states, };
1
+ import { workerStates, WorkerStatesType } from './workerStates';
2
+ export type { WorkerStatesType, };
3
+ export { workerStates, };
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.states = void 0;
4
- var states_1 = require("./states");
5
- Object.defineProperty(exports, "states", { enumerable: true, get: function () { return states_1.states; } });
3
+ exports.workerStates = void 0;
4
+ var workerStates_1 = require("./workerStates");
5
+ Object.defineProperty(exports, "workerStates", { enumerable: true, get: function () { return workerStates_1.workerStates; } });
@@ -0,0 +1,6 @@
1
+ export declare const workerStates: {
2
+ ERROR: string;
3
+ SUCCESS: string;
4
+ PROGRESS: string;
5
+ };
6
+ export declare type WorkerStatesType = typeof workerStates.SUCCESS | typeof workerStates.ERROR | typeof workerStates.PROGRESS;
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.states = void 0;
4
- exports.states = {
3
+ exports.workerStates = void 0;
4
+ exports.workerStates = {
5
5
  ERROR: 'error',
6
6
  SUCCESS: 'success',
7
7
  PROGRESS: 'progress',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@8ms/helpers",
3
- "version": "1.1.2",
3
+ "version": "1.1.3",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/8millionstories-organisation/8ms-helpers-ts.git"
@@ -1,9 +0,0 @@
1
- import { ConfigType } from '../aws';
2
- export declare type GetAccessTokenType = {
3
- SsmLib: any;
4
- awsConfig: ConfigType;
5
- force: boolean;
6
- ssmName: string;
7
- ssmWithDecryption: boolean;
8
- ssmIsJson: boolean;
9
- };
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,6 +0,0 @@
1
- export declare const states: {
2
- ERROR: string;
3
- SUCCESS: string;
4
- PROGRESS: string;
5
- };
6
- export declare type StatesType = typeof states.SUCCESS | typeof states.ERROR | typeof states.PROGRESS;