@seeka-labs/sdk-apps-server 1.0.1

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.
Files changed (29) hide show
  1. package/LICENSE +19 -0
  2. package/README.md +1 -0
  3. package/dist/sdk-apps-server.js +2 -0
  4. package/dist/sdk-apps-server.js.map +1 -0
  5. package/dist/sdk-apps-server.module.js +2 -0
  6. package/dist/sdk-apps-server.module.js.map +1 -0
  7. package/dist/types/src/api/helper/auth/index.d.ts +8 -0
  8. package/dist/types/src/api/helper/auth/index.d.ts.map +1 -0
  9. package/dist/types/src/api/helper/config/index.d.ts +8 -0
  10. package/dist/types/src/api/helper/config/index.d.ts.map +1 -0
  11. package/dist/types/src/api/helper/index.d.ts +23 -0
  12. package/dist/types/src/api/helper/index.d.ts.map +1 -0
  13. package/dist/types/src/api/helper/serviceResolver/index.d.ts +6 -0
  14. package/dist/types/src/api/helper/serviceResolver/index.d.ts.map +1 -0
  15. package/dist/types/src/api/models/index.d.ts +23 -0
  16. package/dist/types/src/api/models/index.d.ts.map +1 -0
  17. package/dist/types/src/api/services/index.d.ts +751 -0
  18. package/dist/types/src/api/services/index.d.ts.map +1 -0
  19. package/dist/types/src/api/webhooks/index.d.ts +11 -0
  20. package/dist/types/src/api/webhooks/index.d.ts.map +1 -0
  21. package/dist/types/src/cache/appCacheManager/index.d.ts +12 -0
  22. package/dist/types/src/cache/appCacheManager/index.d.ts.map +1 -0
  23. package/dist/types/src/helpers/app/index.d.ts +24 -0
  24. package/dist/types/src/helpers/app/index.d.ts.map +1 -0
  25. package/dist/types/src/helpers/util/index.d.ts +10 -0
  26. package/dist/types/src/helpers/util/index.d.ts.map +1 -0
  27. package/dist/types/src/index.d.ts +8 -0
  28. package/dist/types/src/index.d.ts.map +1 -0
  29. package/package.json +57 -0
@@ -0,0 +1,8 @@
1
+ import { Logger } from 'winston';
2
+ import { AppClientRuntimeInfo, SeekaAppConfig } from '../../services';
3
+ export declare const getAppConfig: (context: {
4
+ applicationId: string;
5
+ organisationId: string;
6
+ applicationInstallId: string;
7
+ }, appSecret: string, client: AppClientRuntimeInfo, grantedPermissions: string[], logger?: Logger) => SeekaAppConfig;
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/api/helper/config/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAGjC,OAAO,EAAE,oBAAoB,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAMtE,eAAO,MAAM,YAAY,YAAa;IAAE,aAAa,EAAE,MAAM,CAAC;IAAC,cAAc,EAAE,MAAM,CAAC;IAAC,oBAAoB,EAAE,MAAM,CAAA;CAAE,aAAa,MAAM,UAAU,oBAAoB,sBAAsB,MAAM,EAAE,WAAW,MAAM,KAAG,cAuCvN,CAAA"}
@@ -0,0 +1,23 @@
1
+ import { ServiceCallSource } from '../models';
2
+ import { ActivityPayload, DataIngestBatchHttpRequest, IdentityServiceProxy, IngestServiceProxy, PersonIdentifiers, SeekaAppConfig } from '../services';
3
+ export declare class SeekaApiHelper {
4
+ constructor(config: SeekaAppConfig);
5
+ private readonly config;
6
+ private maxBatchSize;
7
+ refreshOrPrimeTokenCache: () => Promise<void>;
8
+ ingestionService: IngestServiceProxy;
9
+ identityService: IdentityServiceProxy;
10
+ private checkPermission;
11
+ mergeIdentity: (identity: PersonIdentifiers, src: ServiceCallSource) => Promise<string>;
12
+ mergeIdentityBatch: (batch: PersonIdentifiers[], src: ServiceCallSource) => Promise<void>;
13
+ trackActivityBatch: (batch: {
14
+ activity: ActivityPayload;
15
+ profile?: PersonIdentifiers | undefined;
16
+ }[], src: ServiceCallSource) => Promise<void>;
17
+ trackActivityBatchRaw: (data: DataIngestBatchHttpRequest) => Promise<void>;
18
+ trackActivityForProfileId: (activity: ActivityPayload, profileId: string | undefined, src: ServiceCallSource) => Promise<void>;
19
+ trackActivityForProfileIdBatch: (activities: ActivityPayload[], profileId: string | undefined, src: ServiceCallSource) => Promise<void>;
20
+ trackActivityForProfile: (activity: ActivityPayload, profile: PersonIdentifiers, src: ServiceCallSource) => Promise<void>;
21
+ trackActivityForProfileBatch: (activities: ActivityPayload[], profile: PersonIdentifiers, src: ServiceCallSource) => Promise<void>;
22
+ }
23
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/api/helper/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAqB,iBAAiB,EAAE,MAAM,WAAW,CAAC;AACjE,OAAO,EACL,eAAe,EAAE,0BAA0B,EAAE,oBAAoB,EAAE,kBAAkB,EACrF,iBAAiB,EAAE,cAAc,EAClC,MAAM,aAAa,CAAC;AAIrB,qBAAa,cAAc;gBACb,MAAM,EAAE,cAAc;IAMlC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC;IAExB,OAAO,CAAC,YAAY,CAAM;IAGnB,wBAAwB,QAAa,QAAQ,IAAI,CAAC,CAExD;IAEM,gBAAgB,EAAE,kBAAkB,CAAC;IACrC,eAAe,EAAE,oBAAoB,CAAC;IAE7C,OAAO,CAAC,eAAe,CAMtB;IAEM,aAAa,aAAoB,iBAAiB,OAAO,iBAAiB,KAAG,QAAQ,MAAM,CAAC,CAmBlG;IAEM,kBAAkB,UAAiB,iBAAiB,EAAE,OAAO,iBAAiB,KAAG,QAAQ,IAAI,CAAC,CA0DpG;IAEM,kBAAkB,UAAiB;QAAE,QAAQ,EAAE,eAAe,CAAC;QAAC,OAAO,CAAC,EAAE,iBAAiB,GAAG,SAAS,CAAA;KAAE,EAAE,OAAO,iBAAiB,KAAG,QAAQ,IAAI,CAAC,CA4DzJ;IAEM,qBAAqB,SAAgB,0BAA0B,KAAG,QAAQ,IAAI,CAAC,CAErF;IAEM,yBAAyB,aAAoB,eAAe,aAAa,MAAM,GAAG,SAAS,OAAO,iBAAiB,KAAG,QAAQ,IAAI,CAAC,CAIzI;IAEM,8BAA8B,eAAsB,eAAe,EAAE,aAAa,MAAM,GAAG,SAAS,OAAO,iBAAiB,KAAG,QAAQ,IAAI,CAAC,CASlJ;IAEM,uBAAuB,aAAoB,eAAe,WAAW,iBAAiB,OAAO,iBAAiB,KAAG,QAAQ,IAAI,CAAC,CAIpI;IAEM,4BAA4B,eAAsB,eAAe,EAAE,WAAW,iBAAiB,OAAO,iBAAiB,KAAG,QAAQ,IAAI,CAAC,CAS7I;CACF"}
@@ -0,0 +1,6 @@
1
+ import { IdentityServiceProxy, IngestServiceProxy, SeekaAppConfig } from '../../services';
2
+ export declare const serviceResolver: {
3
+ getIdentityService: (config: SeekaAppConfig) => IdentityServiceProxy;
4
+ getIngestService: (config: SeekaAppConfig) => IngestServiceProxy;
5
+ };
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/api/helper/serviceResolver/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAiF1F,eAAO,MAAM,eAAe;iCACK,cAAc;+BAChB,cAAc;CAC5C,CAAA"}
@@ -0,0 +1,23 @@
1
+ import { SeekaPipelineIntegrationSource, TrackingEventSourceOriginType } from '../../api/services';
2
+ export interface ServiceCallSource {
3
+ /** Source method that requested the tracking. */
4
+ method?: string;
5
+ /** Type of origin that generated the tracking request.
6
+ This is not the same as where the tracking event originated from, this property specifies where the tracking event was tracked from. */
7
+ origin?: TrackingEventSourceOriginType;
8
+ /** URL where the tracking event originated from. */
9
+ loc?: string;
10
+ pipeline?: SeekaPipelineIntegrationSource;
11
+ }
12
+ export declare const AppPermissionKeys: {
13
+ identity: {
14
+ receiveFull: string;
15
+ send: string;
16
+ };
17
+ activity: {
18
+ receiveAnon: string;
19
+ receiveFull: string;
20
+ send: string;
21
+ };
22
+ };
23
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/api/models/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,8BAA8B,EAAE,6BAA6B,EAAE,MAAM,oBAAoB,CAAC;AAEnG,MAAM,WAAW,iBAAiB;IAC9B,iDAAiD;IACjD,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;2IACuI;IACvI,MAAM,CAAC,EAAE,6BAA6B,CAAC;IAEvC,oDAAoD;IACpD,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb,QAAQ,CAAC,EAAE,8BAA8B,CAAA;CAC5C;AAED,eAAO,MAAM,iBAAiB;;;;;;;;;;CAU7B,CAAA"}